var yne = Object.defineProperty; var _ne = (r, e, t) => e in r ? yne(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t; var Ir = (r, e, t) => (_ne(r, typeof e != "symbol" ? e + "" : e, t), t); import { defineComponent as de, openBlock as Re, createElementBlock as St, createCommentVNode as xe, createElementVNode as he, toDisplayString as us, createStaticVNode as wne, ref as te, reactive as _n, resolveComponent as mt, createVNode as re, withCtx as Ce, createTextVNode as Ne, pushScopeId as al, popScopeId as sl, Fragment as yh, renderList as Ib, createBlock as Nr, normalizeClass as Ui, watch as Ve, withDirectives as ba, vShow as lo, getCurrentScope as xne, onScopeDispose as Cne, unref as Ue, warn as Sne, getCurrentInstance as We, computed as Ie, inject as Wu, provide as $h, mergeProps as aD, renderSlot as ch, Transition as _i, toRefs as Ab, onMounted as hf, onBeforeUnmount as pf, onUpdated as Ene, nextTick as oi, useSlots as bne, resolveDynamicComponent as eH, normalizeStyle as oD, withModifiers as Tne, isVNode as L0, render as d3, onUnmounted as xa, isRef as tH, markRaw as Pne, h as H, Teleport as gO, toRaw as sg, vModelText as Ine } from "vue"; function rH(r) { return { all: r = r || /* @__PURE__ */ new Map(), on: function(e, t) { var n = r.get(e); n ? n.push(t) : r.set(e, [t]); }, off: function(e, t) { var n = r.get(e); n && (t ? n.splice(n.indexOf(t) >>> 0, 1) : r.set(e, [])); }, emit: function(e, t) { var n = r.get(e); n && n.slice().map(function(i) { i(t); }), (n = r.get("*")) && n.slice().map(function(i) { i(e, t); }); } }; } const Sg = rH(); const zn = (r, e) => { const t = r.__vccOpts || r; for (const [n, i] of e) t[n] = i; return t; }, Ane = { class: "loading-wrap" }, Lne = { key: 0, class: "mask" }, Dne = { class: "loading" }, Mne = /* @__PURE__ */ wne('
', 1), One = { class: "text" }, Rne = /* @__PURE__ */ de({ __name: "loading", props: { title: { type: String }, mask: { type: Boolean } }, setup(r) { return (e, t) => (Re(), St("div", Ane, [ r.mask ? (Re(), St("div", Lne)) : xe("", !0), he("div", Dne, [ Mne, he("div", One, us(r.title || "\u6B63\u5728\u52A0\u8F7D\u4E2D,\u8BF7\u7A0D\u7B49..."), 1) ]) ])); } }), Nne = /* @__PURE__ */ zn(Rne, [["__scopeId", "data-v-980d5584"]]); function Fne(r, e) { let n = e.scene.globe.ellipsoid, i = n == null ? void 0 : n.cartesianToCartographic(e.camera.position), a = r.Math.toDegrees(i.longitude), o = r.Math.toDegrees(i.latitude), s = i.height; return { lon: a, lat: o, height: s }; } const Bne = (r, e, t) => { t.camera.setView({ destination: e.Cartesian3.fromDegrees(r[0], r[1], r[2]) }); }, nH = (r, e, t) => { const n = t.scene.pickPosition(r.position); if (e.defined(n)) { const i = e.Cartographic.fromCartesian(n), a = e.Math.toDegrees(i.longitude), o = e.Math.toDegrees(i.latitude), s = i.height; return { lon: a, lat: o, height: s }; } else throw new Error("\u6CA1\u6709\u6355\u83B7\u5230\u5730\u7403\u5750\u6807"); }, Xm = (r, e) => new r.ScreenSpaceEventHandler(e.canvas); class iH { constructor(e, t) { if (!e) throw new Error("no viewer object!"); this.viewer = e, this.handler = void 0, this.init(); } init() { this.activeShapePoints = [], this.floatingPoint = void 0, this.activeShape = void 0, this.activePoints = [], this.initHandler(); } start(e) { const t = this; t.keyDownStatus(!0), t.init(), t.handler = new Cesium.ScreenSpaceEventHandler(t.viewer.canvas), t.handler.setInputAction(function(a) { var i, a = t.viewer.scene.pickPosition(a.position); Cesium.defined(a) && (t.activeShapePoints.length === 0 && (t.floatingPoint = t.createPoint(a), t.activeShapePoints.push(a), i = new Cesium.CallbackProperty(function() { return new Cesium.PolygonHierarchy(t.activeShapePoints); }, !1), t.activeShape = t.drawShape(i)), t.activeShapePoints.push(a), t.createPoint(a)); }, Cesium.ScreenSpaceEventType.LEFT_CLICK), t.handler.setInputAction(function(n) { Cesium.defined(t.floatingPoint) && (n = t.viewer.scene.pickPosition(n.endPosition), Cesium.defined(n) && (t.floatingPoint.position.setValue(n), t.activeShapePoints.pop(), t.activeShapePoints.push(n))); }, Cesium.ScreenSpaceEventType.MOUSE_MOVE), t.handler.setInputAction(function() { t.activeShapePoints.pop(), t.activeShapePoints.length && (t.polygon = t.drawShape(t.activeShapePoints)), t.viewer.entities.remove(t.floatingPoint), t.viewer.entities.remove(t.activeShape), t.activePoints.forEach((n) => { t.viewer.entities.remove(n); }), t.handler.destroy(), setTimeout(() => { typeof e == "function" && e(); }, 1e3); }, Cesium.ScreenSpaceEventType.RIGHT_CLICK); } initHandler() { this.handler && (this.handler.destroy(), this.handler = void 0); } createPoint(e) { return e = this.viewer.entities.add({ position: e, point: { color: Cesium.Color.SKYBLUE, pixelSize: 5 } }), this.activePoints.push(e), e; } drawShape(e) { return this.viewer.entities.add({ polygon: { hierarchy: e, material: new Cesium.ColorMaterialProperty(Cesium.Color.BLUE.withAlpha(0.4)) } }); } keyDownStatus(e) { const t = this; document.onkeydown = function(n) { if (n.ctrlKey && window.event.keyCode == 90) { if (!e) return !1; t.activeShapePoints.pop(), t.viewer.entities.remove(t.activePoints[t.activePoints.length - 1]), t.activePoints.pop(); } }; } Cartesian3ToDgrees(t) { var t = window.viewer.scene.globe.ellipsoid.cartesianToCartographic(t), n = Cesium.Math.toDegrees(t.latitude); return { lng: Cesium.Math.toDegrees(t.longitude), lat: n, alt: t.height }; } } class kne { constructor(e, t, n, i, a) { if (!e) throw new Error("no viewer object!"); if (this.viewer = e, !t) throw new Error("no positions object!"); if (this.positions = t, !n) throw new Error("no height object!"); this.height = n, this.precision = i || 256, this.maxHeigh = -1e6, this.createPolygonGeo(this.positions); } createPolygonGeo(n) { console.log(n); var t = Math.PI / Math.pow(2, 11), n = (t /= this.precision, new Cesium.PolygonGeometry.fromPositions({ positions: n, vertexFormat: Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT, granularity: t })); this.geom = new Cesium.PolygonGeometry.createGeometry(n); } VolumeAnalysis() { let e = 0, t = 0, n = 0, i = 0, a = 0; var o = this.geom.indices, s = this.geom.attributes.position.values; for (let p = 0; p < o.length; p += 3) { var f = this.returnPosition(s, o[p]), u = this.returnPosition(s, o[p + 1]), l = this.returnPosition(s, o[p + 2]), c = (this.viewer.entities.add({ name: "\u4E09\u89D2\u9762", polygon: { hierarchy: [f.heightPos, u.heightPos, l.heightPos], perPositionHeight: !0, material: Cesium.Color.fromRandom(), extrudedHeight: this.height, outline: !0, outlineColor: Cesium.Color.BLACK } }), this.computeArea4Triangle(f.noHeightPos, u.noHeightPos, l.noHeightPos)), f = (f.height + u.height + l.height) / 3; f < this.height ? (n += c, u = c * (this.height - f), i += u) : f == this.height ? a += c : (e += c, l = c * (f - this.height), t += l); } var h = e + n + a; return this.result = { allArea: h, cutArea: e, cutVolume: t, fillArea: n, fillVolume: i, noArea: a }, this.result; } computeCentroid4Polygon(e) { let t = [], n = [], i = 0, a = 0; for (let l = 0; l < e.length; l++) { var o = Cesium.Cartographic.fromCartesian(e[l]); i += o.longitude, a += o.latitude, t.push(o.longitude), n.push(o.latitude); } var u = i / e.length, s = a / e.length, u = new Cesium.Cartographic(u, s); return Cesium.Cartesian3.fromRadians(u.longitude, u.latitude, this.maxHeigh + 30); } computeArea4Triangle(s, a, o) { var i = Cesium.Cartesian3.distance(s, a), a = Cesium.Cartesian3.distance(a, o), o = Cesium.Cartesian3.distance(o, s), s = (i + a + o) / 2; return Math.sqrt(s * (s - i) * (s - a) * (s - o)); } returnPosition(e, t) { return e = new Cesium.Cartesian3(e[3 * t], e[3 * t + 1], e[3 * t + 2]), t = Cesium.Cartographic.fromCartesian(e), e = this.viewer.scene.sampleHeightSupported ? this.viewer.scene.sampleHeight(t) : this.viewer.scene.globe.getHeight(t), e > this.maxHeigh && (this.maxHeigh = e), { heightPos: Cesium.Cartesian3.fromRadians(t.longitude, t.latitude, e), noHeightPos: Cesium.Cartesian3.fromRadians(t.longitude, t.latitude, 0), height: e }; } } const Vne = (r) => (al("data-v-651a5cae"), r = r(), sl(), r), Gne = { class: "cut-fill-tools" }, zne = /* @__PURE__ */ Vne(() => /* @__PURE__ */ he("span", { class: "title" }, "\u6316\u586B\u65B9\u5206\u6790", -1)), $ne = { class: "tools-param" }, Hne = /* @__PURE__ */ Ne(" \u9AD8\u5EA6\u503C\uFF1A "), Une = /* @__PURE__ */ Ne(" \u7CBE\u5EA6\uFF1A "), Wne = { class: "tool-result" }, jne = /* @__PURE__ */ Ne(" \u603B\u5206\u6790\u9762\u79EF(\u33A1) "), Yne = /* @__PURE__ */ Ne(" \u586B\u65B9\u9762\u79EF(\u33A1) "), Xne = /* @__PURE__ */ Ne(" \u586B\u65B9\u4F53\u79EF(m\xB3) "), qne = /* @__PURE__ */ Ne(" \u6316\u65B9\u9762\u79EF(\u33A1) "), Zne = /* @__PURE__ */ Ne(" \u6316\u65B9\u4F53\u79EF(m\xB3) "), Kne = /* @__PURE__ */ Ne(" \u65E0\u987B\u586B\u6316\u9762\u79EF(\u33A1) "), Jne = /* @__PURE__ */ Ne("\u7ED8\u5236\u533A\u57DF"), Qne = /* @__PURE__ */ Ne("\u6E05\u7A7A"), eie = /* @__PURE__ */ de({ __name: "cut", emits: ["closeCut"], setup(r, { emit: e }) { const t = te(20), n = te(1256), i = _n({ allArea: "", fillArea: "", fillVolume: "", cutArea: "", cutVolume: "", noArea: "" }), a = (l) => { const c = t.value - 0 + window.cutHeight - 0; console.log(c, "height"); const h = new kne( window.viewer, l.activeShapePoints, c, n.value, window.Cesium ).VolumeAnalysis(); for (const p in h) i[p] = h[p]; window.viewer.entities.remove(l.polygon), window.viewer.scene.screenSpaceCameraController.enableCollisionDetection = !1; }, o = () => { const l = new iH(window.viewer, window.Cesium); l.start(() => a(l)); }, s = () => { for (const l in i) i[l] = ""; for (let l = 0; l < window.viewer.entities.values.length; l++) for (; window.viewer.entities.values[l]._name === "\u4E09\u89D2\u9762"; ) window.viewer.entities.remove(window.viewer.entities.values[l]); }, u = () => { s(), e("closeCut"); }; return (l, c) => { const f = mt("el-input"), h = mt("el-button"); return Re(), St("div", Gne, [ zne, he("span", { class: "delete", onClick: u }, "x"), he("div", $ne, [ he("span", null, [ Hne, re(f, { modelValue: t.value, "onUpdate:modelValue": c[0] || (c[0] = (p) => t.value = p) }, null, 8, ["modelValue"]) ]), he("span", null, [ Une, re(f, { type: "number", modelValue: n.value, "onUpdate:modelValue": c[1] || (c[1] = (p) => n.value = p) }, null, 8, ["modelValue"]) ]) ]), he("div", Wne, [ he("span", null, [ jne, re(f, { modelValue: i.allArea, "onUpdate:modelValue": c[2] || (c[2] = (p) => i.allArea = p) }, null, 8, ["modelValue"]) ]), he("span", null, [ Yne, re(f, { modelValue: i.fillArea, "onUpdate:modelValue": c[3] || (c[3] = (p) => i.fillArea = p) }, null, 8, ["modelValue"]) ]), he("span", null, [ Xne, re(f, { modelValue: i.fillVolume, "onUpdate:modelValue": c[4] || (c[4] = (p) => i.fillVolume = p) }, null, 8, ["modelValue"]) ]), he("span", null, [ qne, re(f, { modelValue: i.cutArea, "onUpdate:modelValue": c[5] || (c[5] = (p) => i.cutArea = p) }, null, 8, ["modelValue"]) ]), he("span", null, [ Zne, re(f, { modelValue: i.cutVolume, "onUpdate:modelValue": c[6] || (c[6] = (p) => i.cutVolume = p) }, null, 8, ["modelValue"]) ]), he("span", null, [ Kne, re(f, { modelValue: i.noArea, "onUpdate:modelValue": c[7] || (c[7] = (p) => i.noArea = p) }, null, 8, ["modelValue"]) ]), he("span", null, [ re(h, { onClick: o }, { default: Ce(() => [ Jne ]), _: 1 }), re(h, { type: "warning", onClick: s }, { default: Ce(() => [ Qne ]), _: 1 }) ]) ]) ]); }; } }), tie = /* @__PURE__ */ zn(eie, [["__scopeId", "data-v-651a5cae"]]); var wi = 63710088e-1, Lb = { centimeters: wi * 100, centimetres: wi * 100, degrees: wi / 111325, feet: wi * 3.28084, inches: wi * 39.37, kilometers: wi / 1e3, kilometres: wi / 1e3, meters: wi, metres: wi, miles: wi / 1609.344, millimeters: wi * 1e3, millimetres: wi * 1e3, nauticalmiles: wi / 1852, radians: 1, yards: wi * 1.0936 }, aH = { centimeters: 100, centimetres: 100, degrees: 1 / 111325, feet: 3.28084, inches: 39.37, kilometers: 1 / 1e3, kilometres: 1 / 1e3, meters: 1, metres: 1, miles: 1 / 1609.344, millimeters: 1e3, millimetres: 1e3, nauticalmiles: 1 / 1852, radians: 1 / wi, yards: 1.0936133 }, ES = { acres: 247105e-9, centimeters: 1e4, centimetres: 1e4, feet: 10.763910417, hectares: 1e-4, inches: 1550.003100006, kilometers: 1e-6, kilometres: 1e-6, meters: 1, metres: 1, miles: 386e-9, millimeters: 1e6, millimetres: 1e6, yards: 1.195990046 }; function fi(r, e, t) { t === void 0 && (t = {}); var n = { type: "Feature" }; return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = r, n; } function oH(r, e, t) { switch (r) { case "Point": return Lt(e).geometry; case "LineString": return Br(e).geometry; case "Polygon": return Nt(e).geometry; case "MultiPoint": return X1(e).geometry; case "MultiLineString": return Hh(e).geometry; case "MultiPolygon": return Fo(e).geometry; default: throw new Error(r + " is invalid"); } } function Lt(r, e, t) { if (t === void 0 && (t = {}), !r) throw new Error("coordinates is required"); if (!Array.isArray(r)) throw new Error("coordinates must be an Array"); if (r.length < 2) throw new Error("coordinates must be at least 2 numbers long"); if (!Mi(r[0]) || !Mi(r[1])) throw new Error("coordinates must contain numbers"); var n = { type: "Point", coordinates: r }; return fi(n, e, t); } function sH(r, e, t) { return t === void 0 && (t = {}), lt(r.map(function(n) { return Lt(n, e); }), t); } function Nt(r, e, t) { t === void 0 && (t = {}); for (var n = 0, i = r; n < i.length; n++) { var a = i[n]; if (a.length < 4) throw new Error("Each LinearRing of a Polygon must have 4 or more Positions."); for (var o = 0; o < a[a.length - 1].length; o++) if (a[a.length - 1][o] !== a[0][o]) throw new Error("First and last Position are not equivalent."); } var s = { type: "Polygon", coordinates: r }; return fi(s, e, t); } function uH(r, e, t) { return t === void 0 && (t = {}), lt(r.map(function(n) { return Nt(n, e); }), t); } function Br(r, e, t) { if (t === void 0 && (t = {}), r.length < 2) throw new Error("coordinates must be an array of two or more positions"); var n = { type: "LineString", coordinates: r }; return fi(n, e, t); } function lH(r, e, t) { return t === void 0 && (t = {}), lt(r.map(function(n) { return Br(n, e); }), t); } function lt(r, e) { e === void 0 && (e = {}); var t = { type: "FeatureCollection" }; return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = r, t; } function Hh(r, e, t) { t === void 0 && (t = {}); var n = { type: "MultiLineString", coordinates: r }; return fi(n, e, t); } function X1(r, e, t) { t === void 0 && (t = {}); var n = { type: "MultiPoint", coordinates: r }; return fi(n, e, t); } function Fo(r, e, t) { t === void 0 && (t = {}); var n = { type: "MultiPolygon", coordinates: r }; return fi(n, e, t); } function mO(r, e, t) { t === void 0 && (t = {}); var n = { type: "GeometryCollection", geometries: r }; return fi(n, e, t); } function cH(r, e) { if (e === void 0 && (e = 0), e && !(e >= 0)) throw new Error("precision must be a positive number"); var t = Math.pow(10, e || 0); return Math.round(r * t) / t; } function rm(r, e) { e === void 0 && (e = "kilometers"); var t = Lb[e]; if (!t) throw new Error(e + " units is invalid"); return r * t; } function vd(r, e) { e === void 0 && (e = "kilometers"); var t = Lb[e]; if (!t) throw new Error(e + " units is invalid"); return r / t; } function bS(r, e) { return _h(vd(r, e)); } function gd(r) { var e = r % 360; return e < 0 && (e += 360), e; } function _h(r) { var e = r % (2 * Math.PI); return e * 180 / Math.PI; } function Ii(r) { var e = r % 360; return e * Math.PI / 180; } function md(r, e, t) { if (e === void 0 && (e = "kilometers"), t === void 0 && (t = "kilometers"), !(r >= 0)) throw new Error("length must be a positive number"); return rm(vd(r, e), t); } function fH(r, e, t) { if (e === void 0 && (e = "meters"), t === void 0 && (t = "kilometers"), !(r >= 0)) throw new Error("area must be a positive number"); var n = ES[e]; if (!n) throw new Error("invalid original units"); var i = ES[t]; if (!i) throw new Error("invalid final units"); return r / n * i; } function Mi(r) { return !isNaN(r) && r !== null && !Array.isArray(r); } function $r(r) { return !!r && r.constructor === Object; } function hH(r) { if (!r) throw new Error("bbox is required"); if (!Array.isArray(r)) throw new Error("bbox must be an Array"); if (r.length !== 4 && r.length !== 6) throw new Error("bbox must be an Array of 4 or 6 numbers"); r.forEach(function(e) { if (!Mi(e)) throw new Error("bbox must only contain numbers"); }); } function pH(r) { if (!r) throw new Error("id is required"); if (["string", "number"].indexOf(typeof r) === -1) throw new Error("id must be a number or a string"); } const dH = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, earthRadius: wi, factors: Lb, unitsFactors: aH, areaFactors: ES, feature: fi, geometry: oH, point: Lt, points: sH, polygon: Nt, polygons: uH, lineString: Br, lineStrings: lH, featureCollection: lt, multiLineString: Hh, multiPoint: X1, multiPolygon: Fo, geometryCollection: mO, round: cH, radiansToLength: rm, lengthToRadians: vd, lengthToDegrees: bS, bearingToAzimuth: gd, radiansToDegrees: _h, degreesToRadians: Ii, convertLength: md, convertArea: fH, isNumber: Mi, isObject: $r, validateBBox: hH, validateId: pH }, Symbol.toStringTag, { value: "Module" })); function Fn(r, e, t) { if (r !== null) for (var n, i, a, o, s, u, l, c = 0, f = 0, h, p = r.type, d = p === "FeatureCollection", v = p === "Feature", g = d ? r.features.length : 1, m = 0; m < g; m++) { l = d ? r.features[m].geometry : v ? r.geometry : r, h = l ? l.type === "GeometryCollection" : !1, s = h ? l.geometries.length : 1; for (var y = 0; y < s; y++) { var _ = 0, w = 0; if (o = h ? l.geometries[y] : l, o !== null) { u = o.coordinates; var x = o.type; switch (c = t && (x === "Polygon" || x === "MultiPolygon") ? 1 : 0, x) { case null: break; case "Point": if (e( u, f, m, _, w ) === !1) return !1; f++, _++; break; case "LineString": case "MultiPoint": for (n = 0; n < u.length; n++) { if (e( u[n], f, m, _, w ) === !1) return !1; f++, x === "MultiPoint" && _++; } x === "LineString" && _++; break; case "Polygon": case "MultiLineString": for (n = 0; n < u.length; n++) { for (i = 0; i < u[n].length - c; i++) { if (e( u[n][i], f, m, _, w ) === !1) return !1; f++; } x === "MultiLineString" && _++, x === "Polygon" && w++; } x === "Polygon" && _++; break; case "MultiPolygon": for (n = 0; n < u.length; n++) { for (w = 0, i = 0; i < u[n].length; i++) { for (a = 0; a < u[n][i].length - c; a++) { if (e( u[n][i][a], f, m, _, w ) === !1) return !1; f++; } w++; } _++; } break; case "GeometryCollection": for (n = 0; n < o.geometries.length; n++) if (Fn(o.geometries[n], e, t) === !1) return !1; break; default: throw new Error("Unknown Geometry Type"); } } } } } function yO(r, e, t, n) { var i = t; return Fn( r, function(a, o, s, u, l) { o === 0 && t === void 0 ? i = a : i = e( i, a, o, s, u, l ); }, n ), i; } function _O(r, e) { var t; switch (r.type) { case "FeatureCollection": for (t = 0; t < r.features.length && e(r.features[t].properties, t) !== !1; t++) ; break; case "Feature": e(r.properties, 0); break; } } function vH(r, e, t) { var n = t; return _O(r, function(i, a) { a === 0 && t === void 0 ? n = i : n = e(n, i, a); }), n; } function Dr(r, e) { if (r.type === "Feature") e(r, 0); else if (r.type === "FeatureCollection") for (var t = 0; t < r.features.length && e(r.features[t], t) !== !1; t++) ; } function wO(r, e, t) { var n = t; return Dr(r, function(i, a) { a === 0 && t === void 0 ? n = i : n = e(n, i, a); }), n; } function nm(r) { var e = []; return Fn(r, function(t) { e.push(t); }), e; } function Bo(r, e) { var t, n, i, a, o, s, u, l, c, f, h = 0, p = r.type === "FeatureCollection", d = r.type === "Feature", v = p ? r.features.length : 1; for (t = 0; t < v; t++) { for (s = p ? r.features[t].geometry : d ? r.geometry : r, l = p ? r.features[t].properties : d ? r.properties : {}, c = p ? r.features[t].bbox : d ? r.bbox : void 0, f = p ? r.features[t].id : d ? r.id : void 0, u = s ? s.type === "GeometryCollection" : !1, o = u ? s.geometries.length : 1, i = 0; i < o; i++) { if (a = u ? s.geometries[i] : s, a === null) { if (e( null, h, l, c, f ) === !1) return !1; continue; } switch (a.type) { case "Point": case "LineString": case "MultiPoint": case "Polygon": case "MultiLineString": case "MultiPolygon": { if (e( a, h, l, c, f ) === !1) return !1; break; } case "GeometryCollection": { for (n = 0; n < a.geometries.length; n++) if (e( a.geometries[n], h, l, c, f ) === !1) return !1; break; } default: throw new Error("Unknown Geometry Type"); } } h++; } } function xO(r, e, t) { var n = t; return Bo( r, function(i, a, o, s, u) { a === 0 && t === void 0 ? n = i : n = e( n, i, a, o, s, u ); } ), n; } function Yi(r, e) { Bo(r, function(t, n, i, a, o) { var s = t === null ? null : t.type; switch (s) { case null: case "Point": case "LineString": case "Polygon": return e( fi(t, i, { bbox: a, id: o }), n, 0 ) === !1 ? !1 : void 0; } var u; switch (s) { case "MultiPoint": u = "Point"; break; case "MultiLineString": u = "LineString"; break; case "MultiPolygon": u = "Polygon"; break; } for (var l = 0; l < t.coordinates.length; l++) { var c = t.coordinates[l], f = { type: u, coordinates: c }; if (e(fi(f, i), n, l) === !1) return !1; } }); } function gH(r, e, t) { var n = t; return Yi( r, function(i, a, o) { a === 0 && o === 0 && t === void 0 ? n = i : n = e( n, i, a, o ); } ), n; } function Sc(r, e) { Yi(r, function(t, n, i) { var a = 0; if (!!t.geometry) { var o = t.geometry.type; if (!(o === "Point" || o === "MultiPoint")) { var s, u = 0, l = 0, c = 0; if (Fn( t, function(f, h, p, d, v) { if (s === void 0 || n > u || d > l || v > c) { s = f, u = n, l = d, c = v, a = 0; return; } var g = Br( [s, f], t.properties ); if (e( g, n, i, v, a ) === !1) return !1; a++, s = f; } ) === !1) return !1; } } }); } function CO(r, e, t) { var n = t, i = !1; return Sc( r, function(a, o, s, u, l) { i === !1 && t === void 0 ? n = a : n = e( n, a, o, s, u, l ), i = !0; } ), n; } function SO(r, e) { if (!r) throw new Error("geojson is required"); Yi(r, function(t, n, i) { if (t.geometry !== null) { var a = t.geometry.type, o = t.geometry.coordinates; switch (a) { case "LineString": if (e(t, n, i, 0, 0) === !1) return !1; break; case "Polygon": for (var s = 0; s < o.length; s++) if (e( Br(o[s], t.properties), n, i, s ) === !1) return !1; break; } } }); } function EO(r, e, t) { var n = t; return SO( r, function(i, a, o, s) { a === 0 && t === void 0 ? n = i : n = e( n, i, a, o, s ); } ), n; } function mH(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.featureIndex || 0, n = e.multiFeatureIndex || 0, i = e.geometryIndex || 0, a = e.segmentIndex || 0, o = e.properties, s; switch (r.type) { case "FeatureCollection": t < 0 && (t = r.features.length + t), o = o || r.features[t].properties, s = r.features[t].geometry; break; case "Feature": o = o || r.properties, s = r.geometry; break; case "Point": case "MultiPoint": return null; case "LineString": case "Polygon": case "MultiLineString": case "MultiPolygon": s = r; break; default: throw new Error("geojson is invalid"); } if (s === null) return null; var u = s.coordinates; switch (s.type) { case "Point": case "MultiPoint": return null; case "LineString": return a < 0 && (a = u.length + a - 1), Br( [u[a], u[a + 1]], o, e ); case "Polygon": return i < 0 && (i = u.length + i), a < 0 && (a = u[i].length + a - 1), Br( [ u[i][a], u[i][a + 1] ], o, e ); case "MultiLineString": return n < 0 && (n = u.length + n), a < 0 && (a = u[n].length + a - 1), Br( [ u[n][a], u[n][a + 1] ], o, e ); case "MultiPolygon": return n < 0 && (n = u.length + n), i < 0 && (i = u[n].length + i), a < 0 && (a = u[n][i].length - a - 1), Br( [ u[n][i][a], u[n][i][a + 1] ], o, e ); } throw new Error("geojson is invalid"); } function yH(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.featureIndex || 0, n = e.multiFeatureIndex || 0, i = e.geometryIndex || 0, a = e.coordIndex || 0, o = e.properties, s; switch (r.type) { case "FeatureCollection": t < 0 && (t = r.features.length + t), o = o || r.features[t].properties, s = r.features[t].geometry; break; case "Feature": o = o || r.properties, s = r.geometry; break; case "Point": case "MultiPoint": return null; case "LineString": case "Polygon": case "MultiLineString": case "MultiPolygon": s = r; break; default: throw new Error("geojson is invalid"); } if (s === null) return null; var u = s.coordinates; switch (s.type) { case "Point": return Lt(u, o, e); case "MultiPoint": return n < 0 && (n = u.length + n), Lt(u[n], o, e); case "LineString": return a < 0 && (a = u.length + a), Lt(u[a], o, e); case "Polygon": return i < 0 && (i = u.length + i), a < 0 && (a = u[i].length + a), Lt(u[i][a], o, e); case "MultiLineString": return n < 0 && (n = u.length + n), a < 0 && (a = u[n].length + a), Lt(u[n][a], o, e); case "MultiPolygon": return n < 0 && (n = u.length + n), i < 0 && (i = u[n].length + i), a < 0 && (a = u[n][i].length - a), Lt( u[n][i][a], o, e ); } throw new Error("geojson is invalid"); } const _H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, coordAll: nm, coordEach: Fn, coordReduce: yO, featureEach: Dr, featureReduce: wO, findPoint: yH, findSegment: mH, flattenEach: Yi, flattenReduce: gH, geomEach: Bo, geomReduce: xO, lineEach: SO, lineReduce: EO, propEach: _O, propReduce: vH, segmentEach: Sc, segmentReduce: CO }, Symbol.toStringTag, { value: "Module" })); function Bn(r) { var e = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; return Fn(r, function(t) { e[0] > t[0] && (e[0] = t[0]), e[1] > t[1] && (e[1] = t[1]), e[2] < t[0] && (e[2] = t[0]), e[3] < t[1] && (e[3] = t[1]); }), e; } Bn.default = Bn; const rie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Bn }, Symbol.toStringTag, { value: "Module" })); function qr(r) { if (!r) throw new Error("coord is required"); if (!Array.isArray(r)) { if (r.type === "Feature" && r.geometry !== null && r.geometry.type === "Point") return r.geometry.coordinates; if (r.type === "Point") return r.coordinates; } if (Array.isArray(r) && r.length >= 2 && !Array.isArray(r[0]) && !Array.isArray(r[1])) return r; throw new Error("coord must be GeoJSON Point or an Array of numbers"); } function pt(r) { if (Array.isArray(r)) return r; if (r.type === "Feature") { if (r.geometry !== null) return r.geometry.coordinates; } else if (r.coordinates) return r.coordinates; throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array"); } function bO(r) { if (r.length > 1 && Mi(r[0]) && Mi(r[1])) return !0; if (Array.isArray(r[0]) && r[0].length) return bO(r[0]); throw new Error("coordinates must only contain numbers"); } function wH(r, e, t) { if (!e || !t) throw new Error("type and name required"); if (!r || r.type !== e) throw new Error("Invalid input to " + t + ": must be a " + e + ", given " + r.type); } function O_(r, e, t) { if (!r) throw new Error("No feature passed"); if (!t) throw new Error(".featureOf() requires a name"); if (!r || r.type !== "Feature" || !r.geometry) throw new Error("Invalid input to " + t + ", Feature with geometry required"); if (!r.geometry || r.geometry.type !== e) throw new Error("Invalid input to " + t + ": must be a " + e + ", given " + r.geometry.type); } function df(r, e, t) { if (!r) throw new Error("No featureCollection passed"); if (!t) throw new Error(".collectionOf() requires a name"); if (!r || r.type !== "FeatureCollection") throw new Error("Invalid input to " + t + ", FeatureCollection required"); for (var n = 0, i = r.features; n < i.length; n++) { var a = i[n]; if (!a || a.type !== "Feature" || !a.geometry) throw new Error("Invalid input to " + t + ", Feature with geometry required"); if (!a.geometry || a.geometry.type !== e) throw new Error("Invalid input to " + t + ": must be a " + e + ", given " + a.geometry.type); } } function on(r) { return r.type === "Feature" ? r.geometry : r; } function po(r, e) { return r.type === "FeatureCollection" ? "FeatureCollection" : r.type === "GeometryCollection" ? "GeometryCollection" : r.type === "Feature" && r.geometry !== null ? r.geometry.type : r.type; } const nie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, getCoord: qr, getCoords: pt, containsNumber: bO, geojsonType: wH, featureOf: O_, collectionOf: df, getGeom: on, getType: po }, Symbol.toStringTag, { value: "Module" })); var Db = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function q1(r) { var e = r.default; if (typeof e == "function") { var t = function() { return e.apply(this, arguments); }; t.prototype = e.prototype; } else t = {}; return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(n) { var i = Object.getOwnPropertyDescriptor(r, n); Object.defineProperty(t, n, i.get ? i : { enumerable: !0, get: function() { return r[n]; } }); }), t; } /* object-assign (c) Sindre Sorhus @license MIT */ var v3 = Object.getOwnPropertySymbols, iie = Object.prototype.hasOwnProperty, aie = Object.prototype.propertyIsEnumerable; function oie(r) { if (r == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(r); } function sie() { try { if (!Object.assign) return !1; var r = new String("abc"); if (r[5] = "de", Object.getOwnPropertyNames(r)[0] === "5") return !1; for (var e = {}, t = 0; t < 10; t++) e["_" + String.fromCharCode(t)] = t; var n = Object.getOwnPropertyNames(e).map(function(a) { return e[a]; }); if (n.join("") !== "0123456789") return !1; var i = {}; return "abcdefghijklmnopqrst".split("").forEach(function(a) { i[a] = a; }), Object.keys(Object.assign({}, i)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } var TO = sie() ? Object.assign : function(r, e) { for (var t, n = oie(r), i, a = 1; a < arguments.length; a++) { t = Object(arguments[a]); for (var o in t) iie.call(t, o) && (n[o] = t[o]); if (v3) { i = v3(t); for (var s = 0; s < i.length; s++) aie.call(t, i[s]) && (n[i[s]] = t[i[s]]); } } return n; }; /** * @license GNU Affero General Public License. * Copyright (c) 2015, 2015 Ronny Lorenz * v. 1.2.0 * https://github.com/RaumZeit/MarchingSquares.js * * MarchingSquaresJS is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MarchingSquaresJS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * As additional permission under GNU Affero General Public License version 3 * section 7, third-party projects (personal or commercial) may distribute, * include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the * requirement that said third-party project for that reason alone becomes * subject to any requirement of the GNU Affero General Public License version 3. * Any modifications to MarchingSquaresJS, however, must be shared with the public * and made available. * * In summary this: * - allows you to use MarchingSquaresJS at no cost * - allows you to use MarchingSquaresJS for both personal and commercial purposes * - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any * license as long as this license notice is included * - enables you to keep the source code of your program that uses MarchingSquaresJS * undisclosed * - forces you to share any modifications you have made to MarchingSquaresJS, * e.g. bug-fixes * * You should have received a copy of the GNU Affero General Public License * along with MarchingSquaresJS. If not, see . */ var g3 = { successCallback: null, verbose: !1 }, hx = {}; function uie(r, e, t) { t = t || {}; for (var n = Object.keys(g3), i = 0; i < n.length; i++) { var a = n[i], o = t[a]; o = typeof o < "u" && o !== null ? o : g3[a], hx[a] = o; } hx.verbose && console.log( "MarchingSquaresJS-isoContours: computing isocontour for " + e ); var s = fie(lie(r, e)); return typeof hx.successCallback == "function" && hx.successCallback(s), s; } function Hr(r, e, t) { return (r - e) / (t - e); } function lie(r, e) { for (var t = r.length - 1, n = r[0].length - 1, i = { rows: t, cols: n, cells: [] }, a = 0; a < t; ++a) { i.cells[a] = []; for (var o = 0; o < n; ++o) { var s = 0, u = r[a + 1][o], l = r[a + 1][o + 1], c = r[a][o + 1], f = r[a][o]; if (!(isNaN(u) || isNaN(l) || isNaN(c) || isNaN(f))) { s |= u >= e ? 8 : 0, s |= l >= e ? 4 : 0, s |= c >= e ? 2 : 0, s |= f >= e ? 1 : 0; var h = !1; if (s === 5 || s === 10) { var p = (u + l + c + f) / 4; s === 5 && p < e ? (s = 10, h = !0) : s === 10 && p < e && (s = 5, h = !0); } if (s !== 0 && s !== 15) { var d, v, g, m; d = v = g = m = 0.5, s === 1 ? (g = 1 - Hr(e, u, f), v = 1 - Hr(e, c, f)) : s === 2 ? (v = Hr(e, f, c), m = 1 - Hr(e, l, c)) : s === 3 ? (g = 1 - Hr(e, u, f), m = 1 - Hr(e, l, c)) : s === 4 ? (d = Hr(e, u, l), m = Hr(e, c, l)) : s === 5 ? (d = Hr(e, u, l), m = Hr(e, c, l), v = 1 - Hr(e, c, f), g = 1 - Hr(e, u, f)) : s === 6 ? (v = Hr(e, f, c), d = Hr(e, u, l)) : s === 7 ? (g = 1 - Hr(e, u, f), d = Hr(e, u, l)) : s === 8 ? (g = Hr(e, f, u), d = 1 - Hr(e, l, u)) : s === 9 ? (v = 1 - Hr(e, c, f), d = 1 - Hr(e, l, u)) : s === 10 ? (d = 1 - Hr(e, l, u), m = 1 - Hr(e, l, c), v = Hr(e, f, c), g = Hr(e, f, u)) : s === 11 ? (d = 1 - Hr(e, l, u), m = 1 - Hr(e, l, c)) : s === 12 ? (g = Hr(e, f, u), m = Hr(e, c, l)) : s === 13 ? (v = 1 - Hr(e, c, f), m = Hr(e, c, l)) : s === 14 ? (g = Hr(e, f, u), v = Hr(e, f, c)) : console.log( "MarchingSquaresJS-isoContours: Illegal cval detected: " + s ), i.cells[a][o] = { cval: s, flipped: h, top: d, right: m, bottom: v, left: g }; } } } } return i; } function cie(r) { return r.cval === 5 || r.cval === 10; } function xH(r) { return r.cval === 0 || r.cval === 15; } function m3(r) { !xH(r) && r.cval !== 5 && r.cval !== 10 && (r.cval = 15); } function AP(r, e) { if (e === "top") return [r.top, 1]; if (e === "bottom") return [r.bottom, 0]; if (e === "right") return [1, r.right]; if (e === "left") return [0, r.left]; } function fie(r) { var e = [], t = 0, n = 1e-7; return r.cells.forEach(function(i, a) { i.forEach(function(o, s) { if (typeof o < "u" && !cie(o) && !xH(o)) { var u = hie(r.cells, a, s), l = !1; if (u.info === "mergeable") { for (var c = u.path[u.path.length - 1][0], f = u.path[u.path.length - 1][1], h = t - 1; h >= 0; h--) if (Math.abs(e[h][0][0] - c) <= n && Math.abs(e[h][0][1] - f) <= n) { for (var p = u.path.length - 2; p >= 0; --p) e[h].unshift(u.path[p]); l = !0; break; } } l || (e[t++] = u.path); } }); }), e; } function hie(r, e, t) { var n = r.length, i = [], a = [0, 0, 1, 1, 0, 0, 0, 0, -1, 0, 1, 1, -1, 0, -1, 0], o = [0, -1, 0, 0, 1, 1, 1, 1, 0, -1, 0, 0, 0, -1, 0, 0], s, u, l = [ "none", "left", "bottom", "left", "right", "none", "bottom", "left", "top", "top", "none", "top", "right", "right", "bottom", "none" ], c = [ "none", "bottom", "right", "right", "top", "top", "top", "top", "left", "bottom", "right", "right", "left", "bottom", "left", "none" ], p, f = r[e][t], h = f.cval, p = l[h], d = AP(f, p); i.push([t + d[0], e + d[1]]), p = c[h], d = AP(f, p), i.push([t + d[0], e + d[1]]), m3(f); for (var v = t + a[h], g = e + o[h], m = h; v >= 0 && g >= 0 && g < n && (v != t || g != e) && (f = r[g][v], !(typeof f > "u")); ) { if (h = f.cval, h === 0 || h === 15) return { path: i, info: "mergeable" }; p = c[h], s = a[h], u = o[h], (h === 5 || h === 10) && (h === 5 ? f.flipped ? o[m] === -1 ? (p = "left", s = -1, u = 0) : (p = "right", s = 1, u = 0) : a[m] === -1 && (p = "bottom", s = 0, u = -1) : h === 10 && (f.flipped ? a[m] === -1 ? (p = "top", s = 0, u = 1) : (p = "bottom", s = 0, u = -1) : o[m] === 1 && (p = "left", s = -1, u = 0))), d = AP(f, p), i.push([v + d[0], g + d[1]]), m3(f), v += s, g += u, m = h; } return { path: i, info: "closed" }; } function pie(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.zProperty || "elevation", n = e.flip, i = e.flags; df(r, "Point", "input must contain Points"); for (var a = die(r, n), o = [], s = 0; s < a.length; s++) { for (var u = a[s], l = [], c = 0; c < u.length; c++) { var f = u[c]; f.properties[t] ? l.push(f.properties[t]) : l.push(0), i === !0 && (f.properties.matrixPosition = [s, c]); } o.push(l); } return o; } function die(r, e) { var t = {}; Dr(r, function(a) { var o = pt(a)[1]; t[o] || (t[o] = []), t[o].push(a); }); var n = Object.keys(t).map(function(a) { var o = t[a], s = o.sort(function(u, l) { return pt(u)[0] - pt(l)[0]; }); return s; }), i = n.sort(function(a, o) { return e ? pt(a[0])[1] - pt(o[0])[1] : pt(o[0])[1] - pt(a[0])[1]; }); return i; } function vie(r, e, t) { if (t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.zProperty || "elevation", i = t.commonProperties || {}, a = t.breaksProperties || []; if (df(r, "Point", "Input must contain Points"), !e) throw new Error("breaks is required"); if (!Array.isArray(e)) throw new Error("breaks must be an Array"); if (!$r(i)) throw new Error("commonProperties must be an Object"); if (!Array.isArray(a)) throw new Error("breaksProperties must be an Array"); var o = pie(r, { zProperty: n, flip: !0 }), s = gie( o, e, n, i, a ), u = mie(s, o, r); return lt(u); } function gie(r, e, t, n, i) { for (var a = [], o = 1; o < e.length; o++) { var s = +e[o], u = TO({}, n, i[o]); u[t] = s; var l = Hh(uie(r, s), u); a.push(l); } return a; } function mie(r, e, t) { var n = Bn(t), i = n[2] - n[0], a = n[3] - n[1], o = n[0], s = n[1], u = e[0].length - 1, l = e.length - 1, c = i / u, f = a / l, h = function(p) { p[0] = p[0] * c + o, p[1] = p[1] * f + s; }; return r.forEach(function(p) { Fn(p, h); }), r; } var PO = { exports: {} }; function yie(r, e, t, n, i) { CH(r, e, t || 0, n || r.length - 1, i || _ie); } function CH(r, e, t, n, i) { for (; n > t; ) { if (n - t > 600) { var a = n - t + 1, o = e - t + 1, s = Math.log(a), u = 0.5 * Math.exp(2 * s / 3), l = 0.5 * Math.sqrt(s * u * (a - u) / a) * (o - a / 2 < 0 ? -1 : 1), c = Math.max(t, Math.floor(e - o * u / a + l)), f = Math.min(n, Math.floor(e + (a - o) * u / a + l)); CH(r, e, c, f, i); } var h = r[e], p = t, d = n; for (Wy(r, t, e), i(r[n], h) > 0 && Wy(r, t, n); p < d; ) { for (Wy(r, p, d), p++, d--; i(r[p], h) < 0; ) p++; for (; i(r[d], h) > 0; ) d--; } i(r[t], h) === 0 ? Wy(r, t, d) : (d++, Wy(r, d, n)), d <= e && (t = d + 1), e <= d && (n = d - 1); } } function Wy(r, e, t) { var n = r[e]; r[e] = r[t], r[t] = n; } function _ie(r, e) { return r < e ? -1 : r > e ? 1 : 0; } class IO { constructor(e = 9) { this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear(); } all() { return this._all(this.data, []); } search(e) { let t = this.data; const n = []; if (!dx(e, t)) return n; const i = this.toBBox, a = []; for (; t; ) { for (let o = 0; o < t.children.length; o++) { const s = t.children[o], u = t.leaf ? i(s) : s; dx(e, u) && (t.leaf ? n.push(s) : DP(e, u) ? this._all(s, n) : a.push(s)); } t = a.pop(); } return n; } collides(e) { let t = this.data; if (!dx(e, t)) return !1; const n = []; for (; t; ) { for (let i = 0; i < t.children.length; i++) { const a = t.children[i], o = t.leaf ? this.toBBox(a) : a; if (dx(e, o)) { if (t.leaf || DP(e, o)) return !0; n.push(a); } } t = n.pop(); } return !1; } load(e) { if (!(e && e.length)) return this; if (e.length < this._minEntries) { for (let n = 0; n < e.length; n++) this.insert(e[n]); return this; } let t = this._build(e.slice(), 0, e.length - 1, 0); if (!this.data.children.length) this.data = t; else if (this.data.height === t.height) this._splitRoot(this.data, t); else { if (this.data.height < t.height) { const n = this.data; this.data = t, t = n; } this._insert(t, this.data.height - t.height - 1, !0); } return this; } insert(e) { return e && this._insert(e, this.data.height - 1), this; } clear() { return this.data = ug([]), this; } remove(e, t) { if (!e) return this; let n = this.data; const i = this.toBBox(e), a = [], o = []; let s, u, l; for (; n || a.length; ) { if (n || (n = a.pop(), u = a[a.length - 1], s = o.pop(), l = !0), n.leaf) { const c = wie(e, n.children, t); if (c !== -1) return n.children.splice(c, 1), a.push(n), this._condense(a), this; } !l && !n.leaf && DP(n, i) ? (a.push(n), o.push(s), s = 0, u = n, n = n.children[0]) : u ? (s++, n = u.children[s], l = !1) : n = null; } return this; } toBBox(e) { return e; } compareMinX(e, t) { return e.minX - t.minX; } compareMinY(e, t) { return e.minY - t.minY; } toJSON() { return this.data; } fromJSON(e) { return this.data = e, this; } _all(e, t) { const n = []; for (; e; ) e.leaf ? t.push(...e.children) : n.push(...e.children), e = n.pop(); return t; } _build(e, t, n, i) { const a = n - t + 1; let o = this._maxEntries, s; if (a <= o) return s = ug(e.slice(t, n + 1)), Ev(s, this.toBBox), s; i || (i = Math.ceil(Math.log(a) / Math.log(o)), o = Math.ceil(a / Math.pow(o, i - 1))), s = ug([]), s.leaf = !1, s.height = i; const u = Math.ceil(a / o), l = u * Math.ceil(Math.sqrt(o)); y3(e, t, n, l, this.compareMinX); for (let c = t; c <= n; c += l) { const f = Math.min(c + l - 1, n); y3(e, c, f, u, this.compareMinY); for (let h = c; h <= f; h += u) { const p = Math.min(h + u - 1, f); s.children.push(this._build(e, h, p, i - 1)); } } return Ev(s, this.toBBox), s; } _chooseSubtree(e, t, n, i) { for (; i.push(t), !(t.leaf || i.length - 1 === n); ) { let a = 1 / 0, o = 1 / 0, s; for (let u = 0; u < t.children.length; u++) { const l = t.children[u], c = LP(l), f = Sie(e, l) - c; f < o ? (o = f, a = c < a ? c : a, s = l) : f === o && c < a && (a = c, s = l); } t = s || t.children[0]; } return t; } _insert(e, t, n) { const i = n ? e : this.toBBox(e), a = [], o = this._chooseSubtree(i, this.data, t, a); for (o.children.push(e), M0(o, i); t >= 0 && a[t].children.length > this._maxEntries; ) this._split(a, t), t--; this._adjustParentBBoxes(i, a, t); } _split(e, t) { const n = e[t], i = n.children.length, a = this._minEntries; this._chooseSplitAxis(n, a, i); const o = this._chooseSplitIndex(n, a, i), s = ug(n.children.splice(o, n.children.length - o)); s.height = n.height, s.leaf = n.leaf, Ev(n, this.toBBox), Ev(s, this.toBBox), t ? e[t - 1].children.push(s) : this._splitRoot(n, s); } _splitRoot(e, t) { this.data = ug([e, t]), this.data.height = e.height + 1, this.data.leaf = !1, Ev(this.data, this.toBBox); } _chooseSplitIndex(e, t, n) { let i, a = 1 / 0, o = 1 / 0; for (let s = t; s <= n - t; s++) { const u = D0(e, 0, s, this.toBBox), l = D0(e, s, n, this.toBBox), c = Eie(u, l), f = LP(u) + LP(l); c < a ? (a = c, i = s, o = f < o ? f : o) : c === a && f < o && (o = f, i = s); } return i || n - t; } _chooseSplitAxis(e, t, n) { const i = e.leaf ? this.compareMinX : xie, a = e.leaf ? this.compareMinY : Cie, o = this._allDistMargin(e, t, n, i), s = this._allDistMargin(e, t, n, a); o < s && e.children.sort(i); } _allDistMargin(e, t, n, i) { e.children.sort(i); const a = this.toBBox, o = D0(e, 0, t, a), s = D0(e, n - t, n, a); let u = px(o) + px(s); for (let l = t; l < n - t; l++) { const c = e.children[l]; M0(o, e.leaf ? a(c) : c), u += px(o); } for (let l = n - t - 1; l >= t; l--) { const c = e.children[l]; M0(s, e.leaf ? a(c) : c), u += px(s); } return u; } _adjustParentBBoxes(e, t, n) { for (let i = n; i >= 0; i--) M0(t[i], e); } _condense(e) { for (let t = e.length - 1, n; t >= 0; t--) e[t].children.length === 0 ? t > 0 ? (n = e[t - 1].children, n.splice(n.indexOf(e[t]), 1)) : this.clear() : Ev(e[t], this.toBBox); } } function wie(r, e, t) { if (!t) return e.indexOf(r); for (let n = 0; n < e.length; n++) if (t(r, e[n])) return n; return -1; } function Ev(r, e) { D0(r, 0, r.children.length, e, r); } function D0(r, e, t, n, i) { i || (i = ug(null)), i.minX = 1 / 0, i.minY = 1 / 0, i.maxX = -1 / 0, i.maxY = -1 / 0; for (let a = e; a < t; a++) { const o = r.children[a]; M0(i, r.leaf ? n(o) : o); } return i; } function M0(r, e) { return r.minX = Math.min(r.minX, e.minX), r.minY = Math.min(r.minY, e.minY), r.maxX = Math.max(r.maxX, e.maxX), r.maxY = Math.max(r.maxY, e.maxY), r; } function xie(r, e) { return r.minX - e.minX; } function Cie(r, e) { return r.minY - e.minY; } function LP(r) { return (r.maxX - r.minX) * (r.maxY - r.minY); } function px(r) { return r.maxX - r.minX + (r.maxY - r.minY); } function Sie(r, e) { return (Math.max(e.maxX, r.maxX) - Math.min(e.minX, r.minX)) * (Math.max(e.maxY, r.maxY) - Math.min(e.minY, r.minY)); } function Eie(r, e) { const t = Math.max(r.minX, e.minX), n = Math.max(r.minY, e.minY), i = Math.min(r.maxX, e.maxX), a = Math.min(r.maxY, e.maxY); return Math.max(0, i - t) * Math.max(0, a - n); } function DP(r, e) { return r.minX <= e.minX && r.minY <= e.minY && e.maxX <= r.maxX && e.maxY <= r.maxY; } function dx(r, e) { return e.minX <= r.maxX && e.minY <= r.maxY && e.maxX >= r.minX && e.maxY >= r.minY; } function ug(r) { return { children: r, height: 1, leaf: !0, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 }; } function y3(r, e, t, n, i) { const a = [e, t]; for (; a.length; ) { if (t = a.pop(), e = a.pop(), t - e <= n) continue; const o = e + Math.ceil((t - e) / n / 2) * n; yie(r, o, e, t, i), a.push(e, o, o, t); } } const bie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: IO }, Symbol.toStringTag, { value: "Module" })), SH = /* @__PURE__ */ q1(bie); class Tie { constructor(e = [], t = Pie) { if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n); } push(e) { this.data.push(e), this.length++, this._up(this.length - 1); } pop() { if (this.length === 0) return; const e = this.data[0], t = this.data.pop(); return this.length--, this.length > 0 && (this.data[0] = t, this._down(0)), e; } peek() { return this.data[0]; } _up(e) { const { data: t, compare: n } = this, i = t[e]; for (; e > 0; ) { const a = e - 1 >> 1, o = t[a]; if (n(i, o) >= 0) break; t[e] = o, e = a; } t[e] = i; } _down(e) { const { data: t, compare: n } = this, i = this.length >> 1, a = t[e]; for (; e < i; ) { let o = (e << 1) + 1, s = t[o]; const u = o + 1; if (u < this.length && n(t[u], s) < 0 && (o = u, s = t[u]), n(s, a) >= 0) break; t[e] = s, e = o; } t[e] = a; } } function Pie(r, e) { return r < e ? -1 : r > e ? 1 : 0; } const Iie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Tie }, Symbol.toStringTag, { value: "Module" })), Aie = /* @__PURE__ */ q1(Iie); var Mb = { exports: {} }, Lie = function(e, t, n, i) { var a = e[0], o = e[1], s = !1; n === void 0 && (n = 0), i === void 0 && (i = t.length); for (var u = (i - n) / 2, l = 0, c = u - 1; l < u; c = l++) { var f = t[n + l * 2 + 0], h = t[n + l * 2 + 1], p = t[n + c * 2 + 0], d = t[n + c * 2 + 1], v = h > o != d > o && a < (p - f) * (o - h) / (d - h) + f; v && (s = !s); } return s; }, Die = function(e, t, n, i) { var a = e[0], o = e[1], s = !1; n === void 0 && (n = 0), i === void 0 && (i = t.length); for (var u = i - n, l = 0, c = u - 1; l < u; c = l++) { var f = t[l + n][0], h = t[l + n][1], p = t[c + n][0], d = t[c + n][1], v = h > o != d > o && a < (p - f) * (o - h) / (d - h) + f; v && (s = !s); } return s; }, EH = Lie, bH = Die; Mb.exports = function(e, t, n, i) { return t.length > 0 && Array.isArray(t[0]) ? bH(e, t, n, i) : EH(e, t, n, i); }; Mb.exports.nested = bH; Mb.exports.flat = EH; var sD = { exports: {} }; (function(r, e) { (function(t, n) { n(e); })(Db, function(t) { const i = 33306690738754706e-32; function a(v, g, m, y, _) { let w, x, C, S, b = g[0], E = y[0], T = 0, P = 0; E > b == E > -b ? (w = b, b = g[++T]) : (w = E, E = y[++P]); let I = 0; if (T < v && P < m) for (E > b == E > -b ? (C = w - ((x = b + w) - b), b = g[++T]) : (C = w - ((x = E + w) - E), E = y[++P]), w = x, C !== 0 && (_[I++] = C); T < v && P < m; ) E > b == E > -b ? (C = w - ((x = w + b) - (S = x - w)) + (b - S), b = g[++T]) : (C = w - ((x = w + E) - (S = x - w)) + (E - S), E = y[++P]), w = x, C !== 0 && (_[I++] = C); for (; T < v; ) C = w - ((x = w + b) - (S = x - w)) + (b - S), b = g[++T], w = x, C !== 0 && (_[I++] = C); for (; P < m; ) C = w - ((x = w + E) - (S = x - w)) + (E - S), E = y[++P], w = x, C !== 0 && (_[I++] = C); return w === 0 && I !== 0 || (_[I++] = w), I; } function o(v) { return new Float64Array(v); } const s = 33306690738754716e-32, u = 22204460492503146e-32, l = 11093356479670487e-47, c = o(4), f = o(8), h = o(12), p = o(16), d = o(4); t.orient2d = function(v, g, m, y, _, w) { const x = (g - w) * (m - _), C = (v - _) * (y - w), S = x - C; if (x === 0 || C === 0 || x > 0 != C > 0) return S; const b = Math.abs(x + C); return Math.abs(S) >= s * b ? S : -function(E, T, P, I, A, L, D) { let O, N, F, k, G, U, B, X, j, ae, se, $, V, q, ee, Y, K, fe; const J = E - A, ue = P - A, ne = T - L, ve = I - L; G = (ee = (X = J - (B = (U = 134217729 * J) - (U - J))) * (ae = ve - (j = (U = 134217729 * ve) - (U - ve))) - ((q = J * ve) - B * j - X * j - B * ae)) - (se = ee - (K = (X = ne - (B = (U = 134217729 * ne) - (U - ne))) * (ae = ue - (j = (U = 134217729 * ue) - (U - ue))) - ((Y = ne * ue) - B * j - X * j - B * ae))), c[0] = ee - (se + G) + (G - K), G = (V = q - (($ = q + se) - (G = $ - q)) + (se - G)) - (se = V - Y), c[1] = V - (se + G) + (G - Y), G = (fe = $ + se) - $, c[2] = $ - (fe - G) + (se - G), c[3] = fe; let Pe = function(Oe, we) { let Je = we[0]; for (let z = 1; z < Oe; z++) Je += we[z]; return Je; }(4, c), Be = u * D; if (Pe >= Be || -Pe >= Be || (O = E - (J + (G = E - J)) + (G - A), F = P - (ue + (G = P - ue)) + (G - A), N = T - (ne + (G = T - ne)) + (G - L), k = I - (ve + (G = I - ve)) + (G - L), O === 0 && N === 0 && F === 0 && k === 0) || (Be = l * D + i * Math.abs(Pe), (Pe += J * k + ve * O - (ne * F + ue * N)) >= Be || -Pe >= Be)) return Pe; G = (ee = (X = O - (B = (U = 134217729 * O) - (U - O))) * (ae = ve - (j = (U = 134217729 * ve) - (U - ve))) - ((q = O * ve) - B * j - X * j - B * ae)) - (se = ee - (K = (X = N - (B = (U = 134217729 * N) - (U - N))) * (ae = ue - (j = (U = 134217729 * ue) - (U - ue))) - ((Y = N * ue) - B * j - X * j - B * ae))), d[0] = ee - (se + G) + (G - K), G = (V = q - (($ = q + se) - (G = $ - q)) + (se - G)) - (se = V - Y), d[1] = V - (se + G) + (G - Y), G = (fe = $ + se) - $, d[2] = $ - (fe - G) + (se - G), d[3] = fe; const ke = a(4, c, 4, d, f); G = (ee = (X = J - (B = (U = 134217729 * J) - (U - J))) * (ae = k - (j = (U = 134217729 * k) - (U - k))) - ((q = J * k) - B * j - X * j - B * ae)) - (se = ee - (K = (X = ne - (B = (U = 134217729 * ne) - (U - ne))) * (ae = F - (j = (U = 134217729 * F) - (U - F))) - ((Y = ne * F) - B * j - X * j - B * ae))), d[0] = ee - (se + G) + (G - K), G = (V = q - (($ = q + se) - (G = $ - q)) + (se - G)) - (se = V - Y), d[1] = V - (se + G) + (G - Y), G = (fe = $ + se) - $, d[2] = $ - (fe - G) + (se - G), d[3] = fe; const Le = a(ke, f, 4, d, h); G = (ee = (X = O - (B = (U = 134217729 * O) - (U - O))) * (ae = k - (j = (U = 134217729 * k) - (U - k))) - ((q = O * k) - B * j - X * j - B * ae)) - (se = ee - (K = (X = N - (B = (U = 134217729 * N) - (U - N))) * (ae = F - (j = (U = 134217729 * F) - (U - F))) - ((Y = N * F) - B * j - X * j - B * ae))), d[0] = ee - (se + G) + (G - K), G = (V = q - (($ = q + se) - (G = $ - q)) + (se - G)) - (se = V - Y), d[1] = V - (se + G) + (G - Y), G = (fe = $ + se) - $, d[2] = $ - (fe - G) + (se - G), d[3] = fe; const Ye = a(Le, h, 4, d, p); return p[Ye - 1]; }(v, g, m, y, _, w, b); }, t.orient2dfast = function(v, g, m, y, _, w) { return (g - w) * (m - _) - (v - _) * (y - w); }, Object.defineProperty(t, "__esModule", { value: !0 }); }); })(sD, sD.exports); var _3 = SH, YC = Aie, Mie = Mb.exports, Oie = sD.exports.orient2d; YC.default && (YC = YC.default); PO.exports = TH; PO.exports.default = TH; function TH(r, e, t) { e = Math.max(0, e === void 0 ? 2 : e), t = t || 0; var n = kie(r), i = new _3(16); i.toBBox = function(y) { return { minX: y[0], minY: y[1], maxX: y[0], maxY: y[1] }; }, i.compareMinX = function(y, _) { return y[0] - _[0]; }, i.compareMinY = function(y, _) { return y[1] - _[1]; }, i.load(r); for (var a = [], o = 0, s; o < n.length; o++) { var u = n[o]; i.remove(u), s = C3(u, s), a.push(s); } var l = new _3(16); for (o = 0; o < a.length; o++) l.insert(MP(a[o])); for (var c = e * e, f = t * t; a.length; ) { var h = a.shift(), p = h.p, d = h.next.p, v = OP(p, d); if (!(v < f)) { var g = v / c; u = Rie(i, h.prev.p, p, d, h.next.next.p, g, l), u && Math.min(OP(u, p), OP(u, d)) <= g && (a.push(h), a.push(C3(u, h)), i.remove(u), l.remove(h), l.insert(MP(h)), l.insert(MP(h.next))); } } h = s; var m = []; do m.push(h.p), h = h.next; while (h !== s); return m.push(h.p), m; } function Rie(r, e, t, n, i, a, o) { for (var s = new YC([], Nie), u = r.data; u; ) { for (var l = 0; l < u.children.length; l++) { var c = u.children[l], f = u.leaf ? RP(c, t, n) : Fie(t, n, c); f > a || s.push({ node: c, dist: f }); } for (; s.length && !s.peek().node.children; ) { var h = s.pop(), p = h.node, d = RP(p, e, t), v = RP(p, n, i); if (h.dist < d && h.dist < v && x3(t, p, o) && x3(n, p, o)) return p; } u = s.pop(), u && (u = u.node); } return null; } function Nie(r, e) { return r.dist - e.dist; } function Fie(r, e, t) { if (w3(r, t) || w3(e, t)) return 0; var n = vx(r[0], r[1], e[0], e[1], t.minX, t.minY, t.maxX, t.minY); if (n === 0) return 0; var i = vx(r[0], r[1], e[0], e[1], t.minX, t.minY, t.minX, t.maxY); if (i === 0) return 0; var a = vx(r[0], r[1], e[0], e[1], t.maxX, t.minY, t.maxX, t.maxY); if (a === 0) return 0; var o = vx(r[0], r[1], e[0], e[1], t.minX, t.maxY, t.maxX, t.maxY); return o === 0 ? 0 : Math.min(n, i, a, o); } function w3(r, e) { return r[0] >= e.minX && r[0] <= e.maxX && r[1] >= e.minY && r[1] <= e.maxY; } function x3(r, e, t) { for (var n = Math.min(r[0], e[0]), i = Math.min(r[1], e[1]), a = Math.max(r[0], e[0]), o = Math.max(r[1], e[1]), s = t.search({ minX: n, minY: i, maxX: a, maxY: o }), u = 0; u < s.length; u++) if (Bie(s[u].p, s[u].next.p, r, e)) return !1; return !0; } function Eg(r, e, t) { return Oie(r[0], r[1], e[0], e[1], t[0], t[1]); } function Bie(r, e, t, n) { return r !== n && e !== t && Eg(r, e, t) > 0 != Eg(r, e, n) > 0 && Eg(t, n, r) > 0 != Eg(t, n, e) > 0; } function MP(r) { var e = r.p, t = r.next.p; return r.minX = Math.min(e[0], t[0]), r.minY = Math.min(e[1], t[1]), r.maxX = Math.max(e[0], t[0]), r.maxY = Math.max(e[1], t[1]), r; } function kie(r) { for (var e = r[0], t = r[0], n = r[0], i = r[0], a = 0; a < r.length; a++) { var o = r[a]; o[0] < e[0] && (e = o), o[0] > n[0] && (n = o), o[1] < t[1] && (t = o), o[1] > i[1] && (i = o); } var s = [e, t, n, i], u = s.slice(); for (a = 0; a < r.length; a++) Mie(r[a], s) || u.push(r[a]); return Gie(u); } function C3(r, e) { var t = { p: r, prev: null, next: null, minX: 0, minY: 0, maxX: 0, maxY: 0 }; return e ? (t.next = e.next, t.prev = e, e.next.prev = t, e.next = t) : (t.prev = t, t.next = t), t; } function OP(r, e) { var t = r[0] - e[0], n = r[1] - e[1]; return t * t + n * n; } function RP(r, e, t) { var n = e[0], i = e[1], a = t[0] - n, o = t[1] - i; if (a !== 0 || o !== 0) { var s = ((r[0] - n) * a + (r[1] - i) * o) / (a * a + o * o); s > 1 ? (n = t[0], i = t[1]) : s > 0 && (n += a * s, i += o * s); } return a = r[0] - n, o = r[1] - i, a * a + o * o; } function vx(r, e, t, n, i, a, o, s) { var u = t - r, l = n - e, c = o - i, f = s - a, h = r - i, p = e - a, d = u * u + l * l, v = u * c + l * f, g = c * c + f * f, m = u * h + l * p, y = c * h + f * p, _ = d * g - v * v, w, x, C, S, b = _, E = _; _ === 0 ? (x = 0, b = 1, S = y, E = g) : (x = v * y - g * m, S = d * y - v * m, x < 0 ? (x = 0, S = y, E = g) : x > b && (x = b, S = y + v, E = g)), S < 0 ? (S = 0, -m < 0 ? x = 0 : -m > d ? x = b : (x = -m, b = d)) : S > E && (S = E, -m + v < 0 ? x = 0 : -m + v > d ? x = b : (x = -m + v, b = d)), w = x === 0 ? 0 : x / b, C = S === 0 ? 0 : S / E; var T = (1 - w) * r + w * t, P = (1 - w) * e + w * n, I = (1 - C) * i + C * o, A = (1 - C) * a + C * s, L = I - T, D = A - P; return L * L + D * D; } function Vie(r, e) { return r[0] === e[0] ? r[1] - e[1] : r[0] - e[0]; } function Gie(r) { r.sort(Vie); for (var e = [], t = 0; t < r.length; t++) { for (; e.length >= 2 && Eg(e[e.length - 2], e[e.length - 1], r[t]) <= 0; ) e.pop(); e.push(r[t]); } for (var n = [], i = r.length - 1; i >= 0; i--) { for (; n.length >= 2 && Eg(n[n.length - 2], n[n.length - 1], r[i]) <= 0; ) n.pop(); n.push(r[i]); } return n.pop(), e.pop(), e.concat(n); } function PH(r, e) { e === void 0 && (e = {}), e.concavity = e.concavity || 1 / 0; var t = []; if (Fn(r, function(i) { t.push([i[0], i[1]]); }), !t.length) return null; var n = PO.exports(t, e.concavity); return n.length > 3 ? Nt([n]) : null; } function nn(r, e, t) { if (t === void 0 && (t = {}), !r) throw new Error("point is required"); if (!e) throw new Error("polygon is required"); var n = qr(r), i = on(e), a = i.type, o = e.bbox, s = i.coordinates; if (o && zie(n, o) === !1) return !1; a === "Polygon" && (s = [s]); for (var u = !1, l = 0; l < s.length && !u; l++) if (S3(n, s[l][0], t.ignoreBoundary)) { for (var c = !1, f = 1; f < s[l].length && !c; ) S3(n, s[l][f], !t.ignoreBoundary) && (c = !0), f++; c || (u = !0); } return u; } function S3(r, e, t) { var n = !1; e[0][0] === e[e.length - 1][0] && e[0][1] === e[e.length - 1][1] && (e = e.slice(0, e.length - 1)); for (var i = 0, a = e.length - 1; i < e.length; a = i++) { var o = e[i][0], s = e[i][1], u = e[a][0], l = e[a][1], c = r[1] * (o - u) + s * (u - r[0]) + l * (r[0] - o) === 0 && (o - r[0]) * (u - r[0]) <= 0 && (s - r[1]) * (l - r[1]) <= 0; if (c) return !t; var f = s > r[1] != l > r[1] && r[0] < (u - o) * (r[1] - s) / (l - s) + o; f && (n = !n); } return n; } function zie(r, e) { return e[0] <= r[0] && e[1] <= r[1] && e[2] >= r[0] && e[3] >= r[1]; } function uD(r, e) { var t = []; return Dr(r, function(n) { var i = !1; if (n.geometry.type === "Point") Bo(e, function(o) { nn(n, o) && (i = !0); }), i && t.push(n); else if (n.geometry.type === "MultiPoint") { var a = []; Bo(e, function(o) { Fn(n, function(s) { nn(s, o) && (i = !0, a.push(s)); }); }), i && t.push(X1(a)); } else throw new Error("Input geometry must be a Point or MultiPoint"); }), lt(t); } function zr(r, e, t) { t === void 0 && (t = {}); var n = qr(r), i = qr(e), a = Ii(i[1] - n[1]), o = Ii(i[0] - n[0]), s = Ii(n[1]), u = Ii(i[1]), l = Math.pow(Math.sin(a / 2), 2) + Math.pow(Math.sin(o / 2), 2) * Math.cos(s) * Math.cos(u); return rm(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), t.units); } function IH(r, e) { var t = !1; return lt(Uie(r.features.map(function(n) { var i = { x: n.geometry.coordinates[0], y: n.geometry.coordinates[1] }; return e ? i.z = n.properties[e] : n.geometry.coordinates.length === 3 && (t = !0, i.z = n.geometry.coordinates[2]), i; })).map(function(n) { var i = [n.a.x, n.a.y], a = [n.b.x, n.b.y], o = [n.c.x, n.c.y], s = {}; return t ? (i.push(n.a.z), a.push(n.b.z), o.push(n.c.z)) : s = { a: n.a.z, b: n.b.z, c: n.c.z }, Nt([[i, a, o, i]], s); })); } var E3 = function() { function r(e, t, n) { this.a = e, this.b = t, this.c = n; var i = t.x - e.x, a = t.y - e.y, o = n.x - e.x, s = n.y - e.y, u = i * (e.x + t.x) + a * (e.y + t.y), l = o * (e.x + n.x) + s * (e.y + n.y), c = 2 * (i * (n.y - t.y) - a * (n.x - t.x)), f, h; this.x = (s * u - a * l) / c, this.y = (i * l - o * u) / c, f = this.x - e.x, h = this.y - e.y, this.r = f * f + h * h; } return r; }(); function $ie(r, e) { return e.x - r.x; } function Hie(r) { var e = r.length, t, n, i, a, o; e: for (; e; ) for (n = r[--e], t = r[--e], i = e; i; ) if (o = r[--i], a = r[--i], t === a && n === o || t === o && n === a) { r.splice(e, 2), r.splice(i, 2), e -= 2; continue e; } } function Uie(r) { if (r.length < 3) return []; r.sort($ie); for (var e = r.length - 1, t = r[e].x, n = r[0].x, i = r[e].y, a = i, o = 1e-12, s, u, l, c, f, h; e--; ) r[e].y < i && (i = r[e].y), r[e].y > a && (a = r[e].y); var p = n - t, d = a - i, v = p > d ? p : d, g = (n + t) * 0.5, m = (a + i) * 0.5, y = [ new E3({ __sentinel: !0, x: g - 20 * v, y: m - v }, { __sentinel: !0, x: g, y: m + 20 * v }, { __sentinel: !0, x: g + 20 * v, y: m - v }) ], _ = [], w = [], x; for (e = r.length; e--; ) { for (w.length = 0, x = y.length; x--; ) { if (p = r[e].x - y[x].x, p > 0 && p * p > y[x].r) { _.push(y[x]), y.splice(x, 1); continue; } d = r[e].y - y[x].y, !(p * p + d * d > y[x].r) && (w.push(y[x].a, y[x].b, y[x].b, y[x].c, y[x].c, y[x].a), y.splice(x, 1)); } for (Hie(w), x = w.length; x; ) u = w[--x], s = w[--x], l = r[e], c = u.x - s.x, f = u.y - s.y, h = 2 * (c * (l.y - u.y) - f * (l.x - u.x)), Math.abs(h) > o && y.push(new E3(s, u, l)); } for (Array.prototype.push.apply(_, y), e = _.length; e--; ) (_[e].a.__sentinel || _[e].b.__sentinel || _[e].c.__sentinel) && _.splice(e, 1); return _; } function da(r) { if (!r) throw new Error("geojson is required"); switch (r.type) { case "Feature": return AH(r); case "FeatureCollection": return Wie(r); case "Point": case "LineString": case "Polygon": case "MultiPoint": case "MultiLineString": case "MultiPolygon": case "GeometryCollection": return AO(r); default: throw new Error("unknown GeoJSON type"); } } function AH(r) { var e = { type: "Feature" }; return Object.keys(r).forEach(function(t) { switch (t) { case "type": case "properties": case "geometry": return; default: e[t] = r[t]; } }), e.properties = LH(r.properties), e.geometry = AO(r.geometry), e; } function LH(r) { var e = {}; return r && Object.keys(r).forEach(function(t) { var n = r[t]; typeof n == "object" ? n === null ? e[t] = null : Array.isArray(n) ? e[t] = n.map(function(i) { return i; }) : e[t] = LH(n) : e[t] = n; }), e; } function Wie(r) { var e = { type: "FeatureCollection" }; return Object.keys(r).forEach(function(t) { switch (t) { case "type": case "features": return; default: e[t] = r[t]; } }), e.features = r.features.map(function(t) { return AH(t); }), e; } function AO(r) { var e = { type: r.type }; return r.bbox && (e.bbox = r.bbox), r.type === "GeometryCollection" ? (e.geometries = r.geometries.map(function(t) { return AO(t); }), e) : (e.coordinates = DH(r.coordinates), e); } function DH(r) { var e = r; return typeof e[0] != "object" ? e.slice() : e.map(function(t) { return DH(t); }); } function jie(r, e) { if (e === void 0 && (e = {}), e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.mutate; if (po(r) !== "FeatureCollection") throw new Error("geojson must be a FeatureCollection"); if (!r.features.length) throw new Error("geojson is empty"); (t === !1 || t === void 0) && (r = da(r)); var n = [], i = EO(r, function(a, o) { var s = Yie(a, o); return s || (n.push(a), o); }); return i && n.push(i), n.length ? n.length === 1 ? n[0] : Hh(n.map(function(a) { return a.coordinates; })) : null; } function gx(r) { return r[0].toString() + "," + r[1].toString(); } function Yie(r, e) { var t = r.geometry.coordinates, n = e.geometry.coordinates, i = gx(t[0]), a = gx(t[t.length - 1]), o = gx(n[0]), s = gx(n[n.length - 1]), u; if (i === s) u = n.concat(t.slice(1)); else if (o === a) u = t.concat(n.slice(1)); else if (i === o) u = t.slice(1).reverse().concat(n); else if (a === s) u = t.concat(n.reverse().slice(1)); else return null; return Br(u); } function Xie(r) { return r; } function qie(r) { if (r == null) return Xie; var e, t, n = r.scale[0], i = r.scale[1], a = r.translate[0], o = r.translate[1]; return function(s, u) { u || (e = t = 0); var l = 2, c = s.length, f = new Array(c); for (f[0] = (e += s[0]) * n + a, f[1] = (t += s[1]) * i + o; l < c; ) f[l] = s[l], ++l; return f; }; } function Zie(r, e) { for (var t, n = r.length, i = n - e; i < --n; ) t = r[i], r[i++] = r[n], r[n] = t; } function MH(r, e) { var t = qie(r.transform), n = r.arcs; function i(c, f) { f.length && f.pop(); for (var h = n[c < 0 ? ~c : c], p = 0, d = h.length; p < d; ++p) f.push(t(h[p], p)); c < 0 && Zie(f, d); } function a(c) { return t(c); } function o(c) { for (var f = [], h = 0, p = c.length; h < p; ++h) i(c[h], f); return f.length < 2 && f.push(f[0]), f; } function s(c) { for (var f = o(c); f.length < 4; ) f.push(f[0]); return f; } function u(c) { return c.map(s); } function l(c) { var f = c.type, h; switch (f) { case "GeometryCollection": return { type: f, geometries: c.geometries.map(l) }; case "Point": h = a(c.coordinates); break; case "MultiPoint": h = c.coordinates.map(a); break; case "LineString": h = o(c.arcs); break; case "MultiLineString": h = c.arcs.map(o); break; case "Polygon": h = u(c.arcs); break; case "MultiPolygon": h = c.arcs.map(u); break; default: return null; } return { type: f, coordinates: h }; } return l(e); } function Kie(r, e) { var t = {}, n = {}, i = {}, a = [], o = -1; e.forEach(function(l, c) { var f = r.arcs[l < 0 ? ~l : l], h; f.length < 3 && !f[1][0] && !f[1][1] && (h = e[++o], e[o] = l, e[c] = h); }), e.forEach(function(l) { var c = s(l), f = c[0], h = c[1], p, d; if (p = i[f]) if (delete i[p.end], p.push(l), p.end = h, d = n[h]) { delete n[d.start]; var v = d === p ? p : p.concat(d); n[v.start = p.start] = i[v.end = d.end] = v; } else n[p.start] = i[p.end] = p; else if (p = n[h]) if (delete n[p.start], p.unshift(l), p.start = f, d = i[f]) { delete i[d.end]; var g = d === p ? p : d.concat(p); n[g.start = d.start] = i[g.end = p.end] = g; } else n[p.start] = i[p.end] = p; else p = [l], n[p.start = f] = i[p.end = h] = p; }); function s(l) { var c = r.arcs[l < 0 ? ~l : l], f = c[0], h; return r.transform ? (h = [0, 0], c.forEach(function(p) { h[0] += p[0], h[1] += p[1]; })) : h = c[c.length - 1], l < 0 ? [h, f] : [f, h]; } function u(l, c) { for (var f in l) { var h = l[f]; delete c[h.start], delete h.start, delete h.end, h.forEach(function(p) { t[p < 0 ? ~p : p] = 1; }), a.push(h); } } return u(i, n), u(n, i), e.forEach(function(l) { t[l < 0 ? ~l : l] || a.push([l]); }), a; } function Jie(r) { for (var e = -1, t = r.length, n, i = r[t - 1], a = 0; ++e < t; ) n = i, i = r[e], a += n[0] * i[1] - n[1] * i[0]; return Math.abs(a); } function Qie(r) { return MH(r, eae.apply(this, arguments)); } function eae(r, e) { var t = {}, n = [], i = []; e.forEach(a); function a(u) { switch (u.type) { case "GeometryCollection": u.geometries.forEach(a); break; case "Polygon": o(u.arcs); break; case "MultiPolygon": u.arcs.forEach(o); break; } } function o(u) { u.forEach(function(l) { l.forEach(function(c) { (t[c = c < 0 ? ~c : c] || (t[c] = [])).push(u); }); }), n.push(u); } function s(u) { return Jie(MH(r, { type: "Polygon", arcs: [u] }).coordinates[0]); } return n.forEach(function(u) { if (!u._) { var l = [], c = [u]; for (u._ = 1, i.push(l); u = c.pop(); ) l.push(u), u.forEach(function(f) { f.forEach(function(h) { t[h < 0 ? ~h : h].forEach(function(p) { p._ || (p._ = 1, c.push(p)); }); }); }); } }), n.forEach(function(u) { delete u._; }), { type: "MultiPolygon", arcs: i.map(function(u) { var l = [], c; if (u.forEach(function(v) { v.forEach(function(g) { g.forEach(function(m) { t[m < 0 ? ~m : m].length < 2 && l.push(m); }); }); }), l = Kie(r, l), (c = l.length) > 1) for (var f = 1, h = s(l[0]), p, d; f < c; ++f) (p = s(l[f])) > h && (d = l[0], l[0] = l[f], l[f] = d, h = p); return l; }).filter(function(u) { return u.length > 0; }) }; } var Ob = Object.prototype.hasOwnProperty; function tae(r) { var e = 1 / 0, t = 1 / 0, n = -1 / 0, i = -1 / 0; function a(f) { f != null && Ob.call(o, f.type) && o[f.type](f); } var o = { GeometryCollection: function(f) { f.geometries.forEach(a); }, Point: function(f) { s(f.coordinates); }, MultiPoint: function(f) { f.coordinates.forEach(s); }, LineString: function(f) { u(f.arcs); }, MultiLineString: function(f) { f.arcs.forEach(u); }, Polygon: function(f) { f.arcs.forEach(u); }, MultiPolygon: function(f) { f.arcs.forEach(l); } }; function s(f) { var h = f[0], p = f[1]; h < e && (e = h), h > n && (n = h), p < t && (t = p), p > i && (i = p); } function u(f) { f.forEach(s); } function l(f) { f.forEach(u); } for (var c in r) a(r[c]); return n >= e && i >= t ? [e, t, n, i] : void 0; } function rae(r, e, t, n, i) { arguments.length === 3 && (n = Array, i = null); for (var a = new n(r = 1 << Math.max(4, Math.ceil(Math.log(r) / Math.LN2))), o = r - 1, s = 0; s < r; ++s) a[s] = i; function u(f) { for (var h = e(f) & o, p = a[h], d = 0; p != i; ) { if (t(p, f)) return !0; if (++d >= r) throw new Error("full hashset"); p = a[h = h + 1 & o]; } return a[h] = f, !0; } function l(f) { for (var h = e(f) & o, p = a[h], d = 0; p != i; ) { if (t(p, f)) return !0; if (++d >= r) break; p = a[h = h + 1 & o]; } return !1; } function c() { for (var f = [], h = 0, p = a.length; h < p; ++h) { var d = a[h]; d != i && f.push(d); } return f; } return { add: u, has: l, values: c }; } function LO(r, e, t, n, i, a) { arguments.length === 3 && (n = a = Array, i = null); for (var o = new n(r = 1 << Math.max(4, Math.ceil(Math.log(r) / Math.LN2))), s = new a(r), u = r - 1, l = 0; l < r; ++l) o[l] = i; function c(d, v) { for (var g = e(d) & u, m = o[g], y = 0; m != i; ) { if (t(m, d)) return s[g] = v; if (++y >= r) throw new Error("full hashmap"); m = o[g = g + 1 & u]; } return o[g] = d, s[g] = v, v; } function f(d, v) { for (var g = e(d) & u, m = o[g], y = 0; m != i; ) { if (t(m, d)) return s[g]; if (++y >= r) throw new Error("full hashmap"); m = o[g = g + 1 & u]; } return o[g] = d, s[g] = v, v; } function h(d, v) { for (var g = e(d) & u, m = o[g], y = 0; m != i; ) { if (t(m, d)) return s[g]; if (++y >= r) break; m = o[g = g + 1 & u]; } return v; } function p() { for (var d = [], v = 0, g = o.length; v < g; ++v) { var m = o[v]; m != i && d.push(m); } return d; } return { set: c, maybeSet: f, get: h, keys: p }; } function Fp(r, e) { return r[0] === e[0] && r[1] === e[1]; } var OH = new ArrayBuffer(16), b3 = new Float64Array(OH), mx = new Uint32Array(OH); function lD(r) { b3[0] = r[0], b3[1] = r[1]; var e = mx[0] ^ mx[1]; return e = e << 5 ^ e >> 7 ^ mx[2] ^ mx[3], e & 2147483647; } function nae(r) { var e = r.coordinates, t = r.lines, n = r.rings, i = C(), a = new Int32Array(e.length), o = new Int32Array(e.length), s = new Int32Array(e.length), u = new Int8Array(e.length), l = 0, c, f, h, p, d; for (c = 0, f = e.length; c < f; ++c) a[c] = o[c] = s[c] = -1; for (c = 0, f = t.length; c < f; ++c) { var v = t[c], g = v[0], m = v[1]; for (p = i[g], d = i[++g], ++l, u[p] = 1; ++g <= m; ) x(c, h = p, p = d, d = i[g]); ++l, u[d] = 1; } for (c = 0, f = e.length; c < f; ++c) a[c] = -1; for (c = 0, f = n.length; c < f; ++c) { var y = n[c], _ = y[0] + 1, w = y[1]; for (h = i[w - 1], p = i[_ - 1], d = i[_], x(c, h, p, d); ++_ <= w; ) x(c, h = p, p = d, d = i[_]); } function x(P, I, A, L) { if (a[A] !== P) { a[A] = P; var D = o[A]; if (D >= 0) { var O = s[A]; (D !== I || O !== L) && (D !== L || O !== I) && (++l, u[A] = 1); } else o[A] = I, s[A] = L; } } function C() { for (var P = LO(e.length * 1.4, S, b, Int32Array, -1, Int32Array), I = new Int32Array(e.length), A = 0, L = e.length; A < L; ++A) I[A] = P.maybeSet(A, A); return I; } function S(P) { return lD(e[P]); } function b(P, I) { return Fp(e[P], e[I]); } a = o = s = null; var E = rae(l * 1.4, lD, Fp), T; for (c = 0, f = e.length; c < f; ++c) u[T = i[c]] && E.add(e[T]); return E; } function iae(r) { var e = nae(r), t = r.coordinates, n = r.lines, i = r.rings, a, o, s; for (o = 0, s = n.length; o < s; ++o) for (var u = n[o], l = u[0], c = u[1]; ++l < c; ) e.has(t[l]) && (a = { 0: l, 1: u[1] }, u[1] = l, u = u.next = a); for (o = 0, s = i.length; o < s; ++o) for (var f = i[o], h = f[0], p = h, d = f[1], v = e.has(t[h]); ++p < d; ) e.has(t[p]) && (v ? (a = { 0: p, 1: f[1] }, f[1] = p, f = f.next = a) : (aae(t, h, d, d - p), t[d] = t[h], v = !0, p = h)); return r; } function aae(r, e, t, n) { NP(r, e, t), NP(r, e, e + n), NP(r, e + n, t); } function NP(r, e, t) { for (var n = e + (t-- - e >> 1), i; e < n; ++e, --t) i = r[e], r[e] = r[t], r[t] = i; } function oae(r) { var e = r.coordinates, t = r.lines, n, i = r.rings, a, o = t.length + i.length, s, u; for (delete r.lines, delete r.rings, s = 0, u = t.length; s < u; ++s) for (n = t[s]; n = n.next; ) ++o; for (s = 0, u = i.length; s < u; ++s) for (a = i[s]; a = a.next; ) ++o; var l = LO(o * 2 * 1.4, lD, Fp), c = r.arcs = []; for (s = 0, u = t.length; s < u; ++s) { n = t[s]; do f(n); while (n = n.next); } for (s = 0, u = i.length; s < u; ++s) if (a = i[s], a.next) do f(a); while (a = a.next); else h(a); function f(y) { var _, w, x, C, S, b, E, T; if (x = l.get(_ = e[y[0]])) { for (E = 0, T = x.length; E < T; ++E) if (C = x[E], p(C, y)) { y[0] = C[0], y[1] = C[1]; return; } } if (S = l.get(w = e[y[1]])) { for (E = 0, T = S.length; E < T; ++E) if (b = S[E], d(b, y)) { y[1] = b[0], y[0] = b[1]; return; } } x ? x.push(y) : l.set(_, [y]), S ? S.push(y) : l.set(w, [y]), c.push(y); } function h(y) { var _, w, x, C, S; if (w = l.get(_ = e[y[0]])) for (C = 0, S = w.length; C < S; ++C) { if (x = w[C], v(x, y)) { y[0] = x[0], y[1] = x[1]; return; } if (g(x, y)) { y[0] = x[1], y[1] = x[0]; return; } } if (w = l.get(_ = e[y[0] + m(y)])) for (C = 0, S = w.length; C < S; ++C) { if (x = w[C], v(x, y)) { y[0] = x[0], y[1] = x[1]; return; } if (g(x, y)) { y[0] = x[1], y[1] = x[0]; return; } } w ? w.push(y) : l.set(_, [y]), c.push(y); } function p(y, _) { var w = y[0], x = _[0], C = y[1], S = _[1]; if (w - C !== x - S) return !1; for (; w <= C; ++w, ++x) if (!Fp(e[w], e[x])) return !1; return !0; } function d(y, _) { var w = y[0], x = _[0], C = y[1], S = _[1]; if (w - C !== x - S) return !1; for (; w <= C; ++w, --S) if (!Fp(e[w], e[S])) return !1; return !0; } function v(y, _) { var w = y[0], x = _[0], C = y[1], S = _[1], b = C - w; if (b !== S - x) return !1; for (var E = m(y), T = m(_), P = 0; P < b; ++P) if (!Fp(e[w + (P + E) % b], e[x + (P + T) % b])) return !1; return !0; } function g(y, _) { var w = y[0], x = _[0], C = y[1], S = _[1], b = C - w; if (b !== S - x) return !1; for (var E = m(y), T = b - m(_), P = 0; P < b; ++P) if (!Fp(e[w + (P + E) % b], e[S - (P + T) % b])) return !1; return !0; } function m(y) { for (var _ = y[0], w = y[1], x = _, C = x, S = e[x]; ++x < w; ) { var b = e[x]; (b[0] < S[0] || b[0] === S[0] && b[1] < S[1]) && (C = x, S = b); } return C - _; } return r; } function sae(r) { for (var e = -1, t = r.length; ++e < t; ) { for (var n = r[e], i = 0, a = 1, o = n.length, s = n[0], u = s[0], l = s[1], c, f; ++i < o; ) s = n[i], c = s[0], f = s[1], (c !== u || f !== l) && (n[a++] = [c - u, f - l], u = c, l = f); a === 1 && (n[a++] = [0, 0]), n.length = a; } return r; } function uae(r) { var e = -1, t = [], n = [], i = []; function a(f) { f && Ob.call(o, f.type) && o[f.type](f); } var o = { GeometryCollection: function(f) { f.geometries.forEach(a); }, LineString: function(f) { f.arcs = s(f.arcs); }, MultiLineString: function(f) { f.arcs = f.arcs.map(s); }, Polygon: function(f) { f.arcs = f.arcs.map(u); }, MultiPolygon: function(f) { f.arcs = f.arcs.map(l); } }; function s(f) { for (var h = 0, p = f.length; h < p; ++h) i[++e] = f[h]; var d = { 0: e - p + 1, 1: e }; return t.push(d), d; } function u(f) { for (var h = 0, p = f.length; h < p; ++h) i[++e] = f[h]; var d = { 0: e - p + 1, 1: e }; return n.push(d), d; } function l(f) { return f.map(u); } for (var c in r) a(r[c]); return { type: "Topology", coordinates: i, lines: t, rings: n, objects: r }; } function lae(r) { var e = {}, t; for (t in r) e[t] = cae(r[t]); return e; } function cae(r) { return r == null ? { type: null } : (r.type === "FeatureCollection" ? fae : r.type === "Feature" ? RH : DO)(r); } function fae(r) { var e = { type: "GeometryCollection", geometries: r.features.map(RH) }; return r.bbox != null && (e.bbox = r.bbox), e; } function RH(r) { var e = DO(r.geometry), t; r.id != null && (e.id = r.id), r.bbox != null && (e.bbox = r.bbox); for (t in r.properties) { e.properties = r.properties; break; } return e; } function DO(r) { if (r == null) return { type: null }; var e = r.type === "GeometryCollection" ? { type: "GeometryCollection", geometries: r.geometries.map(DO) } : r.type === "Point" || r.type === "MultiPoint" ? { type: r.type, coordinates: r.coordinates } : { type: r.type, arcs: r.coordinates }; return r.bbox != null && (e.bbox = r.bbox), e; } function hae(r, e, t) { var n = e[0], i = e[1], a = e[2], o = e[3], s = a - n ? (t - 1) / (a - n) : 1, u = o - i ? (t - 1) / (o - i) : 1; function l(m) { return [Math.round((m[0] - n) * s), Math.round((m[1] - i) * u)]; } function c(m, y) { for (var _ = -1, w = 0, x = m.length, C = new Array(x), S, b, E, T, P; ++_ < x; ) S = m[_], T = Math.round((S[0] - n) * s), P = Math.round((S[1] - i) * u), (T !== b || P !== E) && (C[w++] = [b = T, E = P]); for (C.length = w; w < y; ) w = C.push([C[0][0], C[0][1]]); return C; } function f(m) { return c(m, 2); } function h(m) { return c(m, 4); } function p(m) { return m.map(h); } function d(m) { m != null && Ob.call(v, m.type) && v[m.type](m); } var v = { GeometryCollection: function(m) { m.geometries.forEach(d); }, Point: function(m) { m.coordinates = l(m.coordinates); }, MultiPoint: function(m) { m.coordinates = m.coordinates.map(l); }, LineString: function(m) { m.arcs = f(m.arcs); }, MultiLineString: function(m) { m.arcs = m.arcs.map(f); }, Polygon: function(m) { m.arcs = p(m.arcs); }, MultiPolygon: function(m) { m.arcs = m.arcs.map(p); } }; for (var g in r) d(r[g]); return { scale: [1 / s, 1 / u], translate: [n, i] }; } function pae(r, e) { var t = tae(r = lae(r)), n = e > 0 && t && hae(r, t, e), i = oae(iae(uae(r))), a = i.coordinates, o = LO(i.arcs.length * 1.4, dae, vae); r = i.objects, i.bbox = t, i.arcs = i.arcs.map(function(h, p) { return o.set(h, p), a.slice(h[0], h[1] + 1); }), delete i.coordinates, a = null; function s(h) { h && Ob.call(u, h.type) && u[h.type](h); } var u = { GeometryCollection: function(h) { h.geometries.forEach(s); }, LineString: function(h) { h.arcs = l(h.arcs); }, MultiLineString: function(h) { h.arcs = h.arcs.map(l); }, Polygon: function(h) { h.arcs = h.arcs.map(l); }, MultiPolygon: function(h) { h.arcs = h.arcs.map(c); } }; function l(h) { var p = []; do { var d = o.get(h); p.push(h[0] < h[1] ? d : ~d); } while (h = h.next); return p; } function c(h) { return h.map(l); } for (var f in r) s(r[f]); return n && (i.transform = n, i.arcs = sae(i.arcs)), i; } function dae(r) { var e = r[0], t = r[1], n; return t < e && (n = e, e = t, t = n), e + 31 * t; } function vae(r, e) { var t = r[0], n = r[1], i = e[0], a = e[1], o; return n < t && (o = t, t = n, n = o), a < i && (o = i, i = a, a = o), t === i && n === a; } function gae(r, e) { if (e === void 0 && (e = {}), po(r) !== "FeatureCollection") throw new Error("geojson must be a FeatureCollection"); if (!r.features.length) throw new Error("geojson is empty"); (e.mutate === !1 || e.mutate === void 0) && (r = da(r)); var t = []; Yi(r, function(a) { t.push(a.geometry); }); var n = pae({ geoms: mO(t).geometry }), i = Qie(n, n.objects.geoms.geometries); return i; } function mae(r, e) { if (e === void 0 && (e = {}), e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.mutate; if (po(r) !== "FeatureCollection") throw new Error("geojson must be a FeatureCollection"); if (!r.features.length) throw new Error("geojson is empty"); (t === !1 || t === void 0) && (r = da(r)); var n = yae(r); if (!n) throw new Error("geojson must be homogenous"); var i = r; switch (n) { case "LineString": return jie(i, e); case "Polygon": return gae(i, e); default: throw new Error(n + " is not supported"); } } function yae(r) { var e = {}; Yi(r, function(n) { e[n.geometry.type] = !0; }); var t = Object.keys(e); return t.length === 1 ? t[0] : null; } function _ae(r, e) { e === void 0 && (e = {}); var t = e.maxEdge || 1 / 0, n = wae(r), i = IH(n); if (i.features = i.features.filter(function(o) { var s = o.geometry.coordinates[0][0], u = o.geometry.coordinates[0][1], l = o.geometry.coordinates[0][2], c = zr(s, u, e), f = zr(u, l, e), h = zr(s, l, e); return c <= t && f <= t && h <= t; }), i.features.length < 1) return null; var a = mae(i); return a.coordinates.length === 1 && (a.coordinates = a.coordinates[0], a.type = "Polygon"), fi(a); } function wae(r) { var e = [], t = {}; return Dr(r, function(n) { if (!!n.geometry) { var i = n.geometry.coordinates.join("-"); Object.prototype.hasOwnProperty.call(t, i) || (e.push(n), t[i] = !0); } }), lt(e); } var MO = { exports: {} }, NH = { exports: {} }; (function(r, e) { (function(t, n) { r.exports = n(); })(Db, function() { function t(o, s, u, l, c) { n(o, s, u || 0, l || o.length - 1, c || a); } function n(o, s, u, l, c) { for (; l > u; ) { if (l - u > 600) { var f = l - u + 1, h = s - u + 1, p = Math.log(f), d = 0.5 * Math.exp(2 * p / 3), v = 0.5 * Math.sqrt(p * d * (f - d) / f) * (h - f / 2 < 0 ? -1 : 1), g = Math.max(u, Math.floor(s - h * d / f + v)), m = Math.min(l, Math.floor(s + (f - h) * d / f + v)); n(o, s, g, m, c); } var y = o[s], _ = u, w = l; for (i(o, u, s), c(o[l], y) > 0 && i(o, u, l); _ < w; ) { for (i(o, _, w), _++, w--; c(o[_], y) < 0; ) _++; for (; c(o[w], y) > 0; ) w--; } c(o[u], y) === 0 ? i(o, u, w) : (w++, i(o, w, l)), w <= s && (u = w + 1), s <= w && (l = w - 1); } } function i(o, s, u) { var l = o[s]; o[s] = o[u], o[u] = l; } function a(o, s) { return o < s ? -1 : o > s ? 1 : 0; } return t; }); })(NH); MO.exports = R_; MO.exports.default = R_; var xae = NH.exports; function R_(r, e) { if (!(this instanceof R_)) return new R_(r, e); this._maxEntries = Math.max(4, r || 9), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), e && this._initFormat(e), this.clear(); } R_.prototype = { all: function() { return this._all(this.data, []); }, search: function(r) { var e = this.data, t = [], n = this.toBBox; if (!_x(r, e)) return t; for (var i = [], a, o, s, u; e; ) { for (a = 0, o = e.children.length; a < o; a++) s = e.children[a], u = e.leaf ? n(s) : s, _x(r, u) && (e.leaf ? t.push(s) : BP(r, u) ? this._all(s, t) : i.push(s)); e = i.pop(); } return t; }, collides: function(r) { var e = this.data, t = this.toBBox; if (!_x(r, e)) return !1; for (var n = [], i, a, o, s; e; ) { for (i = 0, a = e.children.length; i < a; i++) if (o = e.children[i], s = e.leaf ? t(o) : o, _x(r, s)) { if (e.leaf || BP(r, s)) return !0; n.push(o); } e = n.pop(); } return !1; }, load: function(r) { if (!(r && r.length)) return this; if (r.length < this._minEntries) { for (var e = 0, t = r.length; e < t; e++) this.insert(r[e]); return this; } var n = this._build(r.slice(), 0, r.length - 1, 0); if (!this.data.children.length) this.data = n; else if (this.data.height === n.height) this._splitRoot(this.data, n); else { if (this.data.height < n.height) { var i = this.data; this.data = n, n = i; } this._insert(n, this.data.height - n.height - 1, !0); } return this; }, insert: function(r) { return r && this._insert(r, this.data.height - 1), this; }, clear: function() { return this.data = lg([]), this; }, remove: function(r, e) { if (!r) return this; for (var t = this.data, n = this.toBBox(r), i = [], a = [], o, s, u, l; t || i.length; ) { if (t || (t = i.pop(), s = i[i.length - 1], o = a.pop(), l = !0), t.leaf && (u = Cae(r, t.children, e), u !== -1)) return t.children.splice(u, 1), i.push(t), this._condense(i), this; !l && !t.leaf && BP(t, n) ? (i.push(t), a.push(o), o = 0, s = t, t = t.children[0]) : s ? (o++, t = s.children[o], l = !1) : t = null; } return this; }, toBBox: function(r) { return r; }, compareMinX: T3, compareMinY: P3, toJSON: function() { return this.data; }, fromJSON: function(r) { return this.data = r, this; }, _all: function(r, e) { for (var t = []; r; ) r.leaf ? e.push.apply(e, r.children) : t.push.apply(t, r.children), r = t.pop(); return e; }, _build: function(r, e, t, n) { var i = t - e + 1, a = this._maxEntries, o; if (i <= a) return o = lg(r.slice(e, t + 1)), bv(o, this.toBBox), o; n || (n = Math.ceil(Math.log(i) / Math.log(a)), a = Math.ceil(i / Math.pow(a, n - 1))), o = lg([]), o.leaf = !1, o.height = n; var s = Math.ceil(i / a), u = s * Math.ceil(Math.sqrt(a)), l, c, f, h; for (I3(r, e, t, u, this.compareMinX), l = e; l <= t; l += u) for (f = Math.min(l + u - 1, t), I3(r, l, f, s, this.compareMinY), c = l; c <= f; c += s) h = Math.min(c + s - 1, f), o.children.push(this._build(r, c, h, n - 1)); return bv(o, this.toBBox), o; }, _chooseSubtree: function(r, e, t, n) { for (var i, a, o, s, u, l, c, f; n.push(e), !(e.leaf || n.length - 1 === t); ) { for (c = f = 1 / 0, i = 0, a = e.children.length; i < a; i++) o = e.children[i], u = FP(o), l = Sae(r, o) - u, l < f ? (f = l, c = u < c ? u : c, s = o) : l === f && u < c && (c = u, s = o); e = s || e.children[0]; } return e; }, _insert: function(r, e, t) { var n = this.toBBox, i = t ? r : n(r), a = [], o = this._chooseSubtree(i, this.data, e, a); for (o.children.push(r), R0(o, i); e >= 0 && a[e].children.length > this._maxEntries; ) this._split(a, e), e--; this._adjustParentBBoxes(i, a, e); }, _split: function(r, e) { var t = r[e], n = t.children.length, i = this._minEntries; this._chooseSplitAxis(t, i, n); var a = this._chooseSplitIndex(t, i, n), o = lg(t.children.splice(a, t.children.length - a)); o.height = t.height, o.leaf = t.leaf, bv(t, this.toBBox), bv(o, this.toBBox), e ? r[e - 1].children.push(o) : this._splitRoot(t, o); }, _splitRoot: function(r, e) { this.data = lg([r, e]), this.data.height = r.height + 1, this.data.leaf = !1, bv(this.data, this.toBBox); }, _chooseSplitIndex: function(r, e, t) { var n, i, a, o, s, u, l, c; for (u = l = 1 / 0, n = e; n <= t - e; n++) i = O0(r, 0, n, this.toBBox), a = O0(r, n, t, this.toBBox), o = Eae(i, a), s = FP(i) + FP(a), o < u ? (u = o, c = n, l = s < l ? s : l) : o === u && s < l && (l = s, c = n); return c; }, _chooseSplitAxis: function(r, e, t) { var n = r.leaf ? this.compareMinX : T3, i = r.leaf ? this.compareMinY : P3, a = this._allDistMargin(r, e, t, n), o = this._allDistMargin(r, e, t, i); a < o && r.children.sort(n); }, _allDistMargin: function(r, e, t, n) { r.children.sort(n); var i = this.toBBox, a = O0(r, 0, e, i), o = O0(r, t - e, t, i), s = yx(a) + yx(o), u, l; for (u = e; u < t - e; u++) l = r.children[u], R0(a, r.leaf ? i(l) : l), s += yx(a); for (u = t - e - 1; u >= e; u--) l = r.children[u], R0(o, r.leaf ? i(l) : l), s += yx(o); return s; }, _adjustParentBBoxes: function(r, e, t) { for (var n = t; n >= 0; n--) R0(e[n], r); }, _condense: function(r) { for (var e = r.length - 1, t; e >= 0; e--) r[e].children.length === 0 ? e > 0 ? (t = r[e - 1].children, t.splice(t.indexOf(r[e]), 1)) : this.clear() : bv(r[e], this.toBBox); }, _initFormat: function(r) { var e = ["return a", " - b", ";"]; this.compareMinX = new Function("a", "b", e.join(r[0])), this.compareMinY = new Function("a", "b", e.join(r[1])), this.toBBox = new Function( "a", "return {minX: a" + r[0] + ", minY: a" + r[1] + ", maxX: a" + r[2] + ", maxY: a" + r[3] + "};" ); } }; function Cae(r, e, t) { if (!t) return e.indexOf(r); for (var n = 0; n < e.length; n++) if (t(r, e[n])) return n; return -1; } function bv(r, e) { O0(r, 0, r.children.length, e, r); } function O0(r, e, t, n, i) { i || (i = lg(null)), i.minX = 1 / 0, i.minY = 1 / 0, i.maxX = -1 / 0, i.maxY = -1 / 0; for (var a = e, o; a < t; a++) o = r.children[a], R0(i, r.leaf ? n(o) : o); return i; } function R0(r, e) { return r.minX = Math.min(r.minX, e.minX), r.minY = Math.min(r.minY, e.minY), r.maxX = Math.max(r.maxX, e.maxX), r.maxY = Math.max(r.maxY, e.maxY), r; } function T3(r, e) { return r.minX - e.minX; } function P3(r, e) { return r.minY - e.minY; } function FP(r) { return (r.maxX - r.minX) * (r.maxY - r.minY); } function yx(r) { return r.maxX - r.minX + (r.maxY - r.minY); } function Sae(r, e) { return (Math.max(e.maxX, r.maxX) - Math.min(e.minX, r.minX)) * (Math.max(e.maxY, r.maxY) - Math.min(e.minY, r.minY)); } function Eae(r, e) { var t = Math.max(r.minX, e.minX), n = Math.max(r.minY, e.minY), i = Math.min(r.maxX, e.maxX), a = Math.min(r.maxY, e.maxY); return Math.max(0, i - t) * Math.max(0, a - n); } function BP(r, e) { return r.minX <= e.minX && r.minY <= e.minY && e.maxX <= r.maxX && e.maxY <= r.maxY; } function _x(r, e) { return e.minX <= r.maxX && e.minY <= r.maxY && e.maxX >= r.minX && e.maxY >= r.minY; } function lg(r) { return { children: r, height: 1, leaf: !0, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 }; } function I3(r, e, t, n, i) { for (var a = [e, t], o; a.length; ) t = a.pop(), e = a.pop(), !(t - e <= n) && (o = e + Math.ceil((t - e) / n / 2) * n, xae(r, o, e, t, i), a.push(e, o, o, t)); } function bae(r, e, t, n) { var i = MO.exports(6), a = e.features.map(function(o) { var s; return { minX: o.geometry.coordinates[0], minY: o.geometry.coordinates[1], maxX: o.geometry.coordinates[0], maxY: o.geometry.coordinates[1], property: (s = o.properties) === null || s === void 0 ? void 0 : s[t] }; }); return i.load(a), r.features.forEach(function(o) { o.properties || (o.properties = {}); var s = Bn(o), u = i.search({ minX: s[0], minY: s[1], maxX: s[2], maxY: s[3] }), l = []; u.forEach(function(c) { nn([c.minX, c.minY], o) && l.push(c.property); }), o.properties[n] = l; }), r; } function Tae(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.mutate; if (!r) throw new Error("geojson is required"); return (t === !1 || t === void 0) && (r = da(r)), Fn(r, function(n) { var i = n[0], a = n[1]; n[0] = a, n[1] = i; }), r; } function yd(r, e) { e === void 0 && (e = {}); var t = typeof e == "object" ? e.mutate : e; if (!r) throw new Error("geojson is required"); var n = po(r), i = []; switch (n) { case "LineString": i = kP(r); break; case "MultiLineString": case "Polygon": pt(r).forEach(function(o) { i.push(kP(o)); }); break; case "MultiPolygon": pt(r).forEach(function(o) { var s = []; o.forEach(function(u) { s.push(kP(u)); }), i.push(s); }); break; case "Point": return r; case "MultiPoint": var a = {}; pt(r).forEach(function(o) { var s = o.join("-"); Object.prototype.hasOwnProperty.call(a, s) || (i.push(o), a[s] = !0); }); break; default: throw new Error(n + " geometry not supported"); } return r.coordinates ? t === !0 ? (r.coordinates = i, r) : { type: n, coordinates: i } : t === !0 ? (r.geometry.coordinates = i, r) : fi({ type: n, coordinates: i }, r.properties, { bbox: r.bbox, id: r.id }); } function kP(r) { var e = pt(r); if (e.length === 2 && !A3(e[0], e[1])) return e; var t = [], n = e.length - 1, i = t.length; t.push(e[0]); for (var a = 1; a < n; a++) { var o = t[t.length - 1]; e[a][0] === o[0] && e[a][1] === o[1] || (t.push(e[a]), i = t.length, i > 2 && L3(t[i - 3], t[i - 1], t[i - 2]) && t.splice(t.length - 2, 1)); } if (t.push(e[e.length - 1]), i = t.length, A3(e[0], e[e.length - 1]) && i < 4) throw new Error("invalid polygon"); return L3(t[i - 3], t[i - 1], t[i - 2]) && t.splice(t.length - 2, 1), t; } function A3(r, e) { return r[0] === e[0] && r[1] === e[1]; } function L3(r, e, t) { var n = t[0], i = t[1], a = r[0], o = r[1], s = e[0], u = e[1], l = n - a, c = i - o, f = s - a, h = u - o, p = l * h - c * f; return p !== 0 ? !1 : Math.abs(f) >= Math.abs(h) ? f > 0 ? a <= n && n <= s : s <= n && n <= a : h > 0 ? o <= i && i <= u : u <= i && i <= o; } function Pae(r, e) { var t = r.x - e.x, n = r.y - e.y; return t * t + n * n; } function Iae(r, e, t) { var n = e.x, i = e.y, a = t.x - n, o = t.y - i; if (a !== 0 || o !== 0) { var s = ((r.x - n) * a + (r.y - i) * o) / (a * a + o * o); s > 1 ? (n = t.x, i = t.y) : s > 0 && (n += a * s, i += o * s); } return a = r.x - n, o = r.y - i, a * a + o * o; } function Aae(r, e) { for (var t = r[0], n = [t], i, a = 1, o = r.length; a < o; a++) i = r[a], Pae(i, t) > e && (n.push(i), t = i); return t !== i && n.push(i), n; } function cD(r, e, t, n, i) { for (var a = n, o, s = e + 1; s < t; s++) { var u = Iae(r[s], r[e], r[t]); u > a && (o = s, a = u); } a > n && (o - e > 1 && cD(r, e, o, n, i), i.push(r[o]), t - o > 1 && cD(r, o, t, n, i)); } function Lae(r, e) { var t = r.length - 1, n = [r[0]]; return cD(r, 0, t, e, n), n.push(r[t]), n; } function fD(r, e, t) { if (r.length <= 2) return r; var n = e !== void 0 ? e * e : 1; return r = t ? r : Aae(r, n), r = Lae(r, n), r; } function Dae(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.tolerance !== void 0 ? e.tolerance : 1, n = e.highQuality || !1, i = e.mutate || !1; if (!r) throw new Error("geojson is required"); if (t && t < 0) throw new Error("invalid tolerance"); return i !== !0 && (r = da(r)), Bo(r, function(a) { Mae(a, t, n); }), r; } function Mae(r, e, t) { var n = r.type; if (n === "Point" || n === "MultiPoint") return r; yd(r, !0); var i = r.coordinates; switch (n) { case "LineString": r.coordinates = D3( i, e, t ); break; case "MultiLineString": r.coordinates = i.map(function(a) { return D3(a, e, t); }); break; case "Polygon": r.coordinates = M3( i, e, t ); break; case "MultiPolygon": r.coordinates = i.map(function(a) { return M3(a, e, t); }); } return r; } function D3(r, e, t) { return fD( r.map(function(n) { return { x: n[0], y: n[1], z: n[2] }; }), e, t ).map(function(n) { return n.z ? [n.x, n.y, n.z] : [n.x, n.y]; }); } function M3(r, e, t) { return r.map(function(n) { var i = n.map(function(o) { return { x: o[0], y: o[1] }; }); if (i.length < 4) throw new Error("invalid polygon"); for (var a = fD(i, e, t).map(function(o) { return [o.x, o.y]; }); !Oae(a); ) e -= e * 0.01, a = fD(i, e, t).map(function(o) { return [o.x, o.y]; }); return (a[a.length - 1][0] !== a[0][0] || a[a.length - 1][1] !== a[0][1]) && a.push(a[0]), a; }); } function Oae(r) { return r.length < 3 ? !1 : !(r.length === 3 && r[2][0] === r[0][0] && r[2][1] === r[0][1]); } var Rae = function() { function r(e) { this.points = e.points || [], this.duration = e.duration || 1e4, this.sharpness = e.sharpness || 0.85, this.centers = [], this.controls = [], this.stepLength = e.stepLength || 60, this.length = this.points.length, this.delay = 0; for (var t = 0; t < this.length; t++) this.points[t].z = this.points[t].z || 0; for (var t = 0; t < this.length - 1; t++) { var n = this.points[t], i = this.points[t + 1]; this.centers.push({ x: (n.x + i.x) / 2, y: (n.y + i.y) / 2, z: (n.z + i.z) / 2 }); } this.controls.push([this.points[0], this.points[0]]); for (var t = 0; t < this.centers.length - 1; t++) { var a = this.points[t + 1].x - (this.centers[t].x + this.centers[t + 1].x) / 2, o = this.points[t + 1].y - (this.centers[t].y + this.centers[t + 1].y) / 2, s = this.points[t + 1].z - (this.centers[t].y + this.centers[t + 1].z) / 2; this.controls.push([ { x: (1 - this.sharpness) * this.points[t + 1].x + this.sharpness * (this.centers[t].x + a), y: (1 - this.sharpness) * this.points[t + 1].y + this.sharpness * (this.centers[t].y + o), z: (1 - this.sharpness) * this.points[t + 1].z + this.sharpness * (this.centers[t].z + s) }, { x: (1 - this.sharpness) * this.points[t + 1].x + this.sharpness * (this.centers[t + 1].x + a), y: (1 - this.sharpness) * this.points[t + 1].y + this.sharpness * (this.centers[t + 1].y + o), z: (1 - this.sharpness) * this.points[t + 1].z + this.sharpness * (this.centers[t + 1].z + s) } ]); } return this.controls.push([ this.points[this.length - 1], this.points[this.length - 1] ]), this.steps = this.cacheSteps(this.stepLength), this; } return r.prototype.cacheSteps = function(e) { var t = [], n = this.pos(0); t.push(0); for (var i = 0; i < this.duration; i += 10) { var a = this.pos(i), o = Math.sqrt((a.x - n.x) * (a.x - n.x) + (a.y - n.y) * (a.y - n.y) + (a.z - n.z) * (a.z - n.z)); o > e && (t.push(i), n = a); } return t; }, r.prototype.vector = function(e) { var t = this.pos(e + 10), n = this.pos(e - 10); return { angle: 180 * Math.atan2(t.y - n.y, t.x - n.x) / 3.14, speed: Math.sqrt((n.x - t.x) * (n.x - t.x) + (n.y - t.y) * (n.y - t.y) + (n.z - t.z) * (n.z - t.z)) }; }, r.prototype.pos = function(e) { var t = e - this.delay; t < 0 && (t = 0), t > this.duration && (t = this.duration - 1); var n = t / this.duration; if (n >= 1) return this.points[this.length - 1]; var i = Math.floor((this.points.length - 1) * n), a = (this.length - 1) * n - i; return Fae(a, this.points[i], this.controls[i][1], this.controls[i + 1][0], this.points[i + 1]); }, r; }(); const Nae = Rae; function Fae(r, e, t, n, i) { var a = Bae(r), o = { x: i.x * a[0] + n.x * a[1] + t.x * a[2] + e.x * a[3], y: i.y * a[0] + n.y * a[1] + t.y * a[2] + e.y * a[3], z: i.z * a[0] + n.z * a[1] + t.z * a[2] + e.z * a[3] }; return o; } function Bae(r) { var e = r * r, t = e * r; return [ t, 3 * e * (1 - r), 3 * r * (1 - r) * (1 - r), (1 - r) * (1 - r) * (1 - r) ]; } function O3(r, e) { e === void 0 && (e = {}); for (var t = e.resolution || 1e4, n = e.sharpness || 0.85, i = [], a = on(r).coordinates.map(function(l) { return { x: l[0], y: l[1] }; }), o = new Nae({ duration: t, points: a, sharpness: n }), s = function(l) { var c = o.pos(l); Math.floor(l / 100) % 2 === 0 && i.push([c.x, c.y]); }, u = 0; u < o.duration; u += 10) s(u); return s(o.duration), Br(i, e.properties); } function kae(r, e, t, n) { return r = da(r), e = da(e), Dr(r, function(i) { i.properties || (i.properties = {}), Dr(e, function(a) { i.properties[n] === void 0 && nn(i, a) && (i.properties[n] = a.properties[t]); }); }), r; } function Vae(r, e) { if (!r) throw new Error("featurecollection is required"); if (e == null) throw new Error("num is required"); if (typeof e != "number") throw new Error("num must be a number"); var t = lt( Gae(r.features, e) ); return t; } function Gae(r, e) { for (var t = r.slice(0), n = r.length, i = n - e, a, o; n-- > i; ) o = Math.floor((n + 1) * Math.random()), a = t[o], t[o] = t[n], t[n] = a; return t.slice(i); } function OO(r, e) { e === void 0 && (e = {}); var t = Number(r[0]), n = Number(r[1]), i = Number(r[2]), a = Number(r[3]); if (r.length === 6) throw new Error("@turf/bbox-polygon does not support BBox with 6 positions"); var o = [t, n], s = [t, a], u = [i, a], l = [i, n]; return Nt([[o, l, u, s, o]], e.properties, { bbox: r, id: e.id }); } function FH(r) { return OO(Bn(r)); } function BH(r) { var e = r[0], t = r[1], n = r[2], i = r[3], a = zr(r.slice(0, 2), [n, t]), o = zr(r.slice(0, 2), [e, i]); if (a >= o) { var s = (t + i) / 2; return [ e, s - (n - e) / 2, n, s + (n - e) / 2 ]; } else { var u = (e + n) / 2; return [ u - (i - t) / 2, t, u + (i - t) / 2, i ]; } } function Hl(r, e, t, n) { n === void 0 && (n = {}); var i = qr(r), a = Ii(i[0]), o = Ii(i[1]), s = Ii(t), u = vd(e, n.units), l = Math.asin(Math.sin(o) * Math.cos(u) + Math.cos(o) * Math.sin(u) * Math.cos(s)), c = a + Math.atan2(Math.sin(s) * Math.sin(u) * Math.cos(o), Math.cos(u) - Math.sin(o) * Math.sin(l)), f = _h(c), h = _h(l); return Lt([f, h], n.properties); } function RO(r, e, t) { t === void 0 && (t = {}); for (var n = t.steps || 64, i = t.properties ? t.properties : !Array.isArray(r) && r.type === "Feature" && r.properties ? r.properties : {}, a = [], o = 0; o < n; o++) a.push(Hl(r, e, o * -360 / n, t).geometry.coordinates); return a.push(a[0]), Nt([a], i); } function Hc(r, e, t) { if (t === void 0 && (t = {}), t.final === !0) return zae(r, e); var n = qr(r), i = qr(e), a = Ii(n[0]), o = Ii(i[0]), s = Ii(n[1]), u = Ii(i[1]), l = Math.sin(o - a) * Math.cos(u), c = Math.cos(s) * Math.sin(u) - Math.sin(s) * Math.cos(u) * Math.cos(o - a); return _h(Math.atan2(l, c)); } function zae(r, e) { var t = Hc(e, r); return t = (t + 180) % 360, t; } function $ae(r, e) { var t = zr(r, e), n = Hc(r, e), i = Hl(r, t / 2, n); return i; } function Z1(r, e) { e === void 0 && (e = {}); var t = Bn(r), n = (t[0] + t[2]) / 2, i = (t[1] + t[3]) / 2; return Lt([n, i], e.properties, e); } function wh(r, e) { e === void 0 && (e = {}); var t = 0, n = 0, i = 0; return Fn(r, function(a) { t += a[0], n += a[1], i++; }, !0), Lt([t / i, n / i], e.properties); } function kH(r, e) { switch (e === void 0 && (e = {}), po(r)) { case "Point": return Lt(qr(r), e.properties); case "Polygon": var t = []; Fn(r, function(w) { t.push(w); }); var n = wh(r, { properties: e.properties }), i = n.geometry.coordinates, a = 0, o = 0, s = 0, u, l, c, f, h, p, d, v, g = t.map(function(w) { return [w[0] - i[0], w[1] - i[1]]; }); for (u = 0; u < t.length - 1; u++) l = g[u], f = l[0], p = l[1], c = g[u + 1], h = c[0], d = c[1], v = f * d - h * p, s += v, a += (f + h) * v, o += (p + d) * v; if (s === 0) return n; var m = s * 0.5, y = 1 / (6 * m); return Lt([i[0] + y * a, i[1] + y * o], e.properties); default: var _ = PH(r); return _ ? kH(_, { properties: e.properties }) : wh(r, { properties: e.properties }); } } function Hae(r) { var e = { MultiPoint: { coordinates: [], properties: [] }, MultiLineString: { coordinates: [], properties: [] }, MultiPolygon: { coordinates: [], properties: [] } }; return Dr(r, function(t) { var n, i, a, o; switch ((o = t.geometry) === null || o === void 0 ? void 0 : o.type) { case "Point": e.MultiPoint.coordinates.push(t.geometry.coordinates), e.MultiPoint.properties.push(t.properties); break; case "MultiPoint": (n = e.MultiPoint.coordinates).push.apply(n, t.geometry.coordinates), e.MultiPoint.properties.push(t.properties); break; case "LineString": e.MultiLineString.coordinates.push(t.geometry.coordinates), e.MultiLineString.properties.push(t.properties); break; case "MultiLineString": (i = e.MultiLineString.coordinates).push.apply(i, t.geometry.coordinates), e.MultiLineString.properties.push(t.properties); break; case "Polygon": e.MultiPolygon.coordinates.push(t.geometry.coordinates), e.MultiPolygon.properties.push(t.properties); break; case "MultiPolygon": (a = e.MultiPolygon.coordinates).push.apply(a, t.geometry.coordinates), e.MultiPolygon.properties.push(t.properties); break; } }), lt(Object.keys(e).filter(function(t) { return e[t].coordinates.length; }).sort().map(function(t) { var n = { type: t, coordinates: e[t].coordinates }, i = { collectedProperties: e[t].properties }; return fi(n, i); })); } function Rb(r) { var e = []; return r.type === "FeatureCollection" ? Dr(r, function(t) { Fn(t, function(n) { e.push(Lt(n, t.properties)); }); }) : Fn(r, function(t) { e.push(Lt(t, r.properties)); }), lt(e); } var NO = { exports: {} }; NO.exports = Nb; NO.exports.default = Nb; function Nb(r, e, t) { t = t || 2; var n = e && e.length, i = n ? e[0] * t : r.length, a = VH(r, 0, i, t, !0), o = []; if (!a || a.next === a.prev) return o; var s, u, l, c, f, h, p; if (n && (a = Xae(r, e, a, t)), r.length > 80 * t) { s = l = r[0], u = c = r[1]; for (var d = t; d < i; d += t) f = r[d], h = r[d + 1], f < s && (s = f), h < u && (u = h), f > l && (l = f), h > c && (c = h); p = Math.max(l - s, c - u), p = p !== 0 ? 32767 / p : 0; } return N_(a, o, t, s, u, p, 0), o; } function VH(r, e, t, n, i) { var a, o; if (i === dD(r, e, t, n) > 0) for (a = e; a < t; a += n) o = R3(a, r[a], r[a + 1], o); else for (a = t - n; a >= e; a -= n) o = R3(a, r[a], r[a + 1], o); return o && Fb(o, o.next) && (B_(o), o = o.next), o; } function _d(r, e) { if (!r) return r; e || (e = r); var t = r, n; do if (n = !1, !t.steiner && (Fb(t, t.next) || Wn(t.prev, t, t.next) === 0)) { if (B_(t), t = e = t.prev, t === t.next) break; n = !0; } else t = t.next; while (n || t !== e); return e; } function N_(r, e, t, n, i, a, o) { if (!!r) { !o && a && Qae(r, n, i, a); for (var s = r, u, l; r.prev !== r.next; ) { if (u = r.prev, l = r.next, a ? Wae(r, n, i, a) : Uae(r)) { e.push(u.i / t | 0), e.push(r.i / t | 0), e.push(l.i / t | 0), B_(r), r = l.next, s = l.next; continue; } if (r = l, r === s) { o ? o === 1 ? (r = jae(_d(r), e, t), N_(r, e, t, n, i, a, 2)) : o === 2 && Yae(r, e, t, n, i, a) : N_(_d(r), e, t, n, i, a, 1); break; } } } } function Uae(r) { var e = r.prev, t = r, n = r.next; if (Wn(e, t, n) >= 0) return !1; for (var i = e.x, a = t.x, o = n.x, s = e.y, u = t.y, l = n.y, c = i < a ? i < o ? i : o : a < o ? a : o, f = s < u ? s < l ? s : l : u < l ? u : l, h = i > a ? i > o ? i : o : a > o ? a : o, p = s > u ? s > l ? s : l : u > l ? u : l, d = n.next; d !== e; ) { if (d.x >= c && d.x <= h && d.y >= f && d.y <= p && bg(i, s, a, u, o, l, d.x, d.y) && Wn(d.prev, d, d.next) >= 0) return !1; d = d.next; } return !0; } function Wae(r, e, t, n) { var i = r.prev, a = r, o = r.next; if (Wn(i, a, o) >= 0) return !1; for (var s = i.x, u = a.x, l = o.x, c = i.y, f = a.y, h = o.y, p = s < u ? s < l ? s : l : u < l ? u : l, d = c < f ? c < h ? c : h : f < h ? f : h, v = s > u ? s > l ? s : l : u > l ? u : l, g = c > f ? c > h ? c : h : f > h ? f : h, m = hD(p, d, e, t, n), y = hD(v, g, e, t, n), _ = r.prevZ, w = r.nextZ; _ && _.z >= m && w && w.z <= y; ) { if (_.x >= p && _.x <= v && _.y >= d && _.y <= g && _ !== i && _ !== o && bg(s, c, u, f, l, h, _.x, _.y) && Wn(_.prev, _, _.next) >= 0 || (_ = _.prevZ, w.x >= p && w.x <= v && w.y >= d && w.y <= g && w !== i && w !== o && bg(s, c, u, f, l, h, w.x, w.y) && Wn(w.prev, w, w.next) >= 0)) return !1; w = w.nextZ; } for (; _ && _.z >= m; ) { if (_.x >= p && _.x <= v && _.y >= d && _.y <= g && _ !== i && _ !== o && bg(s, c, u, f, l, h, _.x, _.y) && Wn(_.prev, _, _.next) >= 0) return !1; _ = _.prevZ; } for (; w && w.z <= y; ) { if (w.x >= p && w.x <= v && w.y >= d && w.y <= g && w !== i && w !== o && bg(s, c, u, f, l, h, w.x, w.y) && Wn(w.prev, w, w.next) >= 0) return !1; w = w.nextZ; } return !0; } function jae(r, e, t) { var n = r; do { var i = n.prev, a = n.next.next; !Fb(i, a) && GH(i, n, n.next, a) && F_(i, a) && F_(a, i) && (e.push(i.i / t | 0), e.push(n.i / t | 0), e.push(a.i / t | 0), B_(n), B_(n.next), n = r = a), n = n.next; } while (n !== r); return _d(n); } function Yae(r, e, t, n, i, a) { var o = r; do { for (var s = o.next.next; s !== o.prev; ) { if (o.i !== s.i && roe(o, s)) { var u = zH(o, s); o = _d(o, o.next), u = _d(u, u.next), N_(o, e, t, n, i, a, 0), N_(u, e, t, n, i, a, 0); return; } s = s.next; } o = o.next; } while (o !== r); } function Xae(r, e, t, n) { var i = [], a, o, s, u, l; for (a = 0, o = e.length; a < o; a++) s = e[a] * n, u = a < o - 1 ? e[a + 1] * n : r.length, l = VH(r, s, u, n, !1), l === l.next && (l.steiner = !0), i.push(toe(l)); for (i.sort(qae), a = 0; a < i.length; a++) t = Zae(i[a], t); return t; } function qae(r, e) { return r.x - e.x; } function Zae(r, e) { var t = Kae(r, e); if (!t) return e; var n = zH(t, r); return _d(n, n.next), _d(t, t.next); } function Kae(r, e) { var t = e, n = r.x, i = r.y, a = -1 / 0, o; do { if (i <= t.y && i >= t.next.y && t.next.y !== t.y) { var s = t.x + (i - t.y) * (t.next.x - t.x) / (t.next.y - t.y); if (s <= n && s > a && (a = s, o = t.x < t.next.x ? t : t.next, s === n)) return o; } t = t.next; } while (t !== e); if (!o) return null; var u = o, l = o.x, c = o.y, f = 1 / 0, h; t = o; do n >= t.x && t.x >= l && n !== t.x && bg(i < c ? n : a, i, l, c, i < c ? a : n, i, t.x, t.y) && (h = Math.abs(i - t.y) / (n - t.x), F_(t, r) && (h < f || h === f && (t.x > o.x || t.x === o.x && Jae(o, t))) && (o = t, f = h)), t = t.next; while (t !== u); return o; } function Jae(r, e) { return Wn(r.prev, r, e.prev) < 0 && Wn(e.next, r, r.next) < 0; } function Qae(r, e, t, n) { var i = r; do i.z === 0 && (i.z = hD(i.x, i.y, e, t, n)), i.prevZ = i.prev, i.nextZ = i.next, i = i.next; while (i !== r); i.prevZ.nextZ = null, i.prevZ = null, eoe(i); } function eoe(r) { var e, t, n, i, a, o, s, u, l = 1; do { for (t = r, r = null, a = null, o = 0; t; ) { for (o++, n = t, s = 0, e = 0; e < l && (s++, n = n.nextZ, !!n); e++) ; for (u = l; s > 0 || u > 0 && n; ) s !== 0 && (u === 0 || !n || t.z <= n.z) ? (i = t, t = t.nextZ, s--) : (i = n, n = n.nextZ, u--), a ? a.nextZ = i : r = i, i.prevZ = a, a = i; t = n; } a.nextZ = null, l *= 2; } while (o > 1); return r; } function hD(r, e, t, n, i) { return r = (r - t) * i | 0, e = (e - n) * i | 0, r = (r | r << 8) & 16711935, r = (r | r << 4) & 252645135, r = (r | r << 2) & 858993459, r = (r | r << 1) & 1431655765, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, r | e << 1; } function toe(r) { var e = r, t = r; do (e.x < t.x || e.x === t.x && e.y < t.y) && (t = e), e = e.next; while (e !== r); return t; } function bg(r, e, t, n, i, a, o, s) { return (i - o) * (e - s) >= (r - o) * (a - s) && (r - o) * (n - s) >= (t - o) * (e - s) && (t - o) * (a - s) >= (i - o) * (n - s); } function roe(r, e) { return r.next.i !== e.i && r.prev.i !== e.i && !noe(r, e) && (F_(r, e) && F_(e, r) && ioe(r, e) && (Wn(r.prev, r, e.prev) || Wn(r, e.prev, e)) || Fb(r, e) && Wn(r.prev, r, r.next) > 0 && Wn(e.prev, e, e.next) > 0); } function Wn(r, e, t) { return (e.y - r.y) * (t.x - e.x) - (e.x - r.x) * (t.y - e.y); } function Fb(r, e) { return r.x === e.x && r.y === e.y; } function GH(r, e, t, n) { var i = Cx(Wn(r, e, t)), a = Cx(Wn(r, e, n)), o = Cx(Wn(t, n, r)), s = Cx(Wn(t, n, e)); return !!(i !== a && o !== s || i === 0 && xx(r, t, e) || a === 0 && xx(r, n, e) || o === 0 && xx(t, r, n) || s === 0 && xx(t, e, n)); } function xx(r, e, t) { return e.x <= Math.max(r.x, t.x) && e.x >= Math.min(r.x, t.x) && e.y <= Math.max(r.y, t.y) && e.y >= Math.min(r.y, t.y); } function Cx(r) { return r > 0 ? 1 : r < 0 ? -1 : 0; } function noe(r, e) { var t = r; do { if (t.i !== r.i && t.next.i !== r.i && t.i !== e.i && t.next.i !== e.i && GH(t, t.next, r, e)) return !0; t = t.next; } while (t !== r); return !1; } function F_(r, e) { return Wn(r.prev, r, r.next) < 0 ? Wn(r, e, r.next) >= 0 && Wn(r, r.prev, e) >= 0 : Wn(r, e, r.prev) < 0 || Wn(r, r.next, e) < 0; } function ioe(r, e) { var t = r, n = !1, i = (r.x + e.x) / 2, a = (r.y + e.y) / 2; do t.y > a != t.next.y > a && t.next.y !== t.y && i < (t.next.x - t.x) * (a - t.y) / (t.next.y - t.y) + t.x && (n = !n), t = t.next; while (t !== r); return n; } function zH(r, e) { var t = new pD(r.i, r.x, r.y), n = new pD(e.i, e.x, e.y), i = r.next, a = e.prev; return r.next = e, e.prev = r, t.next = i, i.prev = t, n.next = t, t.prev = n, a.next = n, n.prev = a, n; } function R3(r, e, t, n) { var i = new pD(r, e, t); return n ? (i.next = n.next, i.prev = n, n.next.prev = i, n.next = i) : (i.prev = i, i.next = i), i; } function B_(r) { r.next.prev = r.prev, r.prev.next = r.next, r.prevZ && (r.prevZ.nextZ = r.nextZ), r.nextZ && (r.nextZ.prevZ = r.prevZ); } function pD(r, e, t) { this.i = r, this.x = e, this.y = t, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1; } Nb.deviation = function(r, e, t, n) { var i = e && e.length, a = i ? e[0] * t : r.length, o = Math.abs(dD(r, 0, a, t)); if (i) for (var s = 0, u = e.length; s < u; s++) { var l = e[s] * t, c = s < u - 1 ? e[s + 1] * t : r.length; o -= Math.abs(dD(r, l, c, t)); } var f = 0; for (s = 0; s < n.length; s += 3) { var h = n[s] * t, p = n[s + 1] * t, d = n[s + 2] * t; f += Math.abs( (r[h] - r[d]) * (r[p + 1] - r[h + 1]) - (r[h] - r[p]) * (r[d + 1] - r[h + 1]) ); } return o === 0 && f === 0 ? 0 : Math.abs((f - o) / o); }; function dD(r, e, t, n) { for (var i = 0, a = e, o = t - n; a < t; a += n) i += (r[o] - r[a]) * (r[a + 1] + r[o + 1]), o = a; return i; } Nb.flatten = function(r) { for (var e = r[0][0].length, t = { vertices: [], holes: [], dimensions: e }, n = 0, i = 0; i < r.length; i++) { for (var a = 0; a < r[i].length; a++) for (var o = 0; o < e; o++) t.vertices.push(r[i][a][o]); i > 0 && (n += r[i - 1].length, t.holes.push(n)); } return t; }; function aoe(r) { if (!r.geometry || r.geometry.type !== "Polygon" && r.geometry.type !== "MultiPolygon") throw new Error("input must be a Polygon or MultiPolygon"); var e = { type: "FeatureCollection", features: [] }; return r.geometry.type === "Polygon" ? e.features = N3(r.geometry.coordinates) : r.geometry.coordinates.forEach(function(t) { e.features = e.features.concat(N3(t)); }), e; } function N3(r) { var e = ooe(r), t = 2, n = NO.exports(e.vertices, e.holes, t), i = [], a = []; n.forEach(function(u, l) { var c = n[l]; a.push([e.vertices[c * t], e.vertices[c * t + 1]]); }); for (var o = 0; o < a.length; o += 3) { var s = a.slice(o, o + 3); s.push(a[o]), i.push(Nt([s])); } return i; } function ooe(r) { for (var e = r[0][0].length, t = { vertices: [], holes: [], dimensions: e }, n = 0, i = 0; i < r.length; i++) { for (var a = 0; a < r[i].length; a++) for (var o = 0; o < e; o++) t.vertices.push(r[i][a][o]); i > 0 && (n += r[i - 1].length, t.holes.push(n)); } return t; } function TS(r, e) { if (!r) throw new Error("targetPoint is required"); if (!e) throw new Error("points is required"); var t, n = 1 / 0, i = 0; return Dr(e, function(a, o) { var s = zr(r, a); s < n && (i = o, n = s); }), t = da(e.features[i]), t.properties.featureIndex = i, t.properties.distanceToPoint = n, t; } function wd(r) { if (!r) throw new Error("geojson is required"); var e = []; return Yi(r, function(t) { soe(t, e); }), lt(e); } function soe(r, e) { var t = [], n = r.geometry; if (n !== null) { switch (n.type) { case "Polygon": t = pt(n); break; case "LineString": t = [pt(n)]; } t.forEach(function(i) { var a = uoe(i, r.properties); a.forEach(function(o) { o.id = e.length, e.push(o); }); }); } } function uoe(r, e) { var t = []; return r.reduce(function(n, i) { var a = Br([n, i], e); return a.bbox = loe(n, i), t.push(a), i; }), t; } function loe(r, e) { var t = r[0], n = r[1], i = e[0], a = e[1], o = t < i ? t : i, s = n < a ? n : a, u = t > i ? t : i, l = n > a ? n : a; return [o, s, u, l]; } var qm = { exports: {} }; const coe = /* @__PURE__ */ q1(dH), foe = /* @__PURE__ */ q1(_H), hoe = /* @__PURE__ */ q1(rie); var gl = SH, $H = coe, HH = foe, Tv = hoe.default, poe = HH.featureEach; HH.coordEach; $H.polygon; var F3 = $H.featureCollection; function UH(r) { var e = new gl(r); return e.insert = function(t) { if (t.type !== "Feature") throw new Error("invalid feature"); return t.bbox = t.bbox ? t.bbox : Tv(t), gl.prototype.insert.call(this, t); }, e.load = function(t) { var n = []; return Array.isArray(t) ? t.forEach(function(i) { if (i.type !== "Feature") throw new Error("invalid features"); i.bbox = i.bbox ? i.bbox : Tv(i), n.push(i); }) : poe(t, function(i) { if (i.type !== "Feature") throw new Error("invalid features"); i.bbox = i.bbox ? i.bbox : Tv(i), n.push(i); }), gl.prototype.load.call(this, n); }, e.remove = function(t, n) { if (t.type !== "Feature") throw new Error("invalid feature"); return t.bbox = t.bbox ? t.bbox : Tv(t), gl.prototype.remove.call(this, t, n); }, e.clear = function() { return gl.prototype.clear.call(this); }, e.search = function(t) { var n = gl.prototype.search.call(this, this.toBBox(t)); return F3(n); }, e.collides = function(t) { return gl.prototype.collides.call(this, this.toBBox(t)); }, e.all = function() { var t = gl.prototype.all.call(this); return F3(t); }, e.toJSON = function() { return gl.prototype.toJSON.call(this); }, e.fromJSON = function(t) { return gl.prototype.fromJSON.call(this, t); }, e.toBBox = function(t) { var n; if (t.bbox) n = t.bbox; else if (Array.isArray(t) && t.length === 4) n = t; else if (Array.isArray(t) && t.length === 6) n = [t[0], t[1], t[3], t[4]]; else if (t.type === "Feature") n = Tv(t); else if (t.type === "FeatureCollection") n = Tv(t); else throw new Error("invalid geojson"); return { minX: n[0], minY: n[1], maxX: n[2], maxY: n[3] }; }, e; } qm.exports = UH; qm.exports.default = UH; function vf(r, e) { var t = {}, n = []; if (r.type === "LineString" && (r = fi(r)), e.type === "LineString" && (e = fi(e)), r.type === "Feature" && e.type === "Feature" && r.geometry !== null && e.geometry !== null && r.geometry.type === "LineString" && e.geometry.type === "LineString" && r.geometry.coordinates.length === 2 && e.geometry.coordinates.length === 2) { var i = B3(r, e); return i && n.push(i), lt(n); } var a = qm.exports(); return a.load(wd(e)), Dr(wd(r), function(o) { Dr(a.search(o), function(s) { var u = B3(o, s); if (u) { var l = pt(u).join(","); t[l] || (t[l] = !0, n.push(u)); } }); }), lt(n); } function B3(r, e) { var t = pt(r), n = pt(e); if (t.length !== 2) throw new Error(" line1 must only contain 2 coordinates"); if (n.length !== 2) throw new Error(" line2 must only contain 2 coordinates"); var i = t[0][0], a = t[0][1], o = t[1][0], s = t[1][1], u = n[0][0], l = n[0][1], c = n[1][0], f = n[1][1], h = (f - l) * (o - i) - (c - u) * (s - a), p = (c - u) * (a - l) - (f - l) * (i - u), d = (o - i) * (a - l) - (s - a) * (i - u); if (h === 0) return p === 0 && d === 0, null; var v = p / h, g = d / h; if (v >= 0 && v <= 1 && g >= 0 && g <= 1) { var m = i + v * (o - i), y = a + v * (s - a); return Lt([m, y]); } return null; } function Ec(r, e, t) { t === void 0 && (t = {}); var n = Lt([1 / 0, 1 / 0], { dist: 1 / 0 }), i = 0; return Yi(r, function(a) { for (var o = pt(a), s = 0; s < o.length - 1; s++) { var u = Lt(o[s]); u.properties.dist = zr(e, u, t); var l = Lt(o[s + 1]); l.properties.dist = zr(e, l, t); var c = zr(u, l, t), f = Math.max(u.properties.dist, l.properties.dist), h = Hc(u, l), p = Hl(e, f, h + 90, t), d = Hl(e, f, h - 90, t), v = vf(Br([ p.geometry.coordinates, d.geometry.coordinates ]), Br([u.geometry.coordinates, l.geometry.coordinates])), g = null; v.features.length > 0 && (g = v.features[0], g.properties.dist = zr(e, g, t), g.properties.location = i + zr(u, g, t)), u.properties.dist < n.properties.dist && (n = u, n.properties.index = s, n.properties.location = i), l.properties.dist < n.properties.dist && (n = l, n.properties.index = s + 1, n.properties.location = i + c), g && g.properties.dist < n.properties.dist && (n = g, n.properties.index = s), i += c; } }), n; } function Bb(r, e, t) { t === void 0 && (t = {}); var n = qr(r), i = qr(e); i[0] += i[0] - n[0] > 180 ? -360 : n[0] - i[0] > 180 ? 360 : 0; var a = doe(n, i), o = md(a, "meters", t.units); return o; } function doe(r, e, t) { t = t === void 0 ? wi : Number(t); var n = t, i = r[1] * Math.PI / 180, a = e[1] * Math.PI / 180, o = a - i, s = Math.abs(e[0] - r[0]) * Math.PI / 180; s > Math.PI && (s -= 2 * Math.PI); var u = Math.log(Math.tan(a / 2 + Math.PI / 4) / Math.tan(i / 2 + Math.PI / 4)), l = Math.abs(u) > 1e-11 ? o / u : Math.cos(i), c = Math.sqrt(o * o + l * l * s * s), f = c * n; return f; } function WH(r, e, t) { if (t === void 0 && (t = {}), t.method || (t.method = "geodesic"), t.units || (t.units = "kilometers"), !r) throw new Error("pt is required"); if (Array.isArray(r) ? r = Lt(r) : r.type === "Point" ? r = fi(r) : O_(r, "Point", "point"), !e) throw new Error("line is required"); Array.isArray(e) ? e = Br(e) : e.type === "LineString" ? e = fi(e) : O_(e, "LineString", "line"); var n = 1 / 0, i = r.geometry.coordinates; return Sc(e, function(a) { var o = a.geometry.coordinates[0], s = a.geometry.coordinates[1], u = voe(i, o, s, t); u < n && (n = u); }), md(n, "degrees", t.units); } function voe(r, e, t, n) { var i = [t[0] - e[0], t[1] - e[1]], a = [r[0] - e[0], r[1] - e[1]], o = k3(a, i); if (o <= 0) return VP(r, e, { method: n.method, units: "degrees" }); var s = k3(i, i); if (s <= o) return VP(r, t, { method: n.method, units: "degrees" }); var u = o / s, l = [e[0] + u * i[0], e[1] + u * i[1]]; return VP(r, l, { method: n.method, units: "degrees" }); } function k3(r, e) { return r[0] * e[0] + r[1] * e[1]; } function VP(r, e, t) { return t.method === "planar" ? Bb(r, e, t) : zr(r, e, t); } function goe(r, e, t) { t === void 0 && (t = {}); var n = t.units, i = t.properties || {}, a = moe(r); if (!a.features.length) throw new Error("points must contain features"); if (!e) throw new Error("line is required"); if (po(e) !== "LineString") throw new Error("line must be a LineString"); var o = 1 / 0, s = null; return Dr(a, function(u) { var l = WH(u, e, { units: n }); l < o && (o = l, s = u); }), s && (s.properties = TO({ dist: o }, s.properties, i)), s; } function moe(r) { var e = [], t = r.geometry ? r.geometry.type : r.type; switch (t) { case "GeometryCollection": return Bo(r, function(n) { n.type === "Point" && e.push({ type: "Feature", properties: {}, geometry: n }); }), { type: "FeatureCollection", features: e }; case "FeatureCollection": return r.features = r.features.filter(function(n) { return n.geometry.type === "Point"; }), r; default: throw new Error("points must be a Point Collection"); } } function yoe(r, e) { var t = qr(r), n = on(e), i = n.coordinates, a = i[0]; if (a.length < 4) throw new Error("OuterRing of a Polygon must have 4 or more Positions."); var o = e.properties || {}, s = o.a, u = o.b, l = o.c, c = t[0], f = t[1], h = a[0][0], p = a[0][1], d = s !== void 0 ? s : a[0][2], v = a[1][0], g = a[1][1], m = u !== void 0 ? u : a[1][2], y = a[2][0], _ = a[2][1], w = l !== void 0 ? l : a[2][2], x = (w * (c - h) * (f - g) + d * (c - v) * (f - _) + m * (c - y) * (f - p) - m * (c - h) * (f - _) - w * (c - v) * (f - p) - d * (c - y) * (f - g)) / ((c - h) * (f - g) + (c - v) * (f - _) + (c - y) * (f - p) - (c - h) * (f - _) - (c - v) * (f - p) - (c - y) * (f - g)); return x; } function _oe(r) { var e, t, n = { type: "FeatureCollection", features: [] }; if (r.type === "Feature" ? t = r.geometry : t = r, t.type === "LineString") e = [t.coordinates]; else if (t.type === "MultiLineString") e = t.coordinates; else if (t.type === "MultiPolygon") e = [].concat.apply([], t.coordinates); else if (t.type === "Polygon") e = t.coordinates; else throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry"); return e.forEach(function(i) { e.forEach(function(a) { for (var o = 0; o < i.length - 1; o++) for (var s = o; s < a.length - 1; s++) if (!(i === a && (Math.abs(o - s) === 1 || o === 0 && s === i.length - 2 && i[o][0] === i[i.length - 1][0] && i[o][1] === i[i.length - 1][1]))) { var u = woe(i[o][0], i[o][1], i[o + 1][0], i[o + 1][1], a[s][0], a[s][1], a[s + 1][0], a[s + 1][1]); u && n.features.push(Lt([u[0], u[1]])); } }); }), n; } function woe(r, e, t, n, i, a, o, s) { var u, l, c, f, h, p = { x: null, y: null, onLine1: !1, onLine2: !1 }; return u = (s - a) * (t - r) - (o - i) * (n - e), u === 0 ? p.x !== null && p.y !== null ? p : !1 : (l = e - a, c = r - i, f = (o - i) * l - (s - a) * c, h = (t - r) * l - (n - e) * c, l = f / u, c = h / u, p.x = r + l * (t - r), p.y = e + l * (n - e), l >= 0 && l <= 1 && (p.onLine1 = !0), c >= 0 && c <= 1 && (p.onLine2 = !0), p.onLine1 && p.onLine2 ? [p.x, p.y] : !1); } function V3(r) { for (var e = xoe(r), t = Z1(e), n = !1, i = 0; !n && i < e.features.length; ) { var a = e.features[i].geometry, o, s, u, l, c, f, h, p = !1; if (a.type === "Point") t.geometry.coordinates[0] === a.coordinates[0] && t.geometry.coordinates[1] === a.coordinates[1] && (n = !0); else if (a.type === "MultiPoint") { var d = !1; for (h = 0; !d && h < a.coordinates.length; ) t.geometry.coordinates[0] === a.coordinates[h][0] && t.geometry.coordinates[1] === a.coordinates[h][1] && (n = !0, d = !0), h++; } else if (a.type === "LineString") for (h = 0; !p && h < a.coordinates.length - 1; ) o = t.geometry.coordinates[0], s = t.geometry.coordinates[1], u = a.coordinates[h][0], l = a.coordinates[h][1], c = a.coordinates[h + 1][0], f = a.coordinates[h + 1][1], G3(o, s, u, l, c, f) && (p = !0, n = !0), h++; else if (a.type === "MultiLineString") for (var v = 0; v < a.coordinates.length; ) { p = !1, h = 0; for (var g = a.coordinates[v]; !p && h < g.length - 1; ) o = t.geometry.coordinates[0], s = t.geometry.coordinates[1], u = g[h][0], l = g[h][1], c = g[h + 1][0], f = g[h + 1][1], G3(o, s, u, l, c, f) && (p = !0, n = !0), h++; v++; } else (a.type === "Polygon" || a.type === "MultiPolygon") && nn(t, a) && (n = !0); i++; } if (n) return t; var m = lt([]); for (i = 0; i < e.features.length; i++) m.features = m.features.concat( Rb(e.features[i]).features ); return Lt(TS(t, m).geometry.coordinates); } function xoe(r) { return r.type !== "FeatureCollection" ? r.type !== "Feature" ? lt([fi(r)]) : lt([r]) : r; } function G3(r, e, t, n, i, a) { var o = Math.sqrt((i - t) * (i - t) + (a - n) * (a - n)), s = Math.sqrt((r - t) * (r - t) + (e - n) * (e - n)), u = Math.sqrt((i - r) * (i - r) + (a - e) * (a - e)); return o === s + u; } var z3 = 6378137; function kb(r) { return xO(r, function(e, t) { return e + Coe(t); }, 0); } function Coe(r) { var e = 0, t; switch (r.type) { case "Polygon": return $3(r.coordinates); case "MultiPolygon": for (t = 0; t < r.coordinates.length; t++) e += $3(r.coordinates[t]); return e; case "Point": case "MultiPoint": case "LineString": case "MultiLineString": return 0; } return 0; } function $3(r) { var e = 0; if (r && r.length > 0) { e += Math.abs(H3(r[0])); for (var t = 1; t < r.length; t++) e -= Math.abs(H3(r[t])); } return e; } function H3(r) { var e, t, n, i, a, o, s, u = 0, l = r.length; if (l > 2) { for (s = 0; s < l; s++) s === l - 2 ? (i = l - 2, a = l - 1, o = 0) : s === l - 1 ? (i = l - 1, a = 0, o = 1) : (i = s, a = s + 1, o = s + 2), e = r[i], t = r[a], n = r[o], u += (GP(n[0]) - GP(e[0])) * Math.sin(GP(t[1])); u = u * z3 * z3 / 2; } return u; } function GP(r) { return r * Math.PI / 180; } function Soe(r, e, t) { t === void 0 && (t = {}); for (var n = on(r), i = n.coordinates, a = 0, o = 0; o < i.length && !(e >= a && o === i.length - 1); o++) if (a >= e) { var s = e - a; if (s) { var u = Hc(i[o], i[o - 1]) - 180, l = Hl(i[o], s, u, t); return l; } else return Lt(i[o]); } else a += zr(i[o], i[o + 1], t); return Lt(i[i.length - 1]); } function vD(r, e) { return e === void 0 && (e = {}), CO(r, function(t, n) { var i = n.geometry.coordinates; return t + zr(i[0], i[1], e); }, 0); } function Eoe(r, e, t) { var n = pt(t); if (po(t) !== "LineString") throw new Error("line must be a LineString"); var i = Ec(t, r), a = Ec(t, e), o; i.properties.index <= a.properties.index ? o = [i, a] : o = [a, i]; for (var s = [o[0].geometry.coordinates], u = o[0].properties.index + 1; u < o[1].properties.index + 1; u++) s.push(n[u]); return s.push(o[1].geometry.coordinates), Br(s, t.properties); } function jH(r, e, t, n) { if (n = n || {}, !$r(n)) throw new Error("options is invalid"); var i, a = []; if (r.type === "Feature") i = r.geometry.coordinates; else if (r.type === "LineString") i = r.coordinates; else throw new Error("input must be a LineString Feature or Geometry"); for (var o = i.length, s = 0, u, l, c, f = 0; f < i.length && !(e >= s && f === i.length - 1); f++) { if (s > e && a.length === 0) { if (u = e - s, !u) return a.push(i[f]), Br(a); l = Hc(i[f], i[f - 1]) - 180, c = Hl(i[f], u, l, n), a.push(c.geometry.coordinates); } if (s >= t) return u = t - s, u ? (l = Hc(i[f], i[f - 1]) - 180, c = Hl(i[f], u, l, n), a.push(c.geometry.coordinates), Br(a)) : (a.push(i[f]), Br(a)); if (s >= e && a.push(i[f]), f === i.length - 1) return Br(a); s += zr(i[f], i[f + 1], n); } if (s < e && i.length === o) throw new Error("Start position is beyond line"); var h = i[i.length - 1]; return Br([h, h]); } function Mo(r, e, t) { t === void 0 && (t = {}); for (var n = qr(r), i = pt(e), a = 0; a < i.length - 1; a++) { var o = !1; if (t.ignoreEndVertices && (a === 0 && (o = "start"), a === i.length - 2 && (o = "end"), a === 0 && a + 1 === i.length - 1 && (o = "both")), boe(i[a], i[a + 1], n, o, typeof t.epsilon > "u" ? null : t.epsilon)) return !0; } return !1; } function boe(r, e, t, n, i) { var a = t[0], o = t[1], s = r[0], u = r[1], l = e[0], c = e[1], f = t[0] - s, h = t[1] - u, p = l - s, d = c - u, v = f * d - h * p; if (i !== null) { if (Math.abs(v) > i) return !1; } else if (v !== 0) return !1; if (n) { if (n === "start") return Math.abs(p) >= Math.abs(d) ? p > 0 ? s < a && a <= l : l <= a && a < s : d > 0 ? u < o && o <= c : c <= o && o < u; if (n === "end") return Math.abs(p) >= Math.abs(d) ? p > 0 ? s <= a && a < l : l < a && a <= s : d > 0 ? u <= o && o < c : c < o && o <= u; if (n === "both") return Math.abs(p) >= Math.abs(d) ? p > 0 ? s < a && a < l : l < a && a < s : d > 0 ? u < o && o < c : c < o && o < u; } else return Math.abs(p) >= Math.abs(d) ? p > 0 ? s <= a && a <= l : l <= a && a <= s : d > 0 ? u <= o && o <= c : c <= o && o <= u; return !1; } function YH(r, e) { var t = on(r), n = on(e), i = t.type, a = n.type; switch (i) { case "Point": switch (a) { case "MultiPoint": return Toe(t, n); case "LineString": return Mo(t, n, { ignoreEndVertices: !0 }); case "Polygon": case "MultiPolygon": return nn(t, n, { ignoreBoundary: !0 }); default: throw new Error("feature2 " + a + " geometry not supported"); } case "MultiPoint": switch (a) { case "MultiPoint": return Poe(t, n); case "LineString": return Ioe(t, n); case "Polygon": case "MultiPolygon": return Aoe(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } case "LineString": switch (a) { case "LineString": return Loe(t, n); case "Polygon": case "MultiPolygon": return Doe(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } case "Polygon": switch (a) { case "Polygon": case "MultiPolygon": return Moe(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } default: throw new Error("feature1 " + i + " geometry not supported"); } } function Toe(r, e) { var t, n = !1; for (t = 0; t < e.coordinates.length; t++) if (qH(e.coordinates[t], r.coordinates)) { n = !0; break; } return n; } function Poe(r, e) { for (var t = 0; t < r.coordinates.length; t++) { for (var n = !1, i = 0; i < e.coordinates.length; i++) qH(r.coordinates[t], e.coordinates[i]) && (n = !0); if (!n) return !1; } return !0; } function Ioe(r, e) { for (var t = !1, n = 0; n < r.coordinates.length; n++) { if (!Mo(r.coordinates[n], e)) return !1; t || (t = Mo(r.coordinates[n], e, { ignoreEndVertices: !0 })); } return t; } function Aoe(r, e) { for (var t = !0, n = !1, i = 0; i < r.coordinates.length; i++) { if (n = nn(r.coordinates[1], e), !n) { t = !1; break; } n = nn(r.coordinates[1], e, { ignoreBoundary: !0 }); } return t && n; } function Loe(r, e) { for (var t = 0; t < r.coordinates.length; t++) if (!Mo(r.coordinates[t], e)) return !1; return !0; } function Doe(r, e) { var t = Bn(e), n = Bn(r); if (!XH(t, n)) return !1; for (var i = !1, a = 0; a < r.coordinates.length - 1; a++) { if (!nn(r.coordinates[a], e)) return !1; if (i || (i = nn(r.coordinates[a], e, { ignoreBoundary: !0 })), !i) { var o = Ooe(r.coordinates[a], r.coordinates[a + 1]); i = nn(o, e, { ignoreBoundary: !0 }); } } return i; } function Moe(r, e) { var t = Bn(r), n = Bn(e); if (!XH(n, t)) return !1; for (var i = 0; i < r.coordinates[0].length; i++) if (!nn(r.coordinates[0][i], e)) return !1; return !0; } function XH(r, e) { return !(r[0] > e[0] || r[2] < e[2] || r[1] > e[1] || r[3] < e[3]); } function qH(r, e) { return r[0] === e[0] && r[1] === e[1]; } function Ooe(r, e) { return [(r[0] + e[0]) / 2, (r[1] + e[1]) / 2]; } function ZH(r, e, t) { t === void 0 && (t = {}), t.mask && !t.units && (t.units = "kilometers"); for (var n = [], i = r[0], a = r[1], o = r[2], s = r[3], u = e / zr([i, a], [o, a], t), l = u * (o - i), c = e / zr([i, a], [i, s], t), f = c * (s - a), h = o - i, p = s - a, d = Math.floor(h / l), v = Math.floor(p / f), g = (h - d * l) / 2, m = (p - v * f) / 2, y = i + g; y <= o; ) { for (var _ = a + m; _ <= s; ) { var w = Lt([y, _], t.properties); t.mask ? YH(w, t.mask) && n.push(w) : n.push(w), _ += f; } y += l; } return lt(n); } function KH(r, e) { e === void 0 && (e = {}); var t = e.precision, n = e.coordinates, i = e.mutate; if (t = t == null || isNaN(t) ? 6 : t, n = n == null || isNaN(n) ? 3 : n, !r) throw new Error(" is required"); if (typeof t != "number") throw new Error(" must be a number"); if (typeof n != "number") throw new Error(" must be a number"); (i === !1 || i === void 0) && (r = JSON.parse(JSON.stringify(r))); var a = Math.pow(10, t); return Fn(r, function(o) { Roe(o, a, n); }), r; } function Roe(r, e, t) { r.length > t && r.splice(t, r.length); for (var n = 0; n < r.length; n++) r[n] = Math.round(r[n] * e) / e; return r; } function gD(r) { if (!r) throw new Error("geojson is required"); var e = []; return Yi(r, function(t) { e.push(t); }), lt(e); } function Noe(r, e, t) { if (t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.units, i = t.reverse; if (!r) throw new Error("geojson is required"); if (e <= 0) throw new Error("segmentLength must be greater than 0"); var a = []; return Yi(r, function(o) { i && (o.geometry.coordinates = o.geometry.coordinates.reverse()), Foe(o, e, n, function(s) { a.push(s); }); }), lt(a); } function Foe(r, e, t, n) { var i = vD(r, { units: t }); if (i <= e) return n(r); var a = i / e; Number.isInteger(a) || (a = Math.floor(a) + 1); for (var o = 0; o < a; o++) { var s = jH( r, e * o, e * (o + 1), { units: t } ); n(s, o); } } var Vb = { exports: {} }, JH = { exports: {} }; (function(r, e) { (function(t, n) { r.exports = n(); })(Db, function() { function t(o, s, u, l, c) { n(o, s, u || 0, l || o.length - 1, c || a); } function n(o, s, u, l, c) { for (; l > u; ) { if (l - u > 600) { var f = l - u + 1, h = s - u + 1, p = Math.log(f), d = 0.5 * Math.exp(2 * p / 3), v = 0.5 * Math.sqrt(p * d * (f - d) / f) * (h - f / 2 < 0 ? -1 : 1), g = Math.max(u, Math.floor(s - h * d / f + v)), m = Math.min(l, Math.floor(s + (f - h) * d / f + v)); n(o, s, g, m, c); } var y = o[s], _ = u, w = l; for (i(o, u, s), c(o[l], y) > 0 && i(o, u, l); _ < w; ) { for (i(o, _, w), _++, w--; c(o[_], y) < 0; ) _++; for (; c(o[w], y) > 0; ) w--; } c(o[u], y) === 0 ? i(o, u, w) : (w++, i(o, w, l)), w <= s && (u = w + 1), s <= w && (l = w - 1); } } function i(o, s, u) { var l = o[s]; o[s] = o[u], o[u] = l; } function a(o, s) { return o < s ? -1 : o > s ? 1 : 0; } return t; }); })(JH); Vb.exports = k_; Vb.exports.default = k_; var Boe = JH.exports; function k_(r, e) { if (!(this instanceof k_)) return new k_(r, e); this._maxEntries = Math.max(4, r || 9), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), e && this._initFormat(e), this.clear(); } k_.prototype = { all: function() { return this._all(this.data, []); }, search: function(r) { var e = this.data, t = [], n = this.toBBox; if (!Ex(r, e)) return t; for (var i = [], a, o, s, u; e; ) { for (a = 0, o = e.children.length; a < o; a++) s = e.children[a], u = e.leaf ? n(s) : s, Ex(r, u) && (e.leaf ? t.push(s) : $P(r, u) ? this._all(s, t) : i.push(s)); e = i.pop(); } return t; }, collides: function(r) { var e = this.data, t = this.toBBox; if (!Ex(r, e)) return !1; for (var n = [], i, a, o, s; e; ) { for (i = 0, a = e.children.length; i < a; i++) if (o = e.children[i], s = e.leaf ? t(o) : o, Ex(r, s)) { if (e.leaf || $P(r, s)) return !0; n.push(o); } e = n.pop(); } return !1; }, load: function(r) { if (!(r && r.length)) return this; if (r.length < this._minEntries) { for (var e = 0, t = r.length; e < t; e++) this.insert(r[e]); return this; } var n = this._build(r.slice(), 0, r.length - 1, 0); if (!this.data.children.length) this.data = n; else if (this.data.height === n.height) this._splitRoot(this.data, n); else { if (this.data.height < n.height) { var i = this.data; this.data = n, n = i; } this._insert(n, this.data.height - n.height - 1, !0); } return this; }, insert: function(r) { return r && this._insert(r, this.data.height - 1), this; }, clear: function() { return this.data = cg([]), this; }, remove: function(r, e) { if (!r) return this; for (var t = this.data, n = this.toBBox(r), i = [], a = [], o, s, u, l; t || i.length; ) { if (t || (t = i.pop(), s = i[i.length - 1], o = a.pop(), l = !0), t.leaf && (u = koe(r, t.children, e), u !== -1)) return t.children.splice(u, 1), i.push(t), this._condense(i), this; !l && !t.leaf && $P(t, n) ? (i.push(t), a.push(o), o = 0, s = t, t = t.children[0]) : s ? (o++, t = s.children[o], l = !1) : t = null; } return this; }, toBBox: function(r) { return r; }, compareMinX: U3, compareMinY: W3, toJSON: function() { return this.data; }, fromJSON: function(r) { return this.data = r, this; }, _all: function(r, e) { for (var t = []; r; ) r.leaf ? e.push.apply(e, r.children) : t.push.apply(t, r.children), r = t.pop(); return e; }, _build: function(r, e, t, n) { var i = t - e + 1, a = this._maxEntries, o; if (i <= a) return o = cg(r.slice(e, t + 1)), Pv(o, this.toBBox), o; n || (n = Math.ceil(Math.log(i) / Math.log(a)), a = Math.ceil(i / Math.pow(a, n - 1))), o = cg([]), o.leaf = !1, o.height = n; var s = Math.ceil(i / a), u = s * Math.ceil(Math.sqrt(a)), l, c, f, h; for (j3(r, e, t, u, this.compareMinX), l = e; l <= t; l += u) for (f = Math.min(l + u - 1, t), j3(r, l, f, s, this.compareMinY), c = l; c <= f; c += s) h = Math.min(c + s - 1, f), o.children.push(this._build(r, c, h, n - 1)); return Pv(o, this.toBBox), o; }, _chooseSubtree: function(r, e, t, n) { for (var i, a, o, s, u, l, c, f; n.push(e), !(e.leaf || n.length - 1 === t); ) { for (c = f = 1 / 0, i = 0, a = e.children.length; i < a; i++) o = e.children[i], u = zP(o), l = Voe(r, o) - u, l < f ? (f = l, c = u < c ? u : c, s = o) : l === f && u < c && (c = u, s = o); e = s || e.children[0]; } return e; }, _insert: function(r, e, t) { var n = this.toBBox, i = t ? r : n(r), a = [], o = this._chooseSubtree(i, this.data, e, a); for (o.children.push(r), F0(o, i); e >= 0 && a[e].children.length > this._maxEntries; ) this._split(a, e), e--; this._adjustParentBBoxes(i, a, e); }, _split: function(r, e) { var t = r[e], n = t.children.length, i = this._minEntries; this._chooseSplitAxis(t, i, n); var a = this._chooseSplitIndex(t, i, n), o = cg(t.children.splice(a, t.children.length - a)); o.height = t.height, o.leaf = t.leaf, Pv(t, this.toBBox), Pv(o, this.toBBox), e ? r[e - 1].children.push(o) : this._splitRoot(t, o); }, _splitRoot: function(r, e) { this.data = cg([r, e]), this.data.height = r.height + 1, this.data.leaf = !1, Pv(this.data, this.toBBox); }, _chooseSplitIndex: function(r, e, t) { var n, i, a, o, s, u, l, c; for (u = l = 1 / 0, n = e; n <= t - e; n++) i = N0(r, 0, n, this.toBBox), a = N0(r, n, t, this.toBBox), o = Goe(i, a), s = zP(i) + zP(a), o < u ? (u = o, c = n, l = s < l ? s : l) : o === u && s < l && (l = s, c = n); return c; }, _chooseSplitAxis: function(r, e, t) { var n = r.leaf ? this.compareMinX : U3, i = r.leaf ? this.compareMinY : W3, a = this._allDistMargin(r, e, t, n), o = this._allDistMargin(r, e, t, i); a < o && r.children.sort(n); }, _allDistMargin: function(r, e, t, n) { r.children.sort(n); var i = this.toBBox, a = N0(r, 0, e, i), o = N0(r, t - e, t, i), s = Sx(a) + Sx(o), u, l; for (u = e; u < t - e; u++) l = r.children[u], F0(a, r.leaf ? i(l) : l), s += Sx(a); for (u = t - e - 1; u >= e; u--) l = r.children[u], F0(o, r.leaf ? i(l) : l), s += Sx(o); return s; }, _adjustParentBBoxes: function(r, e, t) { for (var n = t; n >= 0; n--) F0(e[n], r); }, _condense: function(r) { for (var e = r.length - 1, t; e >= 0; e--) r[e].children.length === 0 ? e > 0 ? (t = r[e - 1].children, t.splice(t.indexOf(r[e]), 1)) : this.clear() : Pv(r[e], this.toBBox); }, _initFormat: function(r) { var e = ["return a", " - b", ";"]; this.compareMinX = new Function("a", "b", e.join(r[0])), this.compareMinY = new Function("a", "b", e.join(r[1])), this.toBBox = new Function( "a", "return {minX: a" + r[0] + ", minY: a" + r[1] + ", maxX: a" + r[2] + ", maxY: a" + r[3] + "};" ); } }; function koe(r, e, t) { if (!t) return e.indexOf(r); for (var n = 0; n < e.length; n++) if (t(r, e[n])) return n; return -1; } function Pv(r, e) { N0(r, 0, r.children.length, e, r); } function N0(r, e, t, n, i) { i || (i = cg(null)), i.minX = 1 / 0, i.minY = 1 / 0, i.maxX = -1 / 0, i.maxY = -1 / 0; for (var a = e, o; a < t; a++) o = r.children[a], F0(i, r.leaf ? n(o) : o); return i; } function F0(r, e) { return r.minX = Math.min(r.minX, e.minX), r.minY = Math.min(r.minY, e.minY), r.maxX = Math.max(r.maxX, e.maxX), r.maxY = Math.max(r.maxY, e.maxY), r; } function U3(r, e) { return r.minX - e.minX; } function W3(r, e) { return r.minY - e.minY; } function zP(r) { return (r.maxX - r.minX) * (r.maxY - r.minY); } function Sx(r) { return r.maxX - r.minX + (r.maxY - r.minY); } function Voe(r, e) { return (Math.max(e.maxX, r.maxX) - Math.min(e.minX, r.minX)) * (Math.max(e.maxY, r.maxY) - Math.min(e.minY, r.minY)); } function Goe(r, e) { var t = Math.max(r.minX, e.minX), n = Math.max(r.minY, e.minY), i = Math.min(r.maxX, e.maxX), a = Math.min(r.maxY, e.maxY); return Math.max(0, i - t) * Math.max(0, a - n); } function $P(r, e) { return r.minX <= e.minX && r.minY <= e.minY && e.maxX <= r.maxX && e.maxY <= r.maxY; } function Ex(r, e) { return e.minX <= r.maxX && e.minY <= r.maxY && e.maxX >= r.minX && e.maxY >= r.minY; } function cg(r) { return { children: r, height: 1, leaf: !0, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 }; } function j3(r, e, t, n, i) { for (var a = [e, t], o; a.length; ) t = a.pop(), e = a.pop(), !(t - e <= n) && (o = e + Math.ceil((t - e) / n / 2) * n, Boe(r, o, e, t, i), a.push(e, o, o, t)); } function zoe(r, e, t) { if (r.geometry.type !== "Polygon") throw new Error("The input feature must be a Polygon"); t === void 0 && (t = 1); var n = r.geometry.coordinates, i = [], a = {}; if (t) { for (var o = [], s = 0; s < n.length; s++) for (var u = 0; u < n[s].length - 1; u++) o.push(g(s, u)); var l = Vb.exports(); l.load(o); } for (var c = 0; c < n.length; c++) for (var f = 0; f < n[c].length - 1; f++) if (t) { var h = l.search(g(c, f)); h.forEach(function(m) { var y = m.ring, _ = m.edge; v(c, f, y, _); }); } else for (var p = 0; p < n.length; p++) for (var d = 0; d < n[p].length - 1; d++) v(c, f, p, d); return e || (i = { type: "Feature", geometry: { type: "MultiPoint", coordinates: i } }), i; function v(m, y, _, w) { var x = n[m][y], C = n[m][y + 1], S = n[_][w], b = n[_][w + 1], E = $oe(x, C, S, b); if (E !== null) { var T, P; if (C[0] !== x[0] ? T = (E[0] - x[0]) / (C[0] - x[0]) : T = (E[1] - x[1]) / (C[1] - x[1]), b[0] !== S[0] ? P = (E[0] - S[0]) / (b[0] - S[0]) : P = (E[1] - S[1]) / (b[1] - S[1]), !(T >= 1 || T <= 0 || P >= 1 || P <= 0)) { var I = E, A = !a[I]; A && (a[I] = !0), e ? i.push( e( E, m, y, x, C, T, _, w, S, b, P, A ) ) : i.push(E); } } } function g(m, y) { var _ = n[m][y], w = n[m][y + 1], x, C, S, b; return _[0] < w[0] ? (x = _[0], C = w[0]) : (x = w[0], C = _[0]), _[1] < w[1] ? (S = _[1], b = w[1]) : (S = w[1], b = _[1]), { minX: x, minY: S, maxX: C, maxY: b, ring: m, edge: y }; } } function $oe(r, e, t, n) { if (B0(r, t) || B0(r, n) || B0(e, t) || B0(n, t)) return null; var i = r[0], a = r[1], o = e[0], s = e[1], u = t[0], l = t[1], c = n[0], f = n[1], h = (i - o) * (l - f) - (a - s) * (u - c); if (h === 0) return null; var p = ((i * s - a * o) * (u - c) - (i - o) * (u * f - l * c)) / h, d = ((i * s - a * o) * (l - f) - (a - s) * (u * f - l * c)) / h; return [p, d]; } function B0(r, e) { if (!r || !e || r.length !== e.length) return !1; for (var t = 0, n = r.length; t < n; t++) if (r[t] instanceof Array && e[t] instanceof Array) { if (!B0(r[t], e[t])) return !1; } else if (r[t] !== e[t]) return !1; return !0; } function Hoe(r) { if (r.type != "Feature") throw new Error("The input must a geojson object of type Feature"); if (r.geometry === void 0 || r.geometry == null) throw new Error( "The input must a geojson object with a non-empty geometry" ); if (r.geometry.type != "Polygon") throw new Error("The input must be a geojson Polygon"); for (var e = r.geometry.coordinates.length, t = [], y = 0; y < e; y++) { var n = r.geometry.coordinates[y]; k0(n[0], n[n.length - 1]) || n.push(n[0]), t.push.apply(t, n.slice(0, n.length - 1)); } if (!Woe(t)) throw new Error( "The input polygon may not have duplicate vertices (except for the first and last vertex of each ring)" ); var i = t.length, a = zoe( r, function(j, ae, se, $, V, q, ee, Y, K, fe, J, ue) { return [ j, ae, se, $, V, q, ee, Y, K, fe, J, ue ]; } ), o = a.length; if (o == 0) { for (var S = [], y = 0; y < e; y++) S.push( Nt([r.geometry.coordinates[y]], { parent: -1, winding: Uoe(r.geometry.coordinates[y]) }) ); var k = lt(S); return G(), U(), k; } for (var s = [], u = [], y = 0; y < e; y++) { s.push([]); for (var l = 0; l < r.geometry.coordinates[y].length - 1; l++) s[y].push([ new Y3( r.geometry.coordinates[y][Tg(l + 1, r.geometry.coordinates[y].length - 1)], 1, [y, l], [y, Tg(l + 1, r.geometry.coordinates[y].length - 1)], void 0 ) ]), u.push( new X3( r.geometry.coordinates[y][l], [y, Tg(l - 1, r.geometry.coordinates[y].length - 1)], [y, l], void 0, void 0, !1, !0 ) ); } for (var y = 0; y < o; y++) s[a[y][1]][a[y][2]].push( new Y3( a[y][0], a[y][5], [a[y][1], a[y][2]], [a[y][6], a[y][7]], void 0 ) ), a[y][11] && u.push( new X3( a[y][0], [a[y][1], a[y][2]], [a[y][6], a[y][7]], void 0, void 0, !0, !0 ) ); for (var c = u.length, y = 0; y < s.length; y++) for (var l = 0; l < s[y].length; l++) s[y][l].sort(function(ae, se) { return ae.param < se.param ? -1 : 1; }); for (var f = [], y = 0; y < c; y++) f.push({ minX: u[y].coord[0], minY: u[y].coord[1], maxX: u[y].coord[0], maxY: u[y].coord[1], index: y }); var h = Vb.exports(); h.load(f); for (var y = 0; y < s.length; y++) for (var l = 0; l < s[y].length; l++) for (var p = 0; p < s[y][l].length; p++) { var d; p == s[y][l].length - 1 ? d = s[y][Tg(l + 1, r.geometry.coordinates[y].length - 1)][0].coord : d = s[y][l][p + 1].coord; var v = h.search({ minX: d[0], minY: d[1], maxX: d[0], maxY: d[1] })[0]; s[y][l][p].nxtIsectAlongEdgeIn = v.index; } for (var y = 0; y < s.length; y++) for (var l = 0; l < s[y].length; l++) for (var p = 0; p < s[y][l].length; p++) { var d = s[y][l][p].coord, v = h.search({ minX: d[0], minY: d[1], maxX: d[0], maxY: d[1] })[0], g = v.index; g < i ? u[g].nxtIsectAlongRingAndEdge2 = s[y][l][p].nxtIsectAlongEdgeIn : k0( u[g].ringAndEdge1, s[y][l][p].ringAndEdgeIn ) ? u[g].nxtIsectAlongRingAndEdge1 = s[y][l][p].nxtIsectAlongEdgeIn : u[g].nxtIsectAlongRingAndEdge2 = s[y][l][p].nxtIsectAlongEdgeIn; } for (var m = [], y = 0, l = 0; l < e; l++) { for (var _ = y, p = 0; p < r.geometry.coordinates[l].length - 1; p++) u[y].coord[0] < u[_].coord[0] && (_ = y), y++; for (var w = u[_].nxtIsectAlongRingAndEdge2, p = 0; p < u.length; p++) if (u[p].nxtIsectAlongRingAndEdge1 == _ || u[p].nxtIsectAlongRingAndEdge2 == _) { var x = p; break; } var C = XC( [ u[x].coord, u[_].coord, u[w].coord ], !0 ) ? 1 : -1; m.push({ isect: _, parent: -1, winding: C }); } m.sort(function(X, j) { return u[X.isect].coord > u[j.isect].coord ? -1 : 1; }); for (var S = []; m.length > 0; ) { var b = m.pop(), E = b.isect, T = b.parent, P = b.winding, I = S.length, A = [u[E].coord], L = E; if (u[E].ringAndEdge1Walkable) var D = u[E].ringAndEdge1, O = u[E].nxtIsectAlongRingAndEdge1; else var D = u[E].ringAndEdge2, O = u[E].nxtIsectAlongRingAndEdge2; for (; !k0(u[E].coord, u[O].coord); ) { A.push(u[O].coord); for (var N = void 0, y = 0; y < m.length; y++) if (m[y].isect == O) { N = y; break; } if (N != null && m.splice(N, 1), k0(D, u[O].ringAndEdge1)) { if (D = u[O].ringAndEdge2, u[O].ringAndEdge2Walkable = !1, u[O].ringAndEdge1Walkable) { var F = { isect: O }; XC( [ u[L].coord, u[O].coord, u[u[O].nxtIsectAlongRingAndEdge2].coord ], P == 1 ) ? (F.parent = T, F.winding = -P) : (F.parent = I, F.winding = P), m.push(F); } L = O, O = u[O].nxtIsectAlongRingAndEdge2; } else { if (D = u[O].ringAndEdge1, u[O].ringAndEdge1Walkable = !1, u[O].ringAndEdge2Walkable) { var F = { isect: O }; XC( [ u[L].coord, u[O].coord, u[u[O].nxtIsectAlongRingAndEdge1].coord ], P == 1 ) ? (F.parent = T, F.winding = -P) : (F.parent = I, F.winding = P), m.push(F); } L = O, O = u[O].nxtIsectAlongRingAndEdge1; } } A.push(u[O].coord), S.push( Nt([A], { index: I, parent: T, winding: P, netWinding: void 0 }) ); } var k = lt(S); G(), U(); function G() { for (var X = [], j = 0; j < k.features.length; j++) k.features[j].properties.parent == -1 && X.push(j); if (X.length > 1) for (var j = 0; j < X.length; j++) { for (var ae = -1, se = 1 / 0, $ = 0; $ < k.features.length; $++) X[j] != $ && nn( k.features[X[j]].geometry.coordinates[0][0], k.features[$], { ignoreBoundary: !0 } ) && kb(k.features[$]) < se && (ae = $); k.features[X[j]].properties.parent = ae; } } function U() { for (var X = 0; X < k.features.length; X++) if (k.features[X].properties.parent == -1) { var j = k.features[X].properties.winding; k.features[X].properties.netWinding = j, B(X, j); } } function B(X, j) { for (var ae = 0; ae < k.features.length; ae++) if (k.features[ae].properties.parent == X) { var se = j + k.features[ae].properties.winding; k.features[ae].properties.netWinding = se, B(ae, se); } } return k; } var Y3 = function(r, e, t, n, i) { this.coord = r, this.param = e, this.ringAndEdgeIn = t, this.ringAndEdgeOut = n, this.nxtIsectAlongEdgeIn = i; }, X3 = function(r, e, t, n, i, a, o) { this.coord = r, this.ringAndEdge1 = e, this.ringAndEdge2 = t, this.nxtIsectAlongRingAndEdge1 = n, this.nxtIsectAlongRingAndEdge2 = i, this.ringAndEdge1Walkable = a, this.ringAndEdge2Walkable = o; }; function XC(r, e) { if (typeof e > "u" && (e = !0), r.length != 3) throw new Error("This function requires an array of three points [x,y]"); var t = (r[1][0] - r[0][0]) * (r[2][1] - r[0][1]) - (r[1][1] - r[0][1]) * (r[2][0] - r[0][0]); return t >= 0 == e; } function Uoe(r) { for (var e = 0, t = 0; t < r.length - 1; t++) r[t][0] < r[e][0] && (e = t); if (XC( [ r[Tg(e - 1, r.length - 1)], r[e], r[Tg(e + 1, r.length - 1)] ], !0 )) var n = 1; else var n = -1; return n; } function k0(r, e) { if (!r || !e || r.length != e.length) return !1; for (var t = 0, n = r.length; t < n; t++) if (r[t] instanceof Array && e[t] instanceof Array) { if (!k0(r[t], e[t])) return !1; } else if (r[t] != e[t]) return !1; return !0; } function Tg(r, e) { return (r % e + e) % e; } function Woe(r) { for (var e = {}, t = 1, n = 0, i = r.length; n < i; ++n) { if (Object.prototype.hasOwnProperty.call(e, r[n])) { t = 0; break; } e[r[n]] = 1; } return t; } function joe(r) { var e = []; return Yi(r, function(t) { t.geometry.type === "Polygon" && Dr(Hoe(t), function(n) { e.push(Nt(n.geometry.coordinates, t.properties)); }); }), lt(e); } var q3 = Math.PI / 180, Z3 = 180 / Math.PI, V_ = function(r, e) { this.lon = r, this.lat = e, this.x = q3 * r, this.y = q3 * e; }; V_.prototype.view = function() { return String(this.lon).slice(0, 4) + "," + String(this.lat).slice(0, 4); }; V_.prototype.antipode = function() { var r = -1 * this.lat, e = this.lon < 0 ? 180 + this.lon : (180 - this.lon) * -1; return new V_(e, r); }; var QH = function() { this.coords = [], this.length = 0; }; QH.prototype.move_to = function(r) { this.length++, this.coords.push(r); }; var FO = function(r) { this.properties = r || {}, this.geometries = []; }; FO.prototype.json = function() { if (this.geometries.length <= 0) return { geometry: { type: "LineString", coordinates: null }, type: "Feature", properties: this.properties }; if (this.geometries.length === 1) return { geometry: { type: "LineString", coordinates: this.geometries[0].coords }, type: "Feature", properties: this.properties }; for (var r = [], e = 0; e < this.geometries.length; e++) r.push(this.geometries[e].coords); return { geometry: { type: "MultiLineString", coordinates: r }, type: "Feature", properties: this.properties }; }; FO.prototype.wkt = function() { for (var r = "", e = "LINESTRING(", t = function(a) { e += a[0] + " " + a[1] + ","; }, n = 0; n < this.geometries.length; n++) { if (this.geometries[n].coords.length === 0) return "LINESTRING(empty)"; var i = this.geometries[n].coords; i.forEach(t), r += e.substring(0, e.length - 1) + ")"; } return r; }; var BO = function(r, e, t) { if (!r || r.x === void 0 || r.y === void 0) throw new Error( "GreatCircle constructor expects two args: start and end objects with x and y properties" ); if (!e || e.x === void 0 || e.y === void 0) throw new Error( "GreatCircle constructor expects two args: start and end objects with x and y properties" ); this.start = new V_(r.x, r.y), this.end = new V_(e.x, e.y), this.properties = t || {}; var n = this.start.x - this.end.x, i = this.start.y - this.end.y, a = Math.pow(Math.sin(i / 2), 2) + Math.cos(this.start.y) * Math.cos(this.end.y) * Math.pow(Math.sin(n / 2), 2); if (this.g = 2 * Math.asin(Math.sqrt(a)), this.g === Math.PI) throw new Error( "it appears " + r.view() + " and " + e.view() + " are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite" ); if (isNaN(this.g)) throw new Error( "could not calculate great circle between " + r + " and " + e ); }; BO.prototype.interpolate = function(r) { var e = Math.sin((1 - r) * this.g) / Math.sin(this.g), t = Math.sin(r * this.g) / Math.sin(this.g), n = e * Math.cos(this.start.y) * Math.cos(this.start.x) + t * Math.cos(this.end.y) * Math.cos(this.end.x), i = e * Math.cos(this.start.y) * Math.sin(this.start.x) + t * Math.cos(this.end.y) * Math.sin(this.end.x), a = e * Math.sin(this.start.y) + t * Math.sin(this.end.y), o = Z3 * Math.atan2(a, Math.sqrt(Math.pow(n, 2) + Math.pow(i, 2))), s = Z3 * Math.atan2(i, n); return [s, o]; }; BO.prototype.Arc = function(r, e) { var t = []; if (!r || r <= 2) t.push([this.start.lon, this.start.lat]), t.push([this.end.lon, this.end.lat]); else for (var n = 1 / (r - 1), i = 0; i < r; ++i) { var a = n * i, o = this.interpolate(a); t.push(o); } for (var s = !1, u = 0, l = e && e.offset ? e.offset : 10, c = 180 - l, f = -180 + l, h = 360 - l, p = 1; p < t.length; ++p) { var d = t[p - 1][0], v = t[p][0], g = Math.abs(v - d); g > h && (v > c && d < f || d > c && v < f) ? s = !0 : g > u && (u = g); } var m = []; if (s && u < l) { var y = []; m.push(y); for (var _ = 0; _ < t.length; ++_) { var w = parseFloat(t[_][0]); if (_ > 0 && Math.abs(w - t[_ - 1][0]) > h) { var x = parseFloat(t[_ - 1][0]), C = parseFloat(t[_ - 1][1]), S = parseFloat(t[_][0]), b = parseFloat(t[_][1]); if (x > -180 && x < f && S === 180 && _ + 1 < t.length && t[_ - 1][0] > -180 && t[_ - 1][0] < f) { y.push([-180, t[_][1]]), _++, y.push([t[_][0], t[_][1]]); continue; } else if (x > c && x < 180 && S === -180 && _ + 1 < t.length && t[_ - 1][0] > c && t[_ - 1][0] < 180) { y.push([180, t[_][1]]), _++, y.push([t[_][0], t[_][1]]); continue; } if (x < f && S > c) { var E = x; x = S, S = E; var T = C; C = b, b = T; } if (x > c && S < f && (S += 360), x <= 180 && S >= 180 && x < S) { var P = (180 - x) / (S - x), I = P * b + (1 - P) * C; y.push([ t[_ - 1][0] > c ? 180 : -180, I ]), y = [], y.push([ t[_ - 1][0] > c ? -180 : 180, I ]), m.push(y); } else y = [], m.push(y); y.push([w, t[_][1]]); } else y.push([t[_][0], t[_][1]]); } } else { var A = []; m.push(A); for (var L = 0; L < t.length; ++L) A.push([t[L][0], t[L][1]]); } for (var D = new FO(this.properties), O = 0; O < m.length; ++O) { var N = new QH(); D.geometries.push(N); for (var F = m[O], k = 0; k < F.length; ++k) N.move_to(F[k]); } return D; }; function Yoe(r, e, t) { if (t = t || {}, typeof t != "object") throw new Error("options is invalid"); var n = t.properties, i = t.npoints, a = t.offset; r = qr(r), e = qr(e), n = n || {}, i = i || 100, a = a || 10; var o = new BO( { x: r[0], y: r[1] }, { x: e[0], y: e[1] }, n ), s = o.Arc(i, { offset: a }); return s.json(); } function Xoe(r, e) { if (!r) throw new Error("line is required"); if (!e) throw new Error("splitter is required"); var t = po(r), n = po(e); if (t !== "LineString") throw new Error("line must be LineString"); if (n === "FeatureCollection") throw new Error("splitter cannot be a FeatureCollection"); if (n === "GeometryCollection") throw new Error("splitter cannot be a GeometryCollection"); var i = KH(e, { precision: 7 }); switch (n) { case "Point": return mD(r, i); case "MultiPoint": return K3(r, i); case "LineString": case "MultiLineString": case "Polygon": case "MultiPolygon": return K3(r, vf(r, i)); } } function K3(r, e) { var t = [], n = qm.exports(); return Yi(e, function(i) { if (t.forEach(function(s, u) { s.id = u; }), !t.length) t = mD(r, i).features, t.forEach(function(s) { s.bbox || (s.bbox = BH(Bn(s))); }), n.load(lt(t)); else { var a = n.search(i); if (a.features.length) { var o = eU(i, a); t = t.filter(function(s) { return s.id !== o.id; }), n.remove(o), Dr(mD(o, i), function(s) { t.push(s), n.insert(s); }); } } }), lt(t); } function mD(r, e) { var t = [], n = pt(r)[0], i = pt(r)[r.geometry.coordinates.length - 1]; if (HP(n, qr(e)) || HP(i, qr(e))) return lt([r]); var a = qm.exports(), o = wd(r); a.load(o); var s = a.search(e); if (!s.features.length) return lt([r]); var u = eU(e, s), l = [n], c = wO( o, function(f, h, p) { var d = pt(h)[1], v = qr(e); return p === u.id ? (f.push(v), t.push(Br(f)), HP(v, d) ? [v] : [v, d]) : (f.push(d), f); }, l ); return c.length > 1 && t.push(Br(c)), lt(t); } function eU(r, e) { if (!e.features.length) throw new Error("lines must contain features"); if (e.features.length === 1) return e.features[0]; var t, n = 1 / 0; return Dr(e, function(i) { var a = Ec(i, r), o = a.properties.dist; o < n && (t = i, n = o); }), t; } function HP(r, e) { return r[0] === e[0] && r[1] === e[1]; } function tU(r, e, t, n, i) { i === void 0 && (i = {}); var a = i.steps || 64, o = J3(t), s = J3(n), u = !Array.isArray(r) && r.type === "Feature" ? r.properties : {}; if (o === s) return Br(RO(r, e, i).geometry.coordinates[0], u); for (var l = o, c = o < s ? s : s + 360, f = l, h = [], p = 0; f < c; ) h.push(Hl(r, e, f, i).geometry.coordinates), p++, f = l + p * 360 / a; return f > c && h.push(Hl(r, e, c, i).geometry.coordinates), Br(h, u); } function J3(r) { var e = r % 360; return e < 0 && (e += 360), e; } function G_(r, e) { e === void 0 && (e = {}); var t = on(r); switch (!e.properties && r.type === "Feature" && (e.properties = r.properties), t.type) { case "Polygon": return rU(t, e); case "MultiPolygon": return qoe(t, e); default: throw new Error("invalid poly"); } } function rU(r, e) { e === void 0 && (e = {}); var t = on(r), n = t.coordinates, i = e.properties ? e.properties : r.type === "Feature" ? r.properties : {}; return nU(n, i); } function qoe(r, e) { e === void 0 && (e = {}); var t = on(r), n = t.coordinates, i = e.properties ? e.properties : r.type === "Feature" ? r.properties : {}, a = []; return n.forEach(function(o) { a.push(nU(o, i)); }), lt(a); } function nU(r, e) { return r.length > 1 ? Hh(r, e) : Br(r[0], e); } function Q3(r, e) { e === void 0 && (e = {}); var t, n, i, a = e.properties, o = (t = e.autoComplete) !== null && t !== void 0 ? t : !0, s = (n = e.orderCoords) !== null && n !== void 0 ? n : !0, u = (i = e.mutate) !== null && i !== void 0 ? i : !1; switch (u || (r = da(r)), r.type) { case "FeatureCollection": var l = []; return r.features.forEach(function(c) { l.push(pt(eB(c, {}, o, s))); }), Fo(l, a); default: return eB(r, a, o, s); } } function eB(r, e, t, n) { e = e || (r.type === "Feature" ? r.properties : {}); var i = on(r), a = i.coordinates, o = i.type; if (!a.length) throw new Error("line must contain coordinates"); switch (o) { case "LineString": return t && (a = tB(a)), Nt([a], e); case "MultiLineString": var s = [], u = 0; return a.forEach(function(l) { if (t && (l = tB(l)), n) { var c = Zoe(Bn(Br(l))); c > u ? (s.unshift(l), u = c) : s.push(l); } else s.push(l); }), Nt(s, e); default: throw new Error("geometry type " + o + " is not supported"); } } function tB(r) { var e = r[0], t = e[0], n = e[1], i = r[r.length - 1], a = i[0], o = i[1]; return (t !== a || n !== o) && r.push(e), r; } function Zoe(r) { var e = r[0], t = r[1], n = r[2], i = r[3]; return Math.abs(e - n) * Math.abs(t - i); } function Koe(r, e, t) { var n = r.length, i = Pg(r[0], e), a = [], o, s, u, l, c; for (t || (t = []), o = 1; o < n; o++) { for (l = r[o - 1], c = r[o], s = u = Pg(c, e); ; ) if (i | s) { if (i & s) break; i ? (l = yD(l, c, i, e), i = Pg(l, e)) : (c = yD(l, c, s, e), s = Pg(c, e)); } else { a.push(l), s !== u ? (a.push(c), o < n - 1 && (t.push(a), a = [])) : o === n - 1 && a.push(c); break; } i = u; } return a.length && t.push(a), t; } function Joe(r, e) { var t, n, i, a, o, s, u; for (n = 1; n <= 8; n *= 2) { for (t = [], i = r[r.length - 1], a = !(Pg(i, e) & n), o = 0; o < r.length; o++) s = r[o], u = !(Pg(s, e) & n), u !== a && t.push(yD(i, s, n, e)), u && t.push(s), i = s, a = u; if (r = t, !r.length) break; } return t; } function yD(r, e, t, n) { return t & 8 ? [r[0] + (e[0] - r[0]) * (n[3] - r[1]) / (e[1] - r[1]), n[3]] : t & 4 ? [r[0] + (e[0] - r[0]) * (n[1] - r[1]) / (e[1] - r[1]), n[1]] : t & 2 ? [n[2], r[1] + (e[1] - r[1]) * (n[2] - r[0]) / (e[0] - r[0])] : t & 1 ? [n[0], r[1] + (e[1] - r[1]) * (n[0] - r[0]) / (e[0] - r[0])] : null; } function Pg(r, e) { var t = 0; return r[0] < e[0] ? t |= 1 : r[0] > e[2] && (t |= 2), r[1] < e[1] ? t |= 4 : r[1] > e[3] && (t |= 8), t; } function Qoe(r, e) { var t = on(r), n = t.type, i = r.type === "Feature" ? r.properties : {}, a = t.coordinates; switch (n) { case "LineString": case "MultiLineString": { var o = []; return n === "LineString" && (a = [a]), a.forEach(function(s) { Koe(s, e, o); }), o.length === 1 ? Br(o[0], i) : Hh(o, i); } case "Polygon": return Nt(rB(a, e), i); case "MultiPolygon": return Fo(a.map(function(s) { return rB(s, e); }), i); default: throw new Error("geometry " + n + " not supported"); } } function rB(r, e) { for (var t = [], n = 0, i = r; n < i.length; n++) { var a = i[n], o = Joe(a, e); o.length > 0 && ((o[0][0] !== o[o.length - 1][0] || o[0][1] !== o[o.length - 1][1]) && o.push(o[0]), o.length >= 4 && t.push(o)); } return t; } var nB = Object.prototype.toString, iU = function(e) { var t = nB.call(e), n = t === "[object Arguments]"; return n || (n = t !== "[object Array]" && e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && nB.call(e.callee) === "[object Function]"), n; }, UP, iB; function ese() { if (iB) return UP; iB = 1; var r; if (!Object.keys) { var e = Object.prototype.hasOwnProperty, t = Object.prototype.toString, n = iU, i = Object.prototype.propertyIsEnumerable, a = !i.call({ toString: null }, "toString"), o = i.call(function() { }, "prototype"), s = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], u = function(h) { var p = h.constructor; return p && p.prototype === h; }, l = { $applicationCache: !0, $console: !0, $external: !0, $frame: !0, $frameElement: !0, $frames: !0, $innerHeight: !0, $innerWidth: !0, $onmozfullscreenchange: !0, $onmozfullscreenerror: !0, $outerHeight: !0, $outerWidth: !0, $pageXOffset: !0, $pageYOffset: !0, $parent: !0, $scrollLeft: !0, $scrollTop: !0, $scrollX: !0, $scrollY: !0, $self: !0, $webkitIndexedDB: !0, $webkitStorageInfo: !0, $window: !0 }, c = function() { if (typeof window > "u") return !1; for (var h in window) try { if (!l["$" + h] && e.call(window, h) && window[h] !== null && typeof window[h] == "object") try { u(window[h]); } catch { return !0; } } catch { return !0; } return !1; }(), f = function(h) { if (typeof window > "u" || !c) return u(h); try { return u(h); } catch { return !1; } }; r = function(p) { var d = p !== null && typeof p == "object", v = t.call(p) === "[object Function]", g = n(p), m = d && t.call(p) === "[object String]", y = []; if (!d && !v && !g) throw new TypeError("Object.keys called on a non-object"); var _ = o && v; if (m && p.length > 0 && !e.call(p, 0)) for (var w = 0; w < p.length; ++w) y.push(String(w)); if (g && p.length > 0) for (var x = 0; x < p.length; ++x) y.push(String(x)); else for (var C in p) !(_ && C === "prototype") && e.call(p, C) && y.push(String(C)); if (a) for (var S = f(p), b = 0; b < s.length; ++b) !(S && s[b] === "constructor") && e.call(p, s[b]) && y.push(s[b]); return y; }; } return UP = r, UP; } var tse = Array.prototype.slice, rse = iU, aB = Object.keys, qC = aB ? function(e) { return aB(e); } : ese(), oB = Object.keys; qC.shim = function() { if (Object.keys) { var e = function() { var t = Object.keys(arguments); return t && t.length === arguments.length; }(1, 2); e || (Object.keys = function(n) { return rse(n) ? oB(tse.call(n)) : oB(n); }); } else Object.keys = qC; return Object.keys || qC; }; var aU = qC, oU = function() { if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1; if (typeof Symbol.iterator == "symbol") return !0; var e = {}, t = Symbol("test"), n = Object(t); if (typeof t == "string" || Object.prototype.toString.call(t) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]") return !1; var i = 42; e[t] = i; for (t in e) return !1; if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0) return !1; var a = Object.getOwnPropertySymbols(e); if (a.length !== 1 || a[0] !== t || !Object.prototype.propertyIsEnumerable.call(e, t)) return !1; if (typeof Object.getOwnPropertyDescriptor == "function") { var o = Object.getOwnPropertyDescriptor(e, t); if (o.value !== i || o.enumerable !== !0) return !1; } return !0; }, nse = oU, kO = function() { return nse() && !!Symbol.toStringTag; }, sB = typeof Symbol < "u" && Symbol, ise = oU, ase = function() { return typeof sB != "function" || typeof Symbol != "function" || typeof sB("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ise(); }, ose = "Function.prototype.bind called on incompatible ", WP = Array.prototype.slice, sse = Object.prototype.toString, use = "[object Function]", lse = function(e) { var t = this; if (typeof t != "function" || sse.call(t) !== use) throw new TypeError(ose + t); for (var n = WP.call(arguments, 1), i, a = function() { if (this instanceof i) { var c = t.apply( this, n.concat(WP.call(arguments)) ); return Object(c) === c ? c : this; } else return t.apply( e, n.concat(WP.call(arguments)) ); }, o = Math.max(0, t.length - n.length), s = [], u = 0; u < o; u++) s.push("$" + u); if (i = Function("binder", "return function (" + s.join(",") + "){ return binder.apply(this,arguments); }")(a), t.prototype) { var l = function() { }; l.prototype = t.prototype, i.prototype = new l(), l.prototype = null; } return i; }, cse = lse, VO = Function.prototype.bind || cse, fse = VO, hse = fse.call(Function.call, Object.prototype.hasOwnProperty), Rr, im = SyntaxError, sU = Function, kg = TypeError, jP = function(r) { try { return sU('"use strict"; return (' + r + ").constructor;")(); } catch { } }, Kp = Object.getOwnPropertyDescriptor; if (Kp) try { Kp({}, ""); } catch { Kp = null; } var YP = function() { throw new kg(); }, pse = Kp ? function() { try { return arguments.callee, YP; } catch { try { return Kp(arguments, "callee").get; } catch { return YP; } } }() : YP, Iv = ase(), zf = Object.getPrototypeOf || function(r) { return r.__proto__; }, fg = {}, dse = typeof Uint8Array > "u" ? Rr : zf(Uint8Array), Vg = { "%AggregateError%": typeof AggregateError > "u" ? Rr : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? Rr : ArrayBuffer, "%ArrayIteratorPrototype%": Iv ? zf([][Symbol.iterator]()) : Rr, "%AsyncFromSyncIteratorPrototype%": Rr, "%AsyncFunction%": fg, "%AsyncGenerator%": fg, "%AsyncGeneratorFunction%": fg, "%AsyncIteratorPrototype%": fg, "%Atomics%": typeof Atomics > "u" ? Rr : Atomics, "%BigInt%": typeof BigInt > "u" ? Rr : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? Rr : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array > "u" ? Rr : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? Rr : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? Rr : FinalizationRegistry, "%Function%": sU, "%GeneratorFunction%": fg, "%Int8Array%": typeof Int8Array > "u" ? Rr : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? Rr : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? Rr : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": Iv ? zf(zf([][Symbol.iterator]())) : Rr, "%JSON%": typeof JSON == "object" ? JSON : Rr, "%Map%": typeof Map > "u" ? Rr : Map, "%MapIteratorPrototype%": typeof Map > "u" || !Iv ? Rr : zf((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? Rr : Promise, "%Proxy%": typeof Proxy > "u" ? Rr : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect > "u" ? Rr : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? Rr : Set, "%SetIteratorPrototype%": typeof Set > "u" || !Iv ? Rr : zf((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? Rr : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": Iv ? zf(""[Symbol.iterator]()) : Rr, "%Symbol%": Iv ? Symbol : Rr, "%SyntaxError%": im, "%ThrowTypeError%": pse, "%TypedArray%": dse, "%TypeError%": kg, "%Uint8Array%": typeof Uint8Array > "u" ? Rr : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? Rr : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? Rr : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? Rr : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap > "u" ? Rr : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? Rr : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? Rr : WeakSet }, vse = function r(e) { var t; if (e === "%AsyncFunction%") t = jP("async function () {}"); else if (e === "%GeneratorFunction%") t = jP("function* () {}"); else if (e === "%AsyncGeneratorFunction%") t = jP("async function* () {}"); else if (e === "%AsyncGenerator%") { var n = r("%AsyncGeneratorFunction%"); n && (t = n.prototype); } else if (e === "%AsyncIteratorPrototype%") { var i = r("%AsyncGenerator%"); i && (t = zf(i.prototype)); } return Vg[e] = t, t; }, uB = { "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, K1 = VO, PS = hse, gse = K1.call(Function.call, Array.prototype.concat), mse = K1.call(Function.apply, Array.prototype.splice), lB = K1.call(Function.call, String.prototype.replace), IS = K1.call(Function.call, String.prototype.slice), yse = K1.call(Function.call, RegExp.prototype.exec), _se = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, wse = /\\(\\)?/g, xse = function(e) { var t = IS(e, 0, 1), n = IS(e, -1); if (t === "%" && n !== "%") throw new im("invalid intrinsic syntax, expected closing `%`"); if (n === "%" && t !== "%") throw new im("invalid intrinsic syntax, expected opening `%`"); var i = []; return lB(e, _se, function(a, o, s, u) { i[i.length] = s ? lB(u, wse, "$1") : o || a; }), i; }, Cse = function(e, t) { var n = e, i; if (PS(uB, n) && (i = uB[n], n = "%" + i[0] + "%"), PS(Vg, n)) { var a = Vg[n]; if (a === fg && (a = vse(n)), typeof a > "u" && !t) throw new kg("intrinsic " + e + " exists, but is not available. Please file an issue!"); return { alias: i, name: n, value: a }; } throw new im("intrinsic " + e + " does not exist!"); }, GO = function(e, t) { if (typeof e != "string" || e.length === 0) throw new kg("intrinsic name must be a non-empty string"); if (arguments.length > 1 && typeof t != "boolean") throw new kg('"allowMissing" argument must be a boolean'); if (yse(/^%?[^%]*%?$/g, e) === null) throw new im("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); var n = xse(e), i = n.length > 0 ? n[0] : "", a = Cse("%" + i + "%", t), o = a.name, s = a.value, u = !1, l = a.alias; l && (i = l[0], mse(n, gse([0, 1], l))); for (var c = 1, f = !0; c < n.length; c += 1) { var h = n[c], p = IS(h, 0, 1), d = IS(h, -1); if ((p === '"' || p === "'" || p === "`" || d === '"' || d === "'" || d === "`") && p !== d) throw new im("property names with quotes must have matching quotes"); if ((h === "constructor" || !f) && (u = !0), i += "." + h, o = "%" + i + "%", PS(Vg, o)) s = Vg[o]; else if (s != null) { if (!(h in s)) { if (!t) throw new kg("base intrinsic for " + e + " exists, but the property is not available."); return; } if (Kp && c + 1 >= n.length) { var v = Kp(s, h); f = !!v, f && "get" in v && !("originalValue" in v.get) ? s = v.get : s = s[h]; } else f = PS(s, h), s = s[h]; f && !u && (Vg[o] = s); } } return s; }, Gb = { exports: {} }; (function(r) { var e = VO, t = GO, n = t("%Function.prototype.apply%"), i = t("%Function.prototype.call%"), a = t("%Reflect.apply%", !0) || e.call(i, n), o = t("%Object.getOwnPropertyDescriptor%", !0), s = t("%Object.defineProperty%", !0), u = t("%Math.max%"); if (s) try { s({}, "a", { value: 1 }); } catch { s = null; } r.exports = function(f) { var h = a(e, i, arguments); if (o && s) { var p = o(h, "length"); p.configurable && s( h, "length", { value: 1 + u(0, f.length - (arguments.length - 1)) } ); } return h; }; var l = function() { return a(e, n, arguments); }; s ? s(r.exports, "apply", { value: l }) : r.exports.apply = l; })(Gb); var uU = GO, lU = Gb.exports, Sse = lU(uU("String.prototype.indexOf")), cU = function(e, t) { var n = uU(e, !!t); return typeof n == "function" && Sse(e, ".prototype.") > -1 ? lU(n) : n; }, Ese = kO(), bse = cU, _D = bse("Object.prototype.toString"), zb = function(e) { return Ese && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : _D(e) === "[object Arguments]"; }, fU = function(e) { return zb(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && _D(e) !== "[object Array]" && _D(e.callee) === "[object Function]"; }, Tse = function() { return zb(arguments); }(); zb.isLegacyArguments = fU; var Pse = Tse ? zb : fU, Ise = GO, wD = Ise("%Object.defineProperty%", !0), xD = function() { if (wD) try { return wD({}, "a", { value: 1 }), !0; } catch { return !1; } return !1; }; xD.hasArrayLengthDefineBug = function() { if (!xD()) return null; try { return wD([], "length", { value: 1 }).length !== 1; } catch { return !0; } }; var Ase = xD, Lse = aU, Dse = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", Mse = Object.prototype.toString, Ose = Array.prototype.concat, hU = Object.defineProperty, Rse = function(r) { return typeof r == "function" && Mse.call(r) === "[object Function]"; }, Nse = Ase(), pU = hU && Nse, Fse = function(r, e, t, n) { e in r && (!Rse(n) || !n()) || (pU ? hU(r, e, { configurable: !0, enumerable: !1, value: t, writable: !0 }) : r[e] = t); }, dU = function(r, e) { var t = arguments.length > 2 ? arguments[2] : {}, n = Lse(e); Dse && (n = Ose.call(n, Object.getOwnPropertySymbols(e))); for (var i = 0; i < n.length; i += 1) Fse(r, n[i], e[n[i]], t[n[i]]); }; dU.supportsDescriptors = !!pU; var J1 = dU, cB = function(r) { return r !== r; }, vU = function(e, t) { return e === 0 && t === 0 ? 1 / e === 1 / t : !!(e === t || cB(e) && cB(t)); }, Bse = vU, gU = function() { return typeof Object.is == "function" ? Object.is : Bse; }, kse = gU, Vse = J1, Gse = function() { var e = kse(); return Vse(Object, { is: e }, { is: function() { return Object.is !== e; } }), e; }, zse = J1, $se = Gb.exports, Hse = vU, mU = gU, Use = Gse, yU = $se(mU(), Object); zse(yU, { getPolyfill: mU, implementation: Hse, shim: Use }); var Wse = yU, CD = cU, _U = kO(), wU, xU, SD, ED; if (_U) { wU = CD("Object.prototype.hasOwnProperty"), xU = CD("RegExp.prototype.exec"), SD = {}; var XP = function() { throw SD; }; ED = { toString: XP, valueOf: XP }, typeof Symbol.toPrimitive == "symbol" && (ED[Symbol.toPrimitive] = XP); } var jse = CD("Object.prototype.toString"), Yse = Object.getOwnPropertyDescriptor, Xse = "[object RegExp]", qse = _U ? function(e) { if (!e || typeof e != "object") return !1; var t = Yse(e, "lastIndex"), n = t && wU(t, "value"); if (!n) return !1; try { xU(e, ED); } catch (i) { return i === SD; } } : function(e) { return !e || typeof e != "object" && typeof e != "function" ? !1 : jse(e) === Xse; }, zO = { exports: {} }, z_ = function() { return typeof function() { }.name == "string"; }, i_ = Object.getOwnPropertyDescriptor; if (i_) try { i_([], "length"); } catch { i_ = null; } z_.functionsHaveConfigurableNames = function() { if (!z_() || !i_) return !1; var e = i_(function() { }, "name"); return !!e && !!e.configurable; }; var Zse = Function.prototype.bind; z_.boundFunctionsHaveNames = function() { return z_() && typeof Zse == "function" && function() { }.bind().name !== ""; }; var Kse = z_; (function(r) { var e = Kse.functionsHaveConfigurableNames(), t = Object, n = TypeError; r.exports = function() { if (this != null && this !== t(this)) throw new n("RegExp.prototype.flags getter called on non-object"); var a = ""; return this.hasIndices && (a += "d"), this.global && (a += "g"), this.ignoreCase && (a += "i"), this.multiline && (a += "m"), this.dotAll && (a += "s"), this.unicode && (a += "u"), this.sticky && (a += "y"), a; }, e && Object.defineProperty && Object.defineProperty(r.exports, "name", { value: "get flags" }); })(zO); var Jse = zO.exports, Qse = J1.supportsDescriptors, eue = Object.getOwnPropertyDescriptor, CU = function() { if (Qse && /a/mig.flags === "gim") { var e = eue(RegExp.prototype, "flags"); if (e && typeof e.get == "function" && typeof RegExp.prototype.dotAll == "boolean" && typeof RegExp.prototype.hasIndices == "boolean") { var t = "", n = {}; if (Object.defineProperty(n, "hasIndices", { get: function() { t += "d"; } }), Object.defineProperty(n, "sticky", { get: function() { t += "y"; } }), t === "dy") return e.get; } } return Jse; }, tue = J1.supportsDescriptors, rue = CU, nue = Object.getOwnPropertyDescriptor, iue = Object.defineProperty, aue = TypeError, fB = Object.getPrototypeOf, oue = /a/, sue = function() { if (!tue || !fB) throw new aue("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors"); var e = rue(), t = fB(oue), n = nue(t, "flags"); return (!n || n.get !== e) && iue(t, "flags", { configurable: !0, enumerable: !1, get: e }), e; }, uue = J1, lue = Gb.exports, cue = zO.exports, SU = CU, fue = sue, EU = lue(SU()); uue(EU, { getPolyfill: SU, implementation: cue, shim: fue }); var hue = EU, pue = Date.prototype.getDay, due = function(e) { try { return pue.call(e), !0; } catch { return !1; } }, vue = Object.prototype.toString, gue = "[object Date]", mue = kO(), yue = function(e) { return typeof e != "object" || e === null ? !1 : mue ? due(e) : vue.call(e) === gue; }, hB = aU, pB = Pse, dB = Wse, vB = qse, gB = hue, mB = yue, yB = Date.prototype.getTime; function bU(r, e, t) { var n = t || {}; return (n.strict ? dB(r, e) : r === e) ? !0 : !r || !e || typeof r != "object" && typeof e != "object" ? n.strict ? dB(r, e) : r == e : _ue(r, e, n); } function _B(r) { return r == null; } function wB(r) { return !(!r || typeof r != "object" || typeof r.length != "number" || typeof r.copy != "function" || typeof r.slice != "function" || r.length > 0 && typeof r[0] != "number"); } function _ue(r, e, t) { var n, i; if (typeof r != typeof e || _B(r) || _B(e) || r.prototype !== e.prototype || pB(r) !== pB(e)) return !1; var a = vB(r), o = vB(e); if (a !== o) return !1; if (a || o) return r.source === e.source && gB(r) === gB(e); if (mB(r) && mB(e)) return yB.call(r) === yB.call(e); var s = wB(r), u = wB(e); if (s !== u) return !1; if (s || u) { if (r.length !== e.length) return !1; for (n = 0; n < r.length; n++) if (r[n] !== e[n]) return !1; return !0; } if (typeof r != typeof e) return !1; try { var l = hB(r), c = hB(e); } catch { return !1; } if (l.length !== c.length) return !1; for (l.sort(), c.sort(), n = l.length - 1; n >= 0; n--) if (l[n] != c[n]) return !1; for (n = l.length - 1; n >= 0; n--) if (i = l[n], !bU(r[i], e[i], t)) return !1; return !0; } var Ig = bU; function TU(r, e, t) { if (t === void 0 && (t = {}), t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.tolerance || 0, i = [], a = qm.exports(), o = wd(r); a.load(o); var s; return Sc(e, function(u) { var l = !1; !u || (Dr(a.search(u), function(c) { if (l === !1) { var f = pt(u).sort(), h = pt(c).sort(); Ig(f, h) || (n === 0 ? Mo(f[0], c) && Mo(f[1], c) : Ec(c, f[0]).properties.dist <= n && Ec(c, f[1]).properties.dist <= n) ? (l = !0, s ? s = qP(s, u) : s = u) : (n === 0 ? Mo(h[0], u) && Mo(h[1], u) : Ec(u, h[0]).properties.dist <= n && Ec(u, h[1]).properties.dist <= n) && (s ? s = qP(s, c) : s = c); } }), l === !1 && s && (i.push(s), s = void 0)); }), s && i.push(s), lt(i); } function qP(r, e) { var t = pt(e), n = pt(r), i = n[0], a = n[n.length - 1], o = r.geometry.coordinates; return Ig(t[0], i) ? o.unshift(t[1]) : Ig(t[0], a) ? o.push(t[1]) : Ig(t[1], i) ? o.unshift(t[0]) : Ig(t[1], a) && o.push(t[0]), r; } function wue(r, e, t, n, i) { if (i = i || {}, !$r(i)) throw new Error("options is invalid"); var a = i.properties; if (!r) throw new Error("center is required"); if (t == null) throw new Error("bearing1 is required"); if (n == null) throw new Error("bearing2 is required"); if (!e) throw new Error("radius is required"); if (typeof i != "object") throw new Error("options must be an object"); if (xB(t) === xB(n)) return RO(r, e, i); var o = pt(r), s = tU(r, e, t, n, i), u = [[o]]; return Fn(s, function(l) { u[0].push(l); }), u[0].push(o), Nt(u, a); } function xB(r) { var e = r % 360; return e < 0 && (e += 360), e; } function xd(r, e, t) { t === void 0 && (t = {}); var n; t.final ? n = CB(qr(e), qr(r)) : n = CB(qr(r), qr(e)); var i = n > 180 ? -(360 - n) : n; return i; } function CB(r, e) { var t = Ii(r[1]), n = Ii(e[1]), i = Ii(e[0] - r[0]); i > Math.PI && (i -= 2 * Math.PI), i < -Math.PI && (i += 2 * Math.PI); var a = Math.log(Math.tan(n / 2 + Math.PI / 4) / Math.tan(t / 2 + Math.PI / 4)), o = Math.atan2(i, a); return (_h(o) + 360) % 360; } function am(r, e, t, n) { n === void 0 && (n = {}); var i = e < 0, a = md(Math.abs(e), n.units, "meters"); i && (a = -Math.abs(a)); var o = qr(r), s = xue(o, a, t); return s[0] += s[0] - o[0] > 180 ? -360 : o[0] - s[0] > 180 ? 360 : 0, Lt(s, n.properties); } function xue(r, e, t, n) { n = n === void 0 ? wi : Number(n); var i = e / n, a = r[0] * Math.PI / 180, o = Ii(r[1]), s = Ii(t), u = i * Math.cos(s), l = o + u; Math.abs(l) > Math.PI / 2 && (l = l > 0 ? Math.PI - l : -Math.PI - l); var c = Math.log(Math.tan(l / 2 + Math.PI / 4) / Math.tan(o / 2 + Math.PI / 4)), f = Math.abs(c) > 1e-11 ? u / c : Math.cos(o), h = i * Math.sin(s) / f, p = a + h; return [ (p * 180 / Math.PI + 540) % 360 - 180, l * 180 / Math.PI ]; } function Cue(r, e) { var t = pt(r), n = pt(e), i, a, o, s, u = Bn(e), l = 0, c = null; t[0] > u[0] && t[0] < u[2] && t[1] > u[1] && t[1] < u[3] && (c = TS(r, Rb(e)), l = c.properties.featureIndex); var f = po(e); switch (f) { case "Polygon": i = n[0][l], a = n[0][0], c !== null && c.geometry.coordinates[1] < t[1] && (a = n[0][l]), s = $_( n[0][0], n[0][n[0].length - 1], t ); var h = SB( n[0], t, s, o, i, a ); i = h[0], a = h[1]; break; case "MultiPolygon": for (var p = 0, d = 0, v = 0, g = 0; g < n[0].length; g++) { p = g; for (var m = !1, y = 0; y < n[0][g].length; y++) { if (d = y, v === l) { m = !0; break; } v++; } if (m) break; } i = n[0][p][d], a = n[0][p][d], s = $_( n[0][0][0], n[0][0][n[0][0].length - 1], t ), n.forEach(function(_) { var w = SB( _[0], t, s, o, i, a ); i = w[0], a = w[1]; }); break; } return lt([Lt(i), Lt(a)]); } function SB(r, e, t, n, i, a) { for (var o = 0; o < r.length; o++) { var s = r[o], u = r[o + 1]; o === r.length - 1 && (u = r[0]), n = $_(s, u, e), t <= 0 && n > 0 ? Eue(e, s, i) || (i = s) : t > 0 && n <= 0 && (Sue(e, s, a) || (a = s)), t = n; } return [i, a]; } function Sue(r, e, t) { return $_(r, e, t) > 0; } function Eue(r, e, t) { return $_(r, e, t) < 0; } function $_(r, e, t) { return (e[0] - r[0]) * (t[1] - r[1]) - (t[0] - r[0]) * (e[1] - r[1]); } function AS(r) { for (var e = pt(r), t = 0, n = 1, i, a; n < e.length; ) i = a || e[0], a = e[n], t += (a[0] - i[0]) * (a[1] + i[1]), n++; return t > 0; } function bue(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.reverse || !1, n = e.mutate || !1; if (!r) throw new Error(" is required"); if (typeof t != "boolean") throw new Error(" must be a boolean"); if (typeof n != "boolean") throw new Error(" must be a boolean"); n === !1 && (r = da(r)); var i = []; switch (r.type) { case "GeometryCollection": return Bo(r, function(a) { ZC(a, t); }), r; case "FeatureCollection": return Dr(r, function(a) { Dr(ZC(a, t), function(o) { i.push(o); }); }), lt(i); } return ZC(r, t); } function ZC(r, e) { var t = r.type === "Feature" ? r.geometry.type : r.type; switch (t) { case "GeometryCollection": return Bo(r, function(n) { ZC(n, e); }), r; case "LineString": return EB(pt(r), e), r; case "Polygon": return bB(pt(r), e), r; case "MultiLineString": return pt(r).forEach(function(n) { EB(n, e); }), r; case "MultiPolygon": return pt(r).forEach(function(n) { bB(n, e); }), r; case "Point": case "MultiPoint": return r; } } function EB(r, e) { AS(r) === e && r.reverse(); } function bB(r, e) { AS(r[0]) !== e && r[0].reverse(); for (var t = 1; t < r.length; t++) AS(r[t]) === e && r[t].reverse(); } function Tue(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.zProperty || "elevation", n = e.flip, i = e.flags; df(r, "Point", "input must contain Points"); for (var a = Pue(r, n), o = [], s = 0; s < a.length; s++) { for (var u = a[s], l = [], c = 0; c < u.length; c++) { var f = u[c]; f.properties[t] ? l.push(f.properties[t]) : l.push(0), i === !0 && (f.properties.matrixPosition = [s, c]); } o.push(l); } return o; } function Pue(r, e) { var t = {}; Dr(r, function(a) { var o = pt(a)[1]; t[o] || (t[o] = []), t[o].push(a); }); var n = Object.keys(t).map(function(a) { var o = t[a], s = o.sort(function(u, l) { return pt(u)[0] - pt(l)[0]; }); return s; }), i = n.sort(function(a, o) { return e ? pt(a[0])[1] - pt(o[0])[1] : pt(o[0])[1] - pt(a[0])[1]; }); return i; } /*! * @license GNU Affero General Public License. * Copyright (c) 2015, 2015 Ronny Lorenz * v. 1.2.0 * https://github.com/RaumZeit/MarchingSquares.js * * MarchingSquaresJS is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MarchingSquaresJS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * As additional permission under GNU Affero General Public License version 3 * section 7, third-party projects (personal or commercial) may distribute, * include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the * requirement that said third-party project for that reason alone becomes * subject to any requirement of the GNU Affero General Public License version 3. * Any modifications to MarchingSquaresJS, however, must be shared with the public * and made available. * * In summary this: * - allows you to use MarchingSquaresJS at no cost * - allows you to use MarchingSquaresJS for both personal and commercial purposes * - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any * license as long as this license notice is included * - enables you to keep the source code of your program that uses MarchingSquaresJS * undisclosed * - forces you to share any modifications you have made to MarchingSquaresJS, * e.g. bug-fixes * * You should have received a copy of the GNU Affero General Public License * along with MarchingSquaresJS. If not, see . */ var TB = { successCallback: null, verbose: !1, polygons: !1 }, Jh = {}; function Iue(r, e, t, n) { n = n || {}; for (var i = Object.keys(TB), a = 0; a < i.length; a++) { var o = i[a], s = n[o]; s = typeof s < "u" && s !== null ? s : TB[o], Jh[o] = s; } Jh.verbose && console.log( "MarchingSquaresJS-isoBands: computing isobands for [" + e + ":" + (e + t) + "]" ); var u = sle(r, e, t), l; return Jh.polygons ? (Jh.verbose && console.log( "MarchingSquaresJS-isoBands: returning single polygons for each grid cell" ), l = ple(u)) : (Jh.verbose && console.log( "MarchingSquaresJS-isoBands: returning polygon paths for entire data grid" ), l = ule(u)), typeof Jh.successCallback == "function" && Jh.successCallback(l), l; } var Ta = 64, Ks = 16, Hi = 4, aa = 1, Xt = [], qt = [], Zt = [], Kt = [], Jt = [], Qt = [], er = [], tr = [], rr = [], nr = [], ir = [], ar = [], or = [], sr = [], ur = [], lr = [], cr = [], fr = [], hr = [], pr = [], dr = [], vr = [], gr = [], mr = []; er[85] = nr[85] = -1; tr[85] = ir[85] = 0; rr[85] = ar[85] = 1; hr[85] = vr[85] = 1; pr[85] = gr[85] = 0; dr[85] = mr[85] = 1; Xt[85] = Kt[85] = 0; qt[85] = Jt[85] = -1; Zt[85] = ur[85] = 0; lr[85] = or[85] = 0; cr[85] = sr[85] = 1; Qt[85] = fr[85] = 1; vr[1] = vr[169] = 0; gr[1] = gr[169] = -1; mr[1] = mr[169] = 0; or[1] = or[169] = -1; sr[1] = sr[169] = 0; ur[1] = ur[169] = 0; nr[4] = nr[166] = 0; ir[4] = ir[166] = -1; ar[4] = ar[166] = 1; lr[4] = lr[166] = 1; cr[4] = cr[166] = 0; fr[4] = fr[166] = 0; er[16] = er[154] = 0; tr[16] = tr[154] = 1; rr[16] = rr[154] = 1; Kt[16] = Kt[154] = 1; Jt[16] = Jt[154] = 0; Qt[16] = Qt[154] = 1; hr[64] = hr[106] = 0; pr[64] = pr[106] = 1; dr[64] = dr[106] = 0; Xt[64] = Xt[106] = -1; qt[64] = qt[106] = 0; Zt[64] = Zt[106] = 1; hr[2] = hr[168] = 0; pr[2] = pr[168] = -1; dr[2] = dr[168] = 1; vr[2] = vr[168] = 0; gr[2] = gr[168] = -1; mr[2] = mr[168] = 0; or[2] = or[168] = -1; sr[2] = sr[168] = 0; ur[2] = ur[168] = 0; lr[2] = lr[168] = -1; cr[2] = cr[168] = 0; fr[2] = fr[168] = 1; er[8] = er[162] = 0; tr[8] = tr[162] = -1; rr[8] = rr[162] = 0; nr[8] = nr[162] = 0; ir[8] = ir[162] = -1; ar[8] = ar[162] = 1; or[8] = or[162] = 1; sr[8] = sr[162] = 0; ur[8] = ur[162] = 1; lr[8] = lr[162] = 1; cr[8] = cr[162] = 0; fr[8] = fr[162] = 0; er[32] = er[138] = 0; tr[32] = tr[138] = 1; rr[32] = rr[138] = 1; nr[32] = nr[138] = 0; ir[32] = ir[138] = 1; ar[32] = ar[138] = 0; Xt[32] = Xt[138] = 1; qt[32] = qt[138] = 0; Zt[32] = Zt[138] = 0; Kt[32] = Kt[138] = 1; Jt[32] = Jt[138] = 0; Qt[32] = Qt[138] = 1; vr[128] = vr[42] = 0; gr[128] = gr[42] = 1; mr[128] = mr[42] = 1; hr[128] = hr[42] = 0; pr[128] = pr[42] = 1; dr[128] = dr[42] = 0; Xt[128] = Xt[42] = -1; qt[128] = qt[42] = 0; Zt[128] = Zt[42] = 1; Kt[128] = Kt[42] = -1; Jt[128] = Jt[42] = 0; Qt[128] = Qt[42] = 0; nr[5] = nr[165] = -1; ir[5] = ir[165] = 0; ar[5] = ar[165] = 0; vr[5] = vr[165] = 1; gr[5] = gr[165] = 0; mr[5] = mr[165] = 0; lr[20] = lr[150] = 0; cr[20] = cr[150] = 1; fr[20] = fr[150] = 1; Kt[20] = Kt[150] = 0; Jt[20] = Jt[150] = -1; Qt[20] = Qt[150] = 1; er[80] = er[90] = -1; tr[80] = tr[90] = 0; rr[80] = rr[90] = 1; hr[80] = hr[90] = 1; pr[80] = pr[90] = 0; dr[80] = dr[90] = 1; or[65] = or[105] = 0; sr[65] = sr[105] = 1; ur[65] = ur[105] = 0; Xt[65] = Xt[105] = 0; qt[65] = qt[105] = -1; Zt[65] = Zt[105] = 0; er[160] = er[10] = -1; tr[160] = tr[10] = 0; rr[160] = rr[10] = 1; nr[160] = nr[10] = -1; ir[160] = ir[10] = 0; ar[160] = ar[10] = 0; vr[160] = vr[10] = 1; gr[160] = gr[10] = 0; mr[160] = mr[10] = 0; hr[160] = hr[10] = 1; pr[160] = pr[10] = 0; dr[160] = dr[10] = 1; lr[130] = lr[40] = 0; cr[130] = cr[40] = 1; fr[130] = fr[40] = 1; or[130] = or[40] = 0; sr[130] = sr[40] = 1; ur[130] = ur[40] = 0; Xt[130] = Xt[40] = 0; qt[130] = qt[40] = -1; Zt[130] = Zt[40] = 0; Kt[130] = Kt[40] = 0; Jt[130] = Jt[40] = -1; Qt[130] = Qt[40] = 1; nr[37] = nr[133] = 0; ir[37] = ir[133] = 1; ar[37] = ar[133] = 1; vr[37] = vr[133] = 0; gr[37] = gr[133] = 1; mr[37] = mr[133] = 0; Xt[37] = Xt[133] = -1; qt[37] = qt[133] = 0; Zt[37] = Zt[133] = 0; Kt[37] = Kt[133] = 1; Jt[37] = Jt[133] = 0; Qt[37] = Qt[133] = 0; lr[148] = lr[22] = -1; cr[148] = cr[22] = 0; fr[148] = fr[22] = 0; vr[148] = vr[22] = 0; gr[148] = gr[22] = -1; mr[148] = mr[22] = 1; hr[148] = hr[22] = 0; pr[148] = pr[22] = 1; dr[148] = dr[22] = 1; Kt[148] = Kt[22] = -1; Jt[148] = Jt[22] = 0; Qt[148] = Qt[22] = 1; er[82] = er[88] = 0; tr[82] = tr[88] = -1; rr[82] = rr[88] = 1; lr[82] = lr[88] = 1; cr[82] = cr[88] = 0; fr[82] = fr[88] = 1; or[82] = or[88] = -1; sr[82] = sr[88] = 0; ur[82] = ur[88] = 1; hr[82] = hr[88] = 0; pr[82] = pr[88] = -1; dr[82] = dr[88] = 0; er[73] = er[97] = 0; tr[73] = tr[97] = 1; rr[73] = rr[97] = 0; nr[73] = nr[97] = 0; ir[73] = ir[97] = -1; ar[73] = ar[97] = 0; or[73] = or[97] = 1; sr[73] = sr[97] = 0; ur[73] = ur[97] = 0; Xt[73] = Xt[97] = 1; qt[73] = qt[97] = 0; Zt[73] = Zt[97] = 1; er[145] = er[25] = 0; tr[145] = tr[25] = -1; rr[145] = rr[25] = 0; or[145] = or[25] = 1; sr[145] = sr[25] = 0; ur[145] = ur[25] = 1; vr[145] = vr[25] = 0; gr[145] = gr[25] = 1; mr[145] = mr[25] = 1; Kt[145] = Kt[25] = -1; Jt[145] = Jt[25] = 0; Qt[145] = Qt[25] = 0; nr[70] = nr[100] = 0; ir[70] = ir[100] = 1; ar[70] = ar[100] = 0; lr[70] = lr[100] = -1; cr[70] = cr[100] = 0; fr[70] = fr[100] = 1; hr[70] = hr[100] = 0; pr[70] = pr[100] = -1; dr[70] = dr[100] = 1; Xt[70] = Xt[100] = 1; qt[70] = qt[100] = 0; Zt[70] = Zt[100] = 0; nr[101] = nr[69] = 0; ir[101] = ir[69] = 1; ar[101] = ar[69] = 0; Xt[101] = Xt[69] = 1; qt[101] = qt[69] = 0; Zt[101] = Zt[69] = 0; vr[149] = vr[21] = 0; gr[149] = gr[21] = 1; mr[149] = mr[21] = 1; Kt[149] = Kt[21] = -1; Jt[149] = Jt[21] = 0; Qt[149] = Qt[21] = 0; lr[86] = lr[84] = -1; cr[86] = cr[84] = 0; fr[86] = fr[84] = 1; hr[86] = hr[84] = 0; pr[86] = pr[84] = -1; dr[86] = dr[84] = 1; er[89] = er[81] = 0; tr[89] = tr[81] = -1; rr[89] = rr[81] = 0; or[89] = or[81] = 1; sr[89] = sr[81] = 0; ur[89] = ur[81] = 1; er[96] = er[74] = 0; tr[96] = tr[74] = 1; rr[96] = rr[74] = 0; nr[96] = nr[74] = -1; ir[96] = ir[74] = 0; ar[96] = ar[74] = 1; hr[96] = hr[74] = 1; pr[96] = pr[74] = 0; dr[96] = dr[74] = 0; Xt[96] = Xt[74] = 1; qt[96] = qt[74] = 0; Zt[96] = Zt[74] = 1; er[24] = er[146] = 0; tr[24] = tr[146] = -1; rr[24] = rr[146] = 1; lr[24] = lr[146] = 1; cr[24] = cr[146] = 0; fr[24] = fr[146] = 1; or[24] = or[146] = 0; sr[24] = sr[146] = 1; ur[24] = ur[146] = 1; Kt[24] = Kt[146] = 0; Jt[24] = Jt[146] = -1; Qt[24] = Qt[146] = 0; nr[6] = nr[164] = -1; ir[6] = ir[164] = 0; ar[6] = ar[164] = 1; lr[6] = lr[164] = -1; cr[6] = cr[164] = 0; fr[6] = fr[164] = 0; vr[6] = vr[164] = 0; gr[6] = gr[164] = -1; mr[6] = mr[164] = 1; hr[6] = hr[164] = 1; pr[6] = pr[164] = 0; dr[6] = dr[164] = 0; or[129] = or[41] = 0; sr[129] = sr[41] = 1; ur[129] = ur[41] = 1; vr[129] = vr[41] = 0; gr[129] = gr[41] = 1; mr[129] = mr[41] = 0; Xt[129] = Xt[41] = -1; qt[129] = qt[41] = 0; Zt[129] = Zt[41] = 0; Kt[129] = Kt[41] = 0; Jt[129] = Jt[41] = -1; Qt[129] = Qt[41] = 0; lr[66] = lr[104] = 0; cr[66] = cr[104] = 1; fr[66] = fr[104] = 0; or[66] = or[104] = -1; sr[66] = sr[104] = 0; ur[66] = ur[104] = 1; hr[66] = hr[104] = 0; pr[66] = pr[104] = -1; dr[66] = dr[104] = 0; Xt[66] = Xt[104] = 0; qt[66] = qt[104] = -1; Zt[66] = Zt[104] = 1; er[144] = er[26] = -1; tr[144] = tr[26] = 0; rr[144] = rr[26] = 0; vr[144] = vr[26] = 1; gr[144] = gr[26] = 0; mr[144] = mr[26] = 1; hr[144] = hr[26] = 0; pr[144] = pr[26] = 1; dr[144] = dr[26] = 1; Kt[144] = Kt[26] = -1; Jt[144] = Jt[26] = 0; Qt[144] = Qt[26] = 1; nr[36] = nr[134] = 0; ir[36] = ir[134] = 1; ar[36] = ar[134] = 1; lr[36] = lr[134] = 0; cr[36] = cr[134] = 1; fr[36] = fr[134] = 0; Xt[36] = Xt[134] = 0; qt[36] = qt[134] = -1; Zt[36] = Zt[134] = 1; Kt[36] = Kt[134] = 1; Jt[36] = Jt[134] = 0; Qt[36] = Qt[134] = 0; er[9] = er[161] = -1; tr[9] = tr[161] = 0; rr[9] = rr[161] = 0; nr[9] = nr[161] = 0; ir[9] = ir[161] = -1; ar[9] = ar[161] = 0; or[9] = or[161] = 1; sr[9] = sr[161] = 0; ur[9] = ur[161] = 0; vr[9] = vr[161] = 1; gr[9] = gr[161] = 0; mr[9] = mr[161] = 1; er[136] = 0; tr[136] = 1; rr[136] = 1; nr[136] = 0; ir[136] = 1; ar[136] = 0; lr[136] = -1; cr[136] = 0; fr[136] = 1; or[136] = -1; sr[136] = 0; ur[136] = 0; vr[136] = 0; gr[136] = -1; mr[136] = 0; hr[136] = 0; pr[136] = -1; dr[136] = 1; Xt[136] = 1; qt[136] = 0; Zt[136] = 0; Kt[136] = 1; Jt[136] = 0; Qt[136] = 1; er[34] = 0; tr[34] = -1; rr[34] = 0; nr[34] = 0; ir[34] = -1; ar[34] = 1; lr[34] = 1; cr[34] = 0; fr[34] = 0; or[34] = 1; sr[34] = 0; ur[34] = 1; vr[34] = 0; gr[34] = 1; mr[34] = 1; hr[34] = 0; pr[34] = 1; dr[34] = 0; Xt[34] = -1; qt[34] = 0; Zt[34] = 1; Kt[34] = -1; Jt[34] = 0; Qt[34] = 0; er[35] = 0; tr[35] = 1; rr[35] = 1; nr[35] = 0; ir[35] = -1; ar[35] = 1; lr[35] = 1; cr[35] = 0; fr[35] = 0; or[35] = -1; sr[35] = 0; ur[35] = 0; vr[35] = 0; gr[35] = -1; mr[35] = 0; hr[35] = 0; pr[35] = 1; dr[35] = 0; Xt[35] = -1; qt[35] = 0; Zt[35] = 1; Kt[35] = 1; Jt[35] = 0; Qt[35] = 1; er[153] = 0; tr[153] = 1; rr[153] = 1; or[153] = -1; sr[153] = 0; ur[153] = 0; vr[153] = 0; gr[153] = -1; mr[153] = 0; Kt[153] = 1; Jt[153] = 0; Qt[153] = 1; nr[102] = 0; ir[102] = -1; ar[102] = 1; lr[102] = 1; cr[102] = 0; fr[102] = 0; hr[102] = 0; pr[102] = 1; dr[102] = 0; Xt[102] = -1; qt[102] = 0; Zt[102] = 1; er[155] = 0; tr[155] = -1; rr[155] = 0; or[155] = 1; sr[155] = 0; ur[155] = 1; vr[155] = 0; gr[155] = 1; mr[155] = 1; Kt[155] = -1; Jt[155] = 0; Qt[155] = 0; nr[103] = 0; ir[103] = 1; ar[103] = 0; lr[103] = -1; cr[103] = 0; fr[103] = 1; hr[103] = 0; pr[103] = -1; dr[103] = 1; Xt[103] = 1; qt[103] = 0; Zt[103] = 0; er[152] = 0; tr[152] = 1; rr[152] = 1; lr[152] = -1; cr[152] = 0; fr[152] = 1; or[152] = -1; sr[152] = 0; ur[152] = 0; vr[152] = 0; gr[152] = -1; mr[152] = 0; hr[152] = 0; pr[152] = -1; dr[152] = 1; Kt[152] = 1; Jt[152] = 0; Qt[152] = 1; er[156] = 0; tr[156] = -1; rr[156] = 1; lr[156] = 1; cr[156] = 0; fr[156] = 1; or[156] = -1; sr[156] = 0; ur[156] = 0; vr[156] = 0; gr[156] = -1; mr[156] = 0; hr[156] = 0; pr[156] = 1; dr[156] = 1; Kt[156] = -1; Jt[156] = 0; Qt[156] = 1; er[137] = 0; tr[137] = 1; rr[137] = 1; nr[137] = 0; ir[137] = 1; ar[137] = 0; or[137] = -1; sr[137] = 0; ur[137] = 0; vr[137] = 0; gr[137] = -1; mr[137] = 0; Xt[137] = 1; qt[137] = 0; Zt[137] = 0; Kt[137] = 1; Jt[137] = 0; Qt[137] = 1; er[139] = 0; tr[139] = 1; rr[139] = 1; nr[139] = 0; ir[139] = -1; ar[139] = 0; or[139] = 1; sr[139] = 0; ur[139] = 0; vr[139] = 0; gr[139] = 1; mr[139] = 0; Xt[139] = -1; qt[139] = 0; Zt[139] = 0; Kt[139] = 1; Jt[139] = 0; Qt[139] = 1; er[98] = 0; tr[98] = -1; rr[98] = 0; nr[98] = 0; ir[98] = -1; ar[98] = 1; lr[98] = 1; cr[98] = 0; fr[98] = 0; or[98] = 1; sr[98] = 0; ur[98] = 1; hr[98] = 0; pr[98] = 1; dr[98] = 0; Xt[98] = -1; qt[98] = 0; Zt[98] = 1; er[99] = 0; tr[99] = 1; rr[99] = 0; nr[99] = 0; ir[99] = -1; ar[99] = 1; lr[99] = 1; cr[99] = 0; fr[99] = 0; or[99] = -1; sr[99] = 0; ur[99] = 1; hr[99] = 0; pr[99] = -1; dr[99] = 0; Xt[99] = 1; qt[99] = 0; Zt[99] = 1; nr[38] = 0; ir[38] = -1; ar[38] = 1; lr[38] = 1; cr[38] = 0; fr[38] = 0; vr[38] = 0; gr[38] = 1; mr[38] = 1; hr[38] = 0; pr[38] = 1; dr[38] = 0; Xt[38] = -1; qt[38] = 0; Zt[38] = 1; Kt[38] = -1; Jt[38] = 0; Qt[38] = 0; nr[39] = 0; ir[39] = 1; ar[39] = 1; lr[39] = -1; cr[39] = 0; fr[39] = 0; vr[39] = 0; gr[39] = -1; mr[39] = 1; hr[39] = 0; pr[39] = 1; dr[39] = 0; Xt[39] = -1; qt[39] = 0; Zt[39] = 1; Kt[39] = 1; Jt[39] = 0; Qt[39] = 0; var $O = function(r) { return [ [r.bottomleft, 0], [0, 0], [0, r.leftbottom] ]; }, HO = function(r) { return [ [1, r.rightbottom], [1, 0], [r.bottomright, 0] ]; }, UO = function(r) { return [ [r.topright, 1], [1, 1], [1, r.righttop] ]; }, WO = function(r) { return [ [0, r.lefttop], [0, 1], [r.topleft, 1] ]; }, jO = function(r) { return [ [r.bottomright, 0], [r.bottomleft, 0], [0, r.leftbottom], [0, r.lefttop] ]; }, YO = function(r) { return [ [r.bottomright, 0], [r.bottomleft, 0], [1, r.righttop], [1, r.rightbottom] ]; }, XO = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [r.topleft, 1], [r.topright, 1] ]; }, qO = function(r) { return [ [0, r.leftbottom], [0, r.lefttop], [r.topleft, 1], [r.topright, 1] ]; }, Aue = function(r) { return [ [0, 0], [0, r.leftbottom], [1, r.rightbottom], [1, 0] ]; }, Lue = function(r) { return [ [1, 0], [r.bottomright, 0], [r.topright, 1], [1, 1] ]; }, Due = function(r) { return [ [1, 1], [1, r.righttop], [0, r.lefttop], [0, 1] ]; }, Mue = function(r) { return [ [r.bottomleft, 0], [0, 0], [0, 1], [r.topleft, 1] ]; }, Oue = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [0, r.leftbottom], [0, r.lefttop] ]; }, Rue = function(r) { return [ [r.topleft, 1], [r.topright, 1], [r.bottomright, 0], [r.bottomleft, 0] ]; }, Nue = function() { return [ [0, 0], [0, 1], [1, 1], [1, 0] ]; }, Fue = function(r) { return [ [1, r.rightbottom], [1, 0], [0, 0], [0, 1], [r.topleft, 1] ]; }, Bue = function(r) { return [ [r.topright, 1], [1, 1], [1, 0], [0, 0], [0, r.leftbottom] ]; }, kue = function(r) { return [ [1, 0], [r.bottomright, 0], [0, r.lefttop], [0, 1], [1, 1] ]; }, Vue = function(r) { return [ [1, 1], [1, r.righttop], [r.bottomleft, 0], [0, 0], [0, 1] ]; }, Gue = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [0, r.lefttop], [0, 1], [r.topleft, 1] ]; }, zue = function(r) { return [ [1, 1], [1, r.righttop], [r.bottomright, 0], [r.bottomleft, 0], [r.topright, 1] ]; }, $ue = function(r) { return [ [1, r.rightbottom], [1, 0], [r.bottomright, 0], [0, r.leftbottom], [0, r.lefttop] ]; }, Hue = function(r) { return [ [r.topright, 1], [r.bottomleft, 0], [0, 0], [0, r.leftbottom], [r.topleft, 1] ]; }, Uue = function(r) { return [ [r.bottomright, 0], [r.bottomleft, 0], [0, r.lefttop], [0, 1], [r.topleft, 1] ]; }, Wue = function(r) { return [ [1, 1], [1, r.righttop], [0, r.leftbottom], [0, r.lefttop], [r.topright, 1] ]; }, jue = function(r) { return [ [1, r.rightbottom], [1, 0], [r.bottomright, 0], [r.topleft, 1], [r.topright, 1] ]; }, Yue = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [r.bottomleft, 0], [0, 0], [0, r.leftbottom] ]; }, Xue = function(r) { return [ [1, r.rightbottom], [1, 0], [0, 0], [0, r.leftbottom], [r.topleft, 1], [r.topright, 1] ]; }, que = function(r) { return [ [1, 1], [1, 0], [r.bottomright, 0], [0, r.leftbottom], [0, r.lefttop], [r.topright, 1] ]; }, Zue = function(r) { return [ [1, 1], [1, r.righttop], [r.bottomright, 0], [r.bottomleft, 0], [0, r.lefttop], [0, 1] ]; }, Kue = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [r.bottomleft, 0], [0, 0], [0, 1], [r.topleft, 1] ]; }, Jue = function(r) { return [ [1, 1], [1, r.righttop], [r.bottomleft, 0], [0, 0], [0, r.leftbottom], [r.topright, 1] ]; }, Que = function(r) { return [ [1, r.rightbottom], [1, 0], [r.bottomright, 0], [0, r.lefttop], [0, 1], [r.topleft, 1] ]; }, ele = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [r.bottomright, 0], [r.bottomleft, 0], [0, r.leftbottom], [0, r.lefttop], [r.topleft, 1], [r.topright, 1] ]; }, tle = function(r) { return [ [1, 1], [1, r.righttop], [r.bottomleft, 0], [0, 0], [0, r.leftbottom], [r.topright, 1] ]; }, rle = function(r) { return [ [1, r.rightbottom], [1, 0], [r.bottomright, 0], [0, r.lefttop], [0, 1], [r.topleft, 1] ]; }, nle = function(r) { return [ [1, 1], [1, r.righttop], [r.bottomright, 0], [r.bottomleft, 0], [0, r.leftbottom], [0, r.lefttop], [r.topright, 1] ]; }, ile = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [r.bottomleft, 0], [0, 0], [0, r.leftbottom], [r.topleft, 1], [r.topright, 1] ]; }, ale = function(r) { return [ [1, r.righttop], [1, r.rightbottom], [r.bottomright, 0], [r.bottomleft, 0], [0, r.lefttop], [0, 1], [r.topleft, 1] ]; }, ole = function(r) { return [ [1, r.rightbottom], [1, 0], [r.bottomright, 0], [0, r.leftbottom], [0, r.lefttop], [r.topleft, 1], [r.topright, 1] ]; }, He = [], Ge = [], it = [], tt = [], ht = [], ct = [], yr = [], xr = []; tt[1] = ht[1] = 18; tt[169] = ht[169] = 18; it[4] = Ge[4] = 12; it[166] = Ge[166] = 12; He[16] = xr[16] = 4; He[154] = xr[154] = 4; ct[64] = yr[64] = 22; ct[106] = yr[106] = 22; it[2] = ct[2] = 17; tt[2] = ht[2] = 18; it[168] = ct[168] = 17; tt[168] = ht[168] = 18; He[8] = tt[8] = 9; Ge[8] = it[8] = 12; He[162] = tt[162] = 9; Ge[162] = it[162] = 12; He[32] = xr[32] = 4; Ge[32] = yr[32] = 1; He[138] = xr[138] = 4; Ge[138] = yr[138] = 1; ht[128] = xr[128] = 21; ct[128] = yr[128] = 22; ht[42] = xr[42] = 21; ct[42] = yr[42] = 22; Ge[5] = ht[5] = 14; Ge[165] = ht[165] = 14; it[20] = xr[20] = 6; it[150] = xr[150] = 6; He[80] = ct[80] = 11; He[90] = ct[90] = 11; tt[65] = yr[65] = 3; tt[105] = yr[105] = 3; He[160] = ct[160] = 11; Ge[160] = ht[160] = 14; He[10] = ct[10] = 11; Ge[10] = ht[10] = 14; it[130] = xr[130] = 6; tt[130] = yr[130] = 3; it[40] = xr[40] = 6; tt[40] = yr[40] = 3; Ge[101] = yr[101] = 1; Ge[69] = yr[69] = 1; ht[149] = xr[149] = 21; ht[21] = xr[21] = 21; it[86] = ct[86] = 17; it[84] = ct[84] = 17; He[89] = tt[89] = 9; He[81] = tt[81] = 9; He[96] = yr[96] = 0; Ge[96] = ct[96] = 15; He[74] = yr[74] = 0; Ge[74] = ct[74] = 15; He[24] = it[24] = 8; tt[24] = xr[24] = 7; He[146] = it[146] = 8; tt[146] = xr[146] = 7; Ge[6] = ct[6] = 15; it[6] = ht[6] = 16; Ge[164] = ct[164] = 15; it[164] = ht[164] = 16; tt[129] = xr[129] = 7; ht[129] = yr[129] = 20; tt[41] = xr[41] = 7; ht[41] = yr[41] = 20; it[66] = yr[66] = 2; tt[66] = ct[66] = 19; it[104] = yr[104] = 2; tt[104] = ct[104] = 19; He[144] = ht[144] = 10; ct[144] = xr[144] = 23; He[26] = ht[26] = 10; ct[26] = xr[26] = 23; Ge[36] = xr[36] = 5; it[36] = yr[36] = 2; Ge[134] = xr[134] = 5; it[134] = yr[134] = 2; He[9] = ht[9] = 10; Ge[9] = tt[9] = 13; He[161] = ht[161] = 10; Ge[161] = tt[161] = 13; Ge[37] = xr[37] = 5; ht[37] = yr[37] = 20; Ge[133] = xr[133] = 5; ht[133] = yr[133] = 20; it[148] = ht[148] = 16; ct[148] = xr[148] = 23; it[22] = ht[22] = 16; ct[22] = xr[22] = 23; He[82] = it[82] = 8; tt[82] = ct[82] = 19; He[88] = it[88] = 8; tt[88] = ct[88] = 19; He[73] = yr[73] = 0; Ge[73] = tt[73] = 13; He[97] = yr[97] = 0; Ge[97] = tt[97] = 13; He[145] = tt[145] = 9; ht[145] = xr[145] = 21; He[25] = tt[25] = 9; ht[25] = xr[25] = 21; Ge[70] = yr[70] = 1; it[70] = ct[70] = 17; Ge[100] = yr[100] = 1; it[100] = ct[100] = 17; He[34] = tt[34] = 9; Ge[34] = it[34] = 12; ht[34] = xr[34] = 21; ct[34] = yr[34] = 22; He[136] = xr[136] = 4; Ge[136] = yr[136] = 1; it[136] = ct[136] = 17; tt[136] = ht[136] = 18; He[35] = xr[35] = 4; Ge[35] = it[35] = 12; tt[35] = ht[35] = 18; ct[35] = yr[35] = 22; He[153] = xr[153] = 4; tt[153] = ht[153] = 18; Ge[102] = it[102] = 12; ct[102] = yr[102] = 22; He[155] = tt[155] = 9; ht[155] = xr[155] = 23; Ge[103] = yr[103] = 1; it[103] = ct[103] = 17; He[152] = xr[152] = 4; it[152] = ct[152] = 17; tt[152] = ht[152] = 18; He[156] = it[156] = 8; tt[156] = ht[156] = 18; ct[156] = xr[156] = 23; He[137] = xr[137] = 4; Ge[137] = yr[137] = 1; tt[137] = ht[137] = 18; He[139] = xr[139] = 4; Ge[139] = tt[139] = 13; ht[139] = yr[139] = 20; He[98] = tt[98] = 9; Ge[98] = it[98] = 12; ct[98] = yr[98] = 22; He[99] = yr[99] = 0; Ge[99] = it[99] = 12; tt[99] = ct[99] = 19; Ge[38] = it[38] = 12; ht[38] = xr[38] = 21; ct[38] = yr[38] = 22; Ge[39] = xr[39] = 5; it[39] = ht[39] = 16; ct[39] = yr[39] = 22; var Fe = []; Fe[1] = Fe[169] = $O; Fe[4] = Fe[166] = HO; Fe[16] = Fe[154] = UO; Fe[64] = Fe[106] = WO; Fe[168] = Fe[2] = jO; Fe[162] = Fe[8] = YO; Fe[138] = Fe[32] = XO; Fe[42] = Fe[128] = qO; Fe[5] = Fe[165] = Aue; Fe[20] = Fe[150] = Lue; Fe[80] = Fe[90] = Due; Fe[65] = Fe[105] = Mue; Fe[160] = Fe[10] = Oue; Fe[130] = Fe[40] = Rue; Fe[85] = Nue; Fe[101] = Fe[69] = Fue; Fe[149] = Fe[21] = Bue; Fe[86] = Fe[84] = kue; Fe[89] = Fe[81] = Vue; Fe[96] = Fe[74] = Gue; Fe[24] = Fe[146] = zue; Fe[6] = Fe[164] = $ue; Fe[129] = Fe[41] = Hue; Fe[66] = Fe[104] = Uue; Fe[144] = Fe[26] = Wue; Fe[36] = Fe[134] = jue; Fe[9] = Fe[161] = Yue; Fe[37] = Fe[133] = Xue; Fe[148] = Fe[22] = que; Fe[82] = Fe[88] = Zue; Fe[73] = Fe[97] = Kue; Fe[145] = Fe[25] = Jue; Fe[70] = Fe[100] = Que; Fe[34] = function(r) { return [qO(r), YO(r)]; }; Fe[35] = ele; Fe[136] = function(r) { return [XO(r), jO(r)]; }; Fe[153] = function(r) { return [UO(r), $O(r)]; }; Fe[102] = function(r) { return [HO(r), WO(r)]; }; Fe[155] = tle; Fe[103] = rle; Fe[152] = function(r) { return [UO(r), jO(r)]; }; Fe[156] = nle; Fe[137] = function(r) { return [XO(r), $O(r)]; }; Fe[139] = ile; Fe[98] = function(r) { return [YO(r), WO(r)]; }; Fe[99] = ale; Fe[38] = function(r) { return [HO(r), qO(r)]; }; Fe[39] = ole; function R(r, e, t) { return (r - e) / (t - e); } function ZP(r) { return r.constructor.toString().indexOf("Array") > -1; } function sle(r, e, t) { for (var n = r.length - 1, i = r[0].length - 1, a = { rows: n, cols: i, cells: [] }, o = e + Math.abs(t), s = 0; s < n; ++s) { a.cells[s] = []; for (var u = 0; u < i; ++u) { var l = 0, c = r[s + 1][u], f = r[s + 1][u + 1], h = r[s][u + 1], p = r[s][u]; if (!(isNaN(c) || isNaN(f) || isNaN(h) || isNaN(p))) { l |= c < e ? 0 : c > o ? 128 : 64, l |= f < e ? 0 : f > o ? 32 : 16, l |= h < e ? 0 : h > o ? 8 : 4, l |= p < e ? 0 : p > o ? 2 : 1; var d = +l, v = 0; if (l === 17 || l === 18 || l === 33 || l === 34 || l === 38 || l === 68 || l === 72 || l === 98 || l === 102 || l === 132 || l === 136 || l === 137 || l === 152 || l === 153) { var g = (c + f + h + p) / 4; v = g > o ? 2 : g < e ? 0 : 1, l === 34 ? v === 1 ? l = 35 : v === 0 && (l = 136) : l === 136 ? v === 1 ? (l = 35, v = 4) : v === 0 && (l = 34) : l === 17 ? v === 1 ? (l = 155, v = 4) : v === 0 && (l = 153) : l === 68 ? v === 1 ? (l = 103, v = 4) : v === 0 && (l = 102) : l === 153 ? v === 1 && (l = 155) : l === 102 ? v === 1 && (l = 103) : l === 152 ? v < 2 && (l = 156, v = 1) : l === 137 ? v < 2 && (l = 139, v = 1) : l === 98 ? v < 2 && (l = 99, v = 1) : l === 38 ? v < 2 && (l = 39, v = 1) : l === 18 ? v > 0 ? (l = 156, v = 4) : l = 152 : l === 33 ? v > 0 ? (l = 139, v = 4) : l = 137 : l === 72 ? v > 0 ? (l = 99, v = 4) : l = 98 : l === 132 && (v > 0 ? (l = 39, v = 4) : l = 38); } if (l != 0 && l != 170) { var m, y, _, w, x, C, S, b; m = y = _ = w = x = C = S = b = 0.5; var E = []; l === 1 ? (_ = 1 - R(e, h, p), b = 1 - R(e, c, p), E.push(tt[l])) : l === 169 ? (_ = R(o, p, h), b = R(o, p, c), E.push(tt[l])) : l === 4 ? (C = 1 - R(e, f, h), w = R(e, p, h), E.push(Ge[l])) : l === 166 ? (C = R(o, h, f), w = 1 - R(o, h, p), E.push(Ge[l])) : l === 16 ? (x = R(e, h, f), y = R(e, c, f), E.push(He[l])) : l === 154 ? (x = 1 - R(o, f, h), y = 1 - R(o, f, c), E.push(He[l])) : l === 64 ? (S = R(e, p, c), m = 1 - R(e, f, c), E.push(ct[l])) : l === 106 ? (S = 1 - R(o, c, p), m = R(o, c, f), E.push(ct[l])) : l === 168 ? (w = R(o, p, h), _ = R(e, p, h), b = R(e, p, c), S = R(o, p, c), E.push(it[l]), E.push(tt[l])) : l === 2 ? (w = 1 - R(e, h, p), _ = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), E.push(it[l]), E.push(tt[l])) : l === 162 ? (x = R(o, h, f), C = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), E.push(it[l]), E.push(tt[l])) : l === 8 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), E.push(He[l]), E.push(Ge[l])) : l === 138 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), m = 1 - R(o, f, c), y = 1 - R(e, f, c), E.push(He[l]), E.push(Ge[l])) : l === 32 ? (x = R(o, h, f), C = R(e, h, f), m = R(e, c, f), y = R(o, c, f), E.push(He[l]), E.push(Ge[l])) : l === 42 ? (b = 1 - R(o, c, p), S = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f), E.push(ht[l]), E.push(ct[l])) : l === 128 && (b = R(e, p, c), S = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c), E.push(ht[l]), E.push(ct[l])), l === 5 ? (C = 1 - R(e, f, h), b = 1 - R(e, c, p), E.push(Ge[l])) : l === 165 ? (C = R(o, h, f), b = R(o, p, c), E.push(Ge[l])) : l === 20 ? (w = R(e, p, h), y = R(e, c, f), E.push(it[l])) : l === 150 ? (w = 1 - R(o, h, p), y = 1 - R(o, f, c), E.push(it[l])) : l === 80 ? (x = R(e, h, f), S = R(e, p, c), E.push(He[l])) : l === 90 ? (x = 1 - R(o, f, h), S = 1 - R(o, c, p), E.push(He[l])) : l === 65 ? (_ = 1 - R(e, h, p), m = 1 - R(e, f, c), E.push(tt[l])) : l === 105 ? (_ = R(o, p, h), m = R(o, c, f), E.push(tt[l])) : l === 160 ? (x = R(o, h, f), C = R(e, h, f), b = R(e, p, c), S = R(o, p, c), E.push(He[l]), E.push(Ge[l])) : l === 10 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), b = 1 - R(o, c, p), S = 1 - R(e, c, p), E.push(He[l]), E.push(Ge[l])) : l === 130 ? (w = 1 - R(e, h, p), _ = 1 - R(o, h, p), m = 1 - R(o, f, c), y = 1 - R(e, f, c), E.push(it[l]), E.push(tt[l])) : l === 40 ? (w = R(o, p, h), _ = R(e, p, h), m = R(e, c, f), y = R(o, c, f), E.push(it[l]), E.push(tt[l])) : l === 101 ? (C = R(o, h, f), m = R(o, c, f), E.push(Ge[l])) : l === 69 ? (C = 1 - R(e, f, h), m = 1 - R(e, f, c), E.push(Ge[l])) : l === 149 ? (b = R(o, p, c), y = 1 - R(o, f, c), E.push(ht[l])) : l === 21 ? (b = 1 - R(e, c, p), y = R(e, c, f), E.push(ht[l])) : l === 86 ? (w = 1 - R(o, h, p), S = 1 - R(o, c, p), E.push(it[l])) : l === 84 ? (w = R(e, p, h), S = R(e, p, c), E.push(it[l])) : l === 89 ? (x = 1 - R(o, f, h), _ = R(o, p, h), E.push(tt[l])) : l === 81 ? (x = R(e, h, f), _ = 1 - R(e, h, p), E.push(tt[l])) : l === 96 ? (x = R(o, h, f), C = R(e, h, f), S = R(e, p, c), m = R(o, c, f), E.push(He[l]), E.push(Ge[l])) : l === 74 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), S = 1 - R(o, c, p), m = 1 - R(e, f, c), E.push(He[l]), E.push(Ge[l])) : l === 24 ? (x = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), y = R(e, c, f), E.push(He[l]), E.push(tt[l])) : l === 146 ? (x = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), y = 1 - R(o, f, c), E.push(He[l]), E.push(tt[l])) : l === 6 ? (C = 1 - R(e, f, h), w = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), E.push(Ge[l]), E.push(it[l])) : l === 164 ? (C = R(o, h, f), w = R(e, p, h), b = R(e, p, c), S = R(o, p, c), E.push(Ge[l]), E.push(it[l])) : l === 129 ? (_ = 1 - R(e, h, p), b = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c), E.push(tt[l]), E.push(ht[l])) : l === 41 ? (_ = R(o, p, h), b = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f), E.push(tt[l]), E.push(ht[l])) : l === 66 ? (w = 1 - R(e, h, p), _ = 1 - R(o, h, p), S = 1 - R(o, c, p), m = 1 - R(e, f, c), E.push(it[l]), E.push(tt[l])) : l === 104 ? (w = R(o, p, h), _ = R(e, p, h), S = R(e, p, c), m = R(o, c, f), E.push(tt[l]), E.push(yr[l])) : l === 144 ? (x = R(e, h, f), b = R(e, p, c), S = R(o, p, c), y = 1 - R(o, f, c), E.push(He[l]), E.push(ct[l])) : l === 26 ? (x = 1 - R(o, f, h), b = 1 - R(o, c, p), S = 1 - R(e, c, p), y = R(e, c, f), E.push(He[l]), E.push(ct[l])) : l === 36 ? (C = R(o, h, f), w = R(e, p, h), m = R(e, c, f), y = R(o, c, f), E.push(Ge[l]), E.push(it[l])) : l === 134 ? (C = 1 - R(e, f, h), w = 1 - R(o, h, p), m = 1 - R(o, f, c), y = 1 - R(e, f, c), E.push(Ge[l]), E.push(it[l])) : l === 9 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), _ = R(o, p, h), b = 1 - R(e, c, p), E.push(He[l]), E.push(Ge[l])) : l === 161 ? (x = R(o, h, f), C = R(e, h, f), _ = 1 - R(e, h, p), b = R(o, p, c), E.push(He[l]), E.push(Ge[l])) : l === 37 ? (C = R(o, h, f), b = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f), E.push(Ge[l]), E.push(ht[l])) : l === 133 ? (C = 1 - R(e, f, h), b = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c), E.push(Ge[l]), E.push(ht[l])) : l === 148 ? (w = R(e, p, h), b = R(e, p, c), S = R(o, p, c), y = 1 - R(o, f, c), E.push(it[l]), E.push(ct[l])) : l === 22 ? (w = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), y = R(e, c, f), E.push(it[l]), E.push(ct[l])) : l === 82 ? (x = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), S = 1 - R(o, c, p), E.push(He[l]), E.push(tt[l])) : l === 88 ? (x = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), S = R(e, p, c), E.push(He[l]), E.push(tt[l])) : l === 73 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), _ = R(o, p, h), m = 1 - R(e, f, c), E.push(He[l]), E.push(Ge[l])) : l === 97 ? (x = R(o, h, f), C = R(e, h, f), _ = 1 - R(e, h, p), m = R(o, c, f), E.push(He[l]), E.push(Ge[l])) : l === 145 ? (x = R(e, h, f), _ = 1 - R(e, h, p), b = R(o, p, c), y = 1 - R(o, f, c), E.push(He[l]), E.push(ht[l])) : l === 25 ? (x = 1 - R(o, f, h), _ = R(o, p, h), b = 1 - R(e, c, p), y = R(e, c, f), E.push(He[l]), E.push(ht[l])) : l === 70 ? (C = 1 - R(e, f, h), w = 1 - R(o, h, p), S = 1 - R(o, c, p), m = 1 - R(e, f, c), E.push(Ge[l]), E.push(it[l])) : l === 100 ? (C = R(o, h, f), w = R(e, p, h), S = R(e, p, c), m = R(o, c, f), E.push(Ge[l]), E.push(it[l])) : l === 34 ? (v === 0 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), b = R(e, p, c), S = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c)) : (x = R(o, h, f), C = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f)), E.push(He[l]), E.push(Ge[l]), E.push(ht[l]), E.push(ct[l])) : l === 35 ? (v === 4 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), b = R(e, p, c), S = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c)) : (x = R(o, h, f), C = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f)), E.push(He[l]), E.push(Ge[l]), E.push(tt[l]), E.push(ct[l])) : l === 136 ? (v === 0 ? (x = R(o, h, f), C = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f)) : (x = 1 - R(e, f, h), C = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), b = R(e, p, c), S = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c)), E.push(He[l]), E.push(Ge[l]), E.push(ht[l]), E.push(ct[l])) : l === 153 ? (v === 0 ? (x = R(e, h, f), _ = 1 - R(e, h, p), b = 1 - R(e, c, p), y = R(e, c, f)) : (x = 1 - R(o, f, h), _ = R(o, p, h), b = R(o, p, c), y = 1 - R(o, f, c)), E.push(He[l]), E.push(tt[l])) : l === 102 ? (v === 0 ? (C = 1 - R(e, f, h), w = R(e, p, h), S = R(e, p, c), m = 1 - R(e, f, c)) : (C = R(o, h, f), w = 1 - R(o, h, p), S = 1 - R(o, c, p), m = R(o, c, f)), E.push(Ge[l]), E.push(ct[l])) : l === 155 ? (v === 4 ? (x = R(e, h, f), _ = 1 - R(e, h, p), b = 1 - R(e, c, p), y = R(e, c, f)) : (x = 1 - R(o, f, h), _ = R(o, p, h), b = R(o, p, c), y = 1 - R(o, f, c)), E.push(He[l]), E.push(ht[l])) : l === 103 ? (v === 4 ? (C = 1 - R(e, f, h), w = R(e, p, h), S = R(e, p, c), m = 1 - R(e, f, c)) : (C = R(o, h, f), w = 1 - R(o, h, p), S = 1 - R(o, c, p), m = R(o, c, f)), E.push(Ge[l]), E.push(it[l])) : l === 152 ? (v === 0 ? (x = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), y = R(e, c, f)) : (x = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), b = R(e, p, c), S = R(o, p, c), y = 1 - R(o, f, c)), E.push(He[l]), E.push(it[l]), E.push(tt[l])) : l === 156 ? (v === 4 ? (x = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), y = R(e, c, f)) : (x = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), b = R(e, p, c), S = R(o, p, c), y = 1 - R(o, f, c)), E.push(He[l]), E.push(tt[l]), E.push(ct[l])) : l === 137 ? (v === 0 ? (x = R(o, h, f), C = R(e, h, f), _ = 1 - R(e, h, p), b = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f)) : (x = 1 - R(e, f, h), C = 1 - R(o, f, h), _ = R(o, p, h), b = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c)), E.push(He[l]), E.push(Ge[l]), E.push(tt[l])) : l === 139 ? (v === 4 ? (x = R(o, h, f), C = R(e, h, f), _ = 1 - R(e, h, p), b = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f)) : (x = 1 - R(e, f, h), C = 1 - R(o, f, h), _ = R(o, p, h), b = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c)), E.push(He[l]), E.push(Ge[l]), E.push(ht[l])) : l === 98 ? (v === 0 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), S = R(e, p, c), m = 1 - R(e, f, c)) : (x = R(o, h, f), C = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), S = 1 - R(o, c, p), m = R(o, c, f)), E.push(He[l]), E.push(Ge[l]), E.push(ct[l])) : l === 99 ? (v === 4 ? (x = 1 - R(e, f, h), C = 1 - R(o, f, h), w = R(o, p, h), _ = R(e, p, h), S = R(e, p, c), m = 1 - R(e, f, c)) : (x = R(o, h, f), C = R(e, h, f), w = 1 - R(e, h, p), _ = 1 - R(o, h, p), S = 1 - R(o, c, p), m = R(o, c, f)), E.push(He[l]), E.push(Ge[l]), E.push(tt[l])) : l === 38 ? (v === 0 ? (C = 1 - R(e, f, h), w = R(e, p, h), b = R(e, p, c), S = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c)) : (C = R(o, h, f), w = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f)), E.push(Ge[l]), E.push(ht[l]), E.push(ct[l])) : l === 39 ? (v === 4 ? (C = 1 - R(e, f, h), w = R(e, p, h), b = R(e, p, c), S = R(o, p, c), m = 1 - R(o, f, c), y = 1 - R(e, f, c)) : (C = R(o, h, f), w = 1 - R(o, h, p), b = 1 - R(o, c, p), S = 1 - R(e, c, p), m = R(e, c, f), y = R(o, c, f)), E.push(Ge[l]), E.push(it[l]), E.push(ct[l])) : l === 85 && (x = 1, C = 0, w = 1, _ = 0, b = 0, S = 1, m = 0, y = 1), (m < 0 || m > 1 || y < 0 || y > 1 || x < 0 || x > 1 || w < 0 || w > 1 || b < 0 || b > 1 || S < 0 || S > 1) && console.log( "MarchingSquaresJS-isoBands: " + l + " " + d + " " + c + "," + f + "," + h + "," + p + " " + v + " " + m + " " + y + " " + x + " " + C + " " + w + " " + _ + " " + b + " " + S ), a.cells[s][u] = { cval: l, cval_real: d, flipped: v, topleft: m, topright: y, righttop: x, rightbottom: C, bottomright: w, bottomleft: _, leftbottom: b, lefttop: S, edges: E }; } } } } return a; } function ule(r) { for (var e = [], t = r.rows, n = r.cols, i = [], a = 0; a < t; a++) for (var o = 0; o < n; o++) if (typeof r.cells[a][o] < "u" && r.cells[a][o].edges.length > 0) { var s = r.cells[a][o], u = fle(s), l = null, c = o, f = a; u !== null && i.push([u.p[0] + c, u.p[1] + f]); do { if (l = hle(r.cells[f][c], u.x, u.y, u.o), l !== null) i.push([l.p[0] + c, l.p[1] + f]), c += l.x, f += l.y, u = l; else break; if (f < 0 || f >= t || c < 0 || c >= n || typeof r.cells[f][c] > "u") { c -= l.x, f -= l.y; var h = lle( r, c, f, l.x, l.y, l.o ); if (h !== null) h.path.forEach(function(p) { i.push(p); }), c = h.i, f = h.j, u = h; else break; } } while (typeof r.cells[f][c] < "u" && r.cells[f][c].edges.length > 0); e.push(i), i = [], r.cells[a][o].edges.length > 0 && o--; } return e; } function lle(r, e, t, n, i, a) { for (var o = r.cells[t][e], s = o.cval_real, u = e + n, l = t + i, c = [], f = !1; !f; ) { if (typeof r.cells[l] > "u" || typeof r.cells[l][u] > "u") if (l -= i, u -= n, o = r.cells[l][u], s = o.cval_real, i === -1) if (a === 0) if (s & aa) c.push([u, l]), n = -1, i = 0, a = 0; else if (s & Hi) c.push([u + 1, l]), n = 1, i = 0, a = 0; else { c.push([u + o.bottomright, l]), n = 0, i = 1, a = 1, f = !0; break; } else if (s & aa) c.push([u, l]), n = -1, i = 0, a = 0; else if (s & Hi) { c.push([u + o.bottomright, l]), n = 0, i = 1, a = 1, f = !0; break; } else { c.push([u + o.bottomleft, l]), n = 0, i = 1, a = 0, f = !0; break; } else if (i === 1) if (a === 0) if (s & Ks) c.push([u + 1, l + 1]), n = 1, i = 0, a = 1; else if (s & Ta) { c.push([u + o.topleft, l + 1]), n = 0, i = -1, a = 0, f = !0; break; } else { c.push([u + o.topright, l + 1]), n = 0, i = -1, a = 1, f = !0; break; } else s & Ks ? (c.push([u + 1, l + 1]), n = 1, i = 0, a = 1) : (c.push([u + 1, l + 1]), n = 1, i = 0, a = 1); else if (n === -1) if (a === 0) if (s & Ta) c.push([u, l + 1]), n = 0, i = 1, a = 0; else if (s & aa) { c.push([u, l + o.leftbottom]), n = 1, i = 0, a = 0, f = !0; break; } else { c.push([u, l + o.lefttop]), n = 1, i = 0, a = 1, f = !0; break; } else if (s & Ta) c.push([u, l + 1]), n = 0, i = 1, a = 0; else { console.log("MarchingSquaresJS-isoBands: wtf"); break; } else if (n === 1) if (a === 0) if (s & Hi) c.push([u + 1, l]), n = 0, i = -1, a = 1; else { c.push([u + 1, l + o.rightbottom]), n = -1, i = 0, a = 0, f = !0; break; } else if (s & Hi) c.push([u + 1, l]), n = 0, i = -1, a = 1; else if (s & Ks) { c.push([u + 1, l + o.righttop]), n = -1, i = 0, a = 1; break; } else { c.push([u + 1, l + o.rightbottom]), n = -1, i = 0, a = 0, f = !0; break; } else { console.log("MarchingSquaresJS-isoBands: we came from nowhere!"); break; } else if (o = r.cells[l][u], s = o.cval_real, n === -1) if (a === 0) if (typeof r.cells[l - 1] < "u" && typeof r.cells[l - 1][u] < "u") n = 0, i = -1, a = 1; else if (s & aa) c.push([u, l]); else { c.push([u + o.bottomright, l]), n = 0, i = 1, a = 1, f = !0; break; } else if (s & Ta) console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!"); else { console.log( "MarchingSquaresJS-isoBands: found entry from top at " + u + "," + l ); break; } else if (n === 1) if (a === 0) { console.log("MarchingSquaresJS-isoBands: wtf"); break; } else if (typeof r.cells[l + 1] < "u" && typeof r.cells[l + 1][u] < "u") n = 0, i = 1, a = 0; else if (s & Ks) c.push([u + 1, l + 1]), n = 1, i = 0, a = 1; else { c.push([u + o.topleft, l + 1]), n = 0, i = -1, a = 0, f = !0; break; } else if (i === -1) if (a === 1) if (typeof r.cells[l][u + 1] < "u") n = 1, i = 0, a = 1; else if (s & Hi) c.push([u + 1, l]), n = 0, i = -1, a = 1; else { c.push([u + 1, l + o.righttop]), n = -1, i = 0, a = 1, f = !0; break; } else { console.log("MarchingSquaresJS-isoBands: wtf"); break; } else if (i === 1) if (a === 0) if (typeof r.cells[l][u - 1] < "u") n = -1, i = 0, a = 0; else if (s & Ta) c.push([u, l + 1]), n = 0, i = 1, a = 0; else { c.push([u, l + o.leftbottom]), n = 1, i = 0, a = 0, f = !0; break; } else { console.log("MarchingSquaresJS-isoBands: wtf"); break; } else { console.log("MarchingSquaresJS-isoBands: where did we came from???"); break; } if (u += n, l += i, u === e && l === t) break; } return { path: c, i: u, j: l, x: n, y: i, o: a }; } function cle(r, e) { delete r.edges[e]; for (var t = e + 1; t < r.edges.length; t++) r.edges[t - 1] = r.edges[t]; r.edges.pop(); } function fle(r) { if (r.edges.length > 0) { var e = r.edges[r.edges.length - 1], t = r.cval_real; switch (e) { case 0: return t & Ks ? { p: [1, r.righttop], x: -1, y: 0, o: 1 } : { p: [r.topleft, 1], x: 0, y: -1, o: 0 }; case 1: return t & Hi ? { p: [r.topleft, 1], x: 0, y: -1, o: 0 } : { p: [1, r.rightbottom], x: -1, y: 0, o: 0 }; case 2: return t & Hi ? { p: [r.bottomright, 0], x: 0, y: 1, o: 1 } : { p: [r.topleft, 1], x: 0, y: -1, o: 0 }; case 3: return t & aa ? { p: [r.topleft, 1], x: 0, y: -1, o: 0 } : { p: [r.bottomleft, 0], x: 0, y: 1, o: 0 }; case 4: return t & Ks ? { p: [1, r.righttop], x: -1, y: 0, o: 1 } : { p: [r.topright, 1], x: 0, y: -1, o: 1 }; case 5: return t & Hi ? { p: [r.topright, 1], x: 0, y: -1, o: 1 } : { p: [1, r.rightbottom], x: -1, y: 0, o: 0 }; case 6: return t & Hi ? { p: [r.bottomright, 0], x: 0, y: 1, o: 1 } : { p: [r.topright, 1], x: 0, y: -1, o: 1 }; case 7: return t & aa ? { p: [r.topright, 1], x: 0, y: -1, o: 1 } : { p: [r.bottomleft, 0], x: 0, y: 1, o: 0 }; case 8: return t & Hi ? { p: [r.bottomright, 0], x: 0, y: 1, o: 1 } : { p: [1, r.righttop], x: -1, y: 0, o: 1 }; case 9: return t & aa ? { p: [1, r.righttop], x: -1, y: 0, o: 1 } : { p: [r.bottomleft, 0], x: 0, y: 1, o: 0 }; case 10: return t & aa ? { p: [0, r.leftbottom], x: 1, y: 0, o: 0 } : { p: [1, r.righttop], x: -1, y: 0, o: 1 }; case 11: return t & Ta ? { p: [1, r.righttop], x: -1, y: 0, o: 1 } : { p: [0, r.lefttop], x: 1, y: 0, o: 1 }; case 12: return t & Hi ? { p: [r.bottomright, 0], x: 0, y: 1, o: 1 } : { p: [1, r.rightbottom], x: -1, y: 0, o: 0 }; case 13: return t & aa ? { p: [1, r.rightbottom], x: -1, y: 0, o: 0 } : { p: [r.bottomleft, 0], x: 0, y: 1, o: 0 }; case 14: return t & aa ? { p: [0, r.leftbottom], x: 1, y: 0, o: 0 } : { p: [1, r.rightbottom], x: -1, y: 0, o: 0 }; case 15: return t & Ta ? { p: [1, r.rightbottom], x: -1, y: 0, o: 0 } : { p: [0, r.lefttop], x: 1, y: 0, o: 1 }; case 16: return t & Hi ? { p: [r.bottomright, 0], x: 0, y: 1, o: 1 } : { p: [0, r.leftbottom], x: 1, y: 0, o: 0 }; case 17: return t & Ta ? { p: [r.bottomright, 0], x: 0, y: 1, o: 1 } : { p: [0, r.lefttop], x: 1, y: 0, o: 1 }; case 18: return t & aa ? { p: [0, r.leftbottom], x: 1, y: 0, o: 0 } : { p: [r.bottomleft, 0], x: 0, y: 1, o: 0 }; case 19: return t & Ta ? { p: [r.bottomleft, 0], x: 0, y: 1, o: 0 } : { p: [0, r.lefttop], x: 1, y: 0, o: 1 }; case 20: return t & Ta ? { p: [r.topleft, 1], x: 0, y: -1, o: 0 } : { p: [0, r.leftbottom], x: 1, y: 0, o: 0 }; case 21: return t & Ks ? { p: [0, r.leftbottom], x: 1, y: 0, o: 0 } : { p: [r.topright, 1], x: 0, y: -1, o: 1 }; case 22: return t & Ta ? { p: [r.topleft, 1], x: 0, y: -1, o: 0 } : { p: [0, r.lefttop], x: 1, y: 0, o: 1 }; case 23: return t & Ks ? { p: [0, r.lefttop], x: 1, y: 0, o: 1 } : { p: [r.topright, 1], x: 0, y: -1, o: 1 }; default: console.log("MarchingSquaresJS-isoBands: edge index out of range!"), console.log(r); break; } } return null; } function hle(r, e, t, n) { var i, a, o, s, u = r.cval, l; switch (e) { case -1: switch (n) { case 0: i = Ge[u], o = nr[u], s = ir[u], l = ar[u]; break; default: i = He[u], o = er[u], s = tr[u], l = rr[u]; break; } break; case 1: switch (n) { case 0: i = ht[u], o = vr[u], s = gr[u], l = mr[u]; break; default: i = ct[u], o = hr[u], s = pr[u], l = dr[u]; break; } break; default: switch (t) { case -1: switch (n) { case 0: i = yr[u], o = Xt[u], s = qt[u], l = Zt[u]; break; default: i = xr[u], o = Kt[u], s = Jt[u], l = Qt[u]; break; } break; case 1: switch (n) { case 0: i = tt[u], o = or[u], s = sr[u], l = ur[u]; break; default: i = it[u], o = lr[u], s = cr[u], l = fr[u]; break; } break; } break; } if (a = r.edges.indexOf(i), typeof r.edges[a] < "u") cle(r, a); else return null; switch (u = r.cval_real, i) { case 0: u & Ks ? (e = r.topleft, t = 1) : (e = 1, t = r.righttop); break; case 1: u & Hi ? (e = 1, t = r.rightbottom) : (e = r.topleft, t = 1); break; case 2: u & Hi ? (e = r.topleft, t = 1) : (e = r.bottomright, t = 0); break; case 3: u & aa ? (e = r.bottomleft, t = 0) : (e = r.topleft, t = 1); break; case 4: u & Ks ? (e = r.topright, t = 1) : (e = 1, t = r.righttop); break; case 5: u & Hi ? (e = 1, t = r.rightbottom) : (e = r.topright, t = 1); break; case 6: u & Hi ? (e = r.topright, t = 1) : (e = r.bottomright, t = 0); break; case 7: u & aa ? (e = r.bottomleft, t = 0) : (e = r.topright, t = 1); break; case 8: u & Hi ? (e = 1, t = r.righttop) : (e = r.bottomright, t = 0); break; case 9: u & aa ? (e = r.bottomleft, t = 0) : (e = 1, t = r.righttop); break; case 10: u & aa ? (e = 1, t = r.righttop) : (e = 0, t = r.leftbottom); break; case 11: u & Ta ? (e = 0, t = r.lefttop) : (e = 1, t = r.righttop); break; case 12: u & Hi ? (e = 1, t = r.rightbottom) : (e = r.bottomright, t = 0); break; case 13: u & aa ? (e = r.bottomleft, t = 0) : (e = 1, t = r.rightbottom); break; case 14: u & aa ? (e = 1, t = r.rightbottom) : (e = 0, t = r.leftbottom); break; case 15: u & Ta ? (e = 0, t = r.lefttop) : (e = 1, t = r.rightbottom); break; case 16: u & Hi ? (e = 0, t = r.leftbottom) : (e = r.bottomright, t = 0); break; case 17: u & Ta ? (e = 0, t = r.lefttop) : (e = r.bottomright, t = 0); break; case 18: u & aa ? (e = r.bottomleft, t = 0) : (e = 0, t = r.leftbottom); break; case 19: u & Ta ? (e = 0, t = r.lefttop) : (e = r.bottomleft, t = 0); break; case 20: u & Ta ? (e = 0, t = r.leftbottom) : (e = r.topleft, t = 1); break; case 21: u & Ks ? (e = r.topright, t = 1) : (e = 0, t = r.leftbottom); break; case 22: u & Ta ? (e = 0, t = r.lefttop) : (e = r.topleft, t = 1); break; case 23: u & Ks ? (e = r.topright, t = 1) : (e = 0, t = r.lefttop); break; default: return console.log("MarchingSquaresJS-isoBands: edge index out of range!"), console.log(r), null; } return (typeof e > "u" || typeof t > "u" || typeof o > "u" || typeof s > "u" || typeof l > "u") && (console.log("MarchingSquaresJS-isoBands: undefined value!"), console.log(r), console.log(e + " " + t + " " + o + " " + s + " " + l)), { p: [e, t], x: o, y: s, o: l }; } function ple(r) { var e = [], t = 0; return r.cells.forEach(function(n, i) { n.forEach(function(a, o) { if (typeof a < "u") { var s = Fe[a.cval](a); typeof s == "object" && ZP(s) ? typeof s[0] == "object" && ZP(s[0]) ? typeof s[0][0] == "object" && ZP(s[0][0]) ? s.forEach(function(u) { u.forEach(function(l) { l[0] += o, l[1] += i; }), e[t++] = u; }) : (s.forEach(function(u) { u[0] += o, u[1] += i; }), e[t++] = s) : console.log( "MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates" ) : console.log( "MarchingSquaresJS-isoBands: bandcell polygon with null coordinates" ); } }); }), e; } function dle(r, e, t) { if (t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.zProperty || "elevation", i = t.commonProperties || {}, a = t.breaksProperties || []; if (df(r, "Point", "Input must contain Points"), !e) throw new Error("breaks is required"); if (!Array.isArray(e)) throw new Error("breaks is not an Array"); if (!$r(i)) throw new Error("commonProperties is not an Object"); if (!Array.isArray(a)) throw new Error("breaksProperties is not an Array"); var o = Tue(r, { zProperty: n, flip: !0 }), s = vle(o, e, n); s = gle(s, o, r); var u = s.map(function(l, c) { if (a[c] && !$r(a[c])) throw new Error("Each mappedProperty is required to be an Object"); var f = TO( {}, i, a[c] ); f[n] = l[n]; var h = Fo(l.groupedRings, f); return h; }); return lt(u); } function vle(r, e, t) { for (var n = [], i = 1; i < e.length; i++) { var a = +e[i - 1], o = +e[i], s = Iue(r, a, o - a), u = mle(s), l = yle(u), c = {}; c.groupedRings = l, c[t] = a + "-" + o, n.push(c); } return n; } function gle(r, e, t) { var n = Bn(t), i = n[2] - n[0], a = n[3] - n[1], o = n[0], s = n[1], u = e[0].length - 1, l = e.length - 1, c = i / u, f = a / l, h = function(p) { p[0] = p[0] * c + o, p[1] = p[1] * f + s; }; return r.forEach(function(p) { p.groupedRings.forEach(function(d) { d.forEach(function(v) { v.forEach(h); }); }); }), r; } function mle(r) { var e = [], t = []; r.forEach(function(i) { var a = kb(Nt([i])); t.push(a), e.push({ ring: i, area: a }); }), t.sort(function(i, a) { return a - i; }); var n = []; return t.forEach(function(i) { for (var a = 0; a < e.length; a++) if (e[a].area === i) { n.push(e[a].ring), e.splice(a, 1); break; } }), n; } function yle(r) { for (var e = r.map(function(u) { return { lrCoordinates: u, grouped: !1 }; }), t = []; !wle(e); ) for (var n = 0; n < e.length; n++) if (!e[n].grouped) { var i = []; i.push(e[n].lrCoordinates), e[n].grouped = !0; for (var a = Nt([e[n].lrCoordinates]), o = n + 1; o < e.length; o++) if (!e[o].grouped) { var s = Nt([e[o].lrCoordinates]); _le(s, a) && (i.push(e[o].lrCoordinates), e[o].grouped = !0); } t.push(i); } return t; } function _le(r, e) { for (var t = Rb(r), n = 0; n < t.features.length; n++) if (!nn(t.features[n], e)) return !1; return !0; } function wle(r) { for (var e = 0; e < r.length; e++) if (r[e].grouped === !1) return !1; return !0; } function PU(r, e, t) { if (t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.pivot, i = t.mutate; if (!r) throw new Error("geojson is required"); if (e == null || isNaN(e)) throw new Error("angle is required"); return e === 0 || (n || (n = wh(r)), (i === !1 || i === void 0) && (r = da(r)), Fn(r, function(a) { var o = xd(n, a), s = o + e, u = Bb(n, a), l = pt(am(n, u, s)); a[0] = l[0], a[1] = l[1]; })), r; } function IU(r, e, t) { if (t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.origin, i = t.mutate; if (!r) throw new Error("geojson required"); if (typeof e != "number" || e === 0) throw new Error("invalid factor"); var a = Array.isArray(n) || typeof n == "object"; return i !== !0 && (r = da(r)), r.type === "FeatureCollection" && !a ? (Dr(r, function(o, s) { r.features[s] = PB(o, e, n); }), r) : PB(r, e, n); } function PB(r, e, t) { var n = po(r) === "Point"; return t = xle(r, t), e === 1 || n || Fn(r, function(i) { var a = Bb(t, i), o = xd(t, i), s = a * e, u = pt(am(t, s, o)); i[0] = u[0], i[1] = u[1], i.length === 3 && (i[2] *= e); }), r; } function xle(r, e) { if (e == null && (e = "centroid"), Array.isArray(e) || typeof e == "object") return qr(e); var t = r.bbox ? r.bbox : Bn(r), n = t[0], i = t[1], a = t[2], o = t[3]; switch (e) { case "sw": case "southwest": case "westsouth": case "bottomleft": return Lt([n, i]); case "se": case "southeast": case "eastsouth": case "bottomright": return Lt([a, i]); case "nw": case "northwest": case "westnorth": case "topleft": return Lt([n, o]); case "ne": case "northeast": case "eastnorth": case "topright": return Lt([a, o]); case "center": return Z1(r); case void 0: case null: case "centroid": return wh(r); default: throw new Error("invalid origin"); } } function Cle(r, e, t, n) { if (n = n || {}, !$r(n)) throw new Error("options is invalid"); var i = n.units, a = n.zTranslation, o = n.mutate; if (!r) throw new Error("geojson is required"); if (e == null || isNaN(e)) throw new Error("distance is required"); if (a && typeof a != "number" && isNaN(a)) throw new Error("zTranslation is not a number"); if (a = a !== void 0 ? a : 0, e === 0 && a === 0) return r; if (t == null || isNaN(t)) throw new Error("direction is required"); return e < 0 && (e = -e, t = t + 180), (o === !1 || o === void 0) && (r = da(r)), Fn(r, function(s) { var u = pt( am(s, e, t, { units: i }) ); s[0] = u[0], s[1] = u[1], a && s.length === 3 && (s[2] += a); }), r; } function LS(r) { var e = r[0], t = r[1]; return [t[0] - e[0], t[1] - e[1]]; } function bD(r, e) { return r[0] * e[1] - e[0] * r[1]; } function Sle(r, e) { return [r[0] + e[0], r[1] + e[1]]; } function Ele(r, e) { return [r[0] - e[0], r[1] - e[1]]; } function ble(r, e) { return [r * e[0], r * e[1]]; } function Tle(r, e) { var t = r[0], n = LS(r), i = e[0], a = LS(e), o = bD(n, a), s = Ele(i, t), u = bD(s, a), l = u / o, c = Sle(t, ble(l, n)); return c; } function Ple(r, e) { var t = LS(r), n = LS(e); return bD(t, n) === 0; } function Ile(r, e) { return Ple(r, e) ? !1 : Tle(r, e); } function Ale(r, e, t) { if (t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.units; if (!r) throw new Error("geojson is required"); if (e == null || isNaN(e)) throw new Error("distance is required"); var i = po(r), a = r.properties; switch (i) { case "LineString": return IB(r, e, n); case "MultiLineString": var o = []; return Yi(r, function(s) { o.push( IB(s, e, n).geometry.coordinates ); }), Hh(o, a); default: throw new Error("geometry " + i + " is not supported"); } } function IB(r, e, t) { var n = [], i = bS(e, t), a = pt(r), o = []; return a.forEach(function(s, u) { if (u !== a.length - 1) { var l = Lle( s, a[u + 1], i ); if (n.push(l), u > 0) { var c = n[u - 1], f = Ile(l, c); f !== !1 && (c[1] = f, l[0] = f), o.push(c[0]), u === a.length - 2 && (o.push(l[0]), o.push(l[1])); } a.length === 2 && (o.push(l[0]), o.push(l[1])); } }), Br(o, r.properties); } function Lle(r, e, t) { var n = Math.sqrt( (r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]) ), i = r[0] + t * (e[1] - r[1]) / n, a = e[0] + t * (e[1] - r[1]) / n, o = r[1] + t * (r[0] - e[0]) / n, s = e[1] + t * (r[0] - e[0]) / n; return [ [i, o], [a, s] ]; } function Dle(r) { return (r > 0) - (r < 0) || +r; } function ZO(r, e, t) { var n = e[0] - r[0], i = e[1] - r[1], a = t[0] - e[0], o = t[1] - e[1]; return Dle(n * o - a * i); } function Mle(r, e) { var t = r.geometry.coordinates[0].map(function(o) { return o[0]; }), n = r.geometry.coordinates[0].map(function(o) { return o[1]; }), i = e.geometry.coordinates[0].map(function(o) { return o[0]; }), a = e.geometry.coordinates[0].map(function(o) { return o[1]; }); return Math.max.apply(null, t) === Math.max.apply(null, i) && Math.max.apply(null, n) === Math.max.apply(null, a) && Math.min.apply(null, t) === Math.min.apply(null, i) && Math.min.apply(null, n) === Math.min.apply(null, a); } function AB(r, e) { return e.geometry.coordinates[0].every(function(t) { return nn(Lt(t), r); }); } function Ole(r, e) { return r[0] === e[0] && r[1] === e[1]; } var Rle = function() { function r(e) { this.id = r.buildId(e), this.coordinates = e, this.innerEdges = [], this.outerEdges = [], this.outerEdgesSorted = !1; } return r.buildId = function(e) { return e.join(","); }, r.prototype.removeInnerEdge = function(e) { this.innerEdges = this.innerEdges.filter(function(t) { return t.from.id !== e.from.id; }); }, r.prototype.removeOuterEdge = function(e) { this.outerEdges = this.outerEdges.filter(function(t) { return t.to.id !== e.to.id; }); }, r.prototype.addOuterEdge = function(e) { this.outerEdges.push(e), this.outerEdgesSorted = !1; }, r.prototype.sortOuterEdges = function() { var e = this; this.outerEdgesSorted || (this.outerEdges.sort(function(t, n) { var i = t.to, a = n.to; if (i.coordinates[0] - e.coordinates[0] >= 0 && a.coordinates[0] - e.coordinates[0] < 0) return 1; if (i.coordinates[0] - e.coordinates[0] < 0 && a.coordinates[0] - e.coordinates[0] >= 0) return -1; if (i.coordinates[0] - e.coordinates[0] === 0 && a.coordinates[0] - e.coordinates[0] === 0) return i.coordinates[1] - e.coordinates[1] >= 0 || a.coordinates[1] - e.coordinates[1] >= 0 ? i.coordinates[1] - a.coordinates[1] : a.coordinates[1] - i.coordinates[1]; var o = ZO(e.coordinates, i.coordinates, a.coordinates); if (o < 0) return 1; if (o > 0) return -1; var s = Math.pow(i.coordinates[0] - e.coordinates[0], 2) + Math.pow(i.coordinates[1] - e.coordinates[1], 2), u = Math.pow(a.coordinates[0] - e.coordinates[0], 2) + Math.pow(a.coordinates[1] - e.coordinates[1], 2); return s - u; }), this.outerEdgesSorted = !0); }, r.prototype.getOuterEdges = function() { return this.sortOuterEdges(), this.outerEdges; }, r.prototype.getOuterEdge = function(e) { return this.sortOuterEdges(), this.outerEdges[e]; }, r.prototype.addInnerEdge = function(e) { this.innerEdges.push(e); }, r; }(); const LB = Rle; var Nle = function() { function r(e, t) { this.from = e, this.to = t, this.next = void 0, this.label = void 0, this.symetric = void 0, this.ring = void 0, this.from.addOuterEdge(this), this.to.addInnerEdge(this); } return r.prototype.getSymetric = function() { return this.symetric || (this.symetric = new r(this.to, this.from), this.symetric.symetric = this), this.symetric; }, r.prototype.deleteEdge = function() { this.from.removeOuterEdge(this), this.to.removeInnerEdge(this); }, r.prototype.isEqual = function(e) { return this.from.id === e.from.id && this.to.id === e.to.id; }, r.prototype.toString = function() { return "Edge { " + this.from.id + " -> " + this.to.id + " }"; }, r.prototype.toLineString = function() { return Br([this.from.coordinates, this.to.coordinates]); }, r.prototype.compareTo = function(e) { return ZO(e.from.coordinates, e.to.coordinates, this.to.coordinates); }, r; }(); const Fle = Nle; var Ble = function() { function r() { this.edges = [], this.polygon = void 0, this.envelope = void 0; } return r.prototype.push = function(e) { this.edges.push(e), this.polygon = this.envelope = void 0; }, r.prototype.get = function(e) { return this.edges[e]; }, Object.defineProperty(r.prototype, "length", { get: function() { return this.edges.length; }, enumerable: !0, configurable: !0 }), r.prototype.forEach = function(e) { this.edges.forEach(e); }, r.prototype.map = function(e) { return this.edges.map(e); }, r.prototype.some = function(e) { return this.edges.some(e); }, r.prototype.isValid = function() { return !0; }, r.prototype.isHole = function() { var e = this, t = this.edges.reduce(function(o, s, u) { return s.from.coordinates[1] > e.edges[o].from.coordinates[1] && (o = u), o; }, 0), n = (t === 0 ? this.length : t) - 1, i = (t + 1) % this.length, a = ZO(this.edges[n].from.coordinates, this.edges[t].from.coordinates, this.edges[i].from.coordinates); return a === 0 ? this.edges[n].from.coordinates[0] > this.edges[i].from.coordinates[0] : a > 0; }, r.prototype.toMultiPoint = function() { return X1(this.edges.map(function(e) { return e.from.coordinates; })); }, r.prototype.toPolygon = function() { if (this.polygon) return this.polygon; var e = this.edges.map(function(t) { return t.from.coordinates; }); return e.push(this.edges[0].from.coordinates), this.polygon = Nt([e]); }, r.prototype.getEnvelope = function() { return this.envelope ? this.envelope : this.envelope = FH(this.toPolygon()); }, r.findEdgeRingContaining = function(e, t) { var n = e.getEnvelope(), i, a; return t.forEach(function(o) { var s = o.getEnvelope(); if (a && (i = a.getEnvelope()), !Mle(s, n) && AB(s, n)) { for (var u = e.map(function(d) { return d.from.coordinates; }), l = void 0, c = function(d) { o.some(function(v) { return Ole(d, v.from.coordinates); }) || (l = d); }, f = 0, h = u; f < h.length; f++) { var p = h[f]; c(p); } l && o.inside(Lt(l)) && (!a || AB(i, s)) && (a = o); } }), a; }, r.prototype.inside = function(e) { return nn(e, this.toPolygon()); }, r; }(); const AU = Ble; function kle(r) { if (!r) throw new Error("No geojson passed"); if (r.type !== "FeatureCollection" && r.type !== "GeometryCollection" && r.type !== "MultiLineString" && r.type !== "LineString" && r.type !== "Feature") throw new Error("Invalid input type '" + r.type + "'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature"); } var Vle = function() { function r() { this.edges = [], this.nodes = {}; } return r.fromGeoJson = function(e) { kle(e); var t = new r(); return Yi(e, function(n) { O_(n, "LineString", "Graph::fromGeoJson"), yO(n, function(i, a) { if (i) { var o = t.getNode(i), s = t.getNode(a); t.addEdge(o, s); } return a; }); }), t; }, r.prototype.getNode = function(e) { var t = LB.buildId(e), n = this.nodes[t]; return n || (n = this.nodes[t] = new LB(e)), n; }, r.prototype.addEdge = function(e, t) { var n = new Fle(e, t), i = n.getSymetric(); this.edges.push(n), this.edges.push(i); }, r.prototype.deleteDangles = function() { var e = this; Object.keys(this.nodes).map(function(t) { return e.nodes[t]; }).forEach(function(t) { return e._removeIfDangle(t); }); }, r.prototype._removeIfDangle = function(e) { var t = this; if (e.innerEdges.length <= 1) { var n = e.getOuterEdges().map(function(i) { return i.to; }); this.removeNode(e), n.forEach(function(i) { return t._removeIfDangle(i); }); } }, r.prototype.deleteCutEdges = function() { var e = this; this._computeNextCWEdges(), this._findLabeledEdgeRings(), this.edges.forEach(function(t) { t.label === t.symetric.label && (e.removeEdge(t.symetric), e.removeEdge(t)); }); }, r.prototype._computeNextCWEdges = function(e) { var t = this; typeof e > "u" ? Object.keys(this.nodes).forEach(function(n) { return t._computeNextCWEdges(t.nodes[n]); }) : e.getOuterEdges().forEach(function(n, i) { e.getOuterEdge((i === 0 ? e.getOuterEdges().length : i) - 1).symetric.next = n; }); }, r.prototype._computeNextCCWEdges = function(e, t) { for (var n = e.getOuterEdges(), i, a, o = n.length - 1; o >= 0; --o) { var s = n[o], u = s.symetric, l = void 0, c = void 0; s.label === t && (l = s), u.label === t && (c = u), !(!l || !c) && (c && (a = c), l && (a && (a.next = l, a = void 0), i || (i = l))); } a && (a.next = i); }, r.prototype._findLabeledEdgeRings = function() { var e = [], t = 0; return this.edges.forEach(function(n) { if (!(n.label >= 0)) { e.push(n); var i = n; do i.label = t, i = i.next; while (!n.isEqual(i)); t++; } }), e; }, r.prototype.getEdgeRings = function() { var e = this; this._computeNextCWEdges(), this.edges.forEach(function(n) { n.label = void 0; }), this._findLabeledEdgeRings().forEach(function(n) { e._findIntersectionNodes(n).forEach(function(i) { e._computeNextCCWEdges(i, n.label); }); }); var t = []; return this.edges.forEach(function(n) { n.ring || t.push(e._findEdgeRing(n)); }), t; }, r.prototype._findIntersectionNodes = function(e) { var t = [], n = e, i = function() { var a = 0; n.from.getOuterEdges().forEach(function(o) { o.label === e.label && ++a; }), a > 1 && t.push(n.from), n = n.next; }; do i(); while (!e.isEqual(n)); return t; }, r.prototype._findEdgeRing = function(e) { var t = e, n = new AU(); do n.push(t), t.ring = n, t = t.next; while (!e.isEqual(t)); return n; }, r.prototype.removeNode = function(e) { var t = this; e.getOuterEdges().forEach(function(n) { return t.removeEdge(n); }), e.innerEdges.forEach(function(n) { return t.removeEdge(n); }), delete this.nodes[e.id]; }, r.prototype.removeEdge = function(e) { this.edges = this.edges.filter(function(t) { return !t.isEqual(e); }), e.deleteEdge(); }, r; }(); const Gle = Vle; function zle(r) { var e = Gle.fromGeoJson(r); e.deleteDangles(), e.deleteCutEdges(); var t = [], n = []; return e.getEdgeRings().filter(function(i) { return i.isValid(); }).forEach(function(i) { i.isHole() ? t.push(i) : n.push(i); }), t.forEach(function(i) { AU.findEdgeRingContaining(i, n) && n.push(i); }), lt(n.map(function(i) { return i.toPolygon(); })); } function LU(r, e) { var t = !0; return Yi(r, function(n) { Yi(e, function(i) { if (t === !1) return !1; t = $le(n.geometry, i.geometry); }); }), t; } function $le(r, e) { switch (r.type) { case "Point": switch (e.type) { case "Point": return !jle(r.coordinates, e.coordinates); case "LineString": return !DB(e, r); case "Polygon": return !nn(r, e); } break; case "LineString": switch (e.type) { case "Point": return !DB(r, e); case "LineString": return !Hle(r, e); case "Polygon": return !MB(e, r); } break; case "Polygon": switch (e.type) { case "Point": return !nn(e, r); case "LineString": return !MB(r, e); case "Polygon": return !Ule(e, r); } } return !1; } function DB(r, e) { for (var t = 0; t < r.coordinates.length - 1; t++) if (Wle(r.coordinates[t], r.coordinates[t + 1], e.coordinates)) return !0; return !1; } function Hle(r, e) { var t = vf(r, e); return t.features.length > 0; } function MB(r, e) { for (var t = 0, n = e.coordinates; t < n.length; t++) { var i = n[t]; if (nn(i, r)) return !0; } var a = vf(e, G_(r)); return a.features.length > 0; } function Ule(r, e) { for (var t = 0, n = r.coordinates[0]; t < n.length; t++) { var i = n[t]; if (nn(i, e)) return !0; } for (var a = 0, o = e.coordinates[0]; a < o.length; a++) { var s = o[a]; if (nn(s, r)) return !0; } var u = vf(G_(r), G_(e)); return u.features.length > 0; } function Wle(r, e, t) { var n = t[0] - r[0], i = t[1] - r[1], a = e[0] - r[0], o = e[1] - r[1], s = n * o - i * a; return s !== 0 ? !1 : Math.abs(a) >= Math.abs(o) ? a > 0 ? r[0] <= t[0] && t[0] <= e[0] : e[0] <= t[0] && t[0] <= r[0] : o > 0 ? r[1] <= t[1] && t[1] <= e[1] : e[1] <= t[1] && t[1] <= r[1]; } function jle(r, e) { return r[0] === e[0] && r[1] === e[1]; } function Yle(r, e) { var t = on(r), n = on(e), i = t.type, a = n.type, o = t.coordinates, s = n.coordinates; switch (i) { case "Point": switch (a) { case "Point": return KO(o, s); default: throw new Error("feature2 " + a + " geometry not supported"); } case "MultiPoint": switch (a) { case "Point": return Xle(t, n); case "MultiPoint": return qle(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } case "LineString": switch (a) { case "Point": return Mo(n, t, { ignoreEndVertices: !0 }); case "LineString": return Jle(t, n); case "MultiPoint": return Zle(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } case "Polygon": switch (a) { case "Point": return nn(n, t, { ignoreBoundary: !0 }); case "LineString": return Qle(t, n); case "Polygon": return ece(t, n); case "MultiPoint": return Kle(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } default: throw new Error("feature1 " + i + " geometry not supported"); } } function Xle(r, e) { var t, n = !1; for (t = 0; t < r.coordinates.length; t++) if (KO(r.coordinates[t], e.coordinates)) { n = !0; break; } return n; } function qle(r, e) { for (var t = 0, n = e.coordinates; t < n.length; t++) { for (var i = n[t], a = !1, o = 0, s = r.coordinates; o < s.length; o++) { var u = s[o]; if (KO(i, u)) { a = !0; break; } } if (!a) return !1; } return !0; } function Zle(r, e) { for (var t = !1, n = 0, i = e.coordinates; n < i.length; n++) { var a = i[n]; if (Mo(a, r, { ignoreEndVertices: !0 }) && (t = !0), !Mo(a, r)) return !1; } return !!t; } function Kle(r, e) { for (var t = 0, n = e.coordinates; t < n.length; t++) { var i = n[t]; if (!nn(i, r, { ignoreBoundary: !0 })) return !1; } return !0; } function Jle(r, e) { for (var t = !1, n = 0, i = e.coordinates; n < i.length; n++) { var a = i[n]; if (Mo({ type: "Point", coordinates: a }, r, { ignoreEndVertices: !0 }) && (t = !0), !Mo({ type: "Point", coordinates: a }, r, { ignoreEndVertices: !1 })) return !1; } return t; } function Qle(r, e) { var t = !1, n = 0, i = Bn(r), a = Bn(e); if (!DU(i, a)) return !1; for (n; n < e.coordinates.length - 1; n++) { var o = tce(e.coordinates[n], e.coordinates[n + 1]); if (nn({ type: "Point", coordinates: o }, r, { ignoreBoundary: !0 })) { t = !0; break; } } return t; } function ece(r, e) { if (r.type === "Feature" && r.geometry === null || e.type === "Feature" && e.geometry === null) return !1; var t = Bn(r), n = Bn(e); if (!DU(t, n)) return !1; for (var i = on(e).coordinates, a = 0, o = i; a < o.length; a++) for (var s = o[a], u = 0, l = s; u < l.length; u++) { var c = l[u]; if (!nn(c, r)) return !1; } return !0; } function DU(r, e) { return !(r[0] > e[0] || r[2] < e[2] || r[1] > e[1] || r[3] < e[3]); } function KO(r, e) { return r[0] === e[0] && r[1] === e[1]; } function tce(r, e) { return [(r[0] + e[0]) / 2, (r[1] + e[1]) / 2]; } function rce(r, e) { var t = on(r), n = on(e), i = t.type, a = n.type; switch (i) { case "MultiPoint": switch (a) { case "LineString": return OB(t, n); case "Polygon": return NB(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } case "LineString": switch (a) { case "MultiPoint": return OB(n, t); case "LineString": return nce(t, n); case "Polygon": return RB(t, n); default: throw new Error("feature2 " + a + " geometry not supported"); } case "Polygon": switch (a) { case "MultiPoint": return NB(n, t); case "LineString": return RB(n, t); default: throw new Error("feature2 " + a + " geometry not supported"); } default: throw new Error("feature1 " + i + " geometry not supported"); } } function OB(r, e) { for (var t = !1, n = !1, i = r.coordinates.length, a = 0; a < i && !t && !n; ) { for (var o = 0; o < e.coordinates.length - 1; o++) { var s = !0; (o === 0 || o === e.coordinates.length - 2) && (s = !1), MU(e.coordinates[o], e.coordinates[o + 1], r.coordinates[a], s) ? t = !0 : n = !0; } a++; } return t && n; } function nce(r, e) { var t = vf(r, e); if (t.features.length > 0) for (var n = 0; n < r.coordinates.length - 1; n++) for (var i = 0; i < e.coordinates.length - 1; i++) { var a = !0; if ((i === 0 || i === e.coordinates.length - 2) && (a = !1), MU(r.coordinates[n], r.coordinates[n + 1], e.coordinates[i], a)) return !0; } return !1; } function RB(r, e) { var t = rU(e), n = vf(r, t); return n.features.length > 0; } function NB(r, e) { for (var t = !1, n = !1, i = r.coordinates.length, a = 0; a < i && (!t || !n); a++) nn(Lt(r.coordinates[a]), e) ? t = !0 : n = !0; return n && t; } function MU(r, e, t, n) { var i = t[0] - r[0], a = t[1] - r[1], o = e[0] - r[0], s = e[1] - r[1], u = i * s - a * o; return u !== 0 ? !1 : n ? Math.abs(o) >= Math.abs(s) ? o > 0 ? r[0] <= t[0] && t[0] <= e[0] : e[0] <= t[0] && t[0] <= r[0] : s > 0 ? r[1] <= t[1] && t[1] <= e[1] : e[1] <= t[1] && t[1] <= r[1] : Math.abs(o) >= Math.abs(s) ? o > 0 ? r[0] < t[0] && t[0] < e[0] : e[0] < t[0] && t[0] < r[0] : s > 0 ? r[1] < t[1] && t[1] < e[1] : e[1] < t[1] && t[1] < r[1]; } var ice = Ig, nc = function(r) { this.precision = r && r.precision ? r.precision : 17, this.direction = r && r.direction ? r.direction : !1, this.pseudoNode = r && r.pseudoNode ? r.pseudoNode : !1, this.objectComparator = r && r.objectComparator ? r.objectComparator : ace; }; nc.prototype.compare = function(r, e) { if (r.type !== e.type || !OU(r, e)) return !1; switch (r.type) { case "Point": return this.compareCoord(r.coordinates, e.coordinates); case "LineString": return this.compareLine(r.coordinates, e.coordinates, 0, !1); case "Polygon": return this.comparePolygon(r, e); case "Feature": return this.compareFeature(r, e); default: if (r.type.indexOf("Multi") === 0) { var t = this, n = FB(r), i = FB(e); return n.every(function(a) { return this.some(function(o) { return t.compare(a, o); }); }, i); } } return !1; }; function FB(r) { return r.coordinates.map(function(e) { return { type: r.type.replace("Multi", ""), coordinates: e }; }); } function OU(r, e) { return r.hasOwnProperty("coordinates") ? r.coordinates.length === e.coordinates.length : r.length === e.length; } nc.prototype.compareCoord = function(r, e) { if (r.length !== e.length) return !1; for (var t = 0; t < r.length; t++) if (r[t].toFixed(this.precision) !== e[t].toFixed(this.precision)) return !1; return !0; }; nc.prototype.compareLine = function(r, e, t, n) { if (!OU(r, e)) return !1; var i = this.pseudoNode ? r : this.removePseudo(r), a = this.pseudoNode ? e : this.removePseudo(e); if (!(n && !this.compareCoord(i[0], a[0]) && (a = this.fixStartIndex(a, i), !a))) { var o = this.compareCoord(i[t], a[t]); return this.direction || o ? this.comparePath(i, a) : this.compareCoord(i[t], a[a.length - (1 + t)]) ? this.comparePath(i.slice().reverse(), a) : !1; } }; nc.prototype.fixStartIndex = function(r, e) { for (var t, n = -1, i = 0; i < r.length; i++) if (this.compareCoord(r[i], e[0])) { n = i; break; } return n >= 0 && (t = [].concat( r.slice(n, r.length), r.slice(1, n + 1) )), t; }; nc.prototype.comparePath = function(r, e) { var t = this; return r.every(function(n, i) { return t.compareCoord(n, this[i]); }, e); }; nc.prototype.comparePolygon = function(r, e) { if (this.compareLine(r.coordinates[0], e.coordinates[0], 1, !0)) { var t = r.coordinates.slice(1, r.coordinates.length), n = e.coordinates.slice(1, e.coordinates.length), i = this; return t.every(function(a) { return this.some(function(o) { return i.compareLine(a, o, 1, !0); }); }, n); } else return !1; }; nc.prototype.compareFeature = function(r, e) { return r.id !== e.id || !this.objectComparator(r.properties, e.properties) || !this.compareBBox(r, e) ? !1 : this.compare(r.geometry, e.geometry); }; nc.prototype.compareBBox = function(r, e) { return !!(!r.bbox && !e.bbox || r.bbox && e.bbox && this.compareCoord(r.bbox, e.bbox)); }; nc.prototype.removePseudo = function(r) { return r; }; function ace(r, e) { return ice(r, e, { strict: !0 }); } var oce = nc; const RU = oce; function sce(r, e) { var t = on(r), n = on(e), i = t.type, a = n.type; if (i === "MultiPoint" && a !== "MultiPoint" || (i === "LineString" || i === "MultiLineString") && a !== "LineString" && a !== "MultiLineString" || (i === "Polygon" || i === "MultiPolygon") && a !== "Polygon" && a !== "MultiPolygon") throw new Error("features must be of the same type"); if (i === "Point") throw new Error("Point geometry not supported"); var o = new RU({ precision: 6 }); if (o.compare(r, e)) return !1; var s = 0; switch (i) { case "MultiPoint": for (var u = 0; u < t.coordinates.length; u++) for (var l = 0; l < n.coordinates.length; l++) { var c = t.coordinates[u], f = n.coordinates[l]; if (c[0] === f[0] && c[1] === f[1]) return !0; } return !1; case "LineString": case "MultiLineString": Sc(r, function(h) { Sc(e, function(p) { TU(h, p).features.length && s++; }); }); break; case "Polygon": case "MultiPolygon": Sc(r, function(h) { Sc(e, function(p) { vf(h, p).features.length && s++; }); }); break; } return s > 0; } function uce(r, e) { var t = on(r).type, n = on(e).type; if (t !== n) return !1; var i = new RU({ precision: 6 }); return i.compare(yd(r), yd(e)); } function NU(r, e) { var t = !1; return Yi(r, function(n) { Yi(e, function(i) { if (t === !0) return !0; t = !LU(n.geometry, i.geometry); }); }), t; } var FU = { exports: {} }, KP = { exports: {} }, BB; function lce() { return BB || (BB = 1, function(r) { function e(t, n, i, a) { this.dataset = [], this.epsilon = 1, this.minPts = 2, this.distance = this._euclideanDistance, this.clusters = [], this.noise = [], this._visited = [], this._assigned = [], this._datasetLength = 0, this._init(t, n, i, a); } e.prototype.run = function(t, n, i, a) { this._init(t, n, i, a); for (var o = 0; o < this._datasetLength; o++) if (this._visited[o] !== 1) { this._visited[o] = 1; var s = this._regionQuery(o); if (s.length < this.minPts) this.noise.push(o); else { var u = this.clusters.length; this.clusters.push([]), this._addToCluster(o, u), this._expandCluster(u, s); } } return this.clusters; }, e.prototype._init = function(t, n, i, a) { if (t) { if (!(t instanceof Array)) throw Error("Dataset must be of type array, " + typeof t + " given"); this.dataset = t, this.clusters = [], this.noise = [], this._datasetLength = t.length, this._visited = new Array(this._datasetLength), this._assigned = new Array(this._datasetLength); } n && (this.epsilon = n), i && (this.minPts = i), a && (this.distance = a); }, e.prototype._expandCluster = function(t, n) { for (var i = 0; i < n.length; i++) { var a = n[i]; if (this._visited[a] !== 1) { this._visited[a] = 1; var o = this._regionQuery(a); o.length >= this.minPts && (n = this._mergeArrays(n, o)); } this._assigned[a] !== 1 && this._addToCluster(a, t); } }, e.prototype._addToCluster = function(t, n) { this.clusters[n].push(t), this._assigned[t] = 1; }, e.prototype._regionQuery = function(t) { for (var n = [], i = 0; i < this._datasetLength; i++) { var a = this.distance(this.dataset[t], this.dataset[i]); a < this.epsilon && n.push(i); } return n; }, e.prototype._mergeArrays = function(t, n) { for (var i = n.length, a = 0; a < i; a++) { var o = n[a]; t.indexOf(o) < 0 && t.push(o); } return t; }, e.prototype._euclideanDistance = function(t, n) { for (var i = 0, a = Math.min(t.length, n.length); a--; ) i += (t[a] - n[a]) * (t[a] - n[a]); return Math.sqrt(i); }, r.exports && (r.exports = e); }(KP)), KP.exports; } var JP = { exports: {} }, kB; function cce() { return kB || (kB = 1, function(r) { function e(t, n, i) { this.k = 3, this.dataset = [], this.assignments = [], this.centroids = [], this.init(t, n, i); } e.prototype.init = function(t, n, i) { this.assignments = [], this.centroids = [], typeof t < "u" && (this.dataset = t), typeof n < "u" && (this.k = n), typeof i < "u" && (this.distance = i); }, e.prototype.run = function(t, n) { this.init(t, n); for (var i = this.dataset.length, a = 0; a < this.k; a++) this.centroids[a] = this.randomCentroid(); for (var o = !0; o; ) { o = this.assign(); for (var s = 0; s < this.k; s++) { for (var u = new Array(h), l = 0, c = 0; c < h; c++) u[c] = 0; for (var f = 0; f < i; f++) { var h = this.dataset[f].length; if (s === this.assignments[f]) { for (var c = 0; c < h; c++) u[c] += this.dataset[f][c]; l++; } } if (l > 0) { for (var c = 0; c < h; c++) u[c] /= l; this.centroids[s] = u; } else this.centroids[s] = this.randomCentroid(), o = !0; } } return this.getClusters(); }, e.prototype.randomCentroid = function() { var t = this.dataset.length - 1, n, i; do i = Math.round(Math.random() * t), n = this.dataset[i]; while (this.centroids.indexOf(n) >= 0); return n; }, e.prototype.assign = function() { for (var t = !1, n = this.dataset.length, i, a = 0; a < n; a++) i = this.argmin(this.dataset[a], this.centroids, this.distance), i != this.assignments[a] && (this.assignments[a] = i, t = !0); return t; }, e.prototype.getClusters = function() { for (var t = new Array(this.k), n, i = 0; i < this.assignments.length; i++) n = this.assignments[i], typeof t[n] > "u" && (t[n] = []), t[n].push(i); return t; }, e.prototype.argmin = function(t, n, i) { for (var a = Number.MAX_VALUE, o = 0, s = n.length, u, l = 0; l < s; l++) u = i(t, n[l]), u < a && (a = u, o = l); return o; }, e.prototype.distance = function(t, n) { for (var i = 0, a = Math.min(t.length, n.length); a--; ) { var o = t[a] - n[a]; i += o * o; } return Math.sqrt(i); }, r.exports && (r.exports = e); }(JP)), JP.exports; } var QP = { exports: {} }, eI = { exports: {} }, VB; function BU() { return VB || (VB = 1, function(r) { function e(t, n, i) { this._queue = [], this._priorities = [], this._sorting = "desc", this._init(t, n, i); } e.prototype.insert = function(t, n) { for (var i = this._queue.length, a = i; a--; ) { var o = this._priorities[a]; this._sorting === "desc" ? n > o && (i = a) : n < o && (i = a); } this._insertAt(t, n, i); }, e.prototype.remove = function(t) { for (var n = this._queue.length; n--; ) { var i = this._queue[n]; if (t === i) { this._queue.splice(n, 1), this._priorities.splice(n, 1); break; } } }, e.prototype.forEach = function(t) { this._queue.forEach(t); }, e.prototype.getElements = function() { return this._queue; }, e.prototype.getElementPriority = function(t) { return this._priorities[t]; }, e.prototype.getPriorities = function() { return this._priorities; }, e.prototype.getElementsWithPriorities = function() { for (var t = [], n = 0, i = this._queue.length; n < i; n++) t.push([this._queue[n], this._priorities[n]]); return t; }, e.prototype._init = function(t, n, i) { if (t && n) { if (this._queue = [], this._priorities = [], t.length !== n.length) throw new Error("Arrays must have the same length"); for (var a = 0; a < t.length; a++) this.insert(t[a], n[a]); } i && (this._sorting = i); }, e.prototype._insertAt = function(t, n, i) { this._queue.length === i ? (this._queue.push(t), this._priorities.push(n)) : (this._queue.splice(i, 0, t), this._priorities.splice(i, 0, n)); }, r.exports && (r.exports = e); }(eI)), eI.exports; } var GB; function fce() { return GB || (GB = 1, function(r) { if (r.exports) var e = BU(); function t(n, i, a, o) { this.epsilon = 1, this.minPts = 1, this.distance = this._euclideanDistance, this._reachability = [], this._processed = [], this._coreDistance = 0, this._orderedList = [], this._init(n, i, a, o); } t.prototype.run = function(n, i, a, o) { this._init(n, i, a, o); for (var s = 0, u = this.dataset.length; s < u; s++) if (this._processed[s] !== 1) { this._processed[s] = 1, this.clusters.push([s]); var l = this.clusters.length - 1; this._orderedList.push(s); var c = new e(null, null, "asc"), f = this._regionQuery(s); this._distanceToCore(s) !== void 0 && (this._updateQueue(s, f, c), this._expandCluster(l, c)); } return this.clusters; }, t.prototype.getReachabilityPlot = function() { for (var n = [], i = 0, a = this._orderedList.length; i < a; i++) { var o = this._orderedList[i], s = this._reachability[o]; n.push([o, s]); } return n; }, t.prototype._init = function(n, i, a, o) { if (n) { if (!(n instanceof Array)) throw Error("Dataset must be of type array, " + typeof n + " given"); this.dataset = n, this.clusters = [], this._reachability = new Array(this.dataset.length), this._processed = new Array(this.dataset.length), this._coreDistance = 0, this._orderedList = []; } i && (this.epsilon = i), a && (this.minPts = a), o && (this.distance = o); }, t.prototype._updateQueue = function(n, i, a) { var o = this; this._coreDistance = this._distanceToCore(n), i.forEach(function(s) { if (o._processed[s] === void 0) { var u = o.distance(o.dataset[n], o.dataset[s]), l = Math.max(o._coreDistance, u); o._reachability[s] === void 0 ? (o._reachability[s] = l, a.insert(s, l)) : l < o._reachability[s] && (o._reachability[s] = l, a.remove(s), a.insert(s, l)); } }); }, t.prototype._expandCluster = function(n, i) { for (var a = i.getElements(), o = 0, s = a.length; o < s; o++) { var u = a[o]; if (this._processed[u] === void 0) { var l = this._regionQuery(u); this._processed[u] = 1, this.clusters[n].push(u), this._orderedList.push(u), this._distanceToCore(u) !== void 0 && (this._updateQueue(u, l, i), this._expandCluster(n, i)); } } }, t.prototype._distanceToCore = function(n) { for (var i = this.epsilon, a = 0; a < i; a++) { var o = this._regionQuery(n, a); if (o.length >= this.minPts) return a; } }, t.prototype._regionQuery = function(n, i) { i = i || this.epsilon; for (var a = [], o = 0, s = this.dataset.length; o < s; o++) this.distance(this.dataset[n], this.dataset[o]) < i && a.push(o); return a; }, t.prototype._euclideanDistance = function(n, i) { for (var a = 0, o = Math.min(n.length, i.length); o--; ) a += (n[o] - i[o]) * (n[o] - i[o]); return Math.sqrt(a); }, r.exports && (r.exports = t); }(QP)), QP.exports; } (function(r) { r.exports && (r.exports = { DBSCAN: lce(), KMEANS: cce(), OPTICS: fce(), PriorityQueue: BU() }); })(FU); const hce = FU.exports; function pce(r, e, t) { t === void 0 && (t = {}), t.mutate !== !0 && (r = da(r)), t.minPoints = t.minPoints || 3; var n = new hce.DBSCAN(), i = n.run(nm(r), md(e, t.units), t.minPoints, zr), a = -1; return i.forEach(function(o) { a++, o.forEach(function(s) { var u = r.features[s]; u.properties || (u.properties = {}), u.properties.cluster = a, u.properties.dbscan = "core"; }); }), n.noise.forEach(function(o) { var s = r.features[o]; s.properties || (s.properties = {}), s.properties.cluster ? s.properties.dbscan = "edge" : s.properties.dbscan = "noise"; }), r; } var kU = { eudist: function(e, t, n) { for (var i = e.length, a = 0, o = 0; o < i; o++) { var s = (e[o] || 0) - (t[o] || 0); a += s * s; } return n ? Math.sqrt(a) : a; }, mandist: function(e, t, n) { for (var i = e.length, a = 0, o = 0; o < i; o++) a += Math.abs((e[o] || 0) - (t[o] || 0)); return n ? Math.sqrt(a) : a; }, dist: function(e, t, n) { var i = Math.abs(e - t); return n ? i : i * i; } }, VU = kU, dce = VU.eudist, vce = VU.dist, gce = { kmrand: function(e, t) { for (var n = {}, i = [], a = t << 2, o = e.length, s = e[0].length > 0; i.length < t && a-- > 0; ) { var u = e[Math.floor(Math.random() * o)], l = s ? u.join("_") : "" + u; n[l] || (n[l] = !0, i.push(u)); } if (i.length < t) throw new Error("Error initializating clusters"); return i; }, kmpp: function(e, t) { var n = e[0].length ? dce : vce, i = [], a = e.length, o = e[0].length > 0, s = e[Math.floor(Math.random() * a)]; for (o ? s.join("_") : "" + s, i.push(s); i.length < t; ) { for (var u = [], l = i.length, c = 0, f = [], h = 0; h < a; h++) { for (var p = 1 / 0, d = 0; d < l; d++) { var v = n(e[h], i[d]); v <= p && (p = v); } u[h] = p; } for (var g = 0; g < a; g++) c += u[g]; for (var m = 0; m < a; m++) f[m] = { i: m, v: e[m], pr: u[m] / c, cs: 0 }; f.sort(function(x, C) { return x.pr - C.pr; }), f[0].cs = f[0].pr; for (var y = 1; y < a; y++) f[y].cs = f[y - 1].cs + f[y].pr; for (var _ = Math.random(), w = 0; w < a - 1 && f[w++].cs < _; ) ; i.push(f[w - 1].v); } return i; } }, mce = kU, GU = gce, yce = mce.eudist, _ce = GU.kmrand, wce = GU.kmpp, zB = 1e4; function $B(r, e, t) { t = t || []; for (var n = 0; n < r; n++) t[n] = e; return t; } function xce(r, e, t, n) { var i = [], a = [], o = [], s = [], u = !1, l = n || zB, c = r.length, f = r[0].length, h = f > 0, p = []; if (t) t == "kmrand" ? i = _ce(r, e) : t == "kmpp" ? i = wce(r, e) : i = t; else for (var d = {}; i.length < e; ) { var v = Math.floor(Math.random() * c); d[v] || (d[v] = !0, i.push(r[v])); } do { $B(e, 0, p); for (var g = 0; g < c; g++) { for (var m = 1 / 0, y = 0, _ = 0; _ < e; _++) { var s = h ? yce(r[g], i[_]) : Math.abs(r[g] - i[_]); s <= m && (m = s, y = _); } o[g] = y, p[y]++; } for (var w = [], a = [], x = 0; x < e; x++) w[x] = h ? $B(f, 0, w[x]) : 0, a[x] = i[x]; if (h) { for (var C = 0; C < e; C++) i[C] = []; for (var S = 0; S < c; S++) for (var b = o[S], E = w[b], T = r[S], P = 0; P < f; P++) E[P] += T[P]; u = !0; for (var I = 0; I < e; I++) { for (var A = i[I], L = w[I], D = a[I], O = p[I], N = 0; N < f; N++) A[N] = L[N] / O || 0; if (u) { for (var F = 0; F < f; F++) if (D[F] != A[F]) { u = !1; break; } } } } else { for (var k = 0; k < c; k++) { var G = o[k]; w[G] += r[k]; } for (var U = 0; U < e; U++) i[U] = w[U] / p[U] || 0; u = !0; for (var B = 0; B < e; B++) if (a[B] != i[B]) { u = !1; break; } } u = u || --l <= 0; } while (!u); return { it: zB - l, k: e, idxs: o, centroids: i }; } var Cce = xce; function Sce(r, e) { e === void 0 && (e = {}); var t = r.features.length; e.numberOfClusters = e.numberOfClusters || Math.round(Math.sqrt(t / 2)), e.numberOfClusters > t && (e.numberOfClusters = t), e.mutate !== !0 && (r = da(r)); var n = nm(r), i = n.slice(0, e.numberOfClusters), a = Cce(n, e.numberOfClusters, i), o = {}; return a.centroids.forEach(function(s, u) { o[u] = s; }), Dr(r, function(s, u) { var l = a.idxs[u]; s.properties.cluster = l, s.properties.centroid = o[l]; }), r; } function Ece(r, e) { if (!r) throw new Error("line1 is required"); if (!e) throw new Error("line2 is required"); var t = HB(r, "line1"); if (t !== "LineString") throw new Error("line1 must be a LineString"); var n = HB(e, "line2"); if (n !== "LineString") throw new Error("line2 must be a LineString"); for (var i = wd(yd(r)).features, a = wd(yd(e)).features, o = 0; o < i.length; o++) { var s = i[o].geometry.coordinates; if (!a[o]) break; var u = a[o].geometry.coordinates; if (!bce(s, u)) return !1; } return !0; } function bce(r, e) { var t = gd(xd(r[0], r[1])), n = gd(xd(e[0], e[1])); return t === n; } function HB(r, e) { if (r.geometry && r.geometry.type) return r.geometry.type; if (r.type) return r.type; throw new Error("Invalid GeoJSON object for " + e); } function UB(r) { for (var e = r, t = []; e.parent; ) t.unshift(e), e = e.parent; return t; } function Tce() { return new zU(function(r) { return r.f; }); } var $b = { search: function(r, e, t, n) { r.cleanDirty(), n = n || {}; var i = n.heuristic || $b.heuristics.manhattan, a = n.closest || !1, o = Tce(), s = e; for (e.h = i(e, t), o.push(e); o.size() > 0; ) { var u = o.pop(); if (u === t) return UB(u); u.closed = !0; for (var l = r.neighbors(u), c = 0, f = l.length; c < f; ++c) { var h = l[c]; if (!(h.closed || h.isWall())) { var p = u.g + h.getCost(u), d = h.visited; (!d || p < h.g) && (h.visited = !0, h.parent = u, h.h = h.h || i(h, t), h.g = p, h.f = h.g + h.h, r.markDirty(h), a && (h.h < s.h || h.h === s.h && h.g < s.g) && (s = h), d ? o.rescoreElement(h) : o.push(h)); } } } return a ? UB(s) : []; }, heuristics: { manhattan: function(r, e) { var t = Math.abs(e.x - r.x), n = Math.abs(e.y - r.y); return t + n; }, diagonal: function(r, e) { var t = 1, n = Math.sqrt(2), i = Math.abs(e.x - r.x), a = Math.abs(e.y - r.y); return t * (i + a) + (n - 2 * t) * Math.min(i, a); } }, cleanNode: function(r) { r.f = 0, r.g = 0, r.h = 0, r.visited = !1, r.closed = !1, r.parent = null; } }; function Zm(r, e) { e = e || {}, this.nodes = [], this.diagonal = !!e.diagonal, this.grid = []; for (var t = 0; t < r.length; t++) { this.grid[t] = []; for (var n = 0, i = r[t]; n < i.length; n++) { var a = new Hb(t, n, i[n]); this.grid[t][n] = a, this.nodes.push(a); } } this.init(); } Zm.prototype.init = function() { this.dirtyNodes = []; for (var r = 0; r < this.nodes.length; r++) $b.cleanNode(this.nodes[r]); }; Zm.prototype.cleanDirty = function() { for (var r = 0; r < this.dirtyNodes.length; r++) $b.cleanNode(this.dirtyNodes[r]); this.dirtyNodes = []; }; Zm.prototype.markDirty = function(r) { this.dirtyNodes.push(r); }; Zm.prototype.neighbors = function(r) { var e = [], t = r.x, n = r.y, i = this.grid; return i[t - 1] && i[t - 1][n] && e.push(i[t - 1][n]), i[t + 1] && i[t + 1][n] && e.push(i[t + 1][n]), i[t] && i[t][n - 1] && e.push(i[t][n - 1]), i[t] && i[t][n + 1] && e.push(i[t][n + 1]), this.diagonal && (i[t - 1] && i[t - 1][n - 1] && e.push(i[t - 1][n - 1]), i[t + 1] && i[t + 1][n - 1] && e.push(i[t + 1][n - 1]), i[t - 1] && i[t - 1][n + 1] && e.push(i[t - 1][n + 1]), i[t + 1] && i[t + 1][n + 1] && e.push(i[t + 1][n + 1])), e; }; Zm.prototype.toString = function() { for (var r = [], e = this.grid, t, n, i, a, o = 0, s = e.length; o < s; o++) { for (t = [], n = e[o], i = 0, a = n.length; i < a; i++) t.push(n[i].weight); r.push(t.join(" ")); } return r.join(` `); }; function Hb(r, e, t) { this.x = r, this.y = e, this.weight = t; } Hb.prototype.toString = function() { return "[" + this.x + " " + this.y + "]"; }; Hb.prototype.getCost = function(r) { return r && r.x !== this.x && r.y !== this.y ? this.weight * 1.41421 : this.weight; }; Hb.prototype.isWall = function() { return this.weight === 0; }; function zU(r) { this.content = [], this.scoreFunction = r; } zU.prototype = { push: function(r) { this.content.push(r), this.sinkDown(this.content.length - 1); }, pop: function() { var r = this.content[0], e = this.content.pop(); return this.content.length > 0 && (this.content[0] = e, this.bubbleUp(0)), r; }, remove: function(r) { var e = this.content.indexOf(r), t = this.content.pop(); e !== this.content.length - 1 && (this.content[e] = t, this.scoreFunction(t) < this.scoreFunction(r) ? this.sinkDown(e) : this.bubbleUp(e)); }, size: function() { return this.content.length; }, rescoreElement: function(r) { this.sinkDown(this.content.indexOf(r)); }, sinkDown: function(r) { for (var e = this.content[r]; r > 0; ) { var t = (r + 1 >> 1) - 1, n = this.content[t]; if (this.scoreFunction(e) < this.scoreFunction(n)) this.content[t] = e, this.content[r] = n, r = t; else break; } }, bubbleUp: function(r) { for (var e = this.content.length, t = this.content[r], n = this.scoreFunction(t); ; ) { var i = r + 1 << 1, a = i - 1, o = null, s; if (a < e) { var u = this.content[a]; s = this.scoreFunction(u), s < n && (o = a); } if (i < e) { var l = this.content[i], c = this.scoreFunction(l); c < (o === null ? n : s) && (o = i); } if (o !== null) this.content[r] = this.content[o], this.content[o] = t, r = o; else break; } } }; function Pce(r, e, t) { if (t = t || {}, !$r(t)) throw new Error("options is invalid"); var n = t.resolution, i = t.minDistance, a = t.obstacles || lt([]); if (!r) throw new Error("start is required"); if (!e) throw new Error("end is required"); if (n && !Mi(n) || n <= 0) throw new Error("options.resolution must be a number, greater than 0"); if (i) throw new Error("options.minDistance is not yet implemented"); var o = qr(r), s = qr(e); switch (r = Lt(o), e = Lt(s), po(a)) { case "FeatureCollection": if (a.features.length === 0) return Br([o, s]); break; case "Polygon": a = lt([fi(on(a))]); break; default: throw new Error("invalid obstacles"); } var u = a; u.features.push(r), u.features.push(e); var l = Bn(IU(OO(Bn(u)), 1.15)); if (!n) { var c = zr([l[0], l[1]], [l[2], l[1]], t); n = c / 100; } u.features.pop(), u.features.pop(); for (var f = l[0], h = l[1], p = l[2], d = l[3], v = n / zr([f, h], [p, h], t), g = v * (p - f), m = n / zr([f, h], [f, d], t), y = m * (d - h), _ = p - f, w = d - h, x = Math.floor(_ / g), C = Math.floor(w / y), S = (_ - x * g) / 2, b = (w - C * y) / 2, E = [], T = [], P = [], I = [], A = 1 / 0, L = 1 / 0, D = d - b, O = 0; D >= h; ) { for (var N = [], F = [], k = f + S, G = 0; k <= p; ) { var U = Lt([k, D]), B = Ice(U, a); N.push(B ? 0 : 1), F.push(k + "|" + D); var X = zr(U, r); !B && X < A && (A = X, P = { x: G, y: O }); var j = zr(U, e); !B && j < L && (L = j, I = { x: G, y: O }), k += g, G++; } T.push(N), E.push(F), D -= y, O++; } var ae = new Zm(T, { diagonal: !0 }), se = ae.grid[P.y][P.x], $ = ae.grid[I.y][I.x], V = $b.search(ae, se, $), q = [o]; return V.forEach(function(ee) { var Y = E[ee.x][ee.y].split("|"); q.push([+Y[0], +Y[1]]); }), q.push(s), yd(Br(q)); } function Ice(r, e) { for (var t = 0; t < e.features.length; t++) if (nn(r, e.features[t])) return !0; return !1; } function WB(r) { return function() { return r; }; } function Ace(r) { return r[0]; } function Lce(r) { return r[1]; } function DS() { this._ = null; } function Ub(r) { r.U = r.C = r.L = r.R = r.P = r.N = null; } DS.prototype = { constructor: DS, insert: function(r, e) { var t, n, i; if (r) { if (e.P = r, e.N = r.N, r.N && (r.N.P = e), r.N = e, r.R) { for (r = r.R; r.L; ) r = r.L; r.L = e; } else r.R = e; t = r; } else this._ ? (r = jB(this._), e.P = null, e.N = r, r.P = r.L = e, t = r) : (e.P = e.N = null, this._ = e, t = null); for (e.L = e.R = null, e.U = t, e.C = !0, r = e; t && t.C; ) n = t.U, t === n.L ? (i = n.R, i && i.C ? (t.C = i.C = !1, n.C = !0, r = n) : (r === t.R && (jy(this, t), r = t, t = r.U), t.C = !1, n.C = !0, Yy(this, n))) : (i = n.L, i && i.C ? (t.C = i.C = !1, n.C = !0, r = n) : (r === t.L && (Yy(this, t), r = t, t = r.U), t.C = !1, n.C = !0, jy(this, n))), t = r.U; this._.C = !1; }, remove: function(r) { r.N && (r.N.P = r.P), r.P && (r.P.N = r.N), r.N = r.P = null; var e = r.U, t, n = r.L, i = r.R, a, o; if (n ? i ? a = jB(i) : a = n : a = i, e ? e.L === r ? e.L = a : e.R = a : this._ = a, n && i ? (o = a.C, a.C = r.C, a.L = n, n.U = a, a !== i ? (e = a.U, a.U = r.U, r = a.R, e.L = r, a.R = i, i.U = a) : (a.U = e, e = a, r = a.R)) : (o = r.C, r = a), r && (r.U = e), !o) { if (r && r.C) { r.C = !1; return; } do { if (r === this._) break; if (r === e.L) { if (t = e.R, t.C && (t.C = !1, e.C = !0, jy(this, e), t = e.R), t.L && t.L.C || t.R && t.R.C) { (!t.R || !t.R.C) && (t.L.C = !1, t.C = !0, Yy(this, t), t = e.R), t.C = e.C, e.C = t.R.C = !1, jy(this, e), r = this._; break; } } else if (t = e.L, t.C && (t.C = !1, e.C = !0, Yy(this, e), t = e.L), t.L && t.L.C || t.R && t.R.C) { (!t.L || !t.L.C) && (t.R.C = !1, t.C = !0, jy(this, t), t = e.L), t.C = e.C, e.C = t.L.C = !1, Yy(this, e), r = this._; break; } t.C = !0, r = e, e = e.U; } while (!r.C); r && (r.C = !1); } } }; function jy(r, e) { var t = e, n = e.R, i = t.U; i ? i.L === t ? i.L = n : i.R = n : r._ = n, n.U = i, t.U = n, t.R = n.L, t.R && (t.R.U = t), n.L = t; } function Yy(r, e) { var t = e, n = e.L, i = t.U; i ? i.L === t ? i.L = n : i.R = n : r._ = n, n.U = i, t.U = n, t.L = n.R, t.L && (t.L.U = t), n.R = t; } function jB(r) { for (; r.L; ) r = r.L; return r; } function V0(r, e, t, n) { var i = [null, null], a = Wa.push(i) - 1; return i.left = r, i.right = e, t && MS(i, r, e, t), n && MS(i, e, r, n), is[r.index].halfedges.push(a), is[e.index].halfedges.push(a), i; } function Xy(r, e, t) { var n = [e, t]; return n.left = r, n; } function MS(r, e, t, n) { !r[0] && !r[1] ? (r[0] = n, r.left = e, r.right = t) : r.left === t ? r[1] = n : r[0] = n; } function Dce(r, e, t, n, i) { var a = r[0], o = r[1], s = a[0], u = a[1], l = o[0], c = o[1], f = 0, h = 1, p = l - s, d = c - u, v; if (v = e - s, !(!p && v > 0)) { if (v /= p, p < 0) { if (v < f) return; v < h && (h = v); } else if (p > 0) { if (v > h) return; v > f && (f = v); } if (v = n - s, !(!p && v < 0)) { if (v /= p, p < 0) { if (v > h) return; v > f && (f = v); } else if (p > 0) { if (v < f) return; v < h && (h = v); } if (v = t - u, !(!d && v > 0)) { if (v /= d, d < 0) { if (v < f) return; v < h && (h = v); } else if (d > 0) { if (v > h) return; v > f && (f = v); } if (v = i - u, !(!d && v < 0)) { if (v /= d, d < 0) { if (v > h) return; v > f && (f = v); } else if (d > 0) { if (v < f) return; v < h && (h = v); } return !(f > 0) && !(h < 1) || (f > 0 && (r[0] = [s + f * p, u + f * d]), h < 1 && (r[1] = [s + h * p, u + h * d])), !0; } } } } } function Mce(r, e, t, n, i) { var a = r[1]; if (a) return !0; var o = r[0], s = r.left, u = r.right, l = s[0], c = s[1], f = u[0], h = u[1], p = (l + f) / 2, d = (c + h) / 2, v, g; if (h === c) { if (p < e || p >= n) return; if (l > f) { if (!o) o = [p, t]; else if (o[1] >= i) return; a = [p, i]; } else { if (!o) o = [p, i]; else if (o[1] < t) return; a = [p, t]; } } else if (v = (l - f) / (h - c), g = d - v * p, v < -1 || v > 1) if (l > f) { if (!o) o = [(t - g) / v, t]; else if (o[1] >= i) return; a = [(i - g) / v, i]; } else { if (!o) o = [(i - g) / v, i]; else if (o[1] < t) return; a = [(t - g) / v, t]; } else if (c < h) { if (!o) o = [e, v * e + g]; else if (o[0] >= n) return; a = [n, v * n + g]; } else { if (!o) o = [n, v * n + g]; else if (o[0] < e) return; a = [e, v * e + g]; } return r[0] = o, r[1] = a, !0; } function Oce(r, e, t, n) { for (var i = Wa.length, a; i--; ) (!Mce(a = Wa[i], r, e, t, n) || !Dce(a, r, e, t, n) || !(Math.abs(a[0][0] - a[1][0]) > ln || Math.abs(a[0][1] - a[1][1]) > ln)) && delete Wa[i]; } function Rce(r) { return is[r.index] = { site: r, halfedges: [] }; } function Nce(r, e) { var t = r.site, n = e.left, i = e.right; return t === i && (i = n, n = t), i ? Math.atan2(i[1] - n[1], i[0] - n[0]) : (t === n ? (n = e[1], i = e[0]) : (n = e[0], i = e[1]), Math.atan2(n[0] - i[0], i[1] - n[1])); } function $U(r, e) { return e[+(e.left !== r.site)]; } function Fce(r, e) { return e[+(e.left === r.site)]; } function Bce() { for (var r = 0, e = is.length, t, n, i, a; r < e; ++r) if ((t = is[r]) && (a = (n = t.halfedges).length)) { var o = new Array(a), s = new Array(a); for (i = 0; i < a; ++i) o[i] = i, s[i] = Nce(t, Wa[n[i]]); for (o.sort(function(u, l) { return s[l] - s[u]; }), i = 0; i < a; ++i) s[i] = n[o[i]]; for (i = 0; i < a; ++i) n[i] = s[i]; } } function kce(r, e, t, n) { var i = is.length, a, o, s, u, l, c, f, h, p, d, v, g, m = !0; for (a = 0; a < i; ++a) if (o = is[a]) { for (s = o.site, l = o.halfedges, u = l.length; u--; ) Wa[l[u]] || l.splice(u, 1); for (u = 0, c = l.length; u < c; ) d = Fce(o, Wa[l[u]]), v = d[0], g = d[1], f = $U(o, Wa[l[++u % c]]), h = f[0], p = f[1], (Math.abs(v - h) > ln || Math.abs(g - p) > ln) && (l.splice(u, 0, Wa.push(Xy( s, d, Math.abs(v - r) < ln && n - g > ln ? [r, Math.abs(h - r) < ln ? p : n] : Math.abs(g - n) < ln && t - v > ln ? [Math.abs(p - n) < ln ? h : t, n] : Math.abs(v - t) < ln && g - e > ln ? [t, Math.abs(h - t) < ln ? p : e] : Math.abs(g - e) < ln && v - r > ln ? [Math.abs(p - e) < ln ? h : r, e] : null )) - 1), ++c); c && (m = !1); } if (m) { var y, _, w, x = 1 / 0; for (a = 0, m = null; a < i; ++a) (o = is[a]) && (s = o.site, y = s[0] - r, _ = s[1] - e, w = y * y + _ * _, w < x && (x = w, m = o)); if (m) { var C = [r, e], S = [r, n], b = [t, n], E = [t, e]; m.halfedges.push( Wa.push(Xy(s = m.site, C, S)) - 1, Wa.push(Xy(s, S, b)) - 1, Wa.push(Xy(s, b, E)) - 1, Wa.push(Xy(s, E, C)) - 1 ); } } for (a = 0; a < i; ++a) (o = is[a]) && (o.halfedges.length || delete is[a]); } var HU = [], JO; function Vce() { Ub(this), this.x = this.y = this.arc = this.site = this.cy = null; } function Ag(r) { var e = r.P, t = r.N; if (!(!e || !t)) { var n = e.site, i = r.site, a = t.site; if (n !== a) { var o = i[0], s = i[1], u = n[0] - o, l = n[1] - s, c = a[0] - o, f = a[1] - s, h = 2 * (u * f - l * c); if (!(h >= -Uce)) { var p = u * u + l * l, d = c * c + f * f, v = (f * p - l * d) / h, g = (u * d - c * p) / h, m = HU.pop() || new Vce(); m.arc = r, m.site = i, m.x = v + o, m.y = (m.cy = g + s) + Math.sqrt(v * v + g * g), r.circle = m; for (var y = null, _ = H_._; _; ) if (m.y < _.y || m.y === _.y && m.x <= _.x) if (_.L) _ = _.L; else { y = _.P; break; } else if (_.R) _ = _.R; else { y = _; break; } H_.insert(y, m), y || (JO = m); } } } } function Gg(r) { var e = r.circle; e && (e.P || (JO = e.N), H_.remove(e), HU.push(e), Ub(e), r.circle = null); } var UU = []; function Gce() { Ub(this), this.edge = this.site = this.circle = null; } function YB(r) { var e = UU.pop() || new Gce(); return e.site = r, e; } function tI(r) { Gg(r), zg.remove(r), UU.push(r), Ub(r); } function zce(r) { var e = r.circle, t = e.x, n = e.cy, i = [t, n], a = r.P, o = r.N, s = [r]; tI(r); for (var u = a; u.circle && Math.abs(t - u.circle.x) < ln && Math.abs(n - u.circle.cy) < ln; ) a = u.P, s.unshift(u), tI(u), u = a; s.unshift(u), Gg(u); for (var l = o; l.circle && Math.abs(t - l.circle.x) < ln && Math.abs(n - l.circle.cy) < ln; ) o = l.N, s.push(l), tI(l), l = o; s.push(l), Gg(l); var c = s.length, f; for (f = 1; f < c; ++f) l = s[f], u = s[f - 1], MS(l.edge, u.site, l.site, i); u = s[0], l = s[c - 1], l.edge = V0(u.site, l.site, null, i), Ag(u), Ag(l); } function $ce(r) { for (var e = r[0], t = r[1], n, i, a, o, s = zg._; s; ) if (a = WU(s, t) - e, a > ln) s = s.L; else if (o = e - Hce(s, t), o > ln) { if (!s.R) { n = s; break; } s = s.R; } else { a > -ln ? (n = s.P, i = s) : o > -ln ? (n = s, i = s.N) : n = i = s; break; } Rce(r); var u = YB(r); if (zg.insert(n, u), !(!n && !i)) { if (n === i) { Gg(n), i = YB(n.site), zg.insert(u, i), u.edge = i.edge = V0(n.site, u.site), Ag(n), Ag(i); return; } if (!i) { u.edge = V0(n.site, u.site); return; } Gg(n), Gg(i); var l = n.site, c = l[0], f = l[1], h = r[0] - c, p = r[1] - f, d = i.site, v = d[0] - c, g = d[1] - f, m = 2 * (h * g - p * v), y = h * h + p * p, _ = v * v + g * g, w = [(g * y - p * _) / m + c, (h * _ - v * y) / m + f]; MS(i.edge, l, d, w), u.edge = V0(l, r, null, w), i.edge = V0(r, d, null, w), Ag(n), Ag(i); } } function WU(r, e) { var t = r.site, n = t[0], i = t[1], a = i - e; if (!a) return n; var o = r.P; if (!o) return -1 / 0; t = o.site; var s = t[0], u = t[1], l = u - e; if (!l) return s; var c = s - n, f = 1 / a - 1 / l, h = c / l; return f ? (-h + Math.sqrt(h * h - 2 * f * (c * c / (-2 * l) - u + l / 2 + i - a / 2))) / f + n : (n + s) / 2; } function Hce(r, e) { var t = r.N; if (t) return WU(t, e); var n = r.site; return n[1] === e ? n[0] : 1 / 0; } var ln = 1e-6, Uce = 1e-12, zg, is, H_, Wa; function Wce(r, e, t) { return (r[0] - t[0]) * (e[1] - r[1]) - (r[0] - e[0]) * (t[1] - r[1]); } function jce(r, e) { return e[1] - r[1] || e[0] - r[0]; } function TD(r, e) { var t = r.sort(jce).pop(), n, i, a; for (Wa = [], is = new Array(r.length), zg = new DS(), H_ = new DS(); ; ) if (a = JO, t && (!a || t[1] < a.y || t[1] === a.y && t[0] < a.x)) (t[0] !== n || t[1] !== i) && ($ce(t), n = t[0], i = t[1]), t = r.pop(); else if (a) zce(a.arc); else break; if (Bce(), e) { var o = +e[0][0], s = +e[0][1], u = +e[1][0], l = +e[1][1]; Oce(o, s, u, l), kce(o, s, u, l); } this.edges = Wa, this.cells = is, zg = H_ = Wa = is = null; } TD.prototype = { constructor: TD, polygons: function() { var r = this.edges; return this.cells.map(function(e) { var t = e.halfedges.map(function(n) { return $U(e, r[n]); }); return t.data = e.site.data, t; }); }, triangles: function() { var r = [], e = this.edges; return this.cells.forEach(function(t, n) { if (!!(s = (a = t.halfedges).length)) for (var i = t.site, a, o = -1, s, u, l = e[a[s - 1]], c = l.left === i ? l.right : l.left; ++o < s; ) u = c, l = e[a[o]], c = l.left === i ? l.right : l.left, u && c && n < u.index && n < c.index && Wce(i, u, c) < 0 && r.push([i.data, u.data, c.data]); }), r; }, links: function() { return this.edges.filter(function(r) { return r.right; }).map(function(r) { return { source: r.left.data, target: r.right.data }; }); }, find: function(r, e, t) { for (var n = this, i, a = n._found || 0, o = n.cells.length, s; !(s = n.cells[a]); ) if (++a >= o) return null; var u = r - s.site[0], l = e - s.site[1], c = u * u + l * l; do s = n.cells[i = a], a = null, s.halfedges.forEach(function(f) { var h = n.edges[f], p = h.left; if (!((p === s.site || !p) && !(p = h.right))) { var d = r - p[0], v = e - p[1], g = d * d + v * v; g < c && (c = g, a = p.index); } }); while (a !== null); return n._found = i, t == null || c <= t * t ? s.site : null; } }; function Yce() { var r = Ace, e = Lce, t = null; function n(i) { return new TD(i.map(function(a, o) { var s = [Math.round(r(a, o, i) / ln) * ln, Math.round(e(a, o, i) / ln) * ln]; return s.index = o, s.data = a, s; }), t); } return n.polygons = function(i) { return n(i).polygons(); }, n.links = function(i) { return n(i).links(); }, n.triangles = function(i) { return n(i).triangles(); }, n.x = function(i) { return arguments.length ? (r = typeof i == "function" ? i : WB(+i), n) : r; }, n.y = function(i) { return arguments.length ? (e = typeof i == "function" ? i : WB(+i), n) : e; }, n.extent = function(i) { return arguments.length ? (t = i == null ? null : [[+i[0][0], +i[0][1]], [+i[1][0], +i[1][1]]], n) : t && [[t[0][0], t[0][1]], [t[1][0], t[1][1]]]; }, n.size = function(i) { return arguments.length ? (t = i == null ? null : [[0, 0], [+i[0], +i[1]]], n) : t && [t[1][0] - t[0][0], t[1][1] - t[0][1]]; }, n; } function Xce(r) { return r = r.slice(), r.push(r[0]), Nt([r]); } function qce(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.bbox || [-180, -85, 180, 85]; if (!r) throw new Error("points is required"); if (!Array.isArray(t)) throw new Error("bbox is invalid"); return df(r, "Point", "points"), lt( Yce().x(function(n) { return n.geometry.coordinates[0]; }).y(function(n) { return n.geometry.coordinates[1]; }).extent([ [t[0], t[1]], [t[2], t[3]] ]).polygons(r.features).map(Xce) ); } function jU(r, e, t, n) { n = n || {}; var i = n.steps || 64, a = n.units || "kilometers", o = n.angle || 0, s = n.pivot || r, u = n.properties || r.properties || {}; if (!r) throw new Error("center is required"); if (!e) throw new Error("xSemiAxis is required"); if (!t) throw new Error("ySemiAxis is required"); if (!$r(n)) throw new Error("options must be an object"); if (!Mi(i)) throw new Error("steps must be a number"); if (!Mi(o)) throw new Error("angle must be a number"); var l = qr(r); if (a === "degrees") var c = Ii(o); else e = am(r, e, 90, { units: a }), t = am(r, t, 0, { units: a }), e = qr(e)[0] - l[0], t = qr(t)[1] - l[1]; for (var f = [], h = 0; h < i; h += 1) { var p = h * -360 / i, d = e * t / Math.sqrt( Math.pow(t, 2) + Math.pow(e, 2) * Math.pow(XB(p), 2) ), v = e * t / Math.sqrt( Math.pow(e, 2) + Math.pow(t, 2) / Math.pow(XB(p), 2) ); if (p < -90 && p >= -270 && (d = -d), p < -180 && p >= -360 && (v = -v), a === "degrees") { var g = d * Math.cos(c) + v * Math.sin(c), m = v * Math.cos(c) - d * Math.sin(c); d = g, v = m; } f.push([d + l[0], v + l[1]]); } return f.push(f[0]), a === "degrees" ? Nt([f], u) : PU(Nt([f], u), o, { pivot: s }); } function XB(r) { var e = r * Math.PI / 180; return Math.tan(e); } function QO(r, e) { e === void 0 && (e = {}); var t = 0, n = 0, i = 0; return Bo(r, function(a, o, s) { var u = e.weight ? s == null ? void 0 : s[e.weight] : void 0; if (u = u == null ? 1 : u, !Mi(u)) throw new Error("weight value must be a number for feature index " + o); u = Number(u), u > 0 && Fn(a, function(l) { t += l[0] * u, n += l[1] * u, i += u; }); }), Lt([t / i, n / i], e.properties, e); } function Zce(r, e) { if (e === void 0 && (e = {}), e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.counter || 10; if (!Mi(t)) throw new Error("counter must be a number"); var n = e.weight, i = QO(r, { weight: e.weight }), a = lt([]); Dr(r, function(s) { var u; a.features.push(wh(s, { properties: { weight: (u = s.properties) === null || u === void 0 ? void 0 : u[n] } })); }); var o = { tolerance: e.tolerance, medianCandidates: [] }; return YU(i.geometry.coordinates, [0, 0], a, o, t); } function YU(r, e, t, n, i) { var a = n.tolerance || 1e-3, o = 0, s = 0, u = 0, l = 0; if (Dr(t, function(h) { var p, d = (p = h.properties) === null || p === void 0 ? void 0 : p.weight, v = d == null ? 1 : d; if (v = Number(v), !Mi(v)) throw new Error("weight value must be a number"); if (v > 0) { l += 1; var g = v * zr(h, r); g === 0 && (g = 1); var m = v / g; o += h.geometry.coordinates[0] * m, s += h.geometry.coordinates[1] * m, u += m; } }), l < 1) throw new Error("no features to measure"); var c = o / u, f = s / u; return l === 1 || i === 0 || Math.abs(c - e[0]) < a && Math.abs(f - e[1]) < a ? Lt([c, f], { medianCandidates: n.medianCandidates }) : (n.medianCandidates.push([c, f]), YU([c, f], r, t, n, i - 1)); } function Kce(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.steps || 64, n = e.weight, i = e.properties || {}; if (!Mi(t)) throw new Error("steps must be a number"); if (!$r(i)) throw new Error("properties must be a number"); var a = nm(r).length, o = QO(r, { weight: n }), s = 0, u = 0, l = 0; Dr(r, function(S) { var b = S.properties[n] || 1, E = qB(pt(S), pt(o)); s += Math.pow(E.x, 2) * b, u += Math.pow(E.y, 2) * b, l += E.x * E.y * b; }); var c = s - u, f = Math.sqrt(Math.pow(c, 2) + 4 * Math.pow(l, 2)), h = 2 * l, p = Math.atan((c + f) / h), d = p * 180 / Math.PI, v = 0, g = 0, m = 0; Dr(r, function(S) { var b = S.properties[n] || 1, E = qB(pt(S), pt(o)); v += Math.pow( E.x * Math.cos(p) - E.y * Math.sin(p), 2 ) * b, g += Math.pow( E.x * Math.sin(p) + E.y * Math.cos(p), 2 ) * b, m += b; }); var y = Math.sqrt(2 * v / m), _ = Math.sqrt(2 * g / m), w = jU(o, y, _, { units: "degrees", angle: d, steps: t, properties: i }), x = uD( r, lt([w]) ), C = { meanCenterCoordinates: pt(o), semiMajorAxis: y, semiMinorAxis: _, numberOfFeatures: a, angle: d, percentageWithinEllipse: 100 * nm(x).length / a }; return w.properties.standardDeviationalEllipse = C, w; } function qB(r, e) { return { x: r[0] - e[0], y: r[1] - e[1] }; } function Jce(r, e, t, n) { if (n === void 0 && (n = {}), !$r(n)) throw new Error("options is invalid"); if (!r) throw new Error("startPoint is required"); if (!e) throw new Error("midPoint is required"); if (!t) throw new Error("endPoint is required"); var i = r, a = e, o = t, s = gd(n.mercator !== !0 ? Hc(i, a) : xd(i, a)), u = gd(n.mercator !== !0 ? Hc(o, a) : xd(o, a)), l = Math.abs(s - u); return n.explementary === !0 ? 360 - l : l; } function Qce(r, e) { var t = [], n = e.iterations || 1; if (!r) throw new Error("inputPolys is required"); return Bo(r, function(i, a, o) { var s, u, l; switch (i.type) { case "Polygon": s = [[]]; for (var c = 0; c < n; c++) l = [[]], u = i, c > 0 && (u = Nt(s).geometry), efe(u, l), s = l.slice(0); t.push(Nt(s, o)); break; case "MultiPolygon": s = [[[]]]; for (var f = 0; f < n; f++) l = [[[]]], u = i, f > 0 && (u = Fo(s).geometry), tfe(u, l), s = l.slice(0); t.push(Fo(s, o)); break; default: throw new Error("geometry is invalid, must be Polygon or MultiPolygon"); } }), lt(t); } function efe(r, e) { var t = 0, n = 0; Fn( r, function(i, a, o, s, u) { u > t && (t = u, n = a, e.push([])); var l = a - n, c = r.coordinates[u][l + 1], f = i[0], h = i[1], p = c[0], d = c[1]; e[u].push([ 0.75 * f + 0.25 * p, 0.75 * h + 0.25 * d ]), e[u].push([ 0.25 * f + 0.75 * p, 0.25 * h + 0.75 * d ]); }, !0 ), e.forEach(function(i) { i.push(i[0]); }); } function tfe(r, e) { var t = 0, n = 0, i = 0; Fn( r, function(a, o, s, u, l) { u > i && (i = u, n = o, e.push([[]])), l > t && (t = l, n = o, e[u].push([])); var c = o - n, f = r.coordinates[u][l][c + 1], h = a[0], p = a[1], d = f[0], v = f[1]; e[u][l].push([ 0.75 * h + 0.25 * d, 0.75 * p + 0.25 * v ]), e[u][l].push([ 0.25 * h + 0.75 * d, 0.25 * p + 0.75 * v ]); }, !0 ), e.forEach(function(a) { a.forEach(function(o) { o.push(o[0]); }); }); } function rfe(r, e, t) { t === void 0 && (t = 2); var n = qr(r), i = qr(e), a = n[0] - i[0], o = n[1] - i[1]; return t === 1 ? Math.abs(a) + Math.abs(o) : Math.pow(Math.pow(a, t) + Math.pow(o, t), 1 / t); } function XU(r, e) { e = e || {}; var t = e.threshold || 1e4, n = e.p || 2, i = e.binary || !1, a = e.alpha || -1, o = e.standardization || !1, s = []; Dr(r, function(p) { s.push(wh(p)); }); for (var u = [], l = 0; l < s.length; l++) u[l] = []; for (var l = 0; l < s.length; l++) for (var c = l; c < s.length; c++) { l === c && (u[l][c] = 0); var f = rfe(s[l], s[c], n); u[l][c] = f, u[c][l] = f; } for (var l = 0; l < s.length; l++) for (var c = 0; c < s.length; c++) { var f = u[l][c]; f !== 0 && (i ? f <= t ? u[l][c] = 1 : u[l][c] = 0 : f <= t ? u[l][c] = Math.pow(f, a) : u[l][c] = 0); } if (o) for (var l = 0; l < s.length; l++) for (var h = u[l].reduce(function(d, v) { return d + v; }, 0), c = 0; c < s.length; c++) u[l][c] = u[l][c] / h; return u; } function nfe(r, e) { var t = e.inputField, n = e.threshold || 1e5, i = e.p || 2, a = e.binary || !1, o = e.alpha || -1, s = e.standardization || !0, u = XU(r, { alpha: o, binary: a, p: i, standardization: s, threshold: n }), l = []; Dr(r, function(P) { var I = P.properties || {}; l.push(I[t]); }); for (var c = qU(l), f = ife(l), h = 0, p = 0, d = 0, v = 0, g = u.length, m = 0; m < g; m++) { for (var y = 0, _ = 0; _ < g; _++) h += u[m][_] * (l[m] - c) * (l[_] - c), p += u[m][_], d += Math.pow(u[m][_] + u[_][m], 2), y += u[m][_] + u[_][m]; v += Math.pow(y, 2); } d = 0.5 * d; var w = h / p / f, x = -1 / (g - 1), C = g * g * d - g * v + 3 * (p * p), S = (g - 1) * (g + 1) * (p * p), b = C / S - x * x, E = Math.sqrt(b), T = (w - x) / E; return { expectedMoranIndex: x, moranIndex: w, stdNorm: E, zNorm: T }; } function qU(r) { for (var e = 0, t = 0, n = r; t < n.length; t++) { var i = n[t]; e += i; } return e / r.length; } function ife(r) { for (var e = qU(r), t = 0, n = 0, i = r; n < i.length; n++) { var a = i[n]; t += Math.pow(a - e, 2); } return t / r.length; } function ZU(r, e) { return e === void 0 && (e = {}), JU(r, "mercator", e); } function KU(r, e) { return e === void 0 && (e = {}), JU(r, "wgs84", e); } function JU(r, e, t) { t === void 0 && (t = {}), t = t || {}; var n = t.mutate; if (!r) throw new Error("geojson is required"); return Array.isArray(r) && Mi(r[0]) ? r = e === "mercator" ? ZB(r) : KB(r) : (n !== !0 && (r = da(r)), Fn(r, function(i) { var a = e === "mercator" ? ZB(i) : KB(i); i[0] = a[0], i[1] = a[1]; })), r; } function ZB(r) { var e = Math.PI / 180, t = 6378137, n = 20037508342789244e-9, i = Math.abs(r[0]) <= 180 ? r[0] : r[0] - afe(r[0]) * 360, a = [ t * i * e, t * Math.log(Math.tan(Math.PI * 0.25 + 0.5 * r[1] * e)) ]; return a[0] > n && (a[0] = n), a[0] < -n && (a[0] = -n), a[1] > n && (a[1] = n), a[1] < -n && (a[1] = -n), a; } function KB(r) { var e = 180 / Math.PI, t = 6378137; return [ r[0] * e / t, (Math.PI * 0.5 - 2 * Math.atan(Math.exp(-r[1] / t))) * e ]; } function afe(r) { return r < 0 ? -1 : r > 0 ? 1 : 0; } const ofe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, toMercator: ZU, toWgs84: KU }, Symbol.toStringTag, { value: "Module" })); var sfe = globalThis && globalThis.__spreadArrays || function() { for (var r = 0, e = 0, t = arguments.length; e < t; e++) r += arguments[e].length; for (var n = Array(r), i = 0, e = 0; e < t; e++) for (var a = arguments[e], o = 0, s = a.length; o < s; o++, i++) n[i] = a[o]; return n; }; function Q1(r) { return Array.isArray(r) ? JB(r) : r && r.bbox ? JB(r.bbox) : [lfe(), cfe()]; } function QU(r, e) { e === void 0 && (e = {}), r == null && (r = 1); for (var t = [], n = 0; n < r; n++) t.push(Lt(Q1(e.bbox))); return lt(t); } function eW(r, e) { e === void 0 && (e = {}), r == null && (r = 1), (!Mi(e.num_vertices) || e.num_vertices === void 0) && (e.num_vertices = 10), (!Mi(e.max_radial_length) || e.max_radial_length === void 0) && (e.max_radial_length = 10); for (var t = [], n = function(a) { var o = [], s = sfe(Array(e.num_vertices + 1)).map(Math.random); s.forEach(function(u, l, c) { c[l] = l > 0 ? u + c[l - 1] : u; }), s.forEach(function(u) { u = u * 2 * Math.PI / s[s.length - 1]; var l = Math.random(); o.push([ l * (e.max_radial_length || 10) * Math.sin(u), l * (e.max_radial_length || 10) * Math.cos(u) ]); }), o[o.length - 1] = o[0], o = o.map(ufe(Q1(e.bbox))), t.push(Nt([o])); }, i = 0; i < r; i++) n(); return lt(t); } function tW(r, e) { if (e === void 0 && (e = {}), e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.bbox, n = e.num_vertices, i = e.max_length, a = e.max_rotation; r == null && (r = 1), (!Mi(n) || n === void 0 || n < 2) && (n = 10), (!Mi(i) || i === void 0) && (i = 1e-4), (!Mi(a) || a === void 0) && (a = Math.PI / 8); for (var o = [], s = 0; s < r; s++) { for (var u = Q1(t), l = [u], c = 0; c < n - 1; c++) { var f = c === 0 ? Math.random() * 2 * Math.PI : Math.tan((l[c][1] - l[c - 1][1]) / (l[c][0] - l[c - 1][0])), h = f + (Math.random() - 0.5) * a * 2, p = Math.random() * i; l.push([ l[c][0] + p * Math.cos(h), l[c][1] + p * Math.sin(h) ]); } o.push(Br(l)); } return lt(o); } function ufe(r) { return function(e) { return [e[0] + r[0], e[1] + r[1]]; }; } function rW() { return Math.random() - 0.5; } function lfe() { return rW() * 360; } function cfe() { return rW() * 180; } function JB(r) { return [ Math.random() * (r[2] - r[0]) + r[0], Math.random() * (r[3] - r[1]) + r[1] ]; } const ffe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, randomPosition: Q1, randomPoint: QU, randomPolygon: eW, randomLineString: tW }, Symbol.toStringTag, { value: "Module" })); function nW(r, e) { if (!r) throw new Error("geojson is required"); if (r.type !== "FeatureCollection") throw new Error("geojson must be a FeatureCollection"); if (e == null) throw new Error("filter is required"); var t = []; return Dr(r, function(n) { Wb(n.properties, e) && t.push(n); }), lt(t); } function eR(r, e, t) { if (!r) throw new Error("geojson is required"); if (r.type !== "FeatureCollection") throw new Error("geojson must be a FeatureCollection"); if (e == null) throw new Error("property is required"); for (var n = tR(r, e), i = Object.keys(n), a = 0; a < i.length; a++) { for (var o = i[a], s = n[o], u = [], l = 0; l < s.length; l++) u.push(r.features[s[l]]); t(lt(u), o, a); } } function iW(r, e, t, n) { var i = n; return eR(r, e, function(a, o, s) { s === 0 && n === void 0 ? i = a : i = t(i, a, o, s); }), i; } function tR(r, e) { var t = {}; return Dr(r, function(n, i) { var a = n.properties || {}; if (Object.prototype.hasOwnProperty.call(a, String(e))) { var o = a[e]; Object.prototype.hasOwnProperty.call(t, o) ? t[o].push(i) : t[o] = [i]; } }), t; } function Wb(r, e) { if (r === void 0) return !1; var t = typeof e; if (t === "number" || t === "string") return Object.prototype.hasOwnProperty.call(r, e); if (Array.isArray(e)) { for (var n = 0; n < e.length; n++) if (!Wb(r, e[n])) return !1; return !0; } else return rR(r, e); } function rR(r, e) { for (var t = Object.keys(e), n = 0; n < t.length; n++) { var i = t[n]; if (r[i] !== e[i]) return !1; } return !0; } function aW(r, e) { if (!e) return {}; if (!e.length) return {}; for (var t = {}, n = 0; n < e.length; n++) { var i = e[n]; Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]); } return t; } const hfe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, getCluster: nW, clusterEach: eR, clusterReduce: iW, createBins: tR, applyFilter: Wb, propertiesContainsFilter: rR, filterProperties: aW }, Symbol.toStringTag, { value: "Module" })); /** * splaytree v3.1.1 * Fast Splay tree for Node and browser * * @author Alexander Milevski * @license MIT * @preserve */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ function pfe(r, e) { var t = { label: 0, sent: function() { if (a[0] & 1) throw a[1]; return a[1]; }, trys: [], ops: [] }, n, i, a, o; return o = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() { return this; }), o; function s(l) { return function(c) { return u([l, c]); }; } function u(l) { if (n) throw new TypeError("Generator is already executing."); for (; t; ) try { if (n = 1, i && (a = l[0] & 2 ? i.return : l[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, l[1])).done) return a; switch (i = 0, a && (l = [l[0] & 2, a.value]), l[0]) { case 0: case 1: a = l; break; case 4: return t.label++, { value: l[1], done: !1 }; case 5: t.label++, i = l[1], l = [0]; continue; case 7: l = t.ops.pop(), t.trys.pop(); continue; default: if (a = t.trys, !(a = a.length > 0 && a[a.length - 1]) && (l[0] === 6 || l[0] === 2)) { t = 0; continue; } if (l[0] === 3 && (!a || l[1] > a[0] && l[1] < a[3])) { t.label = l[1]; break; } if (l[0] === 6 && t.label < a[1]) { t.label = a[1], a = l; break; } if (a && t.label < a[2]) { t.label = a[2], t.ops.push(l); break; } a[2] && t.ops.pop(), t.trys.pop(); continue; } l = e.call(r, t); } catch (c) { l = [6, c], i = 0; } finally { n = a = 0; } if (l[0] & 5) throw l[1]; return { value: l[0] ? l[1] : void 0, done: !0 }; } } var xh = function() { function r(e, t) { this.next = null, this.key = e, this.data = t, this.left = null, this.right = null; } return r; }(); function dfe(r, e) { return r > e ? 1 : r < e ? -1 : 0; } function jf(r, e, t) { for (var n = new xh(null, null), i = n, a = n; ; ) { var o = t(r, e.key); if (o < 0) { if (e.left === null) break; if (t(r, e.left.key) < 0) { var s = e.left; if (e.left = s.right, s.right = e, e = s, e.left === null) break; } a.left = e, a = e, e = e.left; } else if (o > 0) { if (e.right === null) break; if (t(r, e.right.key) > 0) { var s = e.right; if (e.right = s.left, s.left = e, e = s, e.right === null) break; } i.right = e, i = e, e = e.right; } else break; } return i.right = e.left, a.left = e.right, e.left = n.right, e.right = n.left, e; } function rI(r, e, t, n) { var i = new xh(r, e); if (t === null) return i.left = i.right = null, i; t = jf(r, t, n); var a = n(r, t.key); return a < 0 ? (i.left = t.left, i.right = t, t.left = null) : a >= 0 && (i.right = t.right, i.left = t, t.right = null), i; } function QB(r, e, t) { var n = null, i = null; if (e) { e = jf(r, e, t); var a = t(e.key, r); a === 0 ? (n = e.left, i = e.right) : a < 0 ? (i = e.right, e.right = null, n = e) : (n = e.left, e.left = null, i = e); } return { left: n, right: i }; } function vfe(r, e, t) { return e === null ? r : (r === null || (e = jf(r.key, e, t), e.left = r), e); } function PD(r, e, t, n, i) { if (r) { n("" + e + (t ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ") + i(r) + ` `); var a = e + (t ? " " : "\u2502 "); r.left && PD(r.left, a, !1, n, i), r.right && PD(r.right, a, !0, n, i); } } var nR = function() { function r(e) { e === void 0 && (e = dfe), this._root = null, this._size = 0, this._comparator = e; } return r.prototype.insert = function(e, t) { return this._size++, this._root = rI(e, t, this._root, this._comparator); }, r.prototype.add = function(e, t) { var n = new xh(e, t); this._root === null && (n.left = n.right = null, this._size++, this._root = n); var i = this._comparator, a = jf(e, this._root, i), o = i(e, a.key); return o === 0 ? this._root = a : (o < 0 ? (n.left = a.left, n.right = a, a.left = null) : o > 0 && (n.right = a.right, n.left = a, a.right = null), this._size++, this._root = n), this._root; }, r.prototype.remove = function(e) { this._root = this._remove(e, this._root, this._comparator); }, r.prototype._remove = function(e, t, n) { var i; if (t === null) return null; t = jf(e, t, n); var a = n(e, t.key); return a === 0 ? (t.left === null ? i = t.right : (i = jf(e, t.left, n), i.right = t.right), this._size--, i) : t; }, r.prototype.pop = function() { var e = this._root; if (e) { for (; e.left; ) e = e.left; return this._root = jf(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data }; } return null; }, r.prototype.findStatic = function(e) { for (var t = this._root, n = this._comparator; t; ) { var i = n(e, t.key); if (i === 0) return t; i < 0 ? t = t.left : t = t.right; } return null; }, r.prototype.find = function(e) { return this._root && (this._root = jf(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root; }, r.prototype.contains = function(e) { for (var t = this._root, n = this._comparator; t; ) { var i = n(e, t.key); if (i === 0) return !0; i < 0 ? t = t.left : t = t.right; } return !1; }, r.prototype.forEach = function(e, t) { for (var n = this._root, i = [], a = !1; !a; ) n !== null ? (i.push(n), n = n.left) : i.length !== 0 ? (n = i.pop(), e.call(t, n), n = n.right) : a = !0; return this; }, r.prototype.range = function(e, t, n, i) { for (var a = [], o = this._comparator, s = this._root, u; a.length !== 0 || s; ) if (s) a.push(s), s = s.left; else { if (s = a.pop(), u = o(s.key, t), u > 0) break; if (o(s.key, e) >= 0 && n.call(i, s)) return this; s = s.right; } return this; }, r.prototype.keys = function() { var e = []; return this.forEach(function(t) { var n = t.key; return e.push(n); }), e; }, r.prototype.values = function() { var e = []; return this.forEach(function(t) { var n = t.data; return e.push(n); }), e; }, r.prototype.min = function() { return this._root ? this.minNode(this._root).key : null; }, r.prototype.max = function() { return this._root ? this.maxNode(this._root).key : null; }, r.prototype.minNode = function(e) { if (e === void 0 && (e = this._root), e) for (; e.left; ) e = e.left; return e; }, r.prototype.maxNode = function(e) { if (e === void 0 && (e = this._root), e) for (; e.right; ) e = e.right; return e; }, r.prototype.at = function(e) { for (var t = this._root, n = !1, i = 0, a = []; !n; ) if (t) a.push(t), t = t.left; else if (a.length > 0) { if (t = a.pop(), i === e) return t; i++, t = t.right; } else n = !0; return null; }, r.prototype.next = function(e) { var t = this._root, n = null; if (e.right) { for (n = e.right; n.left; ) n = n.left; return n; } for (var i = this._comparator; t; ) { var a = i(e.key, t.key); if (a === 0) break; a < 0 ? (n = t, t = t.left) : t = t.right; } return n; }, r.prototype.prev = function(e) { var t = this._root, n = null; if (e.left !== null) { for (n = e.left; n.right; ) n = n.right; return n; } for (var i = this._comparator; t; ) { var a = i(e.key, t.key); if (a === 0) break; a < 0 ? t = t.left : (n = t, t = t.right); } return n; }, r.prototype.clear = function() { return this._root = null, this._size = 0, this; }, r.prototype.toList = function() { return mfe(this._root); }, r.prototype.load = function(e, t, n) { t === void 0 && (t = []), n === void 0 && (n = !1); var i = e.length, a = this._comparator; if (n && LD(e, t, 0, i - 1, a), this._root === null) this._root = ID(e, t, 0, i), this._size = i; else { var o = yfe(this.toList(), gfe(e, t), a); i = this._size + i, this._root = AD({ head: o }, 0, i); } return this; }, r.prototype.isEmpty = function() { return this._root === null; }, Object.defineProperty(r.prototype, "size", { get: function() { return this._size; }, enumerable: !0, configurable: !0 }), Object.defineProperty(r.prototype, "root", { get: function() { return this._root; }, enumerable: !0, configurable: !0 }), r.prototype.toString = function(e) { e === void 0 && (e = function(n) { return String(n.key); }); var t = []; return PD(this._root, "", !0, function(n) { return t.push(n); }, e), t.join(""); }, r.prototype.update = function(e, t, n) { var i = this._comparator, a = QB(e, this._root, i), o = a.left, s = a.right; i(e, t) < 0 ? s = rI(t, n, s, i) : o = rI(t, n, o, i), this._root = vfe(o, s, i); }, r.prototype.split = function(e) { return QB(e, this._root, this._comparator); }, r.prototype[Symbol.iterator] = function() { var e; return pfe(this, function(t) { switch (t.label) { case 0: e = this.minNode(), t.label = 1; case 1: return e ? [4, e] : [3, 3]; case 2: return t.sent(), e = this.next(e), [3, 1]; case 3: return [2]; } }); }, r; }(); function ID(r, e, t, n) { var i = n - t; if (i > 0) { var a = t + Math.floor(i / 2), o = r[a], s = e[a], u = new xh(o, s); return u.left = ID(r, e, t, a), u.right = ID(r, e, a + 1, n), u; } return null; } function gfe(r, e) { for (var t = new xh(null, null), n = t, i = 0; i < r.length; i++) n = n.next = new xh(r[i], e[i]); return n.next = null, t.next; } function mfe(r) { for (var e = r, t = [], n = !1, i = new xh(null, null), a = i; !n; ) e ? (t.push(e), e = e.left) : t.length > 0 ? (e = a = a.next = t.pop(), e = e.right) : n = !0; return a.next = null, i.next; } function AD(r, e, t) { var n = t - e; if (n > 0) { var i = e + Math.floor(n / 2), a = AD(r, e, i), o = r.head; return o.left = a, r.head = r.head.next, o.right = AD(r, i + 1, t), o; } return null; } function yfe(r, e, t) { for (var n = new xh(null, null), i = n, a = r, o = e; a !== null && o !== null; ) t(a.key, o.key) < 0 ? (i.next = a, a = a.next) : (i.next = o, o = o.next), i = i.next; return a !== null ? i.next = a : o !== null && (i.next = o), n.next; } function LD(r, e, t, n, i) { if (!(t >= n)) { for (var a = r[t + n >> 1], o = t - 1, s = n + 1; ; ) { do o++; while (i(r[o], a) < 0); do s--; while (i(r[s], a) > 0); if (o >= s) break; var u = r[o]; r[o] = r[s], r[s] = u, u = e[o], e[o] = e[s], e[s] = u; } LD(r, e, t, s, i), LD(r, e, s + 1, n, i); } } function gu(r, e) { if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function"); } function ek(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n); } } function vo(r, e, t) { return e && ek(r.prototype, e), t && ek(r, t), r; } var qy = function(e, t) { return e.ll.x <= t.x && t.x <= e.ur.x && e.ll.y <= t.y && t.y <= e.ur.y; }, DD = function(e, t) { if (t.ur.x < e.ll.x || e.ur.x < t.ll.x || t.ur.y < e.ll.y || e.ur.y < t.ll.y) return null; var n = e.ll.x < t.ll.x ? t.ll.x : e.ll.x, i = e.ur.x < t.ur.x ? e.ur.x : t.ur.x, a = e.ll.y < t.ll.y ? t.ll.y : e.ll.y, o = e.ur.y < t.ur.y ? e.ur.y : t.ur.y; return { ll: { x: n, y: a }, ur: { x: i, y: o } }; }, Xf = Number.EPSILON; Xf === void 0 && (Xf = Math.pow(2, -52)); var _fe = Xf * Xf, MD = function(e, t) { if (-Xf < e && e < Xf && -Xf < t && t < Xf) return 0; var n = e - t; return n * n < _fe * e * t ? 0 : e < t ? -1 : 1; }, wfe = /* @__PURE__ */ function() { function r() { gu(this, r), this.reset(); } return vo(r, [{ key: "reset", value: function() { this.xRounder = new tk(), this.yRounder = new tk(); } }, { key: "round", value: function(t, n) { return { x: this.xRounder.round(t), y: this.yRounder.round(n) }; } }]), r; }(), tk = /* @__PURE__ */ function() { function r() { gu(this, r), this.tree = new nR(), this.round(0); } return vo(r, [{ key: "round", value: function(t) { var n = this.tree.add(t), i = this.tree.prev(n); if (i !== null && MD(n.key, i.key) === 0) return this.tree.remove(t), i.key; var a = this.tree.next(n); return a !== null && MD(n.key, a.key) === 0 ? (this.tree.remove(t), a.key) : t; } }]), r; }(), U_ = new wfe(), a_ = function(e, t) { return e.x * t.y - e.y * t.x; }, oW = function(e, t) { return e.x * t.x + e.y * t.y; }, rk = function(e, t, n) { var i = { x: t.x - e.x, y: t.y - e.y }, a = { x: n.x - e.x, y: n.y - e.y }, o = a_(i, a); return MD(o, 0); }, OS = function(e) { return Math.sqrt(oW(e, e)); }, xfe = function(e, t, n) { var i = { x: t.x - e.x, y: t.y - e.y }, a = { x: n.x - e.x, y: n.y - e.y }; return a_(a, i) / OS(a) / OS(i); }, Cfe = function(e, t, n) { var i = { x: t.x - e.x, y: t.y - e.y }, a = { x: n.x - e.x, y: n.y - e.y }; return oW(a, i) / OS(a) / OS(i); }, nk = function(e, t, n) { return t.y === 0 ? null : { x: e.x + t.x / t.y * (n - e.y), y: n }; }, ik = function(e, t, n) { return t.x === 0 ? null : { x: n, y: e.y + t.y / t.x * (n - e.x) }; }, Sfe = function(e, t, n, i) { if (t.x === 0) return ik(n, i, e.x); if (i.x === 0) return ik(e, t, n.x); if (t.y === 0) return nk(n, i, e.y); if (i.y === 0) return nk(e, t, n.y); var a = a_(t, i); if (a == 0) return null; var o = { x: n.x - e.x, y: n.y - e.y }, s = a_(o, t) / a, u = a_(o, i) / a, l = e.x + u * t.x, c = n.x + s * i.x, f = e.y + u * t.y, h = n.y + s * i.y, p = (l + c) / 2, d = (f + h) / 2; return { x: p, y: d }; }, Il = /* @__PURE__ */ function() { vo(r, null, [{ key: "compare", value: function(t, n) { var i = r.comparePoints(t.point, n.point); return i !== 0 ? i : (t.point !== n.point && t.link(n), t.isLeft !== n.isLeft ? t.isLeft ? 1 : -1 : RS.compare(t.segment, n.segment)); } }, { key: "comparePoints", value: function(t, n) { return t.x < n.x ? -1 : t.x > n.x ? 1 : t.y < n.y ? -1 : t.y > n.y ? 1 : 0; } }]); function r(e, t) { gu(this, r), e.events === void 0 ? e.events = [this] : e.events.push(this), this.point = e, this.isLeft = t; } return vo(r, [{ key: "link", value: function(t) { if (t.point === this.point) throw new Error("Tried to link already linked events"); for (var n = t.point.events, i = 0, a = n.length; i < a; i++) { var o = n[i]; this.point.events.push(o), o.point = this.point; } this.checkForConsuming(); } }, { key: "checkForConsuming", value: function() { for (var t = this.point.events.length, n = 0; n < t; n++) { var i = this.point.events[n]; if (i.segment.consumedBy === void 0) for (var a = n + 1; a < t; a++) { var o = this.point.events[a]; o.consumedBy === void 0 && i.otherSE.point.events === o.otherSE.point.events && i.segment.consume(o.segment); } } } }, { key: "getAvailableLinkedEvents", value: function() { for (var t = [], n = 0, i = this.point.events.length; n < i; n++) { var a = this.point.events[n]; a !== this && !a.segment.ringOut && a.segment.isInResult() && t.push(a); } return t; } }, { key: "getLeftmostComparator", value: function(t) { var n = this, i = /* @__PURE__ */ new Map(), a = function(s) { var u = s.otherSE; i.set(s, { sine: xfe(n.point, t.point, u.point), cosine: Cfe(n.point, t.point, u.point) }); }; return function(o, s) { i.has(o) || a(o), i.has(s) || a(s); var u = i.get(o), l = u.sine, c = u.cosine, f = i.get(s), h = f.sine, p = f.cosine; return l >= 0 && h >= 0 ? c < p ? 1 : c > p ? -1 : 0 : l < 0 && h < 0 ? c < p ? -1 : c > p ? 1 : 0 : h < l ? -1 : h > l ? 1 : 0; }; } }]), r; }(), Efe = 0, RS = /* @__PURE__ */ function() { vo(r, null, [{ key: "compare", value: function(t, n) { var i = t.leftSE.point.x, a = n.leftSE.point.x, o = t.rightSE.point.x, s = n.rightSE.point.x; if (s < i) return 1; if (o < a) return -1; var u = t.leftSE.point.y, l = n.leftSE.point.y, c = t.rightSE.point.y, f = n.rightSE.point.y; if (i < a) { if (l < u && l < c) return 1; if (l > u && l > c) return -1; var h = t.comparePoint(n.leftSE.point); if (h < 0) return 1; if (h > 0) return -1; var p = n.comparePoint(t.rightSE.point); return p !== 0 ? p : -1; } if (i > a) { if (u < l && u < f) return -1; if (u > l && u > f) return 1; var d = n.comparePoint(t.leftSE.point); if (d !== 0) return d; var v = t.comparePoint(n.rightSE.point); return v < 0 ? 1 : v > 0 ? -1 : 1; } if (u < l) return -1; if (u > l) return 1; if (o < s) { var g = n.comparePoint(t.rightSE.point); if (g !== 0) return g; } if (o > s) { var m = t.comparePoint(n.rightSE.point); if (m < 0) return 1; if (m > 0) return -1; } if (o !== s) { var y = c - u, _ = o - i, w = f - l, x = s - a; if (y > _ && w < x) return 1; if (y < _ && w > x) return -1; } return o > s ? 1 : o < s || c < f ? -1 : c > f ? 1 : t.id < n.id ? -1 : t.id > n.id ? 1 : 0; } }]); function r(e, t, n, i) { gu(this, r), this.id = ++Efe, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = i; } return vo(r, [{ key: "replaceRightSE", value: function(t) { this.rightSE = t, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE; } }, { key: "bbox", value: function() { var t = this.leftSE.point.y, n = this.rightSE.point.y; return { ll: { x: this.leftSE.point.x, y: t < n ? t : n }, ur: { x: this.rightSE.point.x, y: t > n ? t : n } }; } }, { key: "vector", value: function() { return { x: this.rightSE.point.x - this.leftSE.point.x, y: this.rightSE.point.y - this.leftSE.point.y }; } }, { key: "isAnEndpoint", value: function(t) { return t.x === this.leftSE.point.x && t.y === this.leftSE.point.y || t.x === this.rightSE.point.x && t.y === this.rightSE.point.y; } }, { key: "comparePoint", value: function(t) { if (this.isAnEndpoint(t)) return 0; var n = this.leftSE.point, i = this.rightSE.point, a = this.vector(); if (n.x === i.x) return t.x === n.x ? 0 : t.x < n.x ? 1 : -1; var o = (t.y - n.y) / a.y, s = n.x + o * a.x; if (t.x === s) return 0; var u = (t.x - n.x) / a.x, l = n.y + u * a.y; return t.y === l ? 0 : t.y < l ? -1 : 1; } }, { key: "getIntersection", value: function(t) { var n = this.bbox(), i = t.bbox(), a = DD(n, i); if (a === null) return null; var o = this.leftSE.point, s = this.rightSE.point, u = t.leftSE.point, l = t.rightSE.point, c = qy(n, u) && this.comparePoint(u) === 0, f = qy(i, o) && t.comparePoint(o) === 0, h = qy(n, l) && this.comparePoint(l) === 0, p = qy(i, s) && t.comparePoint(s) === 0; if (f && c) return p && !h ? s : !p && h ? l : null; if (f) return h && o.x === l.x && o.y === l.y ? null : o; if (c) return p && s.x === u.x && s.y === u.y ? null : u; if (p && h) return null; if (p) return s; if (h) return l; var d = Sfe(o, this.vector(), u, t.vector()); return d === null || !qy(a, d) ? null : U_.round(d.x, d.y); } }, { key: "split", value: function(t) { var n = [], i = t.events !== void 0, a = new Il(t, !0), o = new Il(t, !1), s = this.rightSE; this.replaceRightSE(o), n.push(o), n.push(a); var u = new r(a, s, this.rings.slice(), this.windings.slice()); return Il.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), Il.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (a.checkForConsuming(), o.checkForConsuming()), n; } }, { key: "swapEvents", value: function() { var t = this.rightSE; this.rightSE = this.leftSE, this.leftSE = t, this.leftSE.isLeft = !0, this.rightSE.isLeft = !1; for (var n = 0, i = this.windings.length; n < i; n++) this.windings[n] *= -1; } }, { key: "consume", value: function(t) { for (var n = this, i = t; n.consumedBy; ) n = n.consumedBy; for (; i.consumedBy; ) i = i.consumedBy; var a = r.compare(n, i); if (a !== 0) { if (a > 0) { var o = n; n = i, i = o; } if (n.prev === i) { var s = n; n = i, i = s; } for (var u = 0, l = i.rings.length; u < l; u++) { var c = i.rings[u], f = i.windings[u], h = n.rings.indexOf(c); h === -1 ? (n.rings.push(c), n.windings.push(f)) : n.windings[h] += f; } i.rings = null, i.windings = null, i.consumedBy = n, i.leftSE.consumedBy = n.leftSE, i.rightSE.consumedBy = n.rightSE; } } }, { key: "prevInResult", value: function() { return this._prevInResult !== void 0 ? this._prevInResult : (this.prev ? this.prev.isInResult() ? this._prevInResult = this.prev : this._prevInResult = this.prev.prevInResult() : this._prevInResult = null, this._prevInResult); } }, { key: "beforeState", value: function() { if (this._beforeState !== void 0) return this._beforeState; if (!this.prev) this._beforeState = { rings: [], windings: [], multiPolys: [] }; else { var t = this.prev.consumedBy || this.prev; this._beforeState = t.afterState(); } return this._beforeState; } }, { key: "afterState", value: function() { if (this._afterState !== void 0) return this._afterState; var t = this.beforeState(); this._afterState = { rings: t.rings.slice(0), windings: t.windings.slice(0), multiPolys: [] }; for (var n = this._afterState.rings, i = this._afterState.windings, a = this._afterState.multiPolys, o = 0, s = this.rings.length; o < s; o++) { var u = this.rings[o], l = this.windings[o], c = n.indexOf(u); c === -1 ? (n.push(u), i.push(l)) : i[c] += l; } for (var f = [], h = [], p = 0, d = n.length; p < d; p++) if (i[p] !== 0) { var v = n[p], g = v.poly; if (h.indexOf(g) === -1) if (v.isExterior) f.push(g); else { h.indexOf(g) === -1 && h.push(g); var m = f.indexOf(v.poly); m !== -1 && f.splice(m, 1); } } for (var y = 0, _ = f.length; y < _; y++) { var w = f[y].multiPoly; a.indexOf(w) === -1 && a.push(w); } return this._afterState; } }, { key: "isInResult", value: function() { if (this.consumedBy) return !1; if (this._isInResult !== void 0) return this._isInResult; var t = this.beforeState().multiPolys, n = this.afterState().multiPolys; switch (Nu.type) { case "union": { var i = t.length === 0, a = n.length === 0; this._isInResult = i !== a; break; } case "intersection": { var o, s; t.length < n.length ? (o = t.length, s = n.length) : (o = n.length, s = t.length), this._isInResult = s === Nu.numMultiPolys && o < s; break; } case "xor": { var u = Math.abs(t.length - n.length); this._isInResult = u % 2 === 1; break; } case "difference": { var l = function(f) { return f.length === 1 && f[0].isSubject; }; this._isInResult = l(t) !== l(n); break; } default: throw new Error("Unrecognized operation type found ".concat(Nu.type)); } return this._isInResult; } }], [{ key: "fromRing", value: function(t, n, i) { var a, o, s, u = Il.comparePoints(t, n); if (u < 0) a = t, o = n, s = 1; else if (u > 0) a = n, o = t, s = -1; else throw new Error("Tried to create degenerate segment at [".concat(t.x, ", ").concat(t.y, "]")); var l = new Il(a, !0), c = new Il(o, !1); return new r(l, c, [i], [s]); } }]), r; }(), ak = /* @__PURE__ */ function() { function r(e, t, n) { if (gu(this, r), !Array.isArray(e) || e.length === 0) throw new Error("Input geometry is not a valid Polygon or MultiPolygon"); if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number") throw new Error("Input geometry is not a valid Polygon or MultiPolygon"); var i = U_.round(e[0][0], e[0][1]); this.bbox = { ll: { x: i.x, y: i.y }, ur: { x: i.x, y: i.y } }; for (var a = i, o = 1, s = e.length; o < s; o++) { if (typeof e[o][0] != "number" || typeof e[o][1] != "number") throw new Error("Input geometry is not a valid Polygon or MultiPolygon"); var u = U_.round(e[o][0], e[o][1]); u.x === a.x && u.y === a.y || (this.segments.push(RS.fromRing(a, u, this)), u.x < this.bbox.ll.x && (this.bbox.ll.x = u.x), u.y < this.bbox.ll.y && (this.bbox.ll.y = u.y), u.x > this.bbox.ur.x && (this.bbox.ur.x = u.x), u.y > this.bbox.ur.y && (this.bbox.ur.y = u.y), a = u); } (i.x !== a.x || i.y !== a.y) && this.segments.push(RS.fromRing(a, i, this)); } return vo(r, [{ key: "getSweepEvents", value: function() { for (var t = [], n = 0, i = this.segments.length; n < i; n++) { var a = this.segments[n]; t.push(a.leftSE), t.push(a.rightSE); } return t; } }]), r; }(), bfe = /* @__PURE__ */ function() { function r(e, t) { if (gu(this, r), !Array.isArray(e)) throw new Error("Input geometry is not a valid Polygon or MultiPolygon"); this.exteriorRing = new ak(e[0], this, !0), this.bbox = { ll: { x: this.exteriorRing.bbox.ll.x, y: this.exteriorRing.bbox.ll.y }, ur: { x: this.exteriorRing.bbox.ur.x, y: this.exteriorRing.bbox.ur.y } }, this.interiorRings = []; for (var n = 1, i = e.length; n < i; n++) { var a = new ak(e[n], this, !1); a.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = a.bbox.ll.x), a.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = a.bbox.ll.y), a.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = a.bbox.ur.x), a.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = a.bbox.ur.y), this.interiorRings.push(a); } this.multiPoly = t; } return vo(r, [{ key: "getSweepEvents", value: function() { for (var t = this.exteriorRing.getSweepEvents(), n = 0, i = this.interiorRings.length; n < i; n++) for (var a = this.interiorRings[n].getSweepEvents(), o = 0, s = a.length; o < s; o++) t.push(a[o]); return t; } }]), r; }(), ok = /* @__PURE__ */ function() { function r(e, t) { if (gu(this, r), !Array.isArray(e)) throw new Error("Input geometry is not a valid Polygon or MultiPolygon"); try { typeof e[0][0][0] == "number" && (e = [e]); } catch { } this.polys = [], this.bbox = { ll: { x: Number.POSITIVE_INFINITY, y: Number.POSITIVE_INFINITY }, ur: { x: Number.NEGATIVE_INFINITY, y: Number.NEGATIVE_INFINITY } }; for (var n = 0, i = e.length; n < i; n++) { var a = new bfe(e[n], this); a.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = a.bbox.ll.x), a.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = a.bbox.ll.y), a.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = a.bbox.ur.x), a.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = a.bbox.ur.y), this.polys.push(a); } this.isSubject = t; } return vo(r, [{ key: "getSweepEvents", value: function() { for (var t = [], n = 0, i = this.polys.length; n < i; n++) for (var a = this.polys[n].getSweepEvents(), o = 0, s = a.length; o < s; o++) t.push(a[o]); return t; } }]), r; }(), Tfe = /* @__PURE__ */ function() { vo(r, null, [{ key: "factory", value: function(t) { for (var n = [], i = 0, a = t.length; i < a; i++) { var o = t[i]; if (!(!o.isInResult() || o.ringOut)) { for (var s = null, u = o.leftSE, l = o.rightSE, c = [u], f = u.point, h = []; s = u, u = l, c.push(u), u.point !== f; ) for (; ; ) { var p = u.getAvailableLinkedEvents(); if (p.length === 0) { var d = c[0].point, v = c[c.length - 1].point; throw new Error("Unable to complete output ring starting at [".concat(d.x, ",") + " ".concat(d.y, "]. Last matching segment found ends at") + " [".concat(v.x, ", ").concat(v.y, "].")); } if (p.length === 1) { l = p[0].otherSE; break; } for (var g = null, m = 0, y = h.length; m < y; m++) if (h[m].point === u.point) { g = m; break; } if (g !== null) { var _ = h.splice(g)[0], w = c.splice(_.index); w.unshift(w[0].otherSE), n.push(new r(w.reverse())); continue; } h.push({ index: c.length, point: u.point }); var x = u.getLeftmostComparator(s); l = p.sort(x)[0].otherSE; break; } n.push(new r(c)); } } return n; } }]); function r(e) { gu(this, r), this.events = e; for (var t = 0, n = e.length; t < n; t++) e[t].segment.ringOut = this; this.poly = null; } return vo(r, [{ key: "getGeom", value: function() { for (var t = this.events[0].point, n = [t], i = 1, a = this.events.length - 1; i < a; i++) { var o = this.events[i].point, s = this.events[i + 1].point; rk(o, t, s) !== 0 && (n.push(o), t = o); } if (n.length === 1) return null; var u = n[0], l = n[1]; rk(u, t, l) === 0 && n.shift(), n.push(n[0]); for (var c = this.isExteriorRing() ? 1 : -1, f = this.isExteriorRing() ? 0 : n.length - 1, h = this.isExteriorRing() ? n.length : -1, p = [], d = f; d != h; d += c) p.push([n[d].x, n[d].y]); return p; } }, { key: "isExteriorRing", value: function() { if (this._isExteriorRing === void 0) { var t = this.enclosingRing(); this._isExteriorRing = t ? !t.isExteriorRing() : !0; } return this._isExteriorRing; } }, { key: "enclosingRing", value: function() { return this._enclosingRing === void 0 && (this._enclosingRing = this._calcEnclosingRing()), this._enclosingRing; } }, { key: "_calcEnclosingRing", value: function() { for (var t = this.events[0], n = 1, i = this.events.length; n < i; n++) { var a = this.events[n]; Il.compare(t, a) > 0 && (t = a); } for (var o = t.segment.prevInResult(), s = o ? o.prevInResult() : null; ; ) { if (!o) return null; if (!s) return o.ringOut; if (s.ringOut !== o.ringOut) return s.ringOut.enclosingRing() !== o.ringOut ? o.ringOut : o.ringOut.enclosingRing(); o = s.prevInResult(), s = o ? o.prevInResult() : null; } } }]), r; }(), sk = /* @__PURE__ */ function() { function r(e) { gu(this, r), this.exteriorRing = e, e.poly = this, this.interiorRings = []; } return vo(r, [{ key: "addInterior", value: function(t) { this.interiorRings.push(t), t.poly = this; } }, { key: "getGeom", value: function() { var t = [this.exteriorRing.getGeom()]; if (t[0] === null) return null; for (var n = 0, i = this.interiorRings.length; n < i; n++) { var a = this.interiorRings[n].getGeom(); a !== null && t.push(a); } return t; } }]), r; }(), Pfe = /* @__PURE__ */ function() { function r(e) { gu(this, r), this.rings = e, this.polys = this._composePolys(e); } return vo(r, [{ key: "getGeom", value: function() { for (var t = [], n = 0, i = this.polys.length; n < i; n++) { var a = this.polys[n].getGeom(); a !== null && t.push(a); } return t; } }, { key: "_composePolys", value: function(t) { for (var n = [], i = 0, a = t.length; i < a; i++) { var o = t[i]; if (!o.poly) if (o.isExteriorRing()) n.push(new sk(o)); else { var s = o.enclosingRing(); s.poly || n.push(new sk(s)), s.poly.addInterior(o); } } return n; } }]), r; }(), Ife = /* @__PURE__ */ function() { function r(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : RS.compare; gu(this, r), this.queue = e, this.tree = new nR(t), this.segments = []; } return vo(r, [{ key: "process", value: function(t) { var n = t.segment, i = []; if (t.consumedBy) return t.isLeft ? this.queue.remove(t.otherSE) : this.tree.remove(n), i; var a = t.isLeft ? this.tree.insert(n) : this.tree.find(n); if (!a) throw new Error("Unable to find segment #".concat(n.id, " ") + "[".concat(n.leftSE.point.x, ", ").concat(n.leftSE.point.y, "] -> ") + "[".concat(n.rightSE.point.x, ", ").concat(n.rightSE.point.y, "] ") + "in SweepLine tree. Please submit a bug report."); for (var o = a, s = a, u = void 0, l = void 0; u === void 0; ) o = this.tree.prev(o), o === null ? u = null : o.key.consumedBy === void 0 && (u = o.key); for (; l === void 0; ) s = this.tree.next(s), s === null ? l = null : s.key.consumedBy === void 0 && (l = s.key); if (t.isLeft) { var c = null; if (u) { var f = u.getIntersection(n); if (f !== null && (n.isAnEndpoint(f) || (c = f), !u.isAnEndpoint(f))) for (var h = this._splitSafely(u, f), p = 0, d = h.length; p < d; p++) i.push(h[p]); } var v = null; if (l) { var g = l.getIntersection(n); if (g !== null && (n.isAnEndpoint(g) || (v = g), !l.isAnEndpoint(g))) for (var m = this._splitSafely(l, g), y = 0, _ = m.length; y < _; y++) i.push(m[y]); } if (c !== null || v !== null) { var w = null; if (c === null) w = v; else if (v === null) w = c; else { var x = Il.comparePoints(c, v); w = x <= 0 ? c : v; } this.queue.remove(n.rightSE), i.push(n.rightSE); for (var C = n.split(w), S = 0, b = C.length; S < b; S++) i.push(C[S]); } i.length > 0 ? (this.tree.remove(n), i.push(t)) : (this.segments.push(n), n.prev = u); } else { if (u && l) { var E = u.getIntersection(l); if (E !== null) { if (!u.isAnEndpoint(E)) for (var T = this._splitSafely(u, E), P = 0, I = T.length; P < I; P++) i.push(T[P]); if (!l.isAnEndpoint(E)) for (var A = this._splitSafely(l, E), L = 0, D = A.length; L < D; L++) i.push(A[L]); } } this.tree.remove(n); } return i; } }, { key: "_splitSafely", value: function(t, n) { this.tree.remove(t); var i = t.rightSE; this.queue.remove(i); var a = t.split(n); return a.push(i), t.consumedBy === void 0 && this.tree.insert(t), a; } }]), r; }(), uk = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Afe = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6, Lfe = /* @__PURE__ */ function() { function r() { gu(this, r); } return vo(r, [{ key: "run", value: function(t, n, i) { Nu.type = t, U_.reset(); for (var a = [new ok(n, !0)], o = 0, s = i.length; o < s; o++) a.push(new ok(i[o], !1)); if (Nu.numMultiPolys = a.length, Nu.type === "difference") for (var u = a[0], l = 1; l < a.length; ) DD(a[l].bbox, u.bbox) !== null ? l++ : a.splice(l, 1); if (Nu.type === "intersection") { for (var c = 0, f = a.length; c < f; c++) for (var h = a[c], p = c + 1, d = a.length; p < d; p++) if (DD(h.bbox, a[p].bbox) === null) return []; } for (var v = new nR(Il.compare), g = 0, m = a.length; g < m; g++) for (var y = a[g].getSweepEvents(), _ = 0, w = y.length; _ < w; _++) if (v.insert(y[_]), v.size > uk) throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report."); for (var x = new Ife(v), C = v.size, S = v.pop(); S; ) { var b = S.key; if (v.size === C) { var E = b.segment; throw new Error("Unable to pop() ".concat(b.isLeft ? "left" : "right", " SweepEvent ") + "[".concat(b.point.x, ", ").concat(b.point.y, "] from segment #").concat(E.id, " ") + "[".concat(E.leftSE.point.x, ", ").concat(E.leftSE.point.y, "] -> ") + "[".concat(E.rightSE.point.x, ", ").concat(E.rightSE.point.y, "] from queue. ") + "Please file a bug report."); } if (v.size > uk) throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report."); if (x.segments.length > Afe) throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report."); for (var T = x.process(b), P = 0, I = T.length; P < I; P++) { var A = T[P]; A.consumedBy === void 0 && v.insert(A); } C = v.size, S = v.pop(); } U_.reset(); var L = Tfe.factory(x.segments), D = new Pfe(L); return D.getGeom(); } }]), r; }(), Nu = new Lfe(), Dfe = function(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) n[i - 1] = arguments[i]; return Nu.run("union", e, n); }, Mfe = function(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) n[i - 1] = arguments[i]; return Nu.run("intersection", e, n); }, Ofe = function(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) n[i - 1] = arguments[i]; return Nu.run("xor", e, n); }, Rfe = function(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) n[i - 1] = arguments[i]; return Nu.run("difference", e, n); }, Nfe = { union: Dfe, intersection: Mfe, xor: Ofe, difference: Rfe }; const Mc = Nfe; function Ffe(r, e) { var t = on(r), n = on(e), i = r.properties || {}, a = Mc.difference( t.coordinates, n.coordinates ); return a.length === 0 ? null : a.length === 1 ? Nt(a[0], i) : Fo(a, i); } "fill" in Array.prototype || Object.defineProperty(Array.prototype, "fill", { configurable: !0, value: function(e) { if (this === void 0 || this === null) throw new TypeError(this + " is not an object"); var t = Object(this), n = Math.max(Math.min(t.length, 9007199254740991), 0) || 0, i = 1 in arguments && parseInt(Number(arguments[1]), 10) || 0; i = i < 0 ? Math.max(n + i, 0) : Math.min(i, n); var a = 2 in arguments && arguments[2] !== void 0 ? parseInt(Number(arguments[2]), 10) || 0 : n; for (a = a < 0 ? Math.max(n + arguments[2], 0) : Math.min(a, n); i < a; ) t[i] = e, ++i; return t; }, writable: !0 }); Number.isFinite = Number.isFinite || function(r) { return typeof r == "number" && isFinite(r); }; Number.isInteger = Number.isInteger || function(r) { return typeof r == "number" && isFinite(r) && Math.floor(r) === r; }; Number.parseFloat = Number.parseFloat || parseFloat; Number.isNaN = Number.isNaN || function(r) { return r !== r; }; Math.trunc = Math.trunc || function(r) { return r < 0 ? Math.ceil(r) : Math.floor(r); }; var Cd = function() { }; Cd.prototype.interfaces_ = function() { return []; }; Cd.prototype.getClass = function() { return Cd; }; Cd.prototype.equalsWithTolerance = function(e, t, n) { return Math.abs(e - t) <= n; }; var fn = function(r) { function e(t) { r.call(this, t), this.name = "IllegalArgumentException", this.message = t, this.stack = new r().stack; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e; }(Error), vt = function() { }, sW = { MAX_VALUE: { configurable: !0 } }; vt.isNaN = function(e) { return Number.isNaN(e); }; vt.doubleToLongBits = function(e) { return e; }; vt.longBitsToDouble = function(e) { return e; }; vt.isInfinite = function(e) { return !Number.isFinite(e); }; sW.MAX_VALUE.get = function() { return Number.MAX_VALUE; }; Object.defineProperties(vt, sW); var Uo = function() { }, jb = function() { }, om = function() { }; function Wo() { } var Z = function r() { if (this.x = null, this.y = null, this.z = null, arguments.length === 0) this.x = 0, this.y = 0, this.z = r.NULL_ORDINATE; else if (arguments.length === 1) { var e = arguments[0]; this.x = e.x, this.y = e.y, this.z = e.z; } else arguments.length === 2 ? (this.x = arguments[0], this.y = arguments[1], this.z = r.NULL_ORDINATE) : arguments.length === 3 && (this.x = arguments[0], this.y = arguments[1], this.z = arguments[2]); }, Zd = { DimensionalComparator: { configurable: !0 }, serialVersionUID: { configurable: !0 }, NULL_ORDINATE: { configurable: !0 }, X: { configurable: !0 }, Y: { configurable: !0 }, Z: { configurable: !0 } }; Z.prototype.setOrdinate = function(e, t) { switch (e) { case Z.X: this.x = t; break; case Z.Y: this.y = t; break; case Z.Z: this.z = t; break; default: throw new fn("Invalid ordinate index: " + e); } }; Z.prototype.equals2D = function() { if (arguments.length === 1) { var e = arguments[0]; return !(this.x !== e.x || this.y !== e.y); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; return !(!Cd.equalsWithTolerance(this.x, t.x, n) || !Cd.equalsWithTolerance(this.y, t.y, n)); } }; Z.prototype.getOrdinate = function(e) { switch (e) { case Z.X: return this.x; case Z.Y: return this.y; case Z.Z: return this.z; } throw new fn("Invalid ordinate index: " + e); }; Z.prototype.equals3D = function(e) { return this.x === e.x && this.y === e.y && (this.z === e.z || vt.isNaN(this.z)) && vt.isNaN(e.z); }; Z.prototype.equals = function(e) { return e instanceof Z ? this.equals2D(e) : !1; }; Z.prototype.equalInZ = function(e, t) { return Cd.equalsWithTolerance(this.z, e.z, t); }; Z.prototype.compareTo = function(e) { var t = e; return this.x < t.x ? -1 : this.x > t.x ? 1 : this.y < t.y ? -1 : this.y > t.y ? 1 : 0; }; Z.prototype.clone = function() { }; Z.prototype.copy = function() { return new Z(this); }; Z.prototype.toString = function() { return "(" + this.x + ", " + this.y + ", " + this.z + ")"; }; Z.prototype.distance3D = function(e) { var t = this.x - e.x, n = this.y - e.y, i = this.z - e.z; return Math.sqrt(t * t + n * n + i * i); }; Z.prototype.distance = function(e) { var t = this.x - e.x, n = this.y - e.y; return Math.sqrt(t * t + n * n); }; Z.prototype.hashCode = function() { var e = 17; return e = 37 * e + Z.hashCode(this.x), e = 37 * e + Z.hashCode(this.y), e; }; Z.prototype.setCoordinate = function(e) { this.x = e.x, this.y = e.y, this.z = e.z; }; Z.prototype.interfaces_ = function() { return [Uo, jb, Wo]; }; Z.prototype.getClass = function() { return Z; }; Z.hashCode = function() { if (arguments.length === 1) { var e = arguments[0], t = vt.doubleToLongBits(e); return Math.trunc((t ^ t) >>> 32); } }; Zd.DimensionalComparator.get = function() { return bc; }; Zd.serialVersionUID.get = function() { return 6683108902428367e3; }; Zd.NULL_ORDINATE.get = function() { return vt.NaN; }; Zd.X.get = function() { return 0; }; Zd.Y.get = function() { return 1; }; Zd.Z.get = function() { return 2; }; Object.defineProperties(Z, Zd); var bc = function(e) { if (this._dimensionsToTest = 2, arguments.length !== 0) { if (arguments.length === 1) { var t = arguments[0]; if (t !== 2 && t !== 3) throw new fn("only 2 or 3 dimensions may be specified"); this._dimensionsToTest = t; } } }; bc.prototype.compare = function(e, t) { var n = e, i = t, a = bc.compare(n.x, i.x); if (a !== 0) return a; var o = bc.compare(n.y, i.y); if (o !== 0) return o; if (this._dimensionsToTest <= 2) return 0; var s = bc.compare(n.z, i.z); return s; }; bc.prototype.interfaces_ = function() { return [om]; }; bc.prototype.getClass = function() { return bc; }; bc.compare = function(e, t) { return e < t ? -1 : e > t ? 1 : vt.isNaN(e) ? vt.isNaN(t) ? 0 : -1 : vt.isNaN(t) ? 1 : 0; }; var sm = function() { }; sm.prototype.create = function() { }; sm.prototype.interfaces_ = function() { return []; }; sm.prototype.getClass = function() { return sm; }; var Q = function() { }, ew = { INTERIOR: { configurable: !0 }, BOUNDARY: { configurable: !0 }, EXTERIOR: { configurable: !0 }, NONE: { configurable: !0 } }; Q.prototype.interfaces_ = function() { return []; }; Q.prototype.getClass = function() { return Q; }; Q.toLocationSymbol = function(e) { switch (e) { case Q.EXTERIOR: return "e"; case Q.BOUNDARY: return "b"; case Q.INTERIOR: return "i"; case Q.NONE: return "-"; } throw new fn("Unknown location value: " + e); }; ew.INTERIOR.get = function() { return 0; }; ew.BOUNDARY.get = function() { return 1; }; ew.EXTERIOR.get = function() { return 2; }; ew.NONE.get = function() { return -1; }; Object.defineProperties(Q, ew); var st = function(r, e) { return r.interfaces_ && r.interfaces_().indexOf(e) > -1; }, go = function() { }, uW = { LOG_10: { configurable: !0 } }; go.prototype.interfaces_ = function() { return []; }; go.prototype.getClass = function() { return go; }; go.log10 = function(e) { var t = Math.log(e); return vt.isInfinite(t) || vt.isNaN(t) ? t : t / go.LOG_10; }; go.min = function(e, t, n, i) { var a = e; return t < a && (a = t), n < a && (a = n), i < a && (a = i), a; }; go.clamp = function() { if (typeof arguments[2] == "number" && typeof arguments[0] == "number" && typeof arguments[1] == "number") { var e = arguments[0], t = arguments[1], n = arguments[2]; return e < t ? t : e > n ? n : e; } else if (Number.isInteger(arguments[2]) && Number.isInteger(arguments[0]) && Number.isInteger(arguments[1])) { var i = arguments[0], a = arguments[1], o = arguments[2]; return i < a ? a : i > o ? o : i; } }; go.wrap = function(e, t) { return e < 0 ? t - -e % t : e % t; }; go.max = function() { if (arguments.length === 3) { var e = arguments[0], t = arguments[1], n = arguments[2], i = e; return t > i && (i = t), n > i && (i = n), i; } else if (arguments.length === 4) { var a = arguments[0], o = arguments[1], s = arguments[2], u = arguments[3], l = a; return o > l && (l = o), s > l && (l = s), u > l && (l = u), l; } }; go.average = function(e, t) { return (e + t) / 2; }; uW.LOG_10.get = function() { return Math.log(10); }; Object.defineProperties(go, uW); var mu = function(e) { this.str = e; }; mu.prototype.append = function(e) { this.str += e; }; mu.prototype.setCharAt = function(e, t) { this.str = this.str.substr(0, e) + t + this.str.substr(e + 1); }; mu.prototype.toString = function(e) { return this.str; }; var nu = function(e) { this.value = e; }; nu.prototype.intValue = function() { return this.value; }; nu.prototype.compareTo = function(e) { return this.value < e ? -1 : this.value > e ? 1 : 0; }; nu.isNaN = function(e) { return Number.isNaN(e); }; var W_ = function() { }; W_.isWhitespace = function(e) { return e <= 32 && e >= 0 || e === 127; }; W_.toUpperCase = function(e) { return e.toUpperCase(); }; var ie = function r() { if (this._hi = 0, this._lo = 0, arguments.length === 0) this.init(0); else if (arguments.length === 1) { if (typeof arguments[0] == "number") { var e = arguments[0]; this.init(e); } else if (arguments[0] instanceof r) { var t = arguments[0]; this.init(t); } else if (typeof arguments[0] == "string") { var n = arguments[0]; r.call(this, r.parse(n)); } } else if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; this.init(i, a); } }, bs = { PI: { configurable: !0 }, TWO_PI: { configurable: !0 }, PI_2: { configurable: !0 }, E: { configurable: !0 }, NaN: { configurable: !0 }, EPS: { configurable: !0 }, SPLIT: { configurable: !0 }, MAX_PRINT_DIGITS: { configurable: !0 }, TEN: { configurable: !0 }, ONE: { configurable: !0 }, SCI_NOT_EXPONENT_CHAR: { configurable: !0 }, SCI_NOT_ZERO: { configurable: !0 } }; ie.prototype.le = function(e) { return (this._hi < e._hi || this._hi === e._hi) && this._lo <= e._lo; }; ie.prototype.extractSignificantDigits = function(e, t) { var n = this.abs(), i = ie.magnitude(n._hi), a = ie.TEN.pow(i); n = n.divide(a), n.gt(ie.TEN) ? (n = n.divide(ie.TEN), i += 1) : n.lt(ie.ONE) && (n = n.multiply(ie.TEN), i -= 1); for (var o = i + 1, s = new mu(), u = ie.MAX_PRINT_DIGITS - 1, l = 0; l <= u; l++) { e && l === o && s.append("."); var c = Math.trunc(n._hi); if (c < 0) break; var f = !1, h = 0; c > 9 ? (f = !0, h = "9") : h = "0" + c, s.append(h), n = n.subtract(ie.valueOf(c)).multiply(ie.TEN), f && n.selfAdd(ie.TEN); var p = !0, d = ie.magnitude(n._hi); if (d < 0 && Math.abs(d) >= u - l && (p = !1), !p) break; } return t[0] = i, s.toString(); }; ie.prototype.sqr = function() { return this.multiply(this); }; ie.prototype.doubleValue = function() { return this._hi + this._lo; }; ie.prototype.subtract = function() { if (arguments[0] instanceof ie) { var e = arguments[0]; return this.add(e.negate()); } else if (typeof arguments[0] == "number") { var t = arguments[0]; return this.add(-t); } }; ie.prototype.equals = function() { if (arguments.length === 1) { var e = arguments[0]; return this._hi === e._hi && this._lo === e._lo; } }; ie.prototype.isZero = function() { return this._hi === 0 && this._lo === 0; }; ie.prototype.selfSubtract = function() { if (arguments[0] instanceof ie) { var e = arguments[0]; return this.isNaN() ? this : this.selfAdd(-e._hi, -e._lo); } else if (typeof arguments[0] == "number") { var t = arguments[0]; return this.isNaN() ? this : this.selfAdd(-t, 0); } }; ie.prototype.getSpecialNumberString = function() { return this.isZero() ? "0.0" : this.isNaN() ? "NaN " : null; }; ie.prototype.min = function(e) { return this.le(e) ? this : e; }; ie.prototype.selfDivide = function() { if (arguments.length === 1) { if (arguments[0] instanceof ie) { var e = arguments[0]; return this.selfDivide(e._hi, e._lo); } else if (typeof arguments[0] == "number") { var t = arguments[0]; return this.selfDivide(t, 0); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1], a = null, o = null, s = null, u = null, l = null, c = null, f = null, h = null; return l = this._hi / n, c = ie.SPLIT * l, a = c - l, h = ie.SPLIT * n, a = c - a, o = l - a, s = h - n, f = l * n, s = h - s, u = n - s, h = a * s - f + a * u + o * s + o * u, c = (this._hi - f - h + this._lo - l * i) / n, h = l + c, this._hi = h, this._lo = l - h + c, this; } }; ie.prototype.dump = function() { return "DD<" + this._hi + ", " + this._lo + ">"; }; ie.prototype.divide = function() { if (arguments[0] instanceof ie) { var e = arguments[0], t = null, n = null, i = null, a = null, o = null, s = null, u = null, l = null; o = this._hi / e._hi, s = ie.SPLIT * o, t = s - o, l = ie.SPLIT * e._hi, t = s - t, n = o - t, i = l - e._hi, u = o * e._hi, i = l - i, a = e._hi - i, l = t * i - u + t * a + n * i + n * a, s = (this._hi - u - l + this._lo - o * e._lo) / e._hi, l = o + s; var c = l, f = o - l + s; return new ie(c, f); } else if (typeof arguments[0] == "number") { var h = arguments[0]; return vt.isNaN(h) ? ie.createNaN() : ie.copy(this).selfDivide(h, 0); } }; ie.prototype.ge = function(e) { return (this._hi > e._hi || this._hi === e._hi) && this._lo >= e._lo; }; ie.prototype.pow = function(e) { if (e === 0) return ie.valueOf(1); var t = new ie(this), n = ie.valueOf(1), i = Math.abs(e); if (i > 1) for (; i > 0; ) i % 2 === 1 && n.selfMultiply(t), i /= 2, i > 0 && (t = t.sqr()); else n = t; return e < 0 ? n.reciprocal() : n; }; ie.prototype.ceil = function() { if (this.isNaN()) return ie.NaN; var e = Math.ceil(this._hi), t = 0; return e === this._hi && (t = Math.ceil(this._lo)), new ie(e, t); }; ie.prototype.compareTo = function(e) { var t = e; return this._hi < t._hi ? -1 : this._hi > t._hi ? 1 : this._lo < t._lo ? -1 : this._lo > t._lo ? 1 : 0; }; ie.prototype.rint = function() { if (this.isNaN()) return this; var e = this.add(0.5); return e.floor(); }; ie.prototype.setValue = function() { if (arguments[0] instanceof ie) { var e = arguments[0]; return this.init(e), this; } else if (typeof arguments[0] == "number") { var t = arguments[0]; return this.init(t), this; } }; ie.prototype.max = function(e) { return this.ge(e) ? this : e; }; ie.prototype.sqrt = function() { if (this.isZero()) return ie.valueOf(0); if (this.isNegative()) return ie.NaN; var e = 1 / Math.sqrt(this._hi), t = this._hi * e, n = ie.valueOf(t), i = this.subtract(n.sqr()), a = i._hi * (e * 0.5); return n.add(a); }; ie.prototype.selfAdd = function() { if (arguments.length === 1) { if (arguments[0] instanceof ie) { var e = arguments[0]; return this.selfAdd(e._hi, e._lo); } else if (typeof arguments[0] == "number") { var t = arguments[0], n = null, i = null, a = null, o = null, s = null, u = null; return a = this._hi + t, s = a - this._hi, o = a - s, o = t - s + (this._hi - o), u = o + this._lo, n = a + u, i = u + (a - n), this._hi = n + i, this._lo = i + (n - this._hi), this; } } else if (arguments.length === 2) { var l = arguments[0], c = arguments[1], f = null, h = null, p = null, d = null, v = null, g = null, m = null, y = null; v = this._hi + l, p = this._lo + c, m = v - this._hi, y = p - this._lo, g = v - m, d = p - y, g = l - m + (this._hi - g), d = c - y + (this._lo - d), m = g + p, f = v + m, h = m + (v - f), m = d + h; var _ = f + m, w = m + (f - _); return this._hi = _, this._lo = w, this; } }; ie.prototype.selfMultiply = function() { if (arguments.length === 1) { if (arguments[0] instanceof ie) { var e = arguments[0]; return this.selfMultiply(e._hi, e._lo); } else if (typeof arguments[0] == "number") { var t = arguments[0]; return this.selfMultiply(t, 0); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1], a = null, o = null, s = null, u = null, l = null, c = null; l = ie.SPLIT * this._hi, a = l - this._hi, c = ie.SPLIT * n, a = l - a, o = this._hi - a, s = c - n, l = this._hi * n, s = c - s, u = n - s, c = a * s - l + a * u + o * s + o * u + (this._hi * i + this._lo * n); var f = l + c; a = l - f; var h = c + a; return this._hi = f, this._lo = h, this; } }; ie.prototype.selfSqr = function() { return this.selfMultiply(this); }; ie.prototype.floor = function() { if (this.isNaN()) return ie.NaN; var e = Math.floor(this._hi), t = 0; return e === this._hi && (t = Math.floor(this._lo)), new ie(e, t); }; ie.prototype.negate = function() { return this.isNaN() ? this : new ie(-this._hi, -this._lo); }; ie.prototype.clone = function() { }; ie.prototype.multiply = function() { if (arguments[0] instanceof ie) { var e = arguments[0]; return e.isNaN() ? ie.createNaN() : ie.copy(this).selfMultiply(e); } else if (typeof arguments[0] == "number") { var t = arguments[0]; return vt.isNaN(t) ? ie.createNaN() : ie.copy(this).selfMultiply(t, 0); } }; ie.prototype.isNaN = function() { return vt.isNaN(this._hi); }; ie.prototype.intValue = function() { return Math.trunc(this._hi); }; ie.prototype.toString = function() { var e = ie.magnitude(this._hi); return e >= -3 && e <= 20 ? this.toStandardNotation() : this.toSciNotation(); }; ie.prototype.toStandardNotation = function() { var e = this.getSpecialNumberString(); if (e !== null) return e; var t = new Array(1).fill(null), n = this.extractSignificantDigits(!0, t), i = t[0] + 1, a = n; if (n.charAt(0) === ".") a = "0" + n; else if (i < 0) a = "0." + ie.stringOfChar("0", -i) + n; else if (n.indexOf(".") === -1) { var o = i - n.length, s = ie.stringOfChar("0", o); a = n + s + ".0"; } return this.isNegative() ? "-" + a : a; }; ie.prototype.reciprocal = function() { var e = null, t = null, n = null, i = null, a = null, o = null, s = null, u = null; a = 1 / this._hi, o = ie.SPLIT * a, e = o - a, u = ie.SPLIT * this._hi, e = o - e, t = a - e, n = u - this._hi, s = a * this._hi, n = u - n, i = this._hi - n, u = e * n - s + e * i + t * n + t * i, o = (1 - s - u - a * this._lo) / this._hi; var l = a + o, c = a - l + o; return new ie(l, c); }; ie.prototype.toSciNotation = function() { if (this.isZero()) return ie.SCI_NOT_ZERO; var e = this.getSpecialNumberString(); if (e !== null) return e; var t = new Array(1).fill(null), n = this.extractSignificantDigits(!1, t), i = ie.SCI_NOT_EXPONENT_CHAR + t[0]; if (n.charAt(0) === "0") throw new Error("Found leading zero: " + n); var a = ""; n.length > 1 && (a = n.substring(1)); var o = n.charAt(0) + "." + a; return this.isNegative() ? "-" + o + i : o + i; }; ie.prototype.abs = function() { return this.isNaN() ? ie.NaN : this.isNegative() ? this.negate() : new ie(this); }; ie.prototype.isPositive = function() { return (this._hi > 0 || this._hi === 0) && this._lo > 0; }; ie.prototype.lt = function(e) { return (this._hi < e._hi || this._hi === e._hi) && this._lo < e._lo; }; ie.prototype.add = function() { if (arguments[0] instanceof ie) { var e = arguments[0]; return ie.copy(this).selfAdd(e); } else if (typeof arguments[0] == "number") { var t = arguments[0]; return ie.copy(this).selfAdd(t); } }; ie.prototype.init = function() { if (arguments.length === 1) { if (typeof arguments[0] == "number") { var e = arguments[0]; this._hi = e, this._lo = 0; } else if (arguments[0] instanceof ie) { var t = arguments[0]; this._hi = t._hi, this._lo = t._lo; } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this._hi = n, this._lo = i; } }; ie.prototype.gt = function(e) { return (this._hi > e._hi || this._hi === e._hi) && this._lo > e._lo; }; ie.prototype.isNegative = function() { return (this._hi < 0 || this._hi === 0) && this._lo < 0; }; ie.prototype.trunc = function() { return this.isNaN() ? ie.NaN : this.isPositive() ? this.floor() : this.ceil(); }; ie.prototype.signum = function() { return this._hi > 0 ? 1 : this._hi < 0 ? -1 : this._lo > 0 ? 1 : this._lo < 0 ? -1 : 0; }; ie.prototype.interfaces_ = function() { return [Wo, Uo, jb]; }; ie.prototype.getClass = function() { return ie; }; ie.sqr = function(e) { return ie.valueOf(e).selfMultiply(e); }; ie.valueOf = function() { if (typeof arguments[0] == "string") { var e = arguments[0]; return ie.parse(e); } else if (typeof arguments[0] == "number") { var t = arguments[0]; return new ie(t); } }; ie.sqrt = function(e) { return ie.valueOf(e).sqrt(); }; ie.parse = function(e) { for (var t = 0, n = e.length; W_.isWhitespace(e.charAt(t)); ) t++; var i = !1; if (t < n) { var a = e.charAt(t); (a === "-" || a === "+") && (t++, a === "-" && (i = !0)); } for (var o = new ie(), s = 0, u = 0, l = 0; !(t >= n); ) { var c = e.charAt(t); if (t++, W_.isDigit(c)) { var f = c - "0"; o.selfMultiply(ie.TEN), o.selfAdd(f), s++; continue; } if (c === ".") { u = s; continue; } if (c === "e" || c === "E") { var h = e.substring(t); try { l = nu.parseInt(h); } catch (m) { throw m instanceof Error ? new Error("Invalid exponent " + h + " in string " + e) : m; } finally { } break; } throw new Error("Unexpected character '" + c + "' at position " + t + " in string " + e); } var p = o, d = s - u - l; if (d === 0) p = o; else if (d > 0) { var v = ie.TEN.pow(d); p = o.divide(v); } else if (d < 0) { var g = ie.TEN.pow(-d); p = o.multiply(g); } return i ? p.negate() : p; }; ie.createNaN = function() { return new ie(vt.NaN, vt.NaN); }; ie.copy = function(e) { return new ie(e); }; ie.magnitude = function(e) { var t = Math.abs(e), n = Math.log(t) / Math.log(10), i = Math.trunc(Math.floor(n)), a = Math.pow(10, i); return a * 10 <= t && (i += 1), i; }; ie.stringOfChar = function(e, t) { for (var n = new mu(), i = 0; i < t; i++) n.append(e); return n.toString(); }; bs.PI.get = function() { return new ie(3.141592653589793, 12246467991473532e-32); }; bs.TWO_PI.get = function() { return new ie(6.283185307179586, 24492935982947064e-32); }; bs.PI_2.get = function() { return new ie(1.5707963267948966, 6123233995736766e-32); }; bs.E.get = function() { return new ie(2.718281828459045, 14456468917292502e-32); }; bs.NaN.get = function() { return new ie(vt.NaN, vt.NaN); }; bs.EPS.get = function() { return 123259516440783e-46; }; bs.SPLIT.get = function() { return 134217729; }; bs.MAX_PRINT_DIGITS.get = function() { return 32; }; bs.TEN.get = function() { return ie.valueOf(10); }; bs.ONE.get = function() { return ie.valueOf(1); }; bs.SCI_NOT_EXPONENT_CHAR.get = function() { return "E"; }; bs.SCI_NOT_ZERO.get = function() { return "0.0E0"; }; Object.defineProperties(ie, bs); var Pa = function() { }, lW = { DP_SAFE_EPSILON: { configurable: !0 } }; Pa.prototype.interfaces_ = function() { return []; }; Pa.prototype.getClass = function() { return Pa; }; Pa.orientationIndex = function(e, t, n) { var i = Pa.orientationIndexFilter(e, t, n); if (i <= 1) return i; var a = ie.valueOf(t.x).selfAdd(-e.x), o = ie.valueOf(t.y).selfAdd(-e.y), s = ie.valueOf(n.x).selfAdd(-t.x), u = ie.valueOf(n.y).selfAdd(-t.y); return a.selfMultiply(u).selfSubtract(o.selfMultiply(s)).signum(); }; Pa.signOfDet2x2 = function(e, t, n, i) { var a = e.multiply(i).selfSubtract(t.multiply(n)); return a.signum(); }; Pa.intersection = function(e, t, n, i) { var a = ie.valueOf(i.y).selfSubtract(n.y).selfMultiply(ie.valueOf(t.x).selfSubtract(e.x)), o = ie.valueOf(i.x).selfSubtract(n.x).selfMultiply(ie.valueOf(t.y).selfSubtract(e.y)), s = a.subtract(o), u = ie.valueOf(i.x).selfSubtract(n.x).selfMultiply(ie.valueOf(e.y).selfSubtract(n.y)), l = ie.valueOf(i.y).selfSubtract(n.y).selfMultiply(ie.valueOf(e.x).selfSubtract(n.x)), c = u.subtract(l), f = c.selfDivide(s).doubleValue(), h = ie.valueOf(e.x).selfAdd(ie.valueOf(t.x).selfSubtract(e.x).selfMultiply(f)).doubleValue(), p = ie.valueOf(t.x).selfSubtract(e.x).selfMultiply(ie.valueOf(e.y).selfSubtract(n.y)), d = ie.valueOf(t.y).selfSubtract(e.y).selfMultiply(ie.valueOf(e.x).selfSubtract(n.x)), v = p.subtract(d), g = v.selfDivide(s).doubleValue(), m = ie.valueOf(n.y).selfAdd(ie.valueOf(i.y).selfSubtract(n.y).selfMultiply(g)).doubleValue(); return new Z(h, m); }; Pa.orientationIndexFilter = function(e, t, n) { var i = null, a = (e.x - n.x) * (t.y - n.y), o = (e.y - n.y) * (t.x - n.x), s = a - o; if (a > 0) { if (o <= 0) return Pa.signum(s); i = a + o; } else if (a < 0) { if (o >= 0) return Pa.signum(s); i = -a - o; } else return Pa.signum(s); var u = Pa.DP_SAFE_EPSILON * i; return s >= u || -s >= u ? Pa.signum(s) : 2; }; Pa.signum = function(e) { return e > 0 ? 1 : e < 0 ? -1 : 0; }; lW.DP_SAFE_EPSILON.get = function() { return 1e-15; }; Object.defineProperties(Pa, lW); var zt = function() { }, tw = { X: { configurable: !0 }, Y: { configurable: !0 }, Z: { configurable: !0 }, M: { configurable: !0 } }; tw.X.get = function() { return 0; }; tw.Y.get = function() { return 1; }; tw.Z.get = function() { return 2; }; tw.M.get = function() { return 3; }; zt.prototype.setOrdinate = function(e, t, n) { }; zt.prototype.size = function() { }; zt.prototype.getOrdinate = function(e, t) { }; zt.prototype.getCoordinate = function() { }; zt.prototype.getCoordinateCopy = function(e) { }; zt.prototype.getDimension = function() { }; zt.prototype.getX = function(e) { }; zt.prototype.clone = function() { }; zt.prototype.expandEnvelope = function(e) { }; zt.prototype.copy = function() { }; zt.prototype.getY = function(e) { }; zt.prototype.toCoordinateArray = function() { }; zt.prototype.interfaces_ = function() { return [jb]; }; zt.prototype.getClass = function() { return zt; }; Object.defineProperties(zt, tw); var cW = function() { }, Km = function(r) { function e() { r.call(this, "Projective point not representable on the Cartesian plane."); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(cW), Oi = function() { }; Oi.arraycopy = function(e, t, n, i, a) { for (var o = 0, s = t; s < t + a; s++) n[i + o] = e[s], o++; }; Oi.getProperty = function(e) { return { "line.separator": ` ` }[e]; }; var ls = function r() { if (this.x = null, this.y = null, this.w = null, arguments.length === 0) this.x = 0, this.y = 0, this.w = 1; else if (arguments.length === 1) { var e = arguments[0]; this.x = e.x, this.y = e.y, this.w = 1; } else if (arguments.length === 2) { if (typeof arguments[0] == "number" && typeof arguments[1] == "number") { var t = arguments[0], n = arguments[1]; this.x = t, this.y = n, this.w = 1; } else if (arguments[0] instanceof r && arguments[1] instanceof r) { var i = arguments[0], a = arguments[1]; this.x = i.y * a.w - a.y * i.w, this.y = a.x * i.w - i.x * a.w, this.w = i.x * a.y - a.x * i.y; } else if (arguments[0] instanceof Z && arguments[1] instanceof Z) { var o = arguments[0], s = arguments[1]; this.x = o.y - s.y, this.y = s.x - o.x, this.w = o.x * s.y - s.x * o.y; } } else if (arguments.length === 3) { var u = arguments[0], l = arguments[1], c = arguments[2]; this.x = u, this.y = l, this.w = c; } else if (arguments.length === 4) { var f = arguments[0], h = arguments[1], p = arguments[2], d = arguments[3], v = f.y - h.y, g = h.x - f.x, m = f.x * h.y - h.x * f.y, y = p.y - d.y, _ = d.x - p.x, w = p.x * d.y - d.x * p.y; this.x = g * w - _ * m, this.y = y * m - v * w, this.w = v * _ - y * g; } }; ls.prototype.getY = function() { var e = this.y / this.w; if (vt.isNaN(e) || vt.isInfinite(e)) throw new Km(); return e; }; ls.prototype.getX = function() { var e = this.x / this.w; if (vt.isNaN(e) || vt.isInfinite(e)) throw new Km(); return e; }; ls.prototype.getCoordinate = function() { var e = new Z(); return e.x = this.getX(), e.y = this.getY(), e; }; ls.prototype.interfaces_ = function() { return []; }; ls.prototype.getClass = function() { return ls; }; ls.intersection = function(e, t, n, i) { var a = e.y - t.y, o = t.x - e.x, s = e.x * t.y - t.x * e.y, u = n.y - i.y, l = i.x - n.x, c = n.x * i.y - i.x * n.y, f = o * c - l * s, h = u * s - a * c, p = a * l - u * o, d = f / p, v = h / p; if (vt.isNaN(d) || vt.isInfinite(d) || vt.isNaN(v) || vt.isInfinite(v)) throw new Km(); return new Z(d, v); }; var Ke = function r() { if (this._minx = null, this._maxx = null, this._miny = null, this._maxy = null, arguments.length === 0) this.init(); else if (arguments.length === 1) { if (arguments[0] instanceof Z) { var e = arguments[0]; this.init(e.x, e.x, e.y, e.y); } else if (arguments[0] instanceof r) { var t = arguments[0]; this.init(t); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this.init(n.x, i.x, n.y, i.y); } else if (arguments.length === 4) { var a = arguments[0], o = arguments[1], s = arguments[2], u = arguments[3]; this.init(a, o, s, u); } }, fW = { serialVersionUID: { configurable: !0 } }; Ke.prototype.getArea = function() { return this.getWidth() * this.getHeight(); }; Ke.prototype.equals = function(e) { if (!(e instanceof Ke)) return !1; var t = e; return this.isNull() ? t.isNull() : this._maxx === t.getMaxX() && this._maxy === t.getMaxY() && this._minx === t.getMinX() && this._miny === t.getMinY(); }; Ke.prototype.intersection = function(e) { if (this.isNull() || e.isNull() || !this.intersects(e)) return new Ke(); var t = this._minx > e._minx ? this._minx : e._minx, n = this._miny > e._miny ? this._miny : e._miny, i = this._maxx < e._maxx ? this._maxx : e._maxx, a = this._maxy < e._maxy ? this._maxy : e._maxy; return new Ke(t, i, n, a); }; Ke.prototype.isNull = function() { return this._maxx < this._minx; }; Ke.prototype.getMaxX = function() { return this._maxx; }; Ke.prototype.covers = function() { if (arguments.length === 1) { if (arguments[0] instanceof Z) { var e = arguments[0]; return this.covers(e.x, e.y); } else if (arguments[0] instanceof Ke) { var t = arguments[0]; return this.isNull() || t.isNull() ? !1 : t.getMinX() >= this._minx && t.getMaxX() <= this._maxx && t.getMinY() >= this._miny && t.getMaxY() <= this._maxy; } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; return this.isNull() ? !1 : n >= this._minx && n <= this._maxx && i >= this._miny && i <= this._maxy; } }; Ke.prototype.intersects = function() { if (arguments.length === 1) { if (arguments[0] instanceof Ke) { var e = arguments[0]; return this.isNull() || e.isNull() ? !1 : !(e._minx > this._maxx || e._maxx < this._minx || e._miny > this._maxy || e._maxy < this._miny); } else if (arguments[0] instanceof Z) { var t = arguments[0]; return this.intersects(t.x, t.y); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; return this.isNull() ? !1 : !(n > this._maxx || n < this._minx || i > this._maxy || i < this._miny); } }; Ke.prototype.getMinY = function() { return this._miny; }; Ke.prototype.getMinX = function() { return this._minx; }; Ke.prototype.expandToInclude = function() { if (arguments.length === 1) { if (arguments[0] instanceof Z) { var e = arguments[0]; this.expandToInclude(e.x, e.y); } else if (arguments[0] instanceof Ke) { var t = arguments[0]; if (t.isNull()) return null; this.isNull() ? (this._minx = t.getMinX(), this._maxx = t.getMaxX(), this._miny = t.getMinY(), this._maxy = t.getMaxY()) : (t._minx < this._minx && (this._minx = t._minx), t._maxx > this._maxx && (this._maxx = t._maxx), t._miny < this._miny && (this._miny = t._miny), t._maxy > this._maxy && (this._maxy = t._maxy)); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this.isNull() ? (this._minx = n, this._maxx = n, this._miny = i, this._maxy = i) : (n < this._minx && (this._minx = n), n > this._maxx && (this._maxx = n), i < this._miny && (this._miny = i), i > this._maxy && (this._maxy = i)); } }; Ke.prototype.minExtent = function() { if (this.isNull()) return 0; var e = this.getWidth(), t = this.getHeight(); return e < t ? e : t; }; Ke.prototype.getWidth = function() { return this.isNull() ? 0 : this._maxx - this._minx; }; Ke.prototype.compareTo = function(e) { var t = e; return this.isNull() ? t.isNull() ? 0 : -1 : t.isNull() ? 1 : this._minx < t._minx ? -1 : this._minx > t._minx ? 1 : this._miny < t._miny ? -1 : this._miny > t._miny ? 1 : this._maxx < t._maxx ? -1 : this._maxx > t._maxx ? 1 : this._maxy < t._maxy ? -1 : this._maxy > t._maxy ? 1 : 0; }; Ke.prototype.translate = function(e, t) { if (this.isNull()) return null; this.init(this.getMinX() + e, this.getMaxX() + e, this.getMinY() + t, this.getMaxY() + t); }; Ke.prototype.toString = function() { return "Env[" + this._minx + " : " + this._maxx + ", " + this._miny + " : " + this._maxy + "]"; }; Ke.prototype.setToNull = function() { this._minx = 0, this._maxx = -1, this._miny = 0, this._maxy = -1; }; Ke.prototype.getHeight = function() { return this.isNull() ? 0 : this._maxy - this._miny; }; Ke.prototype.maxExtent = function() { if (this.isNull()) return 0; var e = this.getWidth(), t = this.getHeight(); return e > t ? e : t; }; Ke.prototype.expandBy = function() { if (arguments.length === 1) { var e = arguments[0]; this.expandBy(e, e); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; if (this.isNull()) return null; this._minx -= t, this._maxx += t, this._miny -= n, this._maxy += n, (this._minx > this._maxx || this._miny > this._maxy) && this.setToNull(); } }; Ke.prototype.contains = function() { if (arguments.length === 1) { if (arguments[0] instanceof Ke) { var e = arguments[0]; return this.covers(e); } else if (arguments[0] instanceof Z) { var t = arguments[0]; return this.covers(t); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; return this.covers(n, i); } }; Ke.prototype.centre = function() { return this.isNull() ? null : new Z((this.getMinX() + this.getMaxX()) / 2, (this.getMinY() + this.getMaxY()) / 2); }; Ke.prototype.init = function() { if (arguments.length === 0) this.setToNull(); else if (arguments.length === 1) { if (arguments[0] instanceof Z) { var e = arguments[0]; this.init(e.x, e.x, e.y, e.y); } else if (arguments[0] instanceof Ke) { var t = arguments[0]; this._minx = t._minx, this._maxx = t._maxx, this._miny = t._miny, this._maxy = t._maxy; } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this.init(n.x, i.x, n.y, i.y); } else if (arguments.length === 4) { var a = arguments[0], o = arguments[1], s = arguments[2], u = arguments[3]; a < o ? (this._minx = a, this._maxx = o) : (this._minx = o, this._maxx = a), s < u ? (this._miny = s, this._maxy = u) : (this._miny = u, this._maxy = s); } }; Ke.prototype.getMaxY = function() { return this._maxy; }; Ke.prototype.distance = function(e) { if (this.intersects(e)) return 0; var t = 0; this._maxx < e._minx ? t = e._minx - this._maxx : this._minx > e._maxx && (t = this._minx - e._maxx); var n = 0; return this._maxy < e._miny ? n = e._miny - this._maxy : this._miny > e._maxy && (n = this._miny - e._maxy), t === 0 ? n : n === 0 ? t : Math.sqrt(t * t + n * n); }; Ke.prototype.hashCode = function() { var e = 17; return e = 37 * e + Z.hashCode(this._minx), e = 37 * e + Z.hashCode(this._maxx), e = 37 * e + Z.hashCode(this._miny), e = 37 * e + Z.hashCode(this._maxy), e; }; Ke.prototype.interfaces_ = function() { return [Uo, Wo]; }; Ke.prototype.getClass = function() { return Ke; }; Ke.intersects = function() { if (arguments.length === 3) { var e = arguments[0], t = arguments[1], n = arguments[2]; return n.x >= (e.x < t.x ? e.x : t.x) && n.x <= (e.x > t.x ? e.x : t.x) && n.y >= (e.y < t.y ? e.y : t.y) && n.y <= (e.y > t.y ? e.y : t.y); } else if (arguments.length === 4) { var i = arguments[0], a = arguments[1], o = arguments[2], s = arguments[3], u = Math.min(o.x, s.x), l = Math.max(o.x, s.x), c = Math.min(i.x, a.x), f = Math.max(i.x, a.x); return !(c > l || f < u || (u = Math.min(o.y, s.y), l = Math.max(o.y, s.y), c = Math.min(i.y, a.y), f = Math.max(i.y, a.y), c > l) || f < u); } }; fW.serialVersionUID.get = function() { return 5873921885273102e3; }; Object.defineProperties(Ke, fW); var Vs = { typeStr: /^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/, emptyTypeStr: /^\s*(\w+)\s*EMPTY\s*$/, spaces: /\s+/, parenComma: /\)\s*,\s*\(/, doubleParenComma: /\)\s*\)\s*,\s*\(\s*\(/, trimParens: /^\s*\(?(.*?)\)?\s*$/ }, Yb = function(e) { this.geometryFactory = e || new Dt(); }; Yb.prototype.read = function(e) { var t, n, i; e = e.replace(/[\n\r]/g, " "); var a = Vs.typeStr.exec(e); if (e.search("EMPTY") !== -1 && (a = Vs.emptyTypeStr.exec(e), a[2] = void 0), a && (n = a[1].toLowerCase(), i = a[2], Lg[n] && (t = Lg[n].apply(this, [i]))), t === void 0) throw new Error("Could not parse WKT " + e); return t; }; Yb.prototype.write = function(e) { return this.extractGeometry(e); }; Yb.prototype.extractGeometry = function(e) { var t = e.getGeometryType().toLowerCase(); if (!Tl[t]) return null; var n = t.toUpperCase(), i; return e.isEmpty() ? i = n + " EMPTY" : i = n + "(" + Tl[t].apply(this, [e]) + ")", i; }; var Tl = { coordinate: function(e) { return e.x + " " + e.y; }, point: function(e) { return Tl.coordinate.call(this, e._coordinates._coordinates[0]); }, multipoint: function(e) { for (var t = this, n = [], i = 0, a = e._geometries.length; i < a; ++i) n.push("(" + Tl.point.apply(t, [e._geometries[i]]) + ")"); return n.join(","); }, linestring: function(e) { for (var t = this, n = [], i = 0, a = e._points._coordinates.length; i < a; ++i) n.push(Tl.coordinate.apply(t, [e._points._coordinates[i]])); return n.join(","); }, linearring: function(e) { for (var t = this, n = [], i = 0, a = e._points._coordinates.length; i < a; ++i) n.push(Tl.coordinate.apply(t, [e._points._coordinates[i]])); return n.join(","); }, multilinestring: function(e) { for (var t = this, n = [], i = 0, a = e._geometries.length; i < a; ++i) n.push("(" + Tl.linestring.apply(t, [e._geometries[i]]) + ")"); return n.join(","); }, polygon: function(e) { var t = this, n = []; n.push("(" + Tl.linestring.apply(this, [e._shell]) + ")"); for (var i = 0, a = e._holes.length; i < a; ++i) n.push("(" + Tl.linestring.apply(t, [e._holes[i]]) + ")"); return n.join(","); }, multipolygon: function(e) { for (var t = this, n = [], i = 0, a = e._geometries.length; i < a; ++i) n.push("(" + Tl.polygon.apply(t, [e._geometries[i]]) + ")"); return n.join(","); }, geometrycollection: function(e) { for (var t = this, n = [], i = 0, a = e._geometries.length; i < a; ++i) n.push(t.extractGeometry(e._geometries[i])); return n.join(","); } }, Lg = { point: function(e) { if (e === void 0) return this.geometryFactory.createPoint(); var t = e.trim().split(Vs.spaces); return this.geometryFactory.createPoint(new Z( Number.parseFloat(t[0]), Number.parseFloat(t[1]) )); }, multipoint: function(e) { var t = this; if (e === void 0) return this.geometryFactory.createMultiPoint(); for (var n, i = e.trim().split(","), a = [], o = 0, s = i.length; o < s; ++o) n = i[o].replace(Vs.trimParens, "$1"), a.push(Lg.point.apply(t, [n])); return this.geometryFactory.createMultiPoint(a); }, linestring: function(e) { if (e === void 0) return this.geometryFactory.createLineString(); for (var t = e.trim().split(","), n = [], i, a = 0, o = t.length; a < o; ++a) i = t[a].trim().split(Vs.spaces), n.push(new Z(Number.parseFloat(i[0]), Number.parseFloat(i[1]))); return this.geometryFactory.createLineString(n); }, linearring: function(e) { if (e === void 0) return this.geometryFactory.createLinearRing(); for (var t = e.trim().split(","), n = [], i, a = 0, o = t.length; a < o; ++a) i = t[a].trim().split(Vs.spaces), n.push(new Z(Number.parseFloat(i[0]), Number.parseFloat(i[1]))); return this.geometryFactory.createLinearRing(n); }, multilinestring: function(e) { var t = this; if (e === void 0) return this.geometryFactory.createMultiLineString(); for (var n, i = e.trim().split(Vs.parenComma), a = [], o = 0, s = i.length; o < s; ++o) n = i[o].replace(Vs.trimParens, "$1"), a.push(Lg.linestring.apply(t, [n])); return this.geometryFactory.createMultiLineString(a); }, polygon: function(e) { var t = this; if (e === void 0) return this.geometryFactory.createPolygon(); for (var n, i, a, o = e.trim().split(Vs.parenComma), s, u = [], l = 0, c = o.length; l < c; ++l) n = o[l].replace(Vs.trimParens, "$1"), i = Lg.linestring.apply(t, [n]), a = t.geometryFactory.createLinearRing(i._points), l === 0 ? s = a : u.push(a); return this.geometryFactory.createPolygon(s, u); }, multipolygon: function(e) { var t = this; if (e === void 0) return this.geometryFactory.createMultiPolygon(); for (var n, i = e.trim().split(Vs.doubleParenComma), a = [], o = 0, s = i.length; o < s; ++o) n = i[o].replace(Vs.trimParens, "$1"), a.push(Lg.polygon.apply(t, [n])); return this.geometryFactory.createMultiPolygon(a); }, geometrycollection: function(e) { var t = this; if (e === void 0) return this.geometryFactory.createGeometryCollection(); e = e.replace(/,\s*([A-Za-z])/g, "|$1"); for (var n = e.trim().split("|"), i = [], a = 0, o = n.length; a < o; ++a) i.push(t.read(n[a])); return this.geometryFactory.createGeometryCollection(i); } }, ds = function(e) { this.parser = new Yb(e); }; ds.prototype.write = function(e) { return this.parser.write(e); }; ds.toLineString = function(e, t) { if (arguments.length !== 2) throw new Error("Not implemented"); return "LINESTRING ( " + e.x + " " + e.y + ", " + t.x + " " + t.y + " )"; }; var Ul = function(r) { function e(t) { r.call(this, t), this.name = "RuntimeException", this.message = t, this.stack = new r().stack; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e; }(Error), NS = function(r) { function e() { if (r.call(this), arguments.length === 0) r.call(this); else if (arguments.length === 1) { var t = arguments[0]; r.call(this, t); } } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Ul), Et = function() { }; Et.prototype.interfaces_ = function() { return []; }; Et.prototype.getClass = function() { return Et; }; Et.shouldNeverReachHere = function() { if (arguments.length === 0) Et.shouldNeverReachHere(null); else if (arguments.length === 1) { var e = arguments[0]; throw new NS("Should never reach here" + (e !== null ? ": " + e : "")); } }; Et.isTrue = function() { var e, t; if (arguments.length === 1) e = arguments[0], Et.isTrue(e, null); else if (arguments.length === 2 && (e = arguments[0], t = arguments[1], !e)) throw t === null ? new NS() : new NS(t); }; Et.equals = function() { var e, t, n; if (arguments.length === 2) e = arguments[0], t = arguments[1], Et.equals(e, t, null); else if (arguments.length === 3 && (e = arguments[0], t = arguments[1], n = arguments[2], !t.equals(e))) throw new NS("Expected " + e + " but encountered " + t + (n !== null ? ": " + n : "")); }; var dn = function() { this._result = null, this._inputLines = Array(2).fill().map(function() { return Array(2); }), this._intPt = new Array(2).fill(null), this._intLineIndex = null, this._isProper = null, this._pa = null, this._pb = null, this._precisionModel = null, this._intPt[0] = new Z(), this._intPt[1] = new Z(), this._pa = this._intPt[0], this._pb = this._intPt[1], this._result = 0; }, Kd = { DONT_INTERSECT: { configurable: !0 }, DO_INTERSECT: { configurable: !0 }, COLLINEAR: { configurable: !0 }, NO_INTERSECTION: { configurable: !0 }, POINT_INTERSECTION: { configurable: !0 }, COLLINEAR_INTERSECTION: { configurable: !0 } }; dn.prototype.getIndexAlongSegment = function(e, t) { return this.computeIntLineIndex(), this._intLineIndex[e][t]; }; dn.prototype.getTopologySummary = function() { var e = new mu(); return this.isEndPoint() && e.append(" endpoint"), this._isProper && e.append(" proper"), this.isCollinear() && e.append(" collinear"), e.toString(); }; dn.prototype.computeIntersection = function(e, t, n, i) { this._inputLines[0][0] = e, this._inputLines[0][1] = t, this._inputLines[1][0] = n, this._inputLines[1][1] = i, this._result = this.computeIntersect(e, t, n, i); }; dn.prototype.getIntersectionNum = function() { return this._result; }; dn.prototype.computeIntLineIndex = function() { if (arguments.length === 0) this._intLineIndex === null && (this._intLineIndex = Array(2).fill().map(function() { return Array(2); }), this.computeIntLineIndex(0), this.computeIntLineIndex(1)); else if (arguments.length === 1) { var e = arguments[0], t = this.getEdgeDistance(e, 0), n = this.getEdgeDistance(e, 1); t > n ? (this._intLineIndex[e][0] = 0, this._intLineIndex[e][1] = 1) : (this._intLineIndex[e][0] = 1, this._intLineIndex[e][1] = 0); } }; dn.prototype.isProper = function() { return this.hasIntersection() && this._isProper; }; dn.prototype.setPrecisionModel = function(e) { this._precisionModel = e; }; dn.prototype.isInteriorIntersection = function() { var e = this; if (arguments.length === 0) return !!(this.isInteriorIntersection(0) || this.isInteriorIntersection(1)); if (arguments.length === 1) { for (var t = arguments[0], n = 0; n < this._result; n++) if (!(e._intPt[n].equals2D(e._inputLines[t][0]) || e._intPt[n].equals2D(e._inputLines[t][1]))) return !0; return !1; } }; dn.prototype.getIntersection = function(e) { return this._intPt[e]; }; dn.prototype.isEndPoint = function() { return this.hasIntersection() && !this._isProper; }; dn.prototype.hasIntersection = function() { return this._result !== dn.NO_INTERSECTION; }; dn.prototype.getEdgeDistance = function(e, t) { var n = dn.computeEdgeDistance(this._intPt[t], this._inputLines[e][0], this._inputLines[e][1]); return n; }; dn.prototype.isCollinear = function() { return this._result === dn.COLLINEAR_INTERSECTION; }; dn.prototype.toString = function() { return ds.toLineString(this._inputLines[0][0], this._inputLines[0][1]) + " - " + ds.toLineString(this._inputLines[1][0], this._inputLines[1][1]) + this.getTopologySummary(); }; dn.prototype.getEndpoint = function(e, t) { return this._inputLines[e][t]; }; dn.prototype.isIntersection = function(e) { for (var t = this, n = 0; n < this._result; n++) if (t._intPt[n].equals2D(e)) return !0; return !1; }; dn.prototype.getIntersectionAlongSegment = function(e, t) { return this.computeIntLineIndex(), this._intPt[this._intLineIndex[e][t]]; }; dn.prototype.interfaces_ = function() { return []; }; dn.prototype.getClass = function() { return dn; }; dn.computeEdgeDistance = function(e, t, n) { var i = Math.abs(n.x - t.x), a = Math.abs(n.y - t.y), o = -1; if (e.equals(t)) o = 0; else if (e.equals(n)) i > a ? o = i : o = a; else { var s = Math.abs(e.x - t.x), u = Math.abs(e.y - t.y); i > a ? o = s : o = u, o === 0 && !e.equals(t) && (o = Math.max(s, u)); } return Et.isTrue(!(o === 0 && !e.equals(t)), "Bad distance calculation"), o; }; dn.nonRobustComputeEdgeDistance = function(e, t, n) { var i = e.x - t.x, a = e.y - t.y, o = Math.sqrt(i * i + a * a); return Et.isTrue(!(o === 0 && !e.equals(t)), "Invalid distance calculation"), o; }; Kd.DONT_INTERSECT.get = function() { return 0; }; Kd.DO_INTERSECT.get = function() { return 1; }; Kd.COLLINEAR.get = function() { return 2; }; Kd.NO_INTERSECTION.get = function() { return 0; }; Kd.POINT_INTERSECTION.get = function() { return 1; }; Kd.COLLINEAR_INTERSECTION.get = function() { return 2; }; Object.defineProperties(dn, Kd); var Uh = function(r) { function e() { r.apply(this, arguments); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.isInSegmentEnvelopes = function(n) { var i = new Ke(this._inputLines[0][0], this._inputLines[0][1]), a = new Ke(this._inputLines[1][0], this._inputLines[1][1]); return i.contains(n) && a.contains(n); }, e.prototype.computeIntersection = function() { if (arguments.length === 3) { var n = arguments[0], i = arguments[1], a = arguments[2]; if (this._isProper = !1, Ke.intersects(i, a, n) && Me.orientationIndex(i, a, n) === 0 && Me.orientationIndex(a, i, n) === 0) return this._isProper = !0, (n.equals(i) || n.equals(a)) && (this._isProper = !1), this._result = r.POINT_INTERSECTION, null; this._result = r.NO_INTERSECTION; } else return r.prototype.computeIntersection.apply(this, arguments); }, e.prototype.normalizeToMinimum = function(n, i, a, o, s) { s.x = this.smallestInAbsValue(n.x, i.x, a.x, o.x), s.y = this.smallestInAbsValue(n.y, i.y, a.y, o.y), n.x -= s.x, n.y -= s.y, i.x -= s.x, i.y -= s.y, a.x -= s.x, a.y -= s.y, o.x -= s.x, o.y -= s.y; }, e.prototype.safeHCoordinateIntersection = function(n, i, a, o) { var s = null; try { s = ls.intersection(n, i, a, o); } catch (u) { if (u instanceof Km) s = e.nearestEndpoint(n, i, a, o); else throw u; } finally { } return s; }, e.prototype.intersection = function(n, i, a, o) { var s = this.intersectionWithNormalization(n, i, a, o); return this.isInSegmentEnvelopes(s) || (s = new Z(e.nearestEndpoint(n, i, a, o))), this._precisionModel !== null && this._precisionModel.makePrecise(s), s; }, e.prototype.smallestInAbsValue = function(n, i, a, o) { var s = n, u = Math.abs(s); return Math.abs(i) < u && (s = i, u = Math.abs(i)), Math.abs(a) < u && (s = a, u = Math.abs(a)), Math.abs(o) < u && (s = o), s; }, e.prototype.checkDD = function(n, i, a, o, s) { var u = Pa.intersection(n, i, a, o), l = this.isInSegmentEnvelopes(u); Oi.out.println("DD in env = " + l + " --------------------- " + u), s.distance(u) > 1e-4 && Oi.out.println("Distance = " + s.distance(u)); }, e.prototype.intersectionWithNormalization = function(n, i, a, o) { var s = new Z(n), u = new Z(i), l = new Z(a), c = new Z(o), f = new Z(); this.normalizeToEnvCentre(s, u, l, c, f); var h = this.safeHCoordinateIntersection(s, u, l, c); return h.x += f.x, h.y += f.y, h; }, e.prototype.computeCollinearIntersection = function(n, i, a, o) { var s = Ke.intersects(n, i, a), u = Ke.intersects(n, i, o), l = Ke.intersects(a, o, n), c = Ke.intersects(a, o, i); return s && u ? (this._intPt[0] = a, this._intPt[1] = o, r.COLLINEAR_INTERSECTION) : l && c ? (this._intPt[0] = n, this._intPt[1] = i, r.COLLINEAR_INTERSECTION) : s && l ? (this._intPt[0] = a, this._intPt[1] = n, a.equals(n) && !u && !c ? r.POINT_INTERSECTION : r.COLLINEAR_INTERSECTION) : s && c ? (this._intPt[0] = a, this._intPt[1] = i, a.equals(i) && !u && !l ? r.POINT_INTERSECTION : r.COLLINEAR_INTERSECTION) : u && l ? (this._intPt[0] = o, this._intPt[1] = n, o.equals(n) && !s && !c ? r.POINT_INTERSECTION : r.COLLINEAR_INTERSECTION) : u && c ? (this._intPt[0] = o, this._intPt[1] = i, o.equals(i) && !s && !l ? r.POINT_INTERSECTION : r.COLLINEAR_INTERSECTION) : r.NO_INTERSECTION; }, e.prototype.normalizeToEnvCentre = function(n, i, a, o, s) { var u = n.x < i.x ? n.x : i.x, l = n.y < i.y ? n.y : i.y, c = n.x > i.x ? n.x : i.x, f = n.y > i.y ? n.y : i.y, h = a.x < o.x ? a.x : o.x, p = a.y < o.y ? a.y : o.y, d = a.x > o.x ? a.x : o.x, v = a.y > o.y ? a.y : o.y, g = u > h ? u : h, m = c < d ? c : d, y = l > p ? l : p, _ = f < v ? f : v, w = (g + m) / 2, x = (y + _) / 2; s.x = w, s.y = x, n.x -= s.x, n.y -= s.y, i.x -= s.x, i.y -= s.y, a.x -= s.x, a.y -= s.y, o.x -= s.x, o.y -= s.y; }, e.prototype.computeIntersect = function(n, i, a, o) { if (this._isProper = !1, !Ke.intersects(n, i, a, o)) return r.NO_INTERSECTION; var s = Me.orientationIndex(n, i, a), u = Me.orientationIndex(n, i, o); if (s > 0 && u > 0 || s < 0 && u < 0) return r.NO_INTERSECTION; var l = Me.orientationIndex(a, o, n), c = Me.orientationIndex(a, o, i); if (l > 0 && c > 0 || l < 0 && c < 0) return r.NO_INTERSECTION; var f = s === 0 && u === 0 && l === 0 && c === 0; return f ? this.computeCollinearIntersection(n, i, a, o) : (s === 0 || u === 0 || l === 0 || c === 0 ? (this._isProper = !1, n.equals2D(a) || n.equals2D(o) ? this._intPt[0] = n : i.equals2D(a) || i.equals2D(o) ? this._intPt[0] = i : s === 0 ? this._intPt[0] = new Z(a) : u === 0 ? this._intPt[0] = new Z(o) : l === 0 ? this._intPt[0] = new Z(n) : c === 0 && (this._intPt[0] = new Z(i))) : (this._isProper = !0, this._intPt[0] = this.intersection(n, i, a, o)), r.POINT_INTERSECTION); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e.nearestEndpoint = function(n, i, a, o) { var s = n, u = Me.distancePointLine(n, a, o), l = Me.distancePointLine(i, a, o); return l < u && (u = l, s = i), l = Me.distancePointLine(a, n, i), l < u && (u = l, s = a), l = Me.distancePointLine(o, n, i), l < u && (u = l, s = o), s; }, e; }(dn), Sd = function() { }; Sd.prototype.interfaces_ = function() { return []; }; Sd.prototype.getClass = function() { return Sd; }; Sd.orientationIndex = function(e, t, n) { var i = t.x - e.x, a = t.y - e.y, o = n.x - t.x, s = n.y - t.y; return Sd.signOfDet2x2(i, a, o, s); }; Sd.signOfDet2x2 = function(e, t, n, i) { var a = null, o = null, s = null; if (a = 1, e === 0 || i === 0) return t === 0 || n === 0 ? 0 : t > 0 ? n > 0 ? -a : a : n > 0 ? a : -a; if (t === 0 || n === 0) return i > 0 ? e > 0 ? a : -a : e > 0 ? -a : a; if (t > 0 ? i > 0 ? t <= i || (a = -a, o = e, e = n, n = o, o = t, t = i, i = o) : t <= -i ? (a = -a, n = -n, i = -i) : (o = e, e = -n, n = o, o = t, t = -i, i = o) : i > 0 ? -t <= i ? (a = -a, e = -e, t = -t) : (o = -e, e = n, n = o, o = -t, t = i, i = o) : t >= i ? (e = -e, t = -t, n = -n, i = -i) : (a = -a, o = -e, e = -n, n = o, o = -t, t = -i, i = o), e > 0) if (n > 0) { if (!(e <= n)) return a; } else return a; else { if (n > 0) return -a; if (e >= n) a = -a, e = -e, n = -n; else return -a; } for (; ; ) { if (s = Math.floor(n / e), n = n - s * e, i = i - s * t, i < 0) return -a; if (i > t) return a; if (e > n + n) { if (t < i + i) return a; } else { if (t > i + i) return -a; n = e - n, i = t - i, a = -a; } if (i === 0) return n === 0 ? 0 : -a; if (n === 0 || (s = Math.floor(e / n), e = e - s * n, t = t - s * i, t < 0)) return a; if (t > i) return -a; if (n > e + e) { if (i < t + t) return -a; } else { if (i > t + t) return a; e = n - e, t = i - t, a = -a; } if (t === 0) return e === 0 ? 0 : a; if (e === 0) return -a; } }; var eu = function() { this._p = null, this._crossingCount = 0, this._isPointOnSegment = !1; var e = arguments[0]; this._p = e; }; eu.prototype.countSegment = function(e, t) { if (e.x < this._p.x && t.x < this._p.x) return null; if (this._p.x === t.x && this._p.y === t.y) return this._isPointOnSegment = !0, null; if (e.y === this._p.y && t.y === this._p.y) { var n = e.x, i = t.x; return n > i && (n = t.x, i = e.x), this._p.x >= n && this._p.x <= i && (this._isPointOnSegment = !0), null; } if (e.y > this._p.y && t.y <= this._p.y || t.y > this._p.y && e.y <= this._p.y) { var a = e.x - this._p.x, o = e.y - this._p.y, s = t.x - this._p.x, u = t.y - this._p.y, l = Sd.signOfDet2x2(a, o, s, u); if (l === 0) return this._isPointOnSegment = !0, null; u < o && (l = -l), l > 0 && this._crossingCount++; } }; eu.prototype.isPointInPolygon = function() { return this.getLocation() !== Q.EXTERIOR; }; eu.prototype.getLocation = function() { return this._isPointOnSegment ? Q.BOUNDARY : this._crossingCount % 2 === 1 ? Q.INTERIOR : Q.EXTERIOR; }; eu.prototype.isOnSegment = function() { return this._isPointOnSegment; }; eu.prototype.interfaces_ = function() { return []; }; eu.prototype.getClass = function() { return eu; }; eu.locatePointInRing = function() { if (arguments[0] instanceof Z && st(arguments[1], zt)) { for (var e = arguments[0], t = arguments[1], n = new eu(e), i = new Z(), a = new Z(), o = 1; o < t.size(); o++) if (t.getCoordinate(o, i), t.getCoordinate(o - 1, a), n.countSegment(i, a), n.isOnSegment()) return n.getLocation(); return n.getLocation(); } else if (arguments[0] instanceof Z && arguments[1] instanceof Array) { for (var s = arguments[0], u = arguments[1], l = new eu(s), c = 1; c < u.length; c++) { var f = u[c], h = u[c - 1]; if (l.countSegment(f, h), l.isOnSegment()) return l.getLocation(); } return l.getLocation(); } }; var Me = function() { }, Jd = { CLOCKWISE: { configurable: !0 }, RIGHT: { configurable: !0 }, COUNTERCLOCKWISE: { configurable: !0 }, LEFT: { configurable: !0 }, COLLINEAR: { configurable: !0 }, STRAIGHT: { configurable: !0 } }; Me.prototype.interfaces_ = function() { return []; }; Me.prototype.getClass = function() { return Me; }; Me.orientationIndex = function(e, t, n) { return Pa.orientationIndex(e, t, n); }; Me.signedArea = function() { if (arguments[0] instanceof Array) { var e = arguments[0]; if (e.length < 3) return 0; for (var t = 0, n = e[0].x, i = 1; i < e.length - 1; i++) { var a = e[i].x - n, o = e[i + 1].y, s = e[i - 1].y; t += a * (s - o); } return t / 2; } else if (st(arguments[0], zt)) { var u = arguments[0], l = u.size(); if (l < 3) return 0; var c = new Z(), f = new Z(), h = new Z(); u.getCoordinate(0, f), u.getCoordinate(1, h); var p = f.x; h.x -= p; for (var d = 0, v = 1; v < l - 1; v++) c.y = f.y, f.x = h.x, f.y = h.y, u.getCoordinate(v + 1, h), h.x -= p, d += f.x * (c.y - h.y); return d / 2; } }; Me.distanceLineLine = function(e, t, n, i) { if (e.equals(t)) return Me.distancePointLine(e, n, i); if (n.equals(i)) return Me.distancePointLine(i, e, t); var a = !1; if (!Ke.intersects(e, t, n, i)) a = !0; else { var o = (t.x - e.x) * (i.y - n.y) - (t.y - e.y) * (i.x - n.x); if (o === 0) a = !0; else { var s = (e.y - n.y) * (i.x - n.x) - (e.x - n.x) * (i.y - n.y), u = (e.y - n.y) * (t.x - e.x) - (e.x - n.x) * (t.y - e.y), l = u / o, c = s / o; (c < 0 || c > 1 || l < 0 || l > 1) && (a = !0); } } return a ? go.min(Me.distancePointLine(e, n, i), Me.distancePointLine(t, n, i), Me.distancePointLine(n, e, t), Me.distancePointLine(i, e, t)) : 0; }; Me.isPointInRing = function(e, t) { return Me.locatePointInRing(e, t) !== Q.EXTERIOR; }; Me.computeLength = function(e) { var t = e.size(); if (t <= 1) return 0; var n = 0, i = new Z(); e.getCoordinate(0, i); for (var a = i.x, o = i.y, s = 1; s < t; s++) { e.getCoordinate(s, i); var u = i.x, l = i.y, c = u - a, f = l - o; n += Math.sqrt(c * c + f * f), a = u, o = l; } return n; }; Me.isCCW = function(e) { var t = e.length - 1; if (t < 3) throw new fn("Ring has fewer than 4 points, so orientation cannot be determined"); for (var n = e[0], i = 0, a = 1; a <= t; a++) { var o = e[a]; o.y > n.y && (n = o, i = a); } var s = i; do s = s - 1, s < 0 && (s = t); while (e[s].equals2D(n) && s !== i); var u = i; do u = (u + 1) % t; while (e[u].equals2D(n) && u !== i); var l = e[s], c = e[u]; if (l.equals2D(n) || c.equals2D(n) || l.equals2D(c)) return !1; var f = Me.computeOrientation(l, n, c), h = !1; return f === 0 ? h = l.x > c.x : h = f > 0, h; }; Me.locatePointInRing = function(e, t) { return eu.locatePointInRing(e, t); }; Me.distancePointLinePerpendicular = function(e, t, n) { var i = (n.x - t.x) * (n.x - t.x) + (n.y - t.y) * (n.y - t.y), a = ((t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y)) / i; return Math.abs(a) * Math.sqrt(i); }; Me.computeOrientation = function(e, t, n) { return Me.orientationIndex(e, t, n); }; Me.distancePointLine = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1]; if (t.length === 0) throw new fn("Line array must contain at least one vertex"); for (var n = e.distance(t[0]), i = 0; i < t.length - 1; i++) { var a = Me.distancePointLine(e, t[i], t[i + 1]); a < n && (n = a); } return n; } else if (arguments.length === 3) { var o = arguments[0], s = arguments[1], u = arguments[2]; if (s.x === u.x && s.y === u.y) return o.distance(s); var l = (u.x - s.x) * (u.x - s.x) + (u.y - s.y) * (u.y - s.y), c = ((o.x - s.x) * (u.x - s.x) + (o.y - s.y) * (u.y - s.y)) / l; if (c <= 0) return o.distance(s); if (c >= 1) return o.distance(u); var f = ((s.y - o.y) * (u.x - s.x) - (s.x - o.x) * (u.y - s.y)) / l; return Math.abs(f) * Math.sqrt(l); } }; Me.isOnLine = function(e, t) { for (var n = new Uh(), i = 1; i < t.length; i++) { var a = t[i - 1], o = t[i]; if (n.computeIntersection(e, a, o), n.hasIntersection()) return !0; } return !1; }; Jd.CLOCKWISE.get = function() { return -1; }; Jd.RIGHT.get = function() { return Me.CLOCKWISE; }; Jd.COUNTERCLOCKWISE.get = function() { return 1; }; Jd.LEFT.get = function() { return Me.COUNTERCLOCKWISE; }; Jd.COLLINEAR.get = function() { return 0; }; Jd.STRAIGHT.get = function() { return Me.COLLINEAR; }; Object.defineProperties(Me, Jd); var Wl = function() { }; Wl.prototype.filter = function(e) { }; Wl.prototype.interfaces_ = function() { return []; }; Wl.prototype.getClass = function() { return Wl; }; var at = function() { var e = arguments[0]; this._envelope = null, this._factory = null, this._SRID = null, this._userData = null, this._factory = e, this._SRID = e.getSRID(); }, ul = { serialVersionUID: { configurable: !0 }, SORTINDEX_POINT: { configurable: !0 }, SORTINDEX_MULTIPOINT: { configurable: !0 }, SORTINDEX_LINESTRING: { configurable: !0 }, SORTINDEX_LINEARRING: { configurable: !0 }, SORTINDEX_MULTILINESTRING: { configurable: !0 }, SORTINDEX_POLYGON: { configurable: !0 }, SORTINDEX_MULTIPOLYGON: { configurable: !0 }, SORTINDEX_GEOMETRYCOLLECTION: { configurable: !0 }, geometryChangedFilter: { configurable: !0 } }; at.prototype.isGeometryCollection = function() { return this.getSortIndex() === at.SORTINDEX_GEOMETRYCOLLECTION; }; at.prototype.getFactory = function() { return this._factory; }; at.prototype.getGeometryN = function(e) { return this; }; at.prototype.getArea = function() { return 0; }; at.prototype.isRectangle = function() { return !1; }; at.prototype.equals = function() { if (arguments[0] instanceof at) { var e = arguments[0]; return e === null ? !1 : this.equalsTopo(e); } else if (arguments[0] instanceof Object) { var t = arguments[0]; if (!(t instanceof at)) return !1; var n = t; return this.equalsExact(n); } }; at.prototype.equalsExact = function(e) { return this === e || this.equalsExact(e, 0); }; at.prototype.geometryChanged = function() { this.apply(at.geometryChangedFilter); }; at.prototype.geometryChangedAction = function() { this._envelope = null; }; at.prototype.equalsNorm = function(e) { return e === null ? !1 : this.norm().equalsExact(e.norm()); }; at.prototype.getLength = function() { return 0; }; at.prototype.getNumGeometries = function() { return 1; }; at.prototype.compareTo = function() { if (arguments.length === 1) { var e = arguments[0], t = e; return this.getSortIndex() !== t.getSortIndex() ? this.getSortIndex() - t.getSortIndex() : this.isEmpty() && t.isEmpty() ? 0 : this.isEmpty() ? -1 : t.isEmpty() ? 1 : this.compareToSameClass(e); } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; return this.getSortIndex() !== n.getSortIndex() ? this.getSortIndex() - n.getSortIndex() : this.isEmpty() && n.isEmpty() ? 0 : this.isEmpty() ? -1 : n.isEmpty() ? 1 : this.compareToSameClass(n, i); } }; at.prototype.getUserData = function() { return this._userData; }; at.prototype.getSRID = function() { return this._SRID; }; at.prototype.getEnvelope = function() { return this.getFactory().toGeometry(this.getEnvelopeInternal()); }; at.prototype.checkNotGeometryCollection = function(e) { if (e.getSortIndex() === at.SORTINDEX_GEOMETRYCOLLECTION) throw new fn("This method does not support GeometryCollection arguments"); }; at.prototype.equal = function(e, t, n) { return n === 0 ? e.equals(t) : e.distance(t) <= n; }; at.prototype.norm = function() { var e = this.copy(); return e.normalize(), e; }; at.prototype.getPrecisionModel = function() { return this._factory.getPrecisionModel(); }; at.prototype.getEnvelopeInternal = function() { return this._envelope === null && (this._envelope = this.computeEnvelopeInternal()), new Ke(this._envelope); }; at.prototype.setSRID = function(e) { this._SRID = e; }; at.prototype.setUserData = function(e) { this._userData = e; }; at.prototype.compare = function(e, t) { for (var n = e.iterator(), i = t.iterator(); n.hasNext() && i.hasNext(); ) { var a = n.next(), o = i.next(), s = a.compareTo(o); if (s !== 0) return s; } return n.hasNext() ? 1 : i.hasNext() ? -1 : 0; }; at.prototype.hashCode = function() { return this.getEnvelopeInternal().hashCode(); }; at.prototype.isGeometryCollectionOrDerived = function() { return this.getSortIndex() === at.SORTINDEX_GEOMETRYCOLLECTION || this.getSortIndex() === at.SORTINDEX_MULTIPOINT || this.getSortIndex() === at.SORTINDEX_MULTILINESTRING || this.getSortIndex() === at.SORTINDEX_MULTIPOLYGON; }; at.prototype.interfaces_ = function() { return [jb, Uo, Wo]; }; at.prototype.getClass = function() { return at; }; at.hasNonEmptyElements = function(e) { for (var t = 0; t < e.length; t++) if (!e[t].isEmpty()) return !0; return !1; }; at.hasNullElements = function(e) { for (var t = 0; t < e.length; t++) if (e[t] === null) return !0; return !1; }; ul.serialVersionUID.get = function() { return 8763622679187377e3; }; ul.SORTINDEX_POINT.get = function() { return 0; }; ul.SORTINDEX_MULTIPOINT.get = function() { return 1; }; ul.SORTINDEX_LINESTRING.get = function() { return 2; }; ul.SORTINDEX_LINEARRING.get = function() { return 3; }; ul.SORTINDEX_MULTILINESTRING.get = function() { return 4; }; ul.SORTINDEX_POLYGON.get = function() { return 5; }; ul.SORTINDEX_MULTIPOLYGON.get = function() { return 6; }; ul.SORTINDEX_GEOMETRYCOLLECTION.get = function() { return 7; }; ul.geometryChangedFilter.get = function() { return iR; }; Object.defineProperties(at, ul); var iR = function() { }; iR.interfaces_ = function() { return [Wl]; }; iR.filter = function(e) { e.geometryChangedAction(); }; var ju = function() { }; ju.prototype.filter = function(e) { }; ju.prototype.interfaces_ = function() { return []; }; ju.prototype.getClass = function() { return ju; }; var ko = function() { }, ic = { Mod2BoundaryNodeRule: { configurable: !0 }, EndPointBoundaryNodeRule: { configurable: !0 }, MultiValentEndPointBoundaryNodeRule: { configurable: !0 }, MonoValentEndPointBoundaryNodeRule: { configurable: !0 }, MOD2_BOUNDARY_RULE: { configurable: !0 }, ENDPOINT_BOUNDARY_RULE: { configurable: !0 }, MULTIVALENT_ENDPOINT_BOUNDARY_RULE: { configurable: !0 }, MONOVALENT_ENDPOINT_BOUNDARY_RULE: { configurable: !0 }, OGC_SFS_BOUNDARY_RULE: { configurable: !0 } }; ko.prototype.isInBoundary = function(e) { }; ko.prototype.interfaces_ = function() { return []; }; ko.prototype.getClass = function() { return ko; }; ic.Mod2BoundaryNodeRule.get = function() { return um; }; ic.EndPointBoundaryNodeRule.get = function() { return lm; }; ic.MultiValentEndPointBoundaryNodeRule.get = function() { return cm; }; ic.MonoValentEndPointBoundaryNodeRule.get = function() { return fm; }; ic.MOD2_BOUNDARY_RULE.get = function() { return new um(); }; ic.ENDPOINT_BOUNDARY_RULE.get = function() { return new lm(); }; ic.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get = function() { return new cm(); }; ic.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get = function() { return new fm(); }; ic.OGC_SFS_BOUNDARY_RULE.get = function() { return ko.MOD2_BOUNDARY_RULE; }; Object.defineProperties(ko, ic); var um = function() { }; um.prototype.isInBoundary = function(e) { return e % 2 === 1; }; um.prototype.interfaces_ = function() { return [ko]; }; um.prototype.getClass = function() { return um; }; var lm = function() { }; lm.prototype.isInBoundary = function(e) { return e > 0; }; lm.prototype.interfaces_ = function() { return [ko]; }; lm.prototype.getClass = function() { return lm; }; var cm = function() { }; cm.prototype.isInBoundary = function(e) { return e > 1; }; cm.prototype.interfaces_ = function() { return [ko]; }; cm.prototype.getClass = function() { return cm; }; var fm = function() { }; fm.prototype.isInBoundary = function(e) { return e === 1; }; fm.prototype.interfaces_ = function() { return [ko]; }; fm.prototype.getClass = function() { return fm; }; var $n = function() { }; $n.prototype.add = function() { }; $n.prototype.addAll = function() { }; $n.prototype.isEmpty = function() { }; $n.prototype.iterator = function() { }; $n.prototype.size = function() { }; $n.prototype.toArray = function() { }; $n.prototype.remove = function() { }; function aR(r) { this.message = r || ""; } aR.prototype = new Error(); aR.prototype.name = "IndexOutOfBoundsException"; var Jm = function() { }; Jm.prototype.hasNext = function() { }; Jm.prototype.next = function() { }; Jm.prototype.remove = function() { }; var cs = function(r) { function e() { r.apply(this, arguments); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.get = function() { }, e.prototype.set = function() { }, e.prototype.isEmpty = function() { }, e; }($n); function Qm(r) { this.message = r || ""; } Qm.prototype = new Error(); Qm.prototype.name = "NoSuchElementException"; var be = function(r) { function e() { r.call(this), this.array_ = [], arguments[0] instanceof $n && this.addAll(arguments[0]); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.ensureCapacity = function() { }, e.prototype.interfaces_ = function() { return [r, $n]; }, e.prototype.add = function(n) { return arguments.length === 1 ? this.array_.push(n) : this.array_.splice(arguments[0], arguments[1]), !0; }, e.prototype.clear = function() { this.array_ = []; }, e.prototype.addAll = function(n) { for (var i = this, a = n.iterator(); a.hasNext(); ) i.add(a.next()); return !0; }, e.prototype.set = function(n, i) { var a = this.array_[n]; return this.array_[n] = i, a; }, e.prototype.iterator = function() { return new Bfe(this); }, e.prototype.get = function(n) { if (n < 0 || n >= this.size()) throw new aR(); return this.array_[n]; }, e.prototype.isEmpty = function() { return this.array_.length === 0; }, e.prototype.size = function() { return this.array_.length; }, e.prototype.toArray = function() { for (var n = this, i = [], a = 0, o = this.array_.length; a < o; a++) i.push(n.array_[a]); return i; }, e.prototype.remove = function(n) { for (var i = this, a = !1, o = 0, s = this.array_.length; o < s; o++) if (i.array_[o] === n) { i.array_.splice(o, 1), a = !0; break; } return a; }, e; }(cs), Bfe = function(r) { function e(t) { r.call(this), this.arrayList_ = t, this.position_ = 0; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.next = function() { if (this.position_ === this.arrayList_.size()) throw new Qm(); return this.arrayList_.get(this.position_++); }, e.prototype.hasNext = function() { return this.position_ < this.arrayList_.size(); }, e.prototype.set = function(n) { return this.arrayList_.set(this.position_ - 1, n); }, e.prototype.remove = function() { this.arrayList_.remove(this.arrayList_.get(this.position_)); }, e; }(Jm), rw = function(r) { function e() { if (r.call(this), arguments.length !== 0) { if (arguments.length === 1) { var n = arguments[0]; this.ensureCapacity(n.length), this.add(n, !0); } else if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; this.ensureCapacity(i.length), this.add(i, a); } } } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { coordArrayType: { configurable: !0 } }; return t.coordArrayType.get = function() { return new Array(0).fill(null); }, e.prototype.getCoordinate = function(i) { return this.get(i); }, e.prototype.addAll = function() { var i = this; if (arguments.length === 2) { for (var a = arguments[0], o = arguments[1], s = !1, u = a.iterator(); u.hasNext(); ) i.add(u.next(), o), s = !0; return s; } else return r.prototype.addAll.apply(this, arguments); }, e.prototype.clone = function() { for (var i = this, a = r.prototype.clone.call(this), o = 0; o < this.size(); o++) a.add(o, i.get(o).copy()); return a; }, e.prototype.toCoordinateArray = function() { return this.toArray(e.coordArrayType); }, e.prototype.add = function() { var i = this; if (arguments.length === 1) { var a = arguments[0]; r.prototype.add.call(this, a); } else if (arguments.length === 2) { if (arguments[0] instanceof Array && typeof arguments[1] == "boolean") { var o = arguments[0], s = arguments[1]; return this.add(o, s, !0), !0; } else if (arguments[0] instanceof Z && typeof arguments[1] == "boolean") { var u = arguments[0], l = arguments[1]; if (!l && this.size() >= 1) { var c = this.get(this.size() - 1); if (c.equals2D(u)) return null; } r.prototype.add.call(this, u); } else if (arguments[0] instanceof Object && typeof arguments[1] == "boolean") { var f = arguments[0], h = arguments[1]; return this.add(f, h), !0; } } else if (arguments.length === 3) { if (typeof arguments[2] == "boolean" && arguments[0] instanceof Array && typeof arguments[1] == "boolean") { var p = arguments[0], d = arguments[1], v = arguments[2]; if (v) for (var g = 0; g < p.length; g++) i.add(p[g], d); else for (var m = p.length - 1; m >= 0; m--) i.add(p[m], d); return !0; } else if (typeof arguments[2] == "boolean" && Number.isInteger(arguments[0]) && arguments[1] instanceof Z) { var y = arguments[0], _ = arguments[1], w = arguments[2]; if (!w) { var x = this.size(); if (x > 0) { if (y > 0) { var C = this.get(y - 1); if (C.equals2D(_)) return null; } if (y < x) { var S = this.get(y); if (S.equals2D(_)) return null; } } } r.prototype.add.call(this, y, _); } } else if (arguments.length === 4) { var b = arguments[0], E = arguments[1], T = arguments[2], P = arguments[3], I = 1; T > P && (I = -1); for (var A = T; A !== P; A += I) i.add(b[A], E); return !0; } }, e.prototype.closeRing = function() { this.size() > 0 && this.add(new Z(this.get(0)), !1); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, Object.defineProperties(e, t), e; }(be), Mt = function() { }, Xb = { ForwardComparator: { configurable: !0 }, BidirectionalComparator: { configurable: !0 }, coordArrayType: { configurable: !0 } }; Xb.ForwardComparator.get = function() { return j_; }; Xb.BidirectionalComparator.get = function() { return hm; }; Xb.coordArrayType.get = function() { return new Array(0).fill(null); }; Mt.prototype.interfaces_ = function() { return []; }; Mt.prototype.getClass = function() { return Mt; }; Mt.isRing = function(e) { return !(e.length < 4 || !e[0].equals2D(e[e.length - 1])); }; Mt.ptNotInList = function(e, t) { for (var n = 0; n < e.length; n++) { var i = e[n]; if (Mt.indexOf(i, t) < 0) return i; } return null; }; Mt.scroll = function(e, t) { var n = Mt.indexOf(t, e); if (n < 0) return null; var i = new Array(e.length).fill(null); Oi.arraycopy(e, n, i, 0, e.length - n), Oi.arraycopy(e, 0, i, e.length - n, n), Oi.arraycopy(i, 0, e, 0, e.length); }; Mt.equals = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1]; if (e === t) return !0; if (e === null || t === null || e.length !== t.length) return !1; for (var n = 0; n < e.length; n++) if (!e[n].equals(t[n])) return !1; return !0; } else if (arguments.length === 3) { var i = arguments[0], a = arguments[1], o = arguments[2]; if (i === a) return !0; if (i === null || a === null || i.length !== a.length) return !1; for (var s = 0; s < i.length; s++) if (o.compare(i[s], a[s]) !== 0) return !1; return !0; } }; Mt.intersection = function(e, t) { for (var n = new rw(), i = 0; i < e.length; i++) t.intersects(e[i]) && n.add(e[i], !0); return n.toCoordinateArray(); }; Mt.hasRepeatedPoints = function(e) { for (var t = 1; t < e.length; t++) if (e[t - 1].equals(e[t])) return !0; return !1; }; Mt.removeRepeatedPoints = function(e) { if (!Mt.hasRepeatedPoints(e)) return e; var t = new rw(e, !1); return t.toCoordinateArray(); }; Mt.reverse = function(e) { for (var t = e.length - 1, n = Math.trunc(t / 2), i = 0; i <= n; i++) { var a = e[i]; e[i] = e[t - i], e[t - i] = a; } }; Mt.removeNull = function(e) { for (var t = 0, n = 0; n < e.length; n++) e[n] !== null && t++; var i = new Array(t).fill(null); if (t === 0) return i; for (var a = 0, o = 0; o < e.length; o++) e[o] !== null && (i[a++] = e[o]); return i; }; Mt.copyDeep = function() { if (arguments.length === 1) { for (var e = arguments[0], t = new Array(e.length).fill(null), n = 0; n < e.length; n++) t[n] = new Z(e[n]); return t; } else if (arguments.length === 5) for (var i = arguments[0], a = arguments[1], o = arguments[2], s = arguments[3], u = arguments[4], l = 0; l < u; l++) o[s + l] = new Z(i[a + l]); }; Mt.isEqualReversed = function(e, t) { for (var n = 0; n < e.length; n++) { var i = e[n], a = t[e.length - n - 1]; if (i.compareTo(a) !== 0) return !1; } return !0; }; Mt.envelope = function(e) { for (var t = new Ke(), n = 0; n < e.length; n++) t.expandToInclude(e[n]); return t; }; Mt.toCoordinateArray = function(e) { return e.toArray(Mt.coordArrayType); }; Mt.atLeastNCoordinatesOrNothing = function(e, t) { return t.length >= e ? t : []; }; Mt.indexOf = function(e, t) { for (var n = 0; n < t.length; n++) if (e.equals(t[n])) return n; return -1; }; Mt.increasingDirection = function(e) { for (var t = 0; t < Math.trunc(e.length / 2); t++) { var n = e.length - 1 - t, i = e[t].compareTo(e[n]); if (i !== 0) return i; } return 1; }; Mt.compare = function(e, t) { for (var n = 0; n < e.length && n < t.length; ) { var i = e[n].compareTo(t[n]); if (i !== 0) return i; n++; } return n < t.length ? -1 : n < e.length ? 1 : 0; }; Mt.minCoordinate = function(e) { for (var t = null, n = 0; n < e.length; n++) (t === null || t.compareTo(e[n]) > 0) && (t = e[n]); return t; }; Mt.extract = function(e, t, n) { t = go.clamp(t, 0, e.length), n = go.clamp(n, -1, e.length); var i = n - t + 1; n < 0 && (i = 0), t >= e.length && (i = 0), n < t && (i = 0); var a = new Array(i).fill(null); if (i === 0) return a; for (var o = 0, s = t; s <= n; s++) a[o++] = e[s]; return a; }; Object.defineProperties(Mt, Xb); var j_ = function() { }; j_.prototype.compare = function(e, t) { var n = e, i = t; return Mt.compare(n, i); }; j_.prototype.interfaces_ = function() { return [om]; }; j_.prototype.getClass = function() { return j_; }; var hm = function() { }; hm.prototype.compare = function(e, t) { var n = e, i = t; if (n.length < i.length) return -1; if (n.length > i.length) return 1; if (n.length === 0) return 0; var a = Mt.compare(n, i), o = Mt.isEqualReversed(n, i); return o ? 0 : a; }; hm.prototype.OLDcompare = function(e, t) { var n = e, i = t; if (n.length < i.length) return -1; if (n.length > i.length) return 1; if (n.length === 0) return 0; for (var a = Mt.increasingDirection(n), o = Mt.increasingDirection(i), s = a > 0 ? 0 : n.length - 1, u = o > 0 ? 0 : n.length - 1, l = 0; l < n.length; l++) { var c = n[s].compareTo(i[u]); if (c !== 0) return c; s += a, u += o; } return 0; }; hm.prototype.interfaces_ = function() { return [om]; }; hm.prototype.getClass = function() { return hm; }; var Qd = function() { }; Qd.prototype.get = function() { }; Qd.prototype.put = function() { }; Qd.prototype.size = function() { }; Qd.prototype.values = function() { }; Qd.prototype.entrySet = function() { }; var kfe = function(r) { function e() { r.apply(this, arguments); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e; }(Qd); function nw(r) { this.message = r || ""; } nw.prototype = new Error(); nw.prototype.name = "OperationNotSupported"; function qb() { } qb.prototype = new $n(); qb.prototype.contains = function() { }; var oR = function(r) { function e() { r.call(this), this.array_ = [], arguments[0] instanceof $n && this.addAll(arguments[0]); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.contains = function(n) { for (var i = this, a = 0, o = this.array_.length; a < o; a++) { var s = i.array_[a]; if (s === n) return !0; } return !1; }, e.prototype.add = function(n) { return this.contains(n) ? !1 : (this.array_.push(n), !0); }, e.prototype.addAll = function(n) { for (var i = this, a = n.iterator(); a.hasNext(); ) i.add(a.next()); return !0; }, e.prototype.remove = function(n) { throw new Error(); }, e.prototype.size = function() { return this.array_.length; }, e.prototype.isEmpty = function() { return this.array_.length === 0; }, e.prototype.toArray = function() { for (var n = this, i = [], a = 0, o = this.array_.length; a < o; a++) i.push(n.array_[a]); return i; }, e.prototype.iterator = function() { return new Vfe(this); }, e; }(qb), Vfe = function(r) { function e(t) { r.call(this), this.hashSet_ = t, this.position_ = 0; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.next = function() { if (this.position_ === this.hashSet_.size()) throw new Qm(); return this.hashSet_.array_[this.position_++]; }, e.prototype.hasNext = function() { return this.position_ < this.hashSet_.size(); }, e.prototype.remove = function() { throw new nw(); }, e; }(Jm), Al = 0, bf = 1; function lk(r) { return r === null ? Al : r.color; } function Yr(r) { return r === null ? null : r.parent; } function ml(r, e) { r !== null && (r.color = e); } function nI(r) { return r === null ? null : r.left; } function ck(r) { return r === null ? null : r.right; } function Xi() { this.root_ = null, this.size_ = 0; } Xi.prototype = new kfe(); Xi.prototype.get = function(r) { for (var e = this.root_; e !== null; ) { var t = r.compareTo(e.key); if (t < 0) e = e.left; else if (t > 0) e = e.right; else return e.value; } return null; }; Xi.prototype.put = function(r, e) { if (this.root_ === null) return this.root_ = { key: r, value: e, left: null, right: null, parent: null, color: Al, getValue: function() { return this.value; }, getKey: function() { return this.key; } }, this.size_ = 1, null; var t = this.root_, n, i; do if (n = t, i = r.compareTo(t.key), i < 0) t = t.left; else if (i > 0) t = t.right; else { var a = t.value; return t.value = e, a; } while (t !== null); var o = { key: r, left: null, right: null, value: e, parent: n, color: Al, getValue: function() { return this.value; }, getKey: function() { return this.key; } }; return i < 0 ? n.left = o : n.right = o, this.fixAfterInsertion(o), this.size_++, null; }; Xi.prototype.fixAfterInsertion = function(r) { var e = this; for (r.color = bf; r != null && r !== this.root_ && r.parent.color === bf; ) if (Yr(r) === nI(Yr(Yr(r)))) { var t = ck(Yr(Yr(r))); lk(t) === bf ? (ml(Yr(r), Al), ml(t, Al), ml(Yr(Yr(r)), bf), r = Yr(Yr(r))) : (r === ck(Yr(r)) && (r = Yr(r), e.rotateLeft(r)), ml(Yr(r), Al), ml(Yr(Yr(r)), bf), e.rotateRight(Yr(Yr(r)))); } else { var n = nI(Yr(Yr(r))); lk(n) === bf ? (ml(Yr(r), Al), ml(n, Al), ml(Yr(Yr(r)), bf), r = Yr(Yr(r))) : (r === nI(Yr(r)) && (r = Yr(r), e.rotateRight(r)), ml(Yr(r), Al), ml(Yr(Yr(r)), bf), e.rotateLeft(Yr(Yr(r)))); } this.root_.color = Al; }; Xi.prototype.values = function() { var r = new be(), e = this.getFirstEntry(); if (e !== null) for (r.add(e.value); (e = Xi.successor(e)) !== null; ) r.add(e.value); return r; }; Xi.prototype.entrySet = function() { var r = new oR(), e = this.getFirstEntry(); if (e !== null) for (r.add(e); (e = Xi.successor(e)) !== null; ) r.add(e); return r; }; Xi.prototype.rotateLeft = function(r) { if (r != null) { var e = r.right; r.right = e.left, e.left != null && (e.left.parent = r), e.parent = r.parent, r.parent === null ? this.root_ = e : r.parent.left === r ? r.parent.left = e : r.parent.right = e, e.left = r, r.parent = e; } }; Xi.prototype.rotateRight = function(r) { if (r != null) { var e = r.left; r.left = e.right, e.right != null && (e.right.parent = r), e.parent = r.parent, r.parent === null ? this.root_ = e : r.parent.right === r ? r.parent.right = e : r.parent.left = e, e.right = r, r.parent = e; } }; Xi.prototype.getFirstEntry = function() { var r = this.root_; if (r != null) for (; r.left != null; ) r = r.left; return r; }; Xi.successor = function(r) { if (r === null) return null; if (r.right !== null) { for (var e = r.right; e.left !== null; ) e = e.left; return e; } else { for (var t = r.parent, n = r; t !== null && n === t.right; ) n = t, t = t.parent; return t; } }; Xi.prototype.size = function() { return this.size_; }; var Y_ = function() { }; Y_.prototype.interfaces_ = function() { return []; }; Y_.prototype.getClass = function() { return Y_; }; function hW() { } hW.prototype = new qb(); function iu() { this.array_ = [], arguments[0] instanceof $n && this.addAll(arguments[0]); } iu.prototype = new hW(); iu.prototype.contains = function(r) { for (var e = this, t = 0, n = this.array_.length; t < n; t++) { var i = e.array_[t]; if (i.compareTo(r) === 0) return !0; } return !1; }; iu.prototype.add = function(r) { var e = this; if (this.contains(r)) return !1; for (var t = 0, n = this.array_.length; t < n; t++) { var i = e.array_[t]; if (i.compareTo(r) === 1) return e.array_.splice(t, 0, r), !0; } return this.array_.push(r), !0; }; iu.prototype.addAll = function(r) { for (var e = this, t = r.iterator(); t.hasNext(); ) e.add(t.next()); return !0; }; iu.prototype.remove = function(r) { throw new nw(); }; iu.prototype.size = function() { return this.array_.length; }; iu.prototype.isEmpty = function() { return this.array_.length === 0; }; iu.prototype.toArray = function() { for (var r = this, e = [], t = 0, n = this.array_.length; t < n; t++) e.push(r.array_[t]); return e; }; iu.prototype.iterator = function() { return new Zb(this); }; var Zb = function(r) { this.treeSet_ = r, this.position_ = 0; }; Zb.prototype.next = function() { if (this.position_ === this.treeSet_.size()) throw new Qm(); return this.treeSet_.array_[this.position_++]; }; Zb.prototype.hasNext = function() { return this.position_ < this.treeSet_.size(); }; Zb.prototype.remove = function() { throw new nw(); }; var fh = function() { }; fh.sort = function() { var e = arguments[0], t, n, i, a; if (arguments.length === 1) a = function(s, u) { return s.compareTo(u); }, e.sort(a); else if (arguments.length === 2) i = arguments[1], a = function(s, u) { return i.compare(s, u); }, e.sort(a); else if (arguments.length === 3) { n = e.slice(arguments[1], arguments[2]), n.sort(); var o = e.slice(0, arguments[1]).concat(n, e.slice(arguments[2], e.length)); for (e.splice(0, e.length), t = 0; t < o.length; t++) e.push(o[t]); } else if (arguments.length === 4) for (n = e.slice(arguments[1], arguments[2]), i = arguments[3], a = function(s, u) { return i.compare(s, u); }, n.sort(a), o = e.slice(0, arguments[1]).concat(n, e.slice(arguments[2], e.length)), e.splice(0, e.length), t = 0; t < o.length; t++) e.push(o[t]); }; fh.asList = function(e) { for (var t = new be(), n = 0, i = e.length; n < i; n++) t.add(e[n]); return t; }; var Er = function() { }, Ts = { P: { configurable: !0 }, L: { configurable: !0 }, A: { configurable: !0 }, FALSE: { configurable: !0 }, TRUE: { configurable: !0 }, DONTCARE: { configurable: !0 }, SYM_FALSE: { configurable: !0 }, SYM_TRUE: { configurable: !0 }, SYM_DONTCARE: { configurable: !0 }, SYM_P: { configurable: !0 }, SYM_L: { configurable: !0 }, SYM_A: { configurable: !0 } }; Ts.P.get = function() { return 0; }; Ts.L.get = function() { return 1; }; Ts.A.get = function() { return 2; }; Ts.FALSE.get = function() { return -1; }; Ts.TRUE.get = function() { return -2; }; Ts.DONTCARE.get = function() { return -3; }; Ts.SYM_FALSE.get = function() { return "F"; }; Ts.SYM_TRUE.get = function() { return "T"; }; Ts.SYM_DONTCARE.get = function() { return "*"; }; Ts.SYM_P.get = function() { return "0"; }; Ts.SYM_L.get = function() { return "1"; }; Ts.SYM_A.get = function() { return "2"; }; Er.prototype.interfaces_ = function() { return []; }; Er.prototype.getClass = function() { return Er; }; Er.toDimensionSymbol = function(e) { switch (e) { case Er.FALSE: return Er.SYM_FALSE; case Er.TRUE: return Er.SYM_TRUE; case Er.DONTCARE: return Er.SYM_DONTCARE; case Er.P: return Er.SYM_P; case Er.L: return Er.SYM_L; case Er.A: return Er.SYM_A; } throw new fn("Unknown dimension value: " + e); }; Er.toDimensionValue = function(e) { switch (W_.toUpperCase(e)) { case Er.SYM_FALSE: return Er.FALSE; case Er.SYM_TRUE: return Er.TRUE; case Er.SYM_DONTCARE: return Er.DONTCARE; case Er.SYM_P: return Er.P; case Er.SYM_L: return Er.L; case Er.SYM_A: return Er.A; } throw new fn("Unknown dimension symbol: " + e); }; Object.defineProperties(Er, Ts); var au = function() { }; au.prototype.filter = function(e) { }; au.prototype.interfaces_ = function() { return []; }; au.prototype.getClass = function() { return au; }; var vs = function() { }; vs.prototype.filter = function(e, t) { }; vs.prototype.isDone = function() { }; vs.prototype.isGeometryChanged = function() { }; vs.prototype.interfaces_ = function() { return []; }; vs.prototype.getClass = function() { return vs; }; var va = function(r) { function e(n, i) { if (r.call(this, i), this._geometries = n || [], r.hasNullElements(this._geometries)) throw new fn("geometries must not contain null elements"); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { serialVersionUID: { configurable: !0 } }; return e.prototype.computeEnvelopeInternal = function() { for (var i = this, a = new Ke(), o = 0; o < this._geometries.length; o++) a.expandToInclude(i._geometries[o].getEnvelopeInternal()); return a; }, e.prototype.getGeometryN = function(i) { return this._geometries[i]; }, e.prototype.getSortIndex = function() { return r.SORTINDEX_GEOMETRYCOLLECTION; }, e.prototype.getCoordinates = function() { for (var i = this, a = new Array(this.getNumPoints()).fill(null), o = -1, s = 0; s < this._geometries.length; s++) for (var u = i._geometries[s].getCoordinates(), l = 0; l < u.length; l++) o++, a[o] = u[l]; return a; }, e.prototype.getArea = function() { for (var i = this, a = 0, o = 0; o < this._geometries.length; o++) a += i._geometries[o].getArea(); return a; }, e.prototype.equalsExact = function() { var i = this; if (arguments.length === 2) { var a = arguments[0], o = arguments[1]; if (!this.isEquivalentClass(a)) return !1; var s = a; if (this._geometries.length !== s._geometries.length) return !1; for (var u = 0; u < this._geometries.length; u++) if (!i._geometries[u].equalsExact(s._geometries[u], o)) return !1; return !0; } else return r.prototype.equalsExact.apply(this, arguments); }, e.prototype.normalize = function() { for (var i = this, a = 0; a < this._geometries.length; a++) i._geometries[a].normalize(); fh.sort(this._geometries); }, e.prototype.getCoordinate = function() { return this.isEmpty() ? null : this._geometries[0].getCoordinate(); }, e.prototype.getBoundaryDimension = function() { for (var i = this, a = Er.FALSE, o = 0; o < this._geometries.length; o++) a = Math.max(a, i._geometries[o].getBoundaryDimension()); return a; }, e.prototype.getDimension = function() { for (var i = this, a = Er.FALSE, o = 0; o < this._geometries.length; o++) a = Math.max(a, i._geometries[o].getDimension()); return a; }, e.prototype.getLength = function() { for (var i = this, a = 0, o = 0; o < this._geometries.length; o++) a += i._geometries[o].getLength(); return a; }, e.prototype.getNumPoints = function() { for (var i = this, a = 0, o = 0; o < this._geometries.length; o++) a += i._geometries[o].getNumPoints(); return a; }, e.prototype.getNumGeometries = function() { return this._geometries.length; }, e.prototype.reverse = function() { for (var i = this, a = this._geometries.length, o = new Array(a).fill(null), s = 0; s < this._geometries.length; s++) o[s] = i._geometries[s].reverse(); return this.getFactory().createGeometryCollection(o); }, e.prototype.compareToSameClass = function() { var i = this; if (arguments.length === 1) { var a = arguments[0], o = new iu(fh.asList(this._geometries)), s = new iu(fh.asList(a._geometries)); return this.compare(o, s); } else if (arguments.length === 2) { for (var u = arguments[0], l = arguments[1], c = u, f = this.getNumGeometries(), h = c.getNumGeometries(), p = 0; p < f && p < h; ) { var d = i.getGeometryN(p), v = c.getGeometryN(p), g = d.compareToSameClass(v, l); if (g !== 0) return g; p++; } return p < f ? 1 : p < h ? -1 : 0; } }, e.prototype.apply = function() { var i = this; if (st(arguments[0], ju)) for (var a = arguments[0], o = 0; o < this._geometries.length; o++) i._geometries[o].apply(a); else if (st(arguments[0], vs)) { var s = arguments[0]; if (this._geometries.length === 0) return null; for (var u = 0; u < this._geometries.length && (i._geometries[u].apply(s), !s.isDone()); u++) ; s.isGeometryChanged() && this.geometryChanged(); } else if (st(arguments[0], au)) { var l = arguments[0]; l.filter(this); for (var c = 0; c < this._geometries.length; c++) i._geometries[c].apply(l); } else if (st(arguments[0], Wl)) { var f = arguments[0]; f.filter(this); for (var h = 0; h < this._geometries.length; h++) i._geometries[h].apply(f); } }, e.prototype.getBoundary = function() { return this.checkNotGeometryCollection(this), Et.shouldNeverReachHere(), null; }, e.prototype.clone = function() { var i = this, a = r.prototype.clone.call(this); a._geometries = new Array(this._geometries.length).fill(null); for (var o = 0; o < this._geometries.length; o++) a._geometries[o] = i._geometries[o].clone(); return a; }, e.prototype.getGeometryType = function() { return "GeometryCollection"; }, e.prototype.copy = function() { for (var i = this, a = new Array(this._geometries.length).fill(null), o = 0; o < a.length; o++) a[o] = i._geometries[o].copy(); return new e(a, this._factory); }, e.prototype.isEmpty = function() { for (var i = this, a = 0; a < this._geometries.length; a++) if (!i._geometries[a].isEmpty()) return !1; return !0; }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, t.serialVersionUID.get = function() { return -5694727726395021e3; }, Object.defineProperties(e, t), e; }(at), Ch = function(r) { function e() { r.apply(this, arguments); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { serialVersionUID: { configurable: !0 } }; return e.prototype.getSortIndex = function() { return at.SORTINDEX_MULTILINESTRING; }, e.prototype.equalsExact = function() { if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; return this.isEquivalentClass(i) ? r.prototype.equalsExact.call(this, i, a) : !1; } else return r.prototype.equalsExact.apply(this, arguments); }, e.prototype.getBoundaryDimension = function() { return this.isClosed() ? Er.FALSE : 0; }, e.prototype.isClosed = function() { var i = this; if (this.isEmpty()) return !1; for (var a = 0; a < this._geometries.length; a++) if (!i._geometries[a].isClosed()) return !1; return !0; }, e.prototype.getDimension = function() { return 1; }, e.prototype.reverse = function() { for (var i = this, a = this._geometries.length, o = new Array(a).fill(null), s = 0; s < this._geometries.length; s++) o[a - 1 - s] = i._geometries[s].reverse(); return this.getFactory().createMultiLineString(o); }, e.prototype.getBoundary = function() { return new Oo(this).getBoundary(); }, e.prototype.getGeometryType = function() { return "MultiLineString"; }, e.prototype.copy = function() { for (var i = this, a = new Array(this._geometries.length).fill(null), o = 0; o < a.length; o++) a[o] = i._geometries[o].copy(); return new e(a, this._factory); }, e.prototype.interfaces_ = function() { return [Y_]; }, e.prototype.getClass = function() { return e; }, t.serialVersionUID.get = function() { return 8166665132445434e3; }, Object.defineProperties(e, t), e; }(va), Oo = function() { if (this._geom = null, this._geomFact = null, this._bnRule = null, this._endpointMap = null, arguments.length === 1) { var e = arguments[0], t = ko.MOD2_BOUNDARY_RULE; this._geom = e, this._geomFact = e.getFactory(), this._bnRule = t; } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this._geom = n, this._geomFact = n.getFactory(), this._bnRule = i; } }; Oo.prototype.boundaryMultiLineString = function(e) { if (this._geom.isEmpty()) return this.getEmptyMultiPoint(); var t = this.computeBoundaryCoordinates(e); return t.length === 1 ? this._geomFact.createPoint(t[0]) : this._geomFact.createMultiPointFromCoords(t); }; Oo.prototype.getBoundary = function() { return this._geom instanceof xn ? this.boundaryLineString(this._geom) : this._geom instanceof Ch ? this.boundaryMultiLineString(this._geom) : this._geom.getBoundary(); }; Oo.prototype.boundaryLineString = function(e) { if (this._geom.isEmpty()) return this.getEmptyMultiPoint(); if (e.isClosed()) { var t = this._bnRule.isInBoundary(2); return t ? e.getStartPoint() : this._geomFact.createMultiPoint(); } return this._geomFact.createMultiPoint([e.getStartPoint(), e.getEndPoint()]); }; Oo.prototype.getEmptyMultiPoint = function() { return this._geomFact.createMultiPoint(); }; Oo.prototype.computeBoundaryCoordinates = function(e) { var t = this, n = new be(); this._endpointMap = new Xi(); for (var i = 0; i < e.getNumGeometries(); i++) { var a = e.getGeometryN(i); a.getNumPoints() !== 0 && (t.addEndpoint(a.getCoordinateN(0)), t.addEndpoint(a.getCoordinateN(a.getNumPoints() - 1))); } for (var o = this._endpointMap.entrySet().iterator(); o.hasNext(); ) { var s = o.next(), u = s.getValue(), l = u.count; t._bnRule.isInBoundary(l) && n.add(s.getKey()); } return Mt.toCoordinateArray(n); }; Oo.prototype.addEndpoint = function(e) { var t = this._endpointMap.get(e); t === null && (t = new FS(), this._endpointMap.put(e, t)), t.count++; }; Oo.prototype.interfaces_ = function() { return []; }; Oo.prototype.getClass = function() { return Oo; }; Oo.getBoundary = function() { if (arguments.length === 1) { var e = arguments[0], t = new Oo(e); return t.getBoundary(); } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1], a = new Oo(n, i); return a.getBoundary(); } }; var FS = function() { this.count = null; }; FS.prototype.interfaces_ = function() { return []; }; FS.prototype.getClass = function() { return FS; }; function Gfe() { } function zfe() { } var $fe = function() { }; function Hfe() { } function Ufe() { } function Wfe() { } var Ro = function() { }, sR = { NEWLINE: { configurable: !0 }, SIMPLE_ORDINATE_FORMAT: { configurable: !0 } }; Ro.prototype.interfaces_ = function() { return []; }; Ro.prototype.getClass = function() { return Ro; }; Ro.chars = function(e, t) { for (var n = new Array(t).fill(null), i = 0; i < t; i++) n[i] = e; return String(n); }; Ro.getStackTrace = function() { if (arguments.length === 1) { var e = arguments[0], t = new Hfe(), n = new Gfe(); return e.printStackTrace(n), t.toString(); } else if (arguments.length === 2) { var i = arguments[0], a = arguments[1], o = ""; new zfe(Ro.getStackTrace(i)); for (var s = new Wfe(), u = 0; u < a; u++) try { o += s.readLine() + Ro.NEWLINE; } catch (l) { if (l instanceof Ufe) Et.shouldNeverReachHere(); else throw l; } finally { } return o; } }; Ro.split = function(e, t) { for (var n = t.length, i = new be(), a = "" + e, o = a.indexOf(t); o >= 0; ) { var s = a.substring(0, o); i.add(s), a = a.substring(o + n), o = a.indexOf(t); } a.length > 0 && i.add(a); for (var u = new Array(i.size()).fill(null), l = 0; l < u.length; l++) u[l] = i.get(l); return u; }; Ro.toString = function() { if (arguments.length === 1) { var e = arguments[0]; return Ro.SIMPLE_ORDINATE_FORMAT.format(e); } }; Ro.spaces = function(e) { return Ro.chars(" ", e); }; sR.NEWLINE.get = function() { return Oi.getProperty("line.separator"); }; sR.SIMPLE_ORDINATE_FORMAT.get = function() { return new $fe(); }; Object.defineProperties(Ro, sR); var Dn = function() { }; Dn.prototype.interfaces_ = function() { return []; }; Dn.prototype.getClass = function() { return Dn; }; Dn.copyCoord = function(e, t, n, i) { for (var a = Math.min(e.getDimension(), n.getDimension()), o = 0; o < a; o++) n.setOrdinate(i, o, e.getOrdinate(t, o)); }; Dn.isRing = function(e) { var t = e.size(); return t === 0 ? !0 : t <= 3 ? !1 : e.getOrdinate(0, zt.X) === e.getOrdinate(t - 1, zt.X) && e.getOrdinate(0, zt.Y) === e.getOrdinate(t - 1, zt.Y); }; Dn.isEqual = function(e, t) { var n = e.size(), i = t.size(); if (n !== i) return !1; for (var a = Math.min(e.getDimension(), t.getDimension()), o = 0; o < n; o++) for (var s = 0; s < a; s++) { var u = e.getOrdinate(o, s), l = t.getOrdinate(o, s); if (e.getOrdinate(o, s) !== t.getOrdinate(o, s) && !(vt.isNaN(u) && vt.isNaN(l))) return !1; } return !0; }; Dn.extend = function(e, t, n) { var i = e.create(n, t.getDimension()), a = t.size(); if (Dn.copy(t, 0, i, 0, a), a > 0) for (var o = a; o < n; o++) Dn.copy(t, a - 1, i, o, 1); return i; }; Dn.reverse = function(e) { for (var t = e.size() - 1, n = Math.trunc(t / 2), i = 0; i <= n; i++) Dn.swap(e, i, t - i); }; Dn.swap = function(e, t, n) { if (t === n) return null; for (var i = 0; i < e.getDimension(); i++) { var a = e.getOrdinate(t, i); e.setOrdinate(t, i, e.getOrdinate(n, i)), e.setOrdinate(n, i, a); } }; Dn.copy = function(e, t, n, i, a) { for (var o = 0; o < a; o++) Dn.copyCoord(e, t + o, n, i + o); }; Dn.toString = function() { if (arguments.length === 1) { var e = arguments[0], t = e.size(); if (t === 0) return "()"; var n = e.getDimension(), i = new mu(); i.append("("); for (var a = 0; a < t; a++) { a > 0 && i.append(" "); for (var o = 0; o < n; o++) o > 0 && i.append(","), i.append(Ro.toString(e.getOrdinate(a, o))); } return i.append(")"), i.toString(); } }; Dn.ensureValidRing = function(e, t) { var n = t.size(); if (n === 0) return t; if (n <= 3) return Dn.createClosedRing(e, t, 4); var i = t.getOrdinate(0, zt.X) === t.getOrdinate(n - 1, zt.X) && t.getOrdinate(0, zt.Y) === t.getOrdinate(n - 1, zt.Y); return i ? t : Dn.createClosedRing(e, t, n + 1); }; Dn.createClosedRing = function(e, t, n) { var i = e.create(n, t.getDimension()), a = t.size(); Dn.copy(t, 0, i, 0, a); for (var o = a; o < n; o++) Dn.copy(t, 0, i, o, 1); return i; }; var xn = function(r) { function e(n, i) { r.call(this, i), this._points = null, this.init(n); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { serialVersionUID: { configurable: !0 } }; return e.prototype.computeEnvelopeInternal = function() { return this.isEmpty() ? new Ke() : this._points.expandEnvelope(new Ke()); }, e.prototype.isRing = function() { return this.isClosed() && this.isSimple(); }, e.prototype.getSortIndex = function() { return r.SORTINDEX_LINESTRING; }, e.prototype.getCoordinates = function() { return this._points.toCoordinateArray(); }, e.prototype.equalsExact = function() { var i = this; if (arguments.length === 2) { var a = arguments[0], o = arguments[1]; if (!this.isEquivalentClass(a)) return !1; var s = a; if (this._points.size() !== s._points.size()) return !1; for (var u = 0; u < this._points.size(); u++) if (!i.equal(i._points.getCoordinate(u), s._points.getCoordinate(u), o)) return !1; return !0; } else return r.prototype.equalsExact.apply(this, arguments); }, e.prototype.normalize = function() { for (var i = this, a = 0; a < Math.trunc(this._points.size() / 2); a++) { var o = i._points.size() - 1 - a; if (!i._points.getCoordinate(a).equals(i._points.getCoordinate(o))) return i._points.getCoordinate(a).compareTo(i._points.getCoordinate(o)) > 0 && Dn.reverse(i._points), null; } }, e.prototype.getCoordinate = function() { return this.isEmpty() ? null : this._points.getCoordinate(0); }, e.prototype.getBoundaryDimension = function() { return this.isClosed() ? Er.FALSE : 0; }, e.prototype.isClosed = function() { return this.isEmpty() ? !1 : this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints() - 1)); }, e.prototype.getEndPoint = function() { return this.isEmpty() ? null : this.getPointN(this.getNumPoints() - 1); }, e.prototype.getDimension = function() { return 1; }, e.prototype.getLength = function() { return Me.computeLength(this._points); }, e.prototype.getNumPoints = function() { return this._points.size(); }, e.prototype.reverse = function() { var i = this._points.copy(); Dn.reverse(i); var a = this.getFactory().createLineString(i); return a; }, e.prototype.compareToSameClass = function() { var i = this; if (arguments.length === 1) { for (var a = arguments[0], o = a, s = 0, u = 0; s < this._points.size() && u < o._points.size(); ) { var l = i._points.getCoordinate(s).compareTo(o._points.getCoordinate(u)); if (l !== 0) return l; s++, u++; } return s < this._points.size() ? 1 : u < o._points.size() ? -1 : 0; } else if (arguments.length === 2) { var c = arguments[0], f = arguments[1], h = c; return f.compare(this._points, h._points); } }, e.prototype.apply = function() { var i = this; if (st(arguments[0], ju)) for (var a = arguments[0], o = 0; o < this._points.size(); o++) a.filter(i._points.getCoordinate(o)); else if (st(arguments[0], vs)) { var s = arguments[0]; if (this._points.size() === 0) return null; for (var u = 0; u < this._points.size() && (s.filter(i._points, u), !s.isDone()); u++) ; s.isGeometryChanged() && this.geometryChanged(); } else if (st(arguments[0], au)) { var l = arguments[0]; l.filter(this); } else if (st(arguments[0], Wl)) { var c = arguments[0]; c.filter(this); } }, e.prototype.getBoundary = function() { return new Oo(this).getBoundary(); }, e.prototype.isEquivalentClass = function(i) { return i instanceof e; }, e.prototype.clone = function() { var i = r.prototype.clone.call(this); return i._points = this._points.clone(), i; }, e.prototype.getCoordinateN = function(i) { return this._points.getCoordinate(i); }, e.prototype.getGeometryType = function() { return "LineString"; }, e.prototype.copy = function() { return new e(this._points.copy(), this._factory); }, e.prototype.getCoordinateSequence = function() { return this._points; }, e.prototype.isEmpty = function() { return this._points.size() === 0; }, e.prototype.init = function(i) { if (i === null && (i = this.getFactory().getCoordinateSequenceFactory().create([])), i.size() === 1) throw new fn("Invalid number of points in LineString (found " + i.size() + " - must be 0 or >= 2)"); this._points = i; }, e.prototype.isCoordinate = function(i) { for (var a = this, o = 0; o < this._points.size(); o++) if (a._points.getCoordinate(o).equals(i)) return !0; return !1; }, e.prototype.getStartPoint = function() { return this.isEmpty() ? null : this.getPointN(0); }, e.prototype.getPointN = function(i) { return this.getFactory().createPoint(this._points.getCoordinate(i)); }, e.prototype.interfaces_ = function() { return [Y_]; }, e.prototype.getClass = function() { return e; }, t.serialVersionUID.get = function() { return 3110669828065365500; }, Object.defineProperties(e, t), e; }(at), X_ = function() { }; X_.prototype.interfaces_ = function() { return []; }; X_.prototype.getClass = function() { return X_; }; var Za = function(r) { function e(n, i) { r.call(this, i), this._coordinates = n || null, this.init(this._coordinates); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { serialVersionUID: { configurable: !0 } }; return e.prototype.computeEnvelopeInternal = function() { if (this.isEmpty()) return new Ke(); var i = new Ke(); return i.expandToInclude(this._coordinates.getX(0), this._coordinates.getY(0)), i; }, e.prototype.getSortIndex = function() { return r.SORTINDEX_POINT; }, e.prototype.getCoordinates = function() { return this.isEmpty() ? [] : [this.getCoordinate()]; }, e.prototype.equalsExact = function() { if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; return this.isEquivalentClass(i) ? this.isEmpty() && i.isEmpty() ? !0 : this.isEmpty() !== i.isEmpty() ? !1 : this.equal(i.getCoordinate(), this.getCoordinate(), a) : !1; } else return r.prototype.equalsExact.apply(this, arguments); }, e.prototype.normalize = function() { }, e.prototype.getCoordinate = function() { return this._coordinates.size() !== 0 ? this._coordinates.getCoordinate(0) : null; }, e.prototype.getBoundaryDimension = function() { return Er.FALSE; }, e.prototype.getDimension = function() { return 0; }, e.prototype.getNumPoints = function() { return this.isEmpty() ? 0 : 1; }, e.prototype.reverse = function() { return this.copy(); }, e.prototype.getX = function() { if (this.getCoordinate() === null) throw new Error("getX called on empty Point"); return this.getCoordinate().x; }, e.prototype.compareToSameClass = function() { if (arguments.length === 1) { var i = arguments[0], a = i; return this.getCoordinate().compareTo(a.getCoordinate()); } else if (arguments.length === 2) { var o = arguments[0], s = arguments[1], u = o; return s.compare(this._coordinates, u._coordinates); } }, e.prototype.apply = function() { if (st(arguments[0], ju)) { var i = arguments[0]; if (this.isEmpty()) return null; i.filter(this.getCoordinate()); } else if (st(arguments[0], vs)) { var a = arguments[0]; if (this.isEmpty()) return null; a.filter(this._coordinates, 0), a.isGeometryChanged() && this.geometryChanged(); } else if (st(arguments[0], au)) { var o = arguments[0]; o.filter(this); } else if (st(arguments[0], Wl)) { var s = arguments[0]; s.filter(this); } }, e.prototype.getBoundary = function() { return this.getFactory().createGeometryCollection(null); }, e.prototype.clone = function() { var i = r.prototype.clone.call(this); return i._coordinates = this._coordinates.clone(), i; }, e.prototype.getGeometryType = function() { return "Point"; }, e.prototype.copy = function() { return new e(this._coordinates.copy(), this._factory); }, e.prototype.getCoordinateSequence = function() { return this._coordinates; }, e.prototype.getY = function() { if (this.getCoordinate() === null) throw new Error("getY called on empty Point"); return this.getCoordinate().y; }, e.prototype.isEmpty = function() { return this._coordinates.size() === 0; }, e.prototype.init = function(i) { i === null && (i = this.getFactory().getCoordinateSequenceFactory().create([])), Et.isTrue(i.size() <= 1), this._coordinates = i; }, e.prototype.isSimple = function() { return !0; }, e.prototype.interfaces_ = function() { return [X_]; }, e.prototype.getClass = function() { return e; }, t.serialVersionUID.get = function() { return 4902022702746615e3; }, Object.defineProperties(e, t), e; }(at), Uc = function() { }; Uc.prototype.interfaces_ = function() { return []; }; Uc.prototype.getClass = function() { return Uc; }; var qn = function(r) { function e(n, i, a) { if (r.call(this, a), this._shell = null, this._holes = null, n === null && (n = this.getFactory().createLinearRing()), i === null && (i = []), r.hasNullElements(i)) throw new fn("holes must not contain null elements"); if (n.isEmpty() && r.hasNonEmptyElements(i)) throw new fn("shell is empty but holes are not"); this._shell = n, this._holes = i; } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { serialVersionUID: { configurable: !0 } }; return e.prototype.computeEnvelopeInternal = function() { return this._shell.getEnvelopeInternal(); }, e.prototype.getSortIndex = function() { return r.SORTINDEX_POLYGON; }, e.prototype.getCoordinates = function() { var i = this; if (this.isEmpty()) return []; for (var a = new Array(this.getNumPoints()).fill(null), o = -1, s = this._shell.getCoordinates(), u = 0; u < s.length; u++) o++, a[o] = s[u]; for (var l = 0; l < this._holes.length; l++) for (var c = i._holes[l].getCoordinates(), f = 0; f < c.length; f++) o++, a[o] = c[f]; return a; }, e.prototype.getArea = function() { var i = this, a = 0; a += Math.abs(Me.signedArea(this._shell.getCoordinateSequence())); for (var o = 0; o < this._holes.length; o++) a -= Math.abs(Me.signedArea(i._holes[o].getCoordinateSequence())); return a; }, e.prototype.isRectangle = function() { if (this.getNumInteriorRing() !== 0 || this._shell === null || this._shell.getNumPoints() !== 5) return !1; for (var i = this._shell.getCoordinateSequence(), a = this.getEnvelopeInternal(), o = 0; o < 5; o++) { var s = i.getX(o); if (!(s === a.getMinX() || s === a.getMaxX())) return !1; var u = i.getY(o); if (!(u === a.getMinY() || u === a.getMaxY())) return !1; } for (var l = i.getX(0), c = i.getY(0), f = 1; f <= 4; f++) { var h = i.getX(f), p = i.getY(f), d = h !== l, v = p !== c; if (d === v) return !1; l = h, c = p; } return !0; }, e.prototype.equalsExact = function() { var i = this; if (arguments.length === 2) { var a = arguments[0], o = arguments[1]; if (!this.isEquivalentClass(a)) return !1; var s = a, u = this._shell, l = s._shell; if (!u.equalsExact(l, o) || this._holes.length !== s._holes.length) return !1; for (var c = 0; c < this._holes.length; c++) if (!i._holes[c].equalsExact(s._holes[c], o)) return !1; return !0; } else return r.prototype.equalsExact.apply(this, arguments); }, e.prototype.normalize = function() { var i = this; if (arguments.length === 0) { this.normalize(this._shell, !0); for (var a = 0; a < this._holes.length; a++) i.normalize(i._holes[a], !1); fh.sort(this._holes); } else if (arguments.length === 2) { var o = arguments[0], s = arguments[1]; if (o.isEmpty()) return null; var u = new Array(o.getCoordinates().length - 1).fill(null); Oi.arraycopy(o.getCoordinates(), 0, u, 0, u.length); var l = Mt.minCoordinate(o.getCoordinates()); Mt.scroll(u, l), Oi.arraycopy(u, 0, o.getCoordinates(), 0, u.length), o.getCoordinates()[u.length] = u[0], Me.isCCW(o.getCoordinates()) === s && Mt.reverse(o.getCoordinates()); } }, e.prototype.getCoordinate = function() { return this._shell.getCoordinate(); }, e.prototype.getNumInteriorRing = function() { return this._holes.length; }, e.prototype.getBoundaryDimension = function() { return 1; }, e.prototype.getDimension = function() { return 2; }, e.prototype.getLength = function() { var i = this, a = 0; a += this._shell.getLength(); for (var o = 0; o < this._holes.length; o++) a += i._holes[o].getLength(); return a; }, e.prototype.getNumPoints = function() { for (var i = this, a = this._shell.getNumPoints(), o = 0; o < this._holes.length; o++) a += i._holes[o].getNumPoints(); return a; }, e.prototype.reverse = function() { var i = this, a = this.copy(); a._shell = this._shell.copy().reverse(), a._holes = new Array(this._holes.length).fill(null); for (var o = 0; o < this._holes.length; o++) a._holes[o] = i._holes[o].copy().reverse(); return a; }, e.prototype.convexHull = function() { return this.getExteriorRing().convexHull(); }, e.prototype.compareToSameClass = function() { var i = this; if (arguments.length === 1) { var a = arguments[0], o = this._shell, s = a._shell; return o.compareToSameClass(s); } else if (arguments.length === 2) { var u = arguments[0], l = arguments[1], c = u, f = this._shell, h = c._shell, p = f.compareToSameClass(h, l); if (p !== 0) return p; for (var d = this.getNumInteriorRing(), v = c.getNumInteriorRing(), g = 0; g < d && g < v; ) { var m = i.getInteriorRingN(g), y = c.getInteriorRingN(g), _ = m.compareToSameClass(y, l); if (_ !== 0) return _; g++; } return g < d ? 1 : g < v ? -1 : 0; } }, e.prototype.apply = function(i) { var a = this; if (st(i, ju)) { this._shell.apply(i); for (var o = 0; o < this._holes.length; o++) a._holes[o].apply(i); } else if (st(i, vs)) { if (this._shell.apply(i), !i.isDone()) for (var s = 0; s < this._holes.length && (a._holes[s].apply(i), !i.isDone()); s++) ; i.isGeometryChanged() && this.geometryChanged(); } else if (st(i, au)) i.filter(this); else if (st(i, Wl)) { i.filter(this), this._shell.apply(i); for (var u = 0; u < this._holes.length; u++) a._holes[u].apply(i); } }, e.prototype.getBoundary = function() { var i = this; if (this.isEmpty()) return this.getFactory().createMultiLineString(); var a = new Array(this._holes.length + 1).fill(null); a[0] = this._shell; for (var o = 0; o < this._holes.length; o++) a[o + 1] = i._holes[o]; return a.length <= 1 ? this.getFactory().createLinearRing(a[0].getCoordinateSequence()) : this.getFactory().createMultiLineString(a); }, e.prototype.clone = function() { var i = this, a = r.prototype.clone.call(this); a._shell = this._shell.clone(), a._holes = new Array(this._holes.length).fill(null); for (var o = 0; o < this._holes.length; o++) a._holes[o] = i._holes[o].clone(); return a; }, e.prototype.getGeometryType = function() { return "Polygon"; }, e.prototype.copy = function() { for (var i = this, a = this._shell.copy(), o = new Array(this._holes.length).fill(null), s = 0; s < o.length; s++) o[s] = i._holes[s].copy(); return new e(a, o, this._factory); }, e.prototype.getExteriorRing = function() { return this._shell; }, e.prototype.isEmpty = function() { return this._shell.isEmpty(); }, e.prototype.getInteriorRingN = function(i) { return this._holes[i]; }, e.prototype.interfaces_ = function() { return [Uc]; }, e.prototype.getClass = function() { return e; }, t.serialVersionUID.get = function() { return -3494792200821764600; }, Object.defineProperties(e, t), e; }(at), pm = function(r) { function e() { r.apply(this, arguments); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { serialVersionUID: { configurable: !0 } }; return e.prototype.getSortIndex = function() { return at.SORTINDEX_MULTIPOINT; }, e.prototype.isValid = function() { return !0; }, e.prototype.equalsExact = function() { if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; return this.isEquivalentClass(i) ? r.prototype.equalsExact.call(this, i, a) : !1; } else return r.prototype.equalsExact.apply(this, arguments); }, e.prototype.getCoordinate = function() { if (arguments.length === 1) { var i = arguments[0]; return this._geometries[i].getCoordinate(); } else return r.prototype.getCoordinate.apply(this, arguments); }, e.prototype.getBoundaryDimension = function() { return Er.FALSE; }, e.prototype.getDimension = function() { return 0; }, e.prototype.getBoundary = function() { return this.getFactory().createGeometryCollection(null); }, e.prototype.getGeometryType = function() { return "MultiPoint"; }, e.prototype.copy = function() { for (var i = this, a = new Array(this._geometries.length).fill(null), o = 0; o < a.length; o++) a[o] = i._geometries[o].copy(); return new e(a, this._factory); }, e.prototype.interfaces_ = function() { return [X_]; }, e.prototype.getClass = function() { return e; }, t.serialVersionUID.get = function() { return -8048474874175356e3; }, Object.defineProperties(e, t), e; }(va), Yu = function(r) { function e(n, i) { n instanceof Z && i instanceof Dt && (n = i.getCoordinateSequenceFactory().create(n)), r.call(this, n, i), this.validateConstruction(); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { MINIMUM_VALID_SIZE: { configurable: !0 }, serialVersionUID: { configurable: !0 } }; return e.prototype.getSortIndex = function() { return at.SORTINDEX_LINEARRING; }, e.prototype.getBoundaryDimension = function() { return Er.FALSE; }, e.prototype.isClosed = function() { return this.isEmpty() ? !0 : r.prototype.isClosed.call(this); }, e.prototype.reverse = function() { var i = this._points.copy(); Dn.reverse(i); var a = this.getFactory().createLinearRing(i); return a; }, e.prototype.validateConstruction = function() { if (!this.isEmpty() && !r.prototype.isClosed.call(this)) throw new fn("Points of LinearRing do not form a closed linestring"); if (this.getCoordinateSequence().size() >= 1 && this.getCoordinateSequence().size() < e.MINIMUM_VALID_SIZE) throw new fn("Invalid number of points in LinearRing (found " + this.getCoordinateSequence().size() + " - must be 0 or >= 4)"); }, e.prototype.getGeometryType = function() { return "LinearRing"; }, e.prototype.copy = function() { return new e(this._points.copy(), this._factory); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, t.MINIMUM_VALID_SIZE.get = function() { return 4; }, t.serialVersionUID.get = function() { return -4261142084085851600; }, Object.defineProperties(e, t), e; }(xn), Vu = function(r) { function e() { r.apply(this, arguments); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { serialVersionUID: { configurable: !0 } }; return e.prototype.getSortIndex = function() { return at.SORTINDEX_MULTIPOLYGON; }, e.prototype.equalsExact = function() { if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; return this.isEquivalentClass(i) ? r.prototype.equalsExact.call(this, i, a) : !1; } else return r.prototype.equalsExact.apply(this, arguments); }, e.prototype.getBoundaryDimension = function() { return 1; }, e.prototype.getDimension = function() { return 2; }, e.prototype.reverse = function() { for (var i = this, a = this._geometries.length, o = new Array(a).fill(null), s = 0; s < this._geometries.length; s++) o[s] = i._geometries[s].reverse(); return this.getFactory().createMultiPolygon(o); }, e.prototype.getBoundary = function() { var i = this; if (this.isEmpty()) return this.getFactory().createMultiLineString(); for (var a = new be(), o = 0; o < this._geometries.length; o++) for (var s = i._geometries[o], u = s.getBoundary(), l = 0; l < u.getNumGeometries(); l++) a.add(u.getGeometryN(l)); var c = new Array(a.size()).fill(null); return this.getFactory().createMultiLineString(a.toArray(c)); }, e.prototype.getGeometryType = function() { return "MultiPolygon"; }, e.prototype.copy = function() { for (var i = this, a = new Array(this._geometries.length).fill(null), o = 0; o < a.length; o++) a[o] = i._geometries[o].copy(); return new e(a, this._factory); }, e.prototype.interfaces_ = function() { return [Uc]; }, e.prototype.getClass = function() { return e; }, t.serialVersionUID.get = function() { return -551033529766975900; }, Object.defineProperties(e, t), e; }(va), Vo = function(e) { this._factory = e || null, this._isUserDataCopied = !1; }, Kb = { NoOpGeometryOperation: { configurable: !0 }, CoordinateOperation: { configurable: !0 }, CoordinateSequenceOperation: { configurable: !0 } }; Vo.prototype.setCopyUserData = function(e) { this._isUserDataCopied = e; }; Vo.prototype.edit = function(e, t) { if (e === null) return null; var n = this.editInternal(e, t); return this._isUserDataCopied && n.setUserData(e.getUserData()), n; }; Vo.prototype.editInternal = function(e, t) { return this._factory === null && (this._factory = e.getFactory()), e instanceof va ? this.editGeometryCollection(e, t) : e instanceof qn ? this.editPolygon(e, t) : e instanceof Za ? t.edit(e, this._factory) : e instanceof xn ? t.edit(e, this._factory) : (Et.shouldNeverReachHere("Unsupported Geometry class: " + e.getClass().getName()), null); }; Vo.prototype.editGeometryCollection = function(e, t) { for (var n = this, i = t.edit(e, this._factory), a = new be(), o = 0; o < i.getNumGeometries(); o++) { var s = n.edit(i.getGeometryN(o), t); s === null || s.isEmpty() || a.add(s); } return i.getClass() === pm ? this._factory.createMultiPoint(a.toArray([])) : i.getClass() === Ch ? this._factory.createMultiLineString(a.toArray([])) : i.getClass() === Vu ? this._factory.createMultiPolygon(a.toArray([])) : this._factory.createGeometryCollection(a.toArray([])); }; Vo.prototype.editPolygon = function(e, t) { var n = this, i = t.edit(e, this._factory); if (i === null && (i = this._factory.createPolygon(null)), i.isEmpty()) return i; var a = this.edit(i.getExteriorRing(), t); if (a === null || a.isEmpty()) return this._factory.createPolygon(); for (var o = new be(), s = 0; s < i.getNumInteriorRing(); s++) { var u = n.edit(i.getInteriorRingN(s), t); u === null || u.isEmpty() || o.add(u); } return this._factory.createPolygon(a, o.toArray([])); }; Vo.prototype.interfaces_ = function() { return []; }; Vo.prototype.getClass = function() { return Vo; }; Vo.GeometryEditorOperation = function() { }; Kb.NoOpGeometryOperation.get = function() { return q_; }; Kb.CoordinateOperation.get = function() { return Z_; }; Kb.CoordinateSequenceOperation.get = function() { return K_; }; Object.defineProperties(Vo, Kb); var q_ = function() { }; q_.prototype.edit = function(e, t) { return e; }; q_.prototype.interfaces_ = function() { return [Vo.GeometryEditorOperation]; }; q_.prototype.getClass = function() { return q_; }; var Z_ = function() { }; Z_.prototype.edit = function(e, t) { var n = this.editCoordinates(e.getCoordinates(), e); return n === null ? e : e instanceof Yu ? t.createLinearRing(n) : e instanceof xn ? t.createLineString(n) : e instanceof Za ? n.length > 0 ? t.createPoint(n[0]) : t.createPoint() : e; }; Z_.prototype.interfaces_ = function() { return [Vo.GeometryEditorOperation]; }; Z_.prototype.getClass = function() { return Z_; }; var K_ = function() { }; K_.prototype.edit = function(e, t) { return e instanceof Yu ? t.createLinearRing(this.edit(e.getCoordinateSequence(), e)) : e instanceof xn ? t.createLineString(this.edit(e.getCoordinateSequence(), e)) : e instanceof Za ? t.createPoint(this.edit(e.getCoordinateSequence(), e)) : e; }; K_.prototype.interfaces_ = function() { return [Vo.GeometryEditorOperation]; }; K_.prototype.getClass = function() { return K_; }; var An = function() { var e = this; if (this._dimension = 3, this._coordinates = null, arguments.length === 1) { if (arguments[0] instanceof Array) this._coordinates = arguments[0], this._dimension = 3; else if (Number.isInteger(arguments[0])) { var t = arguments[0]; this._coordinates = new Array(t).fill(null); for (var n = 0; n < t; n++) e._coordinates[n] = new Z(); } else if (st(arguments[0], zt)) { var i = arguments[0]; if (i === null) return this._coordinates = new Array(0).fill(null), null; this._dimension = i.getDimension(), this._coordinates = new Array(i.size()).fill(null); for (var a = 0; a < this._coordinates.length; a++) e._coordinates[a] = i.getCoordinateCopy(a); } } else if (arguments.length === 2) { if (arguments[0] instanceof Array && Number.isInteger(arguments[1])) { var o = arguments[0], s = arguments[1]; this._coordinates = o, this._dimension = s, o === null && (this._coordinates = new Array(0).fill(null)); } else if (Number.isInteger(arguments[0]) && Number.isInteger(arguments[1])) { var u = arguments[0], l = arguments[1]; this._coordinates = new Array(u).fill(null), this._dimension = l; for (var c = 0; c < u; c++) e._coordinates[c] = new Z(); } } }, pW = { serialVersionUID: { configurable: !0 } }; An.prototype.setOrdinate = function(e, t, n) { switch (t) { case zt.X: this._coordinates[e].x = n; break; case zt.Y: this._coordinates[e].y = n; break; case zt.Z: this._coordinates[e].z = n; break; default: throw new fn("invalid ordinateIndex"); } }; An.prototype.size = function() { return this._coordinates.length; }; An.prototype.getOrdinate = function(e, t) { switch (t) { case zt.X: return this._coordinates[e].x; case zt.Y: return this._coordinates[e].y; case zt.Z: return this._coordinates[e].z; } return vt.NaN; }; An.prototype.getCoordinate = function() { if (arguments.length === 1) { var e = arguments[0]; return this._coordinates[e]; } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; n.x = this._coordinates[t].x, n.y = this._coordinates[t].y, n.z = this._coordinates[t].z; } }; An.prototype.getCoordinateCopy = function(e) { return new Z(this._coordinates[e]); }; An.prototype.getDimension = function() { return this._dimension; }; An.prototype.getX = function(e) { return this._coordinates[e].x; }; An.prototype.clone = function() { for (var e = this, t = new Array(this.size()).fill(null), n = 0; n < this._coordinates.length; n++) t[n] = e._coordinates[n].clone(); return new An(t, this._dimension); }; An.prototype.expandEnvelope = function(e) { for (var t = this, n = 0; n < this._coordinates.length; n++) e.expandToInclude(t._coordinates[n]); return e; }; An.prototype.copy = function() { for (var e = this, t = new Array(this.size()).fill(null), n = 0; n < this._coordinates.length; n++) t[n] = e._coordinates[n].copy(); return new An(t, this._dimension); }; An.prototype.toString = function() { var e = this; if (this._coordinates.length > 0) { var t = new mu(17 * this._coordinates.length); t.append("("), t.append(this._coordinates[0]); for (var n = 1; n < this._coordinates.length; n++) t.append(", "), t.append(e._coordinates[n]); return t.append(")"), t.toString(); } else return "()"; }; An.prototype.getY = function(e) { return this._coordinates[e].y; }; An.prototype.toCoordinateArray = function() { return this._coordinates; }; An.prototype.interfaces_ = function() { return [zt, Wo]; }; An.prototype.getClass = function() { return An; }; pW.serialVersionUID.get = function() { return -915438501601840600; }; Object.defineProperties(An, pW); var Xu = function() { }, uR = { serialVersionUID: { configurable: !0 }, instanceObject: { configurable: !0 } }; Xu.prototype.readResolve = function() { return Xu.instance(); }; Xu.prototype.create = function() { if (arguments.length === 1) { if (arguments[0] instanceof Array) { var e = arguments[0]; return new An(e); } else if (st(arguments[0], zt)) { var t = arguments[0]; return new An(t); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; return i > 3 && (i = 3), i < 2 ? new An(n) : new An(n, i); } }; Xu.prototype.interfaces_ = function() { return [sm, Wo]; }; Xu.prototype.getClass = function() { return Xu; }; Xu.instance = function() { return Xu.instanceObject; }; uR.serialVersionUID.get = function() { return -4099577099607551500; }; uR.instanceObject.get = function() { return new Xu(); }; Object.defineProperties(Xu, uR); var dW = function(r) { function e() { r.call(this), this.map_ = /* @__PURE__ */ new Map(); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.get = function(n) { return this.map_.get(n) || null; }, e.prototype.put = function(n, i) { return this.map_.set(n, i), i; }, e.prototype.values = function() { for (var n = new be(), i = this.map_.values(), a = i.next(); !a.done; ) n.add(a.value), a = i.next(); return n; }, e.prototype.entrySet = function() { var n = new oR(); return this.map_.entries().forEach(function(i) { return n.add(i); }), n; }, e.prototype.size = function() { return this.map_.size(); }, e; }(Qd), Tr = function r() { if (this._modelType = null, this._scale = null, arguments.length === 0) this._modelType = r.FLOATING; else if (arguments.length === 1) { if (arguments[0] instanceof ou) { var e = arguments[0]; this._modelType = e, e === r.FIXED && this.setScale(1); } else if (typeof arguments[0] == "number") { var t = arguments[0]; this._modelType = r.FIXED, this.setScale(t); } else if (arguments[0] instanceof r) { var n = arguments[0]; this._modelType = n._modelType, this._scale = n._scale; } } }, lR = { serialVersionUID: { configurable: !0 }, maximumPreciseValue: { configurable: !0 } }; Tr.prototype.equals = function(e) { if (!(e instanceof Tr)) return !1; var t = e; return this._modelType === t._modelType && this._scale === t._scale; }; Tr.prototype.compareTo = function(e) { var t = e, n = this.getMaximumSignificantDigits(), i = t.getMaximumSignificantDigits(); return new nu(n).compareTo(new nu(i)); }; Tr.prototype.getScale = function() { return this._scale; }; Tr.prototype.isFloating = function() { return this._modelType === Tr.FLOATING || this._modelType === Tr.FLOATING_SINGLE; }; Tr.prototype.getType = function() { return this._modelType; }; Tr.prototype.toString = function() { var e = "UNKNOWN"; return this._modelType === Tr.FLOATING ? e = "Floating" : this._modelType === Tr.FLOATING_SINGLE ? e = "Floating-Single" : this._modelType === Tr.FIXED && (e = "Fixed (Scale=" + this.getScale() + ")"), e; }; Tr.prototype.makePrecise = function() { if (typeof arguments[0] == "number") { var e = arguments[0]; if (vt.isNaN(e)) return e; if (this._modelType === Tr.FLOATING_SINGLE) { var t = e; return t; } return this._modelType === Tr.FIXED ? Math.round(e * this._scale) / this._scale : e; } else if (arguments[0] instanceof Z) { var n = arguments[0]; if (this._modelType === Tr.FLOATING) return null; n.x = this.makePrecise(n.x), n.y = this.makePrecise(n.y); } }; Tr.prototype.getMaximumSignificantDigits = function() { var e = 16; return this._modelType === Tr.FLOATING ? e = 16 : this._modelType === Tr.FLOATING_SINGLE ? e = 6 : this._modelType === Tr.FIXED && (e = 1 + Math.trunc(Math.ceil(Math.log(this.getScale()) / Math.log(10)))), e; }; Tr.prototype.setScale = function(e) { this._scale = Math.abs(e); }; Tr.prototype.interfaces_ = function() { return [Wo, Uo]; }; Tr.prototype.getClass = function() { return Tr; }; Tr.mostPrecise = function(e, t) { return e.compareTo(t) >= 0 ? e : t; }; lR.serialVersionUID.get = function() { return 7777263578777804e3; }; lR.maximumPreciseValue.get = function() { return 9007199254740992; }; Object.defineProperties(Tr, lR); var ou = function r(e) { this._name = e || null, r.nameToTypeMap.put(e, this); }, cR = { serialVersionUID: { configurable: !0 }, nameToTypeMap: { configurable: !0 } }; ou.prototype.readResolve = function() { return ou.nameToTypeMap.get(this._name); }; ou.prototype.toString = function() { return this._name; }; ou.prototype.interfaces_ = function() { return [Wo]; }; ou.prototype.getClass = function() { return ou; }; cR.serialVersionUID.get = function() { return -552860263173159e4; }; cR.nameToTypeMap.get = function() { return new dW(); }; Object.defineProperties(ou, cR); Tr.Type = ou; Tr.FIXED = new ou("FIXED"); Tr.FLOATING = new ou("FLOATING"); Tr.FLOATING_SINGLE = new ou("FLOATING SINGLE"); var Dt = function r() { this._precisionModel = new Tr(), this._SRID = 0, this._coordinateSequenceFactory = r.getDefaultCoordinateSequenceFactory(), arguments.length === 0 || (arguments.length === 1 ? st(arguments[0], sm) ? this._coordinateSequenceFactory = arguments[0] : arguments[0] instanceof Tr && (this._precisionModel = arguments[0]) : arguments.length === 2 ? (this._precisionModel = arguments[0], this._SRID = arguments[1]) : arguments.length === 3 && (this._precisionModel = arguments[0], this._SRID = arguments[1], this._coordinateSequenceFactory = arguments[2])); }, vW = { serialVersionUID: { configurable: !0 } }; Dt.prototype.toGeometry = function(e) { return e.isNull() ? this.createPoint(null) : e.getMinX() === e.getMaxX() && e.getMinY() === e.getMaxY() ? this.createPoint(new Z(e.getMinX(), e.getMinY())) : e.getMinX() === e.getMaxX() || e.getMinY() === e.getMaxY() ? this.createLineString([new Z(e.getMinX(), e.getMinY()), new Z(e.getMaxX(), e.getMaxY())]) : this.createPolygon(this.createLinearRing([new Z(e.getMinX(), e.getMinY()), new Z(e.getMinX(), e.getMaxY()), new Z(e.getMaxX(), e.getMaxY()), new Z(e.getMaxX(), e.getMinY()), new Z(e.getMinX(), e.getMinY())]), null); }; Dt.prototype.createLineString = function(e) { if (e) { if (e instanceof Array) return new xn(this.getCoordinateSequenceFactory().create(e), this); if (st(e, zt)) return new xn(e, this); } else return new xn(this.getCoordinateSequenceFactory().create([]), this); }; Dt.prototype.createMultiLineString = function() { if (arguments.length === 0) return new Ch(null, this); if (arguments.length === 1) { var e = arguments[0]; return new Ch(e, this); } }; Dt.prototype.buildGeometry = function(e) { for (var t = null, n = !1, i = !1, a = e.iterator(); a.hasNext(); ) { var o = a.next(), s = o.getClass(); t === null && (t = s), s !== t && (n = !0), o.isGeometryCollectionOrDerived() && (i = !0); } if (t === null) return this.createGeometryCollection(); if (n || i) return this.createGeometryCollection(Dt.toGeometryArray(e)); var u = e.iterator().next(), l = e.size() > 1; if (l) { if (u instanceof qn) return this.createMultiPolygon(Dt.toPolygonArray(e)); if (u instanceof xn) return this.createMultiLineString(Dt.toLineStringArray(e)); if (u instanceof Za) return this.createMultiPoint(Dt.toPointArray(e)); Et.shouldNeverReachHere("Unhandled class: " + u.getClass().getName()); } return u; }; Dt.prototype.createMultiPointFromCoords = function(e) { return this.createMultiPoint(e !== null ? this.getCoordinateSequenceFactory().create(e) : null); }; Dt.prototype.createPoint = function() { if (arguments.length === 0) return this.createPoint(this.getCoordinateSequenceFactory().create([])); if (arguments.length === 1) { if (arguments[0] instanceof Z) { var e = arguments[0]; return this.createPoint(e !== null ? this.getCoordinateSequenceFactory().create([e]) : null); } else if (st(arguments[0], zt)) { var t = arguments[0]; return new Za(t, this); } } }; Dt.prototype.getCoordinateSequenceFactory = function() { return this._coordinateSequenceFactory; }; Dt.prototype.createPolygon = function() { if (arguments.length === 0) return new qn(null, null, this); if (arguments.length === 1) { if (st(arguments[0], zt)) { var e = arguments[0]; return this.createPolygon(this.createLinearRing(e)); } else if (arguments[0] instanceof Array) { var t = arguments[0]; return this.createPolygon(this.createLinearRing(t)); } else if (arguments[0] instanceof Yu) { var n = arguments[0]; return this.createPolygon(n, null); } } else if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; return new qn(i, a, this); } }; Dt.prototype.getSRID = function() { return this._SRID; }; Dt.prototype.createGeometryCollection = function() { if (arguments.length === 0) return new va(null, this); if (arguments.length === 1) { var e = arguments[0]; return new va(e, this); } }; Dt.prototype.createGeometry = function(e) { var t = new Vo(this); return t.edit(e, { edit: function() { if (arguments.length === 2) { var n = arguments[0]; return this._coordinateSequenceFactory.create(n); } } }); }; Dt.prototype.getPrecisionModel = function() { return this._precisionModel; }; Dt.prototype.createLinearRing = function() { if (arguments.length === 0) return this.createLinearRing(this.getCoordinateSequenceFactory().create([])); if (arguments.length === 1) { if (arguments[0] instanceof Array) { var e = arguments[0]; return this.createLinearRing(e !== null ? this.getCoordinateSequenceFactory().create(e) : null); } else if (st(arguments[0], zt)) { var t = arguments[0]; return new Yu(t, this); } } }; Dt.prototype.createMultiPolygon = function() { if (arguments.length === 0) return new Vu(null, this); if (arguments.length === 1) { var e = arguments[0]; return new Vu(e, this); } }; Dt.prototype.createMultiPoint = function() { var e = this; if (arguments.length === 0) return new pm(null, this); if (arguments.length === 1) { if (arguments[0] instanceof Array) { var t = arguments[0]; return new pm(t, this); } else if (arguments[0] instanceof Array) { var n = arguments[0]; return this.createMultiPoint(n !== null ? this.getCoordinateSequenceFactory().create(n) : null); } else if (st(arguments[0], zt)) { var i = arguments[0]; if (i === null) return this.createMultiPoint(new Array(0).fill(null)); for (var a = new Array(i.size()).fill(null), o = 0; o < i.size(); o++) { var s = e.getCoordinateSequenceFactory().create(1, i.getDimension()); Dn.copy(i, o, s, 0, 1), a[o] = e.createPoint(s); } return this.createMultiPoint(a); } } }; Dt.prototype.interfaces_ = function() { return [Wo]; }; Dt.prototype.getClass = function() { return Dt; }; Dt.toMultiPolygonArray = function(e) { var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.toGeometryArray = function(e) { if (e === null) return null; var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.getDefaultCoordinateSequenceFactory = function() { return Xu.instance(); }; Dt.toMultiLineStringArray = function(e) { var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.toLineStringArray = function(e) { var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.toMultiPointArray = function(e) { var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.toLinearRingArray = function(e) { var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.toPointArray = function(e) { var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.toPolygonArray = function(e) { var t = new Array(e.size()).fill(null); return e.toArray(t); }; Dt.createPointFromInternalCoord = function(e, t) { return t.getPrecisionModel().makePrecise(e), t.getFactory().createPoint(e); }; vW.serialVersionUID.get = function() { return -6820524753094096e3; }; Object.defineProperties(Dt, vW); var jfe = ["Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"], Jb = function(e) { this.geometryFactory = e || new Dt(); }; Jb.prototype.read = function(e) { var t; typeof e == "string" ? t = JSON.parse(e) : t = e; var n = t.type; if (!Hs[n]) throw new Error("Unknown GeoJSON type: " + t.type); return jfe.indexOf(n) !== -1 ? Hs[n].apply(this, [t.coordinates]) : n === "GeometryCollection" ? Hs[n].apply(this, [t.geometries]) : Hs[n].apply(this, [t]); }; Jb.prototype.write = function(e) { var t = e.getGeometryType(); if (!Pl[t]) throw new Error("Geometry is not supported"); return Pl[t].apply(this, [e]); }; var Hs = { Feature: function(r) { var e = {}; for (var t in r) e[t] = r[t]; if (r.geometry) { var n = r.geometry.type; if (!Hs[n]) throw new Error("Unknown GeoJSON type: " + r.type); e.geometry = this.read(r.geometry); } return r.bbox && (e.bbox = Hs.bbox.apply(this, [r.bbox])), e; }, FeatureCollection: function(r) { var e = this, t = {}; if (r.features) { t.features = []; for (var n = 0; n < r.features.length; ++n) t.features.push(e.read(r.features[n])); } return r.bbox && (t.bbox = this.parse.bbox.apply(this, [r.bbox])), t; }, coordinates: function(r) { for (var e = [], t = 0; t < r.length; ++t) { var n = r[t]; e.push(new Z(n[0], n[1])); } return e; }, bbox: function(r) { return this.geometryFactory.createLinearRing([ new Z(r[0], r[1]), new Z(r[2], r[1]), new Z(r[2], r[3]), new Z(r[0], r[3]), new Z(r[0], r[1]) ]); }, Point: function(r) { var e = new Z(r[0], r[1]); return this.geometryFactory.createPoint(e); }, MultiPoint: function(r) { for (var e = this, t = [], n = 0; n < r.length; ++n) t.push(Hs.Point.apply(e, [r[n]])); return this.geometryFactory.createMultiPoint(t); }, LineString: function(r) { var e = Hs.coordinates.apply(this, [r]); return this.geometryFactory.createLineString(e); }, MultiLineString: function(r) { for (var e = this, t = [], n = 0; n < r.length; ++n) t.push(Hs.LineString.apply(e, [r[n]])); return this.geometryFactory.createMultiLineString(t); }, Polygon: function(r) { for (var e = this, t = Hs.coordinates.apply(this, [r[0]]), n = this.geometryFactory.createLinearRing(t), i = [], a = 1; a < r.length; ++a) { var o = r[a], s = Hs.coordinates.apply(e, [o]), u = e.geometryFactory.createLinearRing(s); i.push(u); } return this.geometryFactory.createPolygon(n, i); }, MultiPolygon: function(r) { for (var e = this, t = [], n = 0; n < r.length; ++n) { var i = r[n]; t.push(Hs.Polygon.apply(e, [i])); } return this.geometryFactory.createMultiPolygon(t); }, GeometryCollection: function(r) { for (var e = this, t = [], n = 0; n < r.length; ++n) { var i = r[n]; t.push(e.read(i)); } return this.geometryFactory.createGeometryCollection(t); } }, Pl = { coordinate: function(r) { return [r.x, r.y]; }, Point: function(r) { var e = Pl.coordinate.apply(this, [r.getCoordinate()]); return { type: "Point", coordinates: e }; }, MultiPoint: function(r) { for (var e = this, t = [], n = 0; n < r._geometries.length; ++n) { var i = r._geometries[n], a = Pl.Point.apply(e, [i]); t.push(a.coordinates); } return { type: "MultiPoint", coordinates: t }; }, LineString: function(r) { for (var e = this, t = [], n = r.getCoordinates(), i = 0; i < n.length; ++i) { var a = n[i]; t.push(Pl.coordinate.apply(e, [a])); } return { type: "LineString", coordinates: t }; }, MultiLineString: function(r) { for (var e = this, t = [], n = 0; n < r._geometries.length; ++n) { var i = r._geometries[n], a = Pl.LineString.apply(e, [i]); t.push(a.coordinates); } return { type: "MultiLineString", coordinates: t }; }, Polygon: function(r) { var e = this, t = [], n = Pl.LineString.apply(this, [r._shell]); t.push(n.coordinates); for (var i = 0; i < r._holes.length; ++i) { var a = r._holes[i], o = Pl.LineString.apply(e, [a]); t.push(o.coordinates); } return { type: "Polygon", coordinates: t }; }, MultiPolygon: function(r) { for (var e = this, t = [], n = 0; n < r._geometries.length; ++n) { var i = r._geometries[n], a = Pl.Polygon.apply(e, [i]); t.push(a.coordinates); } return { type: "MultiPolygon", coordinates: t }; }, GeometryCollection: function(r) { for (var e = this, t = [], n = 0; n < r._geometries.length; ++n) { var i = r._geometries[n], a = i.getGeometryType(); t.push(Pl[a].apply(e, [i])); } return { type: "GeometryCollection", geometries: t }; } }, fR = function(e) { this.geometryFactory = e || new Dt(), this.precisionModel = this.geometryFactory.getPrecisionModel(), this.parser = new Jb(this.geometryFactory); }; fR.prototype.read = function(e) { var t = this.parser.read(e); return this.precisionModel.getType() === Tr.FIXED && this.reducePrecision(t), t; }; fR.prototype.reducePrecision = function(e) { var t = this, n, i; if (e.coordinate) this.precisionModel.makePrecise(e.coordinate); else if (e.points) for (n = 0, i = e.points.length; n < i; n++) t.precisionModel.makePrecise(e.points[n]); else if (e.geometries) for (n = 0, i = e.geometries.length; n < i; n++) t.reducePrecision(e.geometries[n]); }; var gW = function() { this.parser = new Jb(this.geometryFactory); }; gW.prototype.write = function(e) { return this.parser.write(e); }; var _e = function() { }, Qb = { ON: { configurable: !0 }, LEFT: { configurable: !0 }, RIGHT: { configurable: !0 } }; _e.prototype.interfaces_ = function() { return []; }; _e.prototype.getClass = function() { return _e; }; _e.opposite = function(e) { return e === _e.LEFT ? _e.RIGHT : e === _e.RIGHT ? _e.LEFT : e; }; Qb.ON.get = function() { return 0; }; Qb.LEFT.get = function() { return 1; }; Qb.RIGHT.get = function() { return 2; }; Object.defineProperties(_e, Qb); function eT(r) { this.message = r || ""; } eT.prototype = new Error(); eT.prototype.name = "EmptyStackException"; function yu() { this.array_ = []; } yu.prototype = new cs(); yu.prototype.add = function(r) { return this.array_.push(r), !0; }; yu.prototype.get = function(r) { if (r < 0 || r >= this.size()) throw new Error(); return this.array_[r]; }; yu.prototype.push = function(r) { return this.array_.push(r), r; }; yu.prototype.pop = function(r) { if (this.array_.length === 0) throw new eT(); return this.array_.pop(); }; yu.prototype.peek = function() { if (this.array_.length === 0) throw new eT(); return this.array_[this.array_.length - 1]; }; yu.prototype.empty = function() { return this.array_.length === 0; }; yu.prototype.isEmpty = function() { return this.empty(); }; yu.prototype.search = function(r) { return this.array_.indexOf(r); }; yu.prototype.size = function() { return this.array_.length; }; yu.prototype.toArray = function() { for (var r = this, e = [], t = 0, n = this.array_.length; t < n; t++) e.push(r.array_[t]); return e; }; var su = function() { this._minIndex = -1, this._minCoord = null, this._minDe = null, this._orientedDe = null; }; su.prototype.getCoordinate = function() { return this._minCoord; }; su.prototype.getRightmostSide = function(e, t) { var n = this.getRightmostSideOfSegment(e, t); return n < 0 && (n = this.getRightmostSideOfSegment(e, t - 1)), n < 0 && (this._minCoord = null, this.checkForRightmostCoordinate(e)), n; }; su.prototype.findRightmostEdgeAtVertex = function() { var e = this._minDe.getEdge().getCoordinates(); Et.isTrue(this._minIndex > 0 && this._minIndex < e.length, "rightmost point expected to be interior vertex of edge"); var t = e[this._minIndex - 1], n = e[this._minIndex + 1], i = Me.computeOrientation(this._minCoord, n, t), a = !1; (t.y < this._minCoord.y && n.y < this._minCoord.y && i === Me.COUNTERCLOCKWISE || t.y > this._minCoord.y && n.y > this._minCoord.y && i === Me.CLOCKWISE) && (a = !0), a && (this._minIndex = this._minIndex - 1); }; su.prototype.getRightmostSideOfSegment = function(e, t) { var n = e.getEdge(), i = n.getCoordinates(); if (t < 0 || t + 1 >= i.length || i[t].y === i[t + 1].y) return -1; var a = _e.LEFT; return i[t].y < i[t + 1].y && (a = _e.RIGHT), a; }; su.prototype.getEdge = function() { return this._orientedDe; }; su.prototype.checkForRightmostCoordinate = function(e) { for (var t = this, n = e.getEdge().getCoordinates(), i = 0; i < n.length - 1; i++) (t._minCoord === null || n[i].x > t._minCoord.x) && (t._minDe = e, t._minIndex = i, t._minCoord = n[i]); }; su.prototype.findRightmostEdgeAtNode = function() { var e = this._minDe.getNode(), t = e.getEdges(); this._minDe = t.getRightmostEdge(), this._minDe.isForward() || (this._minDe = this._minDe.getSym(), this._minIndex = this._minDe.getEdge().getCoordinates().length - 1); }; su.prototype.findEdge = function(e) { for (var t = this, n = e.iterator(); n.hasNext(); ) { var i = n.next(); !i.isForward() || t.checkForRightmostCoordinate(i); } Et.isTrue(this._minIndex !== 0 || this._minCoord.equals(this._minDe.getCoordinate()), "inconsistency in rightmost processing"), this._minIndex === 0 ? this.findRightmostEdgeAtNode() : this.findRightmostEdgeAtVertex(), this._orientedDe = this._minDe; var a = this.getRightmostSide(this._minDe, this._minIndex); a === _e.LEFT && (this._orientedDe = this._minDe.getSym()); }; su.prototype.interfaces_ = function() { return []; }; su.prototype.getClass = function() { return su; }; var jl = function(r) { function e(t, n) { r.call(this, e.msgWithCoord(t, n)), this.pt = n ? new Z(n) : null, this.name = "TopologyException"; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.getCoordinate = function() { return this.pt; }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e.msgWithCoord = function(n, i) { return i ? n : n + " [ " + i + " ]"; }, e; }(Ul), tT = function() { this.array_ = []; }; tT.prototype.addLast = function(e) { this.array_.push(e); }; tT.prototype.removeFirst = function() { return this.array_.shift(); }; tT.prototype.isEmpty = function() { return this.array_.length === 0; }; var ga = function() { this._finder = null, this._dirEdgeList = new be(), this._nodes = new be(), this._rightMostCoord = null, this._env = null, this._finder = new su(); }; ga.prototype.clearVisitedEdges = function() { for (var e = this._dirEdgeList.iterator(); e.hasNext(); ) { var t = e.next(); t.setVisited(!1); } }; ga.prototype.getRightmostCoordinate = function() { return this._rightMostCoord; }; ga.prototype.computeNodeDepth = function(e) { for (var t = this, n = null, i = e.getEdges().iterator(); i.hasNext(); ) { var a = i.next(); if (a.isVisited() || a.getSym().isVisited()) { n = a; break; } } if (n === null) throw new jl("unable to find edge to compute depths at " + e.getCoordinate()); e.getEdges().computeDepths(n); for (var o = e.getEdges().iterator(); o.hasNext(); ) { var s = o.next(); s.setVisited(!0), t.copySymDepths(s); } }; ga.prototype.computeDepth = function(e) { this.clearVisitedEdges(); var t = this._finder.getEdge(); t.setEdgeDepths(_e.RIGHT, e), this.copySymDepths(t), this.computeDepths(t); }; ga.prototype.create = function(e) { this.addReachable(e), this._finder.findEdge(this._dirEdgeList), this._rightMostCoord = this._finder.getCoordinate(); }; ga.prototype.findResultEdges = function() { for (var e = this._dirEdgeList.iterator(); e.hasNext(); ) { var t = e.next(); t.getDepth(_e.RIGHT) >= 1 && t.getDepth(_e.LEFT) <= 0 && !t.isInteriorAreaEdge() && t.setInResult(!0); } }; ga.prototype.computeDepths = function(e) { var t = this, n = new oR(), i = new tT(), a = e.getNode(); for (i.addLast(a), n.add(a), e.setVisited(!0); !i.isEmpty(); ) { var o = i.removeFirst(); n.add(o), t.computeNodeDepth(o); for (var s = o.getEdges().iterator(); s.hasNext(); ) { var u = s.next(), l = u.getSym(); if (!l.isVisited()) { var c = l.getNode(); n.contains(c) || (i.addLast(c), n.add(c)); } } } }; ga.prototype.compareTo = function(e) { var t = e; return this._rightMostCoord.x < t._rightMostCoord.x ? -1 : this._rightMostCoord.x > t._rightMostCoord.x ? 1 : 0; }; ga.prototype.getEnvelope = function() { if (this._env === null) { for (var e = new Ke(), t = this._dirEdgeList.iterator(); t.hasNext(); ) for (var n = t.next(), i = n.getEdge().getCoordinates(), a = 0; a < i.length - 1; a++) e.expandToInclude(i[a]); this._env = e; } return this._env; }; ga.prototype.addReachable = function(e) { var t = this, n = new yu(); for (n.add(e); !n.empty(); ) { var i = n.pop(); t.add(i, n); } }; ga.prototype.copySymDepths = function(e) { var t = e.getSym(); t.setDepth(_e.LEFT, e.getDepth(_e.RIGHT)), t.setDepth(_e.RIGHT, e.getDepth(_e.LEFT)); }; ga.prototype.add = function(e, t) { var n = this; e.setVisited(!0), this._nodes.add(e); for (var i = e.getEdges().iterator(); i.hasNext(); ) { var a = i.next(); n._dirEdgeList.add(a); var o = a.getSym(), s = o.getNode(); s.isVisited() || t.push(s); } }; ga.prototype.getNodes = function() { return this._nodes; }; ga.prototype.getDirectedEdges = function() { return this._dirEdgeList; }; ga.prototype.interfaces_ = function() { return [Uo]; }; ga.prototype.getClass = function() { return ga; }; var Xr = function r() { var e = this; if (this.location = null, arguments.length === 1) { if (arguments[0] instanceof Array) { var t = arguments[0]; this.init(t.length); } else if (Number.isInteger(arguments[0])) { var n = arguments[0]; this.init(1), this.location[_e.ON] = n; } else if (arguments[0] instanceof r) { var i = arguments[0]; if (this.init(i.location.length), i !== null) for (var a = 0; a < this.location.length; a++) e.location[a] = i.location[a]; } } else if (arguments.length === 3) { var o = arguments[0], s = arguments[1], u = arguments[2]; this.init(3), this.location[_e.ON] = o, this.location[_e.LEFT] = s, this.location[_e.RIGHT] = u; } }; Xr.prototype.setAllLocations = function(e) { for (var t = this, n = 0; n < this.location.length; n++) t.location[n] = e; }; Xr.prototype.isNull = function() { for (var e = this, t = 0; t < this.location.length; t++) if (e.location[t] !== Q.NONE) return !1; return !0; }; Xr.prototype.setAllLocationsIfNull = function(e) { for (var t = this, n = 0; n < this.location.length; n++) t.location[n] === Q.NONE && (t.location[n] = e); }; Xr.prototype.isLine = function() { return this.location.length === 1; }; Xr.prototype.merge = function(e) { var t = this; if (e.location.length > this.location.length) { var n = new Array(3).fill(null); n[_e.ON] = this.location[_e.ON], n[_e.LEFT] = Q.NONE, n[_e.RIGHT] = Q.NONE, this.location = n; } for (var i = 0; i < this.location.length; i++) t.location[i] === Q.NONE && i < e.location.length && (t.location[i] = e.location[i]); }; Xr.prototype.getLocations = function() { return this.location; }; Xr.prototype.flip = function() { if (this.location.length <= 1) return null; var e = this.location[_e.LEFT]; this.location[_e.LEFT] = this.location[_e.RIGHT], this.location[_e.RIGHT] = e; }; Xr.prototype.toString = function() { var e = new mu(); return this.location.length > 1 && e.append(Q.toLocationSymbol(this.location[_e.LEFT])), e.append(Q.toLocationSymbol(this.location[_e.ON])), this.location.length > 1 && e.append(Q.toLocationSymbol(this.location[_e.RIGHT])), e.toString(); }; Xr.prototype.setLocations = function(e, t, n) { this.location[_e.ON] = e, this.location[_e.LEFT] = t, this.location[_e.RIGHT] = n; }; Xr.prototype.get = function(e) { return e < this.location.length ? this.location[e] : Q.NONE; }; Xr.prototype.isArea = function() { return this.location.length > 1; }; Xr.prototype.isAnyNull = function() { for (var e = this, t = 0; t < this.location.length; t++) if (e.location[t] === Q.NONE) return !0; return !1; }; Xr.prototype.setLocation = function() { if (arguments.length === 1) { var e = arguments[0]; this.setLocation(_e.ON, e); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; this.location[t] = n; } }; Xr.prototype.init = function(e) { this.location = new Array(e).fill(null), this.setAllLocations(Q.NONE); }; Xr.prototype.isEqualOnSide = function(e, t) { return this.location[t] === e.location[t]; }; Xr.prototype.allPositionsEqual = function(e) { for (var t = this, n = 0; n < this.location.length; n++) if (t.location[n] !== e) return !1; return !0; }; Xr.prototype.interfaces_ = function() { return []; }; Xr.prototype.getClass = function() { return Xr; }; var Or = function r() { if (this.elt = new Array(2).fill(null), arguments.length === 1) { if (Number.isInteger(arguments[0])) { var e = arguments[0]; this.elt[0] = new Xr(e), this.elt[1] = new Xr(e); } else if (arguments[0] instanceof r) { var t = arguments[0]; this.elt[0] = new Xr(t.elt[0]), this.elt[1] = new Xr(t.elt[1]); } } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this.elt[0] = new Xr(Q.NONE), this.elt[1] = new Xr(Q.NONE), this.elt[n].setLocation(i); } else if (arguments.length === 3) { var a = arguments[0], o = arguments[1], s = arguments[2]; this.elt[0] = new Xr(a, o, s), this.elt[1] = new Xr(a, o, s); } else if (arguments.length === 4) { var u = arguments[0], l = arguments[1], c = arguments[2], f = arguments[3]; this.elt[0] = new Xr(Q.NONE, Q.NONE, Q.NONE), this.elt[1] = new Xr(Q.NONE, Q.NONE, Q.NONE), this.elt[u].setLocations(l, c, f); } }; Or.prototype.getGeometryCount = function() { var e = 0; return this.elt[0].isNull() || e++, this.elt[1].isNull() || e++, e; }; Or.prototype.setAllLocations = function(e, t) { this.elt[e].setAllLocations(t); }; Or.prototype.isNull = function(e) { return this.elt[e].isNull(); }; Or.prototype.setAllLocationsIfNull = function() { if (arguments.length === 1) { var e = arguments[0]; this.setAllLocationsIfNull(0, e), this.setAllLocationsIfNull(1, e); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; this.elt[t].setAllLocationsIfNull(n); } }; Or.prototype.isLine = function(e) { return this.elt[e].isLine(); }; Or.prototype.merge = function(e) { for (var t = this, n = 0; n < 2; n++) t.elt[n] === null && e.elt[n] !== null ? t.elt[n] = new Xr(e.elt[n]) : t.elt[n].merge(e.elt[n]); }; Or.prototype.flip = function() { this.elt[0].flip(), this.elt[1].flip(); }; Or.prototype.getLocation = function() { if (arguments.length === 1) { var e = arguments[0]; return this.elt[e].get(_e.ON); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; return this.elt[t].get(n); } }; Or.prototype.toString = function() { var e = new mu(); return this.elt[0] !== null && (e.append("A:"), e.append(this.elt[0].toString())), this.elt[1] !== null && (e.append(" B:"), e.append(this.elt[1].toString())), e.toString(); }; Or.prototype.isArea = function() { if (arguments.length === 0) return this.elt[0].isArea() || this.elt[1].isArea(); if (arguments.length === 1) { var e = arguments[0]; return this.elt[e].isArea(); } }; Or.prototype.isAnyNull = function(e) { return this.elt[e].isAnyNull(); }; Or.prototype.setLocation = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1]; this.elt[e].setLocation(_e.ON, t); } else if (arguments.length === 3) { var n = arguments[0], i = arguments[1], a = arguments[2]; this.elt[n].setLocation(i, a); } }; Or.prototype.isEqualOnSide = function(e, t) { return this.elt[0].isEqualOnSide(e.elt[0], t) && this.elt[1].isEqualOnSide(e.elt[1], t); }; Or.prototype.allPositionsEqual = function(e, t) { return this.elt[e].allPositionsEqual(t); }; Or.prototype.toLine = function(e) { this.elt[e].isArea() && (this.elt[e] = new Xr(this.elt[e].location[0])); }; Or.prototype.interfaces_ = function() { return []; }; Or.prototype.getClass = function() { return Or; }; Or.toLineLabel = function(e) { for (var t = new Or(Q.NONE), n = 0; n < 2; n++) t.setLocation(n, e.getLocation(n)); return t; }; var kn = function() { this._startDe = null, this._maxNodeDegree = -1, this._edges = new be(), this._pts = new be(), this._label = new Or(Q.NONE), this._ring = null, this._isHole = null, this._shell = null, this._holes = new be(), this._geometryFactory = null; var e = arguments[0], t = arguments[1]; this._geometryFactory = t, this.computePoints(e), this.computeRing(); }; kn.prototype.computeRing = function() { var e = this; if (this._ring !== null) return null; for (var t = new Array(this._pts.size()).fill(null), n = 0; n < this._pts.size(); n++) t[n] = e._pts.get(n); this._ring = this._geometryFactory.createLinearRing(t), this._isHole = Me.isCCW(this._ring.getCoordinates()); }; kn.prototype.isIsolated = function() { return this._label.getGeometryCount() === 1; }; kn.prototype.computePoints = function(e) { var t = this; this._startDe = e; var n = e, i = !0; do { if (n === null) throw new jl("Found null DirectedEdge"); if (n.getEdgeRing() === t) throw new jl("Directed Edge visited twice during ring-building at " + n.getCoordinate()); t._edges.add(n); var a = n.getLabel(); Et.isTrue(a.isArea()), t.mergeLabel(a), t.addPoints(n.getEdge(), n.isForward(), i), i = !1, t.setEdgeRing(n, t), n = t.getNext(n); } while (n !== this._startDe); }; kn.prototype.getLinearRing = function() { return this._ring; }; kn.prototype.getCoordinate = function(e) { return this._pts.get(e); }; kn.prototype.computeMaxNodeDegree = function() { var e = this; this._maxNodeDegree = 0; var t = this._startDe; do { var n = t.getNode(), i = n.getEdges().getOutgoingDegree(e); i > e._maxNodeDegree && (e._maxNodeDegree = i), t = e.getNext(t); } while (t !== this._startDe); this._maxNodeDegree *= 2; }; kn.prototype.addPoints = function(e, t, n) { var i = this, a = e.getCoordinates(); if (t) { var o = 1; n && (o = 0); for (var s = o; s < a.length; s++) i._pts.add(a[s]); } else { var u = a.length - 2; n && (u = a.length - 1); for (var l = u; l >= 0; l--) i._pts.add(a[l]); } }; kn.prototype.isHole = function() { return this._isHole; }; kn.prototype.setInResult = function() { var e = this._startDe; do e.getEdge().setInResult(!0), e = e.getNext(); while (e !== this._startDe); }; kn.prototype.containsPoint = function(e) { var t = this.getLinearRing(), n = t.getEnvelopeInternal(); if (!n.contains(e) || !Me.isPointInRing(e, t.getCoordinates())) return !1; for (var i = this._holes.iterator(); i.hasNext(); ) { var a = i.next(); if (a.containsPoint(e)) return !1; } return !0; }; kn.prototype.addHole = function(e) { this._holes.add(e); }; kn.prototype.isShell = function() { return this._shell === null; }; kn.prototype.getLabel = function() { return this._label; }; kn.prototype.getEdges = function() { return this._edges; }; kn.prototype.getMaxNodeDegree = function() { return this._maxNodeDegree < 0 && this.computeMaxNodeDegree(), this._maxNodeDegree; }; kn.prototype.getShell = function() { return this._shell; }; kn.prototype.mergeLabel = function() { if (arguments.length === 1) { var e = arguments[0]; this.mergeLabel(e, 0), this.mergeLabel(e, 1); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1], i = t.getLocation(n, _e.RIGHT); if (i === Q.NONE) return null; if (this._label.getLocation(n) === Q.NONE) return this._label.setLocation(n, i), null; } }; kn.prototype.setShell = function(e) { this._shell = e, e !== null && e.addHole(this); }; kn.prototype.toPolygon = function(e) { for (var t = this, n = new Array(this._holes.size()).fill(null), i = 0; i < this._holes.size(); i++) n[i] = t._holes.get(i).getLinearRing(); var a = e.createPolygon(this.getLinearRing(), n); return a; }; kn.prototype.interfaces_ = function() { return []; }; kn.prototype.getClass = function() { return kn; }; var Yfe = function(r) { function e() { var t = arguments[0], n = arguments[1]; r.call(this, t, n); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.setEdgeRing = function(n, i) { n.setMinEdgeRing(i); }, e.prototype.getNext = function(n) { return n.getNextMin(); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(kn), Xfe = function(r) { function e() { var t = arguments[0], n = arguments[1]; r.call(this, t, n); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.buildMinimalRings = function() { var n = this, i = new be(), a = this._startDe; do { if (a.getMinEdgeRing() === null) { var o = new Yfe(a, n._geometryFactory); i.add(o); } a = a.getNext(); } while (a !== this._startDe); return i; }, e.prototype.setEdgeRing = function(n, i) { n.setEdgeRing(i); }, e.prototype.linkDirectedEdgesForMinimalEdgeRings = function() { var n = this, i = this._startDe; do { var a = i.getNode(); a.getEdges().linkMinimalDirectedEdges(n), i = i.getNext(); } while (i !== this._startDe); }, e.prototype.getNext = function(n) { return n.getNext(); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(kn), mo = function() { if (this._label = null, this._isInResult = !1, this._isCovered = !1, this._isCoveredSet = !1, this._isVisited = !1, arguments.length !== 0) { if (arguments.length === 1) { var e = arguments[0]; this._label = e; } } }; mo.prototype.setVisited = function(e) { this._isVisited = e; }; mo.prototype.setInResult = function(e) { this._isInResult = e; }; mo.prototype.isCovered = function() { return this._isCovered; }; mo.prototype.isCoveredSet = function() { return this._isCoveredSet; }; mo.prototype.setLabel = function(e) { this._label = e; }; mo.prototype.getLabel = function() { return this._label; }; mo.prototype.setCovered = function(e) { this._isCovered = e, this._isCoveredSet = !0; }; mo.prototype.updateIM = function(e) { Et.isTrue(this._label.getGeometryCount() >= 2, "found partial label"), this.computeIM(e); }; mo.prototype.isInResult = function() { return this._isInResult; }; mo.prototype.isVisited = function() { return this._isVisited; }; mo.prototype.interfaces_ = function() { return []; }; mo.prototype.getClass = function() { return mo; }; var rT = function(r) { function e() { r.call(this), this._coord = null, this._edges = null; var t = arguments[0], n = arguments[1]; this._coord = t, this._edges = n, this._label = new Or(0, Q.NONE); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.isIncidentEdgeInResult = function() { for (var n = this.getEdges().getEdges().iterator(); n.hasNext(); ) { var i = n.next(); if (i.getEdge().isInResult()) return !0; } return !1; }, e.prototype.isIsolated = function() { return this._label.getGeometryCount() === 1; }, e.prototype.getCoordinate = function() { return this._coord; }, e.prototype.print = function(n) { n.println("node " + this._coord + " lbl: " + this._label); }, e.prototype.computeIM = function(n) { }, e.prototype.computeMergedLocation = function(n, i) { var a = Q.NONE; if (a = this._label.getLocation(i), !n.isNull(i)) { var o = n.getLocation(i); a !== Q.BOUNDARY && (a = o); } return a; }, e.prototype.setLabel = function() { if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this._label === null ? this._label = new Or(n, i) : this._label.setLocation(n, i); } else return r.prototype.setLabel.apply(this, arguments); }, e.prototype.getEdges = function() { return this._edges; }, e.prototype.mergeLabel = function() { var n = this; if (arguments[0] instanceof e) { var i = arguments[0]; this.mergeLabel(i._label); } else if (arguments[0] instanceof Or) for (var a = arguments[0], o = 0; o < 2; o++) { var s = n.computeMergedLocation(a, o), u = n._label.getLocation(o); u === Q.NONE && n._label.setLocation(o, s); } }, e.prototype.add = function(n) { this._edges.insert(n), n.setNode(this); }, e.prototype.setLabelBoundary = function(n) { if (this._label === null) return null; var i = Q.NONE; this._label !== null && (i = this._label.getLocation(n)); var a = null; switch (i) { case Q.BOUNDARY: a = Q.INTERIOR; break; case Q.INTERIOR: a = Q.BOUNDARY; break; default: a = Q.BOUNDARY; break; } this._label.setLocation(n, a); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(mo), uu = function() { this.nodeMap = new Xi(), this.nodeFact = null; var e = arguments[0]; this.nodeFact = e; }; uu.prototype.find = function(e) { return this.nodeMap.get(e); }; uu.prototype.addNode = function() { if (arguments[0] instanceof Z) { var e = arguments[0], t = this.nodeMap.get(e); return t === null && (t = this.nodeFact.createNode(e), this.nodeMap.put(e, t)), t; } else if (arguments[0] instanceof rT) { var n = arguments[0], i = this.nodeMap.get(n.getCoordinate()); return i === null ? (this.nodeMap.put(n.getCoordinate(), n), n) : (i.mergeLabel(n), i); } }; uu.prototype.print = function(e) { for (var t = this.iterator(); t.hasNext(); ) { var n = t.next(); n.print(e); } }; uu.prototype.iterator = function() { return this.nodeMap.values().iterator(); }; uu.prototype.values = function() { return this.nodeMap.values(); }; uu.prototype.getBoundaryNodes = function(e) { for (var t = new be(), n = this.iterator(); n.hasNext(); ) { var i = n.next(); i.getLabel().getLocation(e) === Q.BOUNDARY && t.add(i); } return t; }; uu.prototype.add = function(e) { var t = e.getCoordinate(), n = this.addNode(t); n.add(e); }; uu.prototype.interfaces_ = function() { return []; }; uu.prototype.getClass = function() { return uu; }; var Gr = function() { }, iw = { NE: { configurable: !0 }, NW: { configurable: !0 }, SW: { configurable: !0 }, SE: { configurable: !0 } }; Gr.prototype.interfaces_ = function() { return []; }; Gr.prototype.getClass = function() { return Gr; }; Gr.isNorthern = function(e) { return e === Gr.NE || e === Gr.NW; }; Gr.isOpposite = function(e, t) { if (e === t) return !1; var n = (e - t + 4) % 4; return n === 2; }; Gr.commonHalfPlane = function(e, t) { if (e === t) return e; var n = (e - t + 4) % 4; if (n === 2) return -1; var i = e < t ? e : t, a = e > t ? e : t; return i === 0 && a === 3 ? 3 : i; }; Gr.isInHalfPlane = function(e, t) { return t === Gr.SE ? e === Gr.SE || e === Gr.SW : e === t || e === t + 1; }; Gr.quadrant = function() { if (typeof arguments[0] == "number" && typeof arguments[1] == "number") { var e = arguments[0], t = arguments[1]; if (e === 0 && t === 0) throw new fn("Cannot compute the quadrant for point ( " + e + ", " + t + " )"); return e >= 0 ? t >= 0 ? Gr.NE : Gr.SE : t >= 0 ? Gr.NW : Gr.SW; } else if (arguments[0] instanceof Z && arguments[1] instanceof Z) { var n = arguments[0], i = arguments[1]; if (i.x === n.x && i.y === n.y) throw new fn("Cannot compute the quadrant for two identical points " + n); return i.x >= n.x ? i.y >= n.y ? Gr.NE : Gr.SE : i.y >= n.y ? Gr.NW : Gr.SW; } }; iw.NE.get = function() { return 0; }; iw.NW.get = function() { return 1; }; iw.SW.get = function() { return 2; }; iw.SE.get = function() { return 3; }; Object.defineProperties(Gr, iw); var qi = function() { if (this._edge = null, this._label = null, this._node = null, this._p0 = null, this._p1 = null, this._dx = null, this._dy = null, this._quadrant = null, arguments.length === 1) { var e = arguments[0]; this._edge = e; } else if (arguments.length === 3) { var t = arguments[0], n = arguments[1], i = arguments[2], a = null; this._edge = t, this.init(n, i), this._label = a; } else if (arguments.length === 4) { var o = arguments[0], s = arguments[1], u = arguments[2], l = arguments[3]; this._edge = o, this.init(s, u), this._label = l; } }; qi.prototype.compareDirection = function(e) { return this._dx === e._dx && this._dy === e._dy ? 0 : this._quadrant > e._quadrant ? 1 : this._quadrant < e._quadrant ? -1 : Me.computeOrientation(e._p0, e._p1, this._p1); }; qi.prototype.getDy = function() { return this._dy; }; qi.prototype.getCoordinate = function() { return this._p0; }; qi.prototype.setNode = function(e) { this._node = e; }; qi.prototype.print = function(e) { var t = Math.atan2(this._dy, this._dx), n = this.getClass().getName(), i = n.lastIndexOf("."), a = n.substring(i + 1); e.print(" " + a + ": " + this._p0 + " - " + this._p1 + " " + this._quadrant + ":" + t + " " + this._label); }; qi.prototype.compareTo = function(e) { var t = e; return this.compareDirection(t); }; qi.prototype.getDirectedCoordinate = function() { return this._p1; }; qi.prototype.getDx = function() { return this._dx; }; qi.prototype.getLabel = function() { return this._label; }; qi.prototype.getEdge = function() { return this._edge; }; qi.prototype.getQuadrant = function() { return this._quadrant; }; qi.prototype.getNode = function() { return this._node; }; qi.prototype.toString = function() { var e = Math.atan2(this._dy, this._dx), t = this.getClass().getName(), n = t.lastIndexOf("."), i = t.substring(n + 1); return " " + i + ": " + this._p0 + " - " + this._p1 + " " + this._quadrant + ":" + e + " " + this._label; }; qi.prototype.computeLabel = function(e) { }; qi.prototype.init = function(e, t) { this._p0 = e, this._p1 = t, this._dx = t.x - e.x, this._dy = t.y - e.y, this._quadrant = Gr.quadrant(this._dx, this._dy), Et.isTrue(!(this._dx === 0 && this._dy === 0), "EdgeEnd with identical endpoints found"); }; qi.prototype.interfaces_ = function() { return [Uo]; }; qi.prototype.getClass = function() { return qi; }; var OD = function(r) { function e() { var t = arguments[0], n = arguments[1]; if (r.call(this, t), this._isForward = null, this._isInResult = !1, this._isVisited = !1, this._sym = null, this._next = null, this._nextMin = null, this._edgeRing = null, this._minEdgeRing = null, this._depth = [0, -999, -999], this._isForward = n, n) this.init(t.getCoordinate(0), t.getCoordinate(1)); else { var i = t.getNumPoints() - 1; this.init(t.getCoordinate(i), t.getCoordinate(i - 1)); } this.computeDirectedLabel(); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.getNextMin = function() { return this._nextMin; }, e.prototype.getDepth = function(n) { return this._depth[n]; }, e.prototype.setVisited = function(n) { this._isVisited = n; }, e.prototype.computeDirectedLabel = function() { this._label = new Or(this._edge.getLabel()), this._isForward || this._label.flip(); }, e.prototype.getNext = function() { return this._next; }, e.prototype.setDepth = function(n, i) { if (this._depth[n] !== -999 && this._depth[n] !== i) throw new jl("assigned depths do not match", this.getCoordinate()); this._depth[n] = i; }, e.prototype.isInteriorAreaEdge = function() { for (var n = this, i = !0, a = 0; a < 2; a++) n._label.isArea(a) && n._label.getLocation(a, _e.LEFT) === Q.INTERIOR && n._label.getLocation(a, _e.RIGHT) === Q.INTERIOR || (i = !1); return i; }, e.prototype.setNextMin = function(n) { this._nextMin = n; }, e.prototype.print = function(n) { r.prototype.print.call(this, n), n.print(" " + this._depth[_e.LEFT] + "/" + this._depth[_e.RIGHT]), n.print(" (" + this.getDepthDelta() + ")"), this._isInResult && n.print(" inResult"); }, e.prototype.setMinEdgeRing = function(n) { this._minEdgeRing = n; }, e.prototype.isLineEdge = function() { var n = this._label.isLine(0) || this._label.isLine(1), i = !this._label.isArea(0) || this._label.allPositionsEqual(0, Q.EXTERIOR), a = !this._label.isArea(1) || this._label.allPositionsEqual(1, Q.EXTERIOR); return n && i && a; }, e.prototype.setEdgeRing = function(n) { this._edgeRing = n; }, e.prototype.getMinEdgeRing = function() { return this._minEdgeRing; }, e.prototype.getDepthDelta = function() { var n = this._edge.getDepthDelta(); return this._isForward || (n = -n), n; }, e.prototype.setInResult = function(n) { this._isInResult = n; }, e.prototype.getSym = function() { return this._sym; }, e.prototype.isForward = function() { return this._isForward; }, e.prototype.getEdge = function() { return this._edge; }, e.prototype.printEdge = function(n) { this.print(n), n.print(" "), this._isForward ? this._edge.print(n) : this._edge.printReverse(n); }, e.prototype.setSym = function(n) { this._sym = n; }, e.prototype.setVisitedEdge = function(n) { this.setVisited(n), this._sym.setVisited(n); }, e.prototype.setEdgeDepths = function(n, i) { var a = this.getEdge().getDepthDelta(); this._isForward || (a = -a); var o = 1; n === _e.LEFT && (o = -1); var s = _e.opposite(n), u = a * o, l = i + u; this.setDepth(n, i), this.setDepth(s, l); }, e.prototype.getEdgeRing = function() { return this._edgeRing; }, e.prototype.isInResult = function() { return this._isInResult; }, e.prototype.setNext = function(n) { this._next = n; }, e.prototype.isVisited = function() { return this._isVisited; }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e.depthFactor = function(n, i) { return n === Q.EXTERIOR && i === Q.INTERIOR ? 1 : n === Q.INTERIOR && i === Q.EXTERIOR ? -1 : 0; }, e; }(qi), dm = function() { }; dm.prototype.createNode = function(e) { return new rT(e, null); }; dm.prototype.interfaces_ = function() { return []; }; dm.prototype.getClass = function() { return dm; }; var vn = function() { if (this._edges = new be(), this._nodes = null, this._edgeEndList = new be(), arguments.length === 0) this._nodes = new uu(new dm()); else if (arguments.length === 1) { var e = arguments[0]; this._nodes = new uu(e); } }; vn.prototype.printEdges = function(e) { var t = this; e.println("Edges:"); for (var n = 0; n < this._edges.size(); n++) { e.println("edge " + n + ":"); var i = t._edges.get(n); i.print(e), i.eiList.print(e); } }; vn.prototype.find = function(e) { return this._nodes.find(e); }; vn.prototype.addNode = function() { if (arguments[0] instanceof rT) { var e = arguments[0]; return this._nodes.addNode(e); } else if (arguments[0] instanceof Z) { var t = arguments[0]; return this._nodes.addNode(t); } }; vn.prototype.getNodeIterator = function() { return this._nodes.iterator(); }; vn.prototype.linkResultDirectedEdges = function() { for (var e = this._nodes.iterator(); e.hasNext(); ) { var t = e.next(); t.getEdges().linkResultDirectedEdges(); } }; vn.prototype.debugPrintln = function(e) { Oi.out.println(e); }; vn.prototype.isBoundaryNode = function(e, t) { var n = this._nodes.find(t); if (n === null) return !1; var i = n.getLabel(); return i !== null && i.getLocation(e) === Q.BOUNDARY; }; vn.prototype.linkAllDirectedEdges = function() { for (var e = this._nodes.iterator(); e.hasNext(); ) { var t = e.next(); t.getEdges().linkAllDirectedEdges(); } }; vn.prototype.matchInSameDirection = function(e, t, n, i) { return e.equals(n) ? Me.computeOrientation(e, t, i) === Me.COLLINEAR && Gr.quadrant(e, t) === Gr.quadrant(n, i) : !1; }; vn.prototype.getEdgeEnds = function() { return this._edgeEndList; }; vn.prototype.debugPrint = function(e) { Oi.out.print(e); }; vn.prototype.getEdgeIterator = function() { return this._edges.iterator(); }; vn.prototype.findEdgeInSameDirection = function(e, t) { for (var n = this, i = 0; i < this._edges.size(); i++) { var a = n._edges.get(i), o = a.getCoordinates(); if (n.matchInSameDirection(e, t, o[0], o[1]) || n.matchInSameDirection(e, t, o[o.length - 1], o[o.length - 2])) return a; } return null; }; vn.prototype.insertEdge = function(e) { this._edges.add(e); }; vn.prototype.findEdgeEnd = function(e) { for (var t = this.getEdgeEnds().iterator(); t.hasNext(); ) { var n = t.next(); if (n.getEdge() === e) return n; } return null; }; vn.prototype.addEdges = function(e) { for (var t = this, n = e.iterator(); n.hasNext(); ) { var i = n.next(); t._edges.add(i); var a = new OD(i, !0), o = new OD(i, !1); a.setSym(o), o.setSym(a), t.add(a), t.add(o); } }; vn.prototype.add = function(e) { this._nodes.add(e), this._edgeEndList.add(e); }; vn.prototype.getNodes = function() { return this._nodes.values(); }; vn.prototype.findEdge = function(e, t) { for (var n = this, i = 0; i < this._edges.size(); i++) { var a = n._edges.get(i), o = a.getCoordinates(); if (e.equals(o[0]) && t.equals(o[1])) return a; } return null; }; vn.prototype.interfaces_ = function() { return []; }; vn.prototype.getClass = function() { return vn; }; vn.linkResultDirectedEdges = function(e) { for (var t = e.iterator(); t.hasNext(); ) { var n = t.next(); n.getEdges().linkResultDirectedEdges(); } }; var Ka = function() { this._geometryFactory = null, this._shellList = new be(); var e = arguments[0]; this._geometryFactory = e; }; Ka.prototype.sortShellsAndHoles = function(e, t, n) { for (var i = e.iterator(); i.hasNext(); ) { var a = i.next(); a.isHole() ? n.add(a) : t.add(a); } }; Ka.prototype.computePolygons = function(e) { for (var t = this, n = new be(), i = e.iterator(); i.hasNext(); ) { var a = i.next(), o = a.toPolygon(t._geometryFactory); n.add(o); } return n; }; Ka.prototype.placeFreeHoles = function(e, t) { for (var n = this, i = t.iterator(); i.hasNext(); ) { var a = i.next(); if (a.getShell() === null) { var o = n.findEdgeRingContaining(a, e); if (o === null) throw new jl("unable to assign hole to a shell", a.getCoordinate(0)); a.setShell(o); } } }; Ka.prototype.buildMinimalEdgeRings = function(e, t, n) { for (var i = this, a = new be(), o = e.iterator(); o.hasNext(); ) { var s = o.next(); if (s.getMaxNodeDegree() > 2) { s.linkDirectedEdgesForMinimalEdgeRings(); var u = s.buildMinimalRings(), l = i.findShell(u); l !== null ? (i.placePolygonHoles(l, u), t.add(l)) : n.addAll(u); } else a.add(s); } return a; }; Ka.prototype.containsPoint = function(e) { for (var t = this._shellList.iterator(); t.hasNext(); ) { var n = t.next(); if (n.containsPoint(e)) return !0; } return !1; }; Ka.prototype.buildMaximalEdgeRings = function(e) { for (var t = this, n = new be(), i = e.iterator(); i.hasNext(); ) { var a = i.next(); if (a.isInResult() && a.getLabel().isArea() && a.getEdgeRing() === null) { var o = new Xfe(a, t._geometryFactory); n.add(o), o.setInResult(); } } return n; }; Ka.prototype.placePolygonHoles = function(e, t) { for (var n = t.iterator(); n.hasNext(); ) { var i = n.next(); i.isHole() && i.setShell(e); } }; Ka.prototype.getPolygons = function() { var e = this.computePolygons(this._shellList); return e; }; Ka.prototype.findEdgeRingContaining = function(e, t) { for (var n = e.getLinearRing(), i = n.getEnvelopeInternal(), a = n.getCoordinateN(0), o = null, s = null, u = t.iterator(); u.hasNext(); ) { var l = u.next(), c = l.getLinearRing(), f = c.getEnvelopeInternal(); o !== null && (s = o.getLinearRing().getEnvelopeInternal()); var h = !1; f.contains(i) && Me.isPointInRing(a, c.getCoordinates()) && (h = !0), h && (o === null || s.contains(f)) && (o = l); } return o; }; Ka.prototype.findShell = function(e) { for (var t = 0, n = null, i = e.iterator(); i.hasNext(); ) { var a = i.next(); a.isHole() || (n = a, t++); } return Et.isTrue(t <= 1, "found two shells in MinimalEdgeRing list"), n; }; Ka.prototype.add = function() { if (arguments.length === 1) { var e = arguments[0]; this.add(e.getEdgeEnds(), e.getNodes()); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; vn.linkResultDirectedEdges(n); var i = this.buildMaximalEdgeRings(t), a = new be(), o = this.buildMinimalEdgeRings(i, this._shellList, a); this.sortShellsAndHoles(o, this._shellList, a), this.placeFreeHoles(this._shellList, a); } }; Ka.prototype.interfaces_ = function() { return []; }; Ka.prototype.getClass = function() { return Ka; }; var vm = function() { }; vm.prototype.getBounds = function() { }; vm.prototype.interfaces_ = function() { return []; }; vm.prototype.getClass = function() { return vm; }; var gs = function() { this._bounds = null, this._item = null; var e = arguments[0], t = arguments[1]; this._bounds = e, this._item = t; }; gs.prototype.getItem = function() { return this._item; }; gs.prototype.getBounds = function() { return this._bounds; }; gs.prototype.interfaces_ = function() { return [vm, Wo]; }; gs.prototype.getClass = function() { return gs; }; var Yl = function() { this._size = null, this._items = null, this._size = 0, this._items = new be(), this._items.add(null); }; Yl.prototype.poll = function() { if (this.isEmpty()) return null; var e = this._items.get(1); return this._items.set(1, this._items.get(this._size)), this._size -= 1, this.reorder(1), e; }; Yl.prototype.size = function() { return this._size; }; Yl.prototype.reorder = function(e) { for (var t = this, n = null, i = this._items.get(e); e * 2 <= this._size && (n = e * 2, n !== t._size && t._items.get(n + 1).compareTo(t._items.get(n)) < 0 && n++, t._items.get(n).compareTo(i) < 0); e = n) t._items.set(e, t._items.get(n)); this._items.set(e, i); }; Yl.prototype.clear = function() { this._size = 0, this._items.clear(); }; Yl.prototype.isEmpty = function() { return this._size === 0; }; Yl.prototype.add = function(e) { var t = this; this._items.add(null), this._size += 1; var n = this._size; for (this._items.set(0, e); e.compareTo(this._items.get(Math.trunc(n / 2))) < 0; n /= 2) t._items.set(n, t._items.get(Math.trunc(n / 2))); this._items.set(n, e); }; Yl.prototype.interfaces_ = function() { return []; }; Yl.prototype.getClass = function() { return Yl; }; var Wc = function() { }; Wc.prototype.visitItem = function(e) { }; Wc.prototype.interfaces_ = function() { return []; }; Wc.prototype.getClass = function() { return Wc; }; var Ed = function() { }; Ed.prototype.insert = function(e, t) { }; Ed.prototype.remove = function(e, t) { }; Ed.prototype.query = function() { }; Ed.prototype.interfaces_ = function() { return []; }; Ed.prototype.getClass = function() { return Ed; }; var Yn = function() { if (this._childBoundables = new be(), this._bounds = null, this._level = null, arguments.length !== 0) { if (arguments.length === 1) { var e = arguments[0]; this._level = e; } } }, mW = { serialVersionUID: { configurable: !0 } }; Yn.prototype.getLevel = function() { return this._level; }; Yn.prototype.size = function() { return this._childBoundables.size(); }; Yn.prototype.getChildBoundables = function() { return this._childBoundables; }; Yn.prototype.addChildBoundable = function(e) { Et.isTrue(this._bounds === null), this._childBoundables.add(e); }; Yn.prototype.isEmpty = function() { return this._childBoundables.isEmpty(); }; Yn.prototype.getBounds = function() { return this._bounds === null && (this._bounds = this.computeBounds()), this._bounds; }; Yn.prototype.interfaces_ = function() { return [vm, Wo]; }; Yn.prototype.getClass = function() { return Yn; }; mW.serialVersionUID.get = function() { return 6493722185909574e3; }; Object.defineProperties(Yn, mW); var ms = function() { }; ms.reverseOrder = function() { return { compare: function(t, n) { return n.compareTo(t); } }; }; ms.min = function(e) { return ms.sort(e), e.get(0); }; ms.sort = function(e, t) { var n = e.toArray(); t ? fh.sort(n, t) : fh.sort(n); for (var i = e.iterator(), a = 0, o = n.length; a < o; a++) i.next(), i.set(n[a]); }; ms.singletonList = function(e) { var t = new be(); return t.add(e), t; }; var Rn = function() { this._boundable1 = null, this._boundable2 = null, this._distance = null, this._itemDistance = null; var e = arguments[0], t = arguments[1], n = arguments[2]; this._boundable1 = e, this._boundable2 = t, this._itemDistance = n, this._distance = this.distance(); }; Rn.prototype.expandToQueue = function(e, t) { var n = Rn.isComposite(this._boundable1), i = Rn.isComposite(this._boundable2); if (n && i) return Rn.area(this._boundable1) > Rn.area(this._boundable2) ? (this.expand(this._boundable1, this._boundable2, e, t), null) : (this.expand(this._boundable2, this._boundable1, e, t), null); if (n) return this.expand(this._boundable1, this._boundable2, e, t), null; if (i) return this.expand(this._boundable2, this._boundable1, e, t), null; throw new fn("neither boundable is composite"); }; Rn.prototype.isLeaves = function() { return !(Rn.isComposite(this._boundable1) || Rn.isComposite(this._boundable2)); }; Rn.prototype.compareTo = function(e) { var t = e; return this._distance < t._distance ? -1 : this._distance > t._distance ? 1 : 0; }; Rn.prototype.expand = function(e, t, n, i) { for (var a = this, o = e.getChildBoundables(), s = o.iterator(); s.hasNext(); ) { var u = s.next(), l = new Rn(u, t, a._itemDistance); l.getDistance() < i && n.add(l); } }; Rn.prototype.getBoundable = function(e) { return e === 0 ? this._boundable1 : this._boundable2; }; Rn.prototype.getDistance = function() { return this._distance; }; Rn.prototype.distance = function() { return this.isLeaves() ? this._itemDistance.distance(this._boundable1, this._boundable2) : this._boundable1.getBounds().distance(this._boundable2.getBounds()); }; Rn.prototype.interfaces_ = function() { return [Uo]; }; Rn.prototype.getClass = function() { return Rn; }; Rn.area = function(e) { return e.getBounds().getArea(); }; Rn.isComposite = function(e) { return e instanceof Yn; }; var hi = function r() { if (this._root = null, this._built = !1, this._itemBoundables = new be(), this._nodeCapacity = null, arguments.length === 0) { var e = r.DEFAULT_NODE_CAPACITY; this._nodeCapacity = e; } else if (arguments.length === 1) { var t = arguments[0]; Et.isTrue(t > 1, "Node capacity must be greater than 1"), this._nodeCapacity = t; } }, nT = { IntersectsOp: { configurable: !0 }, serialVersionUID: { configurable: !0 }, DEFAULT_NODE_CAPACITY: { configurable: !0 } }; hi.prototype.getNodeCapacity = function() { return this._nodeCapacity; }; hi.prototype.lastNode = function(e) { return e.get(e.size() - 1); }; hi.prototype.size = function() { var e = this; if (arguments.length === 0) return this.isEmpty() ? 0 : (this.build(), this.size(this._root)); if (arguments.length === 1) { for (var t = arguments[0], n = 0, i = t.getChildBoundables().iterator(); i.hasNext(); ) { var a = i.next(); a instanceof Yn ? n += e.size(a) : a instanceof gs && (n += 1); } return n; } }; hi.prototype.removeItem = function(e, t) { for (var n = null, i = e.getChildBoundables().iterator(); i.hasNext(); ) { var a = i.next(); a instanceof gs && a.getItem() === t && (n = a); } return n !== null ? (e.getChildBoundables().remove(n), !0) : !1; }; hi.prototype.itemsTree = function() { var e = this; if (arguments.length === 0) { this.build(); var t = this.itemsTree(this._root); return t === null ? new be() : t; } else if (arguments.length === 1) { for (var n = arguments[0], i = new be(), a = n.getChildBoundables().iterator(); a.hasNext(); ) { var o = a.next(); if (o instanceof Yn) { var s = e.itemsTree(o); s !== null && i.add(s); } else o instanceof gs ? i.add(o.getItem()) : Et.shouldNeverReachHere(); } return i.size() <= 0 ? null : i; } }; hi.prototype.insert = function(e, t) { Et.isTrue(!this._built, "Cannot insert items into an STR packed R-tree after it has been built."), this._itemBoundables.add(new gs(e, t)); }; hi.prototype.boundablesAtLevel = function() { var e = this; if (arguments.length === 1) { var t = arguments[0], n = new be(); return this.boundablesAtLevel(t, this._root, n), n; } else if (arguments.length === 3) { var i = arguments[0], a = arguments[1], o = arguments[2]; if (Et.isTrue(i > -2), a.getLevel() === i) return o.add(a), null; for (var s = a.getChildBoundables().iterator(); s.hasNext(); ) { var u = s.next(); u instanceof Yn ? e.boundablesAtLevel(i, u, o) : (Et.isTrue(u instanceof gs), i === -1 && o.add(u)); } return null; } }; hi.prototype.query = function() { var e = this; if (arguments.length === 1) { var t = arguments[0]; this.build(); var n = new be(); return this.isEmpty() || this.getIntersectsOp().intersects(this._root.getBounds(), t) && this.query(t, this._root, n), n; } else if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; if (this.build(), this.isEmpty()) return null; this.getIntersectsOp().intersects(this._root.getBounds(), i) && this.query(i, this._root, a); } else if (arguments.length === 3) { if (st(arguments[2], Wc) && arguments[0] instanceof Object && arguments[1] instanceof Yn) for (var o = arguments[0], s = arguments[1], u = arguments[2], l = s.getChildBoundables(), c = 0; c < l.size(); c++) { var f = l.get(c); !e.getIntersectsOp().intersects(f.getBounds(), o) || (f instanceof Yn ? e.query(o, f, u) : f instanceof gs ? u.visitItem(f.getItem()) : Et.shouldNeverReachHere()); } else if (st(arguments[2], cs) && arguments[0] instanceof Object && arguments[1] instanceof Yn) for (var h = arguments[0], p = arguments[1], d = arguments[2], v = p.getChildBoundables(), g = 0; g < v.size(); g++) { var m = v.get(g); !e.getIntersectsOp().intersects(m.getBounds(), h) || (m instanceof Yn ? e.query(h, m, d) : m instanceof gs ? d.add(m.getItem()) : Et.shouldNeverReachHere()); } } }; hi.prototype.build = function() { if (this._built) return null; this._root = this._itemBoundables.isEmpty() ? this.createNode(0) : this.createHigherLevels(this._itemBoundables, -1), this._itemBoundables = null, this._built = !0; }; hi.prototype.getRoot = function() { return this.build(), this._root; }; hi.prototype.remove = function() { var e = this; if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; return this.build(), this.getIntersectsOp().intersects(this._root.getBounds(), t) ? this.remove(t, this._root, n) : !1; } else if (arguments.length === 3) { var i = arguments[0], a = arguments[1], o = arguments[2], s = this.removeItem(a, o); if (s) return !0; for (var u = null, l = a.getChildBoundables().iterator(); l.hasNext(); ) { var c = l.next(); if (!!e.getIntersectsOp().intersects(c.getBounds(), i) && c instanceof Yn && (s = e.remove(i, c, o), s)) { u = c; break; } } return u !== null && u.getChildBoundables().isEmpty() && a.getChildBoundables().remove(u), s; } }; hi.prototype.createHigherLevels = function(e, t) { Et.isTrue(!e.isEmpty()); var n = this.createParentBoundables(e, t + 1); return n.size() === 1 ? n.get(0) : this.createHigherLevels(n, t + 1); }; hi.prototype.depth = function() { var e = this; if (arguments.length === 0) return this.isEmpty() ? 0 : (this.build(), this.depth(this._root)); if (arguments.length === 1) { for (var t = arguments[0], n = 0, i = t.getChildBoundables().iterator(); i.hasNext(); ) { var a = i.next(); if (a instanceof Yn) { var o = e.depth(a); o > n && (n = o); } } return n + 1; } }; hi.prototype.createParentBoundables = function(e, t) { var n = this; Et.isTrue(!e.isEmpty()); var i = new be(); i.add(this.createNode(t)); var a = new be(e); ms.sort(a, this.getComparator()); for (var o = a.iterator(); o.hasNext(); ) { var s = o.next(); n.lastNode(i).getChildBoundables().size() === n.getNodeCapacity() && i.add(n.createNode(t)), n.lastNode(i).addChildBoundable(s); } return i; }; hi.prototype.isEmpty = function() { return this._built ? this._root.isEmpty() : this._itemBoundables.isEmpty(); }; hi.prototype.interfaces_ = function() { return [Wo]; }; hi.prototype.getClass = function() { return hi; }; hi.compareDoubles = function(e, t) { return e > t ? 1 : e < t ? -1 : 0; }; nT.IntersectsOp.get = function() { return qfe; }; nT.serialVersionUID.get = function() { return -3886435814360241e3; }; nT.DEFAULT_NODE_CAPACITY.get = function() { return 10; }; Object.defineProperties(hi, nT); var qfe = function() { }, gm = function() { }; gm.prototype.distance = function(e, t) { }; gm.prototype.interfaces_ = function() { return []; }; gm.prototype.getClass = function() { return gm; }; var yW = function(r) { function e(n) { n = n || e.DEFAULT_NODE_CAPACITY, r.call(this, n); } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { STRtreeNode: { configurable: !0 }, serialVersionUID: { configurable: !0 }, xComparator: { configurable: !0 }, yComparator: { configurable: !0 }, intersectsOp: { configurable: !0 }, DEFAULT_NODE_CAPACITY: { configurable: !0 } }; return e.prototype.createParentBoundablesFromVerticalSlices = function(i, a) { var o = this; Et.isTrue(i.length > 0); for (var s = new be(), u = 0; u < i.length; u++) s.addAll(o.createParentBoundablesFromVerticalSlice(i[u], a)); return s; }, e.prototype.createNode = function(i) { return new fk(i); }, e.prototype.size = function() { return arguments.length === 0 ? r.prototype.size.call(this) : r.prototype.size.apply(this, arguments); }, e.prototype.insert = function() { if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; if (i.isNull()) return null; r.prototype.insert.call(this, i, a); } else return r.prototype.insert.apply(this, arguments); }, e.prototype.getIntersectsOp = function() { return e.intersectsOp; }, e.prototype.verticalSlices = function(i, a) { for (var o = Math.trunc(Math.ceil(i.size() / a)), s = new Array(a).fill(null), u = i.iterator(), l = 0; l < a; l++) { s[l] = new be(); for (var c = 0; u.hasNext() && c < o; ) { var f = u.next(); s[l].add(f), c++; } } return s; }, e.prototype.query = function() { if (arguments.length === 1) { var i = arguments[0]; return r.prototype.query.call(this, i); } else if (arguments.length === 2) { var a = arguments[0], o = arguments[1]; r.prototype.query.call(this, a, o); } else if (arguments.length === 3) { if (st(arguments[2], Wc) && arguments[0] instanceof Object && arguments[1] instanceof Yn) { var s = arguments[0], u = arguments[1], l = arguments[2]; r.prototype.query.call(this, s, u, l); } else if (st(arguments[2], cs) && arguments[0] instanceof Object && arguments[1] instanceof Yn) { var c = arguments[0], f = arguments[1], h = arguments[2]; r.prototype.query.call(this, c, f, h); } } }, e.prototype.getComparator = function() { return e.yComparator; }, e.prototype.createParentBoundablesFromVerticalSlice = function(i, a) { return r.prototype.createParentBoundables.call(this, i, a); }, e.prototype.remove = function() { if (arguments.length === 2) { var i = arguments[0], a = arguments[1]; return r.prototype.remove.call(this, i, a); } else return r.prototype.remove.apply(this, arguments); }, e.prototype.depth = function() { return arguments.length === 0 ? r.prototype.depth.call(this) : r.prototype.depth.apply(this, arguments); }, e.prototype.createParentBoundables = function(i, a) { Et.isTrue(!i.isEmpty()); var o = Math.trunc(Math.ceil(i.size() / this.getNodeCapacity())), s = new be(i); ms.sort(s, e.xComparator); var u = this.verticalSlices(s, Math.trunc(Math.ceil(Math.sqrt(o)))); return this.createParentBoundablesFromVerticalSlices(u, a); }, e.prototype.nearestNeighbour = function() { if (arguments.length === 1) { if (st(arguments[0], gm)) { var i = arguments[0], a = new Rn(this.getRoot(), this.getRoot(), i); return this.nearestNeighbour(a); } else if (arguments[0] instanceof Rn) { var o = arguments[0]; return this.nearestNeighbour(o, vt.POSITIVE_INFINITY); } } else if (arguments.length === 2) { if (arguments[0] instanceof e && st(arguments[1], gm)) { var s = arguments[0], u = arguments[1], l = new Rn(this.getRoot(), s.getRoot(), u); return this.nearestNeighbour(l); } else if (arguments[0] instanceof Rn && typeof arguments[1] == "number") { var c = arguments[0], f = arguments[1], h = f, p = null, d = new Yl(); for (d.add(c); !d.isEmpty() && h > 0; ) { var v = d.poll(), g = v.getDistance(); if (g >= h) break; v.isLeaves() ? (h = g, p = v) : v.expandToQueue(d, h); } return [p.getBoundable(0).getItem(), p.getBoundable(1).getItem()]; } } else if (arguments.length === 3) { var m = arguments[0], y = arguments[1], _ = arguments[2], w = new gs(m, y), x = new Rn(this.getRoot(), w, _); return this.nearestNeighbour(x)[0]; } }, e.prototype.interfaces_ = function() { return [Ed, Wo]; }, e.prototype.getClass = function() { return e; }, e.centreX = function(i) { return e.avg(i.getMinX(), i.getMaxX()); }, e.avg = function(i, a) { return (i + a) / 2; }, e.centreY = function(i) { return e.avg(i.getMinY(), i.getMaxY()); }, t.STRtreeNode.get = function() { return fk; }, t.serialVersionUID.get = function() { return 259274702368956900; }, t.xComparator.get = function() { return { interfaces_: function() { return [om]; }, compare: function(n, i) { return r.compareDoubles(e.centreX(n.getBounds()), e.centreX(i.getBounds())); } }; }, t.yComparator.get = function() { return { interfaces_: function() { return [om]; }, compare: function(n, i) { return r.compareDoubles(e.centreY(n.getBounds()), e.centreY(i.getBounds())); } }; }, t.intersectsOp.get = function() { return { interfaces_: function() { return [r.IntersectsOp]; }, intersects: function(n, i) { return n.intersects(i); } }; }, t.DEFAULT_NODE_CAPACITY.get = function() { return 10; }, Object.defineProperties(e, t), e; }(hi), fk = function(r) { function e() { var t = arguments[0]; r.call(this, t); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.computeBounds = function() { for (var n = null, i = this.getChildBoundables().iterator(); i.hasNext(); ) { var a = i.next(); n === null ? n = new Ke(a.getBounds()) : n.expandToInclude(a.getBounds()); } return n; }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Yn), Sa = function() { }; Sa.prototype.interfaces_ = function() { return []; }; Sa.prototype.getClass = function() { return Sa; }; Sa.relativeSign = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; }; Sa.compare = function(e, t, n) { if (t.equals2D(n)) return 0; var i = Sa.relativeSign(t.x, n.x), a = Sa.relativeSign(t.y, n.y); switch (e) { case 0: return Sa.compareValue(i, a); case 1: return Sa.compareValue(a, i); case 2: return Sa.compareValue(a, -i); case 3: return Sa.compareValue(-i, a); case 4: return Sa.compareValue(-i, -a); case 5: return Sa.compareValue(-a, -i); case 6: return Sa.compareValue(-a, i); case 7: return Sa.compareValue(i, -a); } return Et.shouldNeverReachHere("invalid octant value"), 0; }; Sa.compareValue = function(e, t) { return e < 0 ? -1 : e > 0 ? 1 : t < 0 ? -1 : t > 0 ? 1 : 0; }; var jc = function() { this._segString = null, this.coord = null, this.segmentIndex = null, this._segmentOctant = null, this._isInterior = null; var e = arguments[0], t = arguments[1], n = arguments[2], i = arguments[3]; this._segString = e, this.coord = new Z(t), this.segmentIndex = n, this._segmentOctant = i, this._isInterior = !t.equals2D(e.getCoordinate(n)); }; jc.prototype.getCoordinate = function() { return this.coord; }; jc.prototype.print = function(e) { e.print(this.coord), e.print(" seg # = " + this.segmentIndex); }; jc.prototype.compareTo = function(e) { var t = e; return this.segmentIndex < t.segmentIndex ? -1 : this.segmentIndex > t.segmentIndex ? 1 : this.coord.equals2D(t.coord) ? 0 : Sa.compare(this._segmentOctant, this.coord, t.coord); }; jc.prototype.isEndPoint = function(e) { return this.segmentIndex === 0 && !this._isInterior || this.segmentIndex === e; }; jc.prototype.isInterior = function() { return this._isInterior; }; jc.prototype.interfaces_ = function() { return [Uo]; }; jc.prototype.getClass = function() { return jc; }; var ma = function() { this._nodeMap = new Xi(), this._edge = null; var e = arguments[0]; this._edge = e; }; ma.prototype.getSplitCoordinates = function() { var e = this, t = new rw(); this.addEndpoints(); for (var n = this.iterator(), i = n.next(); n.hasNext(); ) { var a = n.next(); e.addEdgeCoordinates(i, a, t), i = a; } return t.toCoordinateArray(); }; ma.prototype.addCollapsedNodes = function() { var e = this, t = new be(); this.findCollapsesFromInsertedNodes(t), this.findCollapsesFromExistingVertices(t); for (var n = t.iterator(); n.hasNext(); ) { var i = n.next().intValue(); e.add(e._edge.getCoordinate(i), i); } }; ma.prototype.print = function(e) { e.println("Intersections:"); for (var t = this.iterator(); t.hasNext(); ) { var n = t.next(); n.print(e); } }; ma.prototype.findCollapsesFromExistingVertices = function(e) { for (var t = this, n = 0; n < this._edge.size() - 2; n++) { var i = t._edge.getCoordinate(n), a = t._edge.getCoordinate(n + 2); i.equals2D(a) && e.add(new nu(n + 1)); } }; ma.prototype.addEdgeCoordinates = function(e, t, n) { var i = this, a = this._edge.getCoordinate(t.segmentIndex), o = t.isInterior() || !t.coord.equals2D(a); n.add(new Z(e.coord), !1); for (var s = e.segmentIndex + 1; s <= t.segmentIndex; s++) n.add(i._edge.getCoordinate(s)); o && n.add(new Z(t.coord)); }; ma.prototype.iterator = function() { return this._nodeMap.values().iterator(); }; ma.prototype.addSplitEdges = function(e) { var t = this; this.addEndpoints(), this.addCollapsedNodes(); for (var n = this.iterator(), i = n.next(); n.hasNext(); ) { var a = n.next(), o = t.createSplitEdge(i, a); e.add(o), i = a; } }; ma.prototype.findCollapseIndex = function(e, t, n) { if (!e.coord.equals2D(t.coord)) return !1; var i = t.segmentIndex - e.segmentIndex; return t.isInterior() || i--, i === 1 ? (n[0] = e.segmentIndex + 1, !0) : !1; }; ma.prototype.findCollapsesFromInsertedNodes = function(e) { for (var t = this, n = new Array(1).fill(null), i = this.iterator(), a = i.next(); i.hasNext(); ) { var o = i.next(), s = t.findCollapseIndex(a, o, n); s && e.add(new nu(n[0])), a = o; } }; ma.prototype.getEdge = function() { return this._edge; }; ma.prototype.addEndpoints = function() { var e = this._edge.size() - 1; this.add(this._edge.getCoordinate(0), 0), this.add(this._edge.getCoordinate(e), e); }; ma.prototype.createSplitEdge = function(e, t) { var n = this, i = t.segmentIndex - e.segmentIndex + 2, a = this._edge.getCoordinate(t.segmentIndex), o = t.isInterior() || !t.coord.equals2D(a); o || i--; var s = new Array(i).fill(null), u = 0; s[u++] = new Z(e.coord); for (var l = e.segmentIndex + 1; l <= t.segmentIndex; l++) s[u++] = n._edge.getCoordinate(l); return o && (s[u] = new Z(t.coord)), new Mn(s, this._edge.getData()); }; ma.prototype.add = function(e, t) { var n = new jc(this._edge, e, t, this._edge.getSegmentOctant(t)), i = this._nodeMap.get(n); return i !== null ? (Et.isTrue(i.coord.equals2D(e), "Found equal nodes with different coordinates"), i) : (this._nodeMap.put(n, n), n); }; ma.prototype.checkSplitEdgesCorrectness = function(e) { var t = this._edge.getCoordinates(), n = e.get(0), i = n.getCoordinate(0); if (!i.equals2D(t[0])) throw new Ul("bad split edge start point at " + i); var a = e.get(e.size() - 1), o = a.getCoordinates(), s = o[o.length - 1]; if (!s.equals2D(t[t.length - 1])) throw new Ul("bad split edge end point at " + s); }; ma.prototype.interfaces_ = function() { return []; }; ma.prototype.getClass = function() { return ma; }; var bd = function() { }; bd.prototype.interfaces_ = function() { return []; }; bd.prototype.getClass = function() { return bd; }; bd.octant = function() { if (typeof arguments[0] == "number" && typeof arguments[1] == "number") { var e = arguments[0], t = arguments[1]; if (e === 0 && t === 0) throw new fn("Cannot compute the octant for point ( " + e + ", " + t + " )"); var n = Math.abs(e), i = Math.abs(t); return e >= 0 ? t >= 0 ? n >= i ? 0 : 1 : n >= i ? 7 : 6 : t >= 0 ? n >= i ? 3 : 2 : n >= i ? 4 : 5; } else if (arguments[0] instanceof Z && arguments[1] instanceof Z) { var a = arguments[0], o = arguments[1], s = o.x - a.x, u = o.y - a.y; if (s === 0 && u === 0) throw new fn("Cannot compute the octant for two identical points " + a); return bd.octant(s, u); } }; var qu = function() { }; qu.prototype.getCoordinates = function() { }; qu.prototype.size = function() { }; qu.prototype.getCoordinate = function(e) { }; qu.prototype.isClosed = function() { }; qu.prototype.setData = function(e) { }; qu.prototype.getData = function() { }; qu.prototype.interfaces_ = function() { return []; }; qu.prototype.getClass = function() { return qu; }; var J_ = function() { }; J_.prototype.addIntersection = function(e, t) { }; J_.prototype.interfaces_ = function() { return [qu]; }; J_.prototype.getClass = function() { return J_; }; var Mn = function() { this._nodeList = new ma(this), this._pts = null, this._data = null; var e = arguments[0], t = arguments[1]; this._pts = e, this._data = t; }; Mn.prototype.getCoordinates = function() { return this._pts; }; Mn.prototype.size = function() { return this._pts.length; }; Mn.prototype.getCoordinate = function(e) { return this._pts[e]; }; Mn.prototype.isClosed = function() { return this._pts[0].equals(this._pts[this._pts.length - 1]); }; Mn.prototype.getSegmentOctant = function(e) { return e === this._pts.length - 1 ? -1 : this.safeOctant(this.getCoordinate(e), this.getCoordinate(e + 1)); }; Mn.prototype.setData = function(e) { this._data = e; }; Mn.prototype.safeOctant = function(e, t) { return e.equals2D(t) ? 0 : bd.octant(e, t); }; Mn.prototype.getData = function() { return this._data; }; Mn.prototype.addIntersection = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1]; this.addIntersectionNode(e, t); } else if (arguments.length === 4) { var n = arguments[0], i = arguments[1], a = arguments[3], o = new Z(n.getIntersection(a)); this.addIntersection(o, i); } }; Mn.prototype.toString = function() { return ds.toLineString(new An(this._pts)); }; Mn.prototype.getNodeList = function() { return this._nodeList; }; Mn.prototype.addIntersectionNode = function(e, t) { var n = t, i = n + 1; if (i < this._pts.length) { var a = this._pts[i]; e.equals2D(a) && (n = i); } var o = this._nodeList.add(e, n); return o; }; Mn.prototype.addIntersections = function(e, t, n) { for (var i = this, a = 0; a < e.getIntersectionNum(); a++) i.addIntersection(e, t, n, a); }; Mn.prototype.interfaces_ = function() { return [J_]; }; Mn.prototype.getClass = function() { return Mn; }; Mn.getNodedSubstrings = function() { if (arguments.length === 1) { var e = arguments[0], t = new be(); return Mn.getNodedSubstrings(e, t), t; } else if (arguments.length === 2) for (var n = arguments[0], i = arguments[1], a = n.iterator(); a.hasNext(); ) { var o = a.next(); o.getNodeList().addSplitEdges(i); } }; var et = function() { if (this.p0 = null, this.p1 = null, arguments.length === 0) this.p0 = new Z(), this.p1 = new Z(); else if (arguments.length === 1) { var e = arguments[0]; this.p0 = new Z(e.p0), this.p1 = new Z(e.p1); } else if (arguments.length === 2) this.p0 = arguments[0], this.p1 = arguments[1]; else if (arguments.length === 4) { var t = arguments[0], n = arguments[1], i = arguments[2], a = arguments[3]; this.p0 = new Z(t, n), this.p1 = new Z(i, a); } }, _W = { serialVersionUID: { configurable: !0 } }; et.prototype.minX = function() { return Math.min(this.p0.x, this.p1.x); }; et.prototype.orientationIndex = function() { if (arguments[0] instanceof et) { var e = arguments[0], t = Me.orientationIndex(this.p0, this.p1, e.p0), n = Me.orientationIndex(this.p0, this.p1, e.p1); return t >= 0 && n >= 0 || t <= 0 && n <= 0 ? Math.max(t, n) : 0; } else if (arguments[0] instanceof Z) { var i = arguments[0]; return Me.orientationIndex(this.p0, this.p1, i); } }; et.prototype.toGeometry = function(e) { return e.createLineString([this.p0, this.p1]); }; et.prototype.isVertical = function() { return this.p0.x === this.p1.x; }; et.prototype.equals = function(e) { if (!(e instanceof et)) return !1; var t = e; return this.p0.equals(t.p0) && this.p1.equals(t.p1); }; et.prototype.intersection = function(e) { var t = new Uh(); return t.computeIntersection(this.p0, this.p1, e.p0, e.p1), t.hasIntersection() ? t.getIntersection(0) : null; }; et.prototype.project = function() { if (arguments[0] instanceof Z) { var e = arguments[0]; if (e.equals(this.p0) || e.equals(this.p1)) return new Z(e); var t = this.projectionFactor(e), n = new Z(); return n.x = this.p0.x + t * (this.p1.x - this.p0.x), n.y = this.p0.y + t * (this.p1.y - this.p0.y), n; } else if (arguments[0] instanceof et) { var i = arguments[0], a = this.projectionFactor(i.p0), o = this.projectionFactor(i.p1); if (a >= 1 && o >= 1 || a <= 0 && o <= 0) return null; var s = this.project(i.p0); a < 0 && (s = this.p0), a > 1 && (s = this.p1); var u = this.project(i.p1); return o < 0 && (u = this.p0), o > 1 && (u = this.p1), new et(s, u); } }; et.prototype.normalize = function() { this.p1.compareTo(this.p0) < 0 && this.reverse(); }; et.prototype.angle = function() { return Math.atan2(this.p1.y - this.p0.y, this.p1.x - this.p0.x); }; et.prototype.getCoordinate = function(e) { return e === 0 ? this.p0 : this.p1; }; et.prototype.distancePerpendicular = function(e) { return Me.distancePointLinePerpendicular(e, this.p0, this.p1); }; et.prototype.minY = function() { return Math.min(this.p0.y, this.p1.y); }; et.prototype.midPoint = function() { return et.midPoint(this.p0, this.p1); }; et.prototype.projectionFactor = function(e) { if (e.equals(this.p0)) return 0; if (e.equals(this.p1)) return 1; var t = this.p1.x - this.p0.x, n = this.p1.y - this.p0.y, i = t * t + n * n; if (i <= 0) return vt.NaN; var a = ((e.x - this.p0.x) * t + (e.y - this.p0.y) * n) / i; return a; }; et.prototype.closestPoints = function(e) { var t = this.intersection(e); if (t !== null) return [t, t]; var n = new Array(2).fill(null), i = vt.MAX_VALUE, a = null, o = this.closestPoint(e.p0); i = o.distance(e.p0), n[0] = o, n[1] = e.p0; var s = this.closestPoint(e.p1); a = s.distance(e.p1), a < i && (i = a, n[0] = s, n[1] = e.p1); var u = e.closestPoint(this.p0); a = u.distance(this.p0), a < i && (i = a, n[0] = this.p0, n[1] = u); var l = e.closestPoint(this.p1); return a = l.distance(this.p1), a < i && (i = a, n[0] = this.p1, n[1] = l), n; }; et.prototype.closestPoint = function(e) { var t = this.projectionFactor(e); if (t > 0 && t < 1) return this.project(e); var n = this.p0.distance(e), i = this.p1.distance(e); return n < i ? this.p0 : this.p1; }; et.prototype.maxX = function() { return Math.max(this.p0.x, this.p1.x); }; et.prototype.getLength = function() { return this.p0.distance(this.p1); }; et.prototype.compareTo = function(e) { var t = e, n = this.p0.compareTo(t.p0); return n !== 0 ? n : this.p1.compareTo(t.p1); }; et.prototype.reverse = function() { var e = this.p0; this.p0 = this.p1, this.p1 = e; }; et.prototype.equalsTopo = function(e) { return this.p0.equals(e.p0) && (this.p1.equals(e.p1) || this.p0.equals(e.p1)) && this.p1.equals(e.p0); }; et.prototype.lineIntersection = function(e) { try { var t = ls.intersection(this.p0, this.p1, e.p0, e.p1); return t; } catch (n) { if (!(n instanceof Km)) throw n; } finally { } return null; }; et.prototype.maxY = function() { return Math.max(this.p0.y, this.p1.y); }; et.prototype.pointAlongOffset = function(e, t) { var n = this.p0.x + e * (this.p1.x - this.p0.x), i = this.p0.y + e * (this.p1.y - this.p0.y), a = this.p1.x - this.p0.x, o = this.p1.y - this.p0.y, s = Math.sqrt(a * a + o * o), u = 0, l = 0; if (t !== 0) { if (s <= 0) throw new Error("Cannot compute offset from zero-length line segment"); u = t * a / s, l = t * o / s; } var c = n - l, f = i + u, h = new Z(c, f); return h; }; et.prototype.setCoordinates = function() { if (arguments.length === 1) { var e = arguments[0]; this.setCoordinates(e.p0, e.p1); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; this.p0.x = t.x, this.p0.y = t.y, this.p1.x = n.x, this.p1.y = n.y; } }; et.prototype.segmentFraction = function(e) { var t = this.projectionFactor(e); return t < 0 ? t = 0 : (t > 1 || vt.isNaN(t)) && (t = 1), t; }; et.prototype.toString = function() { return "LINESTRING( " + this.p0.x + " " + this.p0.y + ", " + this.p1.x + " " + this.p1.y + ")"; }; et.prototype.isHorizontal = function() { return this.p0.y === this.p1.y; }; et.prototype.distance = function() { if (arguments[0] instanceof et) { var e = arguments[0]; return Me.distanceLineLine(this.p0, this.p1, e.p0, e.p1); } else if (arguments[0] instanceof Z) { var t = arguments[0]; return Me.distancePointLine(t, this.p0, this.p1); } }; et.prototype.pointAlong = function(e) { var t = new Z(); return t.x = this.p0.x + e * (this.p1.x - this.p0.x), t.y = this.p0.y + e * (this.p1.y - this.p0.y), t; }; et.prototype.hashCode = function() { var e = vt.doubleToLongBits(this.p0.x); e ^= vt.doubleToLongBits(this.p0.y) * 31; var t = Math.trunc(e) ^ Math.trunc(e >> 32), n = vt.doubleToLongBits(this.p1.x); n ^= vt.doubleToLongBits(this.p1.y) * 31; var i = Math.trunc(n) ^ Math.trunc(n >> 32); return t ^ i; }; et.prototype.interfaces_ = function() { return [Uo, Wo]; }; et.prototype.getClass = function() { return et; }; et.midPoint = function(e, t) { return new Z((e.x + t.x) / 2, (e.y + t.y) / 2); }; _W.serialVersionUID.get = function() { return 3252005833466256400; }; Object.defineProperties(et, _W); var Q_ = function() { this.tempEnv1 = new Ke(), this.tempEnv2 = new Ke(), this._overlapSeg1 = new et(), this._overlapSeg2 = new et(); }; Q_.prototype.overlap = function() { if (arguments.length !== 2) { if (arguments.length === 4) { var e = arguments[0], t = arguments[1], n = arguments[2], i = arguments[3]; e.getLineSegment(t, this._overlapSeg1), n.getLineSegment(i, this._overlapSeg2), this.overlap(this._overlapSeg1, this._overlapSeg2); } } }; Q_.prototype.interfaces_ = function() { return []; }; Q_.prototype.getClass = function() { return Q_; }; var Ja = function() { this._pts = null, this._start = null, this._end = null, this._env = null, this._context = null, this._id = null; var e = arguments[0], t = arguments[1], n = arguments[2], i = arguments[3]; this._pts = e, this._start = t, this._end = n, this._context = i; }; Ja.prototype.getLineSegment = function(e, t) { t.p0 = this._pts[e], t.p1 = this._pts[e + 1]; }; Ja.prototype.computeSelect = function(e, t, n, i) { var a = this._pts[t], o = this._pts[n]; if (i.tempEnv1.init(a, o), n - t === 1) return i.select(this, t), null; if (!e.intersects(i.tempEnv1)) return null; var s = Math.trunc((t + n) / 2); t < s && this.computeSelect(e, t, s, i), s < n && this.computeSelect(e, s, n, i); }; Ja.prototype.getCoordinates = function() { for (var e = this, t = new Array(this._end - this._start + 1).fill(null), n = 0, i = this._start; i <= this._end; i++) t[n++] = e._pts[i]; return t; }; Ja.prototype.computeOverlaps = function(e, t) { this.computeOverlapsInternal(this._start, this._end, e, e._start, e._end, t); }; Ja.prototype.setId = function(e) { this._id = e; }; Ja.prototype.select = function(e, t) { this.computeSelect(e, this._start, this._end, t); }; Ja.prototype.getEnvelope = function() { if (this._env === null) { var e = this._pts[this._start], t = this._pts[this._end]; this._env = new Ke(e, t); } return this._env; }; Ja.prototype.getEndIndex = function() { return this._end; }; Ja.prototype.getStartIndex = function() { return this._start; }; Ja.prototype.getContext = function() { return this._context; }; Ja.prototype.getId = function() { return this._id; }; Ja.prototype.computeOverlapsInternal = function(e, t, n, i, a, o) { var s = this._pts[e], u = this._pts[t], l = n._pts[i], c = n._pts[a]; if (t - e === 1 && a - i === 1) return o.overlap(this, e, n, i), null; if (o.tempEnv1.init(s, u), o.tempEnv2.init(l, c), !o.tempEnv1.intersects(o.tempEnv2)) return null; var f = Math.trunc((e + t) / 2), h = Math.trunc((i + a) / 2); e < f && (i < h && this.computeOverlapsInternal(e, f, n, i, h, o), h < a && this.computeOverlapsInternal(e, f, n, h, a, o)), f < t && (i < h && this.computeOverlapsInternal(f, t, n, i, h, o), h < a && this.computeOverlapsInternal(f, t, n, h, a, o)); }; Ja.prototype.interfaces_ = function() { return []; }; Ja.prototype.getClass = function() { return Ja; }; var tu = function() { }; tu.prototype.interfaces_ = function() { return []; }; tu.prototype.getClass = function() { return tu; }; tu.getChainStartIndices = function(e) { var t = 0, n = new be(); n.add(new nu(t)); do { var i = tu.findChainEnd(e, t); n.add(new nu(i)), t = i; } while (t < e.length - 1); var a = tu.toIntArray(n); return a; }; tu.findChainEnd = function(e, t) { for (var n = t; n < e.length - 1 && e[n].equals2D(e[n + 1]); ) n++; if (n >= e.length - 1) return e.length - 1; for (var i = Gr.quadrant(e[n], e[n + 1]), a = t + 1; a < e.length; ) { if (!e[a - 1].equals2D(e[a])) { var o = Gr.quadrant(e[a - 1], e[a]); if (o !== i) break; } a++; } return a - 1; }; tu.getChains = function() { if (arguments.length === 1) { var e = arguments[0]; return tu.getChains(e, null); } else if (arguments.length === 2) { for (var t = arguments[0], n = arguments[1], i = new be(), a = tu.getChainStartIndices(t), o = 0; o < a.length - 1; o++) { var s = new Ja(t, a[o], a[o + 1], n); i.add(s); } return i; } }; tu.toIntArray = function(e) { for (var t = new Array(e.size()).fill(null), n = 0; n < t.length; n++) t[n] = e.get(n).intValue(); return t; }; var Sh = function() { }; Sh.prototype.computeNodes = function(e) { }; Sh.prototype.getNodedSubstrings = function() { }; Sh.prototype.interfaces_ = function() { return []; }; Sh.prototype.getClass = function() { return Sh; }; var e1 = function() { if (this._segInt = null, arguments.length !== 0) { if (arguments.length === 1) { var e = arguments[0]; this.setSegmentIntersector(e); } } }; e1.prototype.setSegmentIntersector = function(e) { this._segInt = e; }; e1.prototype.interfaces_ = function() { return [Sh]; }; e1.prototype.getClass = function() { return e1; }; var hR = function(r) { function e(n) { n ? r.call(this, n) : r.call(this), this._monoChains = new be(), this._index = new yW(), this._idCounter = 0, this._nodedSegStrings = null, this._nOverlaps = 0; } r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e; var t = { SegmentOverlapAction: { configurable: !0 } }; return e.prototype.getMonotoneChains = function() { return this._monoChains; }, e.prototype.getNodedSubstrings = function() { return Mn.getNodedSubstrings(this._nodedSegStrings); }, e.prototype.getIndex = function() { return this._index; }, e.prototype.add = function(i) { for (var a = this, o = tu.getChains(i.getCoordinates(), i), s = o.iterator(); s.hasNext(); ) { var u = s.next(); u.setId(a._idCounter++), a._index.insert(u.getEnvelope(), u), a._monoChains.add(u); } }, e.prototype.computeNodes = function(i) { var a = this; this._nodedSegStrings = i; for (var o = i.iterator(); o.hasNext(); ) a.add(o.next()); this.intersectChains(); }, e.prototype.intersectChains = function() { for (var i = this, a = new hk(this._segInt), o = this._monoChains.iterator(); o.hasNext(); ) for (var s = o.next(), u = i._index.query(s.getEnvelope()), l = u.iterator(); l.hasNext(); ) { var c = l.next(); if (c.getId() > s.getId() && (s.computeOverlaps(c, a), i._nOverlaps++), i._segInt.isDone()) return null; } }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, t.SegmentOverlapAction.get = function() { return hk; }, Object.defineProperties(e, t), e; }(e1), hk = function(r) { function e() { r.call(this), this._si = null; var t = arguments[0]; this._si = t; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.overlap = function() { if (arguments.length === 4) { var n = arguments[0], i = arguments[1], a = arguments[2], o = arguments[3], s = n.getContext(), u = a.getContext(); this._si.processIntersections(s, i, u, o); } else return r.prototype.overlap.apply(this, arguments); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Q_), br = function r() { if (this._quadrantSegments = r.DEFAULT_QUADRANT_SEGMENTS, this._endCapStyle = r.CAP_ROUND, this._joinStyle = r.JOIN_ROUND, this._mitreLimit = r.DEFAULT_MITRE_LIMIT, this._isSingleSided = !1, this._simplifyFactor = r.DEFAULT_SIMPLIFY_FACTOR, arguments.length !== 0) { if (arguments.length === 1) { var e = arguments[0]; this.setQuadrantSegments(e); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; this.setQuadrantSegments(t), this.setEndCapStyle(n); } else if (arguments.length === 4) { var i = arguments[0], a = arguments[1], o = arguments[2], s = arguments[3]; this.setQuadrantSegments(i), this.setEndCapStyle(a), this.setJoinStyle(o), this.setMitreLimit(s); } } }, ac = { CAP_ROUND: { configurable: !0 }, CAP_FLAT: { configurable: !0 }, CAP_SQUARE: { configurable: !0 }, JOIN_ROUND: { configurable: !0 }, JOIN_MITRE: { configurable: !0 }, JOIN_BEVEL: { configurable: !0 }, DEFAULT_QUADRANT_SEGMENTS: { configurable: !0 }, DEFAULT_MITRE_LIMIT: { configurable: !0 }, DEFAULT_SIMPLIFY_FACTOR: { configurable: !0 } }; br.prototype.getEndCapStyle = function() { return this._endCapStyle; }; br.prototype.isSingleSided = function() { return this._isSingleSided; }; br.prototype.setQuadrantSegments = function(e) { this._quadrantSegments = e, this._quadrantSegments === 0 && (this._joinStyle = br.JOIN_BEVEL), this._quadrantSegments < 0 && (this._joinStyle = br.JOIN_MITRE, this._mitreLimit = Math.abs(this._quadrantSegments)), e <= 0 && (this._quadrantSegments = 1), this._joinStyle !== br.JOIN_ROUND && (this._quadrantSegments = br.DEFAULT_QUADRANT_SEGMENTS); }; br.prototype.getJoinStyle = function() { return this._joinStyle; }; br.prototype.setJoinStyle = function(e) { this._joinStyle = e; }; br.prototype.setSimplifyFactor = function(e) { this._simplifyFactor = e < 0 ? 0 : e; }; br.prototype.getSimplifyFactor = function() { return this._simplifyFactor; }; br.prototype.getQuadrantSegments = function() { return this._quadrantSegments; }; br.prototype.setEndCapStyle = function(e) { this._endCapStyle = e; }; br.prototype.getMitreLimit = function() { return this._mitreLimit; }; br.prototype.setMitreLimit = function(e) { this._mitreLimit = e; }; br.prototype.setSingleSided = function(e) { this._isSingleSided = e; }; br.prototype.interfaces_ = function() { return []; }; br.prototype.getClass = function() { return br; }; br.bufferDistanceError = function(e) { var t = Math.PI / 2 / e; return 1 - Math.cos(t / 2); }; ac.CAP_ROUND.get = function() { return 1; }; ac.CAP_FLAT.get = function() { return 2; }; ac.CAP_SQUARE.get = function() { return 3; }; ac.JOIN_ROUND.get = function() { return 1; }; ac.JOIN_MITRE.get = function() { return 2; }; ac.JOIN_BEVEL.get = function() { return 3; }; ac.DEFAULT_QUADRANT_SEGMENTS.get = function() { return 8; }; ac.DEFAULT_MITRE_LIMIT.get = function() { return 5; }; ac.DEFAULT_SIMPLIFY_FACTOR.get = function() { return 0.01; }; Object.defineProperties(br, ac); var En = function(e) { this._distanceTol = null, this._isDeleted = null, this._angleOrientation = Me.COUNTERCLOCKWISE, this._inputLine = e || null; }, aw = { INIT: { configurable: !0 }, DELETE: { configurable: !0 }, KEEP: { configurable: !0 }, NUM_PTS_TO_CHECK: { configurable: !0 } }; En.prototype.isDeletable = function(e, t, n, i) { var a = this._inputLine[e], o = this._inputLine[t], s = this._inputLine[n]; return !this.isConcave(a, o, s) || !this.isShallow(a, o, s, i) ? !1 : this.isShallowSampled(a, o, e, n, i); }; En.prototype.deleteShallowConcavities = function() { for (var e = this, t = 1, n = this.findNextNonDeletedIndex(t), i = this.findNextNonDeletedIndex(n), a = !1; i < this._inputLine.length; ) { var o = !1; e.isDeletable(t, n, i, e._distanceTol) && (e._isDeleted[n] = En.DELETE, o = !0, a = !0), o ? t = i : t = n, n = e.findNextNonDeletedIndex(t), i = e.findNextNonDeletedIndex(n); } return a; }; En.prototype.isShallowConcavity = function(e, t, n, i) { var a = Me.computeOrientation(e, t, n), o = a === this._angleOrientation; if (!o) return !1; var s = Me.distancePointLine(t, e, n); return s < i; }; En.prototype.isShallowSampled = function(e, t, n, i, a) { var o = this, s = Math.trunc((i - n) / En.NUM_PTS_TO_CHECK); s <= 0 && (s = 1); for (var u = n; u < i; u += s) if (!o.isShallow(e, t, o._inputLine[u], a)) return !1; return !0; }; En.prototype.isConcave = function(e, t, n) { var i = Me.computeOrientation(e, t, n), a = i === this._angleOrientation; return a; }; En.prototype.simplify = function(e) { var t = this; this._distanceTol = Math.abs(e), e < 0 && (this._angleOrientation = Me.CLOCKWISE), this._isDeleted = new Array(this._inputLine.length).fill(null); var n = !1; do n = t.deleteShallowConcavities(); while (n); return this.collapseLine(); }; En.prototype.findNextNonDeletedIndex = function(e) { for (var t = e + 1; t < this._inputLine.length && this._isDeleted[t] === En.DELETE; ) t++; return t; }; En.prototype.isShallow = function(e, t, n, i) { var a = Me.distancePointLine(t, e, n); return a < i; }; En.prototype.collapseLine = function() { for (var e = this, t = new rw(), n = 0; n < this._inputLine.length; n++) e._isDeleted[n] !== En.DELETE && t.add(e._inputLine[n]); return t.toCoordinateArray(); }; En.prototype.interfaces_ = function() { return []; }; En.prototype.getClass = function() { return En; }; En.simplify = function(e, t) { var n = new En(e); return n.simplify(t); }; aw.INIT.get = function() { return 0; }; aw.DELETE.get = function() { return 1; }; aw.KEEP.get = function() { return 1; }; aw.NUM_PTS_TO_CHECK.get = function() { return 10; }; Object.defineProperties(En, aw); var yo = function() { this._ptList = null, this._precisionModel = null, this._minimimVertexDistance = 0, this._ptList = new be(); }, wW = { COORDINATE_ARRAY_TYPE: { configurable: !0 } }; yo.prototype.getCoordinates = function() { var e = this._ptList.toArray(yo.COORDINATE_ARRAY_TYPE); return e; }; yo.prototype.setPrecisionModel = function(e) { this._precisionModel = e; }; yo.prototype.addPt = function(e) { var t = new Z(e); if (this._precisionModel.makePrecise(t), this.isRedundant(t)) return null; this._ptList.add(t); }; yo.prototype.revere = function() { }; yo.prototype.addPts = function(e, t) { var n = this; if (t) for (var i = 0; i < e.length; i++) n.addPt(e[i]); else for (var a = e.length - 1; a >= 0; a--) n.addPt(e[a]); }; yo.prototype.isRedundant = function(e) { if (this._ptList.size() < 1) return !1; var t = this._ptList.get(this._ptList.size() - 1), n = e.distance(t); return n < this._minimimVertexDistance; }; yo.prototype.toString = function() { var e = new Dt(), t = e.createLineString(this.getCoordinates()); return t.toString(); }; yo.prototype.closeRing = function() { if (this._ptList.size() < 1) return null; var e = new Z(this._ptList.get(0)), t = this._ptList.get(this._ptList.size() - 1); if (e.equals(t)) return null; this._ptList.add(e); }; yo.prototype.setMinimumVertexDistance = function(e) { this._minimimVertexDistance = e; }; yo.prototype.interfaces_ = function() { return []; }; yo.prototype.getClass = function() { return yo; }; wW.COORDINATE_ARRAY_TYPE.get = function() { return new Array(0).fill(null); }; Object.defineProperties(yo, wW); var kt = function() { }, ev = { PI_TIMES_2: { configurable: !0 }, PI_OVER_2: { configurable: !0 }, PI_OVER_4: { configurable: !0 }, COUNTERCLOCKWISE: { configurable: !0 }, CLOCKWISE: { configurable: !0 }, NONE: { configurable: !0 } }; kt.prototype.interfaces_ = function() { return []; }; kt.prototype.getClass = function() { return kt; }; kt.toDegrees = function(e) { return e * 180 / Math.PI; }; kt.normalize = function(e) { for (; e > Math.PI; ) e -= kt.PI_TIMES_2; for (; e <= -Math.PI; ) e += kt.PI_TIMES_2; return e; }; kt.angle = function() { if (arguments.length === 1) { var e = arguments[0]; return Math.atan2(e.y, e.x); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1], i = n.x - t.x, a = n.y - t.y; return Math.atan2(a, i); } }; kt.isAcute = function(e, t, n) { var i = e.x - t.x, a = e.y - t.y, o = n.x - t.x, s = n.y - t.y, u = i * o + a * s; return u > 0; }; kt.isObtuse = function(e, t, n) { var i = e.x - t.x, a = e.y - t.y, o = n.x - t.x, s = n.y - t.y, u = i * o + a * s; return u < 0; }; kt.interiorAngle = function(e, t, n) { var i = kt.angle(t, e), a = kt.angle(t, n); return Math.abs(a - i); }; kt.normalizePositive = function(e) { if (e < 0) { for (; e < 0; ) e += kt.PI_TIMES_2; e >= kt.PI_TIMES_2 && (e = 0); } else { for (; e >= kt.PI_TIMES_2; ) e -= kt.PI_TIMES_2; e < 0 && (e = 0); } return e; }; kt.angleBetween = function(e, t, n) { var i = kt.angle(t, e), a = kt.angle(t, n); return kt.diff(i, a); }; kt.diff = function(e, t) { var n = null; return e < t ? n = t - e : n = e - t, n > Math.PI && (n = 2 * Math.PI - n), n; }; kt.toRadians = function(e) { return e * Math.PI / 180; }; kt.getTurn = function(e, t) { var n = Math.sin(t - e); return n > 0 ? kt.COUNTERCLOCKWISE : n < 0 ? kt.CLOCKWISE : kt.NONE; }; kt.angleBetweenOriented = function(e, t, n) { var i = kt.angle(t, e), a = kt.angle(t, n), o = a - i; return o <= -Math.PI ? o + kt.PI_TIMES_2 : o > Math.PI ? o - kt.PI_TIMES_2 : o; }; ev.PI_TIMES_2.get = function() { return 2 * Math.PI; }; ev.PI_OVER_2.get = function() { return Math.PI / 2; }; ev.PI_OVER_4.get = function() { return Math.PI / 4; }; ev.COUNTERCLOCKWISE.get = function() { return Me.COUNTERCLOCKWISE; }; ev.CLOCKWISE.get = function() { return Me.CLOCKWISE; }; ev.NONE.get = function() { return Me.COLLINEAR; }; Object.defineProperties(kt, ev); var sn = function r() { this._maxCurveSegmentError = 0, this._filletAngleQuantum = null, this._closingSegLengthFactor = 1, this._segList = null, this._distance = 0, this._precisionModel = null, this._bufParams = null, this._li = null, this._s0 = null, this._s1 = null, this._s2 = null, this._seg0 = new et(), this._seg1 = new et(), this._offset0 = new et(), this._offset1 = new et(), this._side = 0, this._hasNarrowConcaveAngle = !1; var e = arguments[0], t = arguments[1], n = arguments[2]; this._precisionModel = e, this._bufParams = t, this._li = new Uh(), this._filletAngleQuantum = Math.PI / 2 / t.getQuadrantSegments(), t.getQuadrantSegments() >= 8 && t.getJoinStyle() === br.JOIN_ROUND && (this._closingSegLengthFactor = r.MAX_CLOSING_SEG_LEN_FACTOR), this.init(n); }, ow = { OFFSET_SEGMENT_SEPARATION_FACTOR: { configurable: !0 }, INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR: { configurable: !0 }, CURVE_VERTEX_SNAP_DISTANCE_FACTOR: { configurable: !0 }, MAX_CLOSING_SEG_LEN_FACTOR: { configurable: !0 } }; sn.prototype.addNextSegment = function(e, t) { if (this._s0 = this._s1, this._s1 = this._s2, this._s2 = e, this._seg0.setCoordinates(this._s0, this._s1), this.computeOffsetSegment(this._seg0, this._side, this._distance, this._offset0), this._seg1.setCoordinates(this._s1, this._s2), this.computeOffsetSegment(this._seg1, this._side, this._distance, this._offset1), this._s1.equals(this._s2)) return null; var n = Me.computeOrientation(this._s0, this._s1, this._s2), i = n === Me.CLOCKWISE && this._side === _e.LEFT || n === Me.COUNTERCLOCKWISE && this._side === _e.RIGHT; n === 0 ? this.addCollinear(t) : i ? this.addOutsideTurn(n, t) : this.addInsideTurn(n, t); }; sn.prototype.addLineEndCap = function(e, t) { var n = new et(e, t), i = new et(); this.computeOffsetSegment(n, _e.LEFT, this._distance, i); var a = new et(); this.computeOffsetSegment(n, _e.RIGHT, this._distance, a); var o = t.x - e.x, s = t.y - e.y, u = Math.atan2(s, o); switch (this._bufParams.getEndCapStyle()) { case br.CAP_ROUND: this._segList.addPt(i.p1), this.addFilletArc(t, u + Math.PI / 2, u - Math.PI / 2, Me.CLOCKWISE, this._distance), this._segList.addPt(a.p1); break; case br.CAP_FLAT: this._segList.addPt(i.p1), this._segList.addPt(a.p1); break; case br.CAP_SQUARE: var l = new Z(); l.x = Math.abs(this._distance) * Math.cos(u), l.y = Math.abs(this._distance) * Math.sin(u); var c = new Z(i.p1.x + l.x, i.p1.y + l.y), f = new Z(a.p1.x + l.x, a.p1.y + l.y); this._segList.addPt(c), this._segList.addPt(f); break; } }; sn.prototype.getCoordinates = function() { var e = this._segList.getCoordinates(); return e; }; sn.prototype.addMitreJoin = function(e, t, n, i) { var a = !0, o = null; try { o = ls.intersection(t.p0, t.p1, n.p0, n.p1); var s = i <= 0 ? 1 : o.distance(e) / Math.abs(i); s > this._bufParams.getMitreLimit() && (a = !1); } catch (u) { if (u instanceof Km) o = new Z(0, 0), a = !1; else throw u; } finally { } a ? this._segList.addPt(o) : this.addLimitedMitreJoin(t, n, i, this._bufParams.getMitreLimit()); }; sn.prototype.addFilletCorner = function(e, t, n, i, a) { var o = t.x - e.x, s = t.y - e.y, u = Math.atan2(s, o), l = n.x - e.x, c = n.y - e.y, f = Math.atan2(c, l); i === Me.CLOCKWISE ? u <= f && (u += 2 * Math.PI) : u >= f && (u -= 2 * Math.PI), this._segList.addPt(t), this.addFilletArc(e, u, f, i, a), this._segList.addPt(n); }; sn.prototype.addOutsideTurn = function(e, t) { if (this._offset0.p1.distance(this._offset1.p0) < this._distance * sn.OFFSET_SEGMENT_SEPARATION_FACTOR) return this._segList.addPt(this._offset0.p1), null; this._bufParams.getJoinStyle() === br.JOIN_MITRE ? this.addMitreJoin(this._s1, this._offset0, this._offset1, this._distance) : this._bufParams.getJoinStyle() === br.JOIN_BEVEL ? this.addBevelJoin(this._offset0, this._offset1) : (t && this._segList.addPt(this._offset0.p1), this.addFilletCorner(this._s1, this._offset0.p1, this._offset1.p0, e, this._distance), this._segList.addPt(this._offset1.p0)); }; sn.prototype.createSquare = function(e) { this._segList.addPt(new Z(e.x + this._distance, e.y + this._distance)), this._segList.addPt(new Z(e.x + this._distance, e.y - this._distance)), this._segList.addPt(new Z(e.x - this._distance, e.y - this._distance)), this._segList.addPt(new Z(e.x - this._distance, e.y + this._distance)), this._segList.closeRing(); }; sn.prototype.addSegments = function(e, t) { this._segList.addPts(e, t); }; sn.prototype.addFirstSegment = function() { this._segList.addPt(this._offset1.p0); }; sn.prototype.addLastSegment = function() { this._segList.addPt(this._offset1.p1); }; sn.prototype.initSideSegments = function(e, t, n) { this._s1 = e, this._s2 = t, this._side = n, this._seg1.setCoordinates(e, t), this.computeOffsetSegment(this._seg1, n, this._distance, this._offset1); }; sn.prototype.addLimitedMitreJoin = function(e, t, n, i) { var a = this._seg0.p1, o = kt.angle(a, this._seg0.p0), s = kt.angleBetweenOriented(this._seg0.p0, a, this._seg1.p1), u = s / 2, l = kt.normalize(o + u), c = kt.normalize(l + Math.PI), f = i * n, h = f * Math.abs(Math.sin(u)), p = n - h, d = a.x + f * Math.cos(c), v = a.y + f * Math.sin(c), g = new Z(d, v), m = new et(a, g), y = m.pointAlongOffset(1, p), _ = m.pointAlongOffset(1, -p); this._side === _e.LEFT ? (this._segList.addPt(y), this._segList.addPt(_)) : (this._segList.addPt(_), this._segList.addPt(y)); }; sn.prototype.computeOffsetSegment = function(e, t, n, i) { var a = t === _e.LEFT ? 1 : -1, o = e.p1.x - e.p0.x, s = e.p1.y - e.p0.y, u = Math.sqrt(o * o + s * s), l = a * n * o / u, c = a * n * s / u; i.p0.x = e.p0.x - c, i.p0.y = e.p0.y + l, i.p1.x = e.p1.x - c, i.p1.y = e.p1.y + l; }; sn.prototype.addFilletArc = function(e, t, n, i, a) { var o = this, s = i === Me.CLOCKWISE ? -1 : 1, u = Math.abs(t - n), l = Math.trunc(u / this._filletAngleQuantum + 0.5); if (l < 1) return null; for (var c = 0, f = u / l, h = c, p = new Z(); h < u; ) { var d = t + s * h; p.x = e.x + a * Math.cos(d), p.y = e.y + a * Math.sin(d), o._segList.addPt(p), h += f; } }; sn.prototype.addInsideTurn = function(e, t) { if (this._li.computeIntersection(this._offset0.p0, this._offset0.p1, this._offset1.p0, this._offset1.p1), this._li.hasIntersection()) this._segList.addPt(this._li.getIntersection(0)); else if (this._hasNarrowConcaveAngle = !0, this._offset0.p1.distance(this._offset1.p0) < this._distance * sn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR) this._segList.addPt(this._offset0.p1); else { if (this._segList.addPt(this._offset0.p1), this._closingSegLengthFactor > 0) { var n = new Z((this._closingSegLengthFactor * this._offset0.p1.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset0.p1.y + this._s1.y) / (this._closingSegLengthFactor + 1)); this._segList.addPt(n); var i = new Z((this._closingSegLengthFactor * this._offset1.p0.x + this._s1.x) / (this._closingSegLengthFactor + 1), (this._closingSegLengthFactor * this._offset1.p0.y + this._s1.y) / (this._closingSegLengthFactor + 1)); this._segList.addPt(i); } else this._segList.addPt(this._s1); this._segList.addPt(this._offset1.p0); } }; sn.prototype.createCircle = function(e) { var t = new Z(e.x + this._distance, e.y); this._segList.addPt(t), this.addFilletArc(e, 0, 2 * Math.PI, -1, this._distance), this._segList.closeRing(); }; sn.prototype.addBevelJoin = function(e, t) { this._segList.addPt(e.p1), this._segList.addPt(t.p0); }; sn.prototype.init = function(e) { this._distance = e, this._maxCurveSegmentError = e * (1 - Math.cos(this._filletAngleQuantum / 2)), this._segList = new yo(), this._segList.setPrecisionModel(this._precisionModel), this._segList.setMinimumVertexDistance(e * sn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR); }; sn.prototype.addCollinear = function(e) { this._li.computeIntersection(this._s0, this._s1, this._s1, this._s2); var t = this._li.getIntersectionNum(); t >= 2 && (this._bufParams.getJoinStyle() === br.JOIN_BEVEL || this._bufParams.getJoinStyle() === br.JOIN_MITRE ? (e && this._segList.addPt(this._offset0.p1), this._segList.addPt(this._offset1.p0)) : this.addFilletCorner(this._s1, this._offset0.p1, this._offset1.p0, Me.CLOCKWISE, this._distance)); }; sn.prototype.closeRing = function() { this._segList.closeRing(); }; sn.prototype.hasNarrowConcaveAngle = function() { return this._hasNarrowConcaveAngle; }; sn.prototype.interfaces_ = function() { return []; }; sn.prototype.getClass = function() { return sn; }; ow.OFFSET_SEGMENT_SEPARATION_FACTOR.get = function() { return 1e-3; }; ow.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get = function() { return 1e-3; }; ow.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get = function() { return 1e-6; }; ow.MAX_CLOSING_SEG_LEN_FACTOR.get = function() { return 80; }; Object.defineProperties(sn, ow); var La = function() { this._distance = 0, this._precisionModel = null, this._bufParams = null; var e = arguments[0], t = arguments[1]; this._precisionModel = e, this._bufParams = t; }; La.prototype.getOffsetCurve = function(e, t) { if (this._distance = t, t === 0) return null; var n = t < 0, i = Math.abs(t), a = this.getSegGen(i); e.length <= 1 ? this.computePointCurve(e[0], a) : this.computeOffsetCurve(e, n, a); var o = a.getCoordinates(); return n && Mt.reverse(o), o; }; La.prototype.computeSingleSidedBufferCurve = function(e, t, n) { var i = this.simplifyTolerance(this._distance); if (t) { n.addSegments(e, !0); var a = En.simplify(e, -i), o = a.length - 1; n.initSideSegments(a[o], a[o - 1], _e.LEFT), n.addFirstSegment(); for (var s = o - 2; s >= 0; s--) n.addNextSegment(a[s], !0); } else { n.addSegments(e, !1); var u = En.simplify(e, i), l = u.length - 1; n.initSideSegments(u[0], u[1], _e.LEFT), n.addFirstSegment(); for (var c = 2; c <= l; c++) n.addNextSegment(u[c], !0); } n.addLastSegment(), n.closeRing(); }; La.prototype.computeRingBufferCurve = function(e, t, n) { var i = this.simplifyTolerance(this._distance); t === _e.RIGHT && (i = -i); var a = En.simplify(e, i), o = a.length - 1; n.initSideSegments(a[o - 1], a[0], t); for (var s = 1; s <= o; s++) { var u = s !== 1; n.addNextSegment(a[s], u); } n.closeRing(); }; La.prototype.computeLineBufferCurve = function(e, t) { var n = this.simplifyTolerance(this._distance), i = En.simplify(e, n), a = i.length - 1; t.initSideSegments(i[0], i[1], _e.LEFT); for (var o = 2; o <= a; o++) t.addNextSegment(i[o], !0); t.addLastSegment(), t.addLineEndCap(i[a - 1], i[a]); var s = En.simplify(e, -n), u = s.length - 1; t.initSideSegments(s[u], s[u - 1], _e.LEFT); for (var l = u - 2; l >= 0; l--) t.addNextSegment(s[l], !0); t.addLastSegment(), t.addLineEndCap(s[1], s[0]), t.closeRing(); }; La.prototype.computePointCurve = function(e, t) { switch (this._bufParams.getEndCapStyle()) { case br.CAP_ROUND: t.createCircle(e); break; case br.CAP_SQUARE: t.createSquare(e); break; } }; La.prototype.getLineCurve = function(e, t) { if (this._distance = t, t < 0 && !this._bufParams.isSingleSided() || t === 0) return null; var n = Math.abs(t), i = this.getSegGen(n); if (e.length <= 1) this.computePointCurve(e[0], i); else if (this._bufParams.isSingleSided()) { var a = t < 0; this.computeSingleSidedBufferCurve(e, a, i); } else this.computeLineBufferCurve(e, i); var o = i.getCoordinates(); return o; }; La.prototype.getBufferParameters = function() { return this._bufParams; }; La.prototype.simplifyTolerance = function(e) { return e * this._bufParams.getSimplifyFactor(); }; La.prototype.getRingCurve = function(e, t, n) { if (this._distance = n, e.length <= 2) return this.getLineCurve(e, n); if (n === 0) return La.copyCoordinates(e); var i = this.getSegGen(n); return this.computeRingBufferCurve(e, t, i), i.getCoordinates(); }; La.prototype.computeOffsetCurve = function(e, t, n) { var i = this.simplifyTolerance(this._distance); if (t) { var a = En.simplify(e, -i), o = a.length - 1; n.initSideSegments(a[o], a[o - 1], _e.LEFT), n.addFirstSegment(); for (var s = o - 2; s >= 0; s--) n.addNextSegment(a[s], !0); } else { var u = En.simplify(e, i), l = u.length - 1; n.initSideSegments(u[0], u[1], _e.LEFT), n.addFirstSegment(); for (var c = 2; c <= l; c++) n.addNextSegment(u[c], !0); } n.addLastSegment(); }; La.prototype.getSegGen = function(e) { return new sn(this._precisionModel, this._bufParams, e); }; La.prototype.interfaces_ = function() { return []; }; La.prototype.getClass = function() { return La; }; La.copyCoordinates = function(e) { for (var t = new Array(e.length).fill(null), n = 0; n < t.length; n++) t[n] = new Z(e[n]); return t; }; var Td = function() { this._subgraphs = null, this._seg = new et(), this._cga = new Me(); var e = arguments[0]; this._subgraphs = e; }, xW = { DepthSegment: { configurable: !0 } }; Td.prototype.findStabbedSegments = function() { var e = this; if (arguments.length === 1) { for (var t = arguments[0], n = new be(), i = this._subgraphs.iterator(); i.hasNext(); ) { var a = i.next(), o = a.getEnvelope(); t.y < o.getMinY() || t.y > o.getMaxY() || e.findStabbedSegments(t, a.getDirectedEdges(), n); } return n; } else if (arguments.length === 3) { if (st(arguments[2], cs) && arguments[0] instanceof Z && arguments[1] instanceof OD) for (var s = arguments[0], u = arguments[1], l = arguments[2], c = u.getEdge().getCoordinates(), f = 0; f < c.length - 1; f++) { e._seg.p0 = c[f], e._seg.p1 = c[f + 1], e._seg.p0.y > e._seg.p1.y && e._seg.reverse(); var h = Math.max(e._seg.p0.x, e._seg.p1.x); if (!(h < s.x) && !e._seg.isHorizontal() && !(s.y < e._seg.p0.y || s.y > e._seg.p1.y) && Me.computeOrientation(e._seg.p0, e._seg.p1, s) !== Me.RIGHT) { var p = u.getDepth(_e.LEFT); e._seg.p0.equals(c[f]) || (p = u.getDepth(_e.RIGHT)); var d = new Eh(e._seg, p); l.add(d); } } else if (st(arguments[2], cs) && arguments[0] instanceof Z && st(arguments[1], cs)) for (var v = arguments[0], g = arguments[1], m = arguments[2], y = g.iterator(); y.hasNext(); ) { var _ = y.next(); !_.isForward() || e.findStabbedSegments(v, _, m); } } }; Td.prototype.getDepth = function(e) { var t = this.findStabbedSegments(e); if (t.size() === 0) return 0; var n = ms.min(t); return n._leftDepth; }; Td.prototype.interfaces_ = function() { return []; }; Td.prototype.getClass = function() { return Td; }; xW.DepthSegment.get = function() { return Eh; }; Object.defineProperties(Td, xW); var Eh = function() { this._upwardSeg = null, this._leftDepth = null; var e = arguments[0], t = arguments[1]; this._upwardSeg = new et(e), this._leftDepth = t; }; Eh.prototype.compareTo = function(e) { var t = e; if (this._upwardSeg.minX() >= t._upwardSeg.maxX()) return 1; if (this._upwardSeg.maxX() <= t._upwardSeg.minX()) return -1; var n = this._upwardSeg.orientationIndex(t._upwardSeg); return n !== 0 || (n = -1 * t._upwardSeg.orientationIndex(this._upwardSeg), n !== 0) ? n : this._upwardSeg.compareTo(t._upwardSeg); }; Eh.prototype.compareX = function(e, t) { var n = e.p0.compareTo(t.p0); return n !== 0 ? n : e.p1.compareTo(t.p1); }; Eh.prototype.toString = function() { return this._upwardSeg.toString(); }; Eh.prototype.interfaces_ = function() { return [Uo]; }; Eh.prototype.getClass = function() { return Eh; }; var Pr = function(e, t, n) { this.p0 = e || null, this.p1 = t || null, this.p2 = n || null; }; Pr.prototype.area = function() { return Pr.area(this.p0, this.p1, this.p2); }; Pr.prototype.signedArea = function() { return Pr.signedArea(this.p0, this.p1, this.p2); }; Pr.prototype.interpolateZ = function(e) { if (e === null) throw new fn("Supplied point is null."); return Pr.interpolateZ(e, this.p0, this.p1, this.p2); }; Pr.prototype.longestSideLength = function() { return Pr.longestSideLength(this.p0, this.p1, this.p2); }; Pr.prototype.isAcute = function() { return Pr.isAcute(this.p0, this.p1, this.p2); }; Pr.prototype.circumcentre = function() { return Pr.circumcentre(this.p0, this.p1, this.p2); }; Pr.prototype.area3D = function() { return Pr.area3D(this.p0, this.p1, this.p2); }; Pr.prototype.centroid = function() { return Pr.centroid(this.p0, this.p1, this.p2); }; Pr.prototype.inCentre = function() { return Pr.inCentre(this.p0, this.p1, this.p2); }; Pr.prototype.interfaces_ = function() { return []; }; Pr.prototype.getClass = function() { return Pr; }; Pr.area = function(e, t, n) { return Math.abs(((n.x - e.x) * (t.y - e.y) - (t.x - e.x) * (n.y - e.y)) / 2); }; Pr.signedArea = function(e, t, n) { return ((n.x - e.x) * (t.y - e.y) - (t.x - e.x) * (n.y - e.y)) / 2; }; Pr.det = function(e, t, n, i) { return e * i - t * n; }; Pr.interpolateZ = function(e, t, n, i) { var a = t.x, o = t.y, s = n.x - a, u = i.x - a, l = n.y - o, c = i.y - o, f = s * c - u * l, h = e.x - a, p = e.y - o, d = (c * h - u * p) / f, v = (-l * h + s * p) / f, g = t.z + d * (n.z - t.z) + v * (i.z - t.z); return g; }; Pr.longestSideLength = function(e, t, n) { var i = e.distance(t), a = t.distance(n), o = n.distance(e), s = i; return a > s && (s = a), o > s && (s = o), s; }; Pr.isAcute = function(e, t, n) { return !(!kt.isAcute(e, t, n) || !kt.isAcute(t, n, e) || !kt.isAcute(n, e, t)); }; Pr.circumcentre = function(e, t, n) { var i = n.x, a = n.y, o = e.x - i, s = e.y - a, u = t.x - i, l = t.y - a, c = 2 * Pr.det(o, s, u, l), f = Pr.det(s, o * o + s * s, l, u * u + l * l), h = Pr.det(o, o * o + s * s, u, u * u + l * l), p = i - f / c, d = a + h / c; return new Z(p, d); }; Pr.perpendicularBisector = function(e, t) { var n = t.x - e.x, i = t.y - e.y, a = new ls(e.x + n / 2, e.y + i / 2, 1), o = new ls(e.x - i + n / 2, e.y + n + i / 2, 1); return new ls(a, o); }; Pr.angleBisector = function(e, t, n) { var i = t.distance(e), a = t.distance(n), o = i / (i + a), s = n.x - e.x, u = n.y - e.y, l = new Z(e.x + o * s, e.y + o * u); return l; }; Pr.area3D = function(e, t, n) { var i = t.x - e.x, a = t.y - e.y, o = t.z - e.z, s = n.x - e.x, u = n.y - e.y, l = n.z - e.z, c = a * l - o * u, f = o * s - i * l, h = i * u - a * s, p = c * c + f * f + h * h, d = Math.sqrt(p) / 2; return d; }; Pr.centroid = function(e, t, n) { var i = (e.x + t.x + n.x) / 3, a = (e.y + t.y + n.y) / 3; return new Z(i, a); }; Pr.inCentre = function(e, t, n) { var i = t.distance(n), a = e.distance(n), o = e.distance(t), s = i + a + o, u = (i * e.x + a * t.x + o * n.x) / s, l = (i * e.y + a * t.y + o * n.y) / s; return new Z(u, l); }; var Go = function() { this._inputGeom = null, this._distance = null, this._curveBuilder = null, this._curveList = new be(); var e = arguments[0], t = arguments[1], n = arguments[2]; this._inputGeom = e, this._distance = t, this._curveBuilder = n; }; Go.prototype.addPoint = function(e) { if (this._distance <= 0) return null; var t = e.getCoordinates(), n = this._curveBuilder.getLineCurve(t, this._distance); this.addCurve(n, Q.EXTERIOR, Q.INTERIOR); }; Go.prototype.addPolygon = function(e) { var t = this, n = this._distance, i = _e.LEFT; this._distance < 0 && (n = -this._distance, i = _e.RIGHT); var a = e.getExteriorRing(), o = Mt.removeRepeatedPoints(a.getCoordinates()); if (this._distance < 0 && this.isErodedCompletely(a, this._distance) || this._distance <= 0 && o.length < 3) return null; this.addPolygonRing(o, n, i, Q.EXTERIOR, Q.INTERIOR); for (var s = 0; s < e.getNumInteriorRing(); s++) { var u = e.getInteriorRingN(s), l = Mt.removeRepeatedPoints(u.getCoordinates()); t._distance > 0 && t.isErodedCompletely(u, -t._distance) || t.addPolygonRing(l, n, _e.opposite(i), Q.INTERIOR, Q.EXTERIOR); } }; Go.prototype.isTriangleErodedCompletely = function(e, t) { var n = new Pr(e[0], e[1], e[2]), i = n.inCentre(), a = Me.distancePointLine(i, n.p0, n.p1); return a < Math.abs(t); }; Go.prototype.addLineString = function(e) { if (this._distance <= 0 && !this._curveBuilder.getBufferParameters().isSingleSided()) return null; var t = Mt.removeRepeatedPoints(e.getCoordinates()), n = this._curveBuilder.getLineCurve(t, this._distance); this.addCurve(n, Q.EXTERIOR, Q.INTERIOR); }; Go.prototype.addCurve = function(e, t, n) { if (e === null || e.length < 2) return null; var i = new Mn(e, new Or(0, Q.BOUNDARY, t, n)); this._curveList.add(i); }; Go.prototype.getCurves = function() { return this.add(this._inputGeom), this._curveList; }; Go.prototype.addPolygonRing = function(e, t, n, i, a) { if (t === 0 && e.length < Yu.MINIMUM_VALID_SIZE) return null; var o = i, s = a; e.length >= Yu.MINIMUM_VALID_SIZE && Me.isCCW(e) && (o = a, s = i, n = _e.opposite(n)); var u = this._curveBuilder.getRingCurve(e, n, t); this.addCurve(u, o, s); }; Go.prototype.add = function(e) { if (e.isEmpty()) return null; e instanceof qn ? this.addPolygon(e) : e instanceof xn ? this.addLineString(e) : e instanceof Za ? this.addPoint(e) : e instanceof pm ? this.addCollection(e) : e instanceof Ch ? this.addCollection(e) : e instanceof Vu ? this.addCollection(e) : e instanceof va && this.addCollection(e); }; Go.prototype.isErodedCompletely = function(e, t) { var n = e.getCoordinates(); if (n.length < 4) return t < 0; if (n.length === 4) return this.isTriangleErodedCompletely(n, t); var i = e.getEnvelopeInternal(), a = Math.min(i.getHeight(), i.getWidth()); return t < 0 && 2 * Math.abs(t) > a; }; Go.prototype.addCollection = function(e) { for (var t = this, n = 0; n < e.getNumGeometries(); n++) { var i = e.getGeometryN(n); t.add(i); } }; Go.prototype.interfaces_ = function() { return []; }; Go.prototype.getClass = function() { return Go; }; var mm = function() { }; mm.prototype.locate = function(e) { }; mm.prototype.interfaces_ = function() { return []; }; mm.prototype.getClass = function() { return mm; }; var Gu = function() { this._parent = null, this._atStart = null, this._max = null, this._index = null, this._subcollectionIterator = null; var e = arguments[0]; this._parent = e, this._atStart = !0, this._index = 0, this._max = e.getNumGeometries(); }; Gu.prototype.next = function() { if (this._atStart) return this._atStart = !1, Gu.isAtomic(this._parent) && this._index++, this._parent; if (this._subcollectionIterator !== null) { if (this._subcollectionIterator.hasNext()) return this._subcollectionIterator.next(); this._subcollectionIterator = null; } if (this._index >= this._max) throw new Qm(); var e = this._parent.getGeometryN(this._index++); return e instanceof va ? (this._subcollectionIterator = new Gu(e), this._subcollectionIterator.next()) : e; }; Gu.prototype.remove = function() { throw new Error(this.getClass().getName()); }; Gu.prototype.hasNext = function() { if (this._atStart) return !0; if (this._subcollectionIterator !== null) { if (this._subcollectionIterator.hasNext()) return !0; this._subcollectionIterator = null; } return !(this._index >= this._max); }; Gu.prototype.interfaces_ = function() { return [Jm]; }; Gu.prototype.getClass = function() { return Gu; }; Gu.isAtomic = function(e) { return !(e instanceof va); }; var fo = function() { this._geom = null; var e = arguments[0]; this._geom = e; }; fo.prototype.locate = function(e) { return fo.locate(e, this._geom); }; fo.prototype.interfaces_ = function() { return [mm]; }; fo.prototype.getClass = function() { return fo; }; fo.isPointInRing = function(e, t) { return t.getEnvelopeInternal().intersects(e) ? Me.isPointInRing(e, t.getCoordinates()) : !1; }; fo.containsPointInPolygon = function(e, t) { if (t.isEmpty()) return !1; var n = t.getExteriorRing(); if (!fo.isPointInRing(e, n)) return !1; for (var i = 0; i < t.getNumInteriorRing(); i++) { var a = t.getInteriorRingN(i); if (fo.isPointInRing(e, a)) return !1; } return !0; }; fo.containsPoint = function(e, t) { if (t instanceof qn) return fo.containsPointInPolygon(e, t); if (t instanceof va) for (var n = new Gu(t); n.hasNext(); ) { var i = n.next(); if (i !== t && fo.containsPoint(e, i)) return !0; } return !1; }; fo.locate = function(e, t) { return t.isEmpty() ? Q.EXTERIOR : fo.containsPoint(e, t) ? Q.INTERIOR : Q.EXTERIOR; }; var Zi = function() { this._edgeMap = new Xi(), this._edgeList = null, this._ptInAreaLocation = [Q.NONE, Q.NONE]; }; Zi.prototype.getNextCW = function(e) { this.getEdges(); var t = this._edgeList.indexOf(e), n = t - 1; return t === 0 && (n = this._edgeList.size() - 1), this._edgeList.get(n); }; Zi.prototype.propagateSideLabels = function(e) { for (var t = Q.NONE, n = this.iterator(); n.hasNext(); ) { var i = n.next(), a = i.getLabel(); a.isArea(e) && a.getLocation(e, _e.LEFT) !== Q.NONE && (t = a.getLocation(e, _e.LEFT)); } if (t === Q.NONE) return null; for (var o = t, s = this.iterator(); s.hasNext(); ) { var u = s.next(), l = u.getLabel(); if (l.getLocation(e, _e.ON) === Q.NONE && l.setLocation(e, _e.ON, o), l.isArea(e)) { var c = l.getLocation(e, _e.LEFT), f = l.getLocation(e, _e.RIGHT); if (f !== Q.NONE) { if (f !== o) throw new jl("side location conflict", u.getCoordinate()); c === Q.NONE && Et.shouldNeverReachHere("found single null side (at " + u.getCoordinate() + ")"), o = c; } else Et.isTrue(l.getLocation(e, _e.LEFT) === Q.NONE, "found single null side"), l.setLocation(e, _e.RIGHT, o), l.setLocation(e, _e.LEFT, o); } } }; Zi.prototype.getCoordinate = function() { var e = this.iterator(); if (!e.hasNext()) return null; var t = e.next(); return t.getCoordinate(); }; Zi.prototype.print = function(e) { Oi.out.println("EdgeEndStar: " + this.getCoordinate()); for (var t = this.iterator(); t.hasNext(); ) { var n = t.next(); n.print(e); } }; Zi.prototype.isAreaLabelsConsistent = function(e) { return this.computeEdgeEndLabels(e.getBoundaryNodeRule()), this.checkAreaLabelsConsistent(0); }; Zi.prototype.checkAreaLabelsConsistent = function(e) { var t = this.getEdges(); if (t.size() <= 0) return !0; var n = t.size() - 1, i = t.get(n).getLabel(), a = i.getLocation(e, _e.LEFT); Et.isTrue(a !== Q.NONE, "Found unlabelled area edge"); for (var o = a, s = this.iterator(); s.hasNext(); ) { var u = s.next(), l = u.getLabel(); Et.isTrue(l.isArea(e), "Found non-area edge"); var c = l.getLocation(e, _e.LEFT), f = l.getLocation(e, _e.RIGHT); if (c === f || f !== o) return !1; o = c; } return !0; }; Zi.prototype.findIndex = function(e) { var t = this; this.iterator(); for (var n = 0; n < this._edgeList.size(); n++) { var i = t._edgeList.get(n); if (i === e) return n; } return -1; }; Zi.prototype.iterator = function() { return this.getEdges().iterator(); }; Zi.prototype.getEdges = function() { return this._edgeList === null && (this._edgeList = new be(this._edgeMap.values())), this._edgeList; }; Zi.prototype.getLocation = function(e, t, n) { return this._ptInAreaLocation[e] === Q.NONE && (this._ptInAreaLocation[e] = fo.locate(t, n[e].getGeometry())), this._ptInAreaLocation[e]; }; Zi.prototype.toString = function() { var e = new mu(); e.append("EdgeEndStar: " + this.getCoordinate()), e.append(` `); for (var t = this.iterator(); t.hasNext(); ) { var n = t.next(); e.append(n), e.append(` `); } return e.toString(); }; Zi.prototype.computeEdgeEndLabels = function(e) { for (var t = this.iterator(); t.hasNext(); ) { var n = t.next(); n.computeLabel(e); } }; Zi.prototype.computeLabelling = function(e) { var t = this; this.computeEdgeEndLabels(e[0].getBoundaryNodeRule()), this.propagateSideLabels(0), this.propagateSideLabels(1); for (var n = [!1, !1], i = this.iterator(); i.hasNext(); ) for (var a = i.next(), o = a.getLabel(), s = 0; s < 2; s++) o.isLine(s) && o.getLocation(s) === Q.BOUNDARY && (n[s] = !0); for (var u = this.iterator(); u.hasNext(); ) for (var l = u.next(), c = l.getLabel(), f = 0; f < 2; f++) if (c.isAnyNull(f)) { var h = Q.NONE; if (n[f]) h = Q.EXTERIOR; else { var p = l.getCoordinate(); h = t.getLocation(f, p, e); } c.setAllLocationsIfNull(f, h); } }; Zi.prototype.getDegree = function() { return this._edgeMap.size(); }; Zi.prototype.insertEdgeEnd = function(e, t) { this._edgeMap.put(e, t), this._edgeList = null; }; Zi.prototype.interfaces_ = function() { return []; }; Zi.prototype.getClass = function() { return Zi; }; var Zfe = function(r) { function e() { r.call(this), this._resultAreaEdgeList = null, this._label = null, this._SCANNING_FOR_INCOMING = 1, this._LINKING_TO_OUTGOING = 2; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.linkResultDirectedEdges = function() { var n = this; this.getResultAreaEdges(); for (var i = null, a = null, o = this._SCANNING_FOR_INCOMING, s = 0; s < this._resultAreaEdgeList.size(); s++) { var u = n._resultAreaEdgeList.get(s), l = u.getSym(); if (!!u.getLabel().isArea()) switch (i === null && u.isInResult() && (i = u), o) { case n._SCANNING_FOR_INCOMING: if (!l.isInResult()) continue; a = l, o = n._LINKING_TO_OUTGOING; break; case n._LINKING_TO_OUTGOING: if (!u.isInResult()) continue; a.setNext(u), o = n._SCANNING_FOR_INCOMING; break; } } if (o === this._LINKING_TO_OUTGOING) { if (i === null) throw new jl("no outgoing dirEdge found", this.getCoordinate()); Et.isTrue(i.isInResult(), "unable to link last incoming dirEdge"), a.setNext(i); } }, e.prototype.insert = function(n) { var i = n; this.insertEdgeEnd(i, i); }, e.prototype.getRightmostEdge = function() { var n = this.getEdges(), i = n.size(); if (i < 1) return null; var a = n.get(0); if (i === 1) return a; var o = n.get(i - 1), s = a.getQuadrant(), u = o.getQuadrant(); return Gr.isNorthern(s) && Gr.isNorthern(u) ? a : !Gr.isNorthern(s) && !Gr.isNorthern(u) ? o : a.getDy() !== 0 ? a : o.getDy() !== 0 ? o : (Et.shouldNeverReachHere("found two horizontal edges incident on node"), null); }, e.prototype.print = function(n) { Oi.out.println("DirectedEdgeStar: " + this.getCoordinate()); for (var i = this.iterator(); i.hasNext(); ) { var a = i.next(); n.print("out "), a.print(n), n.println(), n.print("in "), a.getSym().print(n), n.println(); } }, e.prototype.getResultAreaEdges = function() { var n = this; if (this._resultAreaEdgeList !== null) return this._resultAreaEdgeList; this._resultAreaEdgeList = new be(); for (var i = this.iterator(); i.hasNext(); ) { var a = i.next(); (a.isInResult() || a.getSym().isInResult()) && n._resultAreaEdgeList.add(a); } return this._resultAreaEdgeList; }, e.prototype.updateLabelling = function(n) { for (var i = this.iterator(); i.hasNext(); ) { var a = i.next(), o = a.getLabel(); o.setAllLocationsIfNull(0, n.getLocation(0)), o.setAllLocationsIfNull(1, n.getLocation(1)); } }, e.prototype.linkAllDirectedEdges = function() { var n = this; this.getEdges(); for (var i = null, a = null, o = this._edgeList.size() - 1; o >= 0; o--) { var s = n._edgeList.get(o), u = s.getSym(); a === null && (a = u), i !== null && u.setNext(i), i = s; } a.setNext(i); }, e.prototype.computeDepths = function() { var n = this; if (arguments.length === 1) { var i = arguments[0], a = this.findIndex(i), o = i.getDepth(_e.LEFT), s = i.getDepth(_e.RIGHT), u = this.computeDepths(a + 1, this._edgeList.size(), o), l = this.computeDepths(0, a, u); if (l !== s) throw new jl("depth mismatch at " + i.getCoordinate()); } else if (arguments.length === 3) { for (var c = arguments[0], f = arguments[1], h = arguments[2], p = h, d = c; d < f; d++) { var v = n._edgeList.get(d); v.setEdgeDepths(_e.RIGHT, p), p = v.getDepth(_e.LEFT); } return p; } }, e.prototype.mergeSymLabels = function() { for (var n = this.iterator(); n.hasNext(); ) { var i = n.next(), a = i.getLabel(); a.merge(i.getSym().getLabel()); } }, e.prototype.linkMinimalDirectedEdges = function(n) { for (var i = this, a = null, o = null, s = this._SCANNING_FOR_INCOMING, u = this._resultAreaEdgeList.size() - 1; u >= 0; u--) { var l = i._resultAreaEdgeList.get(u), c = l.getSym(); switch (a === null && l.getEdgeRing() === n && (a = l), s) { case i._SCANNING_FOR_INCOMING: if (c.getEdgeRing() !== n) continue; o = c, s = i._LINKING_TO_OUTGOING; break; case i._LINKING_TO_OUTGOING: if (l.getEdgeRing() !== n) continue; o.setNextMin(l), s = i._SCANNING_FOR_INCOMING; break; } } s === this._LINKING_TO_OUTGOING && (Et.isTrue(a !== null, "found null for first outgoing dirEdge"), Et.isTrue(a.getEdgeRing() === n, "unable to link last incoming dirEdge"), o.setNextMin(a)); }, e.prototype.getOutgoingDegree = function() { if (arguments.length === 0) { for (var n = 0, i = this.iterator(); i.hasNext(); ) { var a = i.next(); a.isInResult() && n++; } return n; } else if (arguments.length === 1) { for (var o = arguments[0], s = 0, u = this.iterator(); u.hasNext(); ) { var l = u.next(); l.getEdgeRing() === o && s++; } return s; } }, e.prototype.getLabel = function() { return this._label; }, e.prototype.findCoveredLineEdges = function() { for (var n = Q.NONE, i = this.iterator(); i.hasNext(); ) { var a = i.next(), o = a.getSym(); if (!a.isLineEdge()) { if (a.isInResult()) { n = Q.INTERIOR; break; } if (o.isInResult()) { n = Q.EXTERIOR; break; } } } if (n === Q.NONE) return null; for (var s = n, u = this.iterator(); u.hasNext(); ) { var l = u.next(), c = l.getSym(); l.isLineEdge() ? l.getEdge().setCovered(s === Q.INTERIOR) : (l.isInResult() && (s = Q.EXTERIOR), c.isInResult() && (s = Q.INTERIOR)); } }, e.prototype.computeLabelling = function(n) { var i = this; r.prototype.computeLabelling.call(this, n), this._label = new Or(Q.NONE); for (var a = this.iterator(); a.hasNext(); ) for (var o = a.next(), s = o.getEdge(), u = s.getLabel(), l = 0; l < 2; l++) { var c = u.getLocation(l); (c === Q.INTERIOR || c === Q.BOUNDARY) && i._label.setLocation(l, Q.INTERIOR); } }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Zi), CW = function(r) { function e() { r.apply(this, arguments); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.createNode = function(n) { return new rT(n, new Zfe()); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(dm), Yc = function r() { this._pts = null, this._orientation = null; var e = arguments[0]; this._pts = e, this._orientation = r.orientation(e); }; Yc.prototype.compareTo = function(e) { var t = e, n = Yc.compareOriented(this._pts, this._orientation, t._pts, t._orientation); return n; }; Yc.prototype.interfaces_ = function() { return [Uo]; }; Yc.prototype.getClass = function() { return Yc; }; Yc.orientation = function(e) { return Mt.increasingDirection(e) === 1; }; Yc.compareOriented = function(e, t, n, i) { for (var a = t ? 1 : -1, o = i ? 1 : -1, s = t ? e.length : -1, u = i ? n.length : -1, l = t ? 0 : e.length - 1, c = i ? 0 : n.length - 1; ; ) { var f = e[l].compareTo(n[c]); if (f !== 0) return f; l += a, c += o; var h = l === s, p = c === u; if (h && !p) return -1; if (!h && p) return 1; if (h && p) return 0; } }; var ys = function() { this._edges = new be(), this._ocaMap = new Xi(); }; ys.prototype.print = function(e) { var t = this; e.print("MULTILINESTRING ( "); for (var n = 0; n < this._edges.size(); n++) { var i = t._edges.get(n); n > 0 && e.print(","), e.print("("); for (var a = i.getCoordinates(), o = 0; o < a.length; o++) o > 0 && e.print(","), e.print(a[o].x + " " + a[o].y); e.println(")"); } e.print(") "); }; ys.prototype.addAll = function(e) { for (var t = this, n = e.iterator(); n.hasNext(); ) t.add(n.next()); }; ys.prototype.findEdgeIndex = function(e) { for (var t = this, n = 0; n < this._edges.size(); n++) if (t._edges.get(n).equals(e)) return n; return -1; }; ys.prototype.iterator = function() { return this._edges.iterator(); }; ys.prototype.getEdges = function() { return this._edges; }; ys.prototype.get = function(e) { return this._edges.get(e); }; ys.prototype.findEqualEdge = function(e) { var t = new Yc(e.getCoordinates()), n = this._ocaMap.get(t); return n; }; ys.prototype.add = function(e) { this._edges.add(e); var t = new Yc(e.getCoordinates()); this._ocaMap.put(t, e); }; ys.prototype.interfaces_ = function() { return []; }; ys.prototype.getClass = function() { return ys; }; var bh = function() { }; bh.prototype.processIntersections = function(e, t, n, i) { }; bh.prototype.isDone = function() { }; bh.prototype.interfaces_ = function() { return []; }; bh.prototype.getClass = function() { return bh; }; var _o = function() { this._hasIntersection = !1, this._hasProper = !1, this._hasProperInterior = !1, this._hasInterior = !1, this._properIntersectionPoint = null, this._li = null, this._isSelfIntersection = null, this.numIntersections = 0, this.numInteriorIntersections = 0, this.numProperIntersections = 0, this.numTests = 0; var e = arguments[0]; this._li = e; }; _o.prototype.isTrivialIntersection = function(e, t, n, i) { if (e === n && this._li.getIntersectionNum() === 1) { if (_o.isAdjacentSegments(t, i)) return !0; if (e.isClosed()) { var a = e.size() - 1; if (t === 0 && i === a || i === 0 && t === a) return !0; } } return !1; }; _o.prototype.getProperIntersectionPoint = function() { return this._properIntersectionPoint; }; _o.prototype.hasProperInteriorIntersection = function() { return this._hasProperInterior; }; _o.prototype.getLineIntersector = function() { return this._li; }; _o.prototype.hasProperIntersection = function() { return this._hasProper; }; _o.prototype.processIntersections = function(e, t, n, i) { if (e === n && t === i) return null; this.numTests++; var a = e.getCoordinates()[t], o = e.getCoordinates()[t + 1], s = n.getCoordinates()[i], u = n.getCoordinates()[i + 1]; this._li.computeIntersection(a, o, s, u), this._li.hasIntersection() && (this.numIntersections++, this._li.isInteriorIntersection() && (this.numInteriorIntersections++, this._hasInterior = !0), this.isTrivialIntersection(e, t, n, i) || (this._hasIntersection = !0, e.addIntersections(this._li, t, 0), n.addIntersections(this._li, i, 1), this._li.isProper() && (this.numProperIntersections++, this._hasProper = !0, this._hasProperInterior = !0))); }; _o.prototype.hasIntersection = function() { return this._hasIntersection; }; _o.prototype.isDone = function() { return !1; }; _o.prototype.hasInteriorIntersection = function() { return this._hasInterior; }; _o.prototype.interfaces_ = function() { return [bh]; }; _o.prototype.getClass = function() { return _o; }; _o.isAdjacentSegments = function(e, t) { return Math.abs(e - t) === 1; }; var lu = function() { this.coord = null, this.segmentIndex = null, this.dist = null; var e = arguments[0], t = arguments[1], n = arguments[2]; this.coord = new Z(e), this.segmentIndex = t, this.dist = n; }; lu.prototype.getSegmentIndex = function() { return this.segmentIndex; }; lu.prototype.getCoordinate = function() { return this.coord; }; lu.prototype.print = function(e) { e.print(this.coord), e.print(" seg # = " + this.segmentIndex), e.println(" dist = " + this.dist); }; lu.prototype.compareTo = function(e) { var t = e; return this.compare(t.segmentIndex, t.dist); }; lu.prototype.isEndPoint = function(e) { return this.segmentIndex === 0 && this.dist === 0 || this.segmentIndex === e; }; lu.prototype.toString = function() { return this.coord + " seg # = " + this.segmentIndex + " dist = " + this.dist; }; lu.prototype.getDistance = function() { return this.dist; }; lu.prototype.compare = function(e, t) { return this.segmentIndex < e ? -1 : this.segmentIndex > e ? 1 : this.dist < t ? -1 : this.dist > t ? 1 : 0; }; lu.prototype.interfaces_ = function() { return [Uo]; }; lu.prototype.getClass = function() { return lu; }; var Zu = function() { this._nodeMap = new Xi(), this.edge = null; var e = arguments[0]; this.edge = e; }; Zu.prototype.print = function(e) { e.println("Intersections:"); for (var t = this.iterator(); t.hasNext(); ) { var n = t.next(); n.print(e); } }; Zu.prototype.iterator = function() { return this._nodeMap.values().iterator(); }; Zu.prototype.addSplitEdges = function(e) { var t = this; this.addEndpoints(); for (var n = this.iterator(), i = n.next(); n.hasNext(); ) { var a = n.next(), o = t.createSplitEdge(i, a); e.add(o), i = a; } }; Zu.prototype.addEndpoints = function() { var e = this.edge.pts.length - 1; this.add(this.edge.pts[0], 0, 0), this.add(this.edge.pts[e], e, 0); }; Zu.prototype.createSplitEdge = function(e, t) { var n = this, i = t.segmentIndex - e.segmentIndex + 2, a = this.edge.pts[t.segmentIndex], o = t.dist > 0 || !t.coord.equals2D(a); o || i--; var s = new Array(i).fill(null), u = 0; s[u++] = new Z(e.coord); for (var l = e.segmentIndex + 1; l <= t.segmentIndex; l++) s[u++] = n.edge.pts[l]; return o && (s[u] = t.coord), new BS(s, new Or(this.edge._label)); }; Zu.prototype.add = function(e, t, n) { var i = new lu(e, t, n), a = this._nodeMap.get(i); return a !== null ? a : (this._nodeMap.put(i, i), i); }; Zu.prototype.isIntersection = function(e) { for (var t = this.iterator(); t.hasNext(); ) { var n = t.next(); if (n.coord.equals(e)) return !0; } return !1; }; Zu.prototype.interfaces_ = function() { return []; }; Zu.prototype.getClass = function() { return Zu; }; var Th = function() { }; Th.prototype.getChainStartIndices = function(e) { var t = this, n = 0, i = new be(); i.add(new nu(n)); do { var a = t.findChainEnd(e, n); i.add(new nu(a)), n = a; } while (n < e.length - 1); var o = Th.toIntArray(i); return o; }; Th.prototype.findChainEnd = function(e, t) { for (var n = Gr.quadrant(e[t], e[t + 1]), i = t + 1; i < e.length; ) { var a = Gr.quadrant(e[i - 1], e[i]); if (a !== n) break; i++; } return i - 1; }; Th.prototype.interfaces_ = function() { return []; }; Th.prototype.getClass = function() { return Th; }; Th.toIntArray = function(e) { for (var t = new Array(e.size()).fill(null), n = 0; n < t.length; n++) t[n] = e.get(n).intValue(); return t; }; var Xl = function() { this.e = null, this.pts = null, this.startIndex = null, this.env1 = new Ke(), this.env2 = new Ke(); var e = arguments[0]; this.e = e, this.pts = e.getCoordinates(); var t = new Th(); this.startIndex = t.getChainStartIndices(this.pts); }; Xl.prototype.getCoordinates = function() { return this.pts; }; Xl.prototype.getMaxX = function(e) { var t = this.pts[this.startIndex[e]].x, n = this.pts[this.startIndex[e + 1]].x; return t > n ? t : n; }; Xl.prototype.getMinX = function(e) { var t = this.pts[this.startIndex[e]].x, n = this.pts[this.startIndex[e + 1]].x; return t < n ? t : n; }; Xl.prototype.computeIntersectsForChain = function() { if (arguments.length === 4) { var e = arguments[0], t = arguments[1], n = arguments[2], i = arguments[3]; this.computeIntersectsForChain(this.startIndex[e], this.startIndex[e + 1], t, t.startIndex[n], t.startIndex[n + 1], i); } else if (arguments.length === 6) { var a = arguments[0], o = arguments[1], s = arguments[2], u = arguments[3], l = arguments[4], c = arguments[5], f = this.pts[a], h = this.pts[o], p = s.pts[u], d = s.pts[l]; if (o - a === 1 && l - u === 1) return c.addIntersections(this.e, a, s.e, u), null; if (this.env1.init(f, h), this.env2.init(p, d), !this.env1.intersects(this.env2)) return null; var v = Math.trunc((a + o) / 2), g = Math.trunc((u + l) / 2); a < v && (u < g && this.computeIntersectsForChain(a, v, s, u, g, c), g < l && this.computeIntersectsForChain(a, v, s, g, l, c)), v < o && (u < g && this.computeIntersectsForChain(v, o, s, u, g, c), g < l && this.computeIntersectsForChain(v, o, s, g, l, c)); } }; Xl.prototype.getStartIndexes = function() { return this.startIndex; }; Xl.prototype.computeIntersects = function(e, t) { for (var n = this, i = 0; i < this.startIndex.length - 1; i++) for (var a = 0; a < e.startIndex.length - 1; a++) n.computeIntersectsForChain(i, e, a, t); }; Xl.prototype.interfaces_ = function() { return []; }; Xl.prototype.getClass = function() { return Xl; }; var Ai = function r() { var e = this; this._depth = Array(2).fill().map(function() { return Array(3); }); for (var t = 0; t < 2; t++) for (var n = 0; n < 3; n++) e._depth[t][n] = r.NULL_VALUE; }, SW = { NULL_VALUE: { configurable: !0 } }; Ai.prototype.getDepth = function(e, t) { return this._depth[e][t]; }; Ai.prototype.setDepth = function(e, t, n) { this._depth[e][t] = n; }; Ai.prototype.isNull = function() { var e = this; if (arguments.length === 0) { for (var t = 0; t < 2; t++) for (var n = 0; n < 3; n++) if (e._depth[t][n] !== Ai.NULL_VALUE) return !1; return !0; } else if (arguments.length === 1) { var i = arguments[0]; return this._depth[i][1] === Ai.NULL_VALUE; } else if (arguments.length === 2) { var a = arguments[0], o = arguments[1]; return this._depth[a][o] === Ai.NULL_VALUE; } }; Ai.prototype.normalize = function() { for (var e = this, t = 0; t < 2; t++) if (!e.isNull(t)) { var n = e._depth[t][1]; e._depth[t][2] < n && (n = e._depth[t][2]), n < 0 && (n = 0); for (var i = 1; i < 3; i++) { var a = 0; e._depth[t][i] > n && (a = 1), e._depth[t][i] = a; } } }; Ai.prototype.getDelta = function(e) { return this._depth[e][_e.RIGHT] - this._depth[e][_e.LEFT]; }; Ai.prototype.getLocation = function(e, t) { return this._depth[e][t] <= 0 ? Q.EXTERIOR : Q.INTERIOR; }; Ai.prototype.toString = function() { return "A: " + this._depth[0][1] + "," + this._depth[0][2] + " B: " + this._depth[1][1] + "," + this._depth[1][2]; }; Ai.prototype.add = function() { var e = this; if (arguments.length === 1) for (var t = arguments[0], n = 0; n < 2; n++) for (var i = 1; i < 3; i++) { var a = t.getLocation(n, i); (a === Q.EXTERIOR || a === Q.INTERIOR) && (e.isNull(n, i) ? e._depth[n][i] = Ai.depthAtLocation(a) : e._depth[n][i] += Ai.depthAtLocation(a)); } else if (arguments.length === 3) { var o = arguments[0], s = arguments[1], u = arguments[2]; u === Q.INTERIOR && this._depth[o][s]++; } }; Ai.prototype.interfaces_ = function() { return []; }; Ai.prototype.getClass = function() { return Ai; }; Ai.depthAtLocation = function(e) { return e === Q.EXTERIOR ? 0 : e === Q.INTERIOR ? 1 : Ai.NULL_VALUE; }; SW.NULL_VALUE.get = function() { return -1; }; Object.defineProperties(Ai, SW); var BS = function(r) { function e() { if (r.call(this), this.pts = null, this._env = null, this.eiList = new Zu(this), this._name = null, this._mce = null, this._isIsolated = !0, this._depth = new Ai(), this._depthDelta = 0, arguments.length === 1) { var t = arguments[0]; e.call(this, t, null); } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; this.pts = n, this._label = i; } } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.getDepth = function() { return this._depth; }, e.prototype.getCollapsedEdge = function() { var n = new Array(2).fill(null); n[0] = this.pts[0], n[1] = this.pts[1]; var i = new e(n, Or.toLineLabel(this._label)); return i; }, e.prototype.isIsolated = function() { return this._isIsolated; }, e.prototype.getCoordinates = function() { return this.pts; }, e.prototype.setIsolated = function(n) { this._isIsolated = n; }, e.prototype.setName = function(n) { this._name = n; }, e.prototype.equals = function(n) { var i = this; if (!(n instanceof e)) return !1; var a = n; if (this.pts.length !== a.pts.length) return !1; for (var o = !0, s = !0, u = this.pts.length, l = 0; l < this.pts.length; l++) if (i.pts[l].equals2D(a.pts[l]) || (o = !1), i.pts[l].equals2D(a.pts[--u]) || (s = !1), !o && !s) return !1; return !0; }, e.prototype.getCoordinate = function() { if (arguments.length === 0) return this.pts.length > 0 ? this.pts[0] : null; if (arguments.length === 1) { var n = arguments[0]; return this.pts[n]; } }, e.prototype.print = function(n) { var i = this; n.print("edge " + this._name + ": "), n.print("LINESTRING ("); for (var a = 0; a < this.pts.length; a++) a > 0 && n.print(","), n.print(i.pts[a].x + " " + i.pts[a].y); n.print(") " + this._label + " " + this._depthDelta); }, e.prototype.computeIM = function(n) { e.updateIM(this._label, n); }, e.prototype.isCollapsed = function() { return !this._label.isArea() || this.pts.length !== 3 ? !1 : !!this.pts[0].equals(this.pts[2]); }, e.prototype.isClosed = function() { return this.pts[0].equals(this.pts[this.pts.length - 1]); }, e.prototype.getMaximumSegmentIndex = function() { return this.pts.length - 1; }, e.prototype.getDepthDelta = function() { return this._depthDelta; }, e.prototype.getNumPoints = function() { return this.pts.length; }, e.prototype.printReverse = function(n) { var i = this; n.print("edge " + this._name + ": "); for (var a = this.pts.length - 1; a >= 0; a--) n.print(i.pts[a] + " "); n.println(""); }, e.prototype.getMonotoneChainEdge = function() { return this._mce === null && (this._mce = new Xl(this)), this._mce; }, e.prototype.getEnvelope = function() { var n = this; if (this._env === null) { this._env = new Ke(); for (var i = 0; i < this.pts.length; i++) n._env.expandToInclude(n.pts[i]); } return this._env; }, e.prototype.addIntersection = function(n, i, a, o) { var s = new Z(n.getIntersection(o)), u = i, l = n.getEdgeDistance(a, o), c = u + 1; if (c < this.pts.length) { var f = this.pts[c]; s.equals2D(f) && (u = c, l = 0); } this.eiList.add(s, u, l); }, e.prototype.toString = function() { var n = this, i = new mu(); i.append("edge " + this._name + ": "), i.append("LINESTRING ("); for (var a = 0; a < this.pts.length; a++) a > 0 && i.append(","), i.append(n.pts[a].x + " " + n.pts[a].y); return i.append(") " + this._label + " " + this._depthDelta), i.toString(); }, e.prototype.isPointwiseEqual = function(n) { var i = this; if (this.pts.length !== n.pts.length) return !1; for (var a = 0; a < this.pts.length; a++) if (!i.pts[a].equals2D(n.pts[a])) return !1; return !0; }, e.prototype.setDepthDelta = function(n) { this._depthDelta = n; }, e.prototype.getEdgeIntersectionList = function() { return this.eiList; }, e.prototype.addIntersections = function(n, i, a) { for (var o = this, s = 0; s < n.getIntersectionNum(); s++) o.addIntersection(n, i, a, s); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e.updateIM = function() { if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; i.setAtLeastIfValid(n.getLocation(0, _e.ON), n.getLocation(1, _e.ON), 1), n.isArea() && (i.setAtLeastIfValid(n.getLocation(0, _e.LEFT), n.getLocation(1, _e.LEFT), 2), i.setAtLeastIfValid(n.getLocation(0, _e.RIGHT), n.getLocation(1, _e.RIGHT), 2)); } else return r.prototype.updateIM.apply(this, arguments); }, e; }(mo), pa = function(e) { this._workingPrecisionModel = null, this._workingNoder = null, this._geomFact = null, this._graph = null, this._edgeList = new ys(), this._bufParams = e || null; }; pa.prototype.setWorkingPrecisionModel = function(e) { this._workingPrecisionModel = e; }; pa.prototype.insertUniqueEdge = function(e) { var t = this._edgeList.findEqualEdge(e); if (t !== null) { var n = t.getLabel(), i = e.getLabel(); t.isPointwiseEqual(e) || (i = new Or(e.getLabel()), i.flip()), n.merge(i); var a = pa.depthDelta(i), o = t.getDepthDelta(), s = o + a; t.setDepthDelta(s); } else this._edgeList.add(e), e.setDepthDelta(pa.depthDelta(e.getLabel())); }; pa.prototype.buildSubgraphs = function(e, t) { for (var n = new be(), i = e.iterator(); i.hasNext(); ) { var a = i.next(), o = a.getRightmostCoordinate(), s = new Td(n), u = s.getDepth(o); a.computeDepth(u), a.findResultEdges(), n.add(a), t.add(a.getDirectedEdges(), a.getNodes()); } }; pa.prototype.createSubgraphs = function(e) { for (var t = new be(), n = e.getNodes().iterator(); n.hasNext(); ) { var i = n.next(); if (!i.isVisited()) { var a = new ga(); a.create(i), t.add(a); } } return ms.sort(t, ms.reverseOrder()), t; }; pa.prototype.createEmptyResultGeometry = function() { var e = this._geomFact.createPolygon(); return e; }; pa.prototype.getNoder = function(e) { if (this._workingNoder !== null) return this._workingNoder; var t = new hR(), n = new Uh(); return n.setPrecisionModel(e), t.setSegmentIntersector(new _o(n)), t; }; pa.prototype.buffer = function(e, t) { var n = this._workingPrecisionModel; n === null && (n = e.getPrecisionModel()), this._geomFact = e.getFactory(); var i = new La(n, this._bufParams), a = new Go(e, t, i), o = a.getCurves(); if (o.size() <= 0) return this.createEmptyResultGeometry(); this.computeNodedEdges(o, n), this._graph = new vn(new CW()), this._graph.addEdges(this._edgeList.getEdges()); var s = this.createSubgraphs(this._graph), u = new Ka(this._geomFact); this.buildSubgraphs(s, u); var l = u.getPolygons(); if (l.size() <= 0) return this.createEmptyResultGeometry(); var c = this._geomFact.buildGeometry(l); return c; }; pa.prototype.computeNodedEdges = function(e, t) { var n = this, i = this.getNoder(t); i.computeNodes(e); for (var a = i.getNodedSubstrings(), o = a.iterator(); o.hasNext(); ) { var s = o.next(), u = s.getCoordinates(); if (!(u.length === 2 && u[0].equals2D(u[1]))) { var l = s.getData(), c = new BS(s.getCoordinates(), new Or(l)); n.insertUniqueEdge(c); } } }; pa.prototype.setNoder = function(e) { this._workingNoder = e; }; pa.prototype.interfaces_ = function() { return []; }; pa.prototype.getClass = function() { return pa; }; pa.depthDelta = function(e) { var t = e.getLocation(0, _e.LEFT), n = e.getLocation(0, _e.RIGHT); return t === Q.INTERIOR && n === Q.EXTERIOR ? 1 : t === Q.EXTERIOR && n === Q.INTERIOR ? -1 : 0; }; pa.convertSegStrings = function(e) { for (var t = new Dt(), n = new be(); e.hasNext(); ) { var i = e.next(), a = t.createLineString(i.getCoordinates()); n.add(a); } return t.buildGeometry(n); }; var Xc = function() { if (this._noder = null, this._scaleFactor = null, this._offsetX = null, this._offsetY = null, this._isScaled = !1, arguments.length === 2) { var e = arguments[0], t = arguments[1]; this._noder = e, this._scaleFactor = t, this._offsetX = 0, this._offsetY = 0, this._isScaled = !this.isIntegerPrecision(); } else if (arguments.length === 4) { var n = arguments[0], i = arguments[1], a = arguments[2], o = arguments[3]; this._noder = n, this._scaleFactor = i, this._offsetX = a, this._offsetY = o, this._isScaled = !this.isIntegerPrecision(); } }; Xc.prototype.rescale = function() { var e = this; if (st(arguments[0], $n)) for (var t = arguments[0], n = t.iterator(); n.hasNext(); ) { var i = n.next(); e.rescale(i.getCoordinates()); } else if (arguments[0] instanceof Array) { for (var a = arguments[0], o = 0; o < a.length; o++) a[o].x = a[o].x / e._scaleFactor + e._offsetX, a[o].y = a[o].y / e._scaleFactor + e._offsetY; a.length === 2 && a[0].equals2D(a[1]) && Oi.out.println(a); } }; Xc.prototype.scale = function() { var e = this; if (st(arguments[0], $n)) { for (var t = arguments[0], n = new be(), i = t.iterator(); i.hasNext(); ) { var a = i.next(); n.add(new Mn(e.scale(a.getCoordinates()), a.getData())); } return n; } else if (arguments[0] instanceof Array) { for (var o = arguments[0], s = new Array(o.length).fill(null), u = 0; u < o.length; u++) s[u] = new Z(Math.round((o[u].x - e._offsetX) * e._scaleFactor), Math.round((o[u].y - e._offsetY) * e._scaleFactor), o[u].z); var l = Mt.removeRepeatedPoints(s); return l; } }; Xc.prototype.isIntegerPrecision = function() { return this._scaleFactor === 1; }; Xc.prototype.getNodedSubstrings = function() { var e = this._noder.getNodedSubstrings(); return this._isScaled && this.rescale(e), e; }; Xc.prototype.computeNodes = function(e) { var t = e; this._isScaled && (t = this.scale(e)), this._noder.computeNodes(t); }; Xc.prototype.interfaces_ = function() { return [Sh]; }; Xc.prototype.getClass = function() { return Xc; }; var cu = function() { this._li = new Uh(), this._segStrings = null; var e = arguments[0]; this._segStrings = e; }, EW = { fact: { configurable: !0 } }; cu.prototype.checkEndPtVertexIntersections = function() { var e = this; if (arguments.length === 0) for (var t = this._segStrings.iterator(); t.hasNext(); ) { var n = t.next(), i = n.getCoordinates(); e.checkEndPtVertexIntersections(i[0], e._segStrings), e.checkEndPtVertexIntersections(i[i.length - 1], e._segStrings); } else if (arguments.length === 2) { for (var a = arguments[0], o = arguments[1], s = o.iterator(); s.hasNext(); ) for (var u = s.next(), l = u.getCoordinates(), c = 1; c < l.length - 1; c++) if (l[c].equals(a)) throw new Ul("found endpt/interior pt intersection at index " + c + " :pt " + a); } }; cu.prototype.checkInteriorIntersections = function() { var e = this; if (arguments.length === 0) for (var t = this._segStrings.iterator(); t.hasNext(); ) for (var n = t.next(), i = this._segStrings.iterator(); i.hasNext(); ) { var a = i.next(); e.checkInteriorIntersections(n, a); } else if (arguments.length === 2) for (var o = arguments[0], s = arguments[1], u = o.getCoordinates(), l = s.getCoordinates(), c = 0; c < u.length - 1; c++) for (var f = 0; f < l.length - 1; f++) e.checkInteriorIntersections(o, c, s, f); else if (arguments.length === 4) { var h = arguments[0], p = arguments[1], d = arguments[2], v = arguments[3]; if (h === d && p === v) return null; var g = h.getCoordinates()[p], m = h.getCoordinates()[p + 1], y = d.getCoordinates()[v], _ = d.getCoordinates()[v + 1]; if (this._li.computeIntersection(g, m, y, _), this._li.hasIntersection() && (this._li.isProper() || this.hasInteriorIntersection(this._li, g, m) || this.hasInteriorIntersection(this._li, y, _))) throw new Ul("found non-noded intersection at " + g + "-" + m + " and " + y + "-" + _); } }; cu.prototype.checkValid = function() { this.checkEndPtVertexIntersections(), this.checkInteriorIntersections(), this.checkCollapses(); }; cu.prototype.checkCollapses = function() { var e = this; if (arguments.length === 0) for (var t = this._segStrings.iterator(); t.hasNext(); ) { var n = t.next(); e.checkCollapses(n); } else if (arguments.length === 1) for (var i = arguments[0], a = i.getCoordinates(), o = 0; o < a.length - 2; o++) e.checkCollapse(a[o], a[o + 1], a[o + 2]); }; cu.prototype.hasInteriorIntersection = function(e, t, n) { for (var i = 0; i < e.getIntersectionNum(); i++) { var a = e.getIntersection(i); if (!(a.equals(t) || a.equals(n))) return !0; } return !1; }; cu.prototype.checkCollapse = function(e, t, n) { if (e.equals(n)) throw new Ul("found non-noded collapse at " + cu.fact.createLineString([e, t, n])); }; cu.prototype.interfaces_ = function() { return []; }; cu.prototype.getClass = function() { return cu; }; EW.fact.get = function() { return new Dt(); }; Object.defineProperties(cu, EW); var Da = function() { this._li = null, this._pt = null, this._originalPt = null, this._ptScaled = null, this._p0Scaled = null, this._p1Scaled = null, this._scaleFactor = null, this._minx = null, this._maxx = null, this._miny = null, this._maxy = null, this._corner = new Array(4).fill(null), this._safeEnv = null; var e = arguments[0], t = arguments[1], n = arguments[2]; if (this._originalPt = e, this._pt = e, this._scaleFactor = t, this._li = n, t <= 0) throw new fn("Scale factor must be non-zero"); t !== 1 && (this._pt = new Z(this.scale(e.x), this.scale(e.y)), this._p0Scaled = new Z(), this._p1Scaled = new Z()), this.initCorners(this._pt); }, bW = { SAFE_ENV_EXPANSION_FACTOR: { configurable: !0 } }; Da.prototype.intersectsScaled = function(e, t) { var n = Math.min(e.x, t.x), i = Math.max(e.x, t.x), a = Math.min(e.y, t.y), o = Math.max(e.y, t.y), s = this._maxx < n || this._minx > i || this._maxy < a || this._miny > o; if (s) return !1; var u = this.intersectsToleranceSquare(e, t); return Et.isTrue(!(s && u), "Found bad envelope test"), u; }; Da.prototype.initCorners = function(e) { var t = 0.5; this._minx = e.x - t, this._maxx = e.x + t, this._miny = e.y - t, this._maxy = e.y + t, this._corner[0] = new Z(this._maxx, this._maxy), this._corner[1] = new Z(this._minx, this._maxy), this._corner[2] = new Z(this._minx, this._miny), this._corner[3] = new Z(this._maxx, this._miny); }; Da.prototype.intersects = function(e, t) { return this._scaleFactor === 1 ? this.intersectsScaled(e, t) : (this.copyScaled(e, this._p0Scaled), this.copyScaled(t, this._p1Scaled), this.intersectsScaled(this._p0Scaled, this._p1Scaled)); }; Da.prototype.scale = function(e) { return Math.round(e * this._scaleFactor); }; Da.prototype.getCoordinate = function() { return this._originalPt; }; Da.prototype.copyScaled = function(e, t) { t.x = this.scale(e.x), t.y = this.scale(e.y); }; Da.prototype.getSafeEnvelope = function() { if (this._safeEnv === null) { var e = Da.SAFE_ENV_EXPANSION_FACTOR / this._scaleFactor; this._safeEnv = new Ke(this._originalPt.x - e, this._originalPt.x + e, this._originalPt.y - e, this._originalPt.y + e); } return this._safeEnv; }; Da.prototype.intersectsPixelClosure = function(e, t) { return this._li.computeIntersection(e, t, this._corner[0], this._corner[1]), !!(this._li.hasIntersection() || (this._li.computeIntersection(e, t, this._corner[1], this._corner[2]), this._li.hasIntersection()) || (this._li.computeIntersection(e, t, this._corner[2], this._corner[3]), this._li.hasIntersection()) || (this._li.computeIntersection(e, t, this._corner[3], this._corner[0]), this._li.hasIntersection())); }; Da.prototype.intersectsToleranceSquare = function(e, t) { var n = !1, i = !1; return this._li.computeIntersection(e, t, this._corner[0], this._corner[1]), !!(this._li.isProper() || (this._li.computeIntersection(e, t, this._corner[1], this._corner[2]), this._li.isProper()) || (this._li.hasIntersection() && (n = !0), this._li.computeIntersection(e, t, this._corner[2], this._corner[3]), this._li.isProper()) || (this._li.hasIntersection() && (i = !0), this._li.computeIntersection(e, t, this._corner[3], this._corner[0]), this._li.isProper()) || n && i || e.equals(this._pt) || t.equals(this._pt)); }; Da.prototype.addSnappedNode = function(e, t) { var n = e.getCoordinate(t), i = e.getCoordinate(t + 1); return this.intersects(n, i) ? (e.addIntersection(this.getCoordinate(), t), !0) : !1; }; Da.prototype.interfaces_ = function() { return []; }; Da.prototype.getClass = function() { return Da; }; bW.SAFE_ENV_EXPANSION_FACTOR.get = function() { return 0.75; }; Object.defineProperties(Da, bW); var t1 = function() { this.tempEnv1 = new Ke(), this.selectedSegment = new et(); }; t1.prototype.select = function() { if (arguments.length !== 1) { if (arguments.length === 2) { var e = arguments[0], t = arguments[1]; e.getLineSegment(t, this.selectedSegment), this.select(this.selectedSegment); } } }; t1.prototype.interfaces_ = function() { return []; }; t1.prototype.getClass = function() { return t1; }; var ym = function() { this._index = null; var e = arguments[0]; this._index = e; }, TW = { HotPixelSnapAction: { configurable: !0 } }; ym.prototype.snap = function() { if (arguments.length === 1) { var e = arguments[0]; return this.snap(e, null, -1); } else if (arguments.length === 3) { var t = arguments[0], n = arguments[1], i = arguments[2], a = t.getSafeEnvelope(), o = new PW(t, n, i); return this._index.query(a, { interfaces_: function() { return [Wc]; }, visitItem: function(s) { var u = s; u.select(a, o); } }), o.isNodeAdded(); } }; ym.prototype.interfaces_ = function() { return []; }; ym.prototype.getClass = function() { return ym; }; TW.HotPixelSnapAction.get = function() { return PW; }; Object.defineProperties(ym, TW); var PW = function(r) { function e() { r.call(this), this._hotPixel = null, this._parentEdge = null, this._hotPixelVertexIndex = null, this._isNodeAdded = !1; var t = arguments[0], n = arguments[1], i = arguments[2]; this._hotPixel = t, this._parentEdge = n, this._hotPixelVertexIndex = i; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.isNodeAdded = function() { return this._isNodeAdded; }, e.prototype.select = function() { if (arguments.length === 2) { var n = arguments[0], i = arguments[1], a = n.getContext(); if (this._parentEdge !== null && a === this._parentEdge && i === this._hotPixelVertexIndex) return null; this._isNodeAdded = this._hotPixel.addSnappedNode(a, i); } else return r.prototype.select.apply(this, arguments); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(t1), Pd = function() { this._li = null, this._interiorIntersections = null; var e = arguments[0]; this._li = e, this._interiorIntersections = new be(); }; Pd.prototype.processIntersections = function(e, t, n, i) { var a = this; if (e === n && t === i) return null; var o = e.getCoordinates()[t], s = e.getCoordinates()[t + 1], u = n.getCoordinates()[i], l = n.getCoordinates()[i + 1]; if (this._li.computeIntersection(o, s, u, l), this._li.hasIntersection() && this._li.isInteriorIntersection()) { for (var c = 0; c < this._li.getIntersectionNum(); c++) a._interiorIntersections.add(a._li.getIntersection(c)); e.addIntersections(this._li, t, 0), n.addIntersections(this._li, i, 1); } }; Pd.prototype.isDone = function() { return !1; }; Pd.prototype.getInteriorIntersections = function() { return this._interiorIntersections; }; Pd.prototype.interfaces_ = function() { return [bh]; }; Pd.prototype.getClass = function() { return Pd; }; var Ku = function() { this._pm = null, this._li = null, this._scaleFactor = null, this._noder = null, this._pointSnapper = null, this._nodedSegStrings = null; var e = arguments[0]; this._pm = e, this._li = new Uh(), this._li.setPrecisionModel(e), this._scaleFactor = e.getScale(); }; Ku.prototype.checkCorrectness = function(e) { var t = Mn.getNodedSubstrings(e), n = new cu(t); try { n.checkValid(); } catch (i) { if (i instanceof cW) i.printStackTrace(); else throw i; } finally { } }; Ku.prototype.getNodedSubstrings = function() { return Mn.getNodedSubstrings(this._nodedSegStrings); }; Ku.prototype.snapRound = function(e, t) { var n = this.findInteriorIntersections(e, t); this.computeIntersectionSnaps(n), this.computeVertexSnaps(e); }; Ku.prototype.findInteriorIntersections = function(e, t) { var n = new Pd(t); return this._noder.setSegmentIntersector(n), this._noder.computeNodes(e), n.getInteriorIntersections(); }; Ku.prototype.computeVertexSnaps = function() { var e = this; if (st(arguments[0], $n)) for (var t = arguments[0], n = t.iterator(); n.hasNext(); ) { var i = n.next(); e.computeVertexSnaps(i); } else if (arguments[0] instanceof Mn) for (var a = arguments[0], o = a.getCoordinates(), s = 0; s < o.length; s++) { var u = new Da(o[s], e._scaleFactor, e._li), l = e._pointSnapper.snap(u, a, s); l && a.addIntersection(o[s], s); } }; Ku.prototype.computeNodes = function(e) { this._nodedSegStrings = e, this._noder = new hR(), this._pointSnapper = new ym(this._noder.getIndex()), this.snapRound(e, this._li); }; Ku.prototype.computeIntersectionSnaps = function(e) { for (var t = this, n = e.iterator(); n.hasNext(); ) { var i = n.next(), a = new Da(i, t._scaleFactor, t._li); t._pointSnapper.snap(a); } }; Ku.prototype.interfaces_ = function() { return [Sh]; }; Ku.prototype.getClass = function() { return Ku; }; var Pi = function() { if (this._argGeom = null, this._distance = null, this._bufParams = new br(), this._resultGeometry = null, this._saveException = null, arguments.length === 1) { var e = arguments[0]; this._argGeom = e; } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; this._argGeom = t, this._bufParams = n; } }, ey = { CAP_ROUND: { configurable: !0 }, CAP_BUTT: { configurable: !0 }, CAP_FLAT: { configurable: !0 }, CAP_SQUARE: { configurable: !0 }, MAX_PRECISION_DIGITS: { configurable: !0 } }; Pi.prototype.bufferFixedPrecision = function(e) { var t = new Xc(new Ku(new Tr(1)), e.getScale()), n = new pa(this._bufParams); n.setWorkingPrecisionModel(e), n.setNoder(t), this._resultGeometry = n.buffer(this._argGeom, this._distance); }; Pi.prototype.bufferReducedPrecision = function() { var e = this; if (arguments.length === 0) { for (var t = Pi.MAX_PRECISION_DIGITS; t >= 0; t--) { try { e.bufferReducedPrecision(t); } catch (o) { if (o instanceof jl) e._saveException = o; else throw o; } finally { } if (e._resultGeometry !== null) return null; } throw this._saveException; } else if (arguments.length === 1) { var n = arguments[0], i = Pi.precisionScaleFactor(this._argGeom, this._distance, n), a = new Tr(i); this.bufferFixedPrecision(a); } }; Pi.prototype.computeGeometry = function() { if (this.bufferOriginalPrecision(), this._resultGeometry !== null) return null; var e = this._argGeom.getFactory().getPrecisionModel(); e.getType() === Tr.FIXED ? this.bufferFixedPrecision(e) : this.bufferReducedPrecision(); }; Pi.prototype.setQuadrantSegments = function(e) { this._bufParams.setQuadrantSegments(e); }; Pi.prototype.bufferOriginalPrecision = function() { try { var e = new pa(this._bufParams); this._resultGeometry = e.buffer(this._argGeom, this._distance); } catch (t) { if (t instanceof Ul) this._saveException = t; else throw t; } finally { } }; Pi.prototype.getResultGeometry = function(e) { return this._distance = e, this.computeGeometry(), this._resultGeometry; }; Pi.prototype.setEndCapStyle = function(e) { this._bufParams.setEndCapStyle(e); }; Pi.prototype.interfaces_ = function() { return []; }; Pi.prototype.getClass = function() { return Pi; }; Pi.bufferOp = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1], n = new Pi(e), i = n.getResultGeometry(t); return i; } else if (arguments.length === 3) { if (Number.isInteger(arguments[2]) && arguments[0] instanceof at && typeof arguments[1] == "number") { var a = arguments[0], o = arguments[1], s = arguments[2], u = new Pi(a); u.setQuadrantSegments(s); var l = u.getResultGeometry(o); return l; } else if (arguments[2] instanceof br && arguments[0] instanceof at && typeof arguments[1] == "number") { var c = arguments[0], f = arguments[1], h = arguments[2], p = new Pi(c, h), d = p.getResultGeometry(f); return d; } } else if (arguments.length === 4) { var v = arguments[0], g = arguments[1], m = arguments[2], y = arguments[3], _ = new Pi(v); _.setQuadrantSegments(m), _.setEndCapStyle(y); var w = _.getResultGeometry(g); return w; } }; Pi.precisionScaleFactor = function(e, t, n) { var i = e.getEnvelopeInternal(), a = go.max(Math.abs(i.getMaxX()), Math.abs(i.getMaxY()), Math.abs(i.getMinX()), Math.abs(i.getMinY())), o = t > 0 ? t : 0, s = a + 2 * o, u = Math.trunc(Math.log(s) / Math.log(10) + 1), l = n - u, c = Math.pow(10, l); return c; }; ey.CAP_ROUND.get = function() { return br.CAP_ROUND; }; ey.CAP_BUTT.get = function() { return br.CAP_FLAT; }; ey.CAP_FLAT.get = function() { return br.CAP_FLAT; }; ey.CAP_SQUARE.get = function() { return br.CAP_SQUARE; }; ey.MAX_PRECISION_DIGITS.get = function() { return 12; }; Object.defineProperties(Pi, ey); var sa = function() { this._pt = [new Z(), new Z()], this._distance = vt.NaN, this._isNull = !0; }; sa.prototype.getCoordinates = function() { return this._pt; }; sa.prototype.getCoordinate = function(e) { return this._pt[e]; }; sa.prototype.setMinimum = function() { if (arguments.length === 1) { var e = arguments[0]; this.setMinimum(e._pt[0], e._pt[1]); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; if (this._isNull) return this.initialize(t, n), null; var i = t.distance(n); i < this._distance && this.initialize(t, n, i); } }; sa.prototype.initialize = function() { if (arguments.length === 0) this._isNull = !0; else if (arguments.length === 2) { var e = arguments[0], t = arguments[1]; this._pt[0].setCoordinate(e), this._pt[1].setCoordinate(t), this._distance = e.distance(t), this._isNull = !1; } else if (arguments.length === 3) { var n = arguments[0], i = arguments[1], a = arguments[2]; this._pt[0].setCoordinate(n), this._pt[1].setCoordinate(i), this._distance = a, this._isNull = !1; } }; sa.prototype.getDistance = function() { return this._distance; }; sa.prototype.setMaximum = function() { if (arguments.length === 1) { var e = arguments[0]; this.setMaximum(e._pt[0], e._pt[1]); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; if (this._isNull) return this.initialize(t, n), null; var i = t.distance(n); i > this._distance && this.initialize(t, n, i); } }; sa.prototype.interfaces_ = function() { return []; }; sa.prototype.getClass = function() { return sa; }; var Ru = function() { }; Ru.prototype.interfaces_ = function() { return []; }; Ru.prototype.getClass = function() { return Ru; }; Ru.computeDistance = function() { if (arguments[2] instanceof sa && arguments[0] instanceof xn && arguments[1] instanceof Z) for (var e = arguments[0], t = arguments[1], n = arguments[2], i = e.getCoordinates(), a = new et(), o = 0; o < i.length - 1; o++) { a.setCoordinates(i[o], i[o + 1]); var s = a.closestPoint(t); n.setMinimum(s, t); } else if (arguments[2] instanceof sa && arguments[0] instanceof qn && arguments[1] instanceof Z) { var u = arguments[0], l = arguments[1], c = arguments[2]; Ru.computeDistance(u.getExteriorRing(), l, c); for (var f = 0; f < u.getNumInteriorRing(); f++) Ru.computeDistance(u.getInteriorRingN(f), l, c); } else if (arguments[2] instanceof sa && arguments[0] instanceof at && arguments[1] instanceof Z) { var h = arguments[0], p = arguments[1], d = arguments[2]; if (h instanceof xn) Ru.computeDistance(h, p, d); else if (h instanceof qn) Ru.computeDistance(h, p, d); else if (h instanceof va) for (var v = h, g = 0; g < v.getNumGeometries(); g++) { var m = v.getGeometryN(g); Ru.computeDistance(m, p, d); } else d.setMinimum(h.getCoordinate(), p); } else if (arguments[2] instanceof sa && arguments[0] instanceof et && arguments[1] instanceof Z) { var y = arguments[0], _ = arguments[1], w = arguments[2], x = y.closestPoint(_); w.setMinimum(x, _); } }; var Ph = function(e) { this._maxPtDist = new sa(), this._inputGeom = e || null; }, pR = { MaxPointDistanceFilter: { configurable: !0 }, MaxMidpointDistanceFilter: { configurable: !0 } }; Ph.prototype.computeMaxMidpointDistance = function(e) { var t = new qc(this._inputGeom); e.apply(t), this._maxPtDist.setMaximum(t.getMaxPointDistance()); }; Ph.prototype.computeMaxVertexDistance = function(e) { var t = new Id(this._inputGeom); e.apply(t), this._maxPtDist.setMaximum(t.getMaxPointDistance()); }; Ph.prototype.findDistance = function(e) { return this.computeMaxVertexDistance(e), this.computeMaxMidpointDistance(e), this._maxPtDist.getDistance(); }; Ph.prototype.getDistancePoints = function() { return this._maxPtDist; }; Ph.prototype.interfaces_ = function() { return []; }; Ph.prototype.getClass = function() { return Ph; }; pR.MaxPointDistanceFilter.get = function() { return Id; }; pR.MaxMidpointDistanceFilter.get = function() { return qc; }; Object.defineProperties(Ph, pR); var Id = function(e) { this._maxPtDist = new sa(), this._minPtDist = new sa(), this._geom = e || null; }; Id.prototype.filter = function(e) { this._minPtDist.initialize(), Ru.computeDistance(this._geom, e, this._minPtDist), this._maxPtDist.setMaximum(this._minPtDist); }; Id.prototype.getMaxPointDistance = function() { return this._maxPtDist; }; Id.prototype.interfaces_ = function() { return [ju]; }; Id.prototype.getClass = function() { return Id; }; var qc = function(e) { this._maxPtDist = new sa(), this._minPtDist = new sa(), this._geom = e || null; }; qc.prototype.filter = function(e, t) { if (t === 0) return null; var n = e.getCoordinate(t - 1), i = e.getCoordinate(t), a = new Z((n.x + i.x) / 2, (n.y + i.y) / 2); this._minPtDist.initialize(), Ru.computeDistance(this._geom, a, this._minPtDist), this._maxPtDist.setMaximum(this._minPtDist); }; qc.prototype.isDone = function() { return !1; }; qc.prototype.isGeometryChanged = function() { return !1; }; qc.prototype.getMaxPointDistance = function() { return this._maxPtDist; }; qc.prototype.interfaces_ = function() { return [vs]; }; qc.prototype.getClass = function() { return qc; }; var Gl = function(e) { this._comps = e || null; }; Gl.prototype.filter = function(e) { e instanceof qn && this._comps.add(e); }; Gl.prototype.interfaces_ = function() { return [au]; }; Gl.prototype.getClass = function() { return Gl; }; Gl.getPolygons = function() { if (arguments.length === 1) { var e = arguments[0]; return Gl.getPolygons(e, new be()); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; return t instanceof qn ? n.add(t) : t instanceof va && t.apply(new Gl(n)), n; } }; var Ei = function() { if (this._lines = null, this._isForcedToLineString = !1, arguments.length === 1) { var e = arguments[0]; this._lines = e; } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; this._lines = t, this._isForcedToLineString = n; } }; Ei.prototype.filter = function(e) { if (this._isForcedToLineString && e instanceof Yu) { var t = e.getFactory().createLineString(e.getCoordinateSequence()); return this._lines.add(t), null; } e instanceof xn && this._lines.add(e); }; Ei.prototype.setForceToLineString = function(e) { this._isForcedToLineString = e; }; Ei.prototype.interfaces_ = function() { return [Wl]; }; Ei.prototype.getClass = function() { return Ei; }; Ei.getGeometry = function() { if (arguments.length === 1) { var e = arguments[0]; return e.getFactory().buildGeometry(Ei.getLines(e)); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; return t.getFactory().buildGeometry(Ei.getLines(t, n)); } }; Ei.getLines = function() { if (arguments.length === 1) { var e = arguments[0]; return Ei.getLines(e, !1); } else if (arguments.length === 2) { if (st(arguments[0], $n) && st(arguments[1], $n)) { for (var t = arguments[0], n = arguments[1], i = t.iterator(); i.hasNext(); ) { var a = i.next(); Ei.getLines(a, n); } return n; } else if (arguments[0] instanceof at && typeof arguments[1] == "boolean") { var o = arguments[0], s = arguments[1], u = new be(); return o.apply(new Ei(u, s)), u; } else if (arguments[0] instanceof at && st(arguments[1], $n)) { var l = arguments[0], c = arguments[1]; return l instanceof xn ? c.add(l) : l.apply(new Ei(c)), c; } } else if (arguments.length === 3) { if (typeof arguments[2] == "boolean" && st(arguments[0], $n) && st(arguments[1], $n)) { for (var f = arguments[0], h = arguments[1], p = arguments[2], d = f.iterator(); d.hasNext(); ) { var v = d.next(); Ei.getLines(v, h, p); } return h; } else if (typeof arguments[2] == "boolean" && arguments[0] instanceof at && st(arguments[1], $n)) { var g = arguments[0], m = arguments[1], y = arguments[2]; return g.apply(new Ei(m, y)), m; } } }; var _s = function() { if (this._boundaryRule = ko.OGC_SFS_BOUNDARY_RULE, this._isIn = null, this._numBoundaries = null, arguments.length !== 0) { if (arguments.length === 1) { var e = arguments[0]; if (e === null) throw new fn("Rule must be non-null"); this._boundaryRule = e; } } }; _s.prototype.locateInternal = function() { var e = this; if (arguments[0] instanceof Z && arguments[1] instanceof qn) { var t = arguments[0], n = arguments[1]; if (n.isEmpty()) return Q.EXTERIOR; var i = n.getExteriorRing(), a = this.locateInPolygonRing(t, i); if (a === Q.EXTERIOR) return Q.EXTERIOR; if (a === Q.BOUNDARY) return Q.BOUNDARY; for (var o = 0; o < n.getNumInteriorRing(); o++) { var s = n.getInteriorRingN(o), u = e.locateInPolygonRing(t, s); if (u === Q.INTERIOR) return Q.EXTERIOR; if (u === Q.BOUNDARY) return Q.BOUNDARY; } return Q.INTERIOR; } else if (arguments[0] instanceof Z && arguments[1] instanceof xn) { var l = arguments[0], c = arguments[1]; if (!c.getEnvelopeInternal().intersects(l)) return Q.EXTERIOR; var f = c.getCoordinates(); return !c.isClosed() && (l.equals(f[0]) || l.equals(f[f.length - 1])) ? Q.BOUNDARY : Me.isOnLine(l, f) ? Q.INTERIOR : Q.EXTERIOR; } else if (arguments[0] instanceof Z && arguments[1] instanceof Za) { var h = arguments[0], p = arguments[1], d = p.getCoordinate(); return d.equals2D(h) ? Q.INTERIOR : Q.EXTERIOR; } }; _s.prototype.locateInPolygonRing = function(e, t) { return t.getEnvelopeInternal().intersects(e) ? Me.locatePointInRing(e, t.getCoordinates()) : Q.EXTERIOR; }; _s.prototype.intersects = function(e, t) { return this.locate(e, t) !== Q.EXTERIOR; }; _s.prototype.updateLocationInfo = function(e) { e === Q.INTERIOR && (this._isIn = !0), e === Q.BOUNDARY && this._numBoundaries++; }; _s.prototype.computeLocation = function(e, t) { var n = this; if (t instanceof Za && this.updateLocationInfo(this.locateInternal(e, t)), t instanceof xn) this.updateLocationInfo(this.locateInternal(e, t)); else if (t instanceof qn) this.updateLocationInfo(this.locateInternal(e, t)); else if (t instanceof Ch) for (var i = t, a = 0; a < i.getNumGeometries(); a++) { var o = i.getGeometryN(a); n.updateLocationInfo(n.locateInternal(e, o)); } else if (t instanceof Vu) for (var s = t, u = 0; u < s.getNumGeometries(); u++) { var l = s.getGeometryN(u); n.updateLocationInfo(n.locateInternal(e, l)); } else if (t instanceof va) for (var c = new Gu(t); c.hasNext(); ) { var f = c.next(); f !== t && n.computeLocation(e, f); } }; _s.prototype.locate = function(e, t) { return t.isEmpty() ? Q.EXTERIOR : t instanceof xn ? this.locateInternal(e, t) : t instanceof qn ? this.locateInternal(e, t) : (this._isIn = !1, this._numBoundaries = 0, this.computeLocation(e, t), this._boundaryRule.isInBoundary(this._numBoundaries) ? Q.BOUNDARY : this._numBoundaries > 0 || this._isIn ? Q.INTERIOR : Q.EXTERIOR); }; _s.prototype.interfaces_ = function() { return []; }; _s.prototype.getClass = function() { return _s; }; var ua = function r() { if (this._component = null, this._segIndex = null, this._pt = null, arguments.length === 2) { var e = arguments[0], t = arguments[1]; r.call(this, e, r.INSIDE_AREA, t); } else if (arguments.length === 3) { var n = arguments[0], i = arguments[1], a = arguments[2]; this._component = n, this._segIndex = i, this._pt = a; } }, IW = { INSIDE_AREA: { configurable: !0 } }; ua.prototype.isInsideArea = function() { return this._segIndex === ua.INSIDE_AREA; }; ua.prototype.getCoordinate = function() { return this._pt; }; ua.prototype.getGeometryComponent = function() { return this._component; }; ua.prototype.getSegmentIndex = function() { return this._segIndex; }; ua.prototype.interfaces_ = function() { return []; }; ua.prototype.getClass = function() { return ua; }; IW.INSIDE_AREA.get = function() { return -1; }; Object.defineProperties(ua, IW); var Oc = function(e) { this._pts = e || null; }; Oc.prototype.filter = function(e) { e instanceof Za && this._pts.add(e); }; Oc.prototype.interfaces_ = function() { return [au]; }; Oc.prototype.getClass = function() { return Oc; }; Oc.getPoints = function() { if (arguments.length === 1) { var e = arguments[0]; return e instanceof Za ? ms.singletonList(e) : Oc.getPoints(e, new be()); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; return t instanceof Za ? n.add(t) : t instanceof va && t.apply(new Oc(n)), n; } }; var Ad = function() { this._locations = null; var e = arguments[0]; this._locations = e; }; Ad.prototype.filter = function(e) { (e instanceof Za || e instanceof xn || e instanceof qn) && this._locations.add(new ua(e, 0, e.getCoordinate())); }; Ad.prototype.interfaces_ = function() { return [au]; }; Ad.prototype.getClass = function() { return Ad; }; Ad.getLocations = function(e) { var t = new be(); return e.apply(new Ad(t)), t; }; var Ri = function() { if (this._geom = null, this._terminateDistance = 0, this._ptLocator = new _s(), this._minDistanceLocation = null, this._minDistance = vt.MAX_VALUE, arguments.length === 2) { var e = arguments[0], t = arguments[1]; this._geom = [e, t], this._terminateDistance = 0; } else if (arguments.length === 3) { var n = arguments[0], i = arguments[1], a = arguments[2]; this._geom = new Array(2).fill(null), this._geom[0] = n, this._geom[1] = i, this._terminateDistance = a; } }; Ri.prototype.computeContainmentDistance = function() { var e = this; if (arguments.length === 0) { var t = new Array(2).fill(null); if (this.computeContainmentDistance(0, t), this._minDistance <= this._terminateDistance) return null; this.computeContainmentDistance(1, t); } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1], a = 1 - n, o = Gl.getPolygons(this._geom[n]); if (o.size() > 0) { var s = Ad.getLocations(this._geom[a]); if (this.computeContainmentDistance(s, o, i), this._minDistance <= this._terminateDistance) return this._minDistanceLocation[a] = i[0], this._minDistanceLocation[n] = i[1], null; } } else if (arguments.length === 3) { if (arguments[2] instanceof Array && st(arguments[0], cs) && st(arguments[1], cs)) { for (var u = arguments[0], l = arguments[1], c = arguments[2], f = 0; f < u.size(); f++) for (var h = u.get(f), p = 0; p < l.size(); p++) if (e.computeContainmentDistance(h, l.get(p), c), e._minDistance <= e._terminateDistance) return null; } else if (arguments[2] instanceof Array && arguments[0] instanceof ua && arguments[1] instanceof qn) { var d = arguments[0], v = arguments[1], g = arguments[2], m = d.getCoordinate(); if (Q.EXTERIOR !== this._ptLocator.locate(m, v)) return this._minDistance = 0, g[0] = d, g[1] = new ua(v, m), null; } } }; Ri.prototype.computeMinDistanceLinesPoints = function(e, t, n) { for (var i = this, a = 0; a < e.size(); a++) for (var o = e.get(a), s = 0; s < t.size(); s++) { var u = t.get(s); if (i.computeMinDistance(o, u, n), i._minDistance <= i._terminateDistance) return null; } }; Ri.prototype.computeFacetDistance = function() { var e = new Array(2).fill(null), t = Ei.getLines(this._geom[0]), n = Ei.getLines(this._geom[1]), i = Oc.getPoints(this._geom[0]), a = Oc.getPoints(this._geom[1]); if (this.computeMinDistanceLines(t, n, e), this.updateMinDistance(e, !1), this._minDistance <= this._terminateDistance || (e[0] = null, e[1] = null, this.computeMinDistanceLinesPoints(t, a, e), this.updateMinDistance(e, !1), this._minDistance <= this._terminateDistance) || (e[0] = null, e[1] = null, this.computeMinDistanceLinesPoints(n, i, e), this.updateMinDistance(e, !0), this._minDistance <= this._terminateDistance)) return null; e[0] = null, e[1] = null, this.computeMinDistancePoints(i, a, e), this.updateMinDistance(e, !1); }; Ri.prototype.nearestLocations = function() { return this.computeMinDistance(), this._minDistanceLocation; }; Ri.prototype.updateMinDistance = function(e, t) { if (e[0] === null) return null; t ? (this._minDistanceLocation[0] = e[1], this._minDistanceLocation[1] = e[0]) : (this._minDistanceLocation[0] = e[0], this._minDistanceLocation[1] = e[1]); }; Ri.prototype.nearestPoints = function() { this.computeMinDistance(); var e = [this._minDistanceLocation[0].getCoordinate(), this._minDistanceLocation[1].getCoordinate()]; return e; }; Ri.prototype.computeMinDistance = function() { var e = this; if (arguments.length === 0) { if (this._minDistanceLocation !== null || (this._minDistanceLocation = new Array(2).fill(null), this.computeContainmentDistance(), this._minDistance <= this._terminateDistance)) return null; this.computeFacetDistance(); } else if (arguments.length === 3) { if (arguments[2] instanceof Array && arguments[0] instanceof xn && arguments[1] instanceof Za) { var t = arguments[0], n = arguments[1], i = arguments[2]; if (t.getEnvelopeInternal().distance(n.getEnvelopeInternal()) > this._minDistance) return null; for (var a = t.getCoordinates(), o = n.getCoordinate(), s = 0; s < a.length - 1; s++) { var u = Me.distancePointLine(o, a[s], a[s + 1]); if (u < e._minDistance) { e._minDistance = u; var l = new et(a[s], a[s + 1]), c = l.closestPoint(o); i[0] = new ua(t, s, c), i[1] = new ua(n, 0, o); } if (e._minDistance <= e._terminateDistance) return null; } } else if (arguments[2] instanceof Array && arguments[0] instanceof xn && arguments[1] instanceof xn) { var f = arguments[0], h = arguments[1], p = arguments[2]; if (f.getEnvelopeInternal().distance(h.getEnvelopeInternal()) > this._minDistance) return null; for (var d = f.getCoordinates(), v = h.getCoordinates(), g = 0; g < d.length - 1; g++) for (var m = 0; m < v.length - 1; m++) { var y = Me.distanceLineLine(d[g], d[g + 1], v[m], v[m + 1]); if (y < e._minDistance) { e._minDistance = y; var _ = new et(d[g], d[g + 1]), w = new et(v[m], v[m + 1]), x = _.closestPoints(w); p[0] = new ua(f, g, x[0]), p[1] = new ua(h, m, x[1]); } if (e._minDistance <= e._terminateDistance) return null; } } } }; Ri.prototype.computeMinDistancePoints = function(e, t, n) { for (var i = this, a = 0; a < e.size(); a++) for (var o = e.get(a), s = 0; s < t.size(); s++) { var u = t.get(s), l = o.getCoordinate().distance(u.getCoordinate()); if (l < i._minDistance && (i._minDistance = l, n[0] = new ua(o, 0, o.getCoordinate()), n[1] = new ua(u, 0, u.getCoordinate())), i._minDistance <= i._terminateDistance) return null; } }; Ri.prototype.distance = function() { if (this._geom[0] === null || this._geom[1] === null) throw new fn("null geometries are not supported"); return this._geom[0].isEmpty() || this._geom[1].isEmpty() ? 0 : (this.computeMinDistance(), this._minDistance); }; Ri.prototype.computeMinDistanceLines = function(e, t, n) { for (var i = this, a = 0; a < e.size(); a++) for (var o = e.get(a), s = 0; s < t.size(); s++) { var u = t.get(s); if (i.computeMinDistance(o, u, n), i._minDistance <= i._terminateDistance) return null; } }; Ri.prototype.interfaces_ = function() { return []; }; Ri.prototype.getClass = function() { return Ri; }; Ri.distance = function(e, t) { var n = new Ri(e, t); return n.distance(); }; Ri.isWithinDistance = function(e, t, n) { var i = new Ri(e, t, n); return i.distance() <= n; }; Ri.nearestPoints = function(e, t) { var n = new Ri(e, t); return n.nearestPoints(); }; var ji = function() { this._pt = [new Z(), new Z()], this._distance = vt.NaN, this._isNull = !0; }; ji.prototype.getCoordinates = function() { return this._pt; }; ji.prototype.getCoordinate = function(e) { return this._pt[e]; }; ji.prototype.setMinimum = function() { if (arguments.length === 1) { var e = arguments[0]; this.setMinimum(e._pt[0], e._pt[1]); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; if (this._isNull) return this.initialize(t, n), null; var i = t.distance(n); i < this._distance && this.initialize(t, n, i); } }; ji.prototype.initialize = function() { if (arguments.length === 0) this._isNull = !0; else if (arguments.length === 2) { var e = arguments[0], t = arguments[1]; this._pt[0].setCoordinate(e), this._pt[1].setCoordinate(t), this._distance = e.distance(t), this._isNull = !1; } else if (arguments.length === 3) { var n = arguments[0], i = arguments[1], a = arguments[2]; this._pt[0].setCoordinate(n), this._pt[1].setCoordinate(i), this._distance = a, this._isNull = !1; } }; ji.prototype.toString = function() { return ds.toLineString(this._pt[0], this._pt[1]); }; ji.prototype.getDistance = function() { return this._distance; }; ji.prototype.setMaximum = function() { if (arguments.length === 1) { var e = arguments[0]; this.setMaximum(e._pt[0], e._pt[1]); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1]; if (this._isNull) return this.initialize(t, n), null; var i = t.distance(n); i > this._distance && this.initialize(t, n, i); } }; ji.prototype.interfaces_ = function() { return []; }; ji.prototype.getClass = function() { return ji; }; var js = function() { }; js.prototype.interfaces_ = function() { return []; }; js.prototype.getClass = function() { return js; }; js.computeDistance = function() { if (arguments[2] instanceof ji && arguments[0] instanceof xn && arguments[1] instanceof Z) for (var e = arguments[0], t = arguments[1], n = arguments[2], i = new et(), a = e.getCoordinates(), o = 0; o < a.length - 1; o++) { i.setCoordinates(a[o], a[o + 1]); var s = i.closestPoint(t); n.setMinimum(s, t); } else if (arguments[2] instanceof ji && arguments[0] instanceof qn && arguments[1] instanceof Z) { var u = arguments[0], l = arguments[1], c = arguments[2]; js.computeDistance(u.getExteriorRing(), l, c); for (var f = 0; f < u.getNumInteriorRing(); f++) js.computeDistance(u.getInteriorRingN(f), l, c); } else if (arguments[2] instanceof ji && arguments[0] instanceof at && arguments[1] instanceof Z) { var h = arguments[0], p = arguments[1], d = arguments[2]; if (h instanceof xn) js.computeDistance(h, p, d); else if (h instanceof qn) js.computeDistance(h, p, d); else if (h instanceof va) for (var v = h, g = 0; g < v.getNumGeometries(); g++) { var m = v.getGeometryN(g); js.computeDistance(m, p, d); } else d.setMinimum(h.getCoordinate(), p); } else if (arguments[2] instanceof ji && arguments[0] instanceof et && arguments[1] instanceof Z) { var y = arguments[0], _ = arguments[1], w = arguments[2], x = y.closestPoint(_); w.setMinimum(x, _); } }; var No = function() { this._g0 = null, this._g1 = null, this._ptDist = new ji(), this._densifyFrac = 0; var e = arguments[0], t = arguments[1]; this._g0 = e, this._g1 = t; }, dR = { MaxPointDistanceFilter: { configurable: !0 }, MaxDensifiedByFractionDistanceFilter: { configurable: !0 } }; No.prototype.getCoordinates = function() { return this._ptDist.getCoordinates(); }; No.prototype.setDensifyFraction = function(e) { if (e > 1 || e <= 0) throw new fn("Fraction is not in range (0.0 - 1.0]"); this._densifyFrac = e; }; No.prototype.compute = function(e, t) { this.computeOrientedDistance(e, t, this._ptDist), this.computeOrientedDistance(t, e, this._ptDist); }; No.prototype.distance = function() { return this.compute(this._g0, this._g1), this._ptDist.getDistance(); }; No.prototype.computeOrientedDistance = function(e, t, n) { var i = new Ld(t); if (e.apply(i), n.setMaximum(i.getMaxPointDistance()), this._densifyFrac > 0) { var a = new Zc(t, this._densifyFrac); e.apply(a), n.setMaximum(a.getMaxPointDistance()); } }; No.prototype.orientedDistance = function() { return this.computeOrientedDistance(this._g0, this._g1, this._ptDist), this._ptDist.getDistance(); }; No.prototype.interfaces_ = function() { return []; }; No.prototype.getClass = function() { return No; }; No.distance = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1], n = new No(e, t); return n.distance(); } else if (arguments.length === 3) { var i = arguments[0], a = arguments[1], o = arguments[2], s = new No(i, a); return s.setDensifyFraction(o), s.distance(); } }; dR.MaxPointDistanceFilter.get = function() { return Ld; }; dR.MaxDensifiedByFractionDistanceFilter.get = function() { return Zc; }; Object.defineProperties(No, dR); var Ld = function() { this._maxPtDist = new ji(), this._minPtDist = new ji(), this._euclideanDist = new js(), this._geom = null; var e = arguments[0]; this._geom = e; }; Ld.prototype.filter = function(e) { this._minPtDist.initialize(), js.computeDistance(this._geom, e, this._minPtDist), this._maxPtDist.setMaximum(this._minPtDist); }; Ld.prototype.getMaxPointDistance = function() { return this._maxPtDist; }; Ld.prototype.interfaces_ = function() { return [ju]; }; Ld.prototype.getClass = function() { return Ld; }; var Zc = function() { this._maxPtDist = new ji(), this._minPtDist = new ji(), this._geom = null, this._numSubSegs = 0; var e = arguments[0], t = arguments[1]; this._geom = e, this._numSubSegs = Math.trunc(Math.round(1 / t)); }; Zc.prototype.filter = function(e, t) { var n = this; if (t === 0) return null; for (var i = e.getCoordinate(t - 1), a = e.getCoordinate(t), o = (a.x - i.x) / this._numSubSegs, s = (a.y - i.y) / this._numSubSegs, u = 0; u < this._numSubSegs; u++) { var l = i.x + u * o, c = i.y + u * s, f = new Z(l, c); n._minPtDist.initialize(), js.computeDistance(n._geom, f, n._minPtDist), n._maxPtDist.setMaximum(n._minPtDist); } }; Zc.prototype.isDone = function() { return !1; }; Zc.prototype.isGeometryChanged = function() { return !1; }; Zc.prototype.getMaxPointDistance = function() { return this._maxPtDist; }; Zc.prototype.interfaces_ = function() { return [vs]; }; Zc.prototype.getClass = function() { return Zc; }; var qa = function(e, t, n) { this._minValidDistance = null, this._maxValidDistance = null, this._minDistanceFound = null, this._maxDistanceFound = null, this._isValid = !0, this._errMsg = null, this._errorLocation = null, this._errorIndicator = null, this._input = e || null, this._bufDistance = t || null, this._result = n || null; }, vR = { VERBOSE: { configurable: !0 }, MAX_DISTANCE_DIFF_FRAC: { configurable: !0 } }; qa.prototype.checkMaximumDistance = function(e, t, n) { var i = new No(t, e); if (i.setDensifyFraction(0.25), this._maxDistanceFound = i.orientedDistance(), this._maxDistanceFound > n) { this._isValid = !1; var a = i.getCoordinates(); this._errorLocation = a[1], this._errorIndicator = e.getFactory().createLineString(a), this._errMsg = "Distance between buffer curve and input is too large (" + this._maxDistanceFound + " at " + ds.toLineString(a[0], a[1]) + ")"; } }; qa.prototype.isValid = function() { var e = Math.abs(this._bufDistance), t = qa.MAX_DISTANCE_DIFF_FRAC * e; return this._minValidDistance = e - t, this._maxValidDistance = e + t, this._input.isEmpty() || this._result.isEmpty() ? !0 : (this._bufDistance > 0 ? this.checkPositiveValid() : this.checkNegativeValid(), qa.VERBOSE && Oi.out.println("Min Dist= " + this._minDistanceFound + " err= " + (1 - this._minDistanceFound / this._bufDistance) + " Max Dist= " + this._maxDistanceFound + " err= " + (this._maxDistanceFound / this._bufDistance - 1)), this._isValid); }; qa.prototype.checkNegativeValid = function() { if (!(this._input instanceof qn || this._input instanceof Vu || this._input instanceof va)) return null; var e = this.getPolygonLines(this._input); if (this.checkMinimumDistance(e, this._result, this._minValidDistance), !this._isValid) return null; this.checkMaximumDistance(e, this._result, this._maxValidDistance); }; qa.prototype.getErrorIndicator = function() { return this._errorIndicator; }; qa.prototype.checkMinimumDistance = function(e, t, n) { var i = new Ri(e, t, n); if (this._minDistanceFound = i.distance(), this._minDistanceFound < n) { this._isValid = !1; var a = i.nearestPoints(); this._errorLocation = i.nearestPoints()[1], this._errorIndicator = e.getFactory().createLineString(a), this._errMsg = "Distance between buffer curve and input is too small (" + this._minDistanceFound + " at " + ds.toLineString(a[0], a[1]) + " )"; } }; qa.prototype.checkPositiveValid = function() { var e = this._result.getBoundary(); if (this.checkMinimumDistance(this._input, e, this._minValidDistance), !this._isValid) return null; this.checkMaximumDistance(this._input, e, this._maxValidDistance); }; qa.prototype.getErrorLocation = function() { return this._errorLocation; }; qa.prototype.getPolygonLines = function(e) { for (var t = new be(), n = new Ei(t), i = Gl.getPolygons(e), a = i.iterator(); a.hasNext(); ) { var o = a.next(); o.apply(n); } return e.getFactory().buildGeometry(t); }; qa.prototype.getErrorMessage = function() { return this._errMsg; }; qa.prototype.interfaces_ = function() { return []; }; qa.prototype.getClass = function() { return qa; }; vR.VERBOSE.get = function() { return !1; }; vR.MAX_DISTANCE_DIFF_FRAC.get = function() { return 0.012; }; Object.defineProperties(qa, vR); var Ni = function(e, t, n) { this._isValid = !0, this._errorMsg = null, this._errorLocation = null, this._errorIndicator = null, this._input = e || null, this._distance = t || null, this._result = n || null; }, gR = { VERBOSE: { configurable: !0 }, MAX_ENV_DIFF_FRAC: { configurable: !0 } }; Ni.prototype.isValid = function() { return this.checkPolygonal(), this._isValid ? (this.checkExpectedEmpty(), this._isValid ? (this.checkEnvelope(), this._isValid ? (this.checkArea(), this._isValid ? (this.checkDistance(), this._isValid) : this._isValid) : this._isValid) : this._isValid) : this._isValid; }; Ni.prototype.checkEnvelope = function() { if (this._distance < 0) return null; var e = this._distance * Ni.MAX_ENV_DIFF_FRAC; e === 0 && (e = 1e-3); var t = new Ke(this._input.getEnvelopeInternal()); t.expandBy(this._distance); var n = new Ke(this._result.getEnvelopeInternal()); n.expandBy(e), n.contains(t) || (this._isValid = !1, this._errorMsg = "Buffer envelope is incorrect", this._errorIndicator = this._input.getFactory().toGeometry(n)), this.report("Envelope"); }; Ni.prototype.checkDistance = function() { var e = new qa(this._input, this._distance, this._result); e.isValid() || (this._isValid = !1, this._errorMsg = e.getErrorMessage(), this._errorLocation = e.getErrorLocation(), this._errorIndicator = e.getErrorIndicator()), this.report("Distance"); }; Ni.prototype.checkArea = function() { var e = this._input.getArea(), t = this._result.getArea(); this._distance > 0 && e > t && (this._isValid = !1, this._errorMsg = "Area of positive buffer is smaller than input", this._errorIndicator = this._result), this._distance < 0 && e < t && (this._isValid = !1, this._errorMsg = "Area of negative buffer is larger than input", this._errorIndicator = this._result), this.report("Area"); }; Ni.prototype.checkPolygonal = function() { this._result instanceof qn || this._result instanceof Vu || (this._isValid = !1), this._errorMsg = "Result is not polygonal", this._errorIndicator = this._result, this.report("Polygonal"); }; Ni.prototype.getErrorIndicator = function() { return this._errorIndicator; }; Ni.prototype.getErrorLocation = function() { return this._errorLocation; }; Ni.prototype.checkExpectedEmpty = function() { if (this._input.getDimension() >= 2 || this._distance > 0) return null; this._result.isEmpty() || (this._isValid = !1, this._errorMsg = "Result is non-empty", this._errorIndicator = this._result), this.report("ExpectedEmpty"); }; Ni.prototype.report = function(e) { if (!Ni.VERBOSE) return null; Oi.out.println("Check " + e + ": " + (this._isValid ? "passed" : "FAILED")); }; Ni.prototype.getErrorMessage = function() { return this._errorMsg; }; Ni.prototype.interfaces_ = function() { return []; }; Ni.prototype.getClass = function() { return Ni; }; Ni.isValidMsg = function(e, t, n) { var i = new Ni(e, t, n); return i.isValid() ? null : i.getErrorMessage(); }; Ni.isValid = function(e, t, n) { var i = new Ni(e, t, n); return !!i.isValid(); }; gR.VERBOSE.get = function() { return !1; }; gR.MAX_ENV_DIFF_FRAC.get = function() { return 0.012; }; Object.defineProperties(Ni, gR); var fu = function() { this._pts = null, this._data = null; var e = arguments[0], t = arguments[1]; this._pts = e, this._data = t; }; fu.prototype.getCoordinates = function() { return this._pts; }; fu.prototype.size = function() { return this._pts.length; }; fu.prototype.getCoordinate = function(e) { return this._pts[e]; }; fu.prototype.isClosed = function() { return this._pts[0].equals(this._pts[this._pts.length - 1]); }; fu.prototype.getSegmentOctant = function(e) { return e === this._pts.length - 1 ? -1 : bd.octant(this.getCoordinate(e), this.getCoordinate(e + 1)); }; fu.prototype.setData = function(e) { this._data = e; }; fu.prototype.getData = function() { return this._data; }; fu.prototype.toString = function() { return ds.toLineString(new An(this._pts)); }; fu.prototype.interfaces_ = function() { return [qu]; }; fu.prototype.getClass = function() { return fu; }; var pi = function() { this._findAllIntersections = !1, this._isCheckEndSegmentsOnly = !1, this._li = null, this._interiorIntersection = null, this._intSegments = null, this._intersections = new be(), this._intersectionCount = 0, this._keepIntersections = !0; var e = arguments[0]; this._li = e, this._interiorIntersection = null; }; pi.prototype.getInteriorIntersection = function() { return this._interiorIntersection; }; pi.prototype.setCheckEndSegmentsOnly = function(e) { this._isCheckEndSegmentsOnly = e; }; pi.prototype.getIntersectionSegments = function() { return this._intSegments; }; pi.prototype.count = function() { return this._intersectionCount; }; pi.prototype.getIntersections = function() { return this._intersections; }; pi.prototype.setFindAllIntersections = function(e) { this._findAllIntersections = e; }; pi.prototype.setKeepIntersections = function(e) { this._keepIntersections = e; }; pi.prototype.processIntersections = function(e, t, n, i) { if (!this._findAllIntersections && this.hasIntersection() || e === n && t === i) return null; if (this._isCheckEndSegmentsOnly) { var a = this.isEndSegment(e, t) || this.isEndSegment(n, i); if (!a) return null; } var o = e.getCoordinates()[t], s = e.getCoordinates()[t + 1], u = n.getCoordinates()[i], l = n.getCoordinates()[i + 1]; this._li.computeIntersection(o, s, u, l), this._li.hasIntersection() && this._li.isInteriorIntersection() && (this._intSegments = new Array(4).fill(null), this._intSegments[0] = o, this._intSegments[1] = s, this._intSegments[2] = u, this._intSegments[3] = l, this._interiorIntersection = this._li.getIntersection(0), this._keepIntersections && this._intersections.add(this._interiorIntersection), this._intersectionCount++); }; pi.prototype.isEndSegment = function(e, t) { return t === 0 || t >= e.size() - 2; }; pi.prototype.hasIntersection = function() { return this._interiorIntersection !== null; }; pi.prototype.isDone = function() { return this._findAllIntersections ? !1 : this._interiorIntersection !== null; }; pi.prototype.interfaces_ = function() { return [bh]; }; pi.prototype.getClass = function() { return pi; }; pi.createAllIntersectionsFinder = function(e) { var t = new pi(e); return t.setFindAllIntersections(!0), t; }; pi.createAnyIntersectionFinder = function(e) { return new pi(e); }; pi.createIntersectionCounter = function(e) { var t = new pi(e); return t.setFindAllIntersections(!0), t.setKeepIntersections(!1), t; }; var ws = function() { this._li = new Uh(), this._segStrings = null, this._findAllIntersections = !1, this._segInt = null, this._isValid = !0; var e = arguments[0]; this._segStrings = e; }; ws.prototype.execute = function() { if (this._segInt !== null) return null; this.checkInteriorIntersections(); }; ws.prototype.getIntersections = function() { return this._segInt.getIntersections(); }; ws.prototype.isValid = function() { return this.execute(), this._isValid; }; ws.prototype.setFindAllIntersections = function(e) { this._findAllIntersections = e; }; ws.prototype.checkInteriorIntersections = function() { this._isValid = !0, this._segInt = new pi(this._li), this._segInt.setFindAllIntersections(this._findAllIntersections); var e = new hR(); if (e.setSegmentIntersector(this._segInt), e.computeNodes(this._segStrings), this._segInt.hasIntersection()) return this._isValid = !1, null; }; ws.prototype.checkValid = function() { if (this.execute(), !this._isValid) throw new jl(this.getErrorMessage(), this._segInt.getInteriorIntersection()); }; ws.prototype.getErrorMessage = function() { if (this._isValid) return "no intersections found"; var e = this._segInt.getIntersectionSegments(); return "found non-noded intersection between " + ds.toLineString(e[0], e[1]) + " and " + ds.toLineString(e[2], e[3]); }; ws.prototype.interfaces_ = function() { return []; }; ws.prototype.getClass = function() { return ws; }; ws.computeIntersections = function(e) { var t = new ws(e); return t.setFindAllIntersections(!0), t.isValid(), t.getIntersections(); }; var Ih = function r() { this._nv = null; var e = arguments[0]; this._nv = new ws(r.toSegmentStrings(e)); }; Ih.prototype.checkValid = function() { this._nv.checkValid(); }; Ih.prototype.interfaces_ = function() { return []; }; Ih.prototype.getClass = function() { return Ih; }; Ih.toSegmentStrings = function(e) { for (var t = new be(), n = e.iterator(); n.hasNext(); ) { var i = n.next(); t.add(new fu(i.getCoordinates(), i)); } return t; }; Ih.checkValid = function(e) { var t = new Ih(e); t.checkValid(); }; var Dd = function(e) { this._mapOp = e; }; Dd.prototype.map = function(e) { for (var t = this, n = new be(), i = 0; i < e.getNumGeometries(); i++) { var a = t._mapOp.map(e.getGeometryN(i)); a.isEmpty() || n.add(a); } return e.getFactory().createGeometryCollection(Dt.toGeometryArray(n)); }; Dd.prototype.interfaces_ = function() { return []; }; Dd.prototype.getClass = function() { return Dd; }; Dd.map = function(e, t) { var n = new Dd(t); return n.map(e); }; var hu = function() { this._op = null, this._geometryFactory = null, this._ptLocator = null, this._lineEdgesList = new be(), this._resultLineList = new be(); var e = arguments[0], t = arguments[1], n = arguments[2]; this._op = e, this._geometryFactory = t, this._ptLocator = n; }; hu.prototype.collectLines = function(e) { for (var t = this, n = this._op.getGraph().getEdgeEnds().iterator(); n.hasNext(); ) { var i = n.next(); t.collectLineEdge(i, e, t._lineEdgesList), t.collectBoundaryTouchEdge(i, e, t._lineEdgesList); } }; hu.prototype.labelIsolatedLine = function(e, t) { var n = this._ptLocator.locate(e.getCoordinate(), this._op.getArgGeometry(t)); e.getLabel().setLocation(t, n); }; hu.prototype.build = function(e) { return this.findCoveredLineEdges(), this.collectLines(e), this.buildLines(e), this._resultLineList; }; hu.prototype.collectLineEdge = function(e, t, n) { var i = e.getLabel(), a = e.getEdge(); e.isLineEdge() && !e.isVisited() && yt.isResultOfOp(i, t) && !a.isCovered() && (n.add(a), e.setVisitedEdge(!0)); }; hu.prototype.findCoveredLineEdges = function() { for (var e = this, t = this._op.getGraph().getNodes().iterator(); t.hasNext(); ) { var n = t.next(); n.getEdges().findCoveredLineEdges(); } for (var i = this._op.getGraph().getEdgeEnds().iterator(); i.hasNext(); ) { var a = i.next(), o = a.getEdge(); if (a.isLineEdge() && !o.isCoveredSet()) { var s = e._op.isCoveredByA(a.getCoordinate()); o.setCovered(s); } } }; hu.prototype.labelIsolatedLines = function(e) { for (var t = this, n = e.iterator(); n.hasNext(); ) { var i = n.next(), a = i.getLabel(); i.isIsolated() && (a.isNull(0) ? t.labelIsolatedLine(i, 0) : t.labelIsolatedLine(i, 1)); } }; hu.prototype.buildLines = function(e) { for (var t = this, n = this._lineEdgesList.iterator(); n.hasNext(); ) { var i = n.next(), a = t._geometryFactory.createLineString(i.getCoordinates()); t._resultLineList.add(a), i.setInResult(!0); } }; hu.prototype.collectBoundaryTouchEdge = function(e, t, n) { var i = e.getLabel(); if (e.isLineEdge() || e.isVisited() || e.isInteriorAreaEdge() || e.getEdge().isInResult()) return null; Et.isTrue(!(e.isInResult() || e.getSym().isInResult()) || !e.getEdge().isInResult()), yt.isResultOfOp(i, t) && t === yt.INTERSECTION && (n.add(e.getEdge()), e.setVisitedEdge(!0)); }; hu.prototype.interfaces_ = function() { return []; }; hu.prototype.getClass = function() { return hu; }; var Md = function() { this._op = null, this._geometryFactory = null, this._resultPointList = new be(); var e = arguments[0], t = arguments[1]; this._op = e, this._geometryFactory = t; }; Md.prototype.filterCoveredNodeToPoint = function(e) { var t = e.getCoordinate(); if (!this._op.isCoveredByLA(t)) { var n = this._geometryFactory.createPoint(t); this._resultPointList.add(n); } }; Md.prototype.extractNonCoveredResultNodes = function(e) { for (var t = this, n = this._op.getGraph().getNodes().iterator(); n.hasNext(); ) { var i = n.next(); if (!i.isInResult() && !i.isIncidentEdgeInResult() && (i.getEdges().getDegree() === 0 || e === yt.INTERSECTION)) { var a = i.getLabel(); yt.isResultOfOp(a, e) && t.filterCoveredNodeToPoint(i); } } }; Md.prototype.build = function(e) { return this.extractNonCoveredResultNodes(e), this._resultPointList; }; Md.prototype.interfaces_ = function() { return []; }; Md.prototype.getClass = function() { return Md; }; var Ma = function() { this._inputGeom = null, this._factory = null, this._pruneEmptyGeometry = !0, this._preserveGeometryCollectionType = !0, this._preserveCollections = !1, this._preserveType = !1; }; Ma.prototype.transformPoint = function(e, t) { return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(), e)); }; Ma.prototype.transformPolygon = function(e, t) { var n = this, i = !0, a = this.transformLinearRing(e.getExteriorRing(), e); (a === null || !(a instanceof Yu) || a.isEmpty()) && (i = !1); for (var o = new be(), s = 0; s < e.getNumInteriorRing(); s++) { var u = n.transformLinearRing(e.getInteriorRingN(s), e); u === null || u.isEmpty() || (u instanceof Yu || (i = !1), o.add(u)); } if (i) return this._factory.createPolygon(a, o.toArray([])); var l = new be(); return a !== null && l.add(a), l.addAll(o), this._factory.buildGeometry(l); }; Ma.prototype.createCoordinateSequence = function(e) { return this._factory.getCoordinateSequenceFactory().create(e); }; Ma.prototype.getInputGeometry = function() { return this._inputGeom; }; Ma.prototype.transformMultiLineString = function(e, t) { for (var n = this, i = new be(), a = 0; a < e.getNumGeometries(); a++) { var o = n.transformLineString(e.getGeometryN(a), e); o !== null && (o.isEmpty() || i.add(o)); } return this._factory.buildGeometry(i); }; Ma.prototype.transformCoordinates = function(e, t) { return this.copy(e); }; Ma.prototype.transformLineString = function(e, t) { return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(), e)); }; Ma.prototype.transformMultiPoint = function(e, t) { for (var n = this, i = new be(), a = 0; a < e.getNumGeometries(); a++) { var o = n.transformPoint(e.getGeometryN(a), e); o !== null && (o.isEmpty() || i.add(o)); } return this._factory.buildGeometry(i); }; Ma.prototype.transformMultiPolygon = function(e, t) { for (var n = this, i = new be(), a = 0; a < e.getNumGeometries(); a++) { var o = n.transformPolygon(e.getGeometryN(a), e); o !== null && (o.isEmpty() || i.add(o)); } return this._factory.buildGeometry(i); }; Ma.prototype.copy = function(e) { return e.copy(); }; Ma.prototype.transformGeometryCollection = function(e, t) { for (var n = this, i = new be(), a = 0; a < e.getNumGeometries(); a++) { var o = n.transform(e.getGeometryN(a)); o !== null && (n._pruneEmptyGeometry && o.isEmpty() || i.add(o)); } return this._preserveGeometryCollectionType ? this._factory.createGeometryCollection(Dt.toGeometryArray(i)) : this._factory.buildGeometry(i); }; Ma.prototype.transform = function(e) { if (this._inputGeom = e, this._factory = e.getFactory(), e instanceof Za) return this.transformPoint(e, null); if (e instanceof pm) return this.transformMultiPoint(e, null); if (e instanceof Yu) return this.transformLinearRing(e, null); if (e instanceof xn) return this.transformLineString(e, null); if (e instanceof Ch) return this.transformMultiLineString(e, null); if (e instanceof qn) return this.transformPolygon(e, null); if (e instanceof Vu) return this.transformMultiPolygon(e, null); if (e instanceof va) return this.transformGeometryCollection(e, null); throw new fn("Unknown Geometry subtype: " + e.getClass().getName()); }; Ma.prototype.transformLinearRing = function(e, t) { var n = this.transformCoordinates(e.getCoordinateSequence(), e); if (n === null) return this._factory.createLinearRing(null); var i = n.size(); return i > 0 && i < 4 && !this._preserveType ? this._factory.createLineString(n) : this._factory.createLinearRing(n); }; Ma.prototype.interfaces_ = function() { return []; }; Ma.prototype.getClass = function() { return Ma; }; var Ju = function r() { if (this._snapTolerance = 0, this._srcPts = null, this._seg = new et(), this._allowSnappingToSourceVertices = !1, this._isClosed = !1, arguments[0] instanceof xn && typeof arguments[1] == "number") { var e = arguments[0], t = arguments[1]; r.call(this, e.getCoordinates(), t); } else if (arguments[0] instanceof Array && typeof arguments[1] == "number") { var n = arguments[0], i = arguments[1]; this._srcPts = n, this._isClosed = r.isClosed(n), this._snapTolerance = i; } }; Ju.prototype.snapVertices = function(e, t) { for (var n = this, i = this._isClosed ? e.size() - 1 : e.size(), a = 0; a < i; a++) { var o = e.get(a), s = n.findSnapForVertex(o, t); s !== null && (e.set(a, new Z(s)), a === 0 && n._isClosed && e.set(e.size() - 1, new Z(s))); } }; Ju.prototype.findSnapForVertex = function(e, t) { for (var n = this, i = 0; i < t.length; i++) { if (e.equals2D(t[i])) return null; if (e.distance(t[i]) < n._snapTolerance) return t[i]; } return null; }; Ju.prototype.snapTo = function(e) { var t = new rw(this._srcPts); this.snapVertices(t, e), this.snapSegments(t, e); var n = t.toCoordinateArray(); return n; }; Ju.prototype.snapSegments = function(e, t) { var n = this; if (t.length === 0) return null; var i = t.length; t[0].equals2D(t[t.length - 1]) && (i = t.length - 1); for (var a = 0; a < i; a++) { var o = t[a], s = n.findSegmentIndexToSnap(o, e); s >= 0 && e.add(s + 1, new Z(o), !1); } }; Ju.prototype.findSegmentIndexToSnap = function(e, t) { for (var n = this, i = vt.MAX_VALUE, a = -1, o = 0; o < t.size() - 1; o++) { if (n._seg.p0 = t.get(o), n._seg.p1 = t.get(o + 1), n._seg.p0.equals2D(e) || n._seg.p1.equals2D(e)) { if (n._allowSnappingToSourceVertices) continue; return -1; } var s = n._seg.distance(e); s < n._snapTolerance && s < i && (i = s, a = o); } return a; }; Ju.prototype.setAllowSnappingToSourceVertices = function(e) { this._allowSnappingToSourceVertices = e; }; Ju.prototype.interfaces_ = function() { return []; }; Ju.prototype.getClass = function() { return Ju; }; Ju.isClosed = function(e) { return e.length <= 1 ? !1 : e[0].equals2D(e[e.length - 1]); }; var Ln = function(e) { this._srcGeom = e || null; }, AW = { SNAP_PRECISION_FACTOR: { configurable: !0 } }; Ln.prototype.snapTo = function(e, t) { var n = this.extractTargetCoordinates(e), i = new LW(t, n); return i.transform(this._srcGeom); }; Ln.prototype.snapToSelf = function(e, t) { var n = this.extractTargetCoordinates(this._srcGeom), i = new LW(e, n, !0), a = i.transform(this._srcGeom), o = a; return t && st(o, Uc) && (o = a.buffer(0)), o; }; Ln.prototype.computeSnapTolerance = function(e) { var t = this.computeMinimumSegmentLength(e), n = t / 10; return n; }; Ln.prototype.extractTargetCoordinates = function(e) { for (var t = new iu(), n = e.getCoordinates(), i = 0; i < n.length; i++) t.add(n[i]); return t.toArray(new Array(0).fill(null)); }; Ln.prototype.computeMinimumSegmentLength = function(e) { for (var t = vt.MAX_VALUE, n = 0; n < e.length - 1; n++) { var i = e[n].distance(e[n + 1]); i < t && (t = i); } return t; }; Ln.prototype.interfaces_ = function() { return []; }; Ln.prototype.getClass = function() { return Ln; }; Ln.snap = function(e, t, n) { var i = new Array(2).fill(null), a = new Ln(e); i[0] = a.snapTo(t, n); var o = new Ln(t); return i[1] = o.snapTo(i[0], n), i; }; Ln.computeOverlaySnapTolerance = function() { if (arguments.length === 1) { var e = arguments[0], t = Ln.computeSizeBasedSnapTolerance(e), n = e.getPrecisionModel(); if (n.getType() === Tr.FIXED) { var i = 1 / n.getScale() * 2 / 1.415; i > t && (t = i); } return t; } else if (arguments.length === 2) { var a = arguments[0], o = arguments[1]; return Math.min(Ln.computeOverlaySnapTolerance(a), Ln.computeOverlaySnapTolerance(o)); } }; Ln.computeSizeBasedSnapTolerance = function(e) { var t = e.getEnvelopeInternal(), n = Math.min(t.getHeight(), t.getWidth()), i = n * Ln.SNAP_PRECISION_FACTOR; return i; }; Ln.snapToSelf = function(e, t, n) { var i = new Ln(e); return i.snapToSelf(t, n); }; AW.SNAP_PRECISION_FACTOR.get = function() { return 1e-9; }; Object.defineProperties(Ln, AW); var LW = function(r) { function e(t, n, i) { r.call(this), this._snapTolerance = t || null, this._snapPts = n || null, this._isSelfSnap = i !== void 0 ? i : !1; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.snapLine = function(n, i) { var a = new Ju(n, this._snapTolerance); return a.setAllowSnappingToSourceVertices(this._isSelfSnap), a.snapTo(i); }, e.prototype.transformCoordinates = function(n, i) { var a = n.toCoordinateArray(), o = this.snapLine(a, this._snapPts); return this._factory.getCoordinateSequenceFactory().create(o); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Ma), oa = function() { this._isFirst = !0, this._commonMantissaBitsCount = 53, this._commonBits = 0, this._commonSignExp = null; }; oa.prototype.getCommon = function() { return vt.longBitsToDouble(this._commonBits); }; oa.prototype.add = function(e) { var t = vt.doubleToLongBits(e); if (this._isFirst) return this._commonBits = t, this._commonSignExp = oa.signExpBits(this._commonBits), this._isFirst = !1, null; var n = oa.signExpBits(t); if (n !== this._commonSignExp) return this._commonBits = 0, null; this._commonMantissaBitsCount = oa.numCommonMostSigMantissaBits(this._commonBits, t), this._commonBits = oa.zeroLowerBits(this._commonBits, 64 - (12 + this._commonMantissaBitsCount)); }; oa.prototype.toString = function() { if (arguments.length === 1) { var e = arguments[0], t = vt.longBitsToDouble(e), n = vt.toBinaryString(e), i = "0000000000000000000000000000000000000000000000000000000000000000" + n, a = i.substring(i.length - 64), o = a.substring(0, 1) + " " + a.substring(1, 12) + "(exp) " + a.substring(12) + " [ " + t + " ]"; return o; } }; oa.prototype.interfaces_ = function() { return []; }; oa.prototype.getClass = function() { return oa; }; oa.getBit = function(e, t) { var n = 1 << t; return (e & n) !== 0 ? 1 : 0; }; oa.signExpBits = function(e) { return e >> 52; }; oa.zeroLowerBits = function(e, t) { var n = (1 << t) - 1, i = ~n, a = e & i; return a; }; oa.numCommonMostSigMantissaBits = function(e, t) { for (var n = 0, i = 52; i >= 0; i--) { if (oa.getBit(e, i) !== oa.getBit(t, i)) return n; n++; } return 52; }; var Kc = function() { this._commonCoord = null, this._ccFilter = new Od(); }, mR = { CommonCoordinateFilter: { configurable: !0 }, Translater: { configurable: !0 } }; Kc.prototype.addCommonBits = function(e) { var t = new Jc(this._commonCoord); e.apply(t), e.geometryChanged(); }; Kc.prototype.removeCommonBits = function(e) { if (this._commonCoord.x === 0 && this._commonCoord.y === 0) return e; var t = new Z(this._commonCoord); t.x = -t.x, t.y = -t.y; var n = new Jc(t); return e.apply(n), e.geometryChanged(), e; }; Kc.prototype.getCommonCoordinate = function() { return this._commonCoord; }; Kc.prototype.add = function(e) { e.apply(this._ccFilter), this._commonCoord = this._ccFilter.getCommonCoordinate(); }; Kc.prototype.interfaces_ = function() { return []; }; Kc.prototype.getClass = function() { return Kc; }; mR.CommonCoordinateFilter.get = function() { return Od; }; mR.Translater.get = function() { return Jc; }; Object.defineProperties(Kc, mR); var Od = function() { this._commonBitsX = new oa(), this._commonBitsY = new oa(); }; Od.prototype.filter = function(e) { this._commonBitsX.add(e.x), this._commonBitsY.add(e.y); }; Od.prototype.getCommonCoordinate = function() { return new Z(this._commonBitsX.getCommon(), this._commonBitsY.getCommon()); }; Od.prototype.interfaces_ = function() { return [ju]; }; Od.prototype.getClass = function() { return Od; }; var Jc = function() { this.trans = null; var e = arguments[0]; this.trans = e; }; Jc.prototype.filter = function(e, t) { var n = e.getOrdinate(t, 0) + this.trans.x, i = e.getOrdinate(t, 1) + this.trans.y; e.setOrdinate(t, 0, n), e.setOrdinate(t, 1, i); }; Jc.prototype.isDone = function() { return !1; }; Jc.prototype.isGeometryChanged = function() { return !0; }; Jc.prototype.interfaces_ = function() { return [vs]; }; Jc.prototype.getClass = function() { return Jc; }; var di = function(e, t) { this._geom = new Array(2).fill(null), this._snapTolerance = null, this._cbr = null, this._geom[0] = e, this._geom[1] = t, this.computeSnapTolerance(); }; di.prototype.selfSnap = function(e) { var t = new Ln(e), n = t.snapTo(e, this._snapTolerance); return n; }; di.prototype.removeCommonBits = function(e) { this._cbr = new Kc(), this._cbr.add(e[0]), this._cbr.add(e[1]); var t = new Array(2).fill(null); return t[0] = this._cbr.removeCommonBits(e[0].copy()), t[1] = this._cbr.removeCommonBits(e[1].copy()), t; }; di.prototype.prepareResult = function(e) { return this._cbr.addCommonBits(e), e; }; di.prototype.getResultGeometry = function(e) { var t = this.snap(this._geom), n = yt.overlayOp(t[0], t[1], e); return this.prepareResult(n); }; di.prototype.checkValid = function(e) { e.isValid() || Oi.out.println("Snapped geometry is invalid"); }; di.prototype.computeSnapTolerance = function() { this._snapTolerance = Ln.computeOverlaySnapTolerance(this._geom[0], this._geom[1]); }; di.prototype.snap = function(e) { var t = this.removeCommonBits(e), n = Ln.snap(t[0], t[1], this._snapTolerance); return n; }; di.prototype.interfaces_ = function() { return []; }; di.prototype.getClass = function() { return di; }; di.overlayOp = function(e, t, n) { var i = new di(e, t); return i.getResultGeometry(n); }; di.union = function(e, t) { return di.overlayOp(e, t, yt.UNION); }; di.intersection = function(e, t) { return di.overlayOp(e, t, yt.INTERSECTION); }; di.symDifference = function(e, t) { return di.overlayOp(e, t, yt.SYMDIFFERENCE); }; di.difference = function(e, t) { return di.overlayOp(e, t, yt.DIFFERENCE); }; var ya = function(e, t) { this._geom = new Array(2).fill(null), this._geom[0] = e, this._geom[1] = t; }; ya.prototype.getResultGeometry = function(e) { var t = null, n = !1, i = null; try { t = yt.overlayOp(this._geom[0], this._geom[1], e); var a = !0; a && (n = !0); } catch (o) { if (o instanceof Ul) i = o; else throw o; } finally { } if (!n) try { t = di.overlayOp(this._geom[0], this._geom[1], e); } catch (o) { throw o instanceof Ul ? i : o; } finally { } return t; }; ya.prototype.interfaces_ = function() { return []; }; ya.prototype.getClass = function() { return ya; }; ya.overlayOp = function(e, t, n) { var i = new ya(e, t); return i.getResultGeometry(n); }; ya.union = function(e, t) { return ya.overlayOp(e, t, yt.UNION); }; ya.intersection = function(e, t) { return ya.overlayOp(e, t, yt.INTERSECTION); }; ya.symDifference = function(e, t) { return ya.overlayOp(e, t, yt.SYMDIFFERENCE); }; ya.difference = function(e, t) { return ya.overlayOp(e, t, yt.DIFFERENCE); }; var r1 = function() { this.mce = null, this.chainIndex = null; var e = arguments[0], t = arguments[1]; this.mce = e, this.chainIndex = t; }; r1.prototype.computeIntersections = function(e, t) { this.mce.computeIntersectsForChain(this.chainIndex, e.mce, e.chainIndex, t); }; r1.prototype.interfaces_ = function() { return []; }; r1.prototype.getClass = function() { return r1; }; var Qa = function r() { if (this._label = null, this._xValue = null, this._eventType = null, this._insertEvent = null, this._deleteEventIndex = null, this._obj = null, arguments.length === 2) { var e = arguments[0], t = arguments[1]; this._eventType = r.DELETE, this._xValue = e, this._insertEvent = t; } else if (arguments.length === 3) { var n = arguments[0], i = arguments[1], a = arguments[2]; this._eventType = r.INSERT, this._label = n, this._xValue = i, this._obj = a; } }, yR = { INSERT: { configurable: !0 }, DELETE: { configurable: !0 } }; Qa.prototype.isDelete = function() { return this._eventType === Qa.DELETE; }; Qa.prototype.setDeleteEventIndex = function(e) { this._deleteEventIndex = e; }; Qa.prototype.getObject = function() { return this._obj; }; Qa.prototype.compareTo = function(e) { var t = e; return this._xValue < t._xValue ? -1 : this._xValue > t._xValue ? 1 : this._eventType < t._eventType ? -1 : this._eventType > t._eventType ? 1 : 0; }; Qa.prototype.getInsertEvent = function() { return this._insertEvent; }; Qa.prototype.isInsert = function() { return this._eventType === Qa.INSERT; }; Qa.prototype.isSameLabel = function(e) { return this._label === null ? !1 : this._label === e._label; }; Qa.prototype.getDeleteEventIndex = function() { return this._deleteEventIndex; }; Qa.prototype.interfaces_ = function() { return [Uo]; }; Qa.prototype.getClass = function() { return Qa; }; yR.INSERT.get = function() { return 1; }; yR.DELETE.get = function() { return 2; }; Object.defineProperties(Qa, yR); var kS = function() { }; kS.prototype.interfaces_ = function() { return []; }; kS.prototype.getClass = function() { return kS; }; var Fi = function() { this._hasIntersection = !1, this._hasProper = !1, this._hasProperInterior = !1, this._properIntersectionPoint = null, this._li = null, this._includeProper = null, this._recordIsolated = null, this._isSelfIntersection = null, this._numIntersections = 0, this.numTests = 0, this._bdyNodes = null, this._isDone = !1, this._isDoneWhenProperInt = !1; var e = arguments[0], t = arguments[1], n = arguments[2]; this._li = e, this._includeProper = t, this._recordIsolated = n; }; Fi.prototype.isTrivialIntersection = function(e, t, n, i) { if (e === n && this._li.getIntersectionNum() === 1) { if (Fi.isAdjacentSegments(t, i)) return !0; if (e.isClosed()) { var a = e.getNumPoints() - 1; if (t === 0 && i === a || i === 0 && t === a) return !0; } } return !1; }; Fi.prototype.getProperIntersectionPoint = function() { return this._properIntersectionPoint; }; Fi.prototype.setIsDoneIfProperInt = function(e) { this._isDoneWhenProperInt = e; }; Fi.prototype.hasProperInteriorIntersection = function() { return this._hasProperInterior; }; Fi.prototype.isBoundaryPointInternal = function(e, t) { for (var n = t.iterator(); n.hasNext(); ) { var i = n.next(), a = i.getCoordinate(); if (e.isIntersection(a)) return !0; } return !1; }; Fi.prototype.hasProperIntersection = function() { return this._hasProper; }; Fi.prototype.hasIntersection = function() { return this._hasIntersection; }; Fi.prototype.isDone = function() { return this._isDone; }; Fi.prototype.isBoundaryPoint = function(e, t) { return t === null ? !1 : !!(this.isBoundaryPointInternal(e, t[0]) || this.isBoundaryPointInternal(e, t[1])); }; Fi.prototype.setBoundaryNodes = function(e, t) { this._bdyNodes = new Array(2).fill(null), this._bdyNodes[0] = e, this._bdyNodes[1] = t; }; Fi.prototype.addIntersections = function(e, t, n, i) { if (e === n && t === i) return null; this.numTests++; var a = e.getCoordinates()[t], o = e.getCoordinates()[t + 1], s = n.getCoordinates()[i], u = n.getCoordinates()[i + 1]; this._li.computeIntersection(a, o, s, u), this._li.hasIntersection() && (this._recordIsolated && (e.setIsolated(!1), n.setIsolated(!1)), this._numIntersections++, this.isTrivialIntersection(e, t, n, i) || (this._hasIntersection = !0, (this._includeProper || !this._li.isProper()) && (e.addIntersections(this._li, t, 0), n.addIntersections(this._li, i, 1)), this._li.isProper() && (this._properIntersectionPoint = this._li.getIntersection(0).copy(), this._hasProper = !0, this._isDoneWhenProperInt && (this._isDone = !0), this.isBoundaryPoint(this._li, this._bdyNodes) || (this._hasProperInterior = !0)))); }; Fi.prototype.interfaces_ = function() { return []; }; Fi.prototype.getClass = function() { return Fi; }; Fi.isAdjacentSegments = function(e, t) { return Math.abs(e - t) === 1; }; var Kfe = function(r) { function e() { r.call(this), this.events = new be(), this.nOverlaps = null; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.prepareEvents = function() { var n = this; ms.sort(this.events); for (var i = 0; i < this.events.size(); i++) { var a = n.events.get(i); a.isDelete() && a.getInsertEvent().setDeleteEventIndex(i); } }, e.prototype.computeIntersections = function() { var n = this; if (arguments.length === 1) { var i = arguments[0]; this.nOverlaps = 0, this.prepareEvents(); for (var a = 0; a < this.events.size(); a++) { var o = n.events.get(a); if (o.isInsert() && n.processOverlaps(a, o.getDeleteEventIndex(), o, i), i.isDone()) break; } } else if (arguments.length === 3) { if (arguments[2] instanceof Fi && st(arguments[0], cs) && st(arguments[1], cs)) { var s = arguments[0], u = arguments[1], l = arguments[2]; this.addEdges(s, s), this.addEdges(u, u), this.computeIntersections(l); } else if (typeof arguments[2] == "boolean" && st(arguments[0], cs) && arguments[1] instanceof Fi) { var c = arguments[0], f = arguments[1], h = arguments[2]; h ? this.addEdges(c, null) : this.addEdges(c), this.computeIntersections(f); } } }, e.prototype.addEdge = function(n, i) { for (var a = this, o = n.getMonotoneChainEdge(), s = o.getStartIndexes(), u = 0; u < s.length - 1; u++) { var l = new r1(o, u), c = new Qa(i, o.getMinX(u), l); a.events.add(c), a.events.add(new Qa(o.getMaxX(u), c)); } }, e.prototype.processOverlaps = function(n, i, a, o) { for (var s = this, u = a.getObject(), l = n; l < i; l++) { var c = s.events.get(l); if (c.isInsert()) { var f = c.getObject(); a.isSameLabel(c) || (u.computeIntersections(f, o), s.nOverlaps++); } } }, e.prototype.addEdges = function() { var n = this; if (arguments.length === 1) for (var i = arguments[0], a = i.iterator(); a.hasNext(); ) { var o = a.next(); n.addEdge(o, o); } else if (arguments.length === 2) for (var s = arguments[0], u = arguments[1], l = s.iterator(); l.hasNext(); ) { var c = l.next(); n.addEdge(c, u); } }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(kS), Qu = function() { this._min = vt.POSITIVE_INFINITY, this._max = vt.NEGATIVE_INFINITY; }, DW = { NodeComparator: { configurable: !0 } }; Qu.prototype.getMin = function() { return this._min; }; Qu.prototype.intersects = function(e, t) { return !(this._min > t || this._max < e); }; Qu.prototype.getMax = function() { return this._max; }; Qu.prototype.toString = function() { return ds.toLineString(new Z(this._min, 0), new Z(this._max, 0)); }; Qu.prototype.interfaces_ = function() { return []; }; Qu.prototype.getClass = function() { return Qu; }; DW.NodeComparator.get = function() { return n1; }; Object.defineProperties(Qu, DW); var n1 = function() { }; n1.prototype.compare = function(e, t) { var n = e, i = t, a = (n._min + n._max) / 2, o = (i._min + i._max) / 2; return a < o ? -1 : a > o ? 1 : 0; }; n1.prototype.interfaces_ = function() { return [om]; }; n1.prototype.getClass = function() { return n1; }; var Jfe = function(r) { function e() { r.call(this), this._item = null; var t = arguments[0], n = arguments[1], i = arguments[2]; this._min = t, this._max = n, this._item = i; } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.query = function(n, i, a) { if (!this.intersects(n, i)) return null; a.visitItem(this._item); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Qu), Qfe = function(r) { function e() { r.call(this), this._node1 = null, this._node2 = null; var t = arguments[0], n = arguments[1]; this._node1 = t, this._node2 = n, this.buildExtent(this._node1, this._node2); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.buildExtent = function(n, i) { this._min = Math.min(n._min, i._min), this._max = Math.max(n._max, i._max); }, e.prototype.query = function(n, i, a) { if (!this.intersects(n, i)) return null; this._node1 !== null && this._node1.query(n, i, a), this._node2 !== null && this._node2.query(n, i, a); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Qu), el = function() { this._leaves = new be(), this._root = null, this._level = 0; }; el.prototype.buildTree = function() { var e = this; ms.sort(this._leaves, new Qu.NodeComparator()); for (var t = this._leaves, n = null, i = new be(); ; ) { if (e.buildLevel(t, i), i.size() === 1) return i.get(0); n = t, t = i, i = n; } }; el.prototype.insert = function(e, t, n) { if (this._root !== null) throw new Error("Index cannot be added to once it has been queried"); this._leaves.add(new Jfe(e, t, n)); }; el.prototype.query = function(e, t, n) { this.init(), this._root.query(e, t, n); }; el.prototype.buildRoot = function() { if (this._root !== null) return null; this._root = this.buildTree(); }; el.prototype.printNode = function(e) { Oi.out.println(ds.toLineString(new Z(e._min, this._level), new Z(e._max, this._level))); }; el.prototype.init = function() { if (this._root !== null) return null; this.buildRoot(); }; el.prototype.buildLevel = function(e, t) { this._level++, t.clear(); for (var n = 0; n < e.size(); n += 2) { var i = e.get(n), a = n + 1 < e.size() ? e.get(n) : null; if (a === null) t.add(i); else { var o = new Qfe(e.get(n), e.get(n + 1)); t.add(o); } } }; el.prototype.interfaces_ = function() { return []; }; el.prototype.getClass = function() { return el; }; var _m = function() { this._items = new be(); }; _m.prototype.visitItem = function(e) { this._items.add(e); }; _m.prototype.getItems = function() { return this._items; }; _m.prototype.interfaces_ = function() { return [Wc]; }; _m.prototype.getClass = function() { return _m; }; var wm = function() { this._index = null; var e = arguments[0]; if (!st(e, Uc)) throw new fn("Argument must be Polygonal"); this._index = new Ah(e); }, _R = { SegmentVisitor: { configurable: !0 }, IntervalIndexedGeometry: { configurable: !0 } }; wm.prototype.locate = function(e) { var t = new eu(e), n = new xm(t); return this._index.query(e.y, e.y, n), t.getLocation(); }; wm.prototype.interfaces_ = function() { return [mm]; }; wm.prototype.getClass = function() { return wm; }; _R.SegmentVisitor.get = function() { return xm; }; _R.IntervalIndexedGeometry.get = function() { return Ah; }; Object.defineProperties(wm, _R); var xm = function() { this._counter = null; var e = arguments[0]; this._counter = e; }; xm.prototype.visitItem = function(e) { var t = e; this._counter.countSegment(t.getCoordinate(0), t.getCoordinate(1)); }; xm.prototype.interfaces_ = function() { return [Wc]; }; xm.prototype.getClass = function() { return xm; }; var Ah = function() { this._index = new el(); var e = arguments[0]; this.init(e); }; Ah.prototype.init = function(e) { for (var t = this, n = Ei.getLines(e), i = n.iterator(); i.hasNext(); ) { var a = i.next(), o = a.getCoordinates(); t.addLine(o); } }; Ah.prototype.addLine = function(e) { for (var t = this, n = 1; n < e.length; n++) { var i = new et(e[n - 1], e[n]), a = Math.min(i.p0.y, i.p1.y), o = Math.max(i.p0.y, i.p1.y); t._index.insert(a, o, i); } }; Ah.prototype.query = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1], n = new _m(); return this._index.query(e, t, n), n.getItems(); } else if (arguments.length === 3) { var i = arguments[0], a = arguments[1], o = arguments[2]; this._index.query(i, a, o); } }; Ah.prototype.interfaces_ = function() { return []; }; Ah.prototype.getClass = function() { return Ah; }; var Zy = function(r) { function e() { if (r.call(this), this._parentGeom = null, this._lineEdgeMap = new dW(), this._boundaryNodeRule = null, this._useBoundaryDeterminationRule = !0, this._argIndex = null, this._boundaryNodes = null, this._hasTooFewPoints = !1, this._invalidPoint = null, this._areaPtLocator = null, this._ptLocator = new _s(), arguments.length === 2) { var t = arguments[0], n = arguments[1], i = ko.OGC_SFS_BOUNDARY_RULE; this._argIndex = t, this._parentGeom = n, this._boundaryNodeRule = i, n !== null && this.add(n); } else if (arguments.length === 3) { var a = arguments[0], o = arguments[1], s = arguments[2]; this._argIndex = a, this._parentGeom = o, this._boundaryNodeRule = s, o !== null && this.add(o); } } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.insertBoundaryPoint = function(n, i) { var a = this._nodes.addNode(i), o = a.getLabel(), s = 1, u = Q.NONE; u = o.getLocation(n, _e.ON), u === Q.BOUNDARY && s++; var l = e.determineBoundary(this._boundaryNodeRule, s); o.setLocation(n, l); }, e.prototype.computeSelfNodes = function() { if (arguments.length === 2) { var n = arguments[0], i = arguments[1]; return this.computeSelfNodes(n, i, !1); } else if (arguments.length === 3) { var a = arguments[0], o = arguments[1], s = arguments[2], u = new Fi(a, !0, !1); u.setIsDoneIfProperInt(s); var l = this.createEdgeSetIntersector(), c = this._parentGeom instanceof Yu || this._parentGeom instanceof qn || this._parentGeom instanceof Vu, f = o || !c; return l.computeIntersections(this._edges, u, f), this.addSelfIntersectionNodes(this._argIndex), u; } }, e.prototype.computeSplitEdges = function(n) { for (var i = this._edges.iterator(); i.hasNext(); ) { var a = i.next(); a.eiList.addSplitEdges(n); } }, e.prototype.computeEdgeIntersections = function(n, i, a) { var o = new Fi(i, a, !0); o.setBoundaryNodes(this.getBoundaryNodes(), n.getBoundaryNodes()); var s = this.createEdgeSetIntersector(); return s.computeIntersections(this._edges, n._edges, o), o; }, e.prototype.getGeometry = function() { return this._parentGeom; }, e.prototype.getBoundaryNodeRule = function() { return this._boundaryNodeRule; }, e.prototype.hasTooFewPoints = function() { return this._hasTooFewPoints; }, e.prototype.addPoint = function() { if (arguments[0] instanceof Za) { var n = arguments[0], i = n.getCoordinate(); this.insertPoint(this._argIndex, i, Q.INTERIOR); } else if (arguments[0] instanceof Z) { var a = arguments[0]; this.insertPoint(this._argIndex, a, Q.INTERIOR); } }, e.prototype.addPolygon = function(n) { var i = this; this.addPolygonRing(n.getExteriorRing(), Q.EXTERIOR, Q.INTERIOR); for (var a = 0; a < n.getNumInteriorRing(); a++) { var o = n.getInteriorRingN(a); i.addPolygonRing(o, Q.INTERIOR, Q.EXTERIOR); } }, e.prototype.addEdge = function(n) { this.insertEdge(n); var i = n.getCoordinates(); this.insertPoint(this._argIndex, i[0], Q.BOUNDARY), this.insertPoint(this._argIndex, i[i.length - 1], Q.BOUNDARY); }, e.prototype.addLineString = function(n) { var i = Mt.removeRepeatedPoints(n.getCoordinates()); if (i.length < 2) return this._hasTooFewPoints = !0, this._invalidPoint = i[0], null; var a = new BS(i, new Or(this._argIndex, Q.INTERIOR)); this._lineEdgeMap.put(n, a), this.insertEdge(a), Et.isTrue(i.length >= 2, "found LineString with single point"), this.insertBoundaryPoint(this._argIndex, i[0]), this.insertBoundaryPoint(this._argIndex, i[i.length - 1]); }, e.prototype.getInvalidPoint = function() { return this._invalidPoint; }, e.prototype.getBoundaryPoints = function() { for (var n = this.getBoundaryNodes(), i = new Array(n.size()).fill(null), a = 0, o = n.iterator(); o.hasNext(); ) { var s = o.next(); i[a++] = s.getCoordinate().copy(); } return i; }, e.prototype.getBoundaryNodes = function() { return this._boundaryNodes === null && (this._boundaryNodes = this._nodes.getBoundaryNodes(this._argIndex)), this._boundaryNodes; }, e.prototype.addSelfIntersectionNode = function(n, i, a) { if (this.isBoundaryNode(n, i)) return null; a === Q.BOUNDARY && this._useBoundaryDeterminationRule ? this.insertBoundaryPoint(n, i) : this.insertPoint(n, i, a); }, e.prototype.addPolygonRing = function(n, i, a) { if (n.isEmpty()) return null; var o = Mt.removeRepeatedPoints(n.getCoordinates()); if (o.length < 4) return this._hasTooFewPoints = !0, this._invalidPoint = o[0], null; var s = i, u = a; Me.isCCW(o) && (s = a, u = i); var l = new BS(o, new Or(this._argIndex, Q.BOUNDARY, s, u)); this._lineEdgeMap.put(n, l), this.insertEdge(l), this.insertPoint(this._argIndex, o[0], Q.BOUNDARY); }, e.prototype.insertPoint = function(n, i, a) { var o = this._nodes.addNode(i), s = o.getLabel(); s === null ? o._label = new Or(n, a) : s.setLocation(n, a); }, e.prototype.createEdgeSetIntersector = function() { return new Kfe(); }, e.prototype.addSelfIntersectionNodes = function(n) { for (var i = this, a = this._edges.iterator(); a.hasNext(); ) for (var o = a.next(), s = o.getLabel().getLocation(n), u = o.eiList.iterator(); u.hasNext(); ) { var l = u.next(); i.addSelfIntersectionNode(n, l.coord, s); } }, e.prototype.add = function() { if (arguments.length === 1) { var n = arguments[0]; if (n.isEmpty()) return null; if (n instanceof Vu && (this._useBoundaryDeterminationRule = !1), n instanceof qn) this.addPolygon(n); else if (n instanceof xn) this.addLineString(n); else if (n instanceof Za) this.addPoint(n); else if (n instanceof pm) this.addCollection(n); else if (n instanceof Ch) this.addCollection(n); else if (n instanceof Vu) this.addCollection(n); else if (n instanceof va) this.addCollection(n); else throw new Error(n.getClass().getName()); } else return r.prototype.add.apply(this, arguments); }, e.prototype.addCollection = function(n) { for (var i = this, a = 0; a < n.getNumGeometries(); a++) { var o = n.getGeometryN(a); i.add(o); } }, e.prototype.locate = function(n) { return st(this._parentGeom, Uc) && this._parentGeom.getNumGeometries() > 50 ? (this._areaPtLocator === null && (this._areaPtLocator = new wm(this._parentGeom)), this._areaPtLocator.locate(n)) : this._ptLocator.locate(n, this._parentGeom); }, e.prototype.findEdge = function() { if (arguments.length === 1) { var n = arguments[0]; return this._lineEdgeMap.get(n); } else return r.prototype.findEdge.apply(this, arguments); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e.determineBoundary = function(n, i) { return n.isInBoundary(i) ? Q.BOUNDARY : Q.INTERIOR; }, e; }(vn), Cm = function() { if (this._li = new Uh(), this._resultPrecisionModel = null, this._arg = null, arguments.length === 1) { var e = arguments[0]; this.setComputationPrecision(e.getPrecisionModel()), this._arg = new Array(1).fill(null), this._arg[0] = new Zy(0, e); } else if (arguments.length === 2) { var t = arguments[0], n = arguments[1], i = ko.OGC_SFS_BOUNDARY_RULE; t.getPrecisionModel().compareTo(n.getPrecisionModel()) >= 0 ? this.setComputationPrecision(t.getPrecisionModel()) : this.setComputationPrecision(n.getPrecisionModel()), this._arg = new Array(2).fill(null), this._arg[0] = new Zy(0, t, i), this._arg[1] = new Zy(1, n, i); } else if (arguments.length === 3) { var a = arguments[0], o = arguments[1], s = arguments[2]; a.getPrecisionModel().compareTo(o.getPrecisionModel()) >= 0 ? this.setComputationPrecision(a.getPrecisionModel()) : this.setComputationPrecision(o.getPrecisionModel()), this._arg = new Array(2).fill(null), this._arg[0] = new Zy(0, a, s), this._arg[1] = new Zy(1, o, s); } }; Cm.prototype.getArgGeometry = function(e) { return this._arg[e].getGeometry(); }; Cm.prototype.setComputationPrecision = function(e) { this._resultPrecisionModel = e, this._li.setPrecisionModel(this._resultPrecisionModel); }; Cm.prototype.interfaces_ = function() { return []; }; Cm.prototype.getClass = function() { return Cm; }; var hh = function() { }; hh.prototype.interfaces_ = function() { return []; }; hh.prototype.getClass = function() { return hh; }; hh.map = function() { if (arguments[0] instanceof at && st(arguments[1], hh.MapOp)) { for (var e = arguments[0], t = arguments[1], n = new be(), i = 0; i < e.getNumGeometries(); i++) { var a = t.map(e.getGeometryN(i)); a !== null && n.add(a); } return e.getFactory().buildGeometry(n); } else if (st(arguments[0], $n) && st(arguments[1], hh.MapOp)) { for (var o = arguments[0], s = arguments[1], u = new be(), l = o.iterator(); l.hasNext(); ) { var c = l.next(), f = s.map(c); f !== null && u.add(f); } return u; } }; hh.MapOp = function() { }; var yt = function(r) { function e() { var t = arguments[0], n = arguments[1]; r.call(this, t, n), this._ptLocator = new _s(), this._geomFact = null, this._resultGeom = null, this._graph = null, this._edgeList = new ys(), this._resultPolyList = new be(), this._resultLineList = new be(), this._resultPointList = new be(), this._graph = new vn(new CW()), this._geomFact = t.getFactory(); } return r && (e.__proto__ = r), e.prototype = Object.create(r && r.prototype), e.prototype.constructor = e, e.prototype.insertUniqueEdge = function(n) { var i = this._edgeList.findEqualEdge(n); if (i !== null) { var a = i.getLabel(), o = n.getLabel(); i.isPointwiseEqual(n) || (o = new Or(n.getLabel()), o.flip()); var s = i.getDepth(); s.isNull() && s.add(a), s.add(o), a.merge(o); } else this._edgeList.add(n); }, e.prototype.getGraph = function() { return this._graph; }, e.prototype.cancelDuplicateResultEdges = function() { for (var n = this._graph.getEdgeEnds().iterator(); n.hasNext(); ) { var i = n.next(), a = i.getSym(); i.isInResult() && a.isInResult() && (i.setInResult(!1), a.setInResult(!1)); } }, e.prototype.isCoveredByLA = function(n) { return !!(this.isCovered(n, this._resultLineList) || this.isCovered(n, this._resultPolyList)); }, e.prototype.computeGeometry = function(n, i, a, o) { var s = new be(); return s.addAll(n), s.addAll(i), s.addAll(a), s.isEmpty() ? e.createEmptyResult(o, this._arg[0].getGeometry(), this._arg[1].getGeometry(), this._geomFact) : this._geomFact.buildGeometry(s); }, e.prototype.mergeSymLabels = function() { for (var n = this._graph.getNodes().iterator(); n.hasNext(); ) { var i = n.next(); i.getEdges().mergeSymLabels(); } }, e.prototype.isCovered = function(n, i) { for (var a = this, o = i.iterator(); o.hasNext(); ) { var s = o.next(), u = a._ptLocator.locate(n, s); if (u !== Q.EXTERIOR) return !0; } return !1; }, e.prototype.replaceCollapsedEdges = function() { for (var n = new be(), i = this._edgeList.iterator(); i.hasNext(); ) { var a = i.next(); a.isCollapsed() && (i.remove(), n.add(a.getCollapsedEdge())); } this._edgeList.addAll(n); }, e.prototype.updateNodeLabelling = function() { for (var n = this._graph.getNodes().iterator(); n.hasNext(); ) { var i = n.next(), a = i.getEdges().getLabel(); i.getLabel().merge(a); } }, e.prototype.getResultGeometry = function(n) { return this.computeOverlay(n), this._resultGeom; }, e.prototype.insertUniqueEdges = function(n) { for (var i = this, a = n.iterator(); a.hasNext(); ) { var o = a.next(); i.insertUniqueEdge(o); } }, e.prototype.computeOverlay = function(n) { this.copyPoints(0), this.copyPoints(1), this._arg[0].computeSelfNodes(this._li, !1), this._arg[1].computeSelfNodes(this._li, !1), this._arg[0].computeEdgeIntersections(this._arg[1], this._li, !0); var i = new be(); this._arg[0].computeSplitEdges(i), this._arg[1].computeSplitEdges(i), this.insertUniqueEdges(i), this.computeLabelsFromDepths(), this.replaceCollapsedEdges(), Ih.checkValid(this._edgeList.getEdges()), this._graph.addEdges(this._edgeList.getEdges()), this.computeLabelling(), this.labelIncompleteNodes(), this.findResultAreaEdges(n), this.cancelDuplicateResultEdges(); var a = new Ka(this._geomFact); a.add(this._graph), this._resultPolyList = a.getPolygons(); var o = new hu(this, this._geomFact, this._ptLocator); this._resultLineList = o.build(n); var s = new Md(this, this._geomFact, this._ptLocator); this._resultPointList = s.build(n), this._resultGeom = this.computeGeometry(this._resultPointList, this._resultLineList, this._resultPolyList, n); }, e.prototype.labelIncompleteNode = function(n, i) { var a = this._ptLocator.locate(n.getCoordinate(), this._arg[i].getGeometry()); n.getLabel().setLocation(i, a); }, e.prototype.copyPoints = function(n) { for (var i = this, a = this._arg[n].getNodeIterator(); a.hasNext(); ) { var o = a.next(), s = i._graph.addNode(o.getCoordinate()); s.setLabel(n, o.getLabel().getLocation(n)); } }, e.prototype.findResultAreaEdges = function(n) { for (var i = this._graph.getEdgeEnds().iterator(); i.hasNext(); ) { var a = i.next(), o = a.getLabel(); o.isArea() && !a.isInteriorAreaEdge() && e.isResultOfOp(o.getLocation(0, _e.RIGHT), o.getLocation(1, _e.RIGHT), n) && a.setInResult(!0); } }, e.prototype.computeLabelsFromDepths = function() { for (var n = this._edgeList.iterator(); n.hasNext(); ) { var i = n.next(), a = i.getLabel(), o = i.getDepth(); if (!o.isNull()) { o.normalize(); for (var s = 0; s < 2; s++) !a.isNull(s) && a.isArea() && !o.isNull(s) && (o.getDelta(s) === 0 ? a.toLine(s) : (Et.isTrue(!o.isNull(s, _e.LEFT), "depth of LEFT side has not been initialized"), a.setLocation(s, _e.LEFT, o.getLocation(s, _e.LEFT)), Et.isTrue(!o.isNull(s, _e.RIGHT), "depth of RIGHT side has not been initialized"), a.setLocation(s, _e.RIGHT, o.getLocation(s, _e.RIGHT)))); } } }, e.prototype.computeLabelling = function() { for (var n = this, i = this._graph.getNodes().iterator(); i.hasNext(); ) { var a = i.next(); a.getEdges().computeLabelling(n._arg); } this.mergeSymLabels(), this.updateNodeLabelling(); }, e.prototype.labelIncompleteNodes = function() { for (var n = this, i = this._graph.getNodes().iterator(); i.hasNext(); ) { var a = i.next(), o = a.getLabel(); a.isIsolated() && (o.isNull(0) ? n.labelIncompleteNode(a, 0) : n.labelIncompleteNode(a, 1)), a.getEdges().updateLabelling(o); } }, e.prototype.isCoveredByA = function(n) { return !!this.isCovered(n, this._resultPolyList); }, e.prototype.interfaces_ = function() { return []; }, e.prototype.getClass = function() { return e; }, e; }(Cm); yt.overlayOp = function(r, e, t) { var n = new yt(r, e), i = n.getResultGeometry(t); return i; }; yt.intersection = function(r, e) { if (r.isEmpty() || e.isEmpty()) return yt.createEmptyResult(yt.INTERSECTION, r, e, r.getFactory()); if (r.isGeometryCollection()) { var t = e; return Dd.map(r, { interfaces_: function() { return [hh.MapOp]; }, map: function(n) { return n.intersection(t); } }); } return r.checkNotGeometryCollection(r), r.checkNotGeometryCollection(e), ya.overlayOp(r, e, yt.INTERSECTION); }; yt.symDifference = function(r, e) { if (r.isEmpty() || e.isEmpty()) { if (r.isEmpty() && e.isEmpty()) return yt.createEmptyResult(yt.SYMDIFFERENCE, r, e, r.getFactory()); if (r.isEmpty()) return e.copy(); if (e.isEmpty()) return r.copy(); } return r.checkNotGeometryCollection(r), r.checkNotGeometryCollection(e), ya.overlayOp(r, e, yt.SYMDIFFERENCE); }; yt.resultDimension = function(r, e, t) { var n = e.getDimension(), i = t.getDimension(), a = -1; switch (r) { case yt.INTERSECTION: a = Math.min(n, i); break; case yt.UNION: a = Math.max(n, i); break; case yt.DIFFERENCE: a = n; break; case yt.SYMDIFFERENCE: a = Math.max(n, i); break; } return a; }; yt.createEmptyResult = function(r, e, t, n) { var i = null; switch (yt.resultDimension(r, e, t)) { case -1: i = n.createGeometryCollection(new Array(0).fill(null)); break; case 0: i = n.createPoint(); break; case 1: i = n.createLineString(); break; case 2: i = n.createPolygon(); break; } return i; }; yt.difference = function(r, e) { return r.isEmpty() ? yt.createEmptyResult(yt.DIFFERENCE, r, e, r.getFactory()) : e.isEmpty() ? r.copy() : (r.checkNotGeometryCollection(r), r.checkNotGeometryCollection(e), ya.overlayOp(r, e, yt.DIFFERENCE)); }; yt.isResultOfOp = function() { if (arguments.length === 2) { var r = arguments[0], e = arguments[1], t = r.getLocation(0), n = r.getLocation(1); return yt.isResultOfOp(t, n, e); } else if (arguments.length === 3) { var i = arguments[0], a = arguments[1], o = arguments[2]; switch (i === Q.BOUNDARY && (i = Q.INTERIOR), a === Q.BOUNDARY && (a = Q.INTERIOR), o) { case yt.INTERSECTION: return i === Q.INTERIOR && a === Q.INTERIOR; case yt.UNION: return i === Q.INTERIOR || a === Q.INTERIOR; case yt.DIFFERENCE: return i === Q.INTERIOR && a !== Q.INTERIOR; case yt.SYMDIFFERENCE: return i === Q.INTERIOR && a !== Q.INTERIOR || i !== Q.INTERIOR && a === Q.INTERIOR; } return !1; } }; yt.INTERSECTION = 1; yt.UNION = 2; yt.DIFFERENCE = 3; yt.SYMDIFFERENCE = 4; var Rc = function() { this._g = null, this._boundaryDistanceTolerance = null, this._linework = null, this._ptLocator = new _s(), this._seg = new et(); var e = arguments[0], t = arguments[1]; this._g = e, this._boundaryDistanceTolerance = t, this._linework = this.extractLinework(e); }; Rc.prototype.isWithinToleranceOfBoundary = function(e) { for (var t = this, n = 0; n < this._linework.getNumGeometries(); n++) for (var i = t._linework.getGeometryN(n), a = i.getCoordinateSequence(), o = 0; o < a.size() - 1; o++) { a.getCoordinate(o, t._seg.p0), a.getCoordinate(o + 1, t._seg.p1); var s = t._seg.distance(e); if (s <= t._boundaryDistanceTolerance) return !0; } return !1; }; Rc.prototype.getLocation = function(e) { return this.isWithinToleranceOfBoundary(e) ? Q.BOUNDARY : this._ptLocator.locate(e, this._g); }; Rc.prototype.extractLinework = function(e) { var t = new Sm(); e.apply(t); var n = t.getLinework(), i = Dt.toLineStringArray(n); return e.getFactory().createMultiLineString(i); }; Rc.prototype.interfaces_ = function() { return []; }; Rc.prototype.getClass = function() { return Rc; }; var Sm = function() { this._linework = null, this._linework = new be(); }; Sm.prototype.getLinework = function() { return this._linework; }; Sm.prototype.filter = function(e) { var t = this; if (e instanceof qn) { var n = e; this._linework.add(n.getExteriorRing()); for (var i = 0; i < n.getNumInteriorRing(); i++) t._linework.add(n.getInteriorRingN(i)); } }; Sm.prototype.interfaces_ = function() { return [au]; }; Sm.prototype.getClass = function() { return Sm; }; var Lh = function() { this._g = null, this._doLeft = !0, this._doRight = !0; var e = arguments[0]; this._g = e; }; Lh.prototype.extractPoints = function(e, t, n) { for (var i = this, a = e.getCoordinates(), o = 0; o < a.length - 1; o++) i.computeOffsetPoints(a[o], a[o + 1], t, n); }; Lh.prototype.setSidesToGenerate = function(e, t) { this._doLeft = e, this._doRight = t; }; Lh.prototype.getPoints = function(e) { for (var t = this, n = new be(), i = Ei.getLines(this._g), a = i.iterator(); a.hasNext(); ) { var o = a.next(); t.extractPoints(o, e, n); } return n; }; Lh.prototype.computeOffsetPoints = function(e, t, n, i) { var a = t.x - e.x, o = t.y - e.y, s = Math.sqrt(a * a + o * o), u = n * a / s, l = n * o / s, c = (t.x + e.x) / 2, f = (t.y + e.y) / 2; if (this._doLeft) { var h = new Z(c - l, f + u); i.add(h); } if (this._doRight) { var p = new Z(c + l, f - u); i.add(p); } }; Lh.prototype.interfaces_ = function() { return []; }; Lh.prototype.getClass = function() { return Lh; }; var wo = function r() { this._geom = null, this._locFinder = null, this._location = new Array(3).fill(null), this._invalidLocation = null, this._boundaryDistanceTolerance = r.TOLERANCE, this._testCoords = new be(); var e = arguments[0], t = arguments[1], n = arguments[2]; this._boundaryDistanceTolerance = r.computeBoundaryDistanceTolerance(e, t), this._geom = [e, t, n], this._locFinder = [new Rc(this._geom[0], this._boundaryDistanceTolerance), new Rc(this._geom[1], this._boundaryDistanceTolerance), new Rc(this._geom[2], this._boundaryDistanceTolerance)]; }, MW = { TOLERANCE: { configurable: !0 } }; wo.prototype.reportResult = function(e, t, n) { Oi.out.println("Overlay result invalid - A:" + Q.toLocationSymbol(t[0]) + " B:" + Q.toLocationSymbol(t[1]) + " expected:" + (n ? "i" : "e") + " actual:" + Q.toLocationSymbol(t[2])); }; wo.prototype.isValid = function(e) { this.addTestPts(this._geom[0]), this.addTestPts(this._geom[1]); var t = this.checkValid(e); return t; }; wo.prototype.checkValid = function() { var e = this; if (arguments.length === 1) { for (var t = arguments[0], n = 0; n < this._testCoords.size(); n++) { var i = e._testCoords.get(n); if (!e.checkValid(t, i)) return e._invalidLocation = i, !1; } return !0; } else if (arguments.length === 2) { var a = arguments[0], o = arguments[1]; return this._location[0] = this._locFinder[0].getLocation(o), this._location[1] = this._locFinder[1].getLocation(o), this._location[2] = this._locFinder[2].getLocation(o), wo.hasLocation(this._location, Q.BOUNDARY) ? !0 : this.isValidResult(a, this._location); } }; wo.prototype.addTestPts = function(e) { var t = new Lh(e); this._testCoords.addAll(t.getPoints(5 * this._boundaryDistanceTolerance)); }; wo.prototype.isValidResult = function(e, t) { var n = yt.isResultOfOp(t[0], t[1], e), i = t[2] === Q.INTERIOR, a = !(n ^ i); return a || this.reportResult(e, t, n), a; }; wo.prototype.getInvalidLocation = function() { return this._invalidLocation; }; wo.prototype.interfaces_ = function() { return []; }; wo.prototype.getClass = function() { return wo; }; wo.hasLocation = function(e, t) { for (var n = 0; n < 3; n++) if (e[n] === t) return !0; return !1; }; wo.computeBoundaryDistanceTolerance = function(e, t) { return Math.min(Ln.computeSizeBasedSnapTolerance(e), Ln.computeSizeBasedSnapTolerance(t)); }; wo.isValid = function(e, t, n, i) { var a = new wo(e, t, i); return a.isValid(n); }; MW.TOLERANCE.get = function() { return 1e-6; }; Object.defineProperties(wo, MW); var co = function r(e) { this._geomFactory = null, this._skipEmpty = !1, this._inputGeoms = null, this._geomFactory = r.extractFactory(e), this._inputGeoms = e; }; co.prototype.extractElements = function(e, t) { var n = this; if (e === null) return null; for (var i = 0; i < e.getNumGeometries(); i++) { var a = e.getGeometryN(i); n._skipEmpty && a.isEmpty() || t.add(a); } }; co.prototype.combine = function() { for (var e = this, t = new be(), n = this._inputGeoms.iterator(); n.hasNext(); ) { var i = n.next(); e.extractElements(i, t); } return t.size() === 0 ? this._geomFactory !== null ? this._geomFactory.createGeometryCollection(null) : null : this._geomFactory.buildGeometry(t); }; co.prototype.interfaces_ = function() { return []; }; co.prototype.getClass = function() { return co; }; co.combine = function() { if (arguments.length === 1) { var e = arguments[0], t = new co(e); return t.combine(); } else if (arguments.length === 2) { var n = arguments[0], i = arguments[1], a = new co(co.createList(n, i)); return a.combine(); } else if (arguments.length === 3) { var o = arguments[0], s = arguments[1], u = arguments[2], l = new co(co.createList(o, s, u)); return l.combine(); } }; co.extractFactory = function(e) { return e.isEmpty() ? null : e.iterator().next().getFactory(); }; co.createList = function() { if (arguments.length === 2) { var e = arguments[0], t = arguments[1], n = new be(); return n.add(e), n.add(t), n; } else if (arguments.length === 3) { var i = arguments[0], a = arguments[1], o = arguments[2], s = new be(); return s.add(i), s.add(a), s.add(o), s; } }; var Nn = function() { this._inputPolys = null, this._geomFactory = null; var e = arguments[0]; this._inputPolys = e, this._inputPolys === null && (this._inputPolys = new be()); }, OW = { STRTREE_NODE_CAPACITY: { configurable: !0 } }; Nn.prototype.reduceToGeometries = function(e) { for (var t = this, n = new be(), i = e.iterator(); i.hasNext(); ) { var a = i.next(), o = null; st(a, cs) ? o = t.unionTree(a) : a instanceof at && (o = a), n.add(o); } return n; }; Nn.prototype.extractByEnvelope = function(e, t, n) { for (var i = new be(), a = 0; a < t.getNumGeometries(); a++) { var o = t.getGeometryN(a); o.getEnvelopeInternal().intersects(e) ? i.add(o) : n.add(o); } return this._geomFactory.buildGeometry(i); }; Nn.prototype.unionOptimized = function(e, t) { var n = e.getEnvelopeInternal(), i = t.getEnvelopeInternal(); if (!n.intersects(i)) { var a = co.combine(e, t); return a; } if (e.getNumGeometries() <= 1 && t.getNumGeometries() <= 1) return this.unionActual(e, t); var o = n.intersection(i); return this.unionUsingEnvelopeIntersection(e, t, o); }; Nn.prototype.union = function() { if (this._inputPolys === null) throw new Error("union() method cannot be called twice"); if (this._inputPolys.isEmpty()) return null; this._geomFactory = this._inputPolys.iterator().next().getFactory(); for (var e = new yW(Nn.STRTREE_NODE_CAPACITY), t = this._inputPolys.iterator(); t.hasNext(); ) { var n = t.next(); e.insert(n.getEnvelopeInternal(), n); } this._inputPolys = null; var i = e.itemsTree(), a = this.unionTree(i); return a; }; Nn.prototype.binaryUnion = function() { if (arguments.length === 1) { var e = arguments[0]; return this.binaryUnion(e, 0, e.size()); } else if (arguments.length === 3) { var t = arguments[0], n = arguments[1], i = arguments[2]; if (i - n <= 1) { var a = Nn.getGeometry(t, n); return this.unionSafe(a, null); } else { if (i - n === 2) return this.unionSafe(Nn.getGeometry(t, n), Nn.getGeometry(t, n + 1)); var o = Math.trunc((i + n) / 2), s = this.binaryUnion(t, n, o), u = this.binaryUnion(t, o, i); return this.unionSafe(s, u); } } }; Nn.prototype.repeatedUnion = function(e) { for (var t = null, n = e.iterator(); n.hasNext(); ) { var i = n.next(); t === null ? t = i.copy() : t = t.union(i); } return t; }; Nn.prototype.unionSafe = function(e, t) { return e === null && t === null ? null : e === null ? t.copy() : t === null ? e.copy() : this.unionOptimized(e, t); }; Nn.prototype.unionActual = function(e, t) { return Nn.restrictToPolygons(e.union(t)); }; Nn.prototype.unionTree = function(e) { var t = this.reduceToGeometries(e), n = this.binaryUnion(t); return n; }; Nn.prototype.unionUsingEnvelopeIntersection = function(e, t, n) { var i = new be(), a = this.extractByEnvelope(n, e, i), o = this.extractByEnvelope(n, t, i), s = this.unionActual(a, o); i.add(s); var u = co.combine(i); return u; }; Nn.prototype.bufferUnion = function() { if (arguments.length === 1) { var e = arguments[0], t = e.get(0).getFactory(), n = t.buildGeometry(e), i = n.buffer(0); return i; } else if (arguments.length === 2) { var a = arguments[0], o = arguments[1], s = a.getFactory(), u = s.createGeometryCollection([a, o]), l = u.buffer(0); return l; } }; Nn.prototype.interfaces_ = function() { return []; }; Nn.prototype.getClass = function() { return Nn; }; Nn.restrictToPolygons = function(e) { if (st(e, Uc)) return e; var t = Gl.getPolygons(e); return t.size() === 1 ? t.get(0) : e.getFactory().createMultiPolygon(Dt.toPolygonArray(t)); }; Nn.getGeometry = function(e, t) { return t >= e.size() ? null : e.get(t); }; Nn.union = function(e) { var t = new Nn(e); return t.union(); }; OW.STRTREE_NODE_CAPACITY.get = function() { return 4; }; Object.defineProperties(Nn, OW); var VS = function() { }; VS.prototype.interfaces_ = function() { return []; }; VS.prototype.getClass = function() { return VS; }; VS.union = function(e, t) { if (e.isEmpty() || t.isEmpty()) { if (e.isEmpty() && t.isEmpty()) return yt.createEmptyResult(yt.UNION, e, t, e.getFactory()); if (e.isEmpty()) return t.copy(); if (t.isEmpty()) return e.copy(); } return e.checkNotGeometryCollection(e), e.checkNotGeometryCollection(t), ya.overlayOp(e, t, yt.UNION); }; function Wh() { return new GS(); } function GS() { this.reset(); } GS.prototype = { constructor: GS, reset: function() { this.s = this.t = 0; }, add: function(r) { pk(bx, r, this.t), pk(this, bx.s, this.s), this.s ? this.t += bx.t : this.s = bx.t; }, valueOf: function() { return this.s; } }; var bx = new GS(); function pk(r, e, t) { var n = r.s = e + t, i = n - e, a = n - i; r.t = e - a + (t - i); } var wn = 1e-6, Ur = Math.PI, Ol = Ur / 2, dk = Ur / 4, ql = Ur * 2, Tf = 180 / Ur, Gs = Ur / 180, la = Math.abs, ehe = Math.atan, Em = Math.atan2, Hn = Math.cos, Un = Math.sin, ty = Math.sqrt; function RW(r) { return r > 1 ? 0 : r < -1 ? Ur : Math.acos(r); } function Rd(r) { return r > 1 ? Ol : r < -1 ? -Ol : Math.asin(r); } function G0() { } function zS(r, e) { r && gk.hasOwnProperty(r.type) && gk[r.type](r, e); } var vk = { Feature: function(r, e) { zS(r.geometry, e); }, FeatureCollection: function(r, e) { for (var t = r.features, n = -1, i = t.length; ++n < i; ) zS(t[n].geometry, e); } }, gk = { Sphere: function(r, e) { e.sphere(); }, Point: function(r, e) { r = r.coordinates, e.point(r[0], r[1], r[2]); }, MultiPoint: function(r, e) { for (var t = r.coordinates, n = -1, i = t.length; ++n < i; ) r = t[n], e.point(r[0], r[1], r[2]); }, LineString: function(r, e) { RD(r.coordinates, e, 0); }, MultiLineString: function(r, e) { for (var t = r.coordinates, n = -1, i = t.length; ++n < i; ) RD(t[n], e, 0); }, Polygon: function(r, e) { mk(r.coordinates, e); }, MultiPolygon: function(r, e) { for (var t = r.coordinates, n = -1, i = t.length; ++n < i; ) mk(t[n], e); }, GeometryCollection: function(r, e) { for (var t = r.geometries, n = -1, i = t.length; ++n < i; ) zS(t[n], e); } }; function RD(r, e, t) { var n = -1, i = r.length - t, a; for (e.lineStart(); ++n < i; ) a = r[n], e.point(a[0], a[1], a[2]); e.lineEnd(); } function mk(r, e) { var t = -1, n = r.length; for (e.polygonStart(); ++t < n; ) RD(r[t], e, 1); e.polygonEnd(); } function the(r, e) { r && vk.hasOwnProperty(r.type) ? vk[r.type](r, e) : zS(r, e); } Wh(); Wh(); function ND(r) { return [Em(r[1], r[0]), Rd(r[2])]; } function bm(r) { var e = r[0], t = r[1], n = Hn(t); return [n * Hn(e), n * Un(e), Un(t)]; } function Tx(r, e) { return r[0] * e[0] + r[1] * e[1] + r[2] * e[2]; } function $S(r, e) { return [r[1] * e[2] - r[2] * e[1], r[2] * e[0] - r[0] * e[2], r[0] * e[1] - r[1] * e[0]]; } function iI(r, e) { r[0] += e[0], r[1] += e[1], r[2] += e[2]; } function Px(r, e) { return [r[0] * e, r[1] * e, r[2] * e]; } function FD(r) { var e = ty(r[0] * r[0] + r[1] * r[1] + r[2] * r[2]); r[0] /= e, r[1] /= e, r[2] /= e; } Wh(); function NW(r, e) { function t(n, i) { return n = r(n, i), e(n[0], n[1]); } return r.invert && e.invert && (t.invert = function(n, i) { return n = e.invert(n, i), n && r.invert(n[0], n[1]); }), t; } function BD(r, e) { return [r > Ur ? r - ql : r < -Ur ? r + ql : r, e]; } BD.invert = BD; function rhe(r, e, t) { return (r %= ql) ? e || t ? NW(_k(r), wk(e, t)) : _k(r) : e || t ? wk(e, t) : BD; } function yk(r) { return function(e, t) { return e += r, [e > Ur ? e - ql : e < -Ur ? e + ql : e, t]; }; } function _k(r) { var e = yk(r); return e.invert = yk(-r), e; } function wk(r, e) { var t = Hn(r), n = Un(r), i = Hn(e), a = Un(e); function o(s, u) { var l = Hn(u), c = Hn(s) * l, f = Un(s) * l, h = Un(u), p = h * t + c * n; return [ Em(f * i - p * a, c * t - h * n), Rd(p * i + f * a) ]; } return o.invert = function(s, u) { var l = Hn(u), c = Hn(s) * l, f = Un(s) * l, h = Un(u), p = h * i - f * a; return [ Em(f * i + h * a, c * t + p * n), Rd(p * t - c * n) ]; }, o; } function nhe(r, e, t, n, i, a) { if (!!t) { var o = Hn(e), s = Un(e), u = n * t; i == null ? (i = e + n * ql, a = e - u / 2) : (i = xk(o, i), a = xk(o, a), (n > 0 ? i < a : i > a) && (i += n * ql)); for (var l, c = i; n > 0 ? c > a : c < a; c -= u) l = ND([o, -s * Hn(c), -s * Un(c)]), r.point(l[0], l[1]); } } function xk(r, e) { e = bm(e), e[0] -= r, FD(e); var t = RW(-e[1]); return ((-e[2] < 0 ? -t : t) + ql - wn) % ql; } function FW() { var r = [], e; return { point: function(t, n) { e.push([t, n]); }, lineStart: function() { r.push(e = []); }, lineEnd: G0, rejoin: function() { r.length > 1 && r.push(r.pop().concat(r.shift())); }, result: function() { var t = r; return r = [], e = null, t; } }; } function ihe(r, e, t, n, i, a) { var o = r[0], s = r[1], u = e[0], l = e[1], c = 0, f = 1, h = u - o, p = l - s, d; if (d = t - o, !(!h && d > 0)) { if (d /= h, h < 0) { if (d < c) return; d < f && (f = d); } else if (h > 0) { if (d > f) return; d > c && (c = d); } if (d = i - o, !(!h && d < 0)) { if (d /= h, h < 0) { if (d > f) return; d > c && (c = d); } else if (h > 0) { if (d < c) return; d < f && (f = d); } if (d = n - s, !(!p && d > 0)) { if (d /= p, p < 0) { if (d < c) return; d < f && (f = d); } else if (p > 0) { if (d > f) return; d > c && (c = d); } if (d = a - s, !(!p && d < 0)) { if (d /= p, p < 0) { if (d > f) return; d > c && (c = d); } else if (p > 0) { if (d < c) return; d < f && (f = d); } return c > 0 && (r[0] = o + c * h, r[1] = s + c * p), f < 1 && (e[0] = o + f * h, e[1] = s + f * p), !0; } } } } } function KC(r, e) { return la(r[0] - e[0]) < wn && la(r[1] - e[1]) < wn; } function Ix(r, e, t, n) { this.x = r, this.z = e, this.o = t, this.e = n, this.v = !1, this.n = this.p = null; } function BW(r, e, t, n, i) { var a = [], o = [], s, u; if (r.forEach(function(d) { if (!((v = d.length - 1) <= 0)) { var v, g = d[0], m = d[v], y; if (KC(g, m)) { for (i.lineStart(), s = 0; s < v; ++s) i.point((g = d[s])[0], g[1]); i.lineEnd(); return; } a.push(y = new Ix(g, d, null, !0)), o.push(y.o = new Ix(g, null, y, !1)), a.push(y = new Ix(m, d, null, !1)), o.push(y.o = new Ix(m, null, y, !0)); } }), !!a.length) { for (o.sort(e), Ck(a), Ck(o), s = 0, u = o.length; s < u; ++s) o[s].e = t = !t; for (var l = a[0], c, f; ; ) { for (var h = l, p = !0; h.v; ) if ((h = h.n) === l) return; c = h.z, i.lineStart(); do { if (h.v = h.o.v = !0, h.e) { if (p) for (s = 0, u = c.length; s < u; ++s) i.point((f = c[s])[0], f[1]); else n(h.x, h.n.x, 1, i); h = h.n; } else { if (p) for (c = h.p.z, s = c.length - 1; s >= 0; --s) i.point((f = c[s])[0], f[1]); else n(h.x, h.p.x, -1, i); h = h.p; } h = h.o, c = h.z, p = !p; } while (!h.v); i.lineEnd(); } } } function Ck(r) { if (!!(e = r.length)) { for (var e, t = 0, n = r[0], i; ++t < e; ) n.n = i = r[t], i.p = n, n = i; n.n = i = r[0], i.p = n; } } function kW(r, e) { return r < e ? -1 : r > e ? 1 : r >= e ? 0 : NaN; } function ahe(r) { return r.length === 1 && (r = ohe(r)), { left: function(e, t, n, i) { for (n == null && (n = 0), i == null && (i = e.length); n < i; ) { var a = n + i >>> 1; r(e[a], t) < 0 ? n = a + 1 : i = a; } return n; }, right: function(e, t, n, i) { for (n == null && (n = 0), i == null && (i = e.length); n < i; ) { var a = n + i >>> 1; r(e[a], t) > 0 ? i = a : n = a + 1; } return n; } }; } function ohe(r) { return function(e, t) { return kW(r(e), t); }; } ahe(kW); function VW(r) { for (var e = r.length, t, n = -1, i = 0, a, o; ++n < e; ) i += r[n].length; for (a = new Array(i); --e >= 0; ) for (o = r[e], t = o.length; --t >= 0; ) a[--i] = o[t]; return a; } var z0 = 1e9, Ax = -z0; function she(r, e, t, n) { function i(l, c) { return r <= l && l <= t && e <= c && c <= n; } function a(l, c, f, h) { var p = 0, d = 0; if (l == null || (p = o(l, f)) !== (d = o(c, f)) || u(l, c) < 0 ^ f > 0) do h.point(p === 0 || p === 3 ? r : t, p > 1 ? n : e); while ((p = (p + f + 4) % 4) !== d); else h.point(c[0], c[1]); } function o(l, c) { return la(l[0] - r) < wn ? c > 0 ? 0 : 3 : la(l[0] - t) < wn ? c > 0 ? 2 : 1 : la(l[1] - e) < wn ? c > 0 ? 1 : 0 : c > 0 ? 3 : 2; } function s(l, c) { return u(l.x, c.x); } function u(l, c) { var f = o(l, 1), h = o(c, 1); return f !== h ? f - h : f === 0 ? c[1] - l[1] : f === 1 ? l[0] - c[0] : f === 2 ? l[1] - c[1] : c[0] - l[0]; } return function(l) { var c = l, f = FW(), h, p, d, v, g, m, y, _, w, x, C, S = { point: b, lineStart: I, lineEnd: A, polygonStart: T, polygonEnd: P }; function b(D, O) { i(D, O) && c.point(D, O); } function E() { for (var D = 0, O = 0, N = p.length; O < N; ++O) for (var F = p[O], k = 1, G = F.length, U = F[0], B, X, j = U[0], ae = U[1]; k < G; ++k) B = j, X = ae, U = F[k], j = U[0], ae = U[1], X <= n ? ae > n && (j - B) * (n - X) > (ae - X) * (r - B) && ++D : ae <= n && (j - B) * (n - X) < (ae - X) * (r - B) && --D; return D; } function T() { c = f, h = [], p = [], C = !0; } function P() { var D = E(), O = C && D, N = (h = VW(h)).length; (O || N) && (l.polygonStart(), O && (l.lineStart(), a(null, null, 1, l), l.lineEnd()), N && BW(h, s, D, a, l), l.polygonEnd()), c = l, h = p = d = null; } function I() { S.point = L, p && p.push(d = []), x = !0, w = !1, y = _ = NaN; } function A() { h && (L(v, g), m && w && f.rejoin(), h.push(f.result())), S.point = b, w && c.lineEnd(); } function L(D, O) { var N = i(D, O); if (p && d.push([D, O]), x) v = D, g = O, m = N, x = !1, N && (c.lineStart(), c.point(D, O)); else if (N && w) c.point(D, O); else { var F = [y = Math.max(Ax, Math.min(z0, y)), _ = Math.max(Ax, Math.min(z0, _))], k = [D = Math.max(Ax, Math.min(z0, D)), O = Math.max(Ax, Math.min(z0, O))]; ihe(F, k, r, e, t, n) ? (w || (c.lineStart(), c.point(F[0], F[1])), c.point(k[0], k[1]), N || c.lineEnd(), C = !1) : N && (c.lineStart(), c.point(D, O), C = !1); } y = D, _ = O, w = N; } return S; }; } var aI = Wh(); function uhe(r, e) { var t = e[0], n = e[1], i = [Un(t), -Hn(t), 0], a = 0, o = 0; aI.reset(); for (var s = 0, u = r.length; s < u; ++s) if (!!(c = (l = r[s]).length)) for (var l, c, f = l[c - 1], h = f[0], p = f[1] / 2 + dk, d = Un(p), v = Hn(p), g = 0; g < c; ++g, h = y, d = w, v = x, f = m) { var m = l[g], y = m[0], _ = m[1] / 2 + dk, w = Un(_), x = Hn(_), C = y - h, S = C >= 0 ? 1 : -1, b = S * C, E = b > Ur, T = d * w; if (aI.add(Em(T * S * Un(b), v * x + T * Hn(b))), a += E ? C + S * ql : C, E ^ h >= t ^ y >= t) { var P = $S(bm(f), bm(m)); FD(P); var I = $S(i, P); FD(I); var A = (E ^ C >= 0 ? -1 : 1) * Rd(I[2]); (n > A || n === A && (P[0] || P[1])) && (o += E ^ C >= 0 ? 1 : -1); } } return (a < -wn || a < wn && aI < -wn) ^ o & 1; } Wh(); function Sk(r) { return r; } Wh(); Wh(); var Tm = 1 / 0, HS = Tm, i1 = -Tm, US = i1, Ek = { point: lhe, lineStart: G0, lineEnd: G0, polygonStart: G0, polygonEnd: G0, result: function() { var r = [[Tm, HS], [i1, US]]; return i1 = US = -(HS = Tm = 1 / 0), r; } }; function lhe(r, e) { r < Tm && (Tm = r), r > i1 && (i1 = r), e < HS && (HS = e), e > US && (US = e); } Wh(); function GW(r, e, t, n) { return function(i, a) { var o = e(a), s = i.invert(n[0], n[1]), u = FW(), l = e(u), c = !1, f, h, p, d = { point: v, lineStart: m, lineEnd: y, polygonStart: function() { d.point = _, d.lineStart = w, d.lineEnd = x, h = [], f = []; }, polygonEnd: function() { d.point = v, d.lineStart = m, d.lineEnd = y, h = VW(h); var C = uhe(f, s); h.length ? (c || (a.polygonStart(), c = !0), BW(h, fhe, C, t, a)) : C && (c || (a.polygonStart(), c = !0), a.lineStart(), t(null, null, 1, a), a.lineEnd()), c && (a.polygonEnd(), c = !1), h = f = null; }, sphere: function() { a.polygonStart(), a.lineStart(), t(null, null, 1, a), a.lineEnd(), a.polygonEnd(); } }; function v(C, S) { var b = i(C, S); r(C = b[0], S = b[1]) && a.point(C, S); } function g(C, S) { var b = i(C, S); o.point(b[0], b[1]); } function m() { d.point = g, o.lineStart(); } function y() { d.point = v, o.lineEnd(); } function _(C, S) { p.push([C, S]); var b = i(C, S); l.point(b[0], b[1]); } function w() { l.lineStart(), p = []; } function x() { _(p[0][0], p[0][1]), l.lineEnd(); var C = l.clean(), S = u.result(), b, E = S.length, T, P, I; if (p.pop(), f.push(p), p = null, !!E) { if (C & 1) { if (P = S[0], (T = P.length - 1) > 0) { for (c || (a.polygonStart(), c = !0), a.lineStart(), b = 0; b < T; ++b) a.point((I = P[b])[0], I[1]); a.lineEnd(); } return; } E > 1 && C & 2 && S.push(S.pop().concat(S.shift())), h.push(S.filter(che)); } } return d; }; } function che(r) { return r.length > 1; } function fhe(r, e) { return ((r = r.x)[0] < 0 ? r[1] - Ol - wn : Ol - r[1]) - ((e = e.x)[0] < 0 ? e[1] - Ol - wn : Ol - e[1]); } const bk = GW( function() { return !0; }, hhe, dhe, [-Ur, -Ol] ); function hhe(r) { var e = NaN, t = NaN, n = NaN, i; return { lineStart: function() { r.lineStart(), i = 1; }, point: function(a, o) { var s = a > 0 ? Ur : -Ur, u = la(a - e); la(u - Ur) < wn ? (r.point(e, t = (t + o) / 2 > 0 ? Ol : -Ol), r.point(n, t), r.lineEnd(), r.lineStart(), r.point(s, t), r.point(a, t), i = 0) : n !== s && u >= Ur && (la(e - n) < wn && (e -= n * wn), la(a - s) < wn && (a -= s * wn), t = phe(e, t, a, o), r.point(n, t), r.lineEnd(), r.lineStart(), r.point(s, t), i = 0), r.point(e = a, t = o), n = s; }, lineEnd: function() { r.lineEnd(), e = t = NaN; }, clean: function() { return 2 - i; } }; } function phe(r, e, t, n) { var i, a, o = Un(r - t); return la(o) > wn ? ehe((Un(e) * (a = Hn(n)) * Un(t) - Un(n) * (i = Hn(e)) * Un(r)) / (i * a * o)) : (e + n) / 2; } function dhe(r, e, t, n) { var i; if (r == null) i = t * Ol, n.point(-Ur, i), n.point(0, i), n.point(Ur, i), n.point(Ur, 0), n.point(Ur, -i), n.point(0, -i), n.point(-Ur, -i), n.point(-Ur, 0), n.point(-Ur, i); else if (la(r[0] - e[0]) > wn) { var a = r[0] < e[0] ? Ur : -Ur; i = t * a / 2, n.point(-a, i), n.point(0, i), n.point(a, i); } else n.point(e[0], e[1]); } function vhe(r, e) { var t = Hn(r), n = t > 0, i = la(t) > wn; function a(c, f, h, p) { nhe(p, r, e, h, c, f); } function o(c, f) { return Hn(c) * Hn(f) > t; } function s(c) { var f, h, p, d, v; return { lineStart: function() { d = p = !1, v = 1; }, point: function(g, m) { var y = [g, m], _, w = o(g, m), x = n ? w ? 0 : l(g, m) : w ? l(g + (g < 0 ? Ur : -Ur), m) : 0; if (!f && (d = p = w) && c.lineStart(), w !== p && (_ = u(f, y), (!_ || KC(f, _) || KC(y, _)) && (y[0] += wn, y[1] += wn, w = o(y[0], y[1]))), w !== p) v = 0, w ? (c.lineStart(), _ = u(y, f), c.point(_[0], _[1])) : (_ = u(f, y), c.point(_[0], _[1]), c.lineEnd()), f = _; else if (i && f && n ^ w) { var C; !(x & h) && (C = u(y, f, !0)) && (v = 0, n ? (c.lineStart(), c.point(C[0][0], C[0][1]), c.point(C[1][0], C[1][1]), c.lineEnd()) : (c.point(C[1][0], C[1][1]), c.lineEnd(), c.lineStart(), c.point(C[0][0], C[0][1]))); } w && (!f || !KC(f, y)) && c.point(y[0], y[1]), f = y, p = w, h = x; }, lineEnd: function() { p && c.lineEnd(), f = null; }, clean: function() { return v | (d && p) << 1; } }; } function u(c, f, h) { var p = bm(c), d = bm(f), v = [1, 0, 0], g = $S(p, d), m = Tx(g, g), y = g[0], _ = m - y * y; if (!_) return !h && c; var w = t * m / _, x = -t * y / _, C = $S(v, g), S = Px(v, w), b = Px(g, x); iI(S, b); var E = C, T = Tx(S, E), P = Tx(E, E), I = T * T - P * (Tx(S, S) - 1); if (!(I < 0)) { var A = ty(I), L = Px(E, (-T - A) / P); if (iI(L, S), L = ND(L), !h) return L; var D = c[0], O = f[0], N = c[1], F = f[1], k; O < D && (k = D, D = O, O = k); var G = O - D, U = la(G - Ur) < wn, B = U || G < wn; if (!U && F < N && (k = N, N = F, F = k), B ? U ? N + F > 0 ^ L[1] < (la(L[0] - D) < wn ? N : F) : N <= L[1] && L[1] <= F : G > Ur ^ (D <= L[0] && L[0] <= O)) { var X = Px(E, (-T + A) / P); return iI(X, S), [L, ND(X)]; } } } function l(c, f) { var h = n ? r : Ur - r, p = 0; return c < -h ? p |= 1 : c > h && (p |= 2), f < -h ? p |= 4 : f > h && (p |= 8), p; } return GW(o, s, a, n ? [0, -r] : [-Ur, r - Ur]); } function zW(r) { return function(e) { var t = new kD(); for (var n in r) t[n] = r[n]; return t.stream = e, t; }; } function kD() { } kD.prototype = { constructor: kD, point: function(r, e) { this.stream.point(r, e); }, sphere: function() { this.stream.sphere(); }, lineStart: function() { this.stream.lineStart(); }, lineEnd: function() { this.stream.lineEnd(); }, polygonStart: function() { this.stream.polygonStart(); }, polygonEnd: function() { this.stream.polygonEnd(); } }; function $W(r, e, t) { var n = e[1][0] - e[0][0], i = e[1][1] - e[0][1], a = r.clipExtent && r.clipExtent(); r.scale(150).translate([0, 0]), a != null && r.clipExtent(null), the(t, r.stream(Ek)); var o = Ek.result(), s = Math.min(n / (o[1][0] - o[0][0]), i / (o[1][1] - o[0][1])), u = +e[0][0] + (n - s * (o[1][0] + o[0][0])) / 2, l = +e[0][1] + (i - s * (o[1][1] + o[0][1])) / 2; return a != null && r.clipExtent(a), r.scale(s * 150).translate([u, l]); } function ghe(r, e, t) { return $W(r, [[0, 0], e], t); } var Tk = 16, mhe = Hn(30 * Gs); function Pk(r, e) { return +e ? _he(r, e) : yhe(r); } function yhe(r) { return zW({ point: function(e, t) { e = r(e, t), this.stream.point(e[0], e[1]); } }); } function _he(r, e) { function t(n, i, a, o, s, u, l, c, f, h, p, d, v, g) { var m = l - n, y = c - i, _ = m * m + y * y; if (_ > 4 * e && v--) { var w = o + h, x = s + p, C = u + d, S = ty(w * w + x * x + C * C), b = Rd(C /= S), E = la(la(C) - 1) < wn || la(a - f) < wn ? (a + f) / 2 : Em(x, w), T = r(E, b), P = T[0], I = T[1], A = P - n, L = I - i, D = y * A - m * L; (D * D / _ > e || la((m * A + y * L) / _ - 0.5) > 0.3 || o * h + s * p + u * d < mhe) && (t(n, i, a, o, s, u, P, I, E, w /= S, x /= S, C, v, g), g.point(P, I), t(P, I, E, w, x, C, l, c, f, h, p, d, v, g)); } } return function(n) { var i, a, o, s, u, l, c, f, h, p, d, v, g = { point: m, lineStart: y, lineEnd: w, polygonStart: function() { n.polygonStart(), g.lineStart = x; }, polygonEnd: function() { n.polygonEnd(), g.lineStart = y; } }; function m(b, E) { b = r(b, E), n.point(b[0], b[1]); } function y() { f = NaN, g.point = _, n.lineStart(); } function _(b, E) { var T = bm([b, E]), P = r(b, E); t(f, h, c, p, d, v, f = P[0], h = P[1], c = b, p = T[0], d = T[1], v = T[2], Tk, n), n.point(f, h); } function w() { g.point = m, n.lineEnd(); } function x() { y(), g.point = C, g.lineEnd = S; } function C(b, E) { _(i = b, E), a = f, o = h, s = p, u = d, l = v, g.point = _; } function S() { t(f, h, c, p, d, v, a, o, i, s, u, l, Tk, n), g.lineEnd = w, w(); } return g; }; } var whe = zW({ point: function(r, e) { this.stream.point(r * Gs, e * Gs); } }); function xhe(r) { return Che(function() { return r; })(); } function Che(r) { var e, t = 150, n = 480, i = 250, a, o, s = 0, u = 0, l = 0, c = 0, f = 0, h, p, d = null, v = bk, g = null, m, y, _, w = Sk, x = 0.5, C = Pk(P, x), S, b; function E(L) { return L = p(L[0] * Gs, L[1] * Gs), [L[0] * t + a, o - L[1] * t]; } function T(L) { return L = p.invert((L[0] - a) / t, (o - L[1]) / t), L && [L[0] * Tf, L[1] * Tf]; } function P(L, D) { return L = e(L, D), [L[0] * t + a, o - L[1] * t]; } E.stream = function(L) { return S && b === L ? S : S = whe(v(h, C(w(b = L)))); }, E.clipAngle = function(L) { return arguments.length ? (v = +L ? vhe(d = L * Gs, 6 * Gs) : (d = null, bk), A()) : d * Tf; }, E.clipExtent = function(L) { return arguments.length ? (w = L == null ? (g = m = y = _ = null, Sk) : she(g = +L[0][0], m = +L[0][1], y = +L[1][0], _ = +L[1][1]), A()) : g == null ? null : [[g, m], [y, _]]; }, E.scale = function(L) { return arguments.length ? (t = +L, I()) : t; }, E.translate = function(L) { return arguments.length ? (n = +L[0], i = +L[1], I()) : [n, i]; }, E.center = function(L) { return arguments.length ? (s = L[0] % 360 * Gs, u = L[1] % 360 * Gs, I()) : [s * Tf, u * Tf]; }, E.rotate = function(L) { return arguments.length ? (l = L[0] % 360 * Gs, c = L[1] % 360 * Gs, f = L.length > 2 ? L[2] % 360 * Gs : 0, I()) : [l * Tf, c * Tf, f * Tf]; }, E.precision = function(L) { return arguments.length ? (C = Pk(P, x = L * L), A()) : ty(x); }, E.fitExtent = function(L, D) { return $W(E, L, D); }, E.fitSize = function(L, D) { return ghe(E, L, D); }; function I() { p = NW(h = rhe(l, c, f), e); var L = e(s, u); return a = n - L[0] * t, o = i + L[1] * t, A(); } function A() { return S = b = null, E; } return function() { return e = r.apply(this, arguments), E.invert = e.invert && T, I(); }; } function HW(r) { return function(e, t) { var n = Hn(e), i = Hn(t), a = r(n * i); return [ a * i * Un(e), a * Un(t) ]; }; } function UW(r) { return function(e, t) { var n = ty(e * e + t * t), i = r(n), a = Un(i), o = Hn(i); return [ Em(e * a, n * o), Rd(n && t * a / n) ]; }; } var She = HW(function(r) { return ty(2 / (1 + r)); }); She.invert = UW(function(r) { return 2 * Rd(r / 2); }); var WW = HW(function(r) { return (r = RW(r)) && r / Un(r); }); WW.invert = UW(function(r) { return r; }); function Ehe() { return xhe(WW).scale(79.4188).clipAngle(180 - 1e-3); } function Ik(r, e) { return [r, e]; } Ik.invert = Ik; function bhe(r, e, t) { t = t || {}; var n = t.units || "kilometers", i = t.steps || 8; if (!r) throw new Error("geojson is required"); if (typeof t != "object") throw new Error("options must be an object"); if (typeof i != "number") throw new Error("steps must be an number"); if (e === void 0) throw new Error("radius is required"); if (i <= 0) throw new Error("steps must be greater than 0"); var a = []; switch (r.type) { case "GeometryCollection": return Bo(r, function(o) { var s = JC(o, e, n, i); s && a.push(s); }), lt(a); case "FeatureCollection": return Dr(r, function(o) { var s = JC(o, e, n, i); s && Dr(s, function(u) { u && a.push(u); }); }), lt(a); } return JC(r, e, n, i); } function JC(r, e, t, n) { var i = r.properties || {}, a = r.type === "Feature" ? r.geometry : r; if (a.type === "GeometryCollection") { var o = []; return Bo(r, function(v) { var g = JC(v, e, t, n); g && o.push(g); }), lt(o); } var s = The(a), u = { type: a.type, coordinates: YW(a.coordinates, s) }, l = new fR(), c = l.read(u), f = rm(vd(e, t), "meters"), h = Pi.bufferOp(c, f, n), p = new gW(); if (h = p.write(h), !jW(h.coordinates)) { var d = { type: h.type, coordinates: XW(h.coordinates, s) }; return fi(d, i); } } function jW(r) { return Array.isArray(r[0]) ? jW(r[0]) : isNaN(r[0]); } function YW(r, e) { return typeof r[0] != "object" ? e(r) : r.map(function(t) { return YW(t, e); }); } function XW(r, e) { return typeof r[0] != "object" ? e.invert(r) : r.map(function(t) { return XW(t, e); }); } function The(r) { var e = Z1(r).geometry.coordinates, t = [-e[0], -e[1]]; return Ehe().rotate(t).scale(wi); } function Phe(r, e, t) { t === void 0 && (t = {}); var n = on(r), i = on(e), a = Mc.union(n.coordinates, i.coordinates); return a.length === 0 ? null : a.length === 1 ? Nt(a[0], t.properties) : Fo(a, t.properties); } function a1(r, e, t) { t === void 0 && (t = {}); var n = on(r), i = on(e), a = Mc.intersection(n.coordinates, i.coordinates); return a.length === 0 ? null : a.length === 1 ? Nt(a[0], t.properties) : Fo(a, t.properties); } function Ihe(r, e) { if (e = e || {}, !$r(e)) throw new Error("options is invalid"); var t = e.propertyName; df(r, "Polygon", "dissolve"); var n = []; if (e.propertyName) { var i = {}; Dr(r, function(u) { Object.prototype.hasOwnProperty.call( i, u.properties[t] ) || (i[u.properties[t]] = []), i[u.properties[t]].push(u); }); for (var a = Object.keys(i), o = 0; o < a.length; o++) { var s = Fo( Mc.union.apply( null, i[a[o]].map(function(u) { return u.geometry.coordinates; }) ) ); s.properties[t] = a[o], n.push(s); } } else return gD( Fo( Mc.union.apply( null, r.features.map(function(u) { return u.geometry.coordinates; }) ) ) ); return gD(lt(n)); } function qW(r, e, t) { t === void 0 && (t = {}); var n = JSON.stringify(t.properties || {}), i = r[0], a = r[1], o = r[2], s = r[3], u = (a + s) / 2, l = (i + o) / 2, c = e * 2 / zr([i, u], [o, u], t), f = c * (o - i), h = e * 2 / zr([l, a], [l, s], t), p = h * (s - a), d = f / 2, v = d * 2, g = Math.sqrt(3) / 2 * p, m = o - i, y = s - a, _ = 3 / 4 * v, w = g, x = (m - v) / (v - d / 2), C = Math.floor(x), S = (C * _ - d / 2 - m) / 2 - d / 2 + _ / 2, b = Math.floor((y - g) / g), E = (y - b * g) / 2, T = b * g - y > g / 2; T && (E -= g / 4); for (var P = [], I = [], A = 0; A < 6; A++) { var L = 2 * Math.PI / 6 * A; P.push(Math.cos(L)), I.push(Math.sin(L)); } for (var D = [], O = 0; O <= C; O++) for (var N = 0; N <= b; N++) { var F = O % 2 === 1; if (!(N === 0 && F) && !(N === 0 && T)) { var k = O * _ + i - S, G = N * w + a + E; if (F && (G -= g / 2), t.triangles === !0) Lhe([k, G], f / 2, p / 2, JSON.parse(n), P, I).forEach(function(B) { t.mask ? a1(t.mask, B) && D.push(B) : D.push(B); }); else { var U = Ahe([k, G], f / 2, p / 2, JSON.parse(n), P, I); t.mask ? a1(t.mask, U) && D.push(U) : D.push(U); } } } return lt(D); } function Ahe(r, e, t, n, i, a) { for (var o = [], s = 0; s < 6; s++) { var u = r[0] + e * i[s], l = r[1] + t * a[s]; o.push([u, l]); } return o.push(o[0].slice()), Nt([o], n); } function Lhe(r, e, t, n, i, a) { for (var o = [], s = 0; s < 6; s++) { var u = []; u.push(r), u.push([r[0] + e * i[s], r[1] + t * a[s]]), u.push([ r[0] + e * i[(s + 1) % 6], r[1] + t * a[(s + 1) % 6] ]), u.push(r), o.push(Nt([u], n)); } return o; } function Dhe(r, e) { var t = Ohe(e), n = null; return r.type === "FeatureCollection" ? n = Mhe(r) : n = ZW( Mc.union(r.geometry.coordinates) ), n.geometry.coordinates.forEach(function(i) { t.geometry.coordinates.push(i[0]); }), t; } function Mhe(r) { var e = r.features.length === 2 ? Mc.union( r.features[0].geometry.coordinates, r.features[1].geometry.coordinates ) : Mc.union.apply( Mc, r.features.map(function(t) { return t.geometry.coordinates; }) ); return ZW(e); } function ZW(r) { return Fo(r); } function Ohe(r) { var e = [ [ [180, 90], [-180, 90], [-180, -90], [180, -90], [180, 90] ] ], t = r && r.geometry.coordinates || e; return Nt(t); } function Rhe(r, e, t, n) { n === void 0 && (n = {}); for (var i = [], a = r[0], o = r[1], s = r[2], u = r[3], l = e / zr([a, o], [s, o], n), c = l * (s - a), f = t / zr([a, o], [a, u], n), h = f * (u - o), p = s - a, d = u - o, v = Math.floor(p / c), g = Math.floor(d / h), m = (p - v * c) / 2, y = (d - g * h) / 2, _ = a + m, w = 0; w < v; w++) { for (var x = o + y, C = 0; C < g; C++) { var S = Nt([ [ [_, x], [_, x + h], [_ + c, x + h], [_ + c, x], [_, x] ] ], n.properties); n.mask ? NU(n.mask, S) && i.push(S) : i.push(S), x += h; } _ += c; } return lt(i); } function KW(r, e, t) { return t === void 0 && (t = {}), Rhe(r, e, e, t); } function JW(r, e, t) { t === void 0 && (t = {}); for (var n = [], i = e / zr([r[0], r[1]], [r[2], r[1]], t), a = i * (r[2] - r[0]), o = e / zr([r[0], r[1]], [r[0], r[3]], t), s = o * (r[3] - r[1]), u = 0, l = r[0]; l <= r[2]; ) { for (var c = 0, f = r[1]; f <= r[3]; ) { var h = null, p = null; u % 2 === 0 && c % 2 === 0 ? (h = Nt([ [ [l, f], [l, f + s], [l + a, f], [l, f] ] ], t.properties), p = Nt([ [ [l, f + s], [l + a, f + s], [l + a, f], [l, f + s] ] ], t.properties)) : u % 2 === 0 && c % 2 === 1 ? (h = Nt([ [ [l, f], [l + a, f + s], [l + a, f], [l, f] ] ], t.properties), p = Nt([ [ [l, f], [l, f + s], [l + a, f + s], [l, f] ] ], t.properties)) : c % 2 === 0 && u % 2 === 1 ? (h = Nt([ [ [l, f], [l, f + s], [l + a, f + s], [l, f] ] ], t.properties), p = Nt([ [ [l, f], [l + a, f + s], [l + a, f], [l, f] ] ], t.properties)) : c % 2 === 1 && u % 2 === 1 && (h = Nt([ [ [l, f], [l, f + s], [l + a, f], [l, f] ] ], t.properties), p = Nt([ [ [l, f + s], [l + a, f + s], [l + a, f], [l, f + s] ] ], t.properties)), t.mask ? (a1(t.mask, h) && n.push(h), a1(t.mask, p) && n.push(p)) : (n.push(h), n.push(p)), f += s, c++; } u++, l += a; } return lt(n); } function Nhe(r, e, t) { if (t = t || {}, typeof t != "object") throw new Error("options is invalid"); var n = t.gridType, i = t.property, a = t.weight; if (!r) throw new Error("points is required"); if (df(r, "Point", "input must contain Points"), !e) throw new Error("cellSize is required"); if (a !== void 0 && typeof a != "number") throw new Error("weight must be a number"); i = i || "elevation", n = n || "square", a = a || 1; var o = Bn(r), s; switch (n) { case "point": case "points": s = ZH(o, e, t); break; case "square": case "squares": s = KW(o, e, t); break; case "hex": case "hexes": s = qW(o, e, t); break; case "triangle": case "triangles": s = JW(o, e, t); break; default: throw new Error("invalid gridType"); } var u = []; return Dr(s, function(l) { var c = 0, f = 0; Dr(r, function(p) { var d = n === "point" ? l : wh(l), v = zr(d, p, t), g; if (i !== void 0 && (g = p.properties[i]), g === void 0 && (g = p.geometry.coordinates[2]), g === void 0) throw new Error("zValue is missing"); v === 0 && (c = g); var m = 1 / Math.pow(v, a); f += m, c += m * g; }); var h = da(l); h.properties[i] = c / f, u.push(h); }), lt(u); } const Fhe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, projection: ofe, random: ffe, clusters: hfe, helpers: dH, invariant: nie, meta: _H, isolines: vie, convex: PH, pointsWithinPolygon: uD, within: uD, concave: _ae, collect: bae, flip: Tae, simplify: Dae, bezier: O3, bezierSpline: O3, tag: kae, sample: Vae, envelope: FH, square: BH, circle: RO, midpoint: $ae, center: Z1, centerOfMass: kH, centroid: wh, combine: Hae, distance: zr, explode: Rb, bbox: Bn, tesselate: aoe, bboxPolygon: OO, booleanPointInPolygon: nn, inside: nn, nearest: TS, nearestPoint: TS, nearestPointOnLine: Ec, pointOnLine: Ec, nearestPointToLine: goe, planepoint: yoe, tin: IH, bearing: Hc, destination: Hl, kinks: _oe, pointOnFeature: V3, pointOnSurface: V3, area: kb, along: Soe, length: vD, lineDistance: vD, lineSlice: Eoe, lineSliceAlong: jH, pointGrid: ZH, truncate: KH, flatten: gD, lineIntersect: vf, lineChunk: Noe, unkinkPolygon: joe, greatCircle: Yoe, lineSegment: wd, lineSplit: Xoe, lineArc: tU, polygonToLine: G_, polygonToLineString: G_, lineStringToPolygon: Q3, lineToPolygon: Q3, bboxClip: Qoe, lineOverlap: TU, sector: wue, rhumbBearing: xd, rhumbDistance: Bb, rhumbDestination: am, polygonTangents: Cue, rewind: bue, isobands: dle, transformRotate: PU, transformScale: IU, transformTranslate: Cle, lineOffset: Ale, polygonize: zle, booleanDisjoint: LU, booleanContains: Yle, booleanCrosses: rce, booleanClockwise: AS, booleanOverlap: sce, booleanPointOnLine: Mo, booleanEqual: uce, booleanWithin: YH, booleanIntersects: NU, clone: da, cleanCoords: yd, clustersDbscan: pce, clustersKmeans: Sce, pointToLineDistance: WH, booleanParallel: Ece, shortestPath: Pce, voronoi: qce, ellipse: jU, centerMean: QO, centerMedian: Zce, standardDeviationalEllipse: Kce, angle: Jce, polygonSmooth: Qce, moranIndex: nfe, distanceWeight: XU, bearingToAngle: gd, convertDistance: md, degrees2radians: Ii, distanceToDegrees: bS, distanceToRadians: vd, radians2degrees: _h, radiansToDistance: rm, difference: Ffe, buffer: bhe, union: Phe, intersect: a1, dissolve: Ihe, hexGrid: qW, mask: Dhe, squareGrid: KW, triangleGrid: JW, interpolate: Nhe, toMercator: ZU, toWgs84: KU, randomPosition: Q1, randomPoint: QU, randomPolygon: eW, randomLineString: tW, getCluster: nW, clusterEach: eR, clusterReduce: iW, createBins: tR, applyFilter: Wb, propertiesContainsFilter: rR, filterProperties: aW, earthRadius: wi, factors: Lb, unitsFactors: aH, areaFactors: ES, feature: fi, geometry: oH, point: Lt, points: sH, polygon: Nt, polygons: uH, lineString: Br, lineStrings: lH, featureCollection: lt, multiLineString: Hh, multiPoint: X1, multiPolygon: Fo, geometryCollection: mO, round: cH, radiansToLength: rm, lengthToRadians: vd, lengthToDegrees: bS, bearingToAzimuth: gd, radiansToDegrees: _h, degreesToRadians: Ii, convertLength: md, convertArea: fH, isNumber: Mi, isObject: $r, validateBBox: hH, validateId: pH, getCoord: qr, getCoords: pt, containsNumber: bO, geojsonType: wH, featureOf: O_, collectionOf: df, getGeom: on, getType: po, coordAll: nm, coordEach: Fn, coordReduce: yO, featureEach: Dr, featureReduce: wO, findPoint: yH, findSegment: mH, flattenEach: Yi, flattenReduce: gH, geomEach: Bo, geomReduce: xO, lineEach: SO, lineReduce: EO, propEach: _O, propReduce: vH, segmentEach: Sc, segmentReduce: CO }, Symbol.toStringTag, { value: "Module" })); const Bhe = { class: "cs-measure-container" }, khe = { class: "ms" }, Vhe = { class: "custom-measurements" }, Ghe = /* @__PURE__ */ Ne("\u5E73\u9762\u9762\u79EF"), zhe = /* @__PURE__ */ Ne("\u6E05\u9664"), $he = /* @__PURE__ */ de({ __name: "measure", emits: ["closeMeasure"], setup(r, { emit: e }) { const t = te(), n = te(), i = te(!0), a = te(!1), o = te(), s = _n([ "polyline", "horizontal", "vertical", "height", "area", "point" ]), u = _n({ direction: "left" }), l = _n({ preRenderDatas: [] }), c = () => { e("closeMeasure"); }, f = (d, v) => { if (d.finished && (o.value = !1, d.name === "horizontal" && a.value)) { let g = 0; d.positionsDegreesArray.forEach((C) => { g = C.pop(); }), d.positionsDegreesArray[d.positionsDegreesArray.length - 1] = d.positionsDegreesArray[0]; let m = Nt([[...d.positionsDegreesArray]]); const y = kb(m), _ = []; d.positionsDegreesArray.forEach((C) => { _.push(Lt(C)); }); const w = lt(_), x = Z1(w); window.viewer.entities.add({ name: "\u5E73\u9762\u9762\u79EF", id: Math.random() + Date.now() + "", position: window.Cesium.Cartesian3.fromDegrees( x.geometry.coordinates[0], x.geometry.coordinates[1], g ), point: { pixelSize: 5, color: window.Cesium.Color.fromCssColorString("#ee0000"), outlineColor: window.Cesium.Color.fromCssColorString("#fff"), outlineWidth: 2, show: !0 }, billboard: { image: "/src/assets/img/test/label.png", width: 25, height: 25 }, label: { text: `\u9762\u79EF\u4E3A\uFF1A${y.toFixed(2)}\u33A1`, font: "14pt Source Han Sans CN", fillColor: window.Cesium.Color.BLACK, backgroundColor: window.Cesium.Color.AQUA, showBackground: !0, outlineColor: window.Cesium.Color.WHITE, outlineWidth: 10, scale: 1, style: window.Cesium.LabelStyle.FILL_AND_OUTLINE, verticalOrigin: window.Cesium.VerticalOrigin.CENTER, horizontalOrigin: window.Cesium.HorizontalOrigin.LEFT, pixelOffset: new window.Cesium.Cartesian2(10, 0), show: !0, eyeOffset: new window.Cesium.Cartesian3(0, 0, -50) } }); } }, h = (d, v) => { var g; n.value = v, (g = t.value) == null || g.toggleAction(d.name); }, p = () => { var g; n.value = -1; const v = window.viewer.entities.values.filter((m) => m.name === "\u5E73\u9762\u9762\u79EF"); v.length > 0 && v.forEach((m) => { window.viewer.entities.remove(m); }), (g = t.value) == null || g.clearAll(); }; return (d, v) => { const g = mt("el-button"), m = mt("vc-measurements"); return Re(), St("div", Bhe, [ he("span", { class: "delete", onClick: c }, "x"), he("div", khe, [ re(m, { onDrawEvt: f, ref_key: "measurementsRef", ref: t, position: "top-right", "clamp-to-ground": !1, "main-fab-opts": u, editable: i.value, offset: [20, 60], measurements: s, areaMeasurementOpts: l }, { body: Ce((y) => [ he("div", Vhe, [ (Re(!0), St(yh, null, Ib(y, (_, w) => (Re(), Nr(g, { class: Ui({ isActive: n.value === w }), key: w, onClick: (x) => h(_, w) }, { default: Ce(() => [ Ne(us(_.tip.replace("\u91CF\u7B97", "")), 1) ]), _: 2 }, 1032, ["class", "onClick"]))), 128)), re(g, { class: Ui({ isActive: n.value === 6 }), onClick: v[0] || (v[0] = () => { var _; a.value = !0, n.value = 6, (_ = t.value) == null || _.toggleAction("horizontal"); }) }, { default: Ce(() => [ Ghe ]), _: 1 }, 8, ["class"]), re(g, { onClick: p }, { default: Ce(() => [ zhe ]), _: 1 }) ]) ]), _: 1 }, 8, ["main-fab-opts", "editable", "measurements", "areaMeasurementOpts"]) ]) ]); }; } }), Hhe = /* @__PURE__ */ zn($he, [["__scopeId", "data-v-45afd488"]]); function VD(r) { this.render = function() { Uhe(r); }, VD.prototype.init = function() { document.addEventListener("keydown", Ak, !1), document.addEventListener("keyup", Lk, !1), r.clock.onTick.addEventListener(this.render); }, VD.prototype.destroy = function() { document.removeEventListener("keydown", Ak, !1), document.removeEventListener("keyup", Lk, !1), r.clock.onTick.removeEventListener(this.render); }; } let Ha = { moveForward: !1, moveBackward: !1, moveLeft: !1, moveRight: !1, moveUp: !1, moveDown: !1, lookUp: !1, lookDown: !1, lookLeft: !1, lookRight: !1, twistLeft: !1, twistRight: !1, zoomIn: !1, zoomOut: !1 }; function QW(r) { switch (r) { case 87: return "moveForward"; case 83: return "moveBackward"; case 68: return "moveRight"; case 65: return "moveLeft"; case 81: return "moveUp"; case 69: return "moveDown"; case 38: return "lookUp"; case 40: return "lookDown"; case 37: return "lookLeft"; case 39: return "lookRight"; case 96: return "twistLeft"; case 110: return "twistRight"; case 107: return "zoomIn"; case 109: return "zoomOut"; default: return; } } function Ak(r) { r = QW(r.keyCode), r !== void 0 && (Ha[r] = !0); } function Lk(r) { r = QW(r.keyCode), r !== void 0 && (Ha[r] = !1); } function Uhe(n) { let e = n.camera; var n = n.scene.globe.ellipsoid.cartesianToCartographic(e.position).height, i = n / 20; Ha.moveForward && e.moveForward(i), Ha.moveBackward && e.moveBackward(i), Ha.moveLeft && e.moveLeft(i), Ha.moveRight && e.moveRight(i), Ha.moveUp && e.moveUp(i), Ha.moveDown && e.moveDown(i), Ha.lookUp && e.lookUp(), Ha.lookDown && e.lookDown(), Ha.lookLeft && e.lookLeft(), Ha.lookRight && e.lookRight(), Ha.twistLeft && e.twistLeft(), Ha.twistRight && e.twistRight(), Ha.zoomIn && e.zoomIn(n / 2), Ha.zoomOut && e.zoomOut(n / 2); } const sw = (r) => (al("data-v-5812c7e2"), r = r(), sl(), r), Whe = { id: "toolbar", class: "track" }, jhe = { class: "title" }, Yhe = { key: 0, class: "add" }, Xhe = /* @__PURE__ */ Ne("\u81EA\u5B9A\u4E49\u98DE\u884C "), qhe = /* @__PURE__ */ sw(() => /* @__PURE__ */ he("span", { class: "message" }, [ /* @__PURE__ */ Ne(" \u8C03\u6574\u597D\u89C6\u89D2\u540E\uFF0C\u518D\u70B9\u51FB\u5F53\u524D\u6309\u94AE"), /* @__PURE__ */ he("span", { style: { color: "#ff0000" } }, "(\u5FEB\u6377\u952EK)"), /* @__PURE__ */ Ne("\uFF0C\u5C31\u4F1A\u5728\u5F53\u524D\u89C6\u89D2\u4F4D\u7F6E\u6DFB\u52A0\u4E00\u4E2A\u98DE\u884C\u7AD9\u70B9\u3002 ") ], -1)), Zhe = [ Xhe, qhe ], Khe = /* @__PURE__ */ Ne("\u81EA\u5B9A\u4E49\u6F2B\u6E38 "), Jhe = /* @__PURE__ */ sw(() => /* @__PURE__ */ he("span", { class: "message" }, [ /* @__PURE__ */ Ne(" \u8C03\u6574\u597D\u89C6\u89D2\u540E\uFF0C\u518D\u70B9\u51FB\u5F53\u524D\u6309\u94AE"), /* @__PURE__ */ he("span", { style: { color: "#ff0000" } }, "(\u5FEB\u6377\u952EK)"), /* @__PURE__ */ Ne("\uFF0C\u5C31\u4F1A\u5728\u5F53\u524D\u89C6\u89D2\u4F4D\u7F6E\u6DFB\u52A0\u4E00\u4E2A\u6F2B\u6E38\u7AD9\u70B9\u3002 ") ], -1)), Qhe = [ Khe, Jhe ], epe = { key: 1, class: "keydown" }, tpe = /* @__PURE__ */ sw(() => /* @__PURE__ */ he("span", null, "\u76F8\u673A\u4F4D\u7F6E\uFF1AW\uFF1A\u5411\u524D\uFF1BS\uFF1A\u5411\u540E\uFF1BD\uFF1A\u5411\u53F3\uFF1BA\uFF1A\u5411\u5DE6\uFF1BQ\uFF1A\u5347\u9AD8\uFF1BE\uFF1A\u964D\u4F4E\uFF1B", -1)), rpe = /* @__PURE__ */ sw(() => /* @__PURE__ */ he("span", null, "\u76F8\u673A\u59FF\u6001\uFF1A\u2191\uFF1A\u62AC\u5934\uFF1B\u2193\uFF1A\u4F4E\u5934\uFF1B\u2190\uFF1A\u5DE6\u8F6C\uFF1B\u2192\uFF1A\u53F3\u8F6C\uFF1B0\uFF1A\u987A\u65F6\u9488\uFF1B.\uFF1A\u9006\u65F6\u9488", -1)), npe = /* @__PURE__ */ sw(() => /* @__PURE__ */ he("span", null, "\u7F29\u653E\uFF1A+\uFF1A\u653E\u5927\uFF0C-\uFF1A\u7F29\u5C0F\uFF1B", -1)), ipe = [ tpe, rpe, npe ], ape = /* @__PURE__ */ de({ __name: "track", emits: ["closeTrack"], setup(r, { emit: e }) { const t = new VD(window.viewer), n = te(0); let i = []; const a = te(!0), o = window.viewer.camera; Xm(window.Cesium, window.viewer).setInputAction((v) => { if (n.value === 1 && a.value === !0) { let g = window.viewer.scene.pickPosition(v.position); if (window.Cesium.defined(g)) { const m = window.Cesium.Cartographic.fromCartesian(g), y = window.Cesium.Math.toDegrees(m.longitude), _ = window.Cesium.Math.toDegrees(m.latitude), w = m.height + 0.3; i.push({ longitude: y, latitude: _, height: w }), window.viewer.entities.add({ name: "groundPoint", position: window.Cesium.Cartesian3.fromDegrees(y, _, w), point: { pixelSize: 5, color: window.Cesium.Color.fromCssColorString("#ee0000"), outlineColor: window.Cesium.Color.fromCssColorString("#fff"), outlineWidth: 2, show: !0 } }); } } }, window.Cesium.ScreenSpaceEventType.LEFT_CLICK); const u = () => { const v = window.Cesium.Cartesian3.clone(o.position), g = window.Cesium.Cartographic.fromCartesian(v), m = window.Cesium.Math.toDegrees(g.longitude), y = window.Cesium.Math.toDegrees(g.latitude), _ = g.height; i.push({ longitude: m, latitude: y, height: _, heading: o.heading, pitch: o.pitch, roll: o.roll, duration: 10 }), window.viewer.entities.add({ id: i.length + 1, name: "flyPoint", position: window.Cesium.Cartesian3.fromDegrees(m, y, _), point: { pixelSize: 5, color: window.Cesium.Color.fromCssColorString("#ee0000"), outlineColor: window.Cesium.Color.fromCssColorString("#fff"), outlineWidth: 2, show: !0 } }); }, l = async (v, g, m, y) => { const _ = await window.Cesium.IonResource.fromAssetId(y); console.log(_); const w = window.viewer.entities.add({ name: "plane", availability: new window.Cesium.TimeIntervalCollection([ new window.Cesium.TimeInterval({ start: v, stop: g }) ]), position: m, model: { uri: _ }, orientation: new window.Cesium.VelocityOrientationProperty(m), path: new window.Cesium.PathGraphics({ width: 3 }) }); window.viewer.trackedEntity = w; }, c = () => { let v = 0; const g = () => { if (v >= i.length) { v = 0; return; } o.flyTo({ destination: window.Cesium.Cartesian3.fromDegrees( i[v].longitude, i[v].latitude, i[v].height ), duration: i[v].duration, orientation: { heading: i[v].heading, pitch: i[v].pitch, roll: i[v].roll }, complete: function() { g(); }, easingFunction: window.Cesium.EasingFunction.LINEAR_NONE }), v++; }; g(); }, f = () => { a.value = !1; const v = 30, g = v * (i.length - 1), m = window.Cesium.JulianDate.fromDate(new Date()), y = window.Cesium.JulianDate.addSeconds( m, g, new window.Cesium.JulianDate() ); window.viewer.clock.startTime = m.clone(), window.viewer.clock.stopTime = y.clone(), window.viewer.clock.currentTime = m.clone(), window.viewer.timeline.zoomTo(m, y), window.viewer.clock.multiplier = 1, window.viewer.clock.shouldAnimate = !0; const _ = new window.Cesium.SampledPositionProperty(); for (let x = 0; x < i.length; x++) { const C = i[x], S = window.Cesium.JulianDate.addSeconds( m, x * v, new window.Cesium.JulianDate() ), b = window.Cesium.Cartesian3.fromDegrees( C.longitude, C.latitude, C.height ); _.addSample(S, b); } const w = window.viewer.entities.values; if (n.value === 0) { const x = w.find((C) => C.name === "plane"); x && window.viewer.entities.remove(x), l(m, y, _, 1220008); } else { const x = w.find((S) => S.name === "ground"); x && window.viewer.entities.remove(x); const C = window.viewer.entities.add({ name: "ground", availability: new window.Cesium.TimeIntervalCollection([ new window.Cesium.TimeInterval({ start: m, stop: y }) ]), position: _, point: { pixelSize: 30, color: window.Cesium.Color.GREEN }, path: new window.Cesium.PathGraphics({ width: 3 }) }); window.viewer.trackedEntity = C; } }, h = () => { i = []; const v = []; window.viewer.entities.values.forEach((g) => { (g.name === "flyPoint" || g.name === "plane" || g.name === "ground" || g.name === "groundPoint") && v.push(g); }), v.forEach((g) => { window.viewer.entities.remove(g); }), a.value = !0, setTimeout(() => { f(); }); }, p = () => { alert("\u529F\u80FD\u5F00\u53D1\u4E2D"); }; document.addEventListener("keydown", (v) => { v.key === "k" && (n.value === 0 || n.value === 2) && u(); }), Ve( () => n.value, (v) => { v === 3 ? t.init() : t.destroy(); } ); const d = () => { e("closeTrack"); }; return (v, g) => { const m = mt("el-option"), y = mt("el-select"); return Re(), St("div", Whe, [ he("span", { class: "delete", onClick: d }, "x"), he("div", jhe, [ re(y, { modelValue: n.value, "onUpdate:modelValue": g[0] || (g[0] = (_) => n.value = _), teleported: !1 }, { default: Ce(() => [ (Re(), Nr(m, { value: 0, key: 0, label: "\u98DE\u884C\u8F68\u8FF9" })), (Re(), Nr(m, { value: 1, key: 1, label: "\u9F20\u6807\u9009\u70B9\u8F68\u8FF9" })), (Re(), Nr(m, { value: 2, key: 2, label: "\u7B2C\u4E00\u4EBA\u79F0\u6F2B\u6E38" })), (Re(), Nr(m, { value: 3, key: 3, label: "\u952E\u76D8\u63A7\u5236\u6F2B\u6E38" })) ]), _: 1 }, 8, ["modelValue"]) ]), n.value !== 3 ? (Re(), St("div", Yhe, [ n.value === 0 ? (Re(), St("a", { key: 0, type: "button", class: "button customize", onClick: u }, Zhe)) : xe("", !0), n.value === 2 ? (Re(), St("a", { key: 1, type: "button", class: "button customize", onClick: u }, Qhe)) : xe("", !0), he("a", { type: "button", class: "button", onClick: p }, "\u5BFC\u5165\u7AD9\u70B9"), he("a", { type: "button", class: "button", onClick: h }, "\u6E05\u9664\u7AD9\u70B9") ])) : xe("", !0), ba(he("a", { type: "button", class: "button", onClick: f }, "\u5F00\u59CB", 512), [ [lo, n.value === 0 || n.value === 1] ]), ba(he("a", { type: "button", class: "button", onClick: c }, "\u5F00\u59CB\u6F2B\u6E38", 512), [ [lo, n.value === 2] ]), n.value === 3 ? (Re(), St("div", epe, ipe)) : xe("", !0) ]); }; } }), ope = /* @__PURE__ */ zn(ape, [["__scopeId", "data-v-5812c7e2"]]); const jh = (r) => (al("data-v-687676fa"), r = r(), sl(), r), spe = { class: "tileModelTool" }, upe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("span", { class: "title" }, "3d\u6A21\u578B\u8C03\u6574", -1)), lpe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("p", null, "\u7ECF\u5EA6\uFF1A", -1)), cpe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("p", null, "\u7EAC\u5EA6\uFF1A", -1)), fpe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("p", null, "\u9AD8\u5EA6\uFF1A", -1)), hpe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("p", null, "\u4EE5x\u8F74\u65CB\u8F6C", -1)), ppe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("p", null, "\u4EE5y\u8F74\u65CB\u8F6C", -1)), dpe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("p", null, "\u4EE5z\u8F74\u65CB\u8F6C", -1)), vpe = /* @__PURE__ */ jh(() => /* @__PURE__ */ he("p", null, "\u900F\u660E\u5EA6", -1)), gpe = /* @__PURE__ */ de({ __name: "tileModelTool", props: { modelValue: { type: Object, default: () => ({ longitude: 0, latitude: 0, height: 0, rx: 0, ry: 0, rz: 0, alpha: 1 }) } }, emits: ["update:modelValue", "closeTile"], setup(r, { emit: e }) { const n = te({ ...r.modelValue }); Ve( () => n.value, (a) => { e("update:modelValue", a); }, { deep: !0 } ); const i = () => { e("closeTile"); }; return (a, o) => { const s = mt("el-input"), u = mt("el-slider"); return Re(), St("div", spe, [ upe, he("span", { class: "delete", onClick: i }, "x"), he("div", null, [ lpe, re(s, { modelValue: n.value.longitude, "onUpdate:modelValue": o[0] || (o[0] = (l) => n.value.longitude = l) }, null, 8, ["modelValue"]), cpe, re(s, { modelValue: n.value.latitude, "onUpdate:modelValue": o[1] || (o[1] = (l) => n.value.latitude = l) }, null, 8, ["modelValue"]), fpe, re(u, { modelValue: n.value.height, "onUpdate:modelValue": o[2] || (o[2] = (l) => n.value.height = l), min: -100, max: 1e3 }, null, 8, ["modelValue"]), hpe, re(u, { modelValue: n.value.rx, "onUpdate:modelValue": o[3] || (o[3] = (l) => n.value.rx = l), min: -100, max: 100 }, null, 8, ["modelValue"]), ppe, re(u, { modelValue: n.value.ry, "onUpdate:modelValue": o[4] || (o[4] = (l) => n.value.ry = l), min: -100, max: 100 }, null, 8, ["modelValue"]), dpe, re(u, { modelValue: n.value.rz, "onUpdate:modelValue": o[5] || (o[5] = (l) => n.value.rz = l), min: -100, max: 100 }, null, 8, ["modelValue"]), vpe, re(u, { modelValue: n.value.alpha, "onUpdate:modelValue": o[6] || (o[6] = (l) => n.value.alpha = l), min: 0, max: 1, step: 0.1 }, null, 8, ["modelValue", "step"]) ]) ]); }; } }), mpe = /* @__PURE__ */ zn(gpe, [["__scopeId", "data-v-687676fa"]]); var ype = typeof global == "object" && global && global.Object === Object && global; const ej = ype; var _pe = typeof self == "object" && self && self.Object === Object && self, wpe = ej || _pe || Function("return this")(); const oc = wpe; var xpe = oc.Symbol; const pu = xpe; var tj = Object.prototype, Cpe = tj.hasOwnProperty, Spe = tj.toString, Ky = pu ? pu.toStringTag : void 0; function Epe(r) { var e = Cpe.call(r, Ky), t = r[Ky]; try { r[Ky] = void 0; var n = !0; } catch { } var i = Spe.call(r); return n && (e ? r[Ky] = t : delete r[Ky]), i; } var bpe = Object.prototype, Tpe = bpe.toString; function Ppe(r) { return Tpe.call(r); } var Ipe = "[object Null]", Ape = "[object Undefined]", Dk = pu ? pu.toStringTag : void 0; function ry(r) { return r == null ? r === void 0 ? Ape : Ipe : Dk && Dk in Object(r) ? Epe(r) : Ppe(r); } function Qc(r) { return r != null && typeof r == "object"; } var Lpe = "[object Symbol]"; function iT(r) { return typeof r == "symbol" || Qc(r) && ry(r) == Lpe; } function rj(r, e) { for (var t = -1, n = r == null ? 0 : r.length, i = Array(n); ++t < n; ) i[t] = e(r[t], t, r); return i; } var Dpe = Array.isArray; const du = Dpe; var Mpe = 1 / 0, Mk = pu ? pu.prototype : void 0, Ok = Mk ? Mk.toString : void 0; function nj(r) { if (typeof r == "string") return r; if (du(r)) return rj(r, nj) + ""; if (iT(r)) return Ok ? Ok.call(r) : ""; var e = r + ""; return e == "0" && 1 / r == -Mpe ? "-0" : e; } var Ope = /\s/; function Rpe(r) { for (var e = r.length; e-- && Ope.test(r.charAt(e)); ) ; return e; } var Npe = /^\s+/; function Fpe(r) { return r && r.slice(0, Rpe(r) + 1).replace(Npe, ""); } function Zl(r) { var e = typeof r; return r != null && (e == "object" || e == "function"); } var Rk = 0 / 0, Bpe = /^[-+]0x[0-9a-f]+$/i, kpe = /^0b[01]+$/i, Vpe = /^0o[0-7]+$/i, Gpe = parseInt; function zpe(r) { if (typeof r == "number") return r; if (iT(r)) return Rk; if (Zl(r)) { var e = typeof r.valueOf == "function" ? r.valueOf() : r; r = Zl(e) ? e + "" : e; } if (typeof r != "string") return r === 0 ? r : +r; r = Fpe(r); var t = kpe.test(r); return t || Vpe.test(r) ? Gpe(r.slice(2), t ? 2 : 8) : Bpe.test(r) ? Rk : +r; } var Nk = 1 / 0, $pe = 17976931348623157e292; function Hpe(r) { if (!r) return r === 0 ? r : 0; if (r = zpe(r), r === Nk || r === -Nk) { var e = r < 0 ? -1 : 1; return e * $pe; } return r === r ? r : 0; } function Upe(r) { var e = Hpe(r), t = e % 1; return e === e ? t ? e - t : e : 0; } function wR(r) { return r; } var Wpe = "[object AsyncFunction]", jpe = "[object Function]", Ype = "[object GeneratorFunction]", Xpe = "[object Proxy]"; function ij(r) { if (!Zl(r)) return !1; var e = ry(r); return e == jpe || e == Ype || e == Wpe || e == Xpe; } var qpe = oc["__core-js_shared__"]; const oI = qpe; var Fk = function() { var r = /[^.]+$/.exec(oI && oI.keys && oI.keys.IE_PROTO || ""); return r ? "Symbol(src)_1." + r : ""; }(); function Zpe(r) { return !!Fk && Fk in r; } var Kpe = Function.prototype, Jpe = Kpe.toString; function tv(r) { if (r != null) { try { return Jpe.call(r); } catch { } try { return r + ""; } catch { } } return ""; } var Qpe = /[\\^$.*+?()[\]{}|]/g, ede = /^\[object .+?Constructor\]$/, tde = Function.prototype, rde = Object.prototype, nde = tde.toString, ide = rde.hasOwnProperty, ade = RegExp( "^" + nde.call(ide).replace(Qpe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function ode(r) { if (!Zl(r) || Zpe(r)) return !1; var e = ij(r) ? ade : ede; return e.test(tv(r)); } function sde(r, e) { return r == null ? void 0 : r[e]; } function rv(r, e) { var t = sde(r, e); return ode(t) ? t : void 0; } var ude = rv(oc, "WeakMap"); const GD = ude; var Bk = Object.create, lde = function() { function r() { } return function(e) { if (!Zl(e)) return {}; if (Bk) return Bk(e); r.prototype = e; var t = new r(); return r.prototype = void 0, t; }; }(); const cde = lde; function fde(r, e, t) { switch (t.length) { case 0: return r.call(e); case 1: return r.call(e, t[0]); case 2: return r.call(e, t[0], t[1]); case 3: return r.call(e, t[0], t[1], t[2]); } return r.apply(e, t); } function hde(r, e) { var t = -1, n = r.length; for (e || (e = Array(n)); ++t < n; ) e[t] = r[t]; return e; } var pde = 800, dde = 16, vde = Date.now; function gde(r) { var e = 0, t = 0; return function() { var n = vde(), i = dde - (n - t); if (t = n, i > 0) { if (++e >= pde) return arguments[0]; } else e = 0; return r.apply(void 0, arguments); }; } function mde(r) { return function() { return r; }; } var yde = function() { try { var r = rv(Object, "defineProperty"); return r({}, "", {}), r; } catch { } }(); const WS = yde; var _de = WS ? function(r, e) { return WS(r, "toString", { configurable: !0, enumerable: !1, value: mde(e), writable: !0 }); } : wR; const wde = _de; var xde = gde(wde); const Cde = xde; function Sde(r, e) { for (var t = -1, n = r == null ? 0 : r.length; ++t < n && e(r[t], t, r) !== !1; ) ; return r; } function aj(r, e, t, n) { for (var i = r.length, a = t + (n ? 1 : -1); n ? a-- : ++a < i; ) if (e(r[a], a, r)) return a; return -1; } function Ede(r) { return r !== r; } function bde(r, e, t) { for (var n = t - 1, i = r.length; ++n < i; ) if (r[n] === e) return n; return -1; } function Tde(r, e, t) { return e === e ? bde(r, e, t) : aj(r, Ede, t); } function Pde(r, e) { var t = r == null ? 0 : r.length; return !!t && Tde(r, e, 0) > -1; } var Ide = 9007199254740991, Ade = /^(?:0|[1-9]\d*)$/; function aT(r, e) { var t = typeof r; return e = e == null ? Ide : e, !!e && (t == "number" || t != "symbol" && Ade.test(r)) && r > -1 && r % 1 == 0 && r < e; } function oj(r, e, t) { e == "__proto__" && WS ? WS(r, e, { configurable: !0, enumerable: !0, value: t, writable: !0 }) : r[e] = t; } function xR(r, e) { return r === e || r !== r && e !== e; } var Lde = Object.prototype, Dde = Lde.hasOwnProperty; function CR(r, e, t) { var n = r[e]; (!(Dde.call(r, e) && xR(n, t)) || t === void 0 && !(e in r)) && oj(r, e, t); } function oT(r, e, t, n) { var i = !t; t || (t = {}); for (var a = -1, o = e.length; ++a < o; ) { var s = e[a], u = n ? n(t[s], r[s], s, t, r) : void 0; u === void 0 && (u = r[s]), i ? oj(t, s, u) : CR(t, s, u); } return t; } var kk = Math.max; function Mde(r, e, t) { return e = kk(e === void 0 ? r.length - 1 : e, 0), function() { for (var n = arguments, i = -1, a = kk(n.length - e, 0), o = Array(a); ++i < a; ) o[i] = n[e + i]; i = -1; for (var s = Array(e + 1); ++i < e; ) s[i] = n[i]; return s[e] = t(o), fde(r, this, s); }; } function Ode(r, e) { return Cde(Mde(r, e, wR), r + ""); } var Rde = 9007199254740991; function SR(r) { return typeof r == "number" && r > -1 && r % 1 == 0 && r <= Rde; } function sT(r) { return r != null && SR(r.length) && !ij(r); } var Nde = Object.prototype; function ER(r) { var e = r && r.constructor, t = typeof e == "function" && e.prototype || Nde; return r === t; } function Fde(r, e) { for (var t = -1, n = Array(r); ++t < r; ) n[t] = e(t); return n; } var Bde = "[object Arguments]"; function Vk(r) { return Qc(r) && ry(r) == Bde; } var sj = Object.prototype, kde = sj.hasOwnProperty, Vde = sj.propertyIsEnumerable, Gde = Vk(function() { return arguments; }()) ? Vk : function(r) { return Qc(r) && kde.call(r, "callee") && !Vde.call(r, "callee"); }; const bR = Gde; function zde() { return !1; } var uj = typeof exports == "object" && exports && !exports.nodeType && exports, Gk = uj && typeof module == "object" && module && !module.nodeType && module, $de = Gk && Gk.exports === uj, zk = $de ? oc.Buffer : void 0, Hde = zk ? zk.isBuffer : void 0, Ude = Hde || zde; const jS = Ude; var Wde = "[object Arguments]", jde = "[object Array]", Yde = "[object Boolean]", Xde = "[object Date]", qde = "[object Error]", Zde = "[object Function]", Kde = "[object Map]", Jde = "[object Number]", Qde = "[object Object]", eve = "[object RegExp]", tve = "[object Set]", rve = "[object String]", nve = "[object WeakMap]", ive = "[object ArrayBuffer]", ave = "[object DataView]", ove = "[object Float32Array]", sve = "[object Float64Array]", uve = "[object Int8Array]", lve = "[object Int16Array]", cve = "[object Int32Array]", fve = "[object Uint8Array]", hve = "[object Uint8ClampedArray]", pve = "[object Uint16Array]", dve = "[object Uint32Array]", In = {}; In[ove] = In[sve] = In[uve] = In[lve] = In[cve] = In[fve] = In[hve] = In[pve] = In[dve] = !0; In[Wde] = In[jde] = In[ive] = In[Yde] = In[ave] = In[Xde] = In[qde] = In[Zde] = In[Kde] = In[Jde] = In[Qde] = In[eve] = In[tve] = In[rve] = In[nve] = !1; function vve(r) { return Qc(r) && SR(r.length) && !!In[ry(r)]; } function uT(r) { return function(e) { return r(e); }; } var lj = typeof exports == "object" && exports && !exports.nodeType && exports, o_ = lj && typeof module == "object" && module && !module.nodeType && module, gve = o_ && o_.exports === lj, sI = gve && ej.process, mve = function() { try { var r = o_ && o_.require && o_.require("util").types; return r || sI && sI.binding && sI.binding("util"); } catch { } }(); const Pm = mve; var $k = Pm && Pm.isTypedArray, yve = $k ? uT($k) : vve; const cj = yve; var _ve = Object.prototype, wve = _ve.hasOwnProperty; function fj(r, e) { var t = du(r), n = !t && bR(r), i = !t && !n && jS(r), a = !t && !n && !i && cj(r), o = t || n || i || a, s = o ? Fde(r.length, String) : [], u = s.length; for (var l in r) (e || wve.call(r, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || aT(l, u))) && s.push(l); return s; } function hj(r, e) { return function(t) { return r(e(t)); }; } var xve = hj(Object.keys, Object); const Cve = xve; var Sve = Object.prototype, Eve = Sve.hasOwnProperty; function bve(r) { if (!ER(r)) return Cve(r); var e = []; for (var t in Object(r)) Eve.call(r, t) && t != "constructor" && e.push(t); return e; } function uw(r) { return sT(r) ? fj(r) : bve(r); } function Tve(r) { var e = []; if (r != null) for (var t in Object(r)) e.push(t); return e; } var Pve = Object.prototype, Ive = Pve.hasOwnProperty; function Ave(r) { if (!Zl(r)) return Tve(r); var e = ER(r), t = []; for (var n in r) n == "constructor" && (e || !Ive.call(r, n)) || t.push(n); return t; } function TR(r) { return sT(r) ? fj(r, !0) : Ave(r); } var Lve = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Dve = /^\w*$/; function PR(r, e) { if (du(r)) return !1; var t = typeof r; return t == "number" || t == "symbol" || t == "boolean" || r == null || iT(r) ? !0 : Dve.test(r) || !Lve.test(r) || e != null && r in Object(e); } var Mve = rv(Object, "create"); const o1 = Mve; function Ove() { this.__data__ = o1 ? o1(null) : {}, this.size = 0; } function Rve(r) { var e = this.has(r) && delete this.__data__[r]; return this.size -= e ? 1 : 0, e; } var Nve = "__lodash_hash_undefined__", Fve = Object.prototype, Bve = Fve.hasOwnProperty; function kve(r) { var e = this.__data__; if (o1) { var t = e[r]; return t === Nve ? void 0 : t; } return Bve.call(e, r) ? e[r] : void 0; } var Vve = Object.prototype, Gve = Vve.hasOwnProperty; function zve(r) { var e = this.__data__; return o1 ? e[r] !== void 0 : Gve.call(e, r); } var $ve = "__lodash_hash_undefined__"; function Hve(r, e) { var t = this.__data__; return this.size += this.has(r) ? 0 : 1, t[r] = o1 && e === void 0 ? $ve : e, this; } function Nd(r) { var e = -1, t = r == null ? 0 : r.length; for (this.clear(); ++e < t; ) { var n = r[e]; this.set(n[0], n[1]); } } Nd.prototype.clear = Ove; Nd.prototype.delete = Rve; Nd.prototype.get = kve; Nd.prototype.has = zve; Nd.prototype.set = Hve; function Uve() { this.__data__ = [], this.size = 0; } function lT(r, e) { for (var t = r.length; t--; ) if (xR(r[t][0], e)) return t; return -1; } var Wve = Array.prototype, jve = Wve.splice; function Yve(r) { var e = this.__data__, t = lT(e, r); if (t < 0) return !1; var n = e.length - 1; return t == n ? e.pop() : jve.call(e, t, 1), --this.size, !0; } function Xve(r) { var e = this.__data__, t = lT(e, r); return t < 0 ? void 0 : e[t][1]; } function qve(r) { return lT(this.__data__, r) > -1; } function Zve(r, e) { var t = this.__data__, n = lT(t, r); return n < 0 ? (++this.size, t.push([r, e])) : t[n][1] = e, this; } function gf(r) { var e = -1, t = r == null ? 0 : r.length; for (this.clear(); ++e < t; ) { var n = r[e]; this.set(n[0], n[1]); } } gf.prototype.clear = Uve; gf.prototype.delete = Yve; gf.prototype.get = Xve; gf.prototype.has = qve; gf.prototype.set = Zve; var Kve = rv(oc, "Map"); const s1 = Kve; function Jve() { this.size = 0, this.__data__ = { hash: new Nd(), map: new (s1 || gf)(), string: new Nd() }; } function Qve(r) { var e = typeof r; return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null; } function cT(r, e) { var t = r.__data__; return Qve(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map; } function ege(r) { var e = cT(this, r).delete(r); return this.size -= e ? 1 : 0, e; } function tge(r) { return cT(this, r).get(r); } function rge(r) { return cT(this, r).has(r); } function nge(r, e) { var t = cT(this, r), n = t.size; return t.set(r, e), this.size += t.size == n ? 0 : 1, this; } function mf(r) { var e = -1, t = r == null ? 0 : r.length; for (this.clear(); ++e < t; ) { var n = r[e]; this.set(n[0], n[1]); } } mf.prototype.clear = Jve; mf.prototype.delete = ege; mf.prototype.get = tge; mf.prototype.has = rge; mf.prototype.set = nge; var ige = "Expected a function"; function IR(r, e) { if (typeof r != "function" || e != null && typeof e != "function") throw new TypeError(ige); var t = function() { var n = arguments, i = e ? e.apply(this, n) : n[0], a = t.cache; if (a.has(i)) return a.get(i); var o = r.apply(this, n); return t.cache = a.set(i, o) || a, o; }; return t.cache = new (IR.Cache || mf)(), t; } IR.Cache = mf; var age = 500; function oge(r) { var e = IR(r, function(n) { return t.size === age && t.clear(), n; }), t = e.cache; return e; } var sge = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, uge = /\\(\\)?/g, lge = oge(function(r) { var e = []; return r.charCodeAt(0) === 46 && e.push(""), r.replace(sge, function(t, n, i, a) { e.push(i ? a.replace(uge, "$1") : n || t); }), e; }); const cge = lge; function lw(r) { return r == null ? "" : nj(r); } function fT(r, e) { return du(r) ? r : PR(r, e) ? [r] : cge(lw(r)); } var fge = 1 / 0; function ny(r) { if (typeof r == "string" || iT(r)) return r; var e = r + ""; return e == "0" && 1 / r == -fge ? "-0" : e; } function AR(r, e) { e = fT(e, r); for (var t = 0, n = e.length; r != null && t < n; ) r = r[ny(e[t++])]; return t && t == n ? r : void 0; } function LR(r, e, t) { var n = r == null ? void 0 : AR(r, e); return n === void 0 ? t : n; } function DR(r, e) { for (var t = -1, n = e.length, i = r.length; ++t < n; ) r[i + t] = e[t]; return r; } var Hk = pu ? pu.isConcatSpreadable : void 0; function hge(r) { return du(r) || bR(r) || !!(Hk && r && r[Hk]); } function pj(r, e, t, n, i) { var a = -1, o = r.length; for (t || (t = hge), i || (i = []); ++a < o; ) { var s = r[a]; e > 0 && t(s) ? e > 1 ? pj(s, e - 1, t, n, i) : DR(i, s) : n || (i[i.length] = s); } return i; } var pge = hj(Object.getPrototypeOf, Object); const dj = pge; function vj(r, e, t) { var n = -1, i = r.length; e < 0 && (e = -e > i ? 0 : i + e), t = t > i ? i : t, t < 0 && (t += i), i = e > t ? 0 : t - e >>> 0, e >>>= 0; for (var a = Array(i); ++n < i; ) a[n] = r[n + e]; return a; } function dge(r, e, t) { var n = r.length; return t = t === void 0 ? n : t, !e && t >= n ? r : vj(r, e, t); } var vge = "\\ud800-\\udfff", gge = "\\u0300-\\u036f", mge = "\\ufe20-\\ufe2f", yge = "\\u20d0-\\u20ff", _ge = gge + mge + yge, wge = "\\ufe0e\\ufe0f", xge = "\\u200d", Cge = RegExp("[" + xge + vge + _ge + wge + "]"); function gj(r) { return Cge.test(r); } function Sge(r) { return r.split(""); } var mj = "\\ud800-\\udfff", Ege = "\\u0300-\\u036f", bge = "\\ufe20-\\ufe2f", Tge = "\\u20d0-\\u20ff", Pge = Ege + bge + Tge, Ige = "\\ufe0e\\ufe0f", Age = "[" + mj + "]", zD = "[" + Pge + "]", $D = "\\ud83c[\\udffb-\\udfff]", Lge = "(?:" + zD + "|" + $D + ")", yj = "[^" + mj + "]", _j = "(?:\\ud83c[\\udde6-\\uddff]){2}", wj = "[\\ud800-\\udbff][\\udc00-\\udfff]", Dge = "\\u200d", xj = Lge + "?", Cj = "[" + Ige + "]?", Mge = "(?:" + Dge + "(?:" + [yj, _j, wj].join("|") + ")" + Cj + xj + ")*", Oge = Cj + xj + Mge, Rge = "(?:" + [yj + zD + "?", zD, _j, wj, Age].join("|") + ")", Nge = RegExp($D + "(?=" + $D + ")|" + Rge + Oge, "g"); function Fge(r) { return r.match(Nge) || []; } function Bge(r) { return gj(r) ? Fge(r) : Sge(r); } function kge(r) { return function(e) { e = lw(e); var t = gj(e) ? Bge(e) : void 0, n = t ? t[0] : e.charAt(0), i = t ? dge(t, 1).join("") : e.slice(1); return n[r]() + i; }; } var Vge = kge("toUpperCase"); const Gge = Vge; function zge(r) { return Gge(lw(r).toLowerCase()); } function $ge(r, e, t, n) { var i = -1, a = r == null ? 0 : r.length; for (n && a && (t = r[++i]); ++i < a; ) t = e(t, r[i], i, r); return t; } function Hge(r) { return function(e) { return r == null ? void 0 : r[e]; }; } var Uge = { \u00C0: "A", \u00C1: "A", \u00C2: "A", \u00C3: "A", \u00C4: "A", \u00C5: "A", \u00E0: "a", \u00E1: "a", \u00E2: "a", \u00E3: "a", \u00E4: "a", \u00E5: "a", \u00C7: "C", \u00E7: "c", \u00D0: "D", \u00F0: "d", \u00C8: "E", \u00C9: "E", \u00CA: "E", \u00CB: "E", \u00E8: "e", \u00E9: "e", \u00EA: "e", \u00EB: "e", \u00CC: "I", \u00CD: "I", \u00CE: "I", \u00CF: "I", \u00EC: "i", \u00ED: "i", \u00EE: "i", \u00EF: "i", \u00D1: "N", \u00F1: "n", \u00D2: "O", \u00D3: "O", \u00D4: "O", \u00D5: "O", \u00D6: "O", \u00D8: "O", \u00F2: "o", \u00F3: "o", \u00F4: "o", \u00F5: "o", \u00F6: "o", \u00F8: "o", \u00D9: "U", \u00DA: "U", \u00DB: "U", \u00DC: "U", \u00F9: "u", \u00FA: "u", \u00FB: "u", \u00FC: "u", \u00DD: "Y", \u00FD: "y", \u00FF: "y", \u00C6: "Ae", \u00E6: "ae", \u00DE: "Th", \u00FE: "th", \u00DF: "ss", \u0100: "A", \u0102: "A", \u0104: "A", \u0101: "a", \u0103: "a", \u0105: "a", \u0106: "C", \u0108: "C", \u010A: "C", \u010C: "C", \u0107: "c", \u0109: "c", \u010B: "c", \u010D: "c", \u010E: "D", \u0110: "D", \u010F: "d", \u0111: "d", \u0112: "E", \u0114: "E", \u0116: "E", \u0118: "E", \u011A: "E", \u0113: "e", \u0115: "e", \u0117: "e", \u0119: "e", \u011B: "e", \u011C: "G", \u011E: "G", \u0120: "G", \u0122: "G", \u011D: "g", \u011F: "g", \u0121: "g", \u0123: "g", \u0124: "H", \u0126: "H", \u0125: "h", \u0127: "h", \u0128: "I", \u012A: "I", \u012C: "I", \u012E: "I", \u0130: "I", \u0129: "i", \u012B: "i", \u012D: "i", \u012F: "i", \u0131: "i", \u0134: "J", \u0135: "j", \u0136: "K", \u0137: "k", \u0138: "k", \u0139: "L", \u013B: "L", \u013D: "L", \u013F: "L", \u0141: "L", \u013A: "l", \u013C: "l", \u013E: "l", \u0140: "l", \u0142: "l", \u0143: "N", \u0145: "N", \u0147: "N", \u014A: "N", \u0144: "n", \u0146: "n", \u0148: "n", \u014B: "n", \u014C: "O", \u014E: "O", \u0150: "O", \u014D: "o", \u014F: "o", \u0151: "o", \u0154: "R", \u0156: "R", \u0158: "R", \u0155: "r", \u0157: "r", \u0159: "r", \u015A: "S", \u015C: "S", \u015E: "S", \u0160: "S", \u015B: "s", \u015D: "s", \u015F: "s", \u0161: "s", \u0162: "T", \u0164: "T", \u0166: "T", \u0163: "t", \u0165: "t", \u0167: "t", \u0168: "U", \u016A: "U", \u016C: "U", \u016E: "U", \u0170: "U", \u0172: "U", \u0169: "u", \u016B: "u", \u016D: "u", \u016F: "u", \u0171: "u", \u0173: "u", \u0174: "W", \u0175: "w", \u0176: "Y", \u0177: "y", \u0178: "Y", \u0179: "Z", \u017B: "Z", \u017D: "Z", \u017A: "z", \u017C: "z", \u017E: "z", \u0132: "IJ", \u0133: "ij", \u0152: "Oe", \u0153: "oe", \u0149: "'n", \u017F: "s" }, Wge = Hge(Uge); const jge = Wge; var Yge = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Xge = "\\u0300-\\u036f", qge = "\\ufe20-\\ufe2f", Zge = "\\u20d0-\\u20ff", Kge = Xge + qge + Zge, Jge = "[" + Kge + "]", Qge = RegExp(Jge, "g"); function eme(r) { return r = lw(r), r && r.replace(Yge, jge).replace(Qge, ""); } var tme = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; function rme(r) { return r.match(tme) || []; } var nme = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; function ime(r) { return nme.test(r); } var Sj = "\\ud800-\\udfff", ame = "\\u0300-\\u036f", ome = "\\ufe20-\\ufe2f", sme = "\\u20d0-\\u20ff", ume = ame + ome + sme, Ej = "\\u2700-\\u27bf", bj = "a-z\\xdf-\\xf6\\xf8-\\xff", lme = "\\xac\\xb1\\xd7\\xf7", cme = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", fme = "\\u2000-\\u206f", hme = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Tj = "A-Z\\xc0-\\xd6\\xd8-\\xde", pme = "\\ufe0e\\ufe0f", Pj = lme + cme + fme + hme, Ij = "['\u2019]", Uk = "[" + Pj + "]", dme = "[" + ume + "]", Aj = "\\d+", vme = "[" + Ej + "]", Lj = "[" + bj + "]", Dj = "[^" + Sj + Pj + Aj + Ej + bj + Tj + "]", gme = "\\ud83c[\\udffb-\\udfff]", mme = "(?:" + dme + "|" + gme + ")", yme = "[^" + Sj + "]", Mj = "(?:\\ud83c[\\udde6-\\uddff]){2}", Oj = "[\\ud800-\\udbff][\\udc00-\\udfff]", hg = "[" + Tj + "]", _me = "\\u200d", Wk = "(?:" + Lj + "|" + Dj + ")", wme = "(?:" + hg + "|" + Dj + ")", jk = "(?:" + Ij + "(?:d|ll|m|re|s|t|ve))?", Yk = "(?:" + Ij + "(?:D|LL|M|RE|S|T|VE))?", Rj = mme + "?", Nj = "[" + pme + "]?", xme = "(?:" + _me + "(?:" + [yme, Mj, Oj].join("|") + ")" + Nj + Rj + ")*", Cme = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Sme = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Eme = Nj + Rj + xme, bme = "(?:" + [vme, Mj, Oj].join("|") + ")" + Eme, Tme = RegExp([ hg + "?" + Lj + "+" + jk + "(?=" + [Uk, hg, "$"].join("|") + ")", wme + "+" + Yk + "(?=" + [Uk, hg + Wk, "$"].join("|") + ")", hg + "?" + Wk + "+" + jk, hg + "+" + Yk, Sme, Cme, Aj, bme ].join("|"), "g"); function Pme(r) { return r.match(Tme) || []; } function Ime(r, e, t) { return r = lw(r), e = t ? void 0 : e, e === void 0 ? ime(r) ? Pme(r) : rme(r) : r.match(e) || []; } var Ame = "['\u2019]", Lme = RegExp(Ame, "g"); function Dme(r) { return function(e) { return $ge(Ime(eme(e).replace(Lme, "")), r, ""); }; } var Mme = Dme(function(r, e, t) { return e = e.toLowerCase(), r + (t ? zge(e) : e); }); const Ome = Mme; function HD() { if (!arguments.length) return []; var r = arguments[0]; return du(r) ? r : [r]; } function Rme() { this.__data__ = new gf(), this.size = 0; } function Nme(r) { var e = this.__data__, t = e.delete(r); return this.size = e.size, t; } function Fme(r) { return this.__data__.get(r); } function Bme(r) { return this.__data__.has(r); } var kme = 200; function Vme(r, e) { var t = this.__data__; if (t instanceof gf) { var n = t.__data__; if (!s1 || n.length < kme - 1) return n.push([r, e]), this.size = ++t.size, this; t = this.__data__ = new mf(n); } return t.set(r, e), this.size = t.size, this; } function zl(r) { var e = this.__data__ = new gf(r); this.size = e.size; } zl.prototype.clear = Rme; zl.prototype.delete = Nme; zl.prototype.get = Fme; zl.prototype.has = Bme; zl.prototype.set = Vme; function Gme(r, e) { return r && oT(e, uw(e), r); } function zme(r, e) { return r && oT(e, TR(e), r); } var Fj = typeof exports == "object" && exports && !exports.nodeType && exports, Xk = Fj && typeof module == "object" && module && !module.nodeType && module, $me = Xk && Xk.exports === Fj, qk = $me ? oc.Buffer : void 0, Zk = qk ? qk.allocUnsafe : void 0; function Hme(r, e) { if (e) return r.slice(); var t = r.length, n = Zk ? Zk(t) : new r.constructor(t); return r.copy(n), n; } function Ume(r, e) { for (var t = -1, n = r == null ? 0 : r.length, i = 0, a = []; ++t < n; ) { var o = r[t]; e(o, t, r) && (a[i++] = o); } return a; } function Bj() { return []; } var Wme = Object.prototype, jme = Wme.propertyIsEnumerable, Kk = Object.getOwnPropertySymbols, Yme = Kk ? function(r) { return r == null ? [] : (r = Object(r), Ume(Kk(r), function(e) { return jme.call(r, e); })); } : Bj; const MR = Yme; function Xme(r, e) { return oT(r, MR(r), e); } var qme = Object.getOwnPropertySymbols, Zme = qme ? function(r) { for (var e = []; r; ) DR(e, MR(r)), r = dj(r); return e; } : Bj; const kj = Zme; function Kme(r, e) { return oT(r, kj(r), e); } function Vj(r, e, t) { var n = e(r); return du(r) ? n : DR(n, t(r)); } function UD(r) { return Vj(r, uw, MR); } function Jme(r) { return Vj(r, TR, kj); } var Qme = rv(oc, "DataView"); const WD = Qme; var eye = rv(oc, "Promise"); const jD = eye; var tye = rv(oc, "Set"); const YD = tye; var Jk = "[object Map]", rye = "[object Object]", Qk = "[object Promise]", eV = "[object Set]", tV = "[object WeakMap]", rV = "[object DataView]", nye = tv(WD), iye = tv(s1), aye = tv(jD), oye = tv(YD), sye = tv(GD), Pp = ry; (WD && Pp(new WD(new ArrayBuffer(1))) != rV || s1 && Pp(new s1()) != Jk || jD && Pp(jD.resolve()) != Qk || YD && Pp(new YD()) != eV || GD && Pp(new GD()) != tV) && (Pp = function(r) { var e = ry(r), t = e == rye ? r.constructor : void 0, n = t ? tv(t) : ""; if (n) switch (n) { case nye: return rV; case iye: return Jk; case aye: return Qk; case oye: return eV; case sye: return tV; } return e; }); const u1 = Pp; var uye = Object.prototype, lye = uye.hasOwnProperty; function cye(r) { var e = r.length, t = new r.constructor(e); return e && typeof r[0] == "string" && lye.call(r, "index") && (t.index = r.index, t.input = r.input), t; } var fye = oc.Uint8Array; const YS = fye; function OR(r) { var e = new r.constructor(r.byteLength); return new YS(e).set(new YS(r)), e; } function hye(r, e) { var t = e ? OR(r.buffer) : r.buffer; return new r.constructor(t, r.byteOffset, r.byteLength); } var pye = /\w*$/; function dye(r) { var e = new r.constructor(r.source, pye.exec(r)); return e.lastIndex = r.lastIndex, e; } var nV = pu ? pu.prototype : void 0, iV = nV ? nV.valueOf : void 0; function vye(r) { return iV ? Object(iV.call(r)) : {}; } function gye(r, e) { var t = e ? OR(r.buffer) : r.buffer; return new r.constructor(t, r.byteOffset, r.length); } var mye = "[object Boolean]", yye = "[object Date]", _ye = "[object Map]", wye = "[object Number]", xye = "[object RegExp]", Cye = "[object Set]", Sye = "[object String]", Eye = "[object Symbol]", bye = "[object ArrayBuffer]", Tye = "[object DataView]", Pye = "[object Float32Array]", Iye = "[object Float64Array]", Aye = "[object Int8Array]", Lye = "[object Int16Array]", Dye = "[object Int32Array]", Mye = "[object Uint8Array]", Oye = "[object Uint8ClampedArray]", Rye = "[object Uint16Array]", Nye = "[object Uint32Array]"; function Fye(r, e, t) { var n = r.constructor; switch (e) { case bye: return OR(r); case mye: case yye: return new n(+r); case Tye: return hye(r, t); case Pye: case Iye: case Aye: case Lye: case Dye: case Mye: case Oye: case Rye: case Nye: return gye(r, t); case _ye: return new n(); case wye: case Sye: return new n(r); case xye: return dye(r); case Cye: return new n(); case Eye: return vye(r); } } function Bye(r) { return typeof r.constructor == "function" && !ER(r) ? cde(dj(r)) : {}; } var kye = "[object Map]"; function Vye(r) { return Qc(r) && u1(r) == kye; } var aV = Pm && Pm.isMap, Gye = aV ? uT(aV) : Vye; const zye = Gye; var $ye = "[object Set]"; function Hye(r) { return Qc(r) && u1(r) == $ye; } var oV = Pm && Pm.isSet, Uye = oV ? uT(oV) : Hye; const Wye = Uye; var jye = 1, Yye = 2, Xye = 4, Gj = "[object Arguments]", qye = "[object Array]", Zye = "[object Boolean]", Kye = "[object Date]", Jye = "[object Error]", zj = "[object Function]", Qye = "[object GeneratorFunction]", e0e = "[object Map]", t0e = "[object Number]", $j = "[object Object]", r0e = "[object RegExp]", n0e = "[object Set]", i0e = "[object String]", a0e = "[object Symbol]", o0e = "[object WeakMap]", s0e = "[object ArrayBuffer]", u0e = "[object DataView]", l0e = "[object Float32Array]", c0e = "[object Float64Array]", f0e = "[object Int8Array]", h0e = "[object Int16Array]", p0e = "[object Int32Array]", d0e = "[object Uint8Array]", v0e = "[object Uint8ClampedArray]", g0e = "[object Uint16Array]", m0e = "[object Uint32Array]", gn = {}; gn[Gj] = gn[qye] = gn[s0e] = gn[u0e] = gn[Zye] = gn[Kye] = gn[l0e] = gn[c0e] = gn[f0e] = gn[h0e] = gn[p0e] = gn[e0e] = gn[t0e] = gn[$j] = gn[r0e] = gn[n0e] = gn[i0e] = gn[a0e] = gn[d0e] = gn[v0e] = gn[g0e] = gn[m0e] = !0; gn[Jye] = gn[zj] = gn[o0e] = !1; function s_(r, e, t, n, i, a) { var o, s = e & jye, u = e & Yye, l = e & Xye; if (t && (o = i ? t(r, n, i, a) : t(r)), o !== void 0) return o; if (!Zl(r)) return r; var c = du(r); if (c) { if (o = cye(r), !s) return hde(r, o); } else { var f = u1(r), h = f == zj || f == Qye; if (jS(r)) return Hme(r, s); if (f == $j || f == Gj || h && !i) { if (o = u || h ? {} : Bye(r), !s) return u ? Kme(r, zme(o, r)) : Xme(r, Gme(o, r)); } else { if (!gn[f]) return i ? r : {}; o = Fye(r, f, s); } } a || (a = new zl()); var p = a.get(r); if (p) return p; a.set(r, o), Wye(r) ? r.forEach(function(g) { o.add(s_(g, e, t, g, r, a)); }) : zye(r) && r.forEach(function(g, m) { o.set(m, s_(g, e, t, m, r, a)); }); var d = l ? u ? Jme : UD : u ? TR : uw, v = c ? void 0 : d(r); return Sde(v || r, function(g, m) { v && (m = g, g = r[m]), CR(o, m, s_(g, e, t, m, r, a)); }), o; } var y0e = 4; function sV(r) { return s_(r, y0e); } var _0e = 1, w0e = 4; function nv(r) { return s_(r, _0e | w0e); } var x0e = "__lodash_hash_undefined__"; function C0e(r) { return this.__data__.set(r, x0e), this; } function S0e(r) { return this.__data__.has(r); } function l1(r) { var e = -1, t = r == null ? 0 : r.length; for (this.__data__ = new mf(); ++e < t; ) this.add(r[e]); } l1.prototype.add = l1.prototype.push = C0e; l1.prototype.has = S0e; function E0e(r, e) { for (var t = -1, n = r == null ? 0 : r.length; ++t < n; ) if (e(r[t], t, r)) return !0; return !1; } function Hj(r, e) { return r.has(e); } var b0e = 1, T0e = 2; function Uj(r, e, t, n, i, a) { var o = t & b0e, s = r.length, u = e.length; if (s != u && !(o && u > s)) return !1; var l = a.get(r), c = a.get(e); if (l && c) return l == e && c == r; var f = -1, h = !0, p = t & T0e ? new l1() : void 0; for (a.set(r, e), a.set(e, r); ++f < s; ) { var d = r[f], v = e[f]; if (n) var g = o ? n(v, d, f, e, r, a) : n(d, v, f, r, e, a); if (g !== void 0) { if (g) continue; h = !1; break; } if (p) { if (!E0e(e, function(m, y) { if (!Hj(p, y) && (d === m || i(d, m, t, n, a))) return p.push(y); })) { h = !1; break; } } else if (!(d === v || i(d, v, t, n, a))) { h = !1; break; } } return a.delete(r), a.delete(e), h; } function P0e(r) { var e = -1, t = Array(r.size); return r.forEach(function(n, i) { t[++e] = [i, n]; }), t; } function I0e(r) { var e = -1, t = Array(r.size); return r.forEach(function(n) { t[++e] = n; }), t; } var A0e = 1, L0e = 2, D0e = "[object Boolean]", M0e = "[object Date]", O0e = "[object Error]", R0e = "[object Map]", N0e = "[object Number]", F0e = "[object RegExp]", B0e = "[object Set]", k0e = "[object String]", V0e = "[object Symbol]", G0e = "[object ArrayBuffer]", z0e = "[object DataView]", uV = pu ? pu.prototype : void 0, uI = uV ? uV.valueOf : void 0; function $0e(r, e, t, n, i, a, o) { switch (t) { case z0e: if (r.byteLength != e.byteLength || r.byteOffset != e.byteOffset) return !1; r = r.buffer, e = e.buffer; case G0e: return !(r.byteLength != e.byteLength || !a(new YS(r), new YS(e))); case D0e: case M0e: case N0e: return xR(+r, +e); case O0e: return r.name == e.name && r.message == e.message; case F0e: case k0e: return r == e + ""; case R0e: var s = P0e; case B0e: var u = n & A0e; if (s || (s = I0e), r.size != e.size && !u) return !1; var l = o.get(r); if (l) return l == e; n |= L0e, o.set(r, e); var c = Uj(s(r), s(e), n, i, a, o); return o.delete(r), c; case V0e: if (uI) return uI.call(r) == uI.call(e); } return !1; } var H0e = 1, U0e = Object.prototype, W0e = U0e.hasOwnProperty; function j0e(r, e, t, n, i, a) { var o = t & H0e, s = UD(r), u = s.length, l = UD(e), c = l.length; if (u != c && !o) return !1; for (var f = u; f--; ) { var h = s[f]; if (!(o ? h in e : W0e.call(e, h))) return !1; } var p = a.get(r), d = a.get(e); if (p && d) return p == e && d == r; var v = !0; a.set(r, e), a.set(e, r); for (var g = o; ++f < u; ) { h = s[f]; var m = r[h], y = e[h]; if (n) var _ = o ? n(y, m, h, e, r, a) : n(m, y, h, r, e, a); if (!(_ === void 0 ? m === y || i(m, y, t, n, a) : _)) { v = !1; break; } g || (g = h == "constructor"); } if (v && !g) { var w = r.constructor, x = e.constructor; w != x && "constructor" in r && "constructor" in e && !(typeof w == "function" && w instanceof w && typeof x == "function" && x instanceof x) && (v = !1); } return a.delete(r), a.delete(e), v; } var Y0e = 1, lV = "[object Arguments]", cV = "[object Array]", Lx = "[object Object]", X0e = Object.prototype, fV = X0e.hasOwnProperty; function q0e(r, e, t, n, i, a) { var o = du(r), s = du(e), u = o ? cV : u1(r), l = s ? cV : u1(e); u = u == lV ? Lx : u, l = l == lV ? Lx : l; var c = u == Lx, f = l == Lx, h = u == l; if (h && jS(r)) { if (!jS(e)) return !1; o = !0, c = !1; } if (h && !c) return a || (a = new zl()), o || cj(r) ? Uj(r, e, t, n, i, a) : $0e(r, e, u, t, n, i, a); if (!(t & Y0e)) { var p = c && fV.call(r, "__wrapped__"), d = f && fV.call(e, "__wrapped__"); if (p || d) { var v = p ? r.value() : r, g = d ? e.value() : e; return a || (a = new zl()), i(v, g, t, n, a); } } return h ? (a || (a = new zl()), j0e(r, e, t, n, i, a)) : !1; } function hT(r, e, t, n, i) { return r === e ? !0 : r == null || e == null || !Qc(r) && !Qc(e) ? r !== r && e !== e : q0e(r, e, t, n, hT, i); } var Z0e = 1, K0e = 2; function J0e(r, e, t, n) { var i = t.length, a = i, o = !n; if (r == null) return !a; for (r = Object(r); i--; ) { var s = t[i]; if (o && s[2] ? s[1] !== r[s[0]] : !(s[0] in r)) return !1; } for (; ++i < a; ) { s = t[i]; var u = s[0], l = r[u], c = s[1]; if (o && s[2]) { if (l === void 0 && !(u in r)) return !1; } else { var f = new zl(); if (n) var h = n(l, c, u, r, e, f); if (!(h === void 0 ? hT(c, l, Z0e | K0e, n, f) : h)) return !1; } } return !0; } function Wj(r) { return r === r && !Zl(r); } function Q0e(r) { for (var e = uw(r), t = e.length; t--; ) { var n = e[t], i = r[n]; e[t] = [n, i, Wj(i)]; } return e; } function jj(r, e) { return function(t) { return t == null ? !1 : t[r] === e && (e !== void 0 || r in Object(t)); }; } function e_e(r) { var e = Q0e(r); return e.length == 1 && e[0][2] ? jj(e[0][0], e[0][1]) : function(t) { return t === r || J0e(t, r, e); }; } function t_e(r, e) { return r != null && e in Object(r); } function r_e(r, e, t) { e = fT(e, r); for (var n = -1, i = e.length, a = !1; ++n < i; ) { var o = ny(e[n]); if (!(a = r != null && t(r, o))) break; r = r[o]; } return a || ++n != i ? a : (i = r == null ? 0 : r.length, !!i && SR(i) && aT(o, i) && (du(r) || bR(r))); } function n_e(r, e) { return r != null && r_e(r, e, t_e); } var i_e = 1, a_e = 2; function o_e(r, e) { return PR(r) && Wj(e) ? jj(ny(r), e) : function(t) { var n = LR(t, r); return n === void 0 && n === e ? n_e(t, r) : hT(e, n, i_e | a_e); }; } function s_e(r) { return function(e) { return e == null ? void 0 : e[r]; }; } function u_e(r) { return function(e) { return AR(e, r); }; } function l_e(r) { return PR(r) ? s_e(ny(r)) : u_e(r); } function pT(r) { return typeof r == "function" ? r : r == null ? wR : typeof r == "object" ? du(r) ? o_e(r[0], r[1]) : e_e(r) : l_e(r); } function lI(r) { return Qc(r) && sT(r); } function c_e(r, e, t) { for (var n = -1, i = r == null ? 0 : r.length; ++n < i; ) if (t(e, r[n])) return !0; return !1; } var f_e = 200; function h_e(r, e, t, n) { var i = -1, a = Pde, o = !0, s = r.length, u = [], l = e.length; if (!s) return u; t && (e = rj(e, uT(t))), n ? (a = c_e, o = !1) : e.length >= f_e && (a = Hj, o = !1, e = new l1(e)); e: for (; ++i < s; ) { var c = r[i], f = t == null ? c : t(c); if (c = n || c !== 0 ? c : 0, o && f === f) { for (var h = l; h--; ) if (e[h] === f) continue e; u.push(c); } else a(e, f, n) || u.push(c); } return u; } function Yj(r) { var e = r == null ? 0 : r.length; return e ? r[e - 1] : void 0; } var p_e = Ode(function(r, e) { var t = Yj(e); return lI(t) && (t = void 0), lI(r) ? h_e(r, pj(e, 1, lI, !0), pT(t)) : []; }); const Ya = p_e; function d_e(r) { return function(e, t, n) { var i = Object(e); if (!sT(e)) { var a = pT(t); e = uw(e), t = function(s) { return a(i[s], s, i); }; } var o = r(e, t, n); return o > -1 ? i[a ? e[o] : o] : void 0; }; } var v_e = Math.max; function Xj(r, e, t) { var n = r == null ? 0 : r.length; if (!n) return -1; var i = t == null ? 0 : Upe(t); return i < 0 && (i = v_e(n + i, 0)), aj(r, pT(e), i); } var g_e = d_e(Xj); const hV = g_e; function m_e(r) { for (var e = -1, t = r == null ? 0 : r.length, n = {}; ++e < t; ) { var i = r[e]; n[i[0]] = i[1]; } return n; } function y_e(r, e) { return e.length < 2 ? r : AR(r, vj(e, 0, -1)); } function qj(r, e) { return hT(r, e); } function __e(r) { return r === null; } function Qo(r) { return r === void 0; } function w_e(r, e) { return e = fT(e, r), r = y_e(r, e), r == null || delete r[ny(Yj(e))]; } function x_e(r, e, t, n) { if (!Zl(r)) return r; e = fT(e, r); for (var i = -1, a = e.length, o = a - 1, s = r; s != null && ++i < a; ) { var u = ny(e[i]), l = t; if (u === "__proto__" || u === "constructor" || u === "prototype") return r; if (i != o) { var c = s[u]; l = n ? n(c, u, s) : void 0, l === void 0 && (l = Zl(c) ? c : aT(e[i + 1]) ? [] : {}); } CR(s, u, l), s = s[u]; } return r; } var C_e = Array.prototype, S_e = C_e.splice; function E_e(r, e) { for (var t = r ? e.length : 0, n = t - 1; t--; ) { var i = e[t]; if (t == n || i !== a) { var a = i; aT(i) ? S_e.call(r, i, 1) : w_e(r, i); } } return r; } function pV(r, e) { var t = []; if (!(r && r.length)) return t; var n = -1, i = [], a = r.length; for (e = pT(e); ++n < a; ) { var o = r[n]; e(o, n, r) && (t.push(o), i.push(n)); } return E_e(r, i), t; } function b_e(r, e, t) { return r == null ? r : x_e(r, e, t); } var dV; const cw = typeof window < "u", Zj = (r) => typeof r == "boolean", XS = (r) => typeof r == "number", T_e = (r) => typeof r == "string", cI = () => { }; cw && ((dV = window == null ? void 0 : window.navigator) == null ? void 0 : dV.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function P_e(r, e) { function t(...n) { r(() => e.apply(this, n), { fn: e, thisArg: this, args: n }); } return t; } function I_e(r, e = {}) { let t, n; return (a) => { const o = Ue(r), s = Ue(e.maxWait); if (t && clearTimeout(t), o <= 0 || s !== void 0 && s <= 0) return n && (clearTimeout(n), n = null), a(); s && !n && (n = setTimeout(() => { t && clearTimeout(t), n = null, a(); }, s)), t = setTimeout(() => { n && clearTimeout(n), n = null, a(); }, o); }; } function RR(r) { return xne() ? (Cne(r), !0) : !1; } function A_e(r, e = 200, t = {}) { return P_e(I_e(e, t), r); } function L_e(r, e = 200, t = {}) { if (e <= 0) return r; const n = te(r.value), i = A_e(() => { n.value = r.value; }, e, t); return Ve(r, () => i()), n; } function D_e(r, e, t = {}) { const { immediate: n = !0 } = t, i = te(!1); let a = null; function o() { a && (clearTimeout(a), a = null); } function s() { i.value = !1, o(); } function u(...l) { o(), i.value = !0, a = setTimeout(() => { i.value = !1, a = null, r(...l); }, Ue(e)); } return n && (i.value = !0, cw && u()), RR(s), { isPending: i, start: u, stop: s }; } function Kj(r) { var e; const t = Ue(r); return (e = t == null ? void 0 : t.$el) != null ? e : t; } const Jj = cw ? window : void 0; function M_e(...r) { let e, t, n, i; if (T_e(r[0]) ? ([t, n, i] = r, e = Jj) : [e, t, n, i] = r, !e) return cI; let a = cI; const o = Ve(() => Kj(e), (u) => { a(), u && (u.addEventListener(t, n, i), a = () => { u.removeEventListener(t, n, i), a = cI; }); }, { immediate: !0, flush: "post" }), s = () => { o(), a(); }; return RR(s), s; } const XD = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, qD = "__vueuse_ssr_handlers__"; XD[qD] = XD[qD] || {}; XD[qD]; var vV = Object.getOwnPropertySymbols, O_e = Object.prototype.hasOwnProperty, R_e = Object.prototype.propertyIsEnumerable, N_e = (r, e) => { var t = {}; for (var n in r) O_e.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && vV) for (var n of vV(r)) e.indexOf(n) < 0 && R_e.call(r, n) && (t[n] = r[n]); return t; }; function F_e(r, e, t = {}) { const n = t, { window: i = Jj } = n, a = N_e(n, ["window"]); let o; const s = i && "ResizeObserver" in i, u = () => { o && (o.disconnect(), o = void 0); }, l = Ve(() => Kj(r), (f) => { u(), s && i && f && (o = new ResizeObserver(e), o.observe(f, a)); }, { immediate: !0, flush: "post" }), c = () => { u(), l(); }; return RR(c), { isSupported: s, stop: c }; } var gV; (function(r) { r.UP = "UP", r.RIGHT = "RIGHT", r.DOWN = "DOWN", r.LEFT = "LEFT", r.NONE = "NONE"; })(gV || (gV = {})); process.env.NODE_ENV !== "production" && Object.freeze({}); process.env.NODE_ENV !== "production" && Object.freeze([]); const B_e = () => { }, k_e = Object.prototype.hasOwnProperty, tn = (r, e) => k_e.call(r, e), Vn = Array.isArray, ti = (r) => typeof r == "function", ca = (r) => typeof r == "string", fw = (r) => r !== null && typeof r == "object", V_e = Object.prototype.toString, G_e = (r) => V_e.call(r), _a = (r) => G_e(r) === "[object Object]", NR = (r) => { const e = /* @__PURE__ */ Object.create(null); return (t) => e[t] || (e[t] = r(t)); }, z_e = /-(\w)/g, Av = NR((r) => r.replace(z_e, (e, t) => t ? t.toUpperCase() : "")), $_e = /\B([A-Z])/g, H_e = NR((r) => r.replace($_e, "-$1").toLowerCase()), qS = NR((r) => r.charAt(0).toUpperCase() + r.slice(1)), U_e = (r) => r === void 0, mV = (r) => typeof Element > "u" ? !1 : r instanceof Element, yV = (r) => Object.keys(r), fI = (r, e, t) => ({ get value() { return LR(r, e, t); }, set value(n) { b_e(r, e, n); } }); class Qj extends Error { constructor(e) { super(e), this.name = "ElementPlusError"; } } function W_e(r, e) { throw new Qj(`[${r}] ${e}`); } function Tc(r, e) { if (process.env.NODE_ENV !== "production") { const t = ca(r) ? new Qj(`[${r}] ${e}`) : r; console.warn(t); } } const j_e = "utils/dom/style"; function ZD(r, e = "px") { if (!r) return ""; if (ca(r)) return r; if (XS(r)) return `${r}${e}`; Tc(j_e, "binding value must be a string or number"); } /*! Element Plus Icons Vue v2.0.5 */ var hw = (r, e) => { let t = r.__vccOpts || r; for (let [n, i] of e) t[n] = i; return t; }, Y_e = { name: "CircleCloseFilled" }, X_e = { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }, q_e = /* @__PURE__ */ he("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z" }, null, -1), Z_e = [ q_e ]; function K_e(r, e, t, n, i, a) { return Re(), St("svg", X_e, Z_e); } var eY = /* @__PURE__ */ hw(Y_e, [["render", K_e], ["__file", "circle-close-filled.vue"]]), J_e = { name: "Close" }, Q_e = { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }, e1e = /* @__PURE__ */ he("path", { fill: "currentColor", d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z" }, null, -1), t1e = [ e1e ]; function r1e(r, e, t, n, i, a) { return Re(), St("svg", Q_e, t1e); } var n1e = /* @__PURE__ */ hw(J_e, [["render", r1e], ["__file", "close.vue"]]), i1e = { name: "InfoFilled" }, a1e = { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }, o1e = /* @__PURE__ */ he("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z" }, null, -1), s1e = [ o1e ]; function u1e(r, e, t, n, i, a) { return Re(), St("svg", a1e, s1e); } var tY = /* @__PURE__ */ hw(i1e, [["render", u1e], ["__file", "info-filled.vue"]]), l1e = { name: "SuccessFilled" }, c1e = { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }, f1e = /* @__PURE__ */ he("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z" }, null, -1), h1e = [ f1e ]; function p1e(r, e, t, n, i, a) { return Re(), St("svg", c1e, h1e); } var rY = /* @__PURE__ */ hw(l1e, [["render", p1e], ["__file", "success-filled.vue"]]), d1e = { name: "WarningFilled" }, v1e = { viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" }, g1e = /* @__PURE__ */ he("path", { fill: "currentColor", d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z" }, null, -1), m1e = [ g1e ]; function y1e(r, e, t, n, i, a) { return Re(), St("svg", v1e, m1e); } var nY = /* @__PURE__ */ hw(d1e, [["render", y1e], ["__file", "warning-filled.vue"]]); const iY = "__epPropKey", Fu = (r) => r, _1e = (r) => fw(r) && !!r[iY], aY = (r, e) => { if (!fw(r) || _1e(r)) return r; const { values: t, required: n, default: i, type: a, validator: o } = r, u = { type: a, required: !!n, validator: t || o ? (l) => { let c = !1, f = []; if (t && (f = Array.from(t), tn(r, "default") && f.push(i), c || (c = f.includes(l))), o && (c || (c = o(l))), !c && f.length > 0) { const h = [...new Set(f)].map((p) => JSON.stringify(p)).join(", "); Sne(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${h}], got value ${JSON.stringify(l)}.`); } return c; } : void 0, [iY]: !0 }; return tn(r, "default") && (u.default = i), u; }, iy = (r) => m_e(Object.entries(r).map(([e, t]) => [ e, aY(t, e) ])), w1e = Fu([ String, Object, Function ]), x1e = { Close: n1e, SuccessFilled: rY, InfoFilled: tY, WarningFilled: nY, CircleCloseFilled: eY }, _V = { success: rY, warning: nY, error: eY, info: tY }, FR = (r, e) => { if (r.install = (t) => { for (const n of [r, ...Object.values(e != null ? e : {})]) t.component(n.name, n); }, e) for (const [t, n] of Object.entries(e)) r[t] = n; return r; }, C1e = (r, e) => (r.install = (t) => { r._context = t._context, t.config.globalProperties[e] = r; }, r), S1e = (r) => (r.install = B_e, r), E1e = { tab: "Tab", enter: "Enter", space: "Space", left: "ArrowLeft", up: "ArrowUp", right: "ArrowRight", down: "ArrowDown", esc: "Escape", delete: "Delete", backspace: "Backspace", numpadEnter: "NumpadEnter", pageUp: "PageUp", pageDown: "PageDown", home: "Home", end: "End" }, BR = ["", "default", "small", "large"], oY = Symbol(), dT = Symbol("formContextKey"), ZS = Symbol("formItemContextKey"), b1e = (r) => { const e = We(); return Ie(() => { var t, n; return (n = ((t = e.proxy) == null ? void 0 : t.$props)[r]) != null ? n : void 0; }); }, KS = te(); function vT(r, e = void 0) { const t = We() ? Wu(oY, KS) : KS; return r ? Ie(() => { var n, i; return (i = (n = t.value) == null ? void 0 : n[r]) != null ? i : e; }) : t; } const T1e = (r, e, t = !1) => { var n; const i = !!We(), a = i ? vT() : void 0, o = (n = e == null ? void 0 : e.provide) != null ? n : i ? $h : void 0; if (!o) { Tc("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup()."); return; } const s = Ie(() => { const u = Ue(r); return a != null && a.value ? P1e(a.value, u) : u; }); return o(oY, s), (t || !KS.value) && (KS.value = s.value), s; }, P1e = (r, e) => { var t; const n = [.../* @__PURE__ */ new Set([...yV(r), ...yV(e)])], i = {}; for (const a of n) i[a] = (t = e[a]) != null ? t : r[a]; return i; }, I1e = aY({ type: String, values: BR, required: !1 }), sY = (r, e = {}) => { const t = te(void 0), n = e.prop ? t : b1e("size"), i = e.global ? t : vT("size"), a = e.form ? { size: void 0 } : Wu(dT, void 0), o = e.formItem ? { size: void 0 } : Wu(ZS, void 0); return Ie(() => n.value || Ue(r) || (o == null ? void 0 : o.size) || (a == null ? void 0 : a.size) || i.value || ""); }, wV = { prefix: Math.floor(Math.random() * 1e4), current: 0 }, A1e = Symbol("elIdInjection"), L1e = (r) => { const e = Wu(A1e, wV); return !cw && e === wV && Tc("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed usage: app.provide(ID_INJECTION_KEY, { prefix: number, current: number, })`), Ie(() => Ue(r) || `el-id-${e.prefix}-${e.current++}`); }, D1e = "el", M1e = "is-", Qh = (r, e, t, n, i) => { let a = `${r}-${e}`; return t && (a += `-${t}`), n && (a += `__${n}`), i && (a += `--${i}`), a; }, ay = (r) => { const e = vT("namespace"), t = Ie(() => e.value || D1e); return { namespace: t, b: (v = "") => Qh(Ue(t), r, v, "", ""), e: (v) => v ? Qh(Ue(t), r, "", v, "") : "", m: (v) => v ? Qh(Ue(t), r, "", "", v) : "", be: (v, g) => v && g ? Qh(Ue(t), r, v, g, "") : "", em: (v, g) => v && g ? Qh(Ue(t), r, "", v, g) : "", bm: (v, g) => v && g ? Qh(Ue(t), r, v, "", g) : "", bem: (v, g, m) => v && g && m ? Qh(Ue(t), r, v, g, m) : "", is: (v, ...g) => { const m = g.length >= 1 ? g[0] : !0; return v && m ? `${M1e}${v}` : ""; }, cssVar: (v) => { const g = {}; for (const m in v) g[`--${t.value}-${m}`] = v[m]; return g; }, cssVarName: (v) => `--${t.value}-${v}`, cssVarBlock: (v) => { const g = {}; for (const m in v) g[`--${t.value}-${r}-${m}`] = v[m]; return g; }, cssVarBlockName: (v) => `--${t.value}-${r}-${v}` }; }, xV = te(0), O1e = () => { const r = vT("zIndex", 2e3), e = Ie(() => r.value + xV.value); return { initialZIndex: r, currentZIndex: e, nextZIndex: () => (xV.value++, e.value) }; }; var pw = (r, e) => { const t = r.__vccOpts || r; for (const [n, i] of e) t[n] = i; return t; }; const R1e = iy({ size: { type: Fu([Number, String]) }, color: { type: String } }), N1e = { name: "ElIcon", inheritAttrs: !1 }, F1e = /* @__PURE__ */ de({ ...N1e, props: R1e, setup(r) { const e = r, t = ay("icon"), n = Ie(() => !e.size && !e.color ? {} : { fontSize: U_e(e.size) ? void 0 : ZD(e.size), "--color": e.color }); return (i, a) => (Re(), St("i", aD({ class: Ue(t).b(), style: Ue(n) }, i.$attrs), [ ch(i.$slots, "default") ], 16)); } }); var B1e = /* @__PURE__ */ pw(F1e, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]); const k1e = FR(B1e), V1e = iy({ value: { type: [String, Number], default: "" }, max: { type: Number, default: 99 }, isDot: Boolean, hidden: Boolean, type: { type: String, values: ["primary", "success", "warning", "info", "danger"], default: "danger" } }), G1e = ["textContent"], z1e = { name: "ElBadge" }, $1e = /* @__PURE__ */ de({ ...z1e, props: V1e, setup(r, { expose: e }) { const t = r, n = ay("badge"), i = Ie(() => t.isDot ? "" : XS(t.value) && XS(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`); return e({ content: i }), (a, o) => (Re(), St("div", { class: Ui(Ue(n).b()) }, [ ch(a.$slots, "default"), re(_i, { name: `${Ue(n).namespace.value}-zoom-in-center`, persisted: "" }, { default: Ce(() => [ ba(he("sup", { class: Ui([ Ue(n).e("content"), Ue(n).em("content", a.type), Ue(n).is("fixed", !!a.$slots.default), Ue(n).is("dot", a.isDot) ]), textContent: us(Ue(i)) }, null, 10, G1e), [ [lo, !a.hidden && (Ue(i) || a.isDot)] ]) ]), _: 1 }, 8, ["name"]) ], 2)); } }); var H1e = /* @__PURE__ */ pw($1e, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]); const U1e = FR(H1e), KD = {}, W1e = iy({ a11y: { type: Boolean, default: !0 }, locale: { type: Fu(Object) }, size: I1e, button: { type: Fu(Object) }, experimentalFeatures: { type: Fu(Object) }, keyboardNavigation: { type: Boolean, default: !0 }, message: { type: Fu(Object) }, zIndex: Number, namespace: { type: String, default: "el" } }); de({ name: "ElConfigProvider", props: W1e, setup(r, { slots: e }) { Ve(() => r.message, (n) => { Object.assign(KD, n != null ? n : {}); }, { immediate: !0, deep: !0 }); const t = T1e(r); return () => ch(e, "default", { config: t == null ? void 0 : t.value }); } }); const j1e = iy({ model: Object, rules: { type: Fu(Object) }, labelPosition: { type: String, values: ["left", "right", "top"], default: "right" }, labelWidth: { type: [String, Number], default: "" }, labelSuffix: { type: String, default: "" }, inline: Boolean, inlineMessage: Boolean, statusIcon: Boolean, showMessage: { type: Boolean, default: !0 }, size: { type: String, values: BR }, disabled: Boolean, validateOnRuleChange: { type: Boolean, default: !0 }, hideRequiredAsterisk: { type: Boolean, default: !1 }, scrollToError: Boolean }), Y1e = { validate: (r, e, t) => (Vn(r) || ca(r)) && Zj(e) && ca(t) }, X1e = "ElForm"; function q1e() { const r = te([]), e = Ie(() => { if (!r.value.length) return "0"; const a = Math.max(...r.value); return a ? `${a}px` : ""; }); function t(a) { const o = r.value.indexOf(a); return o === -1 && Tc(X1e, `unexpected width ${a}`), o; } function n(a, o) { if (a && o) { const s = t(o); r.value.splice(s, 1, a); } else a && r.value.push(a); } function i(a) { const o = t(a); o > -1 && r.value.splice(o, 1); } return { autoLabelWidth: e, registerLabelWidth: n, deregisterLabelWidth: i }; } const Dx = (r, e) => { const t = HD(e); return t.length > 0 ? r.filter((n) => n.prop && t.includes(n.prop)) : r; }, Z1e = { name: "ElForm" }, K1e = /* @__PURE__ */ de({ ...Z1e, props: j1e, emits: Y1e, setup(r, { expose: e, emit: t }) { const n = r, i = "ElForm", a = [], o = sY(), s = ay("form"), u = Ie(() => { const { labelPosition: _, inline: w } = n; return [ s.b(), s.m(o.value || "default"), { [s.m(`label-${_}`)]: _, [s.m("inline")]: w } ]; }), l = (_) => { a.push(_); }, c = (_) => { _.prop && a.splice(a.indexOf(_), 1); }, f = (_ = []) => { if (!n.model) { Tc(i, "model is required for resetFields to work."); return; } Dx(a, _).forEach((w) => w.resetField()); }, h = (_ = []) => { Dx(a, _).forEach((w) => w.clearValidate()); }, p = Ie(() => { const _ = !!n.model; return _ || Tc(i, "model is required for validate to work."), _; }), d = (_) => { if (a.length === 0) return []; const w = Dx(a, _); return w.length ? w : (Tc(i, "please pass correct props!"), []); }, v = async (_) => m(void 0, _), g = async (_ = []) => { if (!p.value) return !1; const w = d(_); if (w.length === 0) return !0; let x = {}; for (const C of w) try { await C.validate(""); } catch (S) { x = { ...x, ...S }; } return Object.keys(x).length === 0 ? !0 : Promise.reject(x); }, m = async (_ = [], w) => { const x = !ti(w); try { const C = await g(_); return C === !0 && (w == null || w(C)), C; } catch (C) { const S = C; return n.scrollToError && y(Object.keys(S)[0]), w == null || w(!1, S), x && Promise.reject(S); } }, y = (_) => { var w; const x = Dx(a, _)[0]; x && ((w = x.$el) == null || w.scrollIntoView()); }; return Ve(() => n.rules, () => { n.validateOnRuleChange && v().catch((_) => Tc(_)); }, { deep: !0 }), $h(dT, _n({ ...Ab(n), emit: t, resetFields: f, clearValidate: h, validateField: m, addField: l, removeField: c, ...q1e() })), e({ validate: v, validateField: m, resetFields: f, clearValidate: h, scrollToField: y }), (_, w) => (Re(), St("form", { class: Ui(Ue(u)) }, [ ch(_.$slots, "default") ], 2)); } }); var J1e = /* @__PURE__ */ pw(K1e, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]); function zp() { return zp = Object.assign || function(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]); } return r; }, zp.apply(this, arguments); } function Q1e(r, e) { r.prototype = Object.create(e.prototype), r.prototype.constructor = r, c1(r, e); } function JD(r) { return JD = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, JD(r); } function c1(r, e) { return c1 = Object.setPrototypeOf || function(n, i) { return n.__proto__ = i, n; }, c1(r, e); } function ewe() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } } function QC(r, e, t) { return ewe() ? QC = Reflect.construct : QC = function(i, a, o) { var s = [null]; s.push.apply(s, a); var u = Function.bind.apply(i, s), l = new u(); return o && c1(l, o.prototype), l; }, QC.apply(null, arguments); } function twe(r) { return Function.toString.call(r).indexOf("[native code]") !== -1; } function QD(r) { var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; return QD = function(n) { if (n === null || !twe(n)) return n; if (typeof n != "function") throw new TypeError("Super expression must either be null or a function"); if (typeof e < "u") { if (e.has(n)) return e.get(n); e.set(n, i); } function i() { return QC(n, arguments, JD(this).constructor); } return i.prototype = Object.create(n.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), c1(i, n); }, QD(r); } var rwe = /%[sdj%]/g, uY = function() { }; typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (uY = function(e, t) { typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && t.every(function(n) { return typeof n == "string"; }) && console.warn(e, t); }); function eM(r) { if (!r || !r.length) return null; var e = {}; return r.forEach(function(t) { var n = t.field; e[n] = e[n] || [], e[n].push(t); }), e; } function ss(r) { for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) t[n - 1] = arguments[n]; var i = 0, a = t.length; if (typeof r == "function") return r.apply(null, t); if (typeof r == "string") { var o = r.replace(rwe, function(s) { if (s === "%%") return "%"; if (i >= a) return s; switch (s) { case "%s": return String(t[i++]); case "%d": return Number(t[i++]); case "%j": try { return JSON.stringify(t[i++]); } catch { return "[Circular]"; } break; default: return s; } }); return o; } return r; } function nwe(r) { return r === "string" || r === "url" || r === "hex" || r === "email" || r === "date" || r === "pattern"; } function Ki(r, e) { return !!(r == null || e === "array" && Array.isArray(r) && !r.length || nwe(e) && typeof r == "string" && !r); } function iwe(r, e, t) { var n = [], i = 0, a = r.length; function o(s) { n.push.apply(n, s || []), i++, i === a && t(n); } r.forEach(function(s) { e(s, o); }); } function CV(r, e, t) { var n = 0, i = r.length; function a(o) { if (o && o.length) { t(o); return; } var s = n; n = n + 1, s < i ? e(r[s], a) : t([]); } a([]); } function awe(r) { var e = []; return Object.keys(r).forEach(function(t) { e.push.apply(e, r[t] || []); }), e; } var SV = /* @__PURE__ */ function(r) { Q1e(e, r); function e(t, n) { var i; return i = r.call(this, "Async Validation Error") || this, i.errors = t, i.fields = n, i; } return e; }(/* @__PURE__ */ QD(Error)); function owe(r, e, t, n, i) { if (e.first) { var a = new Promise(function(h, p) { var d = function(m) { return n(m), m.length ? p(new SV(m, eM(m))) : h(i); }, v = awe(r); CV(v, t, d); }); return a.catch(function(h) { return h; }), a; } var o = e.firstFields === !0 ? Object.keys(r) : e.firstFields || [], s = Object.keys(r), u = s.length, l = 0, c = [], f = new Promise(function(h, p) { var d = function(g) { if (c.push.apply(c, g), l++, l === u) return n(c), c.length ? p(new SV(c, eM(c))) : h(i); }; s.length || (n(c), h(i)), s.forEach(function(v) { var g = r[v]; o.indexOf(v) !== -1 ? CV(g, t, d) : iwe(g, t, d); }); }); return f.catch(function(h) { return h; }), f; } function swe(r) { return !!(r && r.message !== void 0); } function uwe(r, e) { for (var t = r, n = 0; n < e.length; n++) { if (t == null) return t; t = t[e[n]]; } return t; } function EV(r, e) { return function(t) { var n; return r.fullFields ? n = uwe(e, r.fullFields) : n = e[t.field || r.fullField], swe(t) ? (t.field = t.field || r.fullField, t.fieldValue = n, t) : { message: typeof t == "function" ? t() : t, fieldValue: n, field: t.field || r.fullField }; }; } function bV(r, e) { if (e) { for (var t in e) if (e.hasOwnProperty(t)) { var n = e[t]; typeof n == "object" && typeof r[t] == "object" ? r[t] = zp({}, r[t], n) : r[t] = n; } } return r; } var lY = function(e, t, n, i, a, o) { e.required && (!n.hasOwnProperty(e.field) || Ki(t, o || e.type)) && i.push(ss(a.messages.required, e.fullField)); }, lwe = function(e, t, n, i, a) { (/^\s+$/.test(t) || t === "") && i.push(ss(a.messages.whitespace, e.fullField)); }, hI = { email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/, url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"), hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i }, $0 = { integer: function(e) { return $0.number(e) && parseInt(e, 10) === e; }, float: function(e) { return $0.number(e) && !$0.integer(e); }, array: function(e) { return Array.isArray(e); }, regexp: function(e) { if (e instanceof RegExp) return !0; try { return !!new RegExp(e); } catch { return !1; } }, date: function(e) { return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime()); }, number: function(e) { return isNaN(e) ? !1 : typeof e == "number"; }, object: function(e) { return typeof e == "object" && !$0.array(e); }, method: function(e) { return typeof e == "function"; }, email: function(e) { return typeof e == "string" && e.length <= 320 && !!e.match(hI.email); }, url: function(e) { return typeof e == "string" && e.length <= 2048 && !!e.match(hI.url); }, hex: function(e) { return typeof e == "string" && !!e.match(hI.hex); } }, cwe = function(e, t, n, i, a) { if (e.required && t === void 0) { lY(e, t, n, i, a); return; } var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type; o.indexOf(s) > -1 ? $0[s](t) || i.push(ss(a.messages.types[s], e.fullField, e.type)) : s && typeof t !== e.type && i.push(ss(a.messages.types[s], e.fullField, e.type)); }, fwe = function(e, t, n, i, a) { var o = typeof e.len == "number", s = typeof e.min == "number", u = typeof e.max == "number", l = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = t, f = null, h = typeof t == "number", p = typeof t == "string", d = Array.isArray(t); if (h ? f = "number" : p ? f = "string" : d && (f = "array"), !f) return !1; d && (c = t.length), p && (c = t.replace(l, "_").length), o ? c !== e.len && i.push(ss(a.messages[f].len, e.fullField, e.len)) : s && !u && c < e.min ? i.push(ss(a.messages[f].min, e.fullField, e.min)) : u && !s && c > e.max ? i.push(ss(a.messages[f].max, e.fullField, e.max)) : s && u && (c < e.min || c > e.max) && i.push(ss(a.messages[f].range, e.fullField, e.min, e.max)); }, Lv = "enum", hwe = function(e, t, n, i, a) { e[Lv] = Array.isArray(e[Lv]) ? e[Lv] : [], e[Lv].indexOf(t) === -1 && i.push(ss(a.messages[Lv], e.fullField, e[Lv].join(", "))); }, pwe = function(e, t, n, i, a) { if (e.pattern) { if (e.pattern instanceof RegExp) e.pattern.lastIndex = 0, e.pattern.test(t) || i.push(ss(a.messages.pattern.mismatch, e.fullField, t, e.pattern)); else if (typeof e.pattern == "string") { var o = new RegExp(e.pattern); o.test(t) || i.push(ss(a.messages.pattern.mismatch, e.fullField, t, e.pattern)); } } }, Lr = { required: lY, whitespace: lwe, type: cwe, range: fwe, enum: hwe, pattern: pwe }, dwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t, "string") && !e.required) return n(); Lr.required(e, t, i, o, a, "string"), Ki(t, "string") || (Lr.type(e, t, i, o, a), Lr.range(e, t, i, o, a), Lr.pattern(e, t, i, o, a), e.whitespace === !0 && Lr.whitespace(e, t, i, o, a)); } n(o); }, vwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), t !== void 0 && Lr.type(e, t, i, o, a); } n(o); }, gwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (t === "" && (t = void 0), Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), t !== void 0 && (Lr.type(e, t, i, o, a), Lr.range(e, t, i, o, a)); } n(o); }, mwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), t !== void 0 && Lr.type(e, t, i, o, a); } n(o); }, ywe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), Ki(t) || Lr.type(e, t, i, o, a); } n(o); }, _we = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), t !== void 0 && (Lr.type(e, t, i, o, a), Lr.range(e, t, i, o, a)); } n(o); }, wwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), t !== void 0 && (Lr.type(e, t, i, o, a), Lr.range(e, t, i, o, a)); } n(o); }, xwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (t == null && !e.required) return n(); Lr.required(e, t, i, o, a, "array"), t != null && (Lr.type(e, t, i, o, a), Lr.range(e, t, i, o, a)); } n(o); }, Cwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), t !== void 0 && Lr.type(e, t, i, o, a); } n(o); }, Swe = "enum", Ewe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a), t !== void 0 && Lr[Swe](e, t, i, o, a); } n(o); }, bwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t, "string") && !e.required) return n(); Lr.required(e, t, i, o, a), Ki(t, "string") || Lr.pattern(e, t, i, o, a); } n(o); }, Twe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t, "date") && !e.required) return n(); if (Lr.required(e, t, i, o, a), !Ki(t, "date")) { var u; t instanceof Date ? u = t : u = new Date(t), Lr.type(e, u, i, o, a), u && Lr.range(e, u.getTime(), i, o, a); } } n(o); }, Pwe = function(e, t, n, i, a) { var o = [], s = Array.isArray(t) ? "array" : typeof t; Lr.required(e, t, i, o, a, s), n(o); }, pI = function(e, t, n, i, a) { var o = e.type, s = [], u = e.required || !e.required && i.hasOwnProperty(e.field); if (u) { if (Ki(t, o) && !e.required) return n(); Lr.required(e, t, i, s, a, o), Ki(t, o) || Lr.type(e, t, i, s, a); } n(s); }, Iwe = function(e, t, n, i, a) { var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field); if (s) { if (Ki(t) && !e.required) return n(); Lr.required(e, t, i, o, a); } n(o); }, u_ = { string: dwe, method: vwe, number: gwe, boolean: mwe, regexp: ywe, integer: _we, float: wwe, array: xwe, object: Cwe, enum: Ewe, pattern: bwe, date: Twe, url: pI, hex: pI, email: pI, required: Pwe, any: Iwe }; function tM() { return { default: "Validation error on field %s", required: "%s is required", enum: "%s must be one of %s", whitespace: "%s cannot be empty", date: { format: "%s date %s is invalid for format %s", parse: "%s date could not be parsed, %s is invalid ", invalid: "%s date %s is invalid" }, types: { string: "%s is not a %s", method: "%s is not a %s (function)", array: "%s is not an %s", object: "%s is not an %s", number: "%s is not a %s", date: "%s is not a %s", boolean: "%s is not a %s", integer: "%s is not an %s", float: "%s is not a %s", regexp: "%s is not a valid %s", email: "%s is not a valid %s", url: "%s is not a valid %s", hex: "%s is not a valid %s" }, string: { len: "%s must be exactly %s characters", min: "%s must be at least %s characters", max: "%s cannot be longer than %s characters", range: "%s must be between %s and %s characters" }, number: { len: "%s must equal %s", min: "%s cannot be less than %s", max: "%s cannot be greater than %s", range: "%s must be between %s and %s" }, array: { len: "%s must be exactly %s in length", min: "%s cannot be less than %s in length", max: "%s cannot be greater than %s in length", range: "%s must be between %s and %s in length" }, pattern: { mismatch: "%s value %s does not match pattern %s" }, clone: function() { var e = JSON.parse(JSON.stringify(this)); return e.clone = this.clone, e; } }; } var rM = tM(), dw = /* @__PURE__ */ function() { function r(t) { this.rules = null, this._messages = rM, this.define(t); } var e = r.prototype; return e.define = function(n) { var i = this; if (!n) throw new Error("Cannot configure a schema with no rules"); if (typeof n != "object" || Array.isArray(n)) throw new Error("Rules must be an object"); this.rules = {}, Object.keys(n).forEach(function(a) { var o = n[a]; i.rules[a] = Array.isArray(o) ? o : [o]; }); }, e.messages = function(n) { return n && (this._messages = bV(tM(), n)), this._messages; }, e.validate = function(n, i, a) { var o = this; i === void 0 && (i = {}), a === void 0 && (a = function() { }); var s = n, u = i, l = a; if (typeof u == "function" && (l = u, u = {}), !this.rules || Object.keys(this.rules).length === 0) return l && l(null, s), Promise.resolve(s); function c(v) { var g = [], m = {}; function y(w) { if (Array.isArray(w)) { var x; g = (x = g).concat.apply(x, w); } else g.push(w); } for (var _ = 0; _ < v.length; _++) y(v[_]); g.length ? (m = eM(g), l(g, m)) : l(null, s); } if (u.messages) { var f = this.messages(); f === rM && (f = tM()), bV(f, u.messages), u.messages = f; } else u.messages = this.messages(); var h = {}, p = u.keys || Object.keys(this.rules); p.forEach(function(v) { var g = o.rules[v], m = s[v]; g.forEach(function(y) { var _ = y; typeof _.transform == "function" && (s === n && (s = zp({}, s)), m = s[v] = _.transform(m)), typeof _ == "function" ? _ = { validator: _ } : _ = zp({}, _), _.validator = o.getValidationMethod(_), _.validator && (_.field = v, _.fullField = _.fullField || v, _.type = o.getType(_), h[v] = h[v] || [], h[v].push({ rule: _, value: m, source: s, field: v })); }); }); var d = {}; return owe(h, u, function(v, g) { var m = v.rule, y = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object"); y = y && (m.required || !m.required && v.value), m.field = v.field; function _(C, S) { return zp({}, S, { fullField: m.fullField + "." + C, fullFields: m.fullFields ? [].concat(m.fullFields, [C]) : [C] }); } function w(C) { C === void 0 && (C = []); var S = Array.isArray(C) ? C : [C]; !u.suppressWarning && S.length && r.warning("async-validator:", S), S.length && m.message !== void 0 && (S = [].concat(m.message)); var b = S.map(EV(m, s)); if (u.first && b.length) return d[m.field] = 1, g(b); if (!y) g(b); else { if (m.required && !v.value) return m.message !== void 0 ? b = [].concat(m.message).map(EV(m, s)) : u.error && (b = [u.error(m, ss(u.messages.required, m.field))]), g(b); var E = {}; m.defaultField && Object.keys(v.value).map(function(I) { E[I] = m.defaultField; }), E = zp({}, E, v.rule.fields); var T = {}; Object.keys(E).forEach(function(I) { var A = E[I], L = Array.isArray(A) ? A : [A]; T[I] = L.map(_.bind(null, I)); }); var P = new r(T); P.messages(u.messages), v.rule.options && (v.rule.options.messages = u.messages, v.rule.options.error = u.error), P.validate(v.value, v.rule.options || u, function(I) { var A = []; b && b.length && A.push.apply(A, b), I && I.length && A.push.apply(A, I), g(A.length ? A : null); }); } } var x; if (m.asyncValidator) x = m.asyncValidator(m, v.value, w, v.source, u); else if (m.validator) { try { x = m.validator(m, v.value, w, v.source, u); } catch (C) { console.error == null || console.error(C), setTimeout(function() { throw C; }, 0), w(C.message); } x === !0 ? w() : x === !1 ? w(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : x instanceof Array ? w(x) : x instanceof Error && w(x.message); } x && x.then && x.then(function() { return w(); }, function(C) { return w(C); }); }, function(v) { c(v); }, s); }, e.getType = function(n) { if (n.type === void 0 && n.pattern instanceof RegExp && (n.type = "pattern"), typeof n.validator != "function" && n.type && !u_.hasOwnProperty(n.type)) throw new Error(ss("Unknown rule type %s", n.type)); return n.type || "string"; }, e.getValidationMethod = function(n) { if (typeof n.validator == "function") return n.validator; var i = Object.keys(n), a = i.indexOf("message"); return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? u_.required : u_[this.getType(n)] || void 0; }, r; }(); dw.register = function(e, t) { if (typeof t != "function") throw new Error("Cannot register a validator by type, validator is not a function"); u_[e] = t; }; dw.warning = uY; dw.messages = rM; dw.validators = u_; const Awe = [ "", "error", "validating", "success" ], Lwe = iy({ label: String, labelWidth: { type: [String, Number], default: "" }, prop: { type: Fu([String, Array]) }, required: { type: Boolean, default: void 0 }, rules: { type: Fu([Object, Array]) }, error: String, validateStatus: { type: String, values: Awe }, for: String, inlineMessage: { type: [String, Boolean], default: "" }, showMessage: { type: Boolean, default: !0 }, size: { type: String, values: BR } }), TV = "ElLabelWrap"; var Dwe = de({ name: TV, props: { isAutoWidth: Boolean, updateAll: Boolean }, setup(r, { slots: e }) { const t = Wu(dT, void 0); Wu(ZS) || W_e(TV, "usage: "); const i = ay("form"), a = te(), o = te(0), s = () => { var c; if ((c = a.value) != null && c.firstElementChild) { const f = window.getComputedStyle(a.value.firstElementChild).width; return Math.ceil(Number.parseFloat(f)); } else return 0; }, u = (c = "update") => { oi(() => { e.default && r.isAutoWidth && (c === "update" ? o.value = s() : c === "remove" && (t == null || t.deregisterLabelWidth(o.value))); }); }, l = () => u("update"); return hf(() => { l(); }), pf(() => { u("remove"); }), Ene(() => l()), Ve(o, (c, f) => { r.updateAll && (t == null || t.registerLabelWidth(c, f)); }), F_e(Ie(() => { var c, f; return (f = (c = a.value) == null ? void 0 : c.firstElementChild) != null ? f : null; }), l), () => { var c, f; if (!e) return null; const { isAutoWidth: h } = r; if (h) { const p = t == null ? void 0 : t.autoLabelWidth, d = {}; if (p && p !== "auto") { const v = Math.max(0, Number.parseInt(p, 10) - o.value), g = t.labelPosition === "left" ? "marginRight" : "marginLeft"; v && (d[g] = `${v}px`); } return re("div", { ref: a, class: [i.be("item", "label-wrap")], style: d }, [(c = e.default) == null ? void 0 : c.call(e)]); } else return re(yh, { ref: a }, [(f = e.default) == null ? void 0 : f.call(e)]); }; } }); const Mwe = ["role", "aria-labelledby"], Owe = { name: "ElFormItem" }, Rwe = /* @__PURE__ */ de({ ...Owe, props: Lwe, setup(r, { expose: e }) { const t = r, n = bne(), i = Wu(dT, void 0), a = Wu(ZS, void 0), o = sY(void 0, { formItem: !1 }), s = ay("form-item"), u = L1e().value, l = te([]), c = te(""), f = L_e(c, 100), h = te(""), p = te(); let d, v = !1; const g = Ie(() => { if ((i == null ? void 0 : i.labelPosition) === "top") return {}; const $ = ZD(t.labelWidth || (i == null ? void 0 : i.labelWidth) || ""); return $ ? { width: $ } : {}; }), m = Ie(() => { if ((i == null ? void 0 : i.labelPosition) === "top" || (i == null ? void 0 : i.inline)) return {}; if (!t.label && !t.labelWidth && E) return {}; const $ = ZD(t.labelWidth || (i == null ? void 0 : i.labelWidth) || ""); return !t.label && !n.label ? { marginLeft: $ } : {}; }), y = Ie(() => [ s.b(), s.m(o.value), s.is("error", c.value === "error"), s.is("validating", c.value === "validating"), s.is("success", c.value === "success"), s.is("required", L.value || t.required), s.is("no-asterisk", i == null ? void 0 : i.hideRequiredAsterisk), { [s.m("feedback")]: i == null ? void 0 : i.statusIcon } ]), _ = Ie(() => Zj(t.inlineMessage) ? t.inlineMessage : (i == null ? void 0 : i.inlineMessage) || !1), w = Ie(() => [ s.e("error"), { [s.em("error", "inline")]: _.value } ]), x = Ie(() => t.prop ? ca(t.prop) ? t.prop : t.prop.join(".") : ""), C = Ie(() => !!(t.label || n.label)), S = Ie(() => t.for || l.value.length === 1 ? l.value[0] : void 0), b = Ie(() => !S.value && C.value), E = !!a, T = Ie(() => { const $ = i == null ? void 0 : i.model; if (!(!$ || !t.prop)) return fI($, t.prop).value; }), P = Ie(() => { const $ = t.rules ? HD(t.rules) : [], V = i == null ? void 0 : i.rules; if (V && t.prop) { const q = fI(V, t.prop).value; q && $.push(...HD(q)); } return t.required !== void 0 && $.push({ required: !!t.required }), $; }), I = Ie(() => P.value.length > 0), A = ($) => P.value.filter((q) => !q.trigger || !$ ? !0 : Array.isArray(q.trigger) ? q.trigger.includes($) : q.trigger === $).map(({ trigger: q, ...ee }) => ee), L = Ie(() => P.value.some(($) => $.required === !0)), D = Ie(() => { var $; return f.value === "error" && t.showMessage && (($ = i == null ? void 0 : i.showMessage) != null ? $ : !0); }), O = Ie(() => `${t.label || ""}${(i == null ? void 0 : i.labelSuffix) || ""}`), N = ($) => { c.value = $; }, F = ($) => { var V, q; const { errors: ee, fields: Y } = $; (!ee || !Y) && console.error($), N("error"), h.value = ee ? (q = (V = ee == null ? void 0 : ee[0]) == null ? void 0 : V.message) != null ? q : `${t.prop} is required` : "", i == null || i.emit("validate", t.prop, !1, h.value); }, k = () => { N("success"), i == null || i.emit("validate", t.prop, !0, ""); }, G = async ($) => { const V = x.value; return new dw({ [V]: $ }).validate({ [V]: T.value }, { firstFields: !0 }).then(() => (k(), !0)).catch((ee) => (F(ee), Promise.reject(ee))); }, U = async ($, V) => { if (v) return v = !1, !1; const q = ti(V); if (!I.value) return V == null || V(!1), !1; const ee = A($); return ee.length === 0 ? (V == null || V(!0), !0) : (N("validating"), G(ee).then(() => (V == null || V(!0), !0)).catch((Y) => { const { fields: K } = Y; return V == null || V(!1, K), q ? !1 : Promise.reject(K); })); }, B = () => { N(""), h.value = ""; }, X = async () => { const $ = i == null ? void 0 : i.model; if (!$ || !t.prop) return; const V = fI($, t.prop); qj(V.value, d) || (v = !0), V.value = sV(d), await oi(), B(); }, j = ($) => { l.value.includes($) || l.value.push($); }, ae = ($) => { l.value = l.value.filter((V) => V !== $); }; Ve(() => t.error, ($) => { h.value = $ || "", N($ ? "error" : ""); }, { immediate: !0 }), Ve(() => t.validateStatus, ($) => N($ || "")); const se = _n({ ...Ab(t), $el: p, size: o, validateState: c, labelId: u, inputIds: l, isGroup: b, addInputId: j, removeInputId: ae, resetField: X, clearValidate: B, validate: U }); return $h(ZS, se), hf(() => { t.prop && (i == null || i.addField(se), d = sV(T.value)); }), pf(() => { i == null || i.removeField(se); }), e({ size: o, validateMessage: h, validateState: c, validate: U, clearValidate: B, resetField: X }), ($, V) => { var q; return Re(), St("div", { ref_key: "formItemRef", ref: p, class: Ui(Ue(y)), role: Ue(b) ? "group" : void 0, "aria-labelledby": Ue(b) ? Ue(u) : void 0 }, [ re(Ue(Dwe), { "is-auto-width": Ue(g).width === "auto", "update-all": ((q = Ue(i)) == null ? void 0 : q.labelWidth) === "auto" }, { default: Ce(() => [ Ue(C) ? (Re(), Nr(eH(Ue(S) ? "label" : "div"), { key: 0, id: Ue(u), for: Ue(S), class: Ui(Ue(s).e("label")), style: oD(Ue(g)) }, { default: Ce(() => [ ch($.$slots, "label", { label: Ue(O) }, () => [ Ne(us(Ue(O)), 1) ]) ]), _: 3 }, 8, ["id", "for", "class", "style"])) : xe("v-if", !0) ]), _: 3 }, 8, ["is-auto-width", "update-all"]), he("div", { class: Ui(Ue(s).e("content")), style: oD(Ue(m)) }, [ ch($.$slots, "default"), re(_i, { name: `${Ue(s).namespace.value}-zoom-in-top` }, { default: Ce(() => [ Ue(D) ? ch($.$slots, "error", { key: 0, error: h.value }, () => [ he("div", { class: Ui(Ue(w)) }, us(h.value), 3) ]) : xe("v-if", !0) ]), _: 3 }, 8, ["name"]) ], 6) ], 10, Mwe); }; } }); var cY = /* @__PURE__ */ pw(Rwe, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]); const Nwe = FR(J1e, { FormItem: cY }); S1e(cY); const fY = ["success", "info", "warning", "error"], Fwe = iy({ customClass: { type: String, default: "" }, center: { type: Boolean, default: !1 }, dangerouslyUseHTMLString: { type: Boolean, default: !1 }, duration: { type: Number, default: 3e3 }, icon: { type: w1e, default: "" }, id: { type: String, default: "" }, message: { type: Fu([ String, Object, Function ]), default: "" }, onClose: { type: Fu(Function), required: !1 }, showClose: { type: Boolean, default: !1 }, type: { type: String, values: fY, default: "info" }, offset: { type: Number, default: 20 }, zIndex: { type: Number, default: 0 }, grouping: { type: Boolean, default: !1 }, repeatNum: { type: Number, default: 1 } }), Bwe = { destroy: () => !0 }, kwe = de({ name: "ElMessage", components: { ElBadge: U1e, ElIcon: k1e, ...x1e }, props: Fwe, emits: Bwe, setup(r) { const e = ay("message"), t = te(!1), n = te(r.type ? r.type === "error" ? "danger" : r.type : "info"); let i; const a = Ie(() => { const h = r.type; return { [e.bm("icon", h)]: h && _V[h] }; }), o = Ie(() => r.icon || _V[r.type] || ""), s = Ie(() => ({ top: `${r.offset}px`, zIndex: r.zIndex })); function u() { r.duration > 0 && ({ stop: i } = D_e(() => { t.value && c(); }, r.duration)); } function l() { i == null || i(); } function c() { t.value = !1; } function f({ code: h }) { h === E1e.esc ? t.value && c() : u(); } return hf(() => { u(), t.value = !0; }), Ve(() => r.repeatNum, () => { l(), u(); }), M_e(document, "keydown", f), { ns: e, typeClass: a, iconComponent: o, customStyle: s, visible: t, badgeType: n, close: c, clearTimer: l, startTimer: u }; } }), Vwe = ["id"], Gwe = ["innerHTML"]; function zwe(r, e, t, n, i, a) { const o = mt("el-badge"), s = mt("el-icon"), u = mt("close"); return Re(), Nr(_i, { name: r.ns.b("fade"), onBeforeLeave: r.onClose, onAfterLeave: e[2] || (e[2] = (l) => r.$emit("destroy")), persisted: "" }, { default: Ce(() => [ ba(he("div", { id: r.id, class: Ui([ r.ns.b(), { [r.ns.m(r.type)]: r.type && !r.icon }, r.ns.is("center", r.center), r.ns.is("closable", r.showClose), r.customClass ]), style: oD(r.customStyle), role: "alert", onMouseenter: e[0] || (e[0] = (...l) => r.clearTimer && r.clearTimer(...l)), onMouseleave: e[1] || (e[1] = (...l) => r.startTimer && r.startTimer(...l)) }, [ r.repeatNum > 1 ? (Re(), Nr(o, { key: 0, value: r.repeatNum, type: r.badgeType, class: Ui(r.ns.e("badge")) }, null, 8, ["value", "type", "class"])) : xe("v-if", !0), r.iconComponent ? (Re(), Nr(s, { key: 1, class: Ui([r.ns.e("icon"), r.typeClass]) }, { default: Ce(() => [ (Re(), Nr(eH(r.iconComponent))) ]), _: 1 }, 8, ["class"])) : xe("v-if", !0), ch(r.$slots, "default", {}, () => [ r.dangerouslyUseHTMLString ? (Re(), St(yh, { key: 1 }, [ xe(" Caution here, message could've been compromised, never use user's input as message "), he("p", { class: Ui(r.ns.e("content")), innerHTML: r.message }, null, 10, Gwe) ], 2112)) : (Re(), St("p", { key: 0, class: Ui(r.ns.e("content")) }, us(r.message), 3)) ]), r.showClose ? (Re(), Nr(s, { key: 2, class: Ui(r.ns.e("closeBtn")), onClick: Tne(r.close, ["stop"]) }, { default: Ce(() => [ re(u) ]), _: 1 }, 8, ["class", "onClick"])) : xe("v-if", !0) ], 46, Vwe), [ [lo, r.visible] ]) ]), _: 3 }, 8, ["name", "onBeforeLeave"]); } var $we = /* @__PURE__ */ pw(kwe, [["render", zwe], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]); const rs = []; let Hwe = 1; const Im = function(r = {}, e) { if (!cw) return { close: () => { } }; if (XS(KD.max) && rs.length >= KD.max) return { close: () => { } }; if (!L0(r) && fw(r) && r.grouping && !L0(r.message) && rs.length) { const f = rs.find((h) => { var p, d, v; return `${(d = (p = h.vm.props) == null ? void 0 : p.message) != null ? d : ""}` == `${(v = r.message) != null ? v : ""}`; }); if (f) return f.vm.component.props.repeatNum += 1, f.vm.component.props.type = (r == null ? void 0 : r.type) || "info", { close: () => c.component.proxy.visible = !1 }; } (ca(r) || L0(r)) && (r = { message: r }); let t = r.offset || 20; rs.forEach(({ vm: f }) => { var h; t += (((h = f.el) == null ? void 0 : h.offsetHeight) || 0) + 16; }), t += 16; const { nextZIndex: n } = O1e(), i = `message_${Hwe++}`, a = r.onClose, o = { zIndex: n(), ...r, offset: t, id: i, onClose: () => { Uwe(i, a); } }; let s = document.body; mV(r.appendTo) ? s = r.appendTo : ca(r.appendTo) && (s = document.querySelector(r.appendTo)), mV(s) || (Tc("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), s = document.body); const u = document.createElement("div"); u.className = `container_${i}`; const l = o.message, c = re($we, o, ti(l) ? { default: l } : L0(l) ? { default: () => l } : null); return c.appContext = e || Im._context, c.props.onDestroy = () => { d3(null, u); }, d3(c, u), rs.push({ vm: c }), s.appendChild(u.firstElementChild), { close: () => c.component.proxy.visible = !1 }; }; fY.forEach((r) => { Im[r] = (e = {}, t) => ((ca(e) || L0(e)) && (e = { message: e }), Im({ ...e, type: r }, t)); }); function Uwe(r, e) { const t = rs.findIndex(({ vm: o }) => r === o.component.props.id); if (t === -1) return; const { vm: n } = rs[t]; if (!n) return; e == null || e(n); const i = n.el.offsetHeight; rs.splice(t, 1); const a = rs.length; if (!(a < 1)) for (let o = t; o < a; o++) { const s = Number.parseInt(rs[o].vm.el.style.top, 10) - i - 16; rs[o].vm.component.props.offset = s; } } function Wwe() { var r; for (let e = rs.length - 1; e >= 0; e--) { const t = rs[e].vm.component; (r = t == null ? void 0 : t.proxy) == null || r.close(); } } Im.closeAll = Wwe; Im._context = null; const $g = C1e(Im, "$message"); class jwe { constructor(e, t, n) { if (!e) throw new Error("no viewer object!"); this.snowSize = n.defaultValue((t = t || {}).snowSize, 0.02), this.snowSpeed = n.defaultValue(t.snowSpeed, 60), this.viewer = e, this.init(); } init() { this.snowStage = new Cesium.PostProcessStage({ name: "czm_snow", fragmentShader: this.snow(), uniforms: { snowSize: () => this.snowSize, snowSpeed: () => this.snowSpeed } }), this.viewer.scene.postProcessStages.add(this.snowStage); } destroy() { this.viewer && this.snowStage && (this.viewer.scene.postProcessStages.remove(this.snowStage), this.snowStage.destroy(), delete this.snowSize, delete this.snowSpeed); } show(e) { this.snowStage.enabled = e; } snow() { return `uniform sampler2D colorTexture; varying vec2 v_textureCoordinates; uniform float snowSpeed; uniform float snowSize; float snow(vec2 uv,float scale) { float time=czm_frameNumber/snowSpeed; float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.; uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale; uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d; p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k); k=smoothstep(0.,k,sin(f.x+f.y)*snowSize); return k*w; } void main(void){ vec2 resolution=czm_viewport.zw; vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y); vec3 finalColor=vec3(0); //float c=smoothstep(1.,0.3,clamp(uv.y*.3+.8,0.,.75)); float c=0.; c+=snow(uv,30.)*.0; c+=snow(uv,20.)*.0; c+=snow(uv,15.)*.0; c+=snow(uv,10.); c+=snow(uv,8.); c+=snow(uv,6.); c+=snow(uv,5.); finalColor=(vec3(c)); gl_FragColor=mix(texture2D(colorTexture,v_textureCoordinates),vec4(finalColor,1),.5); } `; } } class Ywe { constructor(e, t, n) { if (!e) throw new Error("no viewer object!"); this.tiltAngle = n.defaultValue((t = t || {}).tiltAngle, -0.6), this.rainSize = n.defaultValue(t.rainSize, 0.3), this.rainSpeed = n.defaultValue(t.rainSpeed, 60), this.viewer = e, this.init(); } init() { this.rainStage = new Cesium.PostProcessStage({ name: "czm_rain", fragmentShader: this.rain(), uniforms: { tiltAngle: () => this.tiltAngle, rainSize: () => this.rainSize, rainSpeed: () => this.rainSpeed } }), this.viewer.scene.postProcessStages.add(this.rainStage); } destroy() { this.viewer && this.rainStage && (this.viewer.scene.postProcessStages.remove(this.rainStage), this.rainStage.destroy(), delete this.tiltAngle, delete this.rainSize, delete this.rainSpeed); } show(e) { this.rainStage.enabled = e; } rain() { return `uniform sampler2D colorTexture; varying vec2 v_textureCoordinates; uniform float tiltAngle; uniform float rainSize; uniform float rainSpeed; float hash(float x) { return fract(sin(x * 133.3) * 13.13); } void main(void) { float time = czm_frameNumber / rainSpeed; vec2 resolution = czm_viewport.zw; vec2 uv = (gl_FragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y); vec3 c = vec3(.6, .7, .8); float a = tiltAngle; float si = sin(a), co = cos(a); uv *= mat2(co, -si, si, co); uv *= length(uv + vec2(0, 4.9)) * rainSize + 1.; float v = 1. - sin(hash(floor(uv.x * 100.)) * 2.); float b = clamp(abs(sin(20. * time * v + uv.y * (5. / (2. + v)))) - .95, 0., 1.) * 20.; c *= v * b; gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c, 1), .5); } `; } } class Xwe { constructor(e, t, n) { if (!e) throw new Error("no viewer object!"); this.visibility = n.defaultValue((t = t || {}).visibility, 0.1), this.color = n.defaultValue(t.color, new n.Color(0.8, 0.8, 0.8, 0.5)), this._show = n.defaultValue(t.show, !0), this.viewer = e, this.init(); } init() { this.fogStage = new Cesium.PostProcessStage({ name: "czm_fog", fragmentShader: this.fog(), uniforms: { visibility: () => this.visibility, fogColor: () => this.color } }), this.viewer.scene.postProcessStages.add(this.fogStage); } destroy() { this.viewer && this.fogStage && (this.viewer.scene.postProcessStages.remove(this.fogStage), this.fogStage.destroy(), delete this.visibility, delete this.color); } show(e) { this._show = e, this.fogState.enabled = this._show; } fog() { return `uniform sampler2D colorTexture; uniform sampler2D depthTexture; uniform float visibility; uniform vec4 fogColor; varying vec2 v_textureCoordinates; void main(void) { vec4 origcolor = texture2D(colorTexture, v_textureCoordinates); float depth = czm_readDepth(depthTexture, v_textureCoordinates); vec4 depthcolor = texture2D(depthTexture, v_textureCoordinates); float f = visibility * (depthcolor.r - 0.3) / 0.2; if (f < 0.0) f = 0.0; else if (f > 1.0) f = 1.0; gl_FragColor = mix(origcolor, fogColor, f); } `; } } const Jn = (r, e) => { r.forEach((t) => { t.value = !1; }), e && (e.value = !0); }; const qwe = { class: "weather-container" }, Zwe = { key: 0, class: "snow dv" }, Kwe = /* @__PURE__ */ Ne(" \u96EA\u5927\u5C0F "), Jwe = /* @__PURE__ */ Ne(" \u96EA\u901F "), Qwe = { key: 1, class: "rain dv" }, exe = /* @__PURE__ */ Ne(" \u96E8\u5927\u5C0F "), txe = /* @__PURE__ */ Ne(" \u96E8\u901F "), rxe = /* @__PURE__ */ Ne(" \u503E\u659C\u89D2\u5EA6 "), nxe = { key: 2, class: "fog dv" }, ixe = /* @__PURE__ */ Ne(" \u900F\u660E\u5EA6 "), axe = { class: "btn" }, oxe = /* @__PURE__ */ Ne("\u6A21\u62DF"), sxe = /* @__PURE__ */ Ne("\u53D6\u6D88"), uxe = /* @__PURE__ */ de({ __name: "weather", emits: ["closeWeather"], setup(r, { emit: e }) { const t = window.Cesium, n = window.viewer, i = te(""), a = te(!1), o = te(!1), s = te(!1), u = te(!1), l = [a, o, s], c = _n({ snowSize: 0, snowSpeed: 0 }), f = _n({ tiltAngle: 0, rainSize: 0, rainSpeed: 0 }), h = _n({ visibility: 0 }), p = te(), d = te(), v = te(), g = () => { _(), p.value = new jwe( n, { snowSize: c.snowSize, snowSpeed: 201 - c.snowSpeed }, t ); }, m = () => { _(), d.value = new Ywe( n, { tiltAngle: f.tiltAngle, rainSize: f.rainSize, rainSpeed: 201 - f.rainSpeed }, t ); }, y = () => { _(), v.value = new Xwe( n, { visibility: h.visibility, color: new t.Color(0.8, 0.8, 0.8, 0.3) }, t ); }, _ = () => { p.value && p.value.destroy(), d.value && d.value.destroy(), v.value && v.value.destroy(); }, w = [ { value: "snow", label: "\u96EA" }, { value: "fog", label: "\u96FE" }, { value: "rain", label: "\u96E8" } ]; Ve(i, (b) => { b === "snow" ? Jn(l, a) : b === "fog" ? Jn(l, s) : b === "rain" && Jn(l, o); }); const x = () => { switch (i.value) { case "snow": c.snowSize !== 0 && c.snowSpeed !== 0 ? (g(), u.value = !0) : $g.error("\u8BF7\u8BBE\u7F6E\u96EA\u7684\u5927\u5C0F\u548C\u901F\u5EA6"); break; case "fog": h.visibility !== 0 ? (y(), u.value = !0) : $g.error("\u8BF7\u8BBE\u7F6E\u96FE\u7684\u900F\u660E\u5EA6"); break; case "rain": f.rainSize !== 0 && f.rainSpeed !== 0 ? (m(), u.value = !0) : $g.error("\u8BF7\u8BBE\u7F6E\u96E8\u7684\u5927\u5C0F\u548C\u901F\u5EA6"); break; } }, C = () => { u.value = !1, _(); }, S = () => { u.value = !1, _(), e("closeWeather"); }; return xa(() => { C(), Jn(l); }), (b, E) => { const T = mt("el-option"), P = mt("el-select"), I = mt("el-slider"), A = mt("el-button"); return Re(), St("div", qwe, [ he("span", { class: "delete", onClick: S }, "x"), re(P, { disabled: u.value, teleported: !1, modelValue: i.value, "onUpdate:modelValue": E[0] || (E[0] = (L) => i.value = L), placeholder: "\u8BF7\u9009\u62E9\u6A21\u62DF\u5929\u6C14" }, { default: Ce(() => [ (Re(), St(yh, null, Ib(w, (L) => re(T, { key: L.value, label: L.label, value: L.value }, null, 8, ["label", "value"])), 64)) ]), _: 1 }, 8, ["disabled", "modelValue"]), a.value ? (Re(), St("div", Zwe, [ he("span", null, [ Kwe, re(I, { class: "eslider", min: 0, step: 0.01, max: 1, disabled: u.value, modelValue: c.snowSize, "onUpdate:modelValue": E[1] || (E[1] = (L) => c.snowSize = L) }, null, 8, ["step", "disabled", "modelValue"]) ]), he("span", null, [ Jwe, re(I, { class: "eslider", disabled: u.value, modelValue: c.snowSpeed, "onUpdate:modelValue": E[2] || (E[2] = (L) => c.snowSpeed = L), min: 0, max: 200 }, null, 8, ["disabled", "modelValue"]) ]) ])) : xe("", !0), o.value ? (Re(), St("div", Qwe, [ he("span", null, [ exe, re(I, { class: "eslider", min: 0, step: 0.01, max: 1, disabled: u.value, modelValue: f.rainSize, "onUpdate:modelValue": E[3] || (E[3] = (L) => f.rainSize = L) }, null, 8, ["step", "disabled", "modelValue"]) ]), he("span", null, [ txe, re(I, { class: "eslider", min: 0, max: 200, disabled: u.value, modelValue: f.rainSpeed, "onUpdate:modelValue": E[4] || (E[4] = (L) => f.rainSpeed = L) }, null, 8, ["disabled", "modelValue"]) ]), he("span", null, [ rxe, re(I, { class: "eslider", min: -1, max: 1, step: 0.1, disabled: u.value, modelValue: f.tiltAngle, "onUpdate:modelValue": E[5] || (E[5] = (L) => f.tiltAngle = L) }, null, 8, ["step", "disabled", "modelValue"]) ]) ])) : xe("", !0), s.value ? (Re(), St("div", nxe, [ he("span", null, [ ixe, re(I, { class: "eslider", min: 0, step: 0.01, max: 1, disabled: u.value, modelValue: h.visibility, "onUpdate:modelValue": E[6] || (E[6] = (L) => h.visibility = L) }, null, 8, ["step", "disabled", "modelValue"]) ]) ])) : xe("", !0), ba(he("div", axe, [ re(A, { type: "primary", onClick: x }, { default: Ce(() => [ oxe ]), _: 1 }), re(A, { type: "warning", onClick: C }, { default: Ce(() => [ sxe ]), _: 1 }) ], 512), [ [lo, a.value || o.value || s.value] ]) ]); }; } }), lxe = /* @__PURE__ */ zn(uxe, [["__scopeId", "data-v-ccffc000"]]); const cxe = (r) => (al("data-v-e0dbc3d4"), r = r(), sl(), r), fxe = { class: "flood-container" }, hxe = /* @__PURE__ */ cxe(() => /* @__PURE__ */ he("div", { class: "title" }, [ /* @__PURE__ */ he("span", null, "\u6DF9\u6CA1\u6A21\u62DF\u53C2\u6570") ], -1)), pxe = { class: "set" }, dxe = /* @__PURE__ */ Ne(" \u6DF9\u6CA1\u6700\u5C0F\u9AD8\u5EA6 "), vxe = /* @__PURE__ */ Ne(" \u6DF9\u6CA1\u6700\u5927\u9AD8\u5EA6 "), gxe = /* @__PURE__ */ Ne(" \u6BCF\u5E27\u589E\u52A0\u9AD8\u5EA6 "), mxe = { class: "btn" }, yxe = /* @__PURE__ */ Ne("\u7ED8\u5236\u533A\u57DF"), _xe = /* @__PURE__ */ Ne("\u6E05\u7A7A\u533A\u57DF"), wxe = /* @__PURE__ */ Ne("\u5F00\u59CB"), xxe = /* @__PURE__ */ Ne("\u7ED3\u675F"), Cxe = /* @__PURE__ */ de({ __name: "flood", emits: ["closeFlood"], setup(r, { emit: e }) { const t = te(), n = te(), i = te(!1), a = () => { window.flood.pause(), i.value = !i.value; }, o = () => { t.value && t.value.length > 0 ? (c(), window.flood.start(), i.value = !1) : $g.error("\u8BF7\u5148\u7ED8\u5236\u533A\u57DF"); }, s = () => { t.value = [], window.flood.stop(), i.value = !1; }, u = _n({ minHeight: 0, maxHeight: 4e3, speed: 10 }); Ve( u, (h) => { Sg.emit("floodObj", h); }, { deep: !0, immediate: !0 } ), Ve( () => t.value, (h) => { t.value && t.value.length > 0 && Sg.emit("area", h); } ); const l = () => { const h = new iH(window.viewer, window.Cesium); h.start(() => { n.value = h.polygon; const p = h.activeShapePoints.map((d) => { const v = window.viewer.scene.globe.ellipsoid.cartesianToCartographic(d); return [v.longitude / Math.PI * 180, v.latitude / Math.PI * 180]; }); t.value = p; }); }, c = () => { n.value && (t.value = [], window.viewer.entities.remove(n.value)); }, f = () => { e("closeFlood"); }; return (h, p) => { const d = mt("el-input-number"), v = mt("el-button"); return Re(), St("div", fxe, [ he("span", { class: "delete", onClick: f }, "x"), hxe, he("div", pxe, [ he("span", null, [ dxe, re(d, { class: "inp", modelValue: u.minHeight, "onUpdate:modelValue": p[0] || (p[0] = (g) => u.minHeight = g) }, null, 8, ["modelValue"]) ]), he("span", null, [ vxe, re(d, { class: "inp", modelValue: u.maxHeight, "onUpdate:modelValue": p[1] || (p[1] = (g) => u.maxHeight = g) }, null, 8, ["modelValue"]) ]), he("span", null, [ gxe, re(d, { class: "inp", modelValue: u.speed, "onUpdate:modelValue": p[2] || (p[2] = (g) => u.speed = g) }, null, 8, ["modelValue"]) ]), he("span", mxe, [ re(v, { onClick: l }, { default: Ce(() => [ yxe ]), _: 1 }), re(v, { onClick: c }, { default: Ce(() => [ _xe ]), _: 1 }), re(v, { onClick: o }, { default: Ce(() => [ wxe ]), _: 1 }), re(v, { type: "danger", round: "", onClick: a }, { default: Ce(() => [ Ne(us(i.value ? "\u7EE7\u7EED" : "\u6682\u505C"), 1) ]), _: 1 }), re(v, { type: "danger", round: "", onClick: s }, { default: Ce(() => [ xxe ]), _: 1 }) ]) ]) ]); }; } }), Sxe = /* @__PURE__ */ zn(Cxe, [["__scopeId", "data-v-e0dbc3d4"]]), hY = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol", vw = hY ? Symbol("VueCesium") : "VueCesium", pY = hY ? Symbol("_vc_f_") : "_vc_f_", Exe = Symbol(); function dY(r) { const e = Object.getPrototypeOf(r), t = {}; return Object.setPrototypeOf(t, e), Object.keys(r).forEach((n) => { const i = Hg(r[n]); if (r[n] && Vn(r[n]) || r[n] instanceof Element) t[n] = r[n]; else if (r[n] && typeof r[n] == "object" && !Cesium[i]) { const a = dY(r[n]); Object.keys(a).length && (t[n] = a); } else r[n] !== "" && r[n] !== void 0 && r[n] !== null && (t[n] = r[n]); }), t; } function vY(r) { return Qo(r) || __e(r) ? !0 : r instanceof Element ? !1 : Object.keys(r).length === 0; } const je = H_e; function Hg(r) { if (r && r.constructor) { const e = r.constructor.toString(); let t = e.substr(0, e.indexOf("(")); return t = t.replace("function", ""), t.replace(/(^\s*)|(\s*$)/gi, ""); } return typeof r; } function Dv(r, e) { return r != null ? r : e; } function bxe(r, e = []) { const t = {}; return Object.keys(r).forEach((n) => { if (e.indexOf(n) === -1) { const i = r[n]; t[n] = ti(i) ? void 0 : _a(i) ? ti(i.default) ? i.default() : i.default : i; } }), t; } const iv = (r, e, t = []) => { for (const n in e) !r[n] && t.indexOf(n) === -1 && (r[n] = e[n]); }; function Txe(r) { if (Array.isArray(r)) return !0; if (typeof r != "object" || !r) return !1; const e = r.length; return typeof e == "number" && e >= 0; } const Pxe = te({}); function Ixe(r) { const e = Wu(Exe, Pxe); return r ? fw(e.value) && tn(e.value, r) ? Ie(() => e.value[r]) : te(void 0) : e; } function Axe(r) { var e, t, n, i; const a = (g = "") => function(...m) { g && (ca(m[0]) ? m[0] = g.trim() + " " + m[0] : m = [g.trim(), ...m]), console.log(...m); }, o = (g = "") => function(...m) { g && (ca(m[0]) ? m[0] = g.trim() + " " + m[0] : m = [g.trim(), ...m]), console.warn(...m); }, s = (g = "") => function(...m) { g && (ca(m[0]) ? m[0] = g.trim() + " " + m[0] : m = [g.trim(), ...m]), console.error(...m); }, u = (g = "") => function(...m) { g && (ca(m[0]) ? m[0] = g.trim() + " " + m[0] : m = [g.trim(), ...m]), process.env.NODE_ENV; }, l = (g = "default") => { let m = ""; switch (g) { case "default": m = "#35495E"; break; case "primary": m = "#3488ff"; break; case "success": m = "#43B883"; break; case "warning": m = "#e6a23c"; break; case "danger": m = "#f56c6c"; break; } return m; }, c = (g, m, y = "primary") => { console.log(`%c ${g} %c ${m} %c`, "background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;", `background:${l(y)}; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;`, "background:transparent"); }, f = (g) => { console.log(`%c${g.map((m) => m.text || "").join("%c")}`, ...g.map((m) => `color: ${l(m.type)};`)); }, h = (g) => { f([{ text: g, type: "success" }]); }, p = (g) => { f([{ text: g, type: "warning" }]); }, d = (g) => { f([{ text: g, type: "danger" }]); }, v = (g) => { f([{ text: g, type: "primary" }]); }; return { log: a(`[VueCesium] ${(e = r == null ? void 0 : r.proxy) == null ? void 0 : e.$options.name}`), warn: o(`[VueCesium] WARN ${(t = r == null ? void 0 : r.proxy) == null ? void 0 : t.$options.name}`), error: s(`[VueCesium] ERR ${(n = r == null ? void 0 : r.proxy) == null ? void 0 : n.$options.name}`), debug: u(`[VueCesium] Debug ${(i = r == null ? void 0 : r.proxy) == null ? void 0 : i.$options.name}`), capsule: c, success: h, warning: p, danger: d, primary: v }; } /*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ const Lxe = Object.prototype.hasOwnProperty; function Dxe(r, e, t) { if (!r) throw new TypeError("argument dest is required"); if (!e) throw new TypeError("argument src is required"); return t === void 0 && (t = !0), Object.getOwnPropertyNames(e).forEach(function(i) { if (!t && Lxe.call(r, i)) return; const a = Object.getOwnPropertyDescriptor(e, i); Object.defineProperty(r, i, a); }), r; } function gw(...r) { let e; return typeof r[r.length - 1] != "object" && (e = r.pop()), r.slice(1).reduce((t, n, i) => Dxe(t, n, e), r[0]); } function Mxe(r) { return r.appContext.config.globalProperties.$router !== void 0; } function dI(r, e) { return r.vnode.props !== null && r.vnode.props[e] !== void 0; } function xi(r, e) { const t = r.vnode.props; if (t === null) return; const n = Object.keys(t), i = Xj(n, (o) => o.includes(`on${qS(e)}`) || o.includes(`on${qS(Ome(e))}`)); return t[n[i]]; } function JS(r) { return r.value; } function Fd(r) { var e; const t = r.parent; return !t.cesiumClass && ((e = t.proxy) == null ? void 0 : e.$options.name) !== "VcViewer" ? Fd(t) : t; } function bi(r, e = !1) { const { Cartesian2: t, CallbackProperty: n } = Cesium; if (r instanceof Cesium.Cartesian2 || r instanceof n) return r; if (_a(r) && tn(r, "x") && tn(r, "y")) { const i = r; return new t(i.x, i.y); } if (Vn(r)) return new t(r[0], r[1]); if (ti(r)) return new n(r, e); } function ei(r, e, t = !1) { const { CallbackProperty: n, Cartesian3: i, Ellipsoid: a, SampledPositionProperty: o, CompositePositionProperty: s, ConstantPositionProperty: u, TimeIntervalCollectionPositionProperty: l } = Cesium; if (r instanceof i || r instanceof n || r instanceof o || r instanceof s || r instanceof u || r instanceof l) return r; if (e = e || a.WGS84, _a(r)) { if (tn(r, "x") && tn(r, "y") && tn(r, "z")) { const c = r; return new i(c.x, c.y, c.z); } else if (tn(r, "lng") && tn(r, "lat")) { const c = r; return i.fromDegrees(c.lng, c.lat, c.height || 0, e); } } if (Vn(r)) return i.fromDegrees(r[0], r[1], r[2] || 0, e); if (ti(r)) return new n(r, t); } function ef(r, e, t = !1) { const { CallbackProperty: n, Cartesian3: i, Ellipsoid: a } = Cesium; if (r instanceof n) return r; if (ti(r)) return new n(r, t); if (e = e || a.WGS84, Vn(r)) { if (Vn(r[0]) || _a(r[0])) { const o = []; return r.forEach((s) => { o.push(ei(s, e)); }), o; } return i.fromDegreesArrayHeights(r, e); } } function gY(r, e) { const { CallbackProperty: t } = Cesium; if (r instanceof t) return r; if (ti(r)) return new t(r, e); if (Vn(r)) { const n = []; return r.forEach((i) => { n.push(bi(i)); }), n; } } function nM(r, e = !1) { const { CallbackProperty: t, Quaternion: n, VelocityOrientationProperty: i } = Cesium; if (r instanceof n || r instanceof t || r instanceof i) return r; if (_a(r) && tn(r, "x") && tn(r, "y")) { const a = r; return new n(a.x, a.y, a.z, a.w); } if (Vn(r)) return new n(r[0], r[1], r[2], r[3]); if (ti(r)) return new t(r, e); } function mY(r, e) { r.forEach((t) => { t.positions = ef(t.positions, e), t.holes && mY(t.holes, e); }); } function kR(r, e, t = !1) { var n; const { PolygonHierarchy: i, CallbackProperty: a } = Cesium; if (r instanceof i || r instanceof a) return r; if (ti(r)) return new a(r, t); if (Vn(r) && r.length >= 3) { const o = ef(r, e); return new i(o); } if (_a(r) && tn(r, "positions")) { const o = r; return o.positions = ef(o.positions, e), (n = o.holes) != null && n.length && mY(o.holes, e), o; } } function VR(r, e = !1) { const { NearFarScalar: t, CallbackProperty: n } = Cesium; if (r instanceof t || r instanceof n) return r; if (_a(r) && tn(r, "near") && tn(r, "far")) { const i = r; return new t(i.near, i.nearValue || 0, i.far, i.farValue || 1); } if (Vn(r)) return new t(r[0], r[1], r[2], r[3]); if (ti(r)) return new n(r, e); } function Oxe(r, e = !1) { const { DistanceDisplayCondition: t, CallbackProperty: n } = Cesium; if (r instanceof t || r instanceof n) return r; if (_a(r) && tn(r, "near") && tn(r, "far")) { const i = r; return new t(i.near, i.far); } if (Vn(r)) return new t(r[0], r[1]); if (ti(r)) return new n(r, e); } function Gt(r, e = !1) { const { Color: t, CallbackProperty: n } = Cesium; if (r instanceof t || r instanceof n) return r; if (ca(r)) return t.fromCssColorString(r); if (_a(r)) { if (tn(r, "red")) { const i = r; return t.fromBytes(i.red, i.green || 255, i.blue || 255, i.alpha || 255); } else if (tn(r, "x")) { const i = r; return new t(i.x, i.y || 1, i.z || 1, i.w || 1); } } if (Vn(r)) return t.fromBytes(r[0], r[1], r[2], r[3] || 255); if (ti(r)) return new n(r, e); } function Rxe(r) { if (Vn(r)) { const e = []; return r.forEach((t) => { e.push(Gt(t)); }), e; } else return r; } function Nxe(r, e = !1) { const { CallbackProperty: t, Color: n, CheckerboardMaterialProperty: i, ColorMaterialProperty: a, GridMaterialProperty: o, ImageMaterialProperty: s, PolylineArrowMaterialProperty: u, PolylineDashMaterialProperty: l, PolylineGlowMaterialProperty: c, PolylineOutlineMaterialProperty: f, StripeMaterialProperty: h, StripeOrientation: p } = Cesium; if (r instanceof t || r instanceof n || r instanceof i || r instanceof a || r instanceof s || r instanceof u || r instanceof l || r instanceof c || r instanceof f || r instanceof h || Hg(r).indexOf("MaterialProperty") !== -1) return r; if (ca(r) && /(.*)\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$/.test(r) || r instanceof HTMLImageElement || r instanceof HTMLCanvasElement || r instanceof HTMLVideoElement) return new s({ image: r, repeat: bi({ x: 1, y: 1 }), color: n.WHITE, transparent: !0 }); if (Vn(r) || ca(r)) return new a(Gt(r)); if (_a(r) && tn(r, "fabric")) { const d = r; switch (d.fabric.type) { case "Image": return new s({ image: d.fabric.uniforms.image, repeat: bi(d.fabric.uniforms.repeat || { x: 1, y: 1 }), color: Gt(d.fabric.uniforms.color) || n.WHITE, transparent: d.fabric.uniforms.transparent || !1 }); case "Color": return new a(Gt(d.fabric.uniforms.color || n.WHITE)); case "PolylineArrow": return new u(Gt(d.fabric.uniforms.color || n.WHITE)); case "PolylineDash": return new l({ color: Gt(d.fabric.uniforms.color || "white") || n.WHITE, gapColor: Gt(d.fabric.uniforms.gapColor) || n.TRANSPARENT, dashLength: d.fabric.uniforms.taperPower || 16, dashPattern: d.fabric.uniforms.taperPower || 255 }); case "PolylineGlow": return new c({ color: Gt(d.fabric.uniforms.color) || n.WHITE, glowPower: d.fabric.uniforms.glowPower || 0.25, taperPower: d.fabric.uniforms.taperPower || 1 }); case "PolylineOutline": return new f({ color: Gt(d.fabric.uniforms.color) || n.WHITE, outlineColor: Gt(d.fabric.uniforms.outlineColor) || n.BLACK, outlineWidth: d.fabric.uniforms.outlineWidth || 1 }); case "Checkerboard": return new i({ evenColor: Gt(d.fabric.uniforms.evenColor) || n.WHITE, oddColor: Gt(d.fabric.uniforms.oddColor) || n.BLACK, repeat: bi(d.fabric.uniforms.repeat || { x: 2, y: 2 }) }); case "Grid": return new o({ color: Gt(d.fabric.uniforms.color) || n.WHITE, cellAlpha: d.fabric.uniforms.cellAlpha || 0.1, lineCount: bi(d.fabric.uniforms.lineCount || { x: 8, y: 8 }), lineThickness: bi(d.fabric.uniforms.lineThickness || { x: 1, y: 1 }), lineOffset: bi(d.fabric.uniforms.lineOffset || { x: 0, y: 0 }) }); case "Stripe": return new h({ orientation: d.fabric.uniforms.orientation || p.HORIZONTAL, evenColor: Gt(d.fabric.uniforms.evenColor || "white"), oddColor: Gt(d.fabric.uniforms.oddColor || "black"), offset: d.fabric.uniforms.offset || 0, repeat: d.fabric.uniforms.repeat || 1 }); } } return ti(r) ? new t(r, e) : r; } function GR(r) { var e; const t = this, n = (e = t == null ? void 0 : t.proxy) == null ? void 0 : e.$options.name; if (n && (n.indexOf("Graphics") !== -1 || n.indexOf("Datasource") !== -1 || n === "VcOverlayDynamic" || n === "VcEntity")) return Nxe(r); const { Material: i, combine: a } = Cesium; if (r instanceof i) return r; if (_a(r) && tn(r, "fabric")) { const o = (s) => { for (const u in s) if (!Vn(s[u]) && _a(s[u])) o(s[u]); else if (u.toLocaleLowerCase().indexOf("color") !== -1 && !vY(s[u])) { const l = Gt(s[u]); s[u] = a(l, l, !0); } }; return o(r), new i(r); } if (Vn(r) || ca(r)) { const o = i.fromType("Color"); return o.uniforms.color = Gt(r), o; } } function QS(r) { var e; const { Appearance: t, DebugAppearance: n, MaterialAppearance: i, PolylineColorAppearance: a, EllipsoidSurfaceAppearance: o, PerInstanceColorAppearance: s, PolylineMaterialAppearance: u } = Cesium; if (r instanceof t || r instanceof n || r instanceof i || r instanceof a || r instanceof o || r instanceof s || r instanceof u || Hg(r).indexOf("Appearance") !== -1) return r; if (_a(r) && tn(r, "type")) { const l = { ...r.options }; return (e = r.options) != null && e.material && (l.material = GR.call(this, r.options.material)), new Cesium[r.type]({ ...l }); } } function Ug(r, e = !1) { const { Rectangle: t, RectangleGraphics: n, CallbackProperty: i } = Cesium; if (r instanceof n || r instanceof t) return r; if (Vn(r)) return t.fromDegrees(r[0], r[1], r[2], r[3]); if (_a(r)) { if (tn(r, "west")) { const a = r; return t.fromDegrees(a.west, a.south, a.east, a.north); } else if (tn(r, "x")) { const a = r; return new t(a.x, a.y, a.z, a.w); } } if (ti(r)) return new i(r, e); } function yY(r, e = !1) { const { BoundingRectangle: t, CallbackProperty: n } = Cesium; if (r instanceof t || r instanceof n) return r; if (_a(r) && tn(r, "x")) { const i = r; return new t(i.x, i.y, i.width, i.height); } if (Vn(r)) return new t(r[0], r[1], r[2], r[3]); if (ti(r)) return new n(r, e); } function Fxe(r, e = !1) { const { Cartesian3: t, Plane: n, PlaneGraphics: i, CallbackProperty: a } = Cesium; if (r instanceof i || r instanceof n || r instanceof a) return r; if (_a(r) && tn(r, "normal")) { const o = r; return t.normalize(ei(o.normal), o.normal), new n(o.normal, o.distance); } if (Vn(r)) { const o = ei(r[0]), s = t.normalize(o, new t()); return new n(s, r[1]); } if (ti(r)) return new a(r, e); } function Bxe(r, e = !1) { const { TranslationRotationScale: t, CallbackProperty: n } = Cesium; if (r instanceof n || r instanceof t) return r; if (_a(r) && tn(r, "translation")) { const i = r; return new t(ei(i.translation), nM(i.rotation), ei(i.scale)); } return Vn(r) ? new t(ei(r[0]), nM(r[1]), ei(r[2])) : ti(r) ? new n(r, e) : r; } function kxe(r) { var e; const n = (e = this.proxy) == null ? void 0 : e.$options.name, i = {}; switch (n) { case "VcDatasourceGeojson": return Object.assign(i, r), i && i.markerColor && (i.markerColor = Gt(i.markerColor)), i && i.stroke && (i.stroke = Gt(i.stroke)), i && i.fill && (i.fill = Gt(i.fill)), i; } return r; } function iM(r, e, t) { const { EllipsoidGeodesic: n, Ellipsoid: i } = Cesium; t = t || i.WGS84; const a = t.cartesianToCartographic(r), o = t.cartesianToCartographic(e); return new n(a, o).surfaceDistance; } function Vxe(r, e, t, n) { const { Camera: i, Cartesian3: a, Math: o } = Cesium, s = new i(t); if (a.equals(r, e)) return; let u = a.subtract(e, r, {}); u = a.normalize(u, u); let l = a.subtract(r, new a(), {}); l = a.normalize(l, l), s.setView({ destination: r, orientation: { direction: u, up: l } }), n = n || [0, 0, 0]; let c = s.heading; return c -= o.PI_OVER_TWO, c < 0 && (c += o.TWO_PI), n.splice(0, n.length, c, s.pitch, s.roll), n; } function Gxe(r, e, t, n) { const { HeadingPitchRoll: i, Transforms: a, Matrix4: o, Cartesian3: s, Cartesian4: u, Quaternion: l, Cartographic: c, Ellipsoid: f } = Cesium; n = n || f.WGS84; const h = new i(e, 0, 0), p = new s(1, 1, 1), d = a.headingPitchRollToFixedFrame(r, h), v = o.getColumn(d, 1, new u()), g = new s(v.x, v.y, v.z), m = l.fromAxisAngle(g, t * n.oneOverRadii.x), y = o.fromTranslationQuaternionRotationScale(s.ZERO, m, p), _ = o.multiplyByPoint(y, r, new s()), w = c.fromCartesian(r, n), x = c.fromCartesian(_, n); return x.height = w.height, c.toCartesian(x, n); } function _Y(r) { let e = 0; const { CoplanarPolygonGeometry: t, VertexFormat: n, defined: i, Cartesian3: a } = Cesium, o = t.createGeometry(t.fromPositions({ positions: r, vertexFormat: n.POSITION_ONLY })); if (!Qo(o) && i(o)) { const s = o.indices, u = o.attributes.position.values; for (let l = 0; l < s.length; l += 3) { const c = s[l], f = s[l + 1], h = s[l + 2]; e += zxe(a.unpack(u, 3 * c, {}), a.unpack(u, 3 * f, {}), a.unpack(u, 3 * h, {})); } } return e; } const zxe = (r, e, t) => { const { Cartesian3: n } = Cesium, i = n.subtract(r, e, {}), a = n.subtract(t, e, {}), o = n.cross(i, a, i); return 0.5 * n.magnitude(o); }; function kf(r) { const { JulianDate: e } = Cesium; return r instanceof e ? r : ca(r) ? Cesium.JulianDate.fromDate(new Date(r)) : r instanceof Date ? Cesium.JulianDate.fromDate(r) : Cesium.JulianDate.now(); } function vI(r) { const { HeadingPitchRange: e, Math: t } = Cesium; return r instanceof Cesium.HeadingPitchRange ? r : Array.isArray(r) ? new e(t.toRadians(r[0]) || 0, t.toRadians(r[1]) || 0, r[2] || 0) : _a(r) ? new e(r.heading || 0, r.pitch || 0, r.range || 0) : new e(); } function wY(r, e) { const { Cartesian3: t, Matrix4: n, Transforms: i, Math: a } = Cesium, o = new t(), s = i.eastNorthUpToFixedFrame(r); return n.inverse(s, s), n.multiplyByPoint(s, e, o), t.normalize(o, o), a.toDegrees(Math.atan2(o.x, o.y)); } function xY(r, e) { const { Cartesian3: t, Matrix4: n, Transforms: i, Math: a } = Cesium, o = new t(), s = i.eastNorthUpToFixedFrame(r); return n.inverse(s, s), n.multiplyByPoint(s, e, o), t.normalize(o, o), a.toDegrees(Math.asin(o.z)); } function CY(r, e, t, n = []) { const { Cartesian3: i, Ray: a, defined: o } = Cesium, s = i.normalize(i.subtract(e, r, new i()), new i()), u = new a(r, s), l = t.scene.pickFromRay(u, n); if (o(l) && o(l.position)) return l.position; } const av = { position: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: ei, deep: !0 } } }, SY = { viewFrom: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: ei, deep: !0 } } }, zR = { orientation: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: nM } } }, EY = { alignedAxis: { type: [Object, Array, Function], default: () => ({ x: 0, y: 0, z: 0 }), watcherOptions: { cesiumObjectBuilder: ei } } }, oy = { color: { type: [Object, String, Array, Function], default: "white", watcherOptions: { cesiumObjectBuilder: Gt } } }, $xe = { depthFailColor: { type: [Object, String, Array, Function], default: "white", watcherOptions: { cesiumObjectBuilder: Gt } } }, gT = { disableDepthTestDistance: [Number, Object, Function] }, sy = { distanceDisplayCondition: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: Oxe } } }, $R = { eyeOffset: { type: [Object, Array, Function], default: () => ({ x: 0, y: 0, z: 0 }), watcherOptions: { cesiumObjectBuilder: ei } } }, _u = { height: [Number, Object, Function] }, mT = { heightReference: { type: [Number, Object, Function] } }, HR = { horizontalOrigin: { type: [Number, Object, Function], default: 0 } }, UR = { image: [String, Object, HTMLCanvasElement, Function] }, Hxe = { imageSubRegion: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: yY } } }, yT = { pixelOffset: { type: [Object, Array, Function], default: () => ({ x: 0, y: 0 }), validator: (r) => Vn(r) ? r.length === 2 : fw(r) ? tn(r, "x") && tn(r, "y") : !!ti(r), watcherOptions: { cesiumObjectBuilder: bi } } }, WR = { pixelOffsetScaleByDistance: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: VR } } }, uy = { rotation: { type: [Number, Object, Function], default: 0 } }, _T = { scale: { type: [Number, Object, Function], default: 1 } }, wT = { scaleByDistance: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: VR } } }, Tn = { show: { type: [Boolean, Object, Function], default: !0 } }, jR = { sizeInMeters: { type: [Boolean, Object, Function], default: !1 } }, xT = { translucencyByDistance: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: VR } } }, YR = { verticalOrigin: { type: [Number, Object, Function], default: 0 } }, ov = { width: [Number, Object, Function] }, XR = { dimensions: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: ei } } }, Uxe = { fill: { type: [Boolean, Object, Function], default: !0 } }, bY = { material: { type: [Object, String, Array, Function], default: "white", watcherOptions: { cesiumObjectBuilder: GR } } }, Wxe = { outline: { type: [Boolean, Object, Function], default: !1 } }, qR = { outlineColor: { type: [Object, String, Array, Function], default: "black", watcherOptions: { cesiumObjectBuilder: Gt } } }, ZR = { outlineWidth: { type: [Number, Object, Function], default: 1 } }, CT = { shadows: [Number, Object, Function] }, sc = { positions: { type: [Array, Object, Function], watcherOptions: { cesiumObjectBuilder: ef, exclude: "_callback", deep: !0 } } }, ll = { extrudedHeight: [Number, Object, Function] }, jxe = { extrudedHeightReference: [Number, Object, Function] }, mw = { cornerType: { type: [Number, Object, Function], default: 0 } }, Ca = { granularity: [Number, Object, Function] }, ly = { classificationType: { type: [Number, Object, Function] } }, Yxe = { zIndex: [Number, Object, Function] }, KR = { length: [Number, Object, Function] }, JR = { topRadius: [Number, Object, Function] }, QR = { bottomRadius: [Number, Object, Function] }, ST = { numberOfVerticalLines: { type: [Number, Object, Function], default: 16 } }, eN = { slices: { type: [Number, Object, Function], default: 128 } }, tN = { semiMajorAxis: [Number, Object, Function] }, rN = { semiMinorAxis: [Number, Object, Function] }, sv = { stRotation: { type: [Number, Object, Function], default: 0 } }, nN = { radii: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: ei } } }, iN = { innerRadii: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: ei } } }, aN = { minimumClock: { type: [Number, Object, Function], default: 0 } }, oN = { maximumClock: { type: [Number, Object, Function], default: 2 * Math.PI } }, sN = { minimumCone: { type: [Number, Object, Function], default: 0 } }, uN = { maximumCone: { type: [Number, Object, Function], default: Math.PI } }, yw = { stackPartitions: { type: [Number, Object, Function], default: 64 } }, _w = { slicePartitions: { type: [Number, Object, Function], default: 64 } }, lN = { subdivisions: { type: [Number, Object, Function], default: 128 } }, TY = { text: [String, Object, Function] }, PY = { font: { type: [String, Object, Function], default: "30px sans-serif" } }, IY = { labelStyle: { type: [Number, Object, Function], default: 0 } }, AY = { showBackground: { type: [Boolean, Object, Function], default: !1 } }, LY = { backgroundColor: { type: [Object, String, Array, Function], default: () => ({ x: 0.165, y: 0.165, z: 0.165, w: 0.8 }), watcherOptions: { cesiumObjectBuilder: Gt } } }, DY = { backgroundPadding: { type: [Object, Array, Function], default: () => ({ x: 7, y: 5 }), watcherOptions: { cesiumObjectBuilder: bi } } }, MY = { fillColor: { type: [Object, String, Array, Function], default: "white", watcherOptions: { cesiumObjectBuilder: Gt } } }, Xxe = { uri: [String, Object, Function] }, OY = { minimumPixelSize: { type: [Number, Object, Function], default: 0 } }, RY = { maximumScale: [Number, Object, Function] }, NY = { incrementallyLoadTextures: { type: [Boolean, Object, Function], default: !0 } }, qxe = { clampAnimations: { type: [Boolean, Object, Function], default: !0 } }, FY = { clampAnimations: { type: [Boolean, Object, Function], default: !0 } }, BY = { silhouetteColor: { type: [Object, String, Array, Function], watcherOptions: { cesiumObjectBuilder: Gt } } }, kY = { silhouetteSize: { type: [Number, Object, Function], default: 0 } }, VY = { colorBlendMode: { type: [Number, Object, Function], default: 0 } }, GY = { colorBlendAmount: { type: [Number, Object, Function], default: 0.5 } }, cN = { imageBasedLightingFactor: { type: [Object, Array, Function], default: () => [1, 1], watcherOptions: { cesiumObjectBuilder: bi } } }, zY = { lightColor: { type: [Object, String, Array, Function], watcherOptions: { cesiumObjectBuilder: Gt } } }, Zxe = { nodeTransformations: { type: [Object, Function], watcherOptions: { cesiumObjectBuilder: Bxe } } }, Kxe = { articulations: [Object, Function] }, fN = { clippingPlanes: [Object, Function] }, Jxe = { plane: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: Fxe } } }, $Y = { pixelSize: { type: [Number, Object, Function], default: 1 } }, Qxe = { hierarchy: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: kR, deep: !0, exclude: "_callback" } } }, hN = { perPositionHeight: { type: [Boolean, Object, Function], default: !1 } }, HY = { closeTop: { type: [Boolean, Object, Function], default: !0 } }, UY = { closeBottom: { type: [Boolean, Object, Function], default: !0 } }, cy = { arcType: { type: [Number, Object, Function], default: 1 } }, eCe = { depthFailMaterial: { type: [Object, String, Array, Function], watcherOptions: { cesiumObjectBuilder: GR } } }, WY = { clampToGround: { type: [Boolean, Object, Function], default: !1 } }, tCe = { shape: { type: [Array, Object, Function], watcherOptions: { cesiumObjectBuilder: gY } } }, rCe = { coordinates: { type: [Object, Array, Function], watcherOptions: { cesiumObjectBuilder: Ug } } }, jY = { maximumScreenSpaceError: { type: [Number, Object, Function], default: 16 } }, pN = { minimumHeights: [Array, Object, Function] }, dN = { maximumHeights: [Array, Object, Function] }, YY = { cutoutRectangle: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: Ug } } }, XY = { colorToAlpha: { type: [Object, String, Array], watcherOptions: { cesiumObjectBuilder: Gt } } }, qY = { url: [String, Object] }, nCe = { token: String }, iCe = { tileDiscardPolicy: Object }, aCe = { layers: String }, oCe = { enablePickFeatures: { type: Boolean, default: !0 } }, ww = { rectangle: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: Ug } } }, sCe = { tilingScheme: Object }, ki = { ellipsoid: Object }, ZY = { credit: { type: [String, Object], default: "" } }, uCe = { tileWidth: { type: Number, default: 256 } }, lCe = { tileHeight: { type: Number, default: 256 } }, cCe = { maximumLevel: Number }, fCe = { minimumLevel: { type: Number, default: 0 } }, hCe = { fileExtension: { type: String, default: "png" } }, pCe = { accessToken: String }, dCe = { format: { type: String, default: "png" } }, vCe = { subdomains: [String, Array] }, gCe = { getFeatureInfoFormats: Array }, mCe = { clock: Object }, yCe = { times: Object }, _Ce = { projectionTransforms: { type: [Boolean, Object], default: !1 } }, uv = { allowPicking: { type: Boolean, default: !0 } }, lv = { asynchronous: { type: Boolean, default: !0 } }, ET = { debugShowShadowVolume: { type: Boolean, default: !1 } }, xw = { releaseGeometryInstances: { type: Boolean, default: !0 } }, Cw = { interleave: { type: Boolean, default: !1 } }, fy = { appearance: { type: Object, watcherOptions: { cesiumObjectBuilder: QS, deep: !0 } } }, vN = { depthFailAppearance: { type: Object, watcherOptions: { cesiumObjectBuilder: QS, deep: !0 } } }, Sw = { geometryInstances: [Array, Object] }, bT = { vertexCacheOptimize: { type: Boolean, default: !1 } }, Ew = { compressVertices: { type: Boolean, default: !0 } }, uc = { modelMatrix: Object }, cl = { debugShowBoundingVolume: { tyep: Boolean, default: !1 } }, bw = { scene: Object }, TT = { blendOption: { type: Number, default: 2 } }, Yh = { id: null }, gN = { loop: { type: Boolean, default: !1 } }, mN = { debugWireframe: { type: Boolean, default: !1 } }, Na = { vertexFormat: Object }, Tw = { center: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: ei } } }, Pw = { radius: Number }, yN = { frustum: Object }, _N = { origin: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: ei } } }, cv = { polygonHierarchy: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: kR, deep: !0 } } }, KY = { startColor: { type: [Object, String, Array], watcherOptions: { cesiumObjectBuilder: Gt } } }, JY = { endColor: { type: [Object, String, Array], watcherOptions: { cesiumObjectBuilder: Gt } } }, QY = { minimumImageSize: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: bi } } }, eX = { maximumImageSize: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: bi } } }, tX = { imageSize: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: bi } } }, wN = { shapePositions: { type: Array, watcherOptions: { cesiumObjectBuilder: gY } } }, xN = { polylinePositions: { type: Array, watcherOptions: { cesiumObjectBuilder: ef } } }, rX = { lightColor: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: ei } } }, CN = { luminanceAtZenith: { type: Number, default: 0.2 } }, SN = { sphericalHarmonicCoefficients: { type: [Array, Object], watcherOptions: { cesiumObjectBuilder: ef } } }, EN = { specularEnvironmentMaps: String }, bN = { backFaceCulling: { type: Boolean, default: !0 } }, TN = { colors: { type: Array, watcherOptions: { cesiumObjectBuilder: Rxe } } }, wCe = { data: { type: [String, Object], required: !0 } }, xCe = { sourceUri: { type: [String, Object] } }, CCe = { options: { type: Object, watcherOptions: { cesiumObjectBuilder: kxe, deep: !0 } } }, SCe = { glowColor: { type: [String, Array, Object], default: () => [0, 1, 0, 0.05], watcherOptions: { cesiumObjectBuilder: Gt } } }, ECe = { clearColor: { type: [String, Array, Object], watcherOptions: { cesiumObjectBuilder: Gt } } }, bCe = { scissorRectangle: { type: [Object, Array], watcherOptions: { cesiumObjectBuilder: yY } } }, Vi = { enableMouseEvent: { type: Boolean, default: !0 } }, PV = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, accessToken: pCe, alignedAxis: EY, allowPicking: uv, appearance: fy, arcType: cy, articulations: Kxe, asynchronous: lv, backFaceCulling: bN, backgroundColor: LY, backgroundPadding: DY, blendOption: TT, bottomRadius: QR, center: Tw, clampAnimations: FY, clampToGround: WY, classificationType: ly, clearColor: ECe, clippingPlanes: fN, clock: mCe, closeBottom: UY, closeTop: HY, color: oy, colorBlendAmount: GY, colorBlendMode: VY, colorToAlpha: XY, colors: TN, compressVertices: Ew, coordinates: rCe, cornerType: mw, credit: ZY, cutoutRectangle: YY, data: wCe, debugShowBoundingVolume: cl, debugShowShadowVolume: ET, debugWireframe: mN, depthFailAppearance: vN, depthFailColor: $xe, depthFailMaterial: eCe, dimensions: XR, disableDepthTestDistance: gT, distanceDisplayCondition: sy, ellipsoid: ki, enableMouseEvent: Vi, enablePickFeatures: oCe, endColor: JY, extrudedHeight: ll, extrudedHeightReference: jxe, eyeOffset: $R, fileExtension: hCe, fill: Uxe, fillColor: MY, font: PY, format: dCe, frustum: yN, geometryInstances: Sw, getFeatureInfoFormats: gCe, glowColor: SCe, granularity: Ca, height: _u, heightReference: mT, hierarchy: Qxe, horizontalOrigin: HR, id: Yh, image: UR, imageBasedLightingFactor: cN, imageSize: tX, imageSubRegion: Hxe, incrementallyLoadTextures: NY, innerRadii: iN, interleave: Cw, labelStyle: IY, layers: aCe, length: KR, lightColor: zY, lightColor2: rX, loop: gN, luminanceAtZenith: CN, material: bY, maximumClock: oN, maximumCone: uN, maximumHeights: dN, maximumImageSize: eX, maximumLevel: cCe, maximumScale: RY, maximumScreenSpaceError: jY, minimumClock: aN, minimumCone: sN, minimumHeights: pN, minimumImageSize: QY, minimumLevel: fCe, minimumPixelSize: OY, modelMatrix: uc, nodeTransformations: Zxe, numberOfVerticalLines: ST, options: CCe, orientation: zR, origin: _N, outline: Wxe, outlineColor: qR, outlineWidth: ZR, perPositionHeight: hN, pixelOffset: yT, pixelOffsetScaleByDistance: WR, pixelSize: $Y, plane: Jxe, polygonHierarchy: cv, polylinePositions: xN, position: av, positions: sc, projectionTransforms: _Ce, radii: nN, radius: Pw, rectangle: ww, releaseGeometryInstances: xw, rotation: uy, runAnimations: qxe, scale: _T, scaleByDistance: wT, scene: bw, scissorRectangle: bCe, semiMajorAxis: tN, semiMinorAxis: rN, shadows: CT, shape: tCe, shapePositions: wN, show: Tn, showBackground: AY, silhouetteColor: BY, silhouetteSize: kY, sizeInMeters: jR, slicePartitions: _w, slices: eN, sourceUri: xCe, specularEnvironmentMaps: EN, sphericalHarmonicCoefficients: SN, stRotation: sv, stackPartitions: yw, startColor: KY, subdivisions: lN, subdomains: vCe, text: TY, tileDiscardPolicy: iCe, tileHeight: lCe, tileWidth: uCe, tilingScheme: sCe, times: yCe, token: nCe, topRadius: JR, translucencyByDistance: xT, uri: Xxe, url: qY, vertexCacheOptimize: bT, vertexFormat: Na, verticalOrigin: YR, viewFrom: SY, width: ov, zIndex: Yxe }, Symbol.toStringTag, { value: "Module" })); var TCe = { name: "zh-hans", nativeName: "\u4E2D\u6587(\u7B80\u4F53)", vc: { loadError: "\u52A0\u8F7D\u5931\u8D25\uFF0C\u5FC5\u987B\u4F5C\u4E3A VcViewer \u7684\u5B50\u7EC4\u4EF6\u52A0\u8F7D\u3002", navigation: { compass: { outerTip: `\u65CB\u8F6C\u89C6\u56FE\uFF1A\u987A/\u9006\u65F6\u9488\u65B9\u5411\u62D6\u62FD\u7F57\u76D8\u5916\u73AF\u3002 \u91CD\u7F6E\u89C6\u56FE\uFF1A\u53CC\u51FB\u7F57\u76D8\u5916\u73AF\u3002`, innerTip: `\u7FFB\u8F6C\u89C6\u56FE\uFF1A\u7531\u5185\u73AF\u5411\u5916\u73AF\u62D6\u62FD\u7F57\u76D8\u3002 \u6216\u8005\u6309\u4F4F Ctrl \u952E\u7684\u540C\u65F6\u62D6\u62FD\u5730\u56FE\u3002`, title: "\u6309\u4F4F\u9F20\u6807\u62D6\u62FD\u65CB\u8F6C\u76F8\u673A\u3002" }, zoomCotrol: { zoomInTip: "\u653E\u5927", zoomResetTip: "\u91CD\u7F6E\u89C6\u56FE", zoomOutTip: "\u7F29\u5C0F" }, print: { printTip: "\u573A\u666F\u622A\u56FE/\u6253\u5370", printViewTitle: "\u6253\u5370\u9884\u89C8", credit: "\u5730\u56FE\u7248\u6743", screenshot: "\u573A\u666F\u622A\u56FE" }, myLocation: { myLocationTip: "\u5B9A\u4F4D\u60A8\u7684\u4F4D\u7F6E", positioning: "\u5B9A\u4F4D\u4E2D...", fail: "\u5B9A\u4F4D\u5931\u8D25", centreMap: "\u6211\u7684\u4F4D\u7F6E", lat: "\u7EAC\u5EA6", lng: "\u7ECF\u5EA6", address: "\u5730\u5740" }, statusBar: { lat: "\u7EAC\u5EA6", lng: "\u7ECF\u5EA6", zone: "\u5E26\u53F7", e: "X", n: "Y", elev: "\u9AD8\u7A0B", level: "\u5C42\u7EA7", heading: "\u65B9\u4F4D", pitch: "\u4FEF\u4EF0", roll: "\u4FA7\u7FFB", cameraHeight: "\u89C6\u9AD8", tip: "\u70B9\u51FB\u5207\u6362\u9F20\u6807\u663E\u793A\u5750\u6807\u4E3A UTM \u6295\u5F71\u5750\u6807" } }, navigationSm: { compass: { outerTip: "\u65CB\u8F6C\u89C6\u56FE\uFF1A\u987A/\u9006\u65F6\u9488\u65B9\u5411\u62D6\u62FD\u7F57\u76D8\u5916\u73AF\uFF1B\u91CD\u7F6E\u89C6\u56FE\uFF1A\u53CC\u51FB\u7F57\u76D8\u5916\u73AF\u3002" }, zoomCotrol: { zoomInTip: "\u653E\u5927", zoomBarTip: "\u6309\u4F4F\u6ED1\u5757\u5411\u4E0A\u653E\u5927\uFF0C\u5411\u4E0B\u7F29\u5C0F\u3002", zoomOutTip: "\u7F29\u5C0F" } }, measurement: { expand: "\u5C55\u5F00", collapse: "\u6536\u62E2", editor: { move: "\u79FB\u52A8\u8282\u70B9", insert: "\u63D2\u5165\u8282\u70B9", remove: "\u79FB\u9664\u8282\u70B9", removeAll: "\u79FB\u9664\u6240\u6709\u8282\u70B9" }, distance: { tip: "\u8DDD\u79BB\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u8DDD\u79BB\u91CF\u7B97\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u8DDD\u79BB\u91CF\u7B97\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, "component-distance": { tip: "\u4E09\u89D2\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E09\u89D2\u91CF\u7B97\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E09\u89D2\u91CF\u7B97\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, polyline: { tip: "\u6298\u7EBF\u8DDD\u79BB\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, horizontal: { tip: "\u6C34\u5E73\u8DDD\u79BB\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, vertical: { tip: "\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, height: { tip: "\u5730\u8868\u9AD8\u5EA6\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u9AD8\u5EA6\u91CF\u7B97\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u9AD8\u5EA6\u91CF\u7B97\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, area: { tip: "\u9762\u79EF\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002", drawingTipEnd: "\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, point: { tip: "\u5750\u6807\u91CF\u7B97", drawingTipStart: "\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u5750\u6807\u91CF\u7B97\u70B9\u3002", drawingTipEnd: "\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u5750\u6807\u91CF\u7B97\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002", lng: "\u7ECF\u5EA6\uFF1A", lat: "\u7EAC\u5EA6\uFF1A", height: "\u9AD8\u5EA6\uFF1A", slope: "\u5761\u5EA6\uFF1A" }, rectangle: { tip: "\u77E9\u5F62\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u91CF\u7B97\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, regular: { tip: "\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, circle: { tip: "\u5706\u5F62\u91CF\u7B97", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u91CF\u7B97\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, clear: { tip: "\u6E05\u9664\u91CF\u7B97\u7ED3\u679C" } }, drawing: { expand: "\u5C55\u5F00", collapse: "\u6536\u62E2", editor: { move: "\u79FB\u52A8\u8282\u70B9", insert: "\u63D2\u5165\u8282\u70B9", remove: "\u79FB\u9664\u8282\u70B9", removeAll: "\u79FB\u9664\u6240\u6709\u8282\u70B9" }, pin: { tip: "\u7ED8\u5236\u56FE\u6807\u70B9", drawingTipStart: "\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u56FE\u6807\u70B9\u3002", drawingTipEnd: "\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u56FE\u6807\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, point: { tip: "\u7ED8\u5236\u70B9", drawingTipStart: "\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u70B9\u3002", drawingTipEnd: "\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, polyline: { tip: "\u7ED8\u5236\u7EBF", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, polygon: { tip: "\u7ED8\u5236\u9762", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, rectangle: { tip: "\u7ED8\u5236\u77E9\u5F62", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, circle: { tip: "\u7ED8\u5236\u5706", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, regular: { tip: "\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, clear: { tip: "\u6E05\u9664\u7ED8\u5236\u7ED3\u679C" } }, analysis: { expand: "\u5C55\u5F00", collapse: "\u6536\u62E2", editor: { move: "\u79FB\u52A8\u8282\u70B9", insert: "\u63D2\u5165\u8282\u70B9", remove: "\u79FB\u9664\u8282\u70B9", removeAll: "\u79FB\u9664\u6240\u6709\u8282\u70B9" }, sightline: { tip: "\u901A\u89C6\u5206\u6790", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u89C2\u6D4B\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u76EE\u6807\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, viewshed: { tip: "\u53EF\u89C6\u57DF\u5206\u6790", drawingTipStart: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u53EF\u89C6\u57DF\u5206\u6790\u8D77\u70B9\u3002", drawingTipEnd: "\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u53EF\u89C6\u57DF\u5206\u6790\u7EC8\u70B9\u3002", drawingTipEditing: "\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002" }, clear: { tip: "\u6E05\u9664\u5206\u6790\u7ED3\u679C" } }, overview: { show: "\u663E\u793A\u9E70\u773C", hidden: "\u9690\u85CF\u9E70\u773C" } } }; const PCe = (r) => (e, t) => ICe(e, t, Ue(r)), ICe = (r, e, t) => LR(t, r, r).replace(/\{(\w+)\}/g, (n, i) => { var a; return `${(a = e == null ? void 0 : e[i]) != null ? a : `{${i}}`}`; }), ACe = (r) => { const e = Ie(() => Ue(r).name), t = tH(r) ? r : te(r); return { lang: e, locale: t, t: PCe(r) }; }, hy = () => { const r = Ixe("locale"); return ACe(Ie(() => r.value || TCe)); }; function LCe(r, e, t) { const n = (o, s, u = !0) => { const l = s || e.cesiumEvents || []; l && l.forEach((c) => { if (o[c]) { const f = xi(e, c), h = u ? "addEventListener" : "removeEventListener"; f && o[c][h](f); } else process.env.VUECESIUM_DEBUG && t.warn("Add event linstener of " + c + " failed, try to upgrade Cesium to latest version."); }); }, i = (o) => { var s; const { viewer: u, cesiumObject: l } = e; if (l === void 0) return; const { ScreenSpaceEventHandler: c, ScreenSpaceEventType: f } = Cesium; (!u._vcPickScreenSpaceEventHandler || !u._vcViewerScreenSpaceEventHandler) && (u._vcPickScreenSpaceEventHandler = new c(u.canvas), u._vcViewerScreenSpaceEventHandler = new c(u.canvas), DCe.forEach((h) => { const p = xi(e, h); p && u._vcViewerScreenSpaceEventHandler.setInputAction(p, f[h]), u._vcPickScreenSpaceEventHandler.setInputAction(a.bind({ eventName: h, viewer: u }), f[h]); })), n(l, e.cesiumEvents || [], o), (s = e.cesiumMembersEvents) == null || s.forEach((h) => { const p = Vn(h.name) && h.name.length > 0 && l[h.name[0]] ? l[h.name[0]][h.name[1]] : l[h.name]; p && n(p, h.events, o); }), r.enableMouseEvent && MCe.forEach((h) => { const p = xi(e, h); o ? p && (l[h] = p) : p && delete l[h]; }); }; function a(o) { if (!r.enableMouseEvent || !o) return; const s = this.viewer, { eventName: u } = this, l = o.position || o.endPosition; if (!l) return; const c = []; let f; u.indexOf("LEFT_DOUBLE_CLICK") !== -1 ? f = "dblclick" : u.indexOf("CLICK") !== -1 ? f = "click" : u.indexOf("DOWN") !== -1 ? f = "mousedown" : u.indexOf("UP") !== -1 ? f = "mouseup" : u.indexOf("MOUSE_MOVE") !== -1 && (f = "mousemove"); let h; f === "mousemove" ? h = "mouseout" : f === "click" && (h = "clickout"); const p = s.scene.pick(l); if (Cesium.defined(p) ? (this.pickedFeature && this.pickedFeature.id !== p.id && c.push({ callbackName: h, pickedFeature: this.pickedFeature }), f === "mousemove" && (!this.pickedFeature || this.pickedFeature.id !== p.id) && c.push({ callbackName: "mouseover", pickedFeature: p }), c.push({ callbackName: f, pickedFeature: p })) : (this.pickedFeature && c.push({ callbackName: h, pickedFeature: this.pickedFeature }), this.pickedFeature = void 0), c.length === 0) return; let d; const v = s.scene; if (v.mode === Cesium.SceneMode.SCENE3D) { const y = v.camera.getPickRay(l); d = v.globe.pick(y, v); } else d = v.camera.pickEllipsoid(l, v.globe.ellipsoid); let g = -1; u.indexOf("LEFT") !== -1 ? g = 0 : u.indexOf("MIDDLE") !== -1 ? g = 1 : u.indexOf("RIGHT") !== -1 && (g = 2); const m = []; c.forEach((y) => { const _ = y.callbackName, w = y.pickedFeature; w.id && (Vn(w.id) && w.id[0] instanceof Cesium.Entity ? m.push({ callbackName: _, cesiumObject: w.id[0].entityCollection.owner, pickedFeature: w }) : w.id instanceof Cesium.Entity && (m.push({ callbackName: _, cesiumObject: w.id, pickedFeature: w }), m.push({ callbackName: _, cesiumObject: w.id.entityCollection.owner, pickedFeature: w }))); const x = (C) => { m.push({ callbackName: _, cesiumObject: C, pickedFeature: w }), C._vcParent && x(C._vcParent); }; w.primitive && (w.primitive._vcParent && x(w.primitive._vcParent), m.push({ callbackName: _, cesiumObject: w.primitive, pickedFeature: w })), w.collection && (w.collection._vcParent && x(w.collection._vcParent), m.push({ callbackName: _, cesiumObject: w.collection, pickedFeature: w })); }), m.forEach((y) => { if (y.callbackName) { const _ = y.cesiumObject[y.callbackName] || y.cesiumObject[`on${qS(y.callbackName)}`] || y.cesiumObject[je(`on${qS(y.callbackName)}`)]; if (Cesium.defined(_)) { const w = { type: `on${y.callbackName}`, windowPosition: l, surfacePosition: d, pickedFeature: y.pickedFeature, button: g, cesiumObject: y.cesiumObject }; _ instanceof Cesium.CallbackProperty ? _._callback(w) : _(w); } } }), this.pickedFeature = p; } return { bindEvents: n, registerEvents: i }; } const DCe = [ "LEFT_CLICK", "LEFT_DOUBLE_CLICK", "LEFT_DOWN", "LEFT_UP", "MIDDLE_CLICK", "MIDDLE_DOWN", "MIDDLE_UP", "MOUSE_MOVE", "PINCH_END", "PINCH_MOVE", "PINCH_START", "RIGHT_CLICK", "RIGHT_DOWN", "RIGHT_UP", "WHEEL" ], MCe = ["mousedown", "mouseup", "click", "clickout", "dblclick", "mousemove", "mouseover", "mouseout"], OCe = ["Graphics", "VcEntity", "Datasource", "VcOverlayDynamic"]; function Fa(r, { emit: e }, t) { const n = Axe(t); t.alreadyListening = [], t.removeCallbacks = []; let i = []; t.mounted = !1; const a = rH(); t.vcMitt = a; const o = Wu(vw), { t: s } = hy(); if (o === void 0) { console.error(`${t.cesiumClass} ${s("vc.loadError")}`); return; } const u = Fd(t), l = LCe(r, t, n); t.children = []; const c = [ "billboard", "box", "corridor", "cylinder", "ellipse", "ellipsoid", "label", "model", "tileset", "path", "plane", "point", "polygon", "polyline", "polylineVolume", "rectangle", "wall" ], f = async () => { if (e("beforeLoad", t), u.nowaiting) return !0; await u.proxy.creatingPromise; }, h = async () => { var E; if (t.mounted) return !1; n.debug(`${t.cesiumClass}---loading`), await f(); const { Cesium: T, viewer: P } = o; return t.viewer = P, t.Cesium = T, !u.cesiumObject && !u.nowaiting ? await ((E = u.proxy) == null ? void 0 : E.load()) : (w(!0), y().then(async (I) => (t.cesiumObject = I, g().then(() => { t.mounted = !0, u.children.push(t), Object.assign(t.proxy, { cesiumObject: t.cesiumObject }); const A = { Cesium: T, viewer: P, cesiumObject: I, vm: t.proxy }; return e("ready", A), a.emit("ready", A), n.debug(`${t.cesiumClass}---loaded`), A; })))); }, p = async () => { await t.unloadingPromise; }, d = async () => { await p(); for (let E = 0; E < t.children.length; E++) await t.children[E].proxy.unload(); return t.children.length = 0, t.mounted ? m().then(async () => (w(!1), t.cesiumObject = void 0, t.mounted = !1, t.removeCallbacks.forEach((E) => { E(); }), e("destroyed", t), n.debug(`${t.cesiumClass}---unmounted`), t.renderByParent && !t.unloadingPromise ? u.proxy.unload() : !0)) : !1; }, v = async () => d().then(() => h()), g = async () => { var E; return l.registerEvents(!0), ((E = t.mount) == null ? void 0 : E.call(t)) || !0; }, m = async () => { var E; return l.registerEvents(!1), ((E = t.unmount) == null ? void 0 : E.call(t)) || !0; }, y = async () => { if (n.debug("do createCesiumObject"), ti(t.createCesiumObject)) return t.createCesiumObject(); { const E = x(r); return new Cesium[t.cesiumClass](E); } }, _ = (E, T) => { let P = T == null ? void 0 : T.deep; const { SampledPositionProperty: I, Appearance: A, DebugAppearance: L, MaterialAppearance: D, PolylineColorAppearance: O, EllipsoidSurfaceAppearance: N, PerInstanceColorAppearance: F, PolylineMaterialAppearance: k } = Cesium; if (E === "position") P = !(t.proxy[E] instanceof I); else if (E === "appearance" || E === "depthFailAppearance") { const G = t.proxy[E]; P = !(G instanceof A || G instanceof L || G instanceof D || G instanceof O || G instanceof N || G instanceof F || G instanceof k || Hg(G).indexOf("Appearance") !== -1); } return P; }, w = (E) => { if (E) { if (!t.cesiumClass || !Cesium[t.cesiumClass]) return; r && Object.keys(r).forEach((T) => { var P, I, A, L, D; let O = T; if (T === "labelStyle" || T === "wmtsStyle" ? O = "style" : T === "bmKey" && (O = "key"), ((I = (P = t.proxy) == null ? void 0 : P.$options.watch) == null ? void 0 : I[T]) || t.alreadyListening.indexOf(T) !== -1) return; const N = (L = (A = t.proxy) == null ? void 0 : A.$options.props[T]) == null ? void 0 : L.watcherOptions, F = (D = t.proxy) == null ? void 0 : D.$watch(T, async (k, G) => { await t.proxy.creatingPromise; const { cesiumObject: U } = t, B = U && Object.getOwnPropertyDescriptor(U, O), X = U && Object.getOwnPropertyDescriptor(Object.getPrototypeOf(U), O); if (B && (B.writable || B.set) || X && (X.writable || X.set)) { if (N && N.cesiumObjectBuilder) { const ae = N.cesiumObjectBuilder.call(t, k, t.viewer.scene.globe.ellipsoid); Cesium.defined(U[O]) && Cesium.defined(U[O]._callback) || (U[O] = ae); } else U[O] = C(O, k); return !0; } else qj(k, G) || t.proxy.reload(); }, { deep: _(T, N) }); i.push(F); }); } else i.forEach((T) => T()), i = []; }, x = (E, T) => { let P = {}; return E && Object.keys(E).forEach((I) => { let A = I; I === "labelStyle" || I === "wmtsStyle" ? A = "style" : I === "bmKey" && (A = "key"); const L = Hg(E[I]); L && L.indexOf("Graphics") === -1 && c.indexOf(A) !== -1 && (t.cesiumClass === "Entity" || t.cesiumClass.indexOf("DataSource") > 0) ? P[A] = x(E[I], T) : P[A] = C(I, E[I], T); }), P = dY(P), P; }, C = (E, T, P) => { var I, A; const L = Hg(T); if (L && L.indexOf("Graphics") === -1 && c.indexOf(E) !== -1 && (t.cesiumClass === "Entity" || t.cesiumClass.indexOf("DataSource") > 0 || t.cesiumClass === "VcOverlayDynamic")) return x(T, P); { const D = (I = t.proxy) == null ? void 0 : I.$options.name; let O = !1; ti(T) && D && OCe.forEach((F) => { D.indexOf(F) !== -1 && (O = !0); }); const N = ((A = t.proxy) == null ? void 0 : A.$options.props[E]) || (P == null ? void 0 : P[E]) || PV[E] && PV[E][E]; return (N == null ? void 0 : N.watcherOptions) && !vY(T) ? N.watcherOptions.cesiumObjectBuilder.call(t, T, t.viewer.scene.globe.ellipsoid) : O ? new Cesium.CallbackProperty(T, !1) : T; } }, S = () => gw({}, o || {}), b = new Promise((E, T) => { try { let P = !1; o.viewer && (P = !0, h().then((I) => { E(I), P = !1; })), u.vcMitt.on("ready", () => { !P && !t.isUnmounted && E(h()); }); } catch (P) { T(P); } }); return n.debug(`${t.cesiumClass}---onCreated`), xa(() => { n.debug(`${t.cesiumClass}---onUnmounted`), t.unloadingPromise = new Promise((E, T) => { d().then(() => { n.debug(`${t.cesiumClass}---unloaded`), E(!0), t.unloadingPromise = void 0, a.all.clear(); }); }), t.alreadyListening = []; }), Object.assign(t.proxy, { creatingPromise: b, load: h, unload: d, reload: v, getCreatingPromise: () => b, getCesiumObject: () => t.cesiumObject }), { $services: o, load: h, unload: d, reload: v, creatingPromise: b, transformProp: C, transformProps: x, unwatchFns: i, setPropsWatcher: w, logger: n, getServices: S }; } function Zr(r, e, t) { t.cesiumEvents = [], t.renderByParent = !0; const n = Fa(r, e, t); if (n !== void 0) return t.mount = async () => { var i; const a = t.cesiumObject, o = Fd(t).proxy; return (i = o.__updateGeometry) == null ? void 0 : i.call(o, a); }, { transformProps: n.transformProps, unwatchFns: n.unwatchFns, setPropsWatcher: n.setPropsWatcher }; } const nX = (r) => Pne(r); function aM(r, e) { const t = r.style; Object.keys(e).forEach((n) => { t[n] = e[n]; }); } function RCe(r) { if (r == null) return; if (typeof r == "string") try { return document.querySelector(r) || void 0; } catch { return; } const e = tH(r) === !0 ? r.value : r; if (e) return e.$el || e; } const Am = { hasPassive: !1, passiveCapture: !0, notPassiveCapture: !0, passive: void 0 }; try { const r = Object.defineProperty({}, "passive", { get() { Object.assign(Am, { hasPassive: !0, passive: { passive: !0 }, notPassive: { passive: !1 }, passiveCapture: { passive: !0, capture: !0 }, notPassiveCapture: { passive: !1, capture: !0 } }); } }); window.addEventListener("qtest", null, r), window.removeEventListener("qtest", null, r); } catch { } function NCe() { } function FCe(r) { return r.button === 0; } function oM(r) { return r.touches && r.touches[0] ? r = r.touches[0] : r.changedTouches && r.changedTouches[0] ? r = r.changedTouches[0] : r.targetTouches && r.targetTouches[0] && (r = r.targetTouches[0]), { top: r.clientY, left: r.clientX }; } function iX(r) { r.stopPropagation(); } function sM(r) { r.cancelable !== !1 && r.preventDefault(); } function pg(r) { r.cancelable !== !1 && r.preventDefault(), r.stopPropagation(); } function Pc(r, e, t) { const n = `__vc_${e}_evt`; r[n] = r[n] !== void 0 ? r[n].concat(t) : t, t.forEach((i) => { i[0].addEventListener(i[1], r[i[2]], Am[i[3]]); }); } function Jp(r, e) { const t = `__vc_${e}_evt`; r[t] !== void 0 && (r[t].forEach((n) => { n[0].removeEventListener(n[1], r[n[2]], Am[n[3]]); }), r[t] = void 0); } let BCe = !1; function kCe(r) { return BCe === !0 || r !== Object(r) || r.isComposing === !0 || r.qKeyEvent === !0; } function eE(r, e) { return kCe(r) === !0 ? !1 : [].concat(e).includes(r.keyCode); } function VCe(r, e = 250) { let t = !1, n; return function() { return t === !1 && (t = !0, setTimeout(() => { t = !1; }, e), n = r.apply(this, arguments)), n; }; } function IV(r, e, t, n) { t.modifiers.stop === !0 && iX(r); const i = t.modifiers.color; let a = t.modifiers.center; a = a === !0 || n === !0; const o = document.createElement("span"), s = document.createElement("span"), u = oM(r), { left: l, top: c, width: f, height: h } = e.getBoundingClientRect(), p = Math.sqrt(f * f + h * h), d = p / 2, v = `${(f - p) / 2}px`, g = a ? v : `${u.left - l - d}px`, m = `${(h - p) / 2}px`, y = a ? m : `${u.top - c - d}px`; s.className = "vc-ripple__inner", aM(s, { height: `${p}px`, width: `${p}px`, transform: `translate3d(${g},${y},0) scale3d(.2,.2,1)`, opacity: 0 }), o.className = `vc-ripple${i ? " text-" + i : ""}`, o.setAttribute("dir", "ltr"), o.appendChild(s), e.appendChild(o); const _ = () => { o.remove(), clearTimeout(w); }; t.abort.push(_); let w = setTimeout(() => { s.classList.add("vc-ripple__inner--enter"), s.style.transform = `translate3d(${v},${m},0) scale3d(1,1,1)`, s.style.opacity = "0.2", w = setTimeout(() => { s.classList.remove("vc-ripple__inner--enter"), s.classList.add("vc-ripple__inner--leave"), s.style.opacity = "0", w = setTimeout(() => { o.remove(), t.abort.splice(t.abort.indexOf(_), 1); }, 275); }, 250); }, 50); } function AV(r, { modifiers: e, value: t, arg: n, instance: i }) { const a = Object.assign({}, e, t); r.modifiers = { early: a.early === !0, stop: a.stop === !0, center: a.center === !0, color: a.color || n, keyCodes: [].concat(a.keyCodes || 13) }; } var GCe = nX({ name: "ripple", beforeMount(r, e) { const t = { enabled: e.value !== !1, modifiers: {}, abort: [], start(n) { t.enabled === !0 && n.qSkipRipple !== !0 && (t.modifiers.early === !0 ? ["mousedown", "touchstart"].includes(n.type) === !0 : n.type === "click") && IV(n, r, t, n.qKeyEvent === !0); }, keystart: VCe((n) => { t.enabled === !0 && n.qSkipRipple !== !0 && eE(n, t.modifiers.keyCodes) === !0 && n.type === `key${t.modifiers.early === !0 ? "down" : "up"}` && IV(n, r, t, !0); }, 300) }; AV(t, e), r.__vcripple = t, Pc(t, "main", [ [r, "mousedown", "start", "passive"], [r, "touchstart", "start", "passive"], [r, "click", "start", "passive"], [r, "keydown", "keystart", "passive"], [r, "keyup", "keystart", "passive"] ]); }, updated(r, e) { if (e.oldValue !== e.value) { const t = r.__vcripple; t.enabled = e.value !== !1, t.enabled === !0 && Object(e.value) === e.value && AV(t, e); } }, beforeUnmount(r) { const e = r.__vcripple; e.abort.forEach((t) => { t(); }), Jp(e, "main"), delete r._vcripple; } }); function fs() { const r = navigator.userAgent, e = /(?:Windows Phone)/.test(r), t = /(?:SymbianOS)/.test(r) || e, n = /(?:Android)/.test(r), i = /(?:Firefox)/.test(r), a = /(?:Chrome|CriOS)/.test(r), o = /(?:iPad|PlayBook)/.test(r) || n && !/(?:Mobile)/.test(r) || i && /(?:Tablet)/.test(r), s = /(?:iPhone)/.test(r) && !o, u = !s && !n && !t, l = !!r.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); return { isTablet: o, isPhone: s, isAndroid: n, isPc: u, isChrome: a, isIOS: l, hasTouch: "ontouchstart" in window || window.navigator.maxTouchPoints > 0 }; } function Wg() { if (window.getSelection !== void 0) { const r = window.getSelection(); (r == null ? void 0 : r.empty) !== void 0 ? r.empty() : (r == null ? void 0 : r.removeAllRanges) !== void 0 && (r.removeAllRanges(), fs().isPhone !== !0 && r.addRange(document.createRange())); } else document.selection !== void 0 && document.selection.empty(); } var LV = nX({ name: "touch-hold", beforeMount(r, e) { const { modifiers: t } = e; if (t.mouse !== !0 && fs().hasTouch !== !0) return; const n = { handler: e.value, noop: NCe, mouseStart(a) { typeof n.handler == "function" && FCe(a) === !0 && (Pc(n, "temp", [ [document, "mousemove", "move", "passiveCapture"], [document, "click", "end", "notPassiveCapture"] ]), n.start(a, !0)); }, touchStart(a) { var o; if (a.target !== void 0 && typeof n.handler == "function") { const s = a.target; Pc(n, "temp", [ [s, "touchmove", "move", "passiveCapture"], [s, "touchcancel", "end", "notPassiveCapture"], [s, "touchend", "end", "notPassiveCapture"] ]), n.start(a), (o = e == null ? void 0 : e.touchStart) == null || o.call(e, a); } }, start(a, o) { n.origin = oM(a); const s = Date.now(); fs().isPhone === !0 && (document.body.classList.add("non-selectable"), Wg(), n.styleCleanup = (u) => { n.styleCleanup = void 0; const l = () => { document.body.classList.remove("non-selectable"); }; u === !0 ? (Wg(), setTimeout(l, 10)) : l(); }), n.triggered = !1, n.sensitivity = o === !0 ? n.mouseSensitivity : n.touchSensitivity, n.timer = setTimeout(() => { Wg(), n.triggered = !0, n.handler({ evt: a, touch: o !== !0, mouse: o === !0, position: n.origin, duration: Date.now() - s }); }, n.duration); }, move(a) { const { top: o, left: s } = oM(a); (Math.abs(s - n.origin.left) >= n.sensitivity || Math.abs(o - n.origin.top) >= n.sensitivity) && clearTimeout(n.timer); }, end(a) { var o; Jp(n, "temp"), n.styleCleanup !== void 0 && n.styleCleanup(n.triggered), n.triggered === !0 ? a !== void 0 && pg(a) : clearTimeout(n.timer), (o = e == null ? void 0 : e.touchEnd) == null || o.call(e, a); } }, i = [600, 5, 7]; typeof e.arg == "string" && e.arg.length > 0 && e.arg.split(":").forEach((a, o) => { const s = parseInt(a, 10); s && (i[o] = s); }), [n.duration, n.touchSensitivity, n.mouseSensitivity] = i, r.__vctouchhold = n, t.mouse === !0 && Pc(n, "main", [[r, "mousedown", "mouseStart", `passive${t.mouseCapture === !0 ? "Capture" : ""}`]]), fs().hasTouch === !0 && Pc(n, "main", [ [r, "touchstart", "touchStart", `passive${t.capture === !0 ? "Capture" : ""}`], [r, "touchend", "noop", "notPassiveCapture"] ]); }, updated(r, e) { const t = r.__vctouchhold; t !== void 0 && e.oldValue !== e.value && (typeof e.value != "function" && t.end(), t.handler = e.value); }, beforeUnmount(r) { const e = r.__vctouchhold; e !== void 0 && (Jp(e, "main"), Jp(e, "temp"), clearTimeout(e.timer), e.styleCleanup !== void 0 && e.styleCleanup(), delete r.__vctouchhold); } }); function zCe() { let r, e; const t = new Promise(function(n, i) { r = n, e = i; }); return { resolve: r, reject: e, promise: t }; } function $Ce(r, { handleMouseClick: e = void 0, handleMouseDown: t = void 0, handleMouseUp: n = void 0, handleMouseMove: i = void 0, handleDoubleClick: a = void 0, handleMouseWheel: o = void 0, handlePinch: s = void 0 }) { const u = te(void 0), l = te(!1), c = () => { if (l.value) return; const { ScreenSpaceEventType: z, KeyboardEventModifier: pe, ScreenSpaceEventHandler: me } = Cesium; if (!u.value) { const { viewer: ot } = r; u.value = new me(ot.canvas), LV.beforeMount(ot.canvas, { arg: "2000", value: Oe, touchStart: Je, touchEnd: we, modifiers: {} }); } const De = u.value; De.setInputAction(p, z.LEFT_CLICK), De.setInputAction(d, z.LEFT_CLICK, pe.SHIFT), De.setInputAction(v, z.LEFT_CLICK, pe.CTRL), De.setInputAction(S, z.LEFT_DOWN), De.setInputAction(b, z.LEFT_DOWN, pe.SHIFT), De.setInputAction(E, z.LEFT_DOWN, pe.CTRL), De.setInputAction(O, z.LEFT_UP), De.setInputAction(N, z.LEFT_UP, pe.SHIFT), De.setInputAction(F, z.LEFT_UP, pe.CTRL), De.setInputAction(w, z.RIGHT_CLICK), De.setInputAction(x, z.RIGHT_CLICK, pe.SHIFT), De.setInputAction(C, z.RIGHT_CLICK, pe.CTRL), De.setInputAction(A, z.RIGHT_DOWN), De.setInputAction(L, z.RIGHT_DOWN, pe.SHIFT), De.setInputAction(D, z.RIGHT_DOWN, pe.CTRL), De.setInputAction(B, z.RIGHT_UP), De.setInputAction(X, z.RIGHT_UP, pe.SHIFT), De.setInputAction(j, z.RIGHT_UP, pe.CTRL), De.setInputAction(g, z.MIDDLE_CLICK), De.setInputAction(m, z.MIDDLE_CLICK, pe.SHIFT), De.setInputAction(y, z.MIDDLE_CLICK, pe.CTRL), De.setInputAction(T, z.MIDDLE_DOWN), De.setInputAction(P, z.MIDDLE_DOWN, pe.SHIFT), De.setInputAction(I, z.MIDDLE_DOWN, pe.CTRL), De.setInputAction(k, z.MIDDLE_UP), De.setInputAction(G, z.MIDDLE_UP, pe.SHIFT), De.setInputAction(U, z.MIDDLE_UP, pe.CTRL), De.setInputAction(ae, z.LEFT_DOUBLE_CLICK), De.setInputAction(se, z.LEFT_DOUBLE_CLICK, pe.SHIFT), De.setInputAction($, z.LEFT_DOUBLE_CLICK, pe.CTRL), De.setInputAction(V, z.MOUSE_MOVE), De.setInputAction(q, z.MOUSE_MOVE, pe.SHIFT), De.setInputAction(ee, z.MOUSE_MOVE, pe.CTRL), De.setInputAction(Y, z.WHEEL), De.setInputAction(K, z.WHEEL, pe.SHIFT), De.setInputAction(fe, z.WHEEL, pe.CTRL), De.setInputAction(J, z.PINCH_START), De.setInputAction(ue, z.PINCH_START, pe.SHIFT), De.setInputAction(ne, z.PINCH_START, pe.CTRL), De.setInputAction(ve, z.PINCH_END), De.setInputAction(Pe, z.PINCH_END, pe.SHIFT), De.setInputAction(Be, z.PINCH_END, pe.CTRL), De.setInputAction(ke, z.PINCH_MOVE), De.setInputAction(Le, z.PINCH_MOVE, pe.SHIFT), De.setInputAction(Ye, z.PINCH_MOVE, pe.CTRL), l.value = !0; }, f = () => { if (!l.value) return; const { ScreenSpaceEventType: z, KeyboardEventModifier: pe } = Cesium, me = u.value; if (!me) return; me.removeInputAction(z.LEFT_CLICK), me.removeInputAction(z.LEFT_CLICK, pe.SHIFT), me.removeInputAction(z.LEFT_CLICK, pe.CTRL), me.removeInputAction(z.LEFT_DOWN), me.removeInputAction(z.LEFT_DOWN, pe.SHIFT), me.removeInputAction(z.LEFT_DOWN, pe.CTRL), me.removeInputAction(z.LEFT_UP), me.removeInputAction(z.LEFT_UP, pe.SHIFT), me.removeInputAction(z.LEFT_UP, pe.CTRL), me.removeInputAction(z.RIGHT_CLICK), me.removeInputAction(z.RIGHT_CLICK, pe.SHIFT), me.removeInputAction(z.RIGHT_CLICK, pe.CTRL), me.removeInputAction(z.RIGHT_DOWN), me.removeInputAction(z.RIGHT_DOWN, pe.SHIFT), me.removeInputAction(z.RIGHT_DOWN, pe.CTRL), me.removeInputAction(z.RIGHT_UP), me.removeInputAction(z.RIGHT_UP, pe.SHIFT), me.removeInputAction(z.RIGHT_UP, pe.CTRL), me.removeInputAction(z.MIDDLE_CLICK), me.removeInputAction(z.MIDDLE_CLICK, pe.SHIFT), me.removeInputAction(z.MIDDLE_CLICK, pe.CTRL), me.removeInputAction(z.MIDDLE_DOWN), me.removeInputAction(z.MIDDLE_DOWN, pe.SHIFT), me.removeInputAction(z.MIDDLE_DOWN, pe.CTRL), me.removeInputAction(z.MIDDLE_UP), me.removeInputAction(z.MIDDLE_UP, pe.SHIFT), me.removeInputAction(z.MIDDLE_UP, pe.CTRL), me.removeInputAction(z.LEFT_DOUBLE_CLICK), me.removeInputAction(z.LEFT_DOUBLE_CLICK, pe.SHIFT), me.removeInputAction(z.LEFT_DOUBLE_CLICK, pe.CTRL), me.removeInputAction(z.MOUSE_MOVE), me.removeInputAction(z.MOUSE_MOVE, pe.SHIFT), me.removeInputAction(z.MOUSE_MOVE, pe.CTRL), me.removeInputAction(z.WHEEL), me.removeInputAction(z.WHEEL, pe.SHIFT), me.removeInputAction(z.WHEEL, pe.CTRL), me.removeInputAction(z.PINCH_START), me.removeInputAction(z.PINCH_START, pe.SHIFT), me.removeInputAction(z.PINCH_START, pe.CTRL), me.removeInputAction(z.PINCH_END), me.removeInputAction(z.PINCH_END, pe.SHIFT), me.removeInputAction(z.PINCH_END, pe.CTRL), me.removeInputAction(z.PINCH_MOVE), me.removeInputAction(z.PINCH_MOVE, pe.SHIFT), me.removeInputAction(z.PINCH_MOVE, pe.CTRL); const { viewer: De } = r; LV.beforeUnmount(De.canvas), l.value = !1; }, h = () => { var z; (z = u.value) == null || z.destroy(), u.value = void 0; }, p = (z) => { e == null || e(z, { button: 0 }); }, d = (z) => { e == null || e(z, { button: 0, shift: !0 }); }, v = (z) => { e == null || e(z, { button: 0, ctrl: !0 }); }, g = (z) => { e == null || e(z, { button: 1 }); }, m = (z) => { e == null || e(z, { button: 1, shift: !0 }); }, y = (z) => { e == null || e(z, { button: 1, ctrl: !0 }); }; let _; const w = (z) => { var pe; _ ? (pe = _ == null ? void 0 : _.promise) == null || pe.then((me) => { me && (e == null || e(z, { button: 2 })); }) : e == null || e(z, { button: 2 }); }, x = (z) => { e == null || e(z, { button: 2, shift: !0 }); }, C = (z) => { e == null || e(z, { button: 2, ctrl: !0 }); }, S = (z) => { t == null || t(z, { button: 0 }); }, b = (z) => { t == null || t(z, { button: 0, shift: !0 }); }, E = (z) => { t == null || t(z, { button: 0, ctrl: !0 }); }, T = (z) => { t == null || t(z, { button: 1 }); }, P = (z) => { t == null || t(z, { button: 1, shift: !0 }); }, I = (z) => { t == null || t(z, { button: 1, ctrl: !0 }); }, A = (z) => { t == null || t(z, { button: 2 }); }, L = (z) => { t == null || t(z, { button: 2, shift: !0 }); }, D = (z) => { t == null || t(z, { button: 2, ctrl: !0 }); }, O = (z) => { n == null || n(z, { button: 0 }); }, N = (z) => { n == null || n(z, { button: 0, shift: !0 }); }, F = (z) => { n == null || n(z, { button: 0, ctrl: !0 }); }, k = (z) => { n == null || n(z, { button: 1, ctrl: !0 }); }, G = (z) => { n == null || n(z, { button: 1, shift: !0 }); }, U = (z) => { n == null || n(z, { button: 1, ctrl: !0 }); }, B = (z) => { n == null || n(z, { button: 2 }); }, X = (z) => { n == null || n(z, { button: 2, shift: !0 }); }, j = (z) => { n == null || n(z, { button: 2, ctrl: !0 }); }, ae = (z) => { a == null || a(z, { button: 0 }); }, se = (z) => { a == null || a(z, { button: 0, shift: !0 }); }, $ = (z) => { a == null || a(z, { button: 0, ctrl: !0 }); }, V = (z) => { i == null || i(z); }, q = (z) => { i == null || i(z, { shift: !0 }); }, ee = (z) => { i == null || i(z, { ctrl: !0 }); }, Y = (z) => { o == null || o(z); }, K = (z) => { o == null || o(z, { shift: !0 }); }, fe = (z) => { o == null || o(z, { ctrl: !0 }); }, J = (z) => { s == null || s(z, { start: !0 }); }, ue = (z) => { s == null || s(z, { start: !0, shift: !0 }); }, ne = (z) => { s == null || s(z, { start: !0, ctrl: !0 }); }, ve = (z) => { s == null || s(z, { end: !0 }); }, Pe = (z) => { s == null || s(z, { end: !0, shift: !0 }); }, Be = (z) => { s == null || s(z, { end: !0, ctrl: !0 }); }, ke = (z) => { s == null || s(z, { move: !0 }); }, Le = (z) => { s == null || s(z, { move: !0, shift: !0 }); }, Ye = (z) => { s == null || s(z, { move: !0, ctrl: !0 }); }, Oe = (z) => { if (z.touch) { const pe = { position: { x: z.position.left, y: z.position.top } }; a == null || a(pe, { button: 0 }); } _.resolve(!1); }, we = (z) => { _.resolve(!0); }, Je = (z) => { _ = zCe(); }; return { activate: c, deactivate: f, destroy: h, isActive: l }; } function py(r, e, t) { const n = Fa(r, e, t); if (n !== void 0) return t.createCesiumObject = async () => { const i = n.transformProps(r), a = n.$services.primitives; return a && a.add(i); }, t.mount = async () => { const i = n.$services.primitives, a = t.cesiumObject; return i && i.contains(a); }, t.unmount = async () => { const i = n.$services.primitives, a = t.cesiumObject; return i && !i.isDestroyed() && i.remove(a); }, { transformProps: n.transformProps, unwatchFns: n.unwatchFns, setPropsWatcher: n.setPropsWatcher, $services: n.$services }; } function dy(r, e, t) { const n = Fa(r, e, t); if (n === void 0) return; t.mount = async () => { const a = n.$services.primitives, o = t.cesiumObject, s = a && a.add(o); return Cesium.defined(s); }, t.unmount = async () => { const a = n.$services.primitives, o = t.cesiumObject; return a && a.remove(o); }; const i = () => gw(n.getServices(), { get primitives() { return t.cesiumObject; } }); return $h(vw, i()), t.appContext.config.globalProperties.$VueCesium = i(), { transformProps: n.transformProps, transformProp: n.transformProp, unwatchFns: n.unwatchFns, setPropsWatcher: n.setPropsWatcher }; } function fv(r, e, t) { const n = Fa(r, e, t); if (n === void 0) return; const { emit: i } = e, a = te(0), o = te([]); t.createCesiumObject = async () => { var c, f; const h = n.transformProps(r); return h.asynchronous || await ((f = (c = Cesium[t.cesiumClass]).initializeTerrainHeights) == null ? void 0 : f.call(c)), r.geometryInstances && (Vn(r.geometryInstances) ? (o.value.push(...r.geometryInstances), a.value += r.geometryInstances.length) : (a.value += 1, o.value.push(r.geometryInstances))), new Cesium[t.cesiumClass](h); }, t.mount = async () => { const c = t.cesiumClass.includes("Ground") ? n.$services.groundPrimitives : n.$services.primitives, f = t.cesiumObject; f.readyPromise && f.readyPromise.then((p) => { xi(t, "readyPromise") && i("readyPromise", p, n.$services.viewer, t.proxy); }), f._vcParent = c; const h = c && c.add(f); if (t.cesiumClass === "ParticleSystem") { const p = setInterval(() => { Cesium.defined(h._billboardCollection) && (h._billboardCollection._vcParent = h, clearInterval(p)); }, 500); } return Cesium.defined(h); }, t.unmount = async () => { a.value = 0, o.value = []; const c = t.cesiumClass.includes("Ground") ? n.$services.groundPrimitives : n.$services.primitives, f = t.cesiumObject; return c && c.remove(f); }; const s = (c, f) => { if (o.value.push(c), f === a.value - 1) if (xi(t, "update:geometryInstances")) e.emit("update:geometryInstances", o.value); else { const p = t.cesiumObject; p.geometryInstances = f === 0 ? c : o.value; } return !0; }, u = (c) => { const f = o.value.indexOf(c); return o.value.splice(f, 1), !0; }, l = () => gw(n.getServices(), { get primitive() { return t.cesiumObject; } }); return $h(vw, l()), t.appContext.config.globalProperties.$VueCesium = l(), Object.assign(t.proxy, { __updateGeometryInstances: s, __removeGeometryInstances: u, __childCount: a }), { transformProps: n.transformProps, unwatchFns: n.unwatchFns, setPropsWatcher: n.setPropsWatcher }; } class HCe { constructor() { this.states = new Cesium.ManagedArray(), this.count = 0; } hidePrimitiveCollection(e) { const { PrimitiveCollection: t, Cesium3DTileset: n, Model: i } = Cesium, a = e.length; for (let o = 0; o < a; o++) { const s = e.get(o); s instanceof t ? this.hidePrimitiveCollection(s) : (this.states.push(s.show), s instanceof n || s instanceof i || (s.show = !1)); } } restorePrimitiveCollection(e) { const { PrimitiveCollection: t } = Cesium, n = e.length; for (let i = 0; i < n; i++) { const a = e.get(i); a instanceof t ? this.restorePrimitiveCollection(a) : a.show = this.states.get(this.count++); } } hide(e) { this.states.length = 0, this.hidePrimitiveCollection(e.primitives), this.hidePrimitiveCollection(e.groundPrimitives); } restore(e) { this.count = 0, this.restorePrimitiveCollection(e.primitives), this.restorePrimitiveCollection(e.groundPrimitives); } } var xt = { BeforeDraw: 0, Drawing: 1, AfterDraw: 2 }; const ra = Object.freeze({ METERS: "METERS", CENTIMETERS: "CENTIMETERS", KILOMETERS: "KILOMETERS", FEET: "FEET", US_SURVEY_FEET: "US_SURVEY_FEET", INCHES: "INCHES", YARDS: "YARDS", MILES: "MILES" }), Ci = Object.freeze({ SQUARE_METERS: "SQUARE_METERS", SQUARE_CENTIMETERS: "SQUARE_CENTIMETERS", SQUARE_KILOMETERS: "SQUARE_KILOMETERS", SQUARE_FEET: "SQUARE_FEET", SQUARE_INCHES: "SQUARE_INCHES", SQUARE_YARDS: "SQUARE_YARDS", SQUARE_MILES: "SQUARE_MILES", ACRES: "ACRES", HECTARES: "HECTARES" }), Ua = Object.freeze({ CUBIC_METERS: "CUBIC_METERS", CUBIC_CENTIMETERS: "CUBIC_CENTIMETERS", CUBIC_KILOMETERS: "CUBIC_KILOMETERS", CUBIC_FEET: "CUBIC_FEET", CUBIC_INCHES: "CUBIC_INCHES", CUBIC_YARDS: "CUBIC_YARDS", CUBIC_MILES: "CUBIC_MILES" }), Si = Object.freeze({ DEGREES: "DEGREES", RADIANS: "RADIANS", DEGREES_MINUTES_SECONDS: "DEGREES_MINUTES_SECONDS", GRADE: "GRADE", RATIO: "RATIO" }), To = class { constructor(r) { r = Dv(r, {}), this.distanceUnits = Dv(r.distanceUnits, ra.METERS), this.areaUnits = Dv(r.areaUnits, Ci.SQUARE_METERS), this.volumeUnits = Dv(r.volumeUnits, Ua.CUBIC_METERS), this.angleUnits = Dv(r.angleUnits, Si.DEGREES), this.slopeUnits = Dv(r.slopeUnits, Si.DEGREES); } static distanceToString(r, e, t, n) { return r = To.convertDistance(r, ra.METERS, e), dg(r, t, n) + To.getDistanceUnitSpacing(e) + To.getDistanceUnitSymbol(e); } static areaToString(r, e, t, n) { return r = To.convertArea(r, Ci.SQUARE_METERS, e), dg(r, t, n) + To.getAreaUnitSpacing(e) + To.getAreaUnitSymbol(e); } static angleToString(r, e, t, n) { const { Math: i } = Cesium; if (e === Si.DEGREES || e === Si.RADIANS || e === Si.GRADE) return r = RV(r, e), dg(r, t, n) + To.getAngleUnitSpacing(e) + To.getAngleUnitSymbol(e); if (e === Si.DEGREES_MINUTES_SECONDS) { const a = i.toDegrees(r), o = a < 0 ? "-" : "", s = Math.floor(a), u = 60 * (a - s), l = Math.floor(u); return o + s + "\xB0 " + l + "' " + dg(60 * (u - l), void 0, n) + '"'; } Si.RATIO; } static volumeToString(r, e, t, n) { return r = To.convertArea(r, Ua.CUBIC_METERS, e), dg(r, t, n) + To.getVolumeUnitSpacing(e) + To.getVolumeUnitSymbol(e); } static getDistanceUnitSpacing(r) { return " "; } static getAreaUnitSpacing(r) { return " "; } static getAngleUnitSpacing(r) { return r === Si.RADIANS ? " " : ""; } static getVolumeUnitSpacing(r) { return " "; } static getDistanceUnitSymbol(r) { switch (r) { case ra.METERS: return "m"; case ra.CENTIMETERS: return "cm"; case ra.KILOMETERS: return "km"; case ra.FEET: case ra.US_SURVEY_FEET: return "ft"; case ra.INCHES: return "in"; case ra.YARDS: return "yd"; case ra.MILES: return "mi"; default: return; } } static getAreaUnitSymbol(r) { switch (r) { case Ci.SQUARE_METERS: return "m\xB2"; case Ci.SQUARE_CENTIMETERS: return "cm\xB2"; case Ci.SQUARE_KILOMETERS: return "km\xB2"; case Ci.SQUARE_FEET: return "sq ft"; case Ci.SQUARE_INCHES: return "sq in"; case Ci.SQUARE_YARDS: return "sq yd"; case Ci.SQUARE_MILES: return "sq mi"; case Ci.ACRES: return "ac"; case Ci.HECTARES: return "ha"; default: return; } } static getVolumeUnitSymbol(r) { switch (r) { case Ua.CUBIC_METERS: return "m\xB3"; case Ua.CUBIC_CENTIMETERS: return "cm\xB3"; case Ua.CUBIC_KILOMETERS: return "km\xB3"; case Ua.CUBIC_FEET: return "cu ft"; case Ua.CUBIC_INCHES: return "cu in"; case Ua.CUBIC_YARDS: return "cu yd"; case Ua.CUBIC_MILES: return "cu mi"; default: return; } } static getAngleUnitSymbol(r) { return r === Si.DEGREES ? "\xB0" : r === Si.RADIANS ? "rad" : r === Si.GRADE ? "%" : void 0; } static convertDistance(r, e, t) { return e === t ? r : r * DV(e) * (1 / DV(t)); } static convertArea(r, e, t) { return e === t ? r : r * MV(e) * (1 / MV(t)); } static convertVolume(r, e, t) { return e === t ? r : r * OV(e) * (1 / OV(t)); } static convertAngle(r, e, t) { return e === t ? r : RV(UCe(r, e), t); } static longitudeToString(r, e, t, n) { return To.angleToString(Math.abs(r), e, t, n) + " " + (r < 0 ? "W" : "E"); } static latitudeToString(r, e, t, n) { return To.angleToString(Math.abs(r), e, t, n) + " " + (r < 0 ? "S" : "N"); } }; let es = To; es.numberToString = function(r, e, t) { return dg(r, e, t); }; function DV(r) { switch (r) { case ra.METERS: return 1; case ra.CENTIMETERS: return 0.01; case ra.KILOMETERS: return 1e3; case ra.FEET: return 0.3048; case ra.US_SURVEY_FEET: return 1200 / 3937; case ra.INCHES: return 0.254; case ra.YARDS: return 0.9144; case ra.MILES: return 1609.344; default: return 1; } } function MV(r) { switch (r) { case Ci.SQUARE_METERS: return 1; case Ci.SQUARE_CENTIMETERS: return 1e-4; case Ci.SQUARE_KILOMETERS: return 1e6; case Ci.SQUARE_FEET: return 0.09290304; case Ci.SQUARE_INCHES: return 64516e-8; case Ci.SQUARE_YARDS: return 0.83612736; case Ci.SQUARE_MILES: return 2589988110336e-6; case Ci.ACRES: return 4046.85642232; case Ci.HECTARES: return 1e4; default: return 1; } } function OV(r) { switch (r) { case Ua.CUBIC_METERS: return 1; case Ua.CUBIC_CENTIMETERS: return 1e-6; case Ua.CUBIC_KILOMETERS: return 1e9; case Ua.CUBIC_FEET: return 0.09290304 * 0.3048; case Ua.CUBIC_INCHES: return 16387064e-12; case Ua.CUBIC_YARDS: return 0.764554857984; case Ua.CUBIC_MILES: return 416818182544058e-5; default: return 1; } } function UCe(r, e) { const { defined: t, Math: n, RuntimeError: i } = Cesium; if (e === Si.RADIANS) return r; if (e === Si.DEGREES) return n.toRadians(r); if (e === Si.GRADE) return r === Number.POSITIVE_INFINITY ? n.PI_OVER_TWO : Math.atan(r / 100); if (e === Si.RATIO) return Math.atan(r); if (e === Si.DEGREES_MINUTES_SECONDS) { const o = /(-?)(\d+)\s*°\s*(\d+)\s*'\s*([\d.,]+)"\s*([WENS]?)/i.exec(r) || []; if (!t(o)) throw new i("Could not convert angle to radians: " + r); let s = 0 < o[1].length ? -1 : 1; const u = parseInt(o[2]), l = parseInt(o[3]), c = parseFloat(o[4]); let f = o[5]; f.length === 1 && ((f = f.toUpperCase()) !== "W" && f !== "S" || (s *= -1)); const h = s * (u + l / 60 + c / 3600); return n.toRadians(h); } } function RV(r, e) { const { Math: t } = Cesium; if (e === Si.RADIANS) return r; if (e === Si.DEGREES) return t.toDegrees(r); if (e === Si.GRADE) return t.clamp(r, 0, t.PI_OVER_TWO) === t.PI_OVER_TWO ? Number.POSITIVE_INFINITY : 100 * Math.tan(r); if (e === Si.RATIO) return Math.sin(r) / Math.cos(r); } function dg(r, e, t) { const n = WCe(t, r, e), i = r.toLocaleString(e, n), a = -0, o = 0; return i === a.toLocaleString(e, n) ? o.toLocaleString(e, n) : i; } function WCe(r, e, t) { let n = { minimumFractionDigits: 0, maximumFractionDigits: 0 }; return r = Cesium.defaultValue(r, 2), typeof r == "number" ? (n.minimumFractionDigits = r, n.maximumFractionDigits = r) : n = typeof r == "function" ? r(e, t) : r, n; } class aX { constructor(e) { const { defined: t, defaultValue: n, Color: i, createGuid: a, BoundingSphere: o, Ellipsoid: s, ClassificationType: u } = Cesium; e = n(e, {}), this.show = n(e.show, !0), this._id = t(e.id) ? e.id : a(), this._ellipsoid = n(e.ellipsoid, s.WGS84), this._appearance = n(e.appearance, new Cesium.MaterialAppearance()), this._depthFailAppearance = e.depthFailAppearance, this._positions = n(e.positions, []), this._polygonHierarchy = e.polygonHierarchy, this._clampToGround = n(e.clampToGround, !1), this._classificationType = n(e.classificationType, u.BOTH), this._allowPicking = n(e.allowPicking, !0), this._asynchronous = n(e.asynchronous, !1), this._boundingSphere = new o(), this._primitive = void 0, this._update = !0; } get positions() { return this._positions; } set positions(e) { this._positions = e, this._update = !0; } get polygonHierarchy() { return this._polygonHierarchy; } set polygonHierarchy(e) { this._polygonHierarchy = e, this._update = !0; } get appearance() { return this._appearance; } set appearance(e) { this._appearance = e, this._primitive !== void 0 && (this._primitive.appearance = e); } get depthFailAppearance() { return this._depthFailAppearance; } set depthFailAppearance(e) { this._depthFailAppearance = e, this._primitive !== void 0 && this._primitive instanceof Cesium.Primitive && (this._primitive.depthFailAppearance = e); } get id() { return this._id; } set id(e) { this._id = e; } get boundingVolume() { return this._boundingSphere; } get ellipsoid() { return this._ellipsoid; } get clampToGround() { return this._clampToGround; } set clampToGround(e) { this._clampToGround = e; } get classificationType() { return this._classificationType; } set classificationType(e) { this._classificationType = e, this._update = !0; } get allowPicking() { return this._allowPicking; } set allowPicking(e) { this._allowPicking = e; } get asynchronous() { return this._asynchronous; } set asynchronous(e) { this._asynchronous = e; } async update(e) { if (this.show) { const t = this._polygonHierarchy ? this._polygonHierarchy.positions : this._positions; if (t.length < 3) this._primitive && this._primitive.destroy(), this._primitive = void 0; else { if (this._update) { this._update = !1; let n; this._clampToGround ? n = this._createGroundPolygon() : n = this._createPolygon(), n.then((i) => { this._primitive && this._primitive.destroy(), this._primitive = void 0, this._primitive = i, this._primitive._vcParent = this, this._boundingSphere = Cesium.BoundingSphere.fromPoints(t, this._boundingSphere); }); } this._primitive && this._primitive.update(e); } } } async _createPolygon() { const { Primitive: e, GeometryInstance: t, CoplanarPolygonGeometry: n, Cartesian3: i } = Cesium; return new e({ geometryInstances: new t({ geometry: this._polygonHierarchy ? new n({ polygonHierarchy: this._polygonHierarchy, ellipsoid: this._ellipsoid }) : n.fromPositions({ positions: this._positions.map(function(a) { return i.clone(a); }), ellipsoid: this._ellipsoid }), id: this._id }), appearance: this._appearance, depthFailAppearance: this._depthFailAppearance, allowPicking: this._allowPicking, asynchronous: this._asynchronous }); } async _createGroundPolygon() { const { GroundPrimitive: e, GeometryInstance: t, PolygonGeometry: n, Cartesian3: i } = Cesium; return await Cesium.GroundPrimitive.initializeTerrainHeights(), new e({ geometryInstances: new t({ geometry: this._polygonHierarchy ? new n({ polygonHierarchy: this._polygonHierarchy, ellipsoid: this._ellipsoid }) : n.fromPositions({ positions: this._positions.map(function(a) { return i.clone(a); }), ellipsoid: this._ellipsoid }), id: this._id }), appearance: this._appearance, allowPicking: this._allowPicking, asynchronous: this._asynchronous, classificationType: this._classificationType }); } isDestroyed() { return !1; } destroy() { return this._primitive && this._primitive.destroy(), this._primitive = void 0, Cesium.destroyObject(this); } } class NV { constructor(e) { const { SampledPositionProperty: t, Entity: n, ExtrapolationType: i, VelocityOrientationProperty: a } = Cesium; this._lastTime = void 0, this._sampledPosition = new t(), this._sampledPosition.forwardExtrapolationType = e.forwardExtrapolationType || i.HOLD, this._sampledPosition.backwardExtrapolationType = e.backwardExtrapolationType || i.HOLD, this._cache = [], this._maxCacheSize = e.maxCacheSize || 10; const o = new n(e); o.position = this._sampledPosition, o.orientation = new a(this._sampledPosition), this._entity = o, this._velocityVectorProperty = new Cesium.VelocityVectorProperty(this._sampledPosition, !1); } get id() { return this._entity.id; } set id(e) { this._entity.id = e; } set maxCacheSize(e) { this._maxCacheSize = e; } get maxCacheSize() { return this._maxCacheSize; } get position() { return this._sampledPosition.getValue(Cesium.JulianDate.now()); } _removePosition() { if (this._cache.length > this._maxCacheSize) { const e = Cesium.JulianDate.addSeconds(this._cache[0], -0.2, new Cesium.JulianDate()), t = Cesium.JulianDate.addSeconds(this._cache[this._cache.length - this._maxCacheSize], -0.2, new Cesium.JulianDate()); this._sampledPosition.removeSamples(new Cesium.TimeInterval({ start: e, stop: t })), this._cache.splice(0, this._cache.length - this._maxCacheSize); } } addPosition(e, t) { this._removePosition(); let n; if (typeof t == "number") { const i = Cesium.JulianDate.now(); n = Cesium.JulianDate.addSeconds(i, t, new Cesium.JulianDate()), Cesium.destroyObject(i); } else n = kf(t); return this._sampledPosition.addSample(n, ei(e)), this._lastTime = n, this._cache.push(this._lastTime), n; } } const jCe = { position: 0, normal: 1 }; class YCe { constructor(e) { const { defaultValue: t, Matrix4: n, Math: i, Color: a, BoundingSphere: o } = Cesium; this.modelMatrix = t(e.modelMatrix, new n()), this.fovH = t(e.fovH, i.toRadians(60)), this.fovV = t(e.fovV, i.toRadians(30)), this.segmentH = t(e.segmentH, 16), this.segmentV = t(e.segmentV, 8), this.subSegmentH = t(e.subSegmentH, 3), this.subSegmentV = t(e.subSegmentV, 3), this._faceColor = t(e.faceColor, new a(1, 1, 1, 0.1)), this._lineColor = t(e.lineColor, new a(1, 1, 1, 0.4)), this.show = t(e.show, !0), this._modelMatrix = n.clone(n.IDENTITY), this._fovH = 0, this._fovV = 0, this._segmentH = 1, this._segmentV = 1, this._subSegmentH = 1, this._subSegmentV = 1, this._boundingSphere = new o(), this._initBoundingSphere = void 0, this._command = void 0; } get faceColor() { return this._faceColor; } set faceColor(e) { this._faceColor = e; } get lineColor() { return this._lineColor; } set lineColor(e) { this._lineColor = e; } update(e) { if (this.show && e.passes.render) { const { clone: t, Matrix4: n, defined: i, BoundingSphere: a } = Cesium; this.fovH === this._fovH && this.fovV === this._fovV && this.segmentH === this._segmentH && this.segmentV === this._segmentV && this.subSegmentH === this._subSegmentH && this.subSegmentV === this._subSegmentV || (this._fovH = this.fovH, this._fovV = this.fovV, this._segmentH = this.segmentH, this._segmentV = this.segmentV, this._subSegmentH = this.subSegmentH, this._subSegmentV = this.subSegmentV, this._modelMatrix = t(n.IDENTITY), this._destroyVideoMemory()), this.fovH !== this._fovH && this.fovV !== this._fovV && this.segmentH !== this._segmentH && this.segmentV !== this._segmentV && this.subSegmentH !== this._subSegmentH && this.subSegmentV !== this._subSegmentV && (this._fovH = this.fovH, this._fovV = this.fovV, this._segmentH = this.segmentH, this._segmentV = this.segmentV, this._subSegmentH = this.subSegmentH, this._subSegmentV = this.subSegmentV, this._modelMatrix = t(n.IDENTITY), this._destroyVideoMemory()), i(this._command) || this._createCommand(e.context), n.equals(this.modelMatrix, this._modelMatrix) || (n.clone(this.modelMatrix, this._modelMatrix), this._command.modelMatrix = n.IDENTITY, this._command.modelMatrix = this._modelMatrix, this._command.boundingVolume = a.transform(this._initBoundingSphere, this._modelMatrix, this._boundingSphere), this._lineCommand.modelMatrix = n.IDENTITY, this._lineCommand.modelMatrix = this._modelMatrix, this._lineCommand.boundingVolume = a.transform(this._initBoundingSphere, this._modelMatrix, this._boundingSphere)), this._command && e.commandList.push(this._command), this._lineCommand && e.commandList.push(this._lineCommand); } } isDestroyed() { return !1; } destroy() { this._destroyVideoMemory(), Cesium.destroyObject(this); } _createCommand(e) { const { Appearance: t, RenderState: n, ShaderSource: i, ShaderProgram: a, BufferUsage: o, IndexDatatype: s, VertexArray: u, ComponentDatatype: l, BoundingSphere: c, DrawCommand: f, PrimitiveType: h, Pass: p, Matrix4: d } = Cesium, v = this, g = this._subSegmentH * this._segmentH, m = this._subSegmentV * this._segmentV, y = FV(this._fovH, this._fovV, g, m), _ = FV(this._fovH, this._fovV, g, m), w = XCe(g, m), x = qCe(this._segmentH, this._segmentV, this._subSegmentH, this._subSegmentV), C = t.getDefaultRenderState(!0, !1, void 0), S = n.fromCache(C), b = new i({ sources: [ ` // \u4F7F\u7528double\u7C7B\u578B\u7684position\u8FDB\u884C\u8BA1\u7B97 // attribute vec3 position3DHigh; // attribute vec3 position3DLow; attribute vec3 position; attribute vec3 normal; // attribute vec2 st; // attribute float batchId; varying vec3 v_positionEC; varying vec3 v_normalEC; // varying vec2 v_st; void main() { // \u4F7F\u7528double\u7C7B\u578B\u7684position\u8FDB\u884C\u8BA1\u7B97 // vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow); // v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates // v_normalEC = czm_normal * normal; // normal in eye coordinates // v_st = st; // gl_Position = czm_modelViewProjectionRelativeToEye * p; v_positionEC = (czm_modelView * vec4(position, 1.0)).xyz; // position in eye coordinates v_normalEC = czm_normal * normal; // normal in eye coordinates // v_st = st; gl_Position = czm_modelViewProjection * vec4(position, 1.0); } ` ] }), E = new i({ sources: [ ` varying vec3 v_positionEC; varying vec3 v_normalEC; // varying vec2 v_st; // uniform sampler2D myImage; uniform vec4 vcColor; void main() { vec3 positionToEyeEC = -v_positionEC; vec3 normalEC = normalize(v_normalEC); #ifdef FACE_FORWARD normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC); #endif czm_materialInput materialInput; materialInput.normalEC = normalEC; materialInput.positionToEyeEC = positionToEyeEC; // materialInput.st = v_st; //czm_material material = czm_getMaterial(materialInput); czm_material material = czm_getDefaultMaterial(materialInput); // material.diffuse = texture2D(myImage, materialInput.st).rgb; material.diffuse = vcColor.rgb; material.alpha = vcColor.a; #ifdef FLAT gl_FragColor = vec4(material.diffuse + material.emission, material.alpha); #else gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC); #endif } ` ] }), T = { vcColor: function() { return v._faceColor; } }, P = { vcColor: function() { return v._lineColor; } }, I = a.fromCache({ context: e, vertexShaderSource: b, fragmentShaderSource: E, attributeLocations: jCe }); this._shaderprogram = I; const A = Cesium.Buffer.createVertexBuffer({ context: e, typedArray: y, usage: o.STATIC_DRAW }), L = Cesium.Buffer.createVertexBuffer({ context: e, typedArray: _, usage: o.STATIC_DRAW }), D = Cesium.Buffer.createIndexBuffer({ context: e, typedArray: w, usage: o.STATIC_DRAW, indexDatatype: s.UNSIGNED_SHORT }), O = Cesium.Buffer.createIndexBuffer({ context: e, typedArray: x, usage: o.STATIC_DRAW, indexDatatype: s.UNSIGNED_SHORT }), N = new u({ context: e, attributes: [ { index: 0, vertexBuffer: A, componentsPerAttribute: 3, componentDatatype: l.FLOAT }, { index: 1, vertexBuffer: L, componentsPerAttribute: 3, componentDatatype: l.FLOAT } ], indexBuffer: D }), F = new u({ context: e, attributes: [ { index: 0, vertexBuffer: A, componentsPerAttribute: 3, componentDatatype: l.FLOAT }, { index: 1, vertexBuffer: L, componentsPerAttribute: 3, componentDatatype: l.FLOAT } ], indexBuffer: O }); this._initBoundingSphere = c.fromVertices(y), this._command = new f({ vertexArray: N, primitiveType: h.TRIANGLES, renderState: S, shaderProgram: I, uniformMap: T, owner: this, pass: p.TRANSLUCENT, modelMatrix: new d(), boundingVolume: new c(), cull: !0 }), this._lineCommand = new f({ vertexArray: F, primitiveType: h.LINES, renderState: S, shaderProgram: I, uniformMap: P, owner: this, pass: p.TRANSLUCENT, modelMatrix: new d(), boundingVolume: new c(), cull: !0 }); } _destroyVideoMemory() { const { defined: e } = Cesium; this._shaderprogram = this._shaderprogram && this._shaderprogram.destroy(), e(this._command) && (this._command.vertexArray.destroy(), this._command = void 0), e(this._lineCommand) && (this._lineCommand.vertexArray.destroy(), this._lineCommand = void 0); } } function FV(r, e, t, n) { const i = new Float32Array((t + 1) * (n + 1) * 3 + 3); for (let a = 0; a < t + 1; a++) for (let o = 0; o < n + 1; o++) { const s = r * (a / t - 0.5), u = e * (o / n - 0.5), l = [Math.cos(-s) * Math.cos(-u), Math.sin(-s) * Math.cos(-u), Math.sin(u)]; i[3 * (o * (t + 1) + a) + 0] = l[0], i[3 * (o * (t + 1) + a) + 1] = l[1], i[3 * (o * (t + 1) + a) + 2] = l[2]; } return i[(t + 1) * (n + 1) * 3 + 0] = 0, i[(t + 1) * (n + 1) * 3 + 1] = 0, i[(t + 1) * (n + 1) * 3 + 2] = 0, i; } function XCe(r, e) { const t = r * e * 6, n = new Uint16Array(t); for (let i = 0; i < r; i++) for (let a = 0; a < e; a++) { const o = a * (1 + r) + i, s = a * (1 + r) + i + 1, u = (a + 1) * (1 + r) + i, l = (a + 1) * (1 + r) + i + 1, c = 6 * (a * r + i); n[0 + c] = o, n[1 + c] = s, n[2 + c] = l, n[3 + c] = o, n[4 + c] = l, n[5 + c] = u; } return n; } function qCe(r, e, t, n) { const i = r * t, a = e * n, o = new Uint16Array((r + 1) * (2 * a) + (e + 1) * (2 * i) + 8); for (let l = 0; l < r + 1; l++) for (let c = 0; c < a; c++) { const f = l * t; o[2 * (l * a + c) + 0] = c * (1 + i) + f, o[2 * (l * a + c) + 1] = (c + 1) * (1 + i) + f; } const s = (r + 1) * (2 * a); for (let l = 0; l < e; l++) for (let c = 0; c < i; c++) { const f = l * n; o[s + 2 * (c + l * i)] = f * (1 + i) + c, o[s + 2 * (c + l * i) + 1] = f * (1 + i) + c + 1; } const u = (r + 1) * (2 * a) + (e + 1) * (2 * i); return o[u] = 0, o[u + 1] = (1 + i) * (1 + a), o[u + 2] = i, o[u + 3] = (1 + i) * (1 + a), o[u + 4] = (1 + i) * a, o[u + 5] = (1 + i) * (1 + a), o[u + 6] = (1 + i) * (1 + a) - 1, o[u + 7] = (1 + i) * (1 + a), o; } class ZCe { constructor(e, t) { const { defined: n, DeveloperError: i, PerspectiveFrustum: a, Math: o, Camera: s, ShadowMap: u, ShadowMode: l, Event: c, Cartesian3: f, defaultValue: h, Color: p } = Cesium; if (!n(e)) throw new i("scene is required."); this._scene = e, this._frustum = new a(), this._frustum.fov = o.PI / 3, this._frustum.aspectRatio = 3, this._frustum.near = 1, this._frustum.far = 400, this._spotLightCamera = new s(this._scene), this._frustum.clone(this._spotLightCamera.frustum), this._viewshedShadowMap = new u({ context: this._scene.context, lightCamera: this._spotLightCamera, cascadesEnabled: !1 }), t = t || {}, this._scene.globe.shadows = l.ENABLED, this._viewshedShadowMap._terrainBias.depthBias = 0, this._debugCameraPrimitive = new YCe({}), this._enabledChangedEvent = new c(), this._position = new f(), this._offsetHeight = h(t.offsetHeight, 1.8), this._visibleColor = h(t.visibleColor, new p(0, 1, 0, 1)), this._invisibleColor = h(t.invisibleColor, new p(1, 0, 0, 1)), this._viewshedShadowMap._viewshedColors = { visible: this._visibleColor, invisible: this._invisibleColor }, this._showGridLine = t.showGridLine, this._debugCameraPrimitive.show = this._showGridLine, this._debugCameraPrimitive.lineColor = h(t.lineColor, new p(1, 1, 1, 0.4)), this._debugCameraPrimitive.faceColor = h(t.faceColor, new p(1, 1, 1, 0.1)); } get frustum() { return this._frustum; } get fovH() { return this._fovH; } set fovH(e) { if (isNaN(e) || e === void 0 || e == null || e < 0 || e >= Math.PI) throw new Error("fovH must be in the range [0, PI)."); this._fovH = Number(e), this.frustum.aspectRatio = Math.tan(0.5 * this._fovH) / Math.tan(0.5 * this._fovV), this.frustum.fov = this._fovH > this._fovV ? this._fovH : this._fovV; } get fovV() { return this._fovV; } set fovV(e) { if (isNaN(e) || e === void 0 || e == null || e < 0 || e >= Math.PI) throw new Error("fovV must be in the range [0, PI)."); this._fovV = Number(e), this.frustum.aspectRatio = Math.tan(0.5 * this._fovH) / Math.tan(0.5 * this._fovV), this.frustum.fov = this._fovH > this._fovV ? this._fovH : this._fovV; } get near() { return this.frustum.near; } set near(e) { this.frustum.near !== e && (this.frustum.near = e); } get far() { return this.far.near; } set far(e) { this.frustum.far !== e && (this.frustum.far = e); } get position() { return this._position; } set position(e) { e instanceof Cesium.Cartesian3 && this.setView({ destination: e.clone(), orientation: { heading: this._spotLightCamera.heading, pitch: this._spotLightCamera.pitch, roll: this._spotLightCamera.roll } }); } get offsetHeight() { return this._offsetHeight; } set offsetHeight(e) { if (isNaN(e) || e == null || e == null) throw new Error("Unacceptable offset."); this._offsetHeight = Number(e), this.setView({ destination: this._position, orientation: { heading: this._spotLightCamera.heading, pitch: this._spotLightCamera.pitch, roll: this._spotLightCamera.roll } }); } get heading() { return this._spotLightCamera.heading; } set heading(e) { this._spotLightCamera.heading !== e && this._spotLightCamera.setView({ destination: this._spotLightCamera.positionWC, orientation: { heading: e, pitch: this._spotLightCamera.pitch, roll: this._spotLightCamera.roll } }); } get pitch() { return this._spotLightCamera.pitch; } set pitch(e) { this._spotLightCamera.pitch !== e && this._spotLightCamera.setView({ destination: this._spotLightCamera.positionWC, orientation: { heading: this._spotLightCamera.heading, pitch: e, roll: this._spotLightCamera.roll } }); } get roll() { return this._spotLightCamera.roll; } set roll(e) { this._spotLightCamera.roll !== e && this._spotLightCamera.setView({ destination: this._spotLightCamera.positionWC, orientation: { heading: this._spotLightCamera.heading, pitch: this._spotLightCamera.pitch, roll: e } }); } get shadowMap() { return this._viewshedShadowMap; } get lightCamera() { return this._spotLightCamera; } get enabled() { return this._viewshedShadowMap.enabled; } set enabled(e) { this._viewshedShadowMap.enabled !== e && (e ? (this._viewshedShadowMap.enabled = !0, this._viewshedShadowMap._pointLightRadius = this._spotLightCamera.frustum.far) : this._viewshedShadowMap.enabled = !1, this._enabledChangedEvent.raiseEvent(e)); } get enabledChangedEvent() { return this._enabledChangedEvent; } get visibleColor() { return this._visibleColor; } set visibleColor(e) { this._visibleColor = e, this._viewshedShadowMap._viewshedColors.visible = e; } get invisibleColor() { return this._invisibleColor; } set invisibleColor(e) { this._invisibleColor = e, this._viewshedShadowMap._viewshedColors.invisible = e; } get showGridLine() { return this._showGridLine; } set showGridLine(e) { this._showGridLine = e, this._debugCameraPrimitive.show = e; } get faceColor() { return this._debugCameraPrimitive.faceColor; } set faceColor(e) { this._debugCameraPrimitive.faceColor = e; } get lineColor() { return this._debugCameraPrimitive.lineColor; } set lineColor(e) { this._debugCameraPrimitive.lineColor = e; } update(e) { if (this._viewshedShadowMap.enabled) { const { ShadowMode: t, Matrix3: n, Matrix4: i, Math: a } = Cesium; if (this._scene.globe.shadows !== t.ENABLED && (this._scene.globe.shadows = t.ENABLED), e.shadowMaps.unshift(this._viewshedShadowMap), this._frustum.equals(this._spotLightCamera.frustum) || (this._frustum.clone(this._spotLightCamera.frustum), this._viewshedShadowMap._pointLightRadius = this._frustum.far, this.shadowMap._boundingSphere.radius = Math.random()), this._debugCameraPrimitive.show) { const o = this._debugCameraPrimitive.modelMatrix; i.clone(this._spotLightCamera.inverseViewMatrix, o); const s = n.fromRotationZ(0.5 * a.PI), u = n.fromRotationY(0.5 * a.PI), l = new n(); n.multiply(s, u, l), i.multiplyByMatrix3(o, l, o), i.multiplyByUniformScale(o, this._spotLightCamera.frustum.far, o); const c = this._spotLightCamera.frustum; this._debugCameraPrimitive.fovV = c.aspectRatio <= 1 ? c.fov : 2 * Math.atan(Math.tan(0.5 * c.fov) / c.aspectRatio), this._debugCameraPrimitive.fovH = 1 < c.aspectRatio ? c.fov : 2 * Math.atan(Math.tan(0.5 * c.fov) * c.aspectRatio), this._debugCameraPrimitive.segmentH = parseInt(String(this._debugCameraPrimitive.fovH / (Math.PI / 30))) || 1, this._debugCameraPrimitive.segmentV = parseInt(String(this._debugCameraPrimitive.fovV / (Math.PI / 30))) || 1, this._debugCameraPrimitive.update(e); } } } setView(e) { e = e || {}; const t = e.destination; if (t instanceof Cesium.Cartesian3) { this._position = t.clone(); const n = this._offsetHeight, i = Cesium.Cartographic.fromCartesian(t, this._scene.globe.ellipsoid); if (i) { i.height = i.height + n; const a = Cesium.Cartesian3.fromRadians(i.longitude, i.latitude, i.height, this._scene.globe.ellipsoid); e.destination = a; } } this._spotLightCamera.setView(e); } isDestroyed() { return !1; } destroy() { this._debugCameraPrimitive && this._debugCameraPrimitive.destroy(), this._viewshedShadowMap && this._viewshedShadowMap.destroy(), Cesium.destroyObject(this); } } const uM = { xs: 18, sm: 24, md: 32, lg: 38, xl: 46 }, oX = { size: String }; function sX(r, e = uM) { return Ie(() => r.size !== void 0 ? { fontSize: r.size in e ? `${e[r.size]}px` : r.size } : null); } function Qi(r, e) { return r !== void 0 ? r() : e; } function jg(r, e) { return r !== void 0 ? e.concat(r()) : e; } function KCe(r, e, t, n, i, a) { e.key = n + i; const o = H(r, e, t); return i === !0 ? ba(o, a()) : o; } const JCe = { ...oX, tag: { type: String, default: "i" }, name: String, color: String, hoverColor: String, left: Boolean, right: Boolean }; var f1 = de({ name: "VcIcon", props: JCe, setup(r, { slots: e }) { const t = sX(r), n = Ie(() => { const o = t.value; if (!!o) return r.color && (o.color = r.color), r.hoverColor && (o["--hover-color"] = r.hoverColor), o; }), i = Ie(() => "vc-icon" + (r.left === !0 ? " on-left" : "") + (r.right === !0 ? " on-right" : "") + (r.color !== void 0 ? ` text-${r.color}` : "")), a = Ie(() => { let o, s = r.name; if (!s) return { none: !0, cls: i.value }; if (s.startsWith("M") === !0) { const [l, c] = s.split("|"); return { svg: !0, cls: i.value, nodes: l.split("&&").map((f) => { const [h, p, d] = f.split("@@"); return H("path", { style: p, d: h, transform: d }); }), viewBox: c !== void 0 ? c : "0 0 24 24" }; } if (s.startsWith("img:") === !0) return { img: !0, cls: i.value, src: s.substring(4) }; if (s.startsWith("svguse:") === !0) { const [l, c] = s.split("|"); return { svguse: !0, cls: i.value, src: l.substring(7), viewBox: c !== void 0 ? c : "0 0 24 24" }; } let u = " "; return /^[l|f]a[s|r|l|b|d]{0,1} /.test(s) || s.startsWith("icon-") === !0 ? o = s : s.startsWith("bt-") === !0 ? o = `bt ${s}` : s.startsWith("eva-") === !0 ? o = `eva ${s}` : /^ion-(md|ios|logo)/.test(s) === !0 ? o = `ionicons ${s}` : s.startsWith("ion-") === !0 ? o = `ionicons ion-md${s.substr(3)}` : s.startsWith("mdi-") === !0 ? o = `mdi ${s}` : s.startsWith("iconfont ") === !0 ? o = `${s}` : s.startsWith("ti-") === !0 ? o = `themify-icon ${s}` : s.startsWith("vc-") === !0 ? o = `vc-icons ${s}` : (o = "notranslate material-icons", s.startsWith("o_") === !0 ? (s = s.substring(2), o += "-outlined") : s.startsWith("r_") === !0 ? (s = s.substring(2), o += "-round") : s.startsWith("s_") === !0 && (s = s.substring(2), o += "-sharp"), u = s), { cls: o + " " + i.value, content: u }; }); return () => { const o = { class: a.value.cls, style: n.value, "aria-hidden": "true", role: "presentation", viewBox: "", src: "" }; return a.value.none === !0 ? H(r.tag, o, Qi(e.default)) : a.value.img === !0 ? (o.src = a.value.src, o.style && (o.style.width = o.style.fontSize, o.style.height = o.style.fontSize), H("img", o)) : a.value.svg === !0 ? (o.viewBox = a.value.viewBox, o["aria-hidden"] = "true", o.style && (o.style.width = o.style.fontSize, o.style.height = o.style.fontSize), H("svg", o, jg(e.default, a.value.nodes))) : a.value.svguse === !0 ? (o.viewBox = a.value.viewBox, o["aria-hidden"] = "true", o.style && (o.style.width = o.style.fontSize, o.style.height = o.style.fontSize), H("svg", o, jg(e.default, [H("use", { "xlink:href": a.value.src })]))) : H(r.tag, o, jg(e.default, [a.value.content])); }; } }); const wu = { size: { type: [Number, String], default: "1em" }, color: String }; function xu(r) { return { cSize: Ie(() => r.size in uM ? `${uM[r.size]}px` : r.size), classes: Ie(() => "vc-spinner" + (r.color ? ` text-${r.color}` : "")) }; } const QCe = [ H("g", { transform: "translate(1 1)", "stroke-width": "2", fill: "none", "fill-rule": "evenodd" }, [ H("circle", { cx: "5", cy: "50", r: "5" }, [ H("animate", { attributeName: "cy", begin: "0s", dur: "2.2s", values: "50;5;50;50", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "cx", begin: "0s", dur: "2.2s", values: "5;27;49;5", calcMode: "linear", repeatCount: "indefinite" }) ]), H("circle", { cx: "27", cy: "5", r: "5" }, [ H("animate", { attributeName: "cy", begin: "0s", dur: "2.2s", from: "5", to: "5", values: "5;50;50;5", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "cx", begin: "0s", dur: "2.2s", from: "27", to: "27", values: "27;49;5;27", calcMode: "linear", repeatCount: "indefinite" }) ]), H("circle", { cx: "49", cy: "50", r: "5" }, [ H("animate", { attributeName: "cy", begin: "0s", dur: "2.2s", values: "50;50;5;50", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "cx", from: "49", to: "49", begin: "0s", dur: "2.2s", values: "49;5;27;49", calcMode: "linear", repeatCount: "indefinite" }) ]) ]) ]; var eSe = de({ name: "VcSpinnerBall", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, stroke: "currentColor", width: e.value, height: e.value, viewBox: "0 0 57 57", xmlns: "http://www.w3.org/2000/svg" }, QCe); } }); const tSe = [ H("rect", { y: "10", width: "15", height: "120", rx: "6" }, [ H("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" }) ]), H("rect", { x: "30", y: "10", width: "15", height: "120", rx: "6" }, [ H("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" }) ]), H("rect", { x: "60", width: "15", height: "140", rx: "6" }, [ H("animate", { attributeName: "height", begin: "0s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "y", begin: "0s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" }) ]), H("rect", { x: "90", y: "10", width: "15", height: "120", rx: "6" }, [ H("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" }) ]), H("rect", { x: "120", y: "10", width: "15", height: "120", rx: "6" }, [ H("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" }) ]) ]; var rSe = de({ name: "VcSpinnerBars", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, fill: "currentColor", width: e.value, height: e.value, viewBox: "0 0 135 140", xmlns: "http://www.w3.org/2000/svg" }, tSe); } }); const nSe = [ H("circle", { cx: "15", cy: "15", r: "15" }, [ H("animate", { attributeName: "r", from: "15", to: "15", begin: "0s", dur: "0.8s", values: "15;9;15", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "fill-opacity", from: "1", to: "1", begin: "0s", dur: "0.8s", values: "1;.5;1", calcMode: "linear", repeatCount: "indefinite" }) ]), H("circle", { cx: "60", cy: "15", r: "9", "fill-opacity": ".3" }, [ H("animate", { attributeName: "r", from: "9", to: "9", begin: "0s", dur: "0.8s", values: "9;15;9", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "fill-opacity", from: ".5", to: ".5", begin: "0s", dur: "0.8s", values: ".5;1;.5", calcMode: "linear", repeatCount: "indefinite" }) ]), H("circle", { cx: "105", cy: "15", r: "15" }, [ H("animate", { attributeName: "r", from: "15", to: "15", begin: "0s", dur: "0.8s", values: "15;9;15", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "fill-opacity", from: "1", to: "1", begin: "0s", dur: "0.8s", values: "1;.5;1", calcMode: "linear", repeatCount: "indefinite" }) ]) ]; var iSe = de({ name: "VcSpinnerDots", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, fill: "currentColor", width: e.value, height: e.value, viewBox: "0 0 120 30", xmlns: "http://www.w3.org/2000/svg" }, nSe); } }); const aSe = [ H("g", { transform: "translate(-20,-20)" }, [ H("path", { d: "M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z", fill: "currentColor" }, [ H("animateTransform", { attributeName: "transform", type: "rotate", from: "90 50 50", to: "0 50 50", dur: "1s", repeatCount: "indefinite" }) ]) ]), H("g", { transform: "translate(20,20) rotate(15 50 50)" }, [ H("path", { d: "M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z", fill: "currentColor" }, [ H("animateTransform", { attributeName: "transform", type: "rotate", from: "0 50 50", to: "90 50 50", dur: "1s", repeatCount: "indefinite" }) ]) ]) ]; var oSe = de({ name: "VcSpinnerGears", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, width: e.value, height: e.value, viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", xmlns: "http://www.w3.org/2000/svg" }, aSe); } }); const sSe = [ H("g", [ H("path", { fill: "none", stroke: "currentColor", "stroke-width": "5", "stroke-miterlimit": "10", d: "M58.4,51.7c-0.9-0.9-1.4-2-1.4-2.3s0.5-0.4,1.4-1.4 C70.8,43.8,79.8,30.5,80,15.5H70H30H20c0.2,15,9.2,28.1,21.6,32.3c0.9,0.9,1.4,1.2,1.4,1.5s-0.5,1.6-1.4,2.5 C29.2,56.1,20.2,69.5,20,85.5h10h40h10C79.8,69.5,70.8,55.9,58.4,51.7z" }), H("clipPath", { id: "uil-hourglass-clip1" }, [ H("rect", { x: "15", y: "20", width: " 70", height: "25" }, [ H("animate", { attributeName: "height", from: "25", to: "0", dur: "1s", repeatCount: "indefinite", values: "25;0;0", keyTimes: "0;0.5;1" }), H("animate", { attributeName: "y", from: "20", to: "45", dur: "1s", repeatCount: "indefinite", values: "20;45;45", keyTimes: "0;0.5;1" }) ]) ]), H("clipPath", { id: "uil-hourglass-clip2" }, [ H("rect", { x: "15", y: "55", width: " 70", height: "25" }, [ H("animate", { attributeName: "height", from: "0", to: "25", dur: "1s", repeatCount: "indefinite", values: "0;25;25", keyTimes: "0;0.5;1" }), H("animate", { attributeName: "y", from: "80", to: "55", dur: "1s", repeatCount: "indefinite", values: "80;55;55", keyTimes: "0;0.5;1" }) ]) ]), H("path", { d: "M29,23c3.1,11.4,11.3,19.5,21,19.5S67.9,34.4,71,23H29z", "clip-path": "url(#uil-hourglass-clip1)", fill: "currentColor" }), H("path", { d: "M71.6,78c-3-11.6-11.5-20-21.5-20s-18.5,8.4-21.5,20H71.6z", "clip-path": "url(#uil-hourglass-clip2)", fill: "currentColor" }), H("animateTransform", { attributeName: "transform", type: "rotate", from: "0 50 50", to: "180 50 50", repeatCount: "indefinite", dur: "1s", values: "0 50 50;0 50 50;180 50 50", keyTimes: "0;0.7;1" }) ]) ]; var uSe = de({ name: "VcSpinnerHourglass", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, width: e.value, height: e.value, viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", xmlns: "http://www.w3.org/2000/svg" }, sSe); } }); const lSe = [ H("g", { "stroke-width": "4", "stroke-linecap": "round" }, [ H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(180)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: "1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(210)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: "0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(240)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(270)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(300)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(330)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(0)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(30)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(60)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(90)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(120)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: ".85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85", repeatCount: "indefinite" }) ]), H("line", { y1: "17", y2: "29", transform: "translate(32,32) rotate(150)" }, [ H("animate", { attributeName: "stroke-opacity", dur: "750ms", values: "1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1", repeatCount: "indefinite" }) ]) ]) ]; var cSe = de({ name: "VcSpinnerIos", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, width: e.value, height: e.value, stroke: "currentColor", fill: "currentColor", viewBox: "0 0 64 64" }, lSe); } }); const fSe = [ H("circle", { cx: "50", cy: "50", r: "44", fill: "none", "stroke-width": "4", "stroke-opacity": ".5", stroke: "currentColor" }), H("circle", { cx: "8", cy: "54", r: "6", fill: "currentColor", "stroke-width": "3", stroke: "currentColor" }, [ H("animateTransform", { attributeName: "transform", type: "rotate", from: "0 50 48", to: "360 50 52", dur: "2s", repeatCount: "indefinite" }) ]) ]; var hSe = de({ name: "VcSpinnerOrbit", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, width: e.value, height: e.value, viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", xmlns: "http://www.w3.org/2000/svg" }, fSe); } }); const pSe = [ H("g", { transform: "translate(1 1)", "stroke-width": "2", fill: "none", "fill-rule": "evenodd" }, [ H("circle", { "stroke-opacity": ".5", cx: "18", cy: "18", r: "18" }), H("path", { d: "M36 18c0-9.94-8.06-18-18-18" }, [ H("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "1s", repeatCount: "indefinite" }) ]) ]) ]; var dSe = de({ name: "VcSpinnerOval", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, stroke: "currentColor", width: e.value, height: e.value, viewBox: "0 0 38 38", xmlns: "http://www.w3.org/2000/svg" }, pSe); } }); const vSe = [ H("g", { fill: "none", "fill-rule": "evenodd", "stroke-width": "2" }, [ H("circle", { cx: "22", cy: "22", r: "1" }, [ H("animate", { attributeName: "r", begin: "0s", dur: "1.8s", values: "1; 20", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.165, 0.84, 0.44, 1", repeatCount: "indefinite" }), H("animate", { attributeName: "stroke-opacity", begin: "0s", dur: "1.8s", values: "1; 0", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.3, 0.61, 0.355, 1", repeatCount: "indefinite" }) ]), H("circle", { cx: "22", cy: "22", r: "1" }, [ H("animate", { attributeName: "r", begin: "-0.9s", dur: "1.8s", values: "1; 20", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.165, 0.84, 0.44, 1", repeatCount: "indefinite" }), H("animate", { attributeName: "stroke-opacity", begin: "-0.9s", dur: "1.8s", values: "1; 0", calcMode: "spline", keyTimes: "0; 1", keySplines: "0.3, 0.61, 0.355, 1", repeatCount: "indefinite" }) ]) ]) ]; var gSe = de({ name: "VcSpinnerPuff", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, stroke: "currentColor", width: e.value, height: e.value, viewBox: "0 0 44 44", xmlns: "http://www.w3.org/2000/svg" }, vSe); } }); const mSe = [ H("g", { fill: "none", "fill-rule": "evenodd", transform: "translate(1 1)", "stroke-width": "2" }, [ H("circle", { cx: "22", cy: "22", r: "6" }, [ H("animate", { attributeName: "r", begin: "1.5s", dur: "3s", values: "6;22", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "stroke-opacity", begin: "1.5s", dur: "3s", values: "1;0", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "stroke-width", begin: "1.5s", dur: "3s", values: "2;0", calcMode: "linear", repeatCount: "indefinite" }) ]), H("circle", { cx: "22", cy: "22", r: "6" }, [ H("animate", { attributeName: "r", begin: "3s", dur: "3s", values: "6;22", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "stroke-opacity", begin: "3s", dur: "3s", values: "1;0", calcMode: "linear", repeatCount: "indefinite" }), H("animate", { attributeName: "stroke-width", begin: "3s", dur: "3s", values: "2;0", calcMode: "linear", repeatCount: "indefinite" }) ]), H("circle", { cx: "22", cy: "22", r: "8" }, [ H("animate", { attributeName: "r", begin: "0s", dur: "1.5s", values: "6;1;2;3;4;5;6", calcMode: "linear", repeatCount: "indefinite" }) ]) ]) ]; var ySe = de({ name: "VcSpinnerRings", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, stroke: "currentColor", width: e.value, height: e.value, viewBox: "0 0 45 45", xmlns: "http://www.w3.org/2000/svg" }, mSe); } }); const _Se = [ H("defs", [ H("linearGradient", { x1: "8.042%", y1: "0%", x2: "65.682%", y2: "23.865%", id: "a" }, [ H("stop", { "stop-color": "currentColor", "stop-opacity": "0", offset: "0%" }), H("stop", { "stop-color": "currentColor", "stop-opacity": ".631", offset: "63.146%" }), H("stop", { "stop-color": "currentColor", offset: "100%" }) ]) ]), H("g", { transform: "translate(1 1)", fill: "none", "fill-rule": "evenodd" }, [ H("path", { d: "M36 18c0-9.94-8.06-18-18-18", stroke: "url(#a)", "stroke-width": "2" }, [ H("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" }) ]), H("circle", { fill: "currentColor", cx: "36", cy: "18", r: "1" }, [ H("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "0.9s", repeatCount: "indefinite" }) ]) ]) ]; var wSe = de({ name: "VcSpinnerTail", props: wu, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value, width: e.value, height: e.value, viewBox: "0 0 38 38", xmlns: "http://www.w3.org/2000/svg" }, _Se); } }), uX = de({ name: "VcSpinner", props: { ...wu, thickness: { type: Number, default: 5 } }, setup(r) { const { cSize: e, classes: t } = xu(r); return () => H("svg", { class: t.value + " vc-spinner-mat", width: e.value, height: e.value, viewBox: "25 25 50 50" }, [ H("circle", { class: "path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": r.thickness, "stroke-miterlimit": "10" }) ]); } }); const lX = { left: "start", center: "center", right: "end", between: "between", around: "around", evenly: "evenly", stretch: "stretch" }, xSe = Object.keys(lX), CSe = { align: { type: String, validator: (r) => xSe.includes(r) } }; function SSe(r) { return Ie(() => { const e = r.align === void 0 ? r.vertical === !0 ? "stretch" : "left" : r.align; return `${r.vertical === !0 ? "items" : "justify"}-${lX[e]}`; }); } const BV = { none: 0, xs: 4, sm: 8, md: 16, lg: 24, xl: 32 }, ESe = { xs: 8, sm: 10, md: 14, lg: 20, xl: 24 }, bSe = { ...oX, type: { type: String, default: "button" }, label: [Number, String], icon: String, iconRight: String, round: Boolean, outline: Boolean, flat: Boolean, unelevated: Boolean, rounded: Boolean, push: Boolean, glossy: Boolean, size: String, fab: Boolean, fabMini: Boolean, padding: String, color: String, textColor: String, noCaps: Boolean, noWrap: Boolean, dense: Boolean, tabindex: [Number, String], ripple: { type: [Boolean, Object], default: !0 }, align: { ...CSe.align, default: "center" }, stack: Boolean, stretch: Boolean, loading: { type: Boolean, default: null }, disable: Boolean }; function TSe(r) { const e = sX(r, ESe), t = SSe(r), n = Ie(() => { const f = r.fab === !1 && r.fabMini === !1 ? e.value : {}; return r.padding !== void 0 ? Object.assign({}, f, { padding: r.padding.split(/\s+/).map((h) => h in BV ? BV[h] + "px" : h).join(" "), minWidth: "0", minHeight: "0" }) : f; }), i = Ie(() => r.rounded === !0 || r.fab === !0 || r.fabMini === !0), a = Ie(() => r.disable !== !0 && r.loading !== !0), o = Ie(() => a.value === !0 ? r.tabindex || 0 : -1), s = Ie(() => r.flat === !0 ? "flat" : r.outline === !0 ? "outline" : r.push === !0 ? "push" : r.unelevated === !0 ? "unelevated" : "standard"), u = Ie(() => { const f = { tabindex: o.value }; return r.type !== "a" && (f.type = r.type), f.role = r.type === "a" ? "link" : "button", r.loading === !0 && r.percentage !== void 0 && Object.assign(f, { role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": r.percentage }), r.disable === !0 && (f.disabled = "", f["aria-disabled"] = "true"), f; }), l = Ie(() => { let f; return r.color !== void 0 ? r.flat === !0 || r.outline === !0 ? f = `text-${r.textColor || r.color}` : f = `bg-${r.color} text-${r.textColor || "white"}` : r.textColor && (f = `text-${r.textColor}`), `vc-btn--${s.value} vc-btn--${r.round === !0 ? "round" : `rectangle${i.value === !0 ? " vc-btn--rounded" : ""}`}` + (f !== void 0 ? " " + f : "") + (a.value === !0 ? " vc-btn--actionable vc-focusable vc-hoverable" : r.disable === !0 ? " disabled" : "") + (r.fab === !0 ? " vc-btn--fab" : r.fabMini === !0 ? " vc-btn--fab-mini" : "") + (r.noCaps === !0 ? " vc-btn--no-uppercase" : "") + (r.dense === !0 ? " vc-btn--dense" : "") + (r.stretch === !0 ? " no-border-radius self-stretch" : "") + (r.glossy === !0 ? " glossy" : ""); }), c = Ie(() => t.value + (r.stack === !0 ? " column" : " row") + (r.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (r.loading === !0 ? " vc-btn__content--hidden" : "")); return { classes: l, style: n, innerClasses: c, attributes: u, isActionable: a }; } const PN = fs().isIOS || navigator.vendor.toLowerCase().indexOf("apple") > -1 ? () => document : (r) => r, { passiveCapture: As } = Am; let Mv, Ov, Rv; const PSe = { ...bSe, percentage: { type: Number, default: 0 }, darkPercentage: Boolean }; var PT = de({ name: "VcBtn", props: PSe, emits: ["click", "keydown", "touchstart", "mousedown", "keyup"], setup(r, { slots: e, emit: t }) { var n; const i = (n = We()) == null ? void 0 : n.proxy, { classes: a, style: o, innerClasses: s, attributes: u, isActionable: l } = TSe(r), c = te(null), f = te(null); let h = null, p, d; const v = Ie(() => r.label !== void 0 && r.label !== null && r.label !== ""), g = Ie(() => r.ripple === !1 ? !1 : { keyCodes: 13, ...r.ripple === !0 ? {} : r.ripple }), m = Ie(() => { const I = Math.max(0, Math.min(100, r.percentage)); return I > 0 ? { transition: "transform 0.6s", transform: `translateX(${I - 100}%)` } : {}; }), y = Ie(() => r.loading === !0 ? { onMousedown: P, onTouchstart: P, onClick: P, onKeydown: P, onKeyup: P } : l.value === !0 ? { onClick: x, onKeydown: C, onMousedown: b, onTouchstart: S } : {}), _ = Ie(() => [[GCe, g.value, void 0, { center: r.round }]]), w = Ie(() => ({ ref: c, class: "vc-btn vc-btn-item non-selectable no-outline " + a.value, style: o.value, ...u.value, ...y.value })); function x(I) { var A; if (I !== void 0) { if (I.defaultPrevented === !0) return; const D = document.activeElement; if (r.type === "submit" && D !== document.body && ((A = c.value) == null ? void 0 : A.contains(D)) === !1 && (D == null ? void 0 : D.contains(c.value)) === !1) { c.value.focus(); const O = () => { document.removeEventListener("keydown", pg, !0), document.removeEventListener("keyup", O, As), c.value !== null && c.value.removeEventListener("blur", O, As); }; document.addEventListener("keydown", pg, !0), document.addEventListener("keyup", O, As), c.value.addEventListener("blur", O, As); } } t("click", I, () => { }); } function C(I) { var A, L, D; eE(I, [13, 32]) === !0 && (pg(I), Ov !== c.value && (Ov !== null && T(), (A = c.value) == null || A.focus(), Ov = c.value, (L = c.value) == null || L.classList.add("vc-btn--active"), document.addEventListener("keyup", E, !0), (D = c.value) == null || D.addEventListener("blur", E, As))), t("keydown", I); } function S(I) { Mv !== c.value && (Mv !== null && T(), Mv = c.value, h = PN(I.target), h == null || h.addEventListener("touchcancel", E, As), h == null || h.addEventListener("touchend", E, As)), p = !0, clearTimeout(d), d = setTimeout(() => { p = !1; }, 200), t("touchstart", I); } function b(I) { var A; Rv !== c.value && (Rv !== null && T(), Rv = c.value, (A = c.value) == null || A.classList.add("vc-btn--active"), document.addEventListener("mouseup", E, As)), I.qSkipRipple = p === !0, t("mousedown", I); } function E(I) { var A; if (!(I !== void 0 && I.type === "blur" && document.activeElement === c.value)) { if (I !== void 0 && I.type === "keyup") { if (Ov === c.value && eE(I, [13, 32]) === !0) { const L = new MouseEvent("click", I); L.qKeyEvent = !0, I.defaultPrevented === !0 && sM(L), I.cancelBubble === !0 && iX(L), (A = c.value) == null || A.dispatchEvent(L), pg(I), I.qKeyEvent = !0; } t("keyup", I); } T(); } } function T(I) { const A = f.value; I !== !0 && (Mv === c.value || Rv === c.value) && A !== null && A !== document.activeElement && (A.setAttribute("tabindex", "-1"), A.focus()), Mv === c.value && (h !== null && (h.removeEventListener("touchcancel", E, As), h.removeEventListener("touchend", E, As)), Mv = h = null), Rv === c.value && (document.removeEventListener("mouseup", E, As), Rv = null), Ov === c.value && (document.removeEventListener("keyup", E, !0), c.value !== null && c.value.removeEventListener("blur", E, As), Ov = null), c.value !== null && c.value.classList.remove("vc-btn--active"); } function P(I) { pg(I), I.qSkipRipple = !0; } return pf(() => { T(!0); }), Object.assign(i, { click: x }), () => { let I = []; r.icon !== void 0 && I.push(H(f1, { name: r.icon, left: r.stack === !1 && v.value === !0, role: "img", "aria-hidden": "true" })), v.value === !0 && I.push(H("span", { class: "block" }, [r.label])), I = jg(e.default, I), r.iconRight !== void 0 && r.round === !1 && I.push(H(f1, { name: r.iconRight, right: r.stack === !1 && v.value === !0, role: "img", "aria-hidden": "true" })); const A = [ H("span", { class: "vc-focus-helper", ref: f }) ]; return r.loading === !0 && r.percentage !== void 0 && A.push(H("span", { class: "vc-btn__progress absolute-full overflow-hidden" }, [ H("span", { class: "vc-btn__progress-indicator fit block" + (r.darkPercentage === !0 ? " vc-btn__progress--dark" : ""), style: m.value }) ])), A.push(H("span", { class: "vc-btn__content text-center col items-center vc-anchor--skip " + s.value }, I)), r.loading !== null && A.push(H(_i, { name: "vc-transition--fade" }, () => r.loading === !0 ? [ H("span", { key: "loading", class: "absolute-full flex flex-center" }, e.loading !== void 0 ? e.loading() : [H(uX)]) ] : null)), KCe("button", w.value, A, "ripple", r.disable !== !0 && r.ripple !== !1, () => _.value); }; } }); const ISe = { target: { type: [Boolean, String], default: !0 }, noParentEvent: Boolean, contextMenu: Boolean }; function ASe({ showing: r, avoidEmit: e, configureAnchorEl: t }) { const { props: n, proxy: i, emit: a } = We(), o = te(null); let s; function u(p) { return o.value === null ? !1 : p === void 0 || p.touches === void 0 || p.touches.length <= 1; } const l = {}; t === void 0 && (Object.assign(l, { hide(p) { i.hide(p); }, toggle(p) { i.toggle(p); }, toggleKey(p) { eE(p, 13) === !0 && i.toggle(p); }, contextClick(p) { i.hide(p), oi(() => { i.show(p); }), sM(p); }, mobilePrevent: sM, mobileTouch(p) { var d; if (l.mobileCleanup(p), u(p) !== !0) return; i.hide(p), (d = o.value) == null || d.classList.add("non-selectable"); const v = PN(p.target); Pc(l, "anchor", [ [v, "touchmove", "mobileCleanup", "passive"], [v, "touchend", "mobileCleanup", "passive"], [v, "touchcancel", "mobileCleanup", "passive"], [o.value, "contextmenu", "mobilePrevent", "notPassive"] ]), s = setTimeout(() => { i.show(p); }, 300); }, mobileCleanup(p) { o.value.classList.remove("non-selectable"), clearTimeout(s), r.value === !0 && p !== void 0 && Wg(); } }), t = function(p = n.contextMenu) { if (n.noParentEvent === !0 || o.value === null) return; let d; p === !0 ? fs().isPhone === !0 ? d = [[o.value, "touchstart", "mobileTouch", "passive"]] : d = [ [o.value, "click", "hide", "passive"], [o.value, "contextmenu", "contextClick", "notPassive"] ] : d = [ [o.value, "click", "toggle", "passive"], [o.value, "keyup", "toggleKey", "passive"] ], Pc(l, "anchor", d); }); function c() { Jp(l, "anchor"); } function f(p) { for (o.value = p; o.value.classList.contains("vc-anchor--skip"); ) o.value = o.value.parentNode; t(); } function h() { if (n.target === !1 || n.target === "") o.value = null; else if (n.target === !0) f(i == null ? void 0 : i.$el.parentNode); else { let p = n.target; if (typeof n.target == "string") try { p = document.querySelector(n.target); } catch { p = void 0; } p != null ? (o.value = p.$el || p, t()) : (o.value = null, console.error(`Anchor: target "${n.target}" not found`)); } } return Ve(() => n.contextMenu, (p) => { o.value !== null && (c(), t(p)); }), Ve(() => n.target, () => { o.value !== null && c(), h(); }), Ve(() => n.noParentEvent, (p) => { o.value !== null && (p === !0 ? c() : t()); }), hf(() => { h(), e !== !0 && n.modelValue === !0 && o.value === null && a("update:modelValue", !1); }), pf(() => { clearTimeout(s), c(); }), { anchorEl: o, canShow: u, anchorEvents: l }; } function LSe(r, e) { const t = te(null); let n; function i(s, u) { const l = `${u !== void 0 ? "add" : "remove"}EventListener`, c = u !== void 0 ? u : n; s !== window && s[l]("scroll", c, Am.passive), window[l]("scroll", c, Am.passive), n = u; } function a() { t.value !== null && (i(t.value), t.value = null); } const o = Ve(() => r.noParentEvent, () => { t.value !== null && (a(), e()); }); return pf(o), { localScrollTarget: t, unconfigureScrollTarget: a, changeScrollEvent: i }; } const cX = { modelValue: { type: Boolean, default: null } }, fX = ["update:modelValue", "before-show", "show", "before-hide", "hide"]; function hX({ showing: r, canShow: e = void 0, hideOnRouteChange: t = void 0, handleShow: n = void 0, handleHide: i = void 0, processOnMount: a = void 0 }) { const o = We(), { props: s, emit: u, proxy: l } = o; let c; function f(y) { (r == null ? void 0 : r.value) === !0 ? d(y) : h(y); } function h(y) { if (s.disable === !0 || e !== void 0 && e(y) !== !0) return; const _ = dI(o, "onUpdate:modelValue") === !0; _ === !0 && (u("update:modelValue", !0), c = y, oi(() => { c === y && (c = void 0); })), (s.modelValue === null || _ === !1) && p(y); } function p(y) { (r == null ? void 0 : r.value) !== !0 && (r && (r.value = !0), u("before-show", y), !(y && y.cancel === !0) && (n !== void 0 ? n(y) : u("show", y))); } function d(y) { if (s.disable === !0) return; const _ = dI(o, "onUpdate:modelValue") === !0; _ === !0 && (u("update:modelValue", !1), c = y, oi(() => { c === y && (c = void 0); })), (s.modelValue === null || _ === !1) && v(y); } function v(y) { (r == null ? void 0 : r.value) !== !1 && (r && (r.value = !1), u("before-hide", y), i !== void 0 ? i(y) : u("hide", y)); } function g(y) { s.disable === !0 && y === !0 ? dI(o, "onUpdate:modelValue") === !0 && u("update:modelValue", !1) : y === !0 !== (r == null ? void 0 : r.value) && (y === !0 ? p : v)(c); } Ve(() => s.modelValue, g), t !== void 0 && Mxe(o) === !0 && Ve(() => l.$route, () => { t.value === !0 && (r == null ? void 0 : r.value) === !0 && d(); }), a === !0 && hf(() => { g(s.modelValue); }); const m = { show: h, hide: d, toggle: f }; return Object.assign(l, m), m; } const lM = []; let DSe = document.body; function MSe(r) { const e = document.createElement("div"); return r !== void 0 && (e.id = r), DSe.appendChild(e), lM.push(e), e; } function OSe(r) { lM.splice(lM.indexOf(r), 1), r.remove(); } const gI = []; function RSe(r) { for (r = r.parent; r != null; ) { if (r.type.name === "VcGlobalDialog") return !0; if (r.type.name === "VcDialog" || r.type.name === "VcMenu") return !1; r = r.parent; } return !1; } function pX(r, e, t, n) { var i, a, o, s; let u = null; (a = (i = r.props) == null ? void 0 : i.teleport) != null && a.to && (u = (s = (o = r.props) == null ? void 0 : o.teleport) == null ? void 0 : s.to); const l = n === !0 && RSe(r), c = te(!1); function f() { l === !1 && u === null && (u = MSe()), c.value = !0, gI.push(r.proxy); } function h() { var p, d; c.value = !1; const v = gI.indexOf(r.proxy); v > -1 && gI.splice(v, 1), u !== null && !((d = (p = r.props) == null ? void 0 : p.teleport) != null && d.to) && (OSe(u), u = null); } return xa(h), Object.assign(r.proxy, { __vcPortalInnerRef: e }), { showPortal: f, hidePortal: h, portalIsActive: c, renderPortal: () => l === !0 ? t() : c.value === !0 ? [H(gO, { to: u }, t())] : void 0 }; } const NSe = { transitionShow: { type: String, default: "fade" }, transitionHide: { type: String, default: "fade" }, transitionDuration: { type: [String, Number], default: 300 } }; function FSe(r, e) { const t = te(e.value); return Ve(e, (n) => { oi(() => { t.value = n; }); }), { transition: Ie(() => "vc-transition--" + (t.value === !0 ? r.transitionHide : r.transitionShow)), transitionStyle: Ie(() => `--vc-transition-duration: ${r.transitionDuration}ms`) }; } function BSe() { let r; return pf(() => { r = void 0; }), { registerTick(e) { r = e; }, removeTick() { r = void 0; }, prepareTick() { if (r !== void 0) { const e = r; oi(() => { r === e && (r(), r = void 0); }); } } }; } function dX() { let r; return pf(() => { clearTimeout(r); }), { registerTimeout(e, t) { clearTimeout(r), r = setTimeout(e, t); }, removeTimeout() { clearTimeout(r); } }; } const kSe = [null, document, document.body, document.scrollingElement, document.documentElement]; function VSe(r, e) { let t = RCe(e); if (t === void 0) { if (r == null) return window; t = r.closest(".scroll,.scroll-y,.overflow-auto"); } return kSe.includes(t) ? window : t; } let Mx; function GSe() { if (Mx !== void 0) return Mx; const r = document.createElement("p"), e = document.createElement("div"); aM(r, { width: "100%", height: "200px" }), aM(e, { position: "absolute", top: "0px", left: "0px", visibility: "hidden", width: "200px", height: "150px", overflow: "hidden" }), e.appendChild(r), document.body.appendChild(e); const t = r.offsetWidth; e.style.overflow = "scroll"; let n = r.offsetWidth; return t === n && (n = e.clientWidth), e.remove(), Mx = t - n, Mx; } let kV, VV; function GV(r) { const e = r.split(" "); return e.length !== 2 ? !1 : ["top", "center", "bottom"].includes(e[0]) !== !0 ? (console.error("Anchor/Self position must start with one of top/center/bottom"), !1) : ["left", "middle", "right", "start", "end"].includes(e[1]) !== !0 ? (console.error("Anchor/Self position must end with one of left/middle/right/start/end"), !1) : !0; } function zSe(r) { return r ? !(r.length !== 2 || typeof r[0] != "number" || typeof r[1] != "number") : !0; } const cM = { "start#ltr": "left", "start#rtl": "right", "end#ltr": "right", "end#rtl": "left" }; ["left", "middle", "right"].forEach((r) => { cM[`${r}#ltr`] = r, cM[`${r}#rtl`] = r; }); function zV(r, e) { const t = r.split(" "); return { vertical: t[0], horizontal: cM[`${t[1]}#${e === !0 ? "rtl" : "ltr"}`] }; } function $Se(r, e) { let { top: t, left: n, right: i, bottom: a, width: o, height: s } = r.getBoundingClientRect(); return e !== void 0 && (t -= e[1], n -= e[0], a += e[1], i += e[0], o += e[0], s += e[1]), { top: t, left: n, right: i, bottom: a, width: o, height: s, middle: n + (i - n) / 2, center: t + (a - t) / 2 }; } function HSe(r) { return { top: 0, center: r.offsetHeight / 2, bottom: r.offsetHeight, left: 0, middle: r.offsetWidth / 2, right: r.offsetWidth }; } function USe(r) { if (fs().isIOS === !0 && window.visualViewport !== void 0) { const s = document.body.style, { offsetLeft: u, offsetTop: l } = window.visualViewport; u !== kV && (s.setProperty("--vc-pe-left", u + "px"), kV = u), l !== VV && (s.setProperty("--vc-pe-top", l + "px"), VV = l); } let e = {}; const { scrollLeft: t, scrollTop: n } = r.el; if (r.absoluteOffset === void 0) e = $Se(r.anchorEl, r.cover === !0 ? [0, 0] : r.offset); else { const { top: s, left: u } = r.anchorEl.getBoundingClientRect(), l = s + r.absoluteOffset.top, c = u + r.absoluteOffset.left; e = { top: l, left: c, width: 1, height: 1, right: c + 1, center: l, middle: c, bottom: l + 1 }; } let i = { maxHeight: r.maxHeight, maxWidth: r.maxWidth, visibility: "visible" }; (r.fit === !0 || r.cover === !0) && (i.minWidth = e.width + "px", r.cover === !0 && (i.minHeight = e.height + "px")), Object.assign(r.el.style, i); const a = HSe(r.el), o = { top: e[r.anchorOrigin.vertical] - a[r.selfOrigin.vertical], left: e[r.anchorOrigin.horizontal] - a[r.selfOrigin.horizontal] }; WSe(o, e, a, r.anchorOrigin, r.selfOrigin), i = { top: o.top + "px", left: o.left + "px" }, o.maxHeight !== void 0 && (i.maxHeight = o.maxHeight + "px", e.height > o.maxHeight && (i.minHeight = i.maxHeight)), o.maxWidth !== void 0 && (i.maxWidth = o.maxWidth + "px", e.width > o.maxWidth && (i.minWidth = i.maxWidth)), Object.assign(r.el.style, i), r.el.scrollTop !== n && (r.el.scrollTop = n), r.el.scrollLeft !== t && (r.el.scrollLeft = t); } function WSe(r, e, t, n, i) { const a = t.bottom, o = t.right, s = GSe(), u = window.innerHeight - s, l = document.body.clientWidth; if (r.top < 0 || r.top + a > u) if (i.vertical === "center") r.top = e[n.vertical] > u / 2 ? Math.max(0, u - a) : 0, r.maxHeight = Math.min(a, u); else if (e[n.vertical] > u / 2) { const c = Math.min(u, n.vertical === "center" ? e.center : n.vertical === i.vertical ? e.bottom : e.top); r.maxHeight = Math.min(a, c), r.top = Math.max(0, c - a); } else r.top = Math.max(0, n.vertical === "center" ? e.center : n.vertical === i.vertical ? e.top : e.bottom), r.maxHeight = Math.min(a, u - r.top); if (r.left < 0 || r.left + o > l) if (r.maxWidth = Math.min(o, l), i.horizontal === "middle") r.left = e[n.horizontal] > l / 2 ? Math.max(0, l - o) : 0; else if (e[n.horizontal] > l / 2) { const c = Math.min(l, n.horizontal === "middle" ? e.middle : n.horizontal === i.horizontal ? e.right : e.left); r.maxWidth = Math.min(o, c), r.left = Math.max(0, c - r.maxWidth); } else r.left = Math.max(0, n.horizontal === "middle" ? e.middle : n.horizontal === i.horizontal ? e.left : e.right), r.maxWidth = Math.min(o, l - r.left); } const jSe = { ...ISe, ...cX, ...NSe, maxHeight: { type: String, default: null }, maxWidth: { type: String, default: null }, transitionShow: { type: String, default: "jump-down" }, transitionHide: { type: String, default: "jump-up" }, anchor: { type: String, default: "bottom middle", validator: GV }, self: { type: String, default: "top middle", validator: GV }, offset: { type: Array, default: () => [14, 14], validator: zSe }, scrollTarget: String, delay: { type: Number, default: 0 }, hideDelay: { type: Number, default: 0 }, persistent: { type: Boolean } }; var vX = de({ name: "VcTooltip", inheritAttrs: !1, props: jSe, emits: [...fX], setup(r, { slots: e, emit: t, attrs: n }) { let i, a; const o = We(), s = te(null), u = te(!1), l = Ie(() => zV(r.anchor, !0)), c = Ie(() => zV(r.self, !0)), f = Ie(() => r.persistent !== !0), { registerTick: h, removeTick: p, prepareTick: d } = BSe(), { registerTimeout: v, removeTimeout: g } = dX(), { transition: m, transitionStyle: y } = FSe(r, u), { localScrollTarget: _, changeScrollEvent: w, unconfigureScrollTarget: x } = LSe(r, U), { anchorEl: C, canShow: S, anchorEvents: b } = ASe({ showing: u, configureAnchorEl: G, avoidEmit: void 0 }), { show: E, hide: T } = hX({ showing: u, canShow: S, handleShow: L, handleHide: D, hideOnRouteChange: f, processOnMount: !0 }); Object.assign(b, { delayShow: F, delayHide: k }); const { showPortal: P, hidePortal: I, renderPortal: A } = pX(o, s, X); function L(j) { p(), g(), P(), h(() => { a = new MutationObserver(() => N()), a.observe(s.value, { attributes: !1, childList: !0, characterData: !0, subtree: !0 }), N(), U(); }), d(), i === void 0 && (i = Ve(() => r.self + "|" + r.anchor, N)), v(() => { t("show", j); }, r.transitionDuration); } function D(j) { p(), g(), O(), v(() => { I(), t("hide", j); }, r.transitionDuration); } function O() { a !== void 0 && (a.disconnect(), a = void 0), i !== void 0 && (i(), i = void 0), x(), Jp(b, "tooltipTemp"); } function N() { const j = s.value; C.value === void 0 || !j || USe({ el: j, offset: r.offset, anchorEl: C.value, anchorOrigin: l.value, selfOrigin: c.value, maxHeight: r.maxHeight, maxWidth: r.maxWidth }); } function F(j) { if (fs().isPhone === !0) { Wg(), document.body.classList.add("non-selectable"); const ae = PN(C.value), se = ["touchmove", "touchcancel", "touchend", "click"].map(($) => [ae, $, "__delayHide", "passiveCapture"]); Pc(b, "tooltipTemp", se); } v(() => { E(j); }, r.delay); } function k(j) { g(), fs().isPhone === !0 && (Jp(b, "tooltipTemp"), Wg(), setTimeout(() => { document.body.classList.remove("non-selectable"); }, 10)), v(() => { T(j); }, r.hideDelay); } function G() { if (r.noParentEvent === !0 || C.value === void 0) return; const j = fs().isPhone === !0 ? [[C.value, "touchstart", "delayShow", "passive"]] : [ [C.value, "mouseenter", "delayShow", "passive"], [C.value, "mouseleave", "delayHide", "passive"] ]; Pc(b, "anchor", j); } function U() { if (C.value !== void 0 || r.scrollTarget !== void 0) { _.value = VSe(C.value, r.scrollTarget); const j = r.noParentEvent === !0 ? N : T; w(_.value, j); } } function B() { return u.value === !0 ? H("div", { ...n, ref: s, class: ["vc-tooltip vc-tooltip--style vc-position-engine no-pointer-events", n.class], style: y.value, role: "complementary" }, Qi(e.default)) : null; } function X() { return H(_i, { name: m.value, appear: !0 }, B); } return pf(O), Object.assign(o == null ? void 0 : o.proxy, { updatePosition: N }), A; } }); function YSe(r, e, t) { return t <= e ? e : Math.min(t, Math.max(e, r)); } const IN = XMLHttpRequest, gX = IN.prototype.open, XSe = ["top", "right", "bottom", "left"]; let tE = [], l_ = 0; function qSe({ p: r, pos: e, active: t, horiz: n, reverse: i, dir: a }) { let o = 1, s = 1; return n === !0 ? (i === !0 && (o = -1), e === "bottom" && (s = -1), { transform: `translate3d(${o * (r - 100)}%,${t ? 0 : s * -200}%,0)` }) : (i === !0 && (s = -1), e === "right" && (o = -1), { transform: `translate3d(${t ? 0 : a * o * -200}%,${s * (r - 100)}%,0)` }); } function ZSe(r, e) { return typeof e != "number" && (r < 25 ? e = Math.random() * 3 + 3 : r < 65 ? e = Math.random() * 3 : r < 85 ? e = Math.random() * 2 : r < 99 ? e = 0.6 : e = 0), YSe(r + e, 0, 100); } function KSe(r) { l_++, tE.push(r), !(l_ > 1) && (IN.prototype.open = function(e, t) { const n = [], i = () => { tE.forEach((o) => { (o.hijackFilter.value === null || o.hijackFilter.value(t) === !0) && (o.start(), n.push(o.stop)); }); }, a = () => { n.forEach((o) => { o(); }); }; this.addEventListener("loadstart", i, { once: !0 }), this.addEventListener("loadend", a, { once: !0 }), gX.apply(this, arguments); }); } function JSe(r) { tE = tE.filter((e) => e.start !== r), l_ = Math.max(0, l_ - 1), l_ === 0 && (IN.prototype.open = gX); } const QSe = { position: { type: String, default: "top", validator: (r) => XSe.includes(r) }, size: { type: String, default: "2px" }, color: String, skipHijack: Boolean, reverse: Boolean, positioning: { type: String, default: "absolute", validator: (r) => ["absolute", "fixed"].includes(r) }, hijackFilter: Function }; var eEe = de({ name: "VcAjaxBar", props: QSe, emits: ["start", "stop"], setup(r, { emit: e }) { const { proxy: t } = We(), n = te(0), i = te(!1), a = te(!0); let o = 0, s, u; const l = Ie(() => `vc-loading-bar vc-loading-bar--${r.position}` + (r.color !== void 0 ? ` bg-${r.color}` : "") + (a.value === !0 ? "" : " no-transition")), c = Ie(() => r.position === "top" || r.position === "bottom"), f = Ie(() => c.value === !0 ? "height" : "width"), h = Ie(() => { const _ = i.value, w = qSe({ p: n.value, pos: r.position, active: _, horiz: c.value, reverse: r.reverse, dir: 1 }); return w[f.value] = r.size, w.opacity = _ ? 1 : 0, w.position = r.positioning === "absolute" ? "absolute" : "fixed", w.backgroundColor = r.color, w; }), p = Ie(() => i.value === !0 ? { role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": n.value } : { "aria-hidden": "true" }); function d(_ = 300) { const w = u; return u = Math.max(0, _) || 0, o++, o > 1 ? (w === 0 && _ > 0 ? m() : w > 0 && _ <= 0 && clearTimeout(s), o) : (clearTimeout(s), e("start"), n.value = 0, s = setTimeout(() => { a.value = !0, _ > 0 && m(); }, i.value === !0 ? 500 : 1), i.value !== !0 && (i.value = !0, a.value = !1), o); } function v(_) { return o > 0 && (n.value = ZSe(n.value, _)), o; } function g() { if (o = Math.max(0, o - 1), o > 0) return o; clearTimeout(s), e("stop"); const _ = () => { a.value = !0, n.value = 100, s = setTimeout(() => { i.value = !1; }, 1e3); }; n.value === 0 ? s = setTimeout(_, 1) : _(); } function m() { n.value < 100 && (s = setTimeout(() => { v(), m(); }, u)); } let y; return hf(() => { r.skipHijack !== !0 && (y = !0, KSe({ start: d, stop: g, hijackFilter: Ie(() => r.hijackFilter || null) })); }), pf(() => { clearTimeout(s), y === !0 && JSe(d); }), Object.assign(t, { start: d, stop: g, increment: v }), () => H("div", { class: l.value, style: h.value, ...p.value }); } }); const tEe = { dark: { type: Boolean, default: null } }; function rEe(r) { return Ie(() => r.dark); } const nEe = [ "text", "rect", "circle", "VcBtn", "VcBadge", "VcChip", "VcToolbar", "VcCheckbox", "VcRadio", "VcToggle", "VcSlider", "VcRange", "VcInput", "VcAvatar" ], iEe = ["wave", "pulse", "pulse-x", "pulse-y", "fade", "blink", "none"], aEe = { ...tEe, tag: { type: String, default: "div" }, type: { type: String, validator: (r) => nEe.includes(r), default: "rect" }, animation: { type: String, validator: (r) => iEe.includes(r), default: "wave" }, square: Boolean, bordered: Boolean, size: String, width: String, height: String }; var oEe = de({ name: "VcSkeleton", props: aEe, setup(r, { slots: e }) { const t = rEe(r), n = Ie(() => r.size !== void 0 ? { width: r.size, height: r.size } : { width: r.width, height: r.height }), i = Ie(() => `vc-skeleton vc-skeleton--${t.value === !0 ? "dark" : "light"} vc-skeleton--type-${r.type}` + (r.animation !== "none" ? ` vc-skeleton--anim vc-skeleton--anim-${r.animation}` : "") + (r.square === !0 ? " vc-skeleton--square" : "") + (r.bordered === !0 ? " vc-skeleton--bordered" : "")); return () => H(r.tag, { class: i.value, style: n.value }, Qi(e.default)); } }); const sEe = ["top", "right", "bottom", "left"], mX = { type: { type: String, default: "a" }, outline: Boolean, push: Boolean, flat: Boolean, unelevated: Boolean, color: String, textColor: String, glossy: Boolean, square: Boolean, padding: String, size: String, label: { type: [String, Number], default: "" }, labelPosition: { type: String, default: "right", validator: (r) => sEe.includes(r) }, externalLabel: Boolean, hideLabel: { type: Boolean }, labelClass: [Array, String, Object], labelStyle: [Array, String, Object], disable: Boolean, tabindex: [Number, String] }; function yX(r, e) { return { formClass: Ie(() => `vc-fab--form-${r.square === !0 ? "square" : "rounded"}`), stacked: Ie(() => r.externalLabel === !1 && ["top", "bottom"].includes(r.labelPosition)), labelProps: Ie(() => { if (r.externalLabel === !0) { const t = r.hideLabel === null ? e.value === !1 : r.hideLabel; return { action: "push", data: { class: [ r.labelClass, `vc-fab__label vc-tooltip--style vc-fab__label--external vc-fab__label--external-${r.labelPosition}` + (t === !0 ? " vc-fab__label--external-hidden" : "") ], style: r.labelStyle } }; } return { action: ["left", "top"].includes(r.labelPosition) ? "unshift" : "push", data: { class: [ r.labelClass, `vc-fab__label vc-fab__label--internal vc-fab__label--internal-${r.labelPosition}` + (r.hideLabel === !0 ? " vc-fab__label--internal-hidden" : "") ], style: r.labelStyle } }; }) }; } const uEe = ["up", "right", "down", "left"], lEe = ["left", "center", "right"], cEe = { ...mX, ...cX, icon: String, activeIcon: String, hideActionOnClick: { type: Boolean, default: !0 }, hideIcon: Boolean, hideLabel: { type: Boolean, default: !0 }, direction: { type: String, default: "right", validator: (r) => uEe.includes(r) }, persistent: Boolean, stacked: Boolean, verticalActionsAlign: { type: String, default: "center", validator: (r) => lEe.includes(r) } }, fEe = cEe; var _X = de({ name: "VcFab", props: fEe, emits: fX, setup(r, { slots: e }) { const t = te(null), n = te(r.modelValue === !0), { formClass: i, labelProps: a } = yX(r, n), o = Ie(() => r.persistent !== !0), { hide: s, toggle: u } = hX({ showing: n, hideOnRouteChange: o }), l = Ie(() => ({ opened: n.value })), c = Ie(() => `vc-fab z-fab row inline justify-center vc-fab--align-${r.verticalActionsAlign} ${i.value}` + (n.value === !0 ? " vc-fab--opened" : " vc-fab--closed")), f = Ie(() => `vc-fab__actions flex no-wrap inline vc-fab__actions--${r.direction} vc-fab__actions--${n.value === !0 ? "opened" : "closed"}`), h = Ie(() => `vc-fab__icon-holder vc-fab__icon-holder--${n.value === !0 ? "opened" : "closed"}`); function p(v, g) { const m = e[v], y = `q-fab__${v} absolute-full`; return m === void 0 ? H(f1, { class: y, name: r[v] }) : H("div", { class: y }, m(l.value)); } function d() { const v = []; return r.hideIcon !== !0 && v.push(H("div", { class: h.value }, [p("icon"), p("active-icon")])), (r.label !== "" || e.label !== void 0) && v[a.value.action](H("div", a.value.data, e.label !== void 0 ? e.label(l.value) : [r.label])), jg(e.tooltip, v); } return $h(pY, { showing: n, onChildClick(v) { r.hideActionOnClick && s(v), t.value !== null && t.value.$el.focus(); } }), () => H("div", { class: c.value }, [ H(PT, { ref: t, class: i.value, ...r, noWrap: !0, stack: r.stacked, align: void 0, icon: void 0, label: void 0, noCaps: !0, fab: !0, flat: r.flat, size: r.size, "aria-expanded": n.value === !0 ? "true" : "false", "aria-haspopup": "true", onClick: u }, d), H("div", { class: f.value }, Qi(e.default)) ]); } }); const wX = { start: "self-end", center: "self-center", end: "self-start" }, hEe = Object.keys(wX), pEe = { ...mX, icon: { type: String, default: "" }, stacked: Boolean, anchor: { type: String, validator: (r) => hEe.includes(r) }, to: [String, Object], replace: Boolean }, dEe = pEe; var xX = de({ name: "VcFabAction", props: dEe, emits: ["click"], setup(r, { slots: e, emit: t }) { const n = Wu(pY), { formClass: i, labelProps: a } = yX(r, n == null ? void 0 : n.showing), o = Ie(() => { let f; return r.anchor && (f = wX[r.anchor]), i.value + (f !== void 0 ? ` ${f}` : ""); }), s = Ie(() => { var f; return r.disable === !0 || ((f = n == null ? void 0 : n.showing) == null ? void 0 : f.value) !== !0; }); function u(f) { var h; (h = n == null ? void 0 : n.onChildClick) == null || h.call(n, f), t("click", f); } function l() { const f = []; return r.icon !== "" && f.push(H(f1, { name: r.icon })), r.label !== "" && f[a.value.action](H("div", a.value.data, [r.label])), jg(e.default, f); } const c = We(); return Object.assign(c == null ? void 0 : c.proxy, { click: u }), () => H(PT, { class: o.value, ...r, noWrap: !0, stack: r.stacked, icon: void 0, label: void 0, noCaps: !0, fabMini: !0, disable: s.value, size: r.size, onClick: u }, l); } }); const vEe = [ PT, f1, eSe, rSe, iSe, oSe, uSe, cSe, hSe, dSe, gSe, ySe, wSe, uX, vX, eEe, oEe, _X, xX ]; vEe.forEach((r) => { r.install = (e) => { e.component(r.name, r); }; }); const c_ = PT, f_ = vX, gEe = _X, $V = xX, Pt = { beforeLoad: (r) => !0, ready: (r) => r.viewer instanceof Cesium.Viewer, destroyed: (r) => !0 }, IT = { mousedown: (r) => !0, mouseup: (r) => !0, click: (r) => !0, clickout: (r) => !0, dblclick: (r) => !0, mousemove: (r) => !0, mouseover: (r) => !0, mouseout: (r) => !0 }; ({ ...Pt }); ({ ...Pt }); const hv = { ...Pt, ...IT, readyPromise: (r, e, t) => !0, "update:geometryInstances": (r) => !0 }, fl = { ...Pt, ...IT }; ({ ...Pt, ...IT }); const AN = { ...Pt, activeEvt: (r, e) => !0, drawEvt: (r, e) => !0, editorEvt: (r, e) => !0, mouseEvt: (r, e) => !0 }; function mEe(r, e) { const t = Ie(() => { const l = r.position; return { top: l.indexOf("top") > -1, right: l.indexOf("right") > -1, bottom: l.indexOf("bottom") > -1, left: l.indexOf("left") > -1, vertical: l === "top" || l === "bottom", horizontal: l === "left" || l === "right" }; }), n = te(0), i = te(0), a = te(0), o = te(0), s = Ie(() => { let l = 0, c = 0; const f = t.value, h = 1; f.top === !0 && n.value !== 0 ? c = `${n.value}px` : f.bottom === !0 && o.value !== 0 && (c = `${-o.value}px`), f.left === !0 && a.value !== 0 ? l = `${h * a.value}px` : f.right === !0 && i.value !== 0 && (l = `${-h * i.value}px`); const p = { transform: `translate(${l}, ${c})` }; return r.offset && (p.margin = `${r.offset[1]}px ${r.offset[0]}px`), f.vertical === !0 ? (a.value !== 0 && (p.right = `${a.value}px`), i.value !== 0 && (p.left = `${i.value}px`)) : f.horizontal === !0 && (n.value !== 0 && (p.top = `${n.value}px`), o.value !== 0 && (p.bottom = `${o.value}px`)), p; }), u = Ie(() => `absolute absolute-${r.position}`); return { attach: t, style: s, classes: u }; } const vy = { externalLabel: !1, label: "", labelPosition: "right", hideLabel: !1, tabindex: void 0, disable: !1, outline: !1, push: !1, flat: !1, unelevated: !1, color: "primary", textColor: void 0, glossy: !1, labelClass: void 0, labelStyle: void 0, square: !1, tooltip: { delay: 500, anchor: "bottom middle", offset: [0, 20], tip: void 0 } }, Iw = { show: !0, enableMouseEvent: !0, asynchronous: !1, classificationType: 2, appearance: { type: "PolylineMaterialAppearance", options: { material: { fabric: { type: "Color", uniforms: { color: "#51ff00" } } } } }, depthFailAppearance: { type: "PolylineMaterialAppearance", options: { material: { fabric: { type: "PolylineDash", uniforms: { color: [255, 0, 0, 127] } } } } } }, gy = { show: !0, color: "rgb(255,229,0)", pixelSize: 8, outlineColor: "black", outlineWidth: 1, disableDepthTestDistance: Number.POSITIVE_INFINITY }, Aw = { width: 2, arcType: 0, ellipsoid: void 0 }, yEe = { show: !0, enableMouseEvent: !0, asynchronous: !1, classificationType: 2, appearance: { type: "MaterialAppearance", options: { material: { fabric: { type: "Color", uniforms: { color: [255, 165, 0, 125] } } }, faceForward: !0, renderState: { cull: { enabled: !1 }, depthTest: { enabled: !1 } } } } }, Bd = { show: !0, font: "16px Arial Microsoft YaHei sans-serif", scale: 1, fillColor: "white", showBackground: !0, backgroundColor: { x: 0.165, y: 0.165, z: 0.165, w: 0.8 }, backgroundPadding: [7, 5], horizontalOrigin: 0, verticalOrigin: 1, pixelOffset: [0, -9], disableDepthTestDistance: Number.POSITIVE_INFINITY }, Xa = { icon: "vc-icons-move", size: "24px", color: "#1296db", background: "#fff", round: !0, flat: !1, label: void 0, stack: !1, dense: !0, tooltip: { delay: 1e3, anchor: "bottom middle", offset: [0, 20] } }; Object.assign({}, Xa), Object.assign({}, Xa, { icon: "vc-icons-remove" }), Object.assign({}, Bd, { horizontalOrigin: 1, verticalOrigin: 0, pixelOffset: [10, 0] }); const _Ee = { show: !0, showComponentLines: !1, drawtip: { show: !0, pixelOffset: [32, 32] }, pointOpts: gy, polylineOpts: Aw, primitiveOpts: Iw, editorOpts: { pixelOffset: [16, -8], delay: 1e3, hideDelay: 1e3, move: Object.assign({}, Xa), removeAll: Object.assign({}, Xa, { icon: "vc-icons-delete" }) }, disableDepthTest: !1 }; Object.assign({}, Xa), Object.assign({}, Xa, { icon: "vc-icons-insert" }), Object.assign({}, Xa, { icon: "vc-icons-remove" }), Object.assign({}, Xa, { icon: "vc-icons-delete" }), Object.assign({}, Bd, { scale: 0.8, horizontalOrigin: 1, verticalOrigin: -1, pixelOffset: [5, 5] }); const CX = { show: !0, drawtip: { show: !0, pixelOffset: [32, 32] }, pointOpts: gy, polylineOpts: Aw, primitiveOpts: Object.assign({}, Iw, { depthFailAppearance: { type: "PolylineMaterialAppearance", options: { material: { fabric: { type: "Color", uniforms: { color: "#51ff00" } } } } } }), polygonOpts: yEe, editorOpts: { pixelOffset: [16, -8], delay: 1e3, hideDelay: 1e3, move: Object.assign({}, Xa), insert: Object.assign({}, Xa, { icon: "vc-icons-insert" }), remove: Object.assign({}, Xa, { icon: "vc-icons-remove" }), removeAll: Object.assign({}, Xa, { icon: "vc-icons-delete" }) }, loop: !0, disableDepthTest: !0, showDistanceLabel: !1, showLabel: !1, showAngleLabel: !1, labelOpts: Bd, labelsOpts: Object.assign({}, Bd, { scale: 0.8, horizontalOrigin: 1, verticalOrigin: -1, pixelOffset: [5, 5] }) }, SX = Object.assign({}, CX, { pointOpts: Object.assign({}, gy, { show: !1 }), editorOpts: { pixelOffset: [16, -8], delay: 1e3, hideDelay: 1e3, move: Object.assign({}, Xa), removeAll: Object.assign({}, Xa, { icon: "vc-icons-delete" }) }, edge: 4, loop: !1, disableDepthTest: !1, showLabel: !1, showAngleLabel: !1, showDistanceLabel: !1, labelOpts: Bd, labelsOpts: Object.assign({}, Bd, { scale: 0.8, horizontalOrigin: 1, verticalOrigin: -1, pixelOffset: [5, 5], text: "1dsa" }) }); Object.assign({}, SX, { edge: 360 }); Object.assign({}, SX, { edge: 6, loop: !0 }); const wEe = Object.assign({}, vy, { icon: "vc-icons-clear", color: "red" }); Object.assign({}, vy, { icon: "vc-icons-drawing-regular" }); Object.assign({}, vy, { icon: "vc-icons-drawing-circle" }); const EX = { ...Vi, show: Boolean, editable: Boolean, drawtip: Object, pointOpts: Object, editorOpts: Object, mode: Number, preRenderDatas: Array, disableDepthTest: Boolean }, xEe = { ...Tn, position: { type: String, default: "bottom-left", validator: (r) => ["top-right", "top-left", "bottom-right", "bottom-left", "top", "right", "bottom", "left"].includes(r) }, offset: { type: Array, validator: (r) => r.length === 2 }, mode: { type: Number, default: 1 }, activeColor: { type: String, default: "positive" }, editable: { type: Boolean }, clampToGround: { type: Boolean }, clearActionOpts: { type: Object, default: () => wEe } }, CEe = { ...av, ...yT, ...Tn, autoHidden: { type: Boolean, default: !0 }, customClass: String, teleport: Object }, SEe = { ...Pt, mouseenter: (r) => !0, mouseleave: (r) => !0, click: (r) => !0 }; var bX = de({ name: "VcOverlayHtml", props: CEe, emits: SEe, setup(r, e) { const t = We(); t.cesiumClass = "VcOverlayHtml", t.cesiumEvents = []; const n = Fa(r, e, t); if (n === void 0) return; const { $services: i } = n, a = te(!1), o = te(null), s = _n({}), u = te(null), l = te(null), c = te(null); let f = []; f.push(Ve(() => r.position, (x) => { l.value = ei(x, i.viewer.scene.globe.ellipsoid); })), f.push(Ve(() => r.pixelOffset, (x) => { u.value = bi(x); })), f.push(Ve(() => r.show, (x) => { s.display = x ? "block" : "none"; })), t.createCesiumObject = async () => JS(o), t.mount = async () => { const { viewer: x } = i; return a.value = !0, y(), u.value = bi(r.pixelOffset), l.value = ei(r.position, x.scene.globe.ellipsoid), x.scene.preRender.addEventListener(h), !0; }, t.unmount = async () => { const { viewer: x } = i; return x.scene.preRender.removeEventListener(h), a.value = !1, _(), !0; }; const h = () => { const { viewer: x } = i; if (l.value) { const C = x.scene.cartesianToCanvasCoordinates(l.value, {}); if (Cesium.defined(C) && !Cesium.Cartesian2.equals(c.value, C)) if (s.left = C.x + u.value.x + "px", s.top = C.y + u.value.y + "px", r.autoHidden) { const S = x.camera.position, b = x.scene.globe.ellipsoid.cartesianToCartographic(S); if (Cesium.defined(b)) { let E = b.height; E += 1 * x.scene.globe.ellipsoid.maximumRadius, Cesium.Cartesian3.distance(S, l.value) > E || !r.show ? s.display = "none" : s.display = "block"; } } else s.display = "block"; c.value = C; } }; xa(() => { f.forEach((x) => x()), f = []; }); const p = () => a.value ? H("div", { ref: o, class: `vc-html-container${r.customClass ? " " + r.customClass : ""}`, style: s, onMouseenter: v, onMouseleave: g, onClick: d }, Qi(e.slots.default)) : xe("v-if"), d = (x) => { e.emit("click", x); }, v = (x) => { e.emit("mouseenter", x); }, g = (x) => { e.emit("mouseleave", x); }, m = () => p(), { showPortal: y, hidePortal: _, renderPortal: w } = pX(t, o, m); return r.teleport && r.teleport.to && !r.teleport.disabled ? w : () => p(); } }), TX = { exports: {} }; (function(r) { (function(e, t, n) { r.exports ? r.exports = n() : t[e] = n(); })("h337", Db, function() { var e = { defaultRadius: 40, defaultRenderer: "canvas2d", defaultGradient: { 0.25: "rgb(0,0,255)", 0.55: "rgb(0,255,0)", 0.85: "yellow", 1: "rgb(255,0,0)" }, defaultMaxOpacity: 1, defaultMinOpacity: 0, defaultBlur: 0.85, defaultXField: "x", defaultYField: "y", defaultValueField: "value", plugins: {} }, t = function() { var l = function(h) { this._coordinator = {}, this._data = [], this._radi = [], this._min = 10, this._max = 1, this._xField = h.xField || h.defaultXField, this._yField = h.yField || h.defaultYField, this._valueField = h.valueField || h.defaultValueField, h.radius && (this._cfgRadius = h.radius); }, c = e.defaultRadius; return l.prototype = { _organiseData: function(f, h) { var p = f[this._xField], d = f[this._yField], v = this._radi, g = this._data, m = this._max, y = this._min, _ = f[this._valueField] || 1, w = f.radius || this._cfgRadius || c; g[p] || (g[p] = [], v[p] = []), g[p][d] ? g[p][d] += _ : (g[p][d] = _, v[p][d] = w); var x = g[p][d]; return x > m ? (h ? this.setDataMax(x) : this._max = x, !1) : x < y ? (h ? this.setDataMin(x) : this._min = x, !1) : { x: p, y: d, value: _, radius: w, min: y, max: m }; }, _unOrganizeData: function() { var f = [], h = this._data, p = this._radi; for (var d in h) for (var v in h[d]) f.push({ x: d, y: v, radius: p[d][v], value: h[d][v] }); return { min: this._min, max: this._max, data: f }; }, _onExtremaChange: function() { this._coordinator.emit("extremachange", { min: this._min, max: this._max }); }, addData: function() { if (arguments[0].length > 0) for (var f = arguments[0], h = f.length; h--; ) this.addData.call(this, f[h]); else { var p = this._organiseData(arguments[0], !0); p && (this._data.length === 0 && (this._min = this._max = p.value), this._coordinator.emit("renderpartial", { min: this._min, max: this._max, data: [p] })); } return this; }, setData: function(f) { var h = f.data, p = h.length; this._data = [], this._radi = []; for (var d = 0; d < p; d++) this._organiseData(h[d], !1); return this._max = f.max, this._min = f.min || 0, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this; }, removeData: function() { }, setDataMax: function(f) { return this._max = f, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this; }, setDataMin: function(f) { return this._min = f, this._onExtremaChange(), this._coordinator.emit("renderall", this._getInternalData()), this; }, setCoordinator: function(f) { this._coordinator = f; }, _getInternalData: function() { return { max: this._max, min: this._min, data: this._data, radi: this._radi }; }, getData: function() { return this._unOrganizeData(); } }, l; }(), n = function() { var l = function(p) { var d = p.gradient || p.defaultGradient, v = document.createElement("canvas"), g = v.getContext("2d"); v.width = 256, v.height = 1; var m = g.createLinearGradient(0, 0, 256, 1); for (var y in d) m.addColorStop(y, d[y]); return g.fillStyle = m, g.fillRect(0, 0, 256, 1), g.getImageData(0, 0, 256, 1).data; }, c = function(p, d) { var v = document.createElement("canvas"), g = v.getContext("2d"), m = p, y = p; if (v.width = v.height = p * 2, d == 1) g.beginPath(), g.arc(m, y, p, 0, 2 * Math.PI, !1), g.fillStyle = "rgba(0,0,0,1)", g.fill(); else { var _ = g.createRadialGradient(m, y, p * d, m, y, p); _.addColorStop(0, "rgba(0,0,0,1)"), _.addColorStop(1, "rgba(0,0,0,0)"), g.fillStyle = _, g.fillRect(0, 0, 2 * p, 2 * p); } return v; }, f = function(y) { for (var d = [], v = y.min, g = y.max, m = y.radi, y = y.data, _ = Object.keys(y), w = _.length; w--; ) for (var x = _[w], C = Object.keys(y[x]), S = C.length; S--; ) { var b = C[S], E = y[x][b], T = m[x][b]; d.push({ x, y: b, value: E, radius: T }); } return { min: v, max: g, data: d }; }; function h(p) { var d = p.container, v = this.shadowCanvas = document.createElement("canvas"), g = this.canvas = p.canvas || document.createElement("canvas"); this._renderBoundaries = [1e4, 1e4, 0, 0]; var m = getComputedStyle(p.container) || {}; g.className = "heatmap-canvas", this._width = g.width = v.width = p.width || +m.width.replace(/px/, ""), this._height = g.height = v.height = p.height || +m.height.replace(/px/, ""), this.shadowCtx = v.getContext("2d"), this.ctx = g.getContext("2d"), g.style.cssText = v.style.cssText = "position:absolute;left:0;top:0;", d.style.position = "relative", d.appendChild(g), this._palette = l(p), this._templates = {}, this._setStyles(p); } return h.prototype = { renderPartial: function(p) { p.data.length > 0 && (this._drawAlpha(p), this._colorize()); }, renderAll: function(p) { this._clear(), p.data.length > 0 && (this._drawAlpha(f(p)), this._colorize()); }, _updateGradient: function(p) { this._palette = l(p); }, updateConfig: function(p) { p.gradient && this._updateGradient(p), this._setStyles(p); }, setDimensions: function(p, d) { this._width = p, this._height = d, this.canvas.width = this.shadowCanvas.width = p, this.canvas.height = this.shadowCanvas.height = d; }, _clear: function() { this.shadowCtx.clearRect(0, 0, this._width, this._height), this.ctx.clearRect(0, 0, this._width, this._height); }, _setStyles: function(p) { this._blur = p.blur == 0 ? 0 : p.blur || p.defaultBlur, p.backgroundColor && (this.canvas.style.backgroundColor = p.backgroundColor), this._width = this.canvas.width = this.shadowCanvas.width = p.width || this._width, this._height = this.canvas.height = this.shadowCanvas.height = p.height || this._height, this._opacity = (p.opacity || 0) * 255, this._maxOpacity = (p.maxOpacity || p.defaultMaxOpacity) * 255, this._minOpacity = (p.minOpacity || p.defaultMinOpacity) * 255, this._useGradientOpacity = !!p.useGradientOpacity; }, _drawAlpha: function(g) { for (var d = this._min = g.min, v = this._max = g.max, g = g.data || [], m = g.length, y = 1 - this._blur; m--; ) { var _ = g[m], w = _.x, x = _.y, C = _.radius, S = Math.min(_.value, v), b = w - C, E = x - C, T = this.shadowCtx, P; this._templates[C] ? P = this._templates[C] : this._templates[C] = P = c(C, y); var I = (S - d) / (v - d); T.globalAlpha = I < 0.01 ? 0.01 : I, T.drawImage(P, b, E), b < this._renderBoundaries[0] && (this._renderBoundaries[0] = b), E < this._renderBoundaries[1] && (this._renderBoundaries[1] = E), b + 2 * C > this._renderBoundaries[2] && (this._renderBoundaries[2] = b + 2 * C), E + 2 * C > this._renderBoundaries[3] && (this._renderBoundaries[3] = E + 2 * C); } }, _colorize: function() { var p = this._renderBoundaries[0], d = this._renderBoundaries[1], v = this._renderBoundaries[2] - p, g = this._renderBoundaries[3] - d, m = this._width, y = this._height, _ = this._opacity, w = this._maxOpacity, x = this._minOpacity, C = this._useGradientOpacity; p < 0 && (p = 0), d < 0 && (d = 0), p + v > m && (v = m - p), d + g > y && (g = y - d); for (var S = this.shadowCtx.getImageData(p, d, v, g), b = S.data, E = b.length, T = this._palette, P = 3; P < E; P += 4) { var I = b[P], A = I * 4; if (!!A) { var L; _ > 0 ? L = _ : I < w ? I < x ? L = x : L = I : L = w, b[P - 3] = T[A], b[P - 2] = T[A + 1], b[P - 1] = T[A + 2], b[P] = C ? T[A + 3] : L; } } this.ctx.putImageData(S, p, d), this._renderBoundaries = [1e3, 1e3, 0, 0]; }, getValueAt: function(p) { var d, v = this.shadowCtx, g = v.getImageData(p.x, p.y, 1, 1), m = g.data[3], y = this._max, _ = this._min; return d = Math.abs(y - _) * (m / 255) >> 0, d; }, getDataURL: function() { return this.canvas.toDataURL(); } }, h; }(), i = function() { var l = !1; return e.defaultRenderer === "canvas2d" && (l = n), l; }(), a = { merge: function() { for (var u = {}, l = arguments.length, c = 0; c < l; c++) { var f = arguments[c]; for (var h in f) u[h] = f[h]; } return u; } }, o = function() { var l = function() { function p() { this.cStore = {}; } return p.prototype = { on: function(d, v, g) { var m = this.cStore; m[d] || (m[d] = []), m[d].push(function(y) { return v.call(g, y); }); }, emit: function(d, v) { var g = this.cStore; if (g[d]) for (var m = g[d].length, y = 0; y < m; y++) { var _ = g[d][y]; _(v); } } }, p; }(), c = function(h) { var p = h._renderer, d = h._coordinator, v = h._store; d.on("renderpartial", p.renderPartial, p), d.on("renderall", p.renderAll, p), d.on("extremachange", function(g) { h._config.onExtremaChange && h._config.onExtremaChange({ min: g.min, max: g.max, gradient: h._config.gradient || h._config.defaultGradient }); }), v.setCoordinator(d); }; function f() { var h = this._config = a.merge(e, arguments[0] || {}); if (this._coordinator = new l(), h.plugin) { var p = h.plugin; if (e.plugins[p]) { var d = e.plugins[p]; this._renderer = new d.renderer(h), this._store = new d.store(h); } else throw new Error("Plugin '" + p + "' not found. Maybe it was not registered."); } else this._renderer = new i(h), this._store = new t(h); c(this); } return f.prototype = { addData: function() { return this._store.addData.apply(this._store, arguments), this; }, removeData: function() { return this._store.removeData && this._store.removeData.apply(this._store, arguments), this; }, setData: function() { return this._store.setData.apply(this._store, arguments), this; }, setDataMax: function() { return this._store.setDataMax.apply(this._store, arguments), this; }, setDataMin: function() { return this._store.setDataMin.apply(this._store, arguments), this; }, configure: function(h) { return this._config = a.merge(this._config, h), this._renderer.updateConfig(this._config), this._coordinator.emit("renderall", this._store._getInternalData()), this; }, repaint: function() { return this._coordinator.emit("renderall", this._store._getInternalData()), this; }, getData: function() { return this._store.getData(); }, getDataURL: function() { return this._renderer.getDataURL(); }, getValueAt: function(h) { return this._store.getValueAt ? this._store.getValueAt(h) : this._renderer.getValueAt ? this._renderer.getValueAt(h) : null; } }, f; }(), s = { create: function(u) { return new o(u); }, register: function(u, l) { e.plugins[u] = l; } }; return s; }); })(TX); const EEe = TX.exports, bEe = { id: String, name: String, availability: Object, ...Tn, description: [String, Object], ...av, orientation: Object, ...SY, parent: Object, billboard: Object, box: Object, corridor: Object, cylinder: Object, ellipse: Object, ellipsoid: Object, label: Object, model: Object, tileset: Object, path: Object, plane: Object, point: Object, polygon: Object, polyline: Object, properties: Object, polylineVolume: Object, rectangle: Object, wall: Object, ...Vi }, TEe = { ...Pt, ...IT, definitionChanged: (r) => !0, "update:billboard": (r) => !0, "update:box": (r) => !0, "update:corridor": (r) => !0, "update:cylinder": (r) => !0, "update:ellipse": (r) => !0, "update:ellipsoid": (r) => !0, "update:label": (r) => !0, "update:model": (r) => !0, "update:path": (r) => !0, "update:plane": (r) => !0, "update:point": (r) => !0, "update:polygon": (r) => !0, "update:polyline": (r) => !0, "update:polylineVolume": (r) => !0, "update:rectangle": (r) => !0, "update:tileset": (r) => !0, "update:wall": (r) => !0 }; var eS = de({ name: "VcEntity", props: bEe, emits: TEe, setup(r, e) { const t = We(); t.cesiumClass = "Entity", t.cesiumEvents = ["definitionChanged"]; const n = Fa(r, e, t); if (n === void 0) return; const { $services: i } = n, { emit: a } = e; t.mount = async () => { var s; const u = (s = i == null ? void 0 : i.entities) == null ? void 0 : s.add(t.cesiumObject); return i == null ? void 0 : i.entities.contains(u); }, t.unmount = async () => { var s; return (s = i == null ? void 0 : i.entities) == null ? void 0 : s.remove(t.cesiumObject); }; const o = (s, u) => (xi(t, u) ? a(u, s) : t.cesiumObject && (t.cesiumObject[u.substring(7)] = s), s && (s._vcParent = t.cesiumObject), !0); return Object.assign(t.proxy, { __updateGraphics: o }), () => { var s, u; return e.slots.default ? H("i", { class: je(((s = t.proxy) == null ? void 0 : s.$options.name) || ""), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(((u = t.proxy) == null ? void 0 : u.$options.name) || "")); }; } }); eS.install = (r) => { r.component(eS.name, eS); }; const PEe = eS; var IEe = { imageryProvider: Object, ...ww, alpha: { type: [Number, Function], default: 1 }, nightAlpha: { type: [Number, Function], default: 1 }, dayAlpha: { type: [Number, Function], default: 1 }, brightness: { type: [Number, Function], default: 1 }, contrast: { type: [Number, Function], default: 1 }, hue: { type: [Number, Function], default: 0 }, saturation: { type: [Number, Function], default: 1 }, gamma: { type: [Number, Function], default: 1 }, splitDirection: { type: [Number, Function], default: 0 }, minificationFilter: Number, magnificationFilter: Number, ...Tn, maximumAnisotropy: Number, minimumTerrainLevel: Number, maximumTerrainLevel: Number, ...YY, ...XY, colorToAlphaThreshold: { type: Number, default: 4e-3 }, sortOrder: Number }; const AEe = { ...Pt, "update:imageryProvider": (r) => !0 }, LEe = IEe; var tS = de({ name: "VcLayerImagery", props: LEe, emits: AEe, setup(r, e) { const t = We(); t.cesiumClass = "ImageryLayer", t.cesiumEvents = []; const n = Fa(r, e, t); if (n === void 0) return; const { $services: i } = n, { emit: a } = e; t.createCesiumObject = async () => { const s = n.transformProps(r), u = r.imageryProvider || {}; return new Cesium.ImageryLayer(u, s); }, t.mount = async () => { const { viewer: s } = i, u = t.cesiumObject; return u.sortOrder = r.sortOrder, s.imageryLayers.add(u), !s.isDestroyed() && s.imageryLayers.contains(u); }, t.unmount = async () => { const { viewer: s } = i, u = t.cesiumObject; return !s.isDestroyed() && s.imageryLayers.remove(u); }; const o = (s) => { var u; if (Qo(s)) return (u = t.unmount) == null ? void 0 : u.call(t); { const l = t.cesiumObject; l._imageryProvider = s, xi(t, "update:imageryProvider") && a("update:imageryProvider", s); } return !0; }; return Object.assign(t.proxy, { __updateProvider: o }), () => { var s, u; return e.slots.default ? H("i", { class: je(((s = t.proxy) == null ? void 0 : s.$options.name) || ""), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(((u = t.proxy) == null ? void 0 : u.$options.name) || "v-if")); }; } }); tS.install = (r) => { r.component(tS.name, tS); }; const DEe = tS, MEe = { ...Sw, ...fy, ...Tn, ...bT, ...Cw, ...Ew, ...xw, ...uv, ...lv, ...ly, ...cl, ...ET, ...Vi }; var PX = de({ name: "VcPrimitiveClassification", props: MEe, emits: hv, setup(r, e) { var t; const n = We(); n.cesiumClass = "ClassificationPrimitive", fv(r, e, n); const i = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => e.slots.default ? H("i", { class: je(i), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(i)); } }); const OEe = { ...Sw, ...fy, ...Tn, ...bT, ...Cw, ...Ew, ...xw, ...uv, ...lv, ...ly, ...cl, ...ET, ...Vi }; var IX = de({ name: "VcPrimitiveGround", props: OEe, emits: hv, setup(r, e) { var t; const n = We(); n.cesiumClass = "GroundPrimitive", fv(r, e, n); const i = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => e.slots.default ? H("i", { class: je(i), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(i)); } }); const REe = { ...Sw, ...fy, ...Tn, ...Cw, ...Ew, ...xw, ...uv, ...lv, ...ly, ...cl, ...ET, ...Vi }; var AX = de({ name: "VcPrimitiveGroundPolyline", props: REe, emits: hv, setup(r, e) { var t; const n = We(); n.cesiumClass = "GroundPolylinePrimitive", fv(r, e, n); const i = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => e.slots.default ? H("i", { class: je(i), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(i)); } }); const NEe = { ...qY, basePath: String, ...Tn, ...uc, ..._T, ...OY, ...RY, ...Yh, ...uv, ...NY, ...lv, ...FY, ...CT, ...cl, ...mN, ...mT, ...bw, ...sy, ...oy, ...VY, ...GY, ...BY, ...kY, ...fN, dequantizeInShader: { type: Boolean, default: !0 }, ...cN, ...zY, ...CN, ...SN, ...EN, ...ZY, ...bN, showOutline: { type: Boolean, default: !0 }, ...Vi }; var FEe = de({ name: "VcPrimitiveModel", props: NEe, emits: hv, setup(r, e) { const t = We(); t.cesiumClass = "Model"; const n = fv(r, e, t); return t.createCesiumObject = async () => { const i = n == null ? void 0 : n.transformProps(r); return Cesium.Model.fromGltf(i); }, () => { var i; return xe(je(((i = t.proxy) == null ? void 0 : i.$options.name) || "")); }; } }); const BEe = { ...Sw, ...fy, ...vN, ...Tn, ...uc, ...bT, ...Cw, ...Ew, ...xw, ...uv, cull: { type: Boolean, default: !0 }, ...lv, ...cl, ...CT, ...Vi }; var LX = de({ name: "VcPrimitive", props: BEe, emits: hv, setup(r, e) { var t; const n = We(); n.cesiumClass = "Primitive", fv(r, e, n); const i = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => { var a; return e.slots.default ? H("i", { class: je(i), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(((a = n.proxy) == null ? void 0 : a.$options.name) || "")); }; } }); const kEe = { ...hv, allTilesLoaded: () => !0, initialTilesLoaded: () => !0, loadProgress: (r, e) => !0, tileFailed: (r, e) => !0, tileLoad: (r) => !0, tileUnload: (r) => !0, tileVisible: (r) => !0 }, VEe = { url: [String, Object], ...Tn, ...uc, ...CT, ...jY, maximumMemoryUsage: { type: Number, default: 512 }, cullWithChildrenBounds: { type: Boolean, default: !0 }, cullRequestsWhileMoving: { type: Boolean, default: !0 }, cullRequestsWhileMovingMultiplier: { type: Number, default: 60 }, preloadWhenHidden: { type: Boolean, default: !1 }, preloadFlightDestinations: { type: Boolean, default: !0 }, preferLeaves: { type: Boolean, default: !1 }, dynamicScreenSpaceError: { type: Boolean, default: !1 }, dynamicScreenSpaceErrorDensity: { type: Number, default: 278e-5 }, dynamicScreenSpaceErrorFactor: { type: Number, default: 4 }, dynamicScreenSpaceErrorHeightFalloff: { type: Number, default: 0.25 }, progressiveResolutionHeightFraction: { type: Number, default: 0.3 }, foveatedScreenSpaceError: { type: Boolean, default: !0 }, foveatedConeSize: { type: Number, default: 0.1 }, foveatedMinimumScreenSpaceErrorRelaxation: { type: Number, default: 0 }, foveatedInterpolationCallback: Function, foveatedTimeDelay: { type: Number, default: 0.2 }, skipLevelOfDetail: { type: Boolean, default: !1 }, baseScreenSpaceError: { type: Number, default: 1024 }, skipScreenSpaceErrorFactor: { type: Number, default: 16 }, skipLevels: { type: Number, default: 1 }, immediatelyLoadDesiredLevelOfDetail: { type: Boolean, default: !1 }, loadSiblings: { type: Boolean, default: !1 }, ...fN, ...ly, ...ki, pointCloudShading: Object, ...cN, ...rX, ...CN, ...SN, ...EN, ...bN, showOutline: { type: Boolean, default: !0 }, vectorClassificationOnly: { type: Boolean, default: !1 }, vectorKeepDecodedPositions: { type: Boolean, default: !1 }, featureIdIndex: { type: Number, default: 0 }, instanceFeatureIdIndex: { type: Number, default: 0 }, showCreditsOnScreen: { type: Boolean, default: !1 }, debugHeatmapTilePropertyName: String, debugFreezeFrame: { type: Boolean, default: !1 }, debugColorizeTiles: { type: Boolean, default: !1 }, ...mN, ...cl, debugShowContentBoundingVolume: { type: Boolean, default: !1 }, debugShowViewerRequestVolume: { type: Boolean, default: !1 }, debugShowGeometricError: { type: Boolean, default: !1 }, debugShowRenderingStatistics: { type: Boolean, default: !1 }, debugShowMemoryUsage: { type: Boolean, default: !1 }, debugShowUrl: { type: Boolean, default: !1 }, ...Vi, enableModelExperimental: { type: Boolean, default: !1 }, customShader: { type: Object }, properties: { type: Array }, fragmentShader: String, replaceFS: Boolean }; var GEe = de({ name: "VcPrimitiveTileset", props: VEe, emits: kEe, setup(r, e) { const t = We(); t.cesiumClass = "Cesium3DTileset", t.cesiumEvents = ["allTilesLoaded", "initialTilesLoaded", "loadProgress", "tileFailed", "tileLoad", "tileUnload", "tileVisible"], fv(r, e, t), t.proxy.creatingPromise.then((i) => { const a = i.cesiumObject; t.removeCallbacks.push(a.tileVisible.addEventListener(n)); }); const n = (i) => { const a = i.content, o = a._model; for (let s = 0; s < a.featuresLength; s++) { const u = a.getFeature(s); r.properties && r.properties.length && r.properties.forEach((l) => { u.hasProperty(l.key) && u.getProperty(l.key) === l.keyValue && u.setProperty(l.propertyName, l.propertyValue); }); } r.fragmentShader && o && o._sourcePrograms && o._rendererResources && (Object.keys(o._sourcePrograms).forEach((s) => { const u = o._sourcePrograms[s], l = o._rendererResources.sourceShaders; if (r.replaceFS) l[u.fragmentShader] = r.fragmentShader; else { const c = l[u.fragmentShader]; l[u.fragmentShader] = c.replace(`gl_FragColor = vec4(color, 1.0); }`, `gl_FragColor = vec4(color, 1.0); ${r.fragmentShader} } `); } }), o._shouldRegenerateShaders = !0); }; return () => { var i; return xe(je(((i = t.proxy) == null ? void 0 : i.$options.name) || "")); }; } }); const zEe = { ...hv, complete: (r) => !0 }, $Ee = { ...Tn, updateCallback: Function, emitter: Object, ...uc, emitterModelMatrix: Object, emissionRate: { type: Number, default: 5 }, bursts: Array, loop: { type: Boolean, default: !0 }, scale: { type: Number, default: 1 }, startScale: Number, endScale: Number, ...oy, ...KY, ...JY, ...UR, ...tX, ...QY, ...eX, ...jR, speed: { type: Number, default: 1 }, minimumSpeed: Number, maximumSpeed: Number, lifetime: { type: Number, default: Number.MAX_VALUE }, particleLife: { type: Number, default: 5 }, minimumParticleLife: Number, maximumParticleLife: Number, mass: { type: Number, default: 1 }, minimumMass: Number, maximumMass: Number, ...Vi }; var HEe = de({ name: "VcPrimitiveParticle", props: $Ee, emits: zEe, setup(r, e) { const t = We(); return t.cesiumClass = "ParticleSystem", t.cesiumEvents = ["complete"], fv(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "")); }; } }), UEe = ` uniform sampler2D colorTexture; uniform vec4 u_color1; uniform vec4 u_color2; uniform float u_isShed; uniform sampler2D shadowMap_depthTexture; uniform mat4 shadowMap_matrix; uniform vec4 shadowMap_lightPositionEC; uniform vec3 shadowMap_lightDirectionEC; uniform float u_radius; uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; uniform float czzj; uniform float dis; uniform float spzj; uniform float mixNum; uniform vec3 shadowMap_lightUp; uniform vec3 shadowMap_lightDir; uniform vec3 shadowMap_lightRight; varying vec2 v_textureCoordinates; vec4 toEye(in vec2 uv, in float depth){ vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0)); vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0); posInCamera =posInCamera / posInCamera.w; return posInCamera; } float getDepth(in vec4 depth){ float z_window = czm_unpackDepth(depth); z_window = czm_reverseLogDepth(z_window); float n_range = czm_depthRange.near; float f_range = czm_depthRange.far; return (2.0 * z_window - n_range - f_range) / (f_range - n_range); } float _czm_sampleShadowMap(sampler2D shadowMap, vec2 uv){ return texture2D(shadowMap, uv).r; } float _czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth){ return step(depth, _czm_sampleShadowMap(shadowMap, uv)); } float _czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters){ float depthBias = shadowParameters.depthBias; float depth = shadowParameters.depth; float nDotL = shadowParameters.nDotL; float normalShadingSmooth = shadowParameters.normalShadingSmooth; float darkness = shadowParameters.darkness; vec2 uv = shadowParameters.texCoords; depth -= depthBias; vec2 texelStepSize = shadowParameters.texelStepSize; float radius = 1.0; float dx0 = -texelStepSize.x * radius; float dy0 = -texelStepSize.y * radius; float dx1 = texelStepSize.x * radius; float dy1 = texelStepSize.y * radius; float visibility = ( _czm_shadowDepthCompare(shadowMap, uv, depth) +_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) + _czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) + _czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) + _czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) + _czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) + _czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) + _czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) + _czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth) ) * (1.0 / 9.0) ; return visibility; } vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){ vec3 v01 = point -planeOrigin; float d = dot(planeNormal, v01) ; return (point - planeNormal * d); } float ptm(vec3 pt){ return sqrt(pt.x*pt.x + pt.y*pt.y + pt.z*pt.z); } void main() { const float PI = 3.141592653589793; vec4 color = texture2D(colorTexture, v_textureCoordinates); gl_FragColor = color; if ( u_isShed < 0.5 ) return; vec4 currD = texture2D(czm_globeDepthTexture, v_textureCoordinates); if( currD.r >= 1.0 ) return; float depth = getDepth(currD); vec4 positionEC = toEye(v_textureCoordinates, depth); vec3 normalEC = vec3(1.0); czm_shadowParameters shadowParameters; shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; shadowParameters.depthBias *= max(depth * 0.01, 1.0); vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); vec4 shadowPosition = shadowMap_matrix * positionEC; shadowPosition /= shadowPosition.w; if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) return; vec4 lw = czm_inverseView* vec4(shadowMap_lightPositionEC.xyz, 1.0); vec4 vw = czm_inverseView* vec4(positionEC.xyz, 1.0); if(distance(lw.xyz,vw.xyz)> u_radius) return; shadowParameters.texCoords = shadowPosition.xy; shadowParameters.depth = shadowPosition.z; shadowParameters.nDotL = nDotL; float visibility = _czm_shadowVisibility(shadowMap_depthTexture, shadowParameters); if(visibility > 0.3 ){ gl_FragColor = mix(color,vec4(u_color1.rgb, 1.0),mixNum); } else{ if(abs(shadowPosition.z-0.0)<0.01){ return; } gl_FragColor = mix(color,vec4(u_color2.rgb, 1.0),mixNum); } } `; const WEe = { ...bw, fovH: { type: Number, default: 90 }, fovV: { type: Number, default: 60 }, offsetHeight: { type: Number, default: 1.8 }, visibleColor: { type: [Object, Array, String], default: "#00ff00" }, invisibleColor: { type: [Object, Array, String], default: "#ff0000" }, showGridLine: { type: Boolean, default: !0 }, lineColor: { type: [Object, Array, String], default: "rgba(255,255,255,0.4)" }, faceColor: { type: [Object, Array, String], default: "rgba(255,255,255,0.1)" }, show: { type: Boolean, default: !0 }, startPosition: { type: Object }, endPosition: { type: Object }, fragmentShader: { type: String, default: UEe }, uniforms: Object }; var jEe = de({ name: "VcViewshed", props: WEe, emits: Pt, setup(r, e) { const t = We(); t.cesiumClass = "VcViewshed"; const n = Fa(r, e, t); if (n === void 0) return; const i = []; let a; i.push(Ve([() => r.startPosition, () => r.endPosition], ([s, u]) => { !t.mounted || o(s, u); }, { deep: !0 })), i.push(Ve(() => r.fovH, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.fovH = s; })), i.push(Ve(() => r.fovV, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.fovV = s; })), i.push(Ve(() => r.fovV, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.fovV = s; })), i.push(Ve(() => r.offsetHeight, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.offsetHeight = s; })), i.push(Ve(() => r.visibleColor, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.visibleColor = Gt(s); })), i.push(Ve(() => r.invisibleColor, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.invisibleColor = Gt(s); })), i.push(Ve(() => r.showGridLine, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.showGridLine = s; })), i.push(Ve(() => r.show, (s) => { if (!t.mounted) return; const u = t.cesiumObject; u.enabled = s; })), xa(() => { i.forEach((s) => s()), i.length = 0; }), t.createCesiumObject = async () => { const s = n.$services.viewer, u = new ZCe(s.scene, { fovH: 120, fovV: 60, offsetHeight: 1.8, visibleColor: Gt(r.visibleColor), invisibleColor: Gt(r.invisibleColor), showGridLine: r.showGridLine }); return u._viewshedShadowMap.cascadesEnabled = !1, u._viewshedShadowMap.softShadows = !1, u._viewshedShadowMap.normalOffset = !1, u._viewshedShadowMap.fromLightSource = !1, u._viewshedShadowMap.enabled = !1, u.fovH = Cesium.Math.toRadians(r.fovH), u.fovV = Cesium.Math.toRadians(r.fovV), u.offsetHeight = r.offsetHeight, u.showGridLine = r.showGridLine, u.enabled = r.show, u.lineColor = Gt(r.lineColor), u.faceColor = Gt(r.faceColor), u; }, t.mount = async () => { const s = n.$services.viewer, u = t.cesiumObject, { Cartesian4: l, PostProcessStage: c, Cartesian2: f } = Cesium; o(r.startPosition, r.endPosition), a = new c({ fragmentShader: r.fragmentShader, uniforms: r.uniforms || { u_color1: function() { return u.visibleColor; }, u_color2: function() { return u.invisibleColor; }, u_isShed: function() { return u.shadowMap.enabled; }, u_radius: function() { return u.lightCamera.frustum.far; }, shadowMap_depthTexture: function() { return u.shadowMap.enabled ? u.shadowMap._shadowMapTexture : s.scene.context.defaultTexture; }, shadowMap_matrix: function() { return u.shadowMap._shadowMapMatrix; }, shadowMap_cascadeSplits: function() { return u.shadowMap._cascadeSplits; }, shadowMap_cascadeMatrices: function() { return u.shadowMap._cascadeMatrices; }, shadowMap_lightDirectionEC: function() { return u.shadowMap._lightDirectionEC; }, shadowMap_lightPositionEC: function() { return u.shadowMap._lightPositionEC; }, shadowMap_cascadeDistances: function() { return u.shadowMap._cascadeDistances; }, shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness: function() { const p = u.shadowMap._pointBias; return l.fromElements(p.normalOffsetScale, u.shadowMap._distance, u.shadowMap.maximumDistance, 0, new l()); }, shadowMap_texelSizeDepthBiasAndNormalShadingSmooth: function() { const p = u.shadowMap._pointBias, d = new f(); return d.x = 1 / u.shadowMap._textureSize.x, d.y = 1 / u.shadowMap._textureSize.y, l.fromElements(d.x, d.y, p.depthBias, p.normalShadingSmooth, new l()); }, czzj: function() { return u.lightCamera.frustum.fov; }, spzj: function() { return u.lightCamera.frustum.fov; }, mixNum: function() { return 0.5; }, shadowMap_lightUp: function() { return u.lightCamera.up; }, shadowMap_lightDir: function() { return u.lightCamera.direction; }, shadowMap_lightRight: function() { return u.lightCamera.right; } } }), s.scene.postProcessStages.add(a); const h = n.$services.primitives; return h && h.add(u); }, t.unmount = async () => { const s = n.$services.viewer; a && s.scene.postProcessStages.remove(a); const u = n.$services.primitives, l = t.cesiumObject; return u && u.remove(l); }; const o = (s, u) => { const l = t.cesiumObject, { Cartesian3: c } = Cesium; let f = c.subtract(u, s, new c()); const h = c.magnitudeSquared(f), p = c.distance(u, s); if (h < 0.01 || l.frustum.near > p) l.enabled = !1; else { l.enabled = !0, f = c.normalize(f, f); const d = c.normalize(u, new c()); l.setView({ destination: s, orientation: { direction: f, up: d } }), l.frustum.far = Math.max(p, 1.1); } }; return () => { var s; return xe(je(((s = t.proxy) == null ? void 0 : s.$options.name) || "")); }; } }); const YEe = [PX, IX, AX, FEe, LX, GEe, HEe]; YEe.forEach((r) => { r.install = (e) => { e.component(r.name, r); }; }); const XEe = PX, qEe = IX, DX = AX, h_ = LX, ZEe = jEe, KEe = { ...Tn, ...ww, min: { type: Number, default: 0 }, max: { type: Number, default: 100 }, data: Array, options: Object, type: { type: String, default: "primitive" }, segments: { type: Array, default: () => [] }, projection: { type: String, default: "3857" } }; var JEe = de({ name: "VcOverlayHeatmap", props: KEe, emits: Pt, setup(r, e) { var t; const n = We(); n.cesiumClass = "VcOverlayHeatmap", n.cesiumEvents = []; const i = Fa(r, e, n); if (i === void 0) return; const a = te(null), o = te(null), s = { minCanvasSize: 700, maxCanvasSize: 2e3, radiusFactor: 60, spacingFactor: 1.5, maxOpacity: 0.8, minOpacity: 0.1, blur: 0.85, gradient: { ".3": "blue", ".65": "yellow", ".8": "orange", ".95": "red" }, xField: "x", yField: "y", valueField: "value", container: void 0 }, u = te(null), l = te(null), c = te(null), f = te(null), h = te(null), p = te(!1), d = te(null); (t = Fd(n).proxy.creatingPromise) == null || t.then(() => { p.value = !0; }); const g = Ie(() => Object.assign({}, s, r.options)); let m = []; m.push(Ve(() => c, (x) => { l.value.fabric.uniforms.image = x.value, h.value.options.material.fabric.uniforms.image = x.value; }, { deep: !0 })), m.push(Ve(() => r.data, (x, C) => { if (!n.mounted) return; const S = n.cesiumObject; Array.isArray(x) && Array.isArray(C) ? (w(x, S), c.value = S.getDataURL()) : i.reload(); }, { deep: !0 })), m.push(Ve(() => [r.max, r.min], (x) => { const C = n.cesiumObject; C.setDataMax(x[0] || 0), C.setDataMin(x[1] || 0), c.value = C.getDataURL(); })), m.push(Ve(() => [r.type, r.projection, r.rectangle], (x) => { i.reload(); })), m.push(Ve(() => r.options, (x) => { const C = n.cesiumObject; C.configure(x), c.value = C.getDataURL(); }, { deep: !0 })), n.createCesiumObject = async () => { const { WebMercatorProjection: x, GeographicProjection: C } = Cesium; o.value = r.projection === "3857" ? new x() : new C(); const S = y(); d.value = _(r.rectangle); const b = document.createElement("div"); if (Cesium.defined(S) && b.setAttribute("id", S), b.setAttribute("style", "width: " + d.value.width + "px; height: " + d.value.height + "px; margin: 0px; display: none;"), document.body.appendChild(b), g.value.container = b, r.segments.length) { g.value.gradient = {}; const T = r.max - r.min; for (let P = 0; P < r.segments.length; P++) g.value.gradient[`${(r.segments[P][0] - r.min) / T}`] = Gt(r.segments[P][1]).toCssColorString(); } const E = EEe.create(g.value); return b.children[0].setAttribute("id", S + "-hm"), Array.isArray(r.data) && (w(r.data, E), l.value = { fabric: { type: "Image", uniforms: { image: c.value, transparent: !0 } } }, h.value = { type: "MaterialAppearance", options: { material: { fabric: { type: "Image", uniforms: { image: c.value } } } } }), E; }, n.unmount = async () => (document.body.removeChild(n.cesiumObject._config.container), !0); const y = (x) => { let C = ""; const S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for (let b = 0; b < (x || 8); b++) C += S.charAt(Math.floor(Math.random() * S.length)); return C; }, _ = (x) => { const C = Ug(x), S = o.value.project(new Cesium.Cartographic(C.west, C.south)), b = o.value.project(new Cesium.Cartographic(C.east, C.north)), E = { north: b.y, east: b.x, south: S.y, west: S.x }; let T = E.east > 0 && E.west < 0 ? E.east + Math.abs(E.west) : Math.abs(E.east - E.west), P = E.north > 0 && E.south < 0 ? E.north + Math.abs(E.south) : Math.abs(E.north - E.south), I = 1; T > P && T > g.value.maxCanvasSize ? (I = T / g.value.maxCanvasSize, P / I < g.value.minCanvasSize && (I = P / g.value.minCanvasSize)) : P > T && P > g.value.maxCanvasSize ? (I = P / g.value.maxCanvasSize, P / I < g.value.minCanvasSize && (I = T / g.value.minCanvasSize)) : T < P && T < g.value.minCanvasSize ? (I = T / g.value.minCanvasSize, P / I > g.value.maxCanvasSize && (I = P / g.value.maxCanvasSize)) : P < T && P < g.value.minCanvasSize && (I = P / g.value.minCanvasSize, T / I > g.value.maxCanvasSize && (I = T / g.value.maxCanvasSize)), T = T / I, P = P / I, Cesium.defined(g.value.radius) || (g.value.radius = T > P ? T / g.value.radiusFactor : P / g.value.radiusFactor); const A = (g.value.radius || 1) * g.value.spacingFactor, L = E.west, D = E.south; T = Math.round(T + A * 2), P = Math.round(P + A * 2), E.west -= A * I, E.east += A * I, E.south -= A * I, E.north += A * I; const O = o.value.unproject(new Cesium.Cartesian3(E.west, E.south)), N = o.value.unproject(new Cesium.Cartesian3(E.east, E.north)), F = { north: Cesium.Math.toDegrees(N.latitude), east: Cesium.Math.toDegrees(N.longitude), south: Cesium.Math.toDegrees(O.latitude), west: Cesium.Math.toDegrees(O.longitude) }; return u.value = F, { height: P, width: T, factor: I, xoffset: L, yoffset: D, spacing: A }; }, w = (x, C) => { if (x) { const { height: S, xoffset: b, yoffset: E, factor: T, spacing: P } = d.value, I = g.value.xField || "x", A = g.value.yField || "y", L = g.value.valueField || "value", D = []; for (let O = 0; O < x.length; O++) { const N = x[O]; Cesium.defined(N.id) || (N.id = O); const F = o.value.project(Cesium.Cartographic.fromDegrees(N[I], N[A])), k = { x: Math.round((F.x - b) / T + P), y: Math.round((F.y - E) / T + P), value: void 0 }; k.y = S - k.y, (N[L] || N[L] === 0) && (k[L] = N[L]), !(k[L] > r.max || k[L] < r.min) && D.push(k); } C.setData({ min: r.min, max: r.max, data: D }), c.value = C.getDataURL(); } }; return xa(() => { m.forEach((x) => x()), m = []; }), Object.assign(n.proxy, { rootRef: a, childRef: f }), () => { if (p.value) { const x = []; return r.type === "entity" && c.value ? x.push(H(PEe, { ref: f, show: r.show, rectangle: { coordinates: u.value, material: l.value } })) : r.type === "primitive" ? x.push(H(qEe, { ref: f, show: r.show, appearance: h.value, releaseGeometryInstances: !1, geometryInstances: new Cesium.GeometryInstance({ geometry: new Cesium.RectangleGeometry({ rectangle: Ug(u.value) }) }) })) : r.type === "imagery-layer" && c.value && x.push(H(DEe, { ref: f, show: r.show, imageryProvider: new Cesium.SingleTileImageryProvider({ url: c.value, rectangle: Ug(u.value) }) })), H("i", { ref: a, class: "vc-overlay-heatmap", style: "display: none !important" }, x); } else return xe("v-if"); }; } }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var fM = function(r, e) { return fM = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) { t.__proto__ = n; } || function(t, n) { for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); }, fM(r, e); }; function W(r, e) { if (typeof e != "function" && e !== null) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); fM(r, e); function t() { this.constructor = r; } r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t()); } var QEe = function() { function r() { this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1; } return r; }(), ebe = function() { function r() { this.browser = new QEe(), this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = typeof window < "u"; } return r; }(), Ip = new ebe(); typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (Ip.wxa = !0, Ip.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? Ip.worker = !0 : typeof navigator > "u" ? (Ip.node = !0, Ip.svgSupported = !0) : tbe(navigator.userAgent, Ip); function tbe(r, e) { var t = e.browser, n = r.match(/Firefox\/([\d.]+)/), i = r.match(/MSIE\s([\d.]+)/) || r.match(/Trident\/.+?rv:(([\d.]+))/), a = r.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(r); n && (t.firefox = !0, t.version = n[1]), i && (t.ie = !0, t.version = i[1]), a && (t.edge = !0, t.version = a[1], t.newEdge = +a[1].split(".")[0] > 18), o && (t.weChat = !0), e.svgSupported = typeof SVGRect < "u", e.touchEventsSupported = "ontouchstart" in window && !t.ie && !t.edge, e.pointerEventsSupported = "onpointerdown" in window && (t.edge || t.ie && +t.version >= 11), e.domSupported = typeof document < "u"; var s = document.documentElement.style; e.transform3dSupported = (t.ie && "transition" in s || t.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || t.ie && +t.version >= 9; } const wr = Ip; var LN = 12, MX = "sans-serif", Dh = LN + "px " + MX, rbe = 20, nbe = 100, ibe = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"; function abe(r) { var e = {}; if (typeof JSON > "u") return e; for (var t = 0; t < r.length; t++) { var n = String.fromCharCode(t + 32), i = (r.charCodeAt(t) - rbe) / nbe; e[n] = i; } return e; } var obe = abe(ibe), tf = { createCanvas: function() { return typeof document < "u" && document.createElement("canvas"); }, measureText: function() { var r, e; return function(t, n) { if (!r) { var i = tf.createCanvas(); r = i && i.getContext("2d"); } if (r) return e !== n && (e = r.font = n || Dh), r.measureText(t); t = t || "", n = n || Dh; var a = /^([0-9]*?)px$/.exec(n), o = +(a && a[1]) || LN, s = 0; if (n.indexOf("mono") >= 0) s = o * t.length; else for (var u = 0; u < t.length; u++) { var l = obe[t[u]]; s += l == null ? o : l * o; } return { width: s }; }; }(), loadImage: function(r, e, t) { var n = new Image(); return n.onload = e, n.onerror = t, n.src = r, n; } }, OX = Kl([ "Function", "RegExp", "Date", "Error", "CanvasGradient", "CanvasPattern", "Image", "Canvas" ], function(r, e) { return r["[object " + e + "]"] = !0, r; }, {}), RX = Kl([ "Int8", "Uint8", "Uint8Clamped", "Int16", "Uint16", "Int32", "Uint32", "Float32", "Float64" ], function(r, e) { return r["[object " + e + "Array]"] = !0, r; }, {}), my = Object.prototype.toString, AT = Array.prototype, sbe = AT.forEach, ube = AT.filter, DN = AT.slice, lbe = AT.map, HV = function() { }.constructor, Ox = HV ? HV.prototype : null, MN = "__proto__", cbe = 2311; function NX() { return cbe++; } function zu() { for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e]; typeof console < "u" && console.error.apply(console, r); } function Qe(r) { if (r == null || typeof r != "object") return r; var e = r, t = my.call(r); if (t === "[object Array]") { if (!p_(r)) { e = []; for (var n = 0, i = r.length; n < i; n++) e[n] = Qe(r[n]); } } else if (RX[t]) { if (!p_(r)) { var a = r.constructor; if (a.from) e = a.from(r); else { e = new a(r.length); for (var n = 0, i = r.length; n < i; n++) e[n] = r[n]; } } } else if (!OX[t] && !p_(r) && !Lm(r)) { e = {}; for (var o in r) r.hasOwnProperty(o) && o !== MN && (e[o] = Qe(r[o])); } return e; } function dt(r, e, t) { if (!Xe(e) || !Xe(r)) return t ? Qe(e) : r; for (var n in e) if (e.hasOwnProperty(n) && n !== MN) { var i = r[n], a = e[n]; Xe(a) && Xe(i) && !le(a) && !le(i) && !Lm(a) && !Lm(i) && !UV(a) && !UV(i) && !p_(a) && !p_(i) ? dt(i, a, t) : (t || !(n in r)) && (r[n] = Qe(e[n])); } return r; } function ON(r, e) { for (var t = r[0], n = 1, i = r.length; n < i; n++) t = dt(t, r[n], e); return t; } function oe(r, e) { if (Object.assign) Object.assign(r, e); else for (var t in e) e.hasOwnProperty(t) && t !== MN && (r[t] = e[t]); return r; } function qe(r, e, t) { for (var n = At(e), i = 0; i < n.length; i++) { var a = n[i]; (t ? e[a] != null : r[a] == null) && (r[a] = e[a]); } return r; } tf.createCanvas; function _t(r, e) { if (r) { if (r.indexOf) return r.indexOf(e); for (var t = 0, n = r.length; t < n; t++) if (r[t] === e) return t; } return -1; } function fbe(r, e) { var t = r.prototype; function n() { } n.prototype = e.prototype, r.prototype = new n(); for (var i in t) t.hasOwnProperty(i) && (r.prototype[i] = t[i]); r.prototype.constructor = r, r.superClass = e; } function gi(r, e, t) { if (r = "prototype" in r ? r.prototype : r, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames) for (var n = Object.getOwnPropertyNames(e), i = 0; i < n.length; i++) { var a = n[i]; a !== "constructor" && (t ? e[a] != null : r[a] == null) && (r[a] = e[a]); } else qe(r, e, t); } function eo(r) { return !r || typeof r == "string" ? !1 : typeof r.length == "number"; } function M(r, e, t) { if (!!(r && e)) if (r.forEach && r.forEach === sbe) r.forEach(e, t); else if (r.length === +r.length) for (var n = 0, i = r.length; n < i; n++) e.call(t, r[n], n, r); else for (var a in r) r.hasOwnProperty(a) && e.call(t, r[a], a, r); } function ce(r, e, t) { if (!r) return []; if (!e) return RN(r); if (r.map && r.map === lbe) return r.map(e, t); for (var n = [], i = 0, a = r.length; i < a; i++) n.push(e.call(t, r[i], i, r)); return n; } function Kl(r, e, t, n) { if (!!(r && e)) { for (var i = 0, a = r.length; i < a; i++) t = e.call(n, t, r[i], i, r); return t; } } function Wr(r, e, t) { if (!r) return []; if (!e) return RN(r); if (r.filter && r.filter === ube) return r.filter(e, t); for (var n = [], i = 0, a = r.length; i < a; i++) e.call(t, r[i], i, r) && n.push(r[i]); return n; } function hbe(r, e, t) { if (!!(r && e)) { for (var n = 0, i = r.length; n < i; n++) if (e.call(t, r[n], n, r)) return r[n]; } } function At(r) { if (!r) return []; if (Object.keys) return Object.keys(r); var e = []; for (var t in r) r.hasOwnProperty(t) && e.push(t); return e; } function pbe(r, e) { for (var t = [], n = 2; n < arguments.length; n++) t[n - 2] = arguments[n]; return function() { return r.apply(e, t.concat(DN.call(arguments))); }; } var Ae = Ox && ze(Ox.bind) ? Ox.call.bind(Ox.bind) : pbe; function ut(r) { for (var e = [], t = 1; t < arguments.length; t++) e[t - 1] = arguments[t]; return function() { return r.apply(this, e.concat(DN.call(arguments))); }; } function le(r) { return Array.isArray ? Array.isArray(r) : my.call(r) === "[object Array]"; } function ze(r) { return typeof r == "function"; } function Se(r) { return typeof r == "string"; } function rE(r) { return my.call(r) === "[object String]"; } function $t(r) { return typeof r == "number"; } function Xe(r) { var e = typeof r; return e === "function" || !!r && e === "object"; } function UV(r) { return !!OX[my.call(r)]; } function zo(r) { return !!RX[my.call(r)]; } function Lm(r) { return typeof r == "object" && typeof r.nodeType == "number" && typeof r.ownerDocument == "object"; } function LT(r) { return r.colorStops != null; } function dbe(r) { return r.image != null; } function FX(r) { return my.call(r) === "[object RegExp]"; } function kd(r) { return r !== r; } function si() { for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e]; for (var t = 0, n = r.length; t < n; t++) if (r[t] != null) return r[t]; } function wt(r, e) { return r != null ? r : e; } function $u(r, e, t) { return r != null ? r : e != null ? e : t; } function RN(r) { for (var e = [], t = 1; t < arguments.length; t++) e[t - 1] = arguments[t]; return DN.apply(r, e); } function NN(r) { if (typeof r == "number") return [r, r, r, r]; var e = r.length; return e === 2 ? [r[0], r[1], r[0], r[1]] : e === 3 ? [r[0], r[1], r[2], r[1]] : r; } function Ze(r, e) { if (!r) throw new Error(e); } function Bu(r) { return r == null ? null : typeof r.trim == "function" ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); } var BX = "__ec_primitive__"; function nE(r) { r[BX] = !0; } function p_(r) { return r[BX]; } var vbe = function() { function r(e) { this.data = {}; var t = le(e); this.data = {}; var n = this; e instanceof r ? e.each(i) : e && M(e, i); function i(a, o) { t ? n.set(a, o) : n.set(o, a); } } return r.prototype.get = function(e) { return this.data.hasOwnProperty(e) ? this.data[e] : null; }, r.prototype.set = function(e, t) { return this.data[e] = t; }, r.prototype.each = function(e, t) { for (var n in this.data) this.data.hasOwnProperty(n) && e.call(t, this.data[n], n); }, r.prototype.keys = function() { return At(this.data); }, r.prototype.removeKey = function(e) { delete this.data[e]; }, r; }(); function $e(r) { return new vbe(r); } function iE(r, e) { for (var t = new r.constructor(r.length + e.length), n = 0; n < r.length; n++) t[n] = r[n]; for (var i = r.length, n = 0; n < e.length; n++) t[n + i] = e[n]; return t; } function DT(r, e) { var t; if (Object.create) t = Object.create(r); else { var n = function() { }; n.prototype = r, t = new n(); } return e && oe(t, e), t; } function kX(r) { var e = r.style; e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none"; } function Te(r, e) { return r.hasOwnProperty(e); } function ci() { } var rS = 180 / Math.PI; function pv(r, e) { return r == null && (r = 0), e == null && (e = 0), [r, e]; } function oo(r, e) { return r[0] = e[0], r[1] = e[1], r; } function Nc(r) { return [r[0], r[1]]; } function gbe(r, e, t) { return r[0] = e, r[1] = t, r; } function WV(r, e, t) { return r[0] = e[0] + t[0], r[1] = e[1] + t[1], r; } function hM(r, e, t, n) { return r[0] = e[0] + t[0] * n, r[1] = e[1] + t[1] * n, r; } function $p(r, e, t) { return r[0] = e[0] - t[0], r[1] = e[1] - t[1], r; } function pM(r) { return Math.sqrt(mbe(r)); } function mbe(r) { return r[0] * r[0] + r[1] * r[1]; } function mI(r, e, t) { return r[0] = e[0] * t, r[1] = e[1] * t, r; } function Lw(r, e) { var t = pM(e); return t === 0 ? (r[0] = 0, r[1] = 0) : (r[0] = e[0] / t, r[1] = e[1] / t), r; } function dM(r, e) { return Math.sqrt((r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1])); } var qf = dM; function ybe(r, e) { return (r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]); } var Qp = ybe; function nS(r, e, t, n) { return r[0] = e[0] + n * (t[0] - e[0]), r[1] = e[1] + n * (t[1] - e[1]), r; } function Ia(r, e, t) { var n = e[0], i = e[1]; return r[0] = t[0] * n + t[2] * i + t[4], r[1] = t[1] * n + t[3] * i + t[5], r; } function Zf(r, e, t) { return r[0] = Math.min(e[0], t[0]), r[1] = Math.min(e[1], t[1]), r; } function Kf(r, e, t) { return r[0] = Math.max(e[0], t[0]), r[1] = Math.max(e[1], t[1]), r; } var Nv = function() { function r(e, t) { this.target = e, this.topTarget = t && t.topTarget; } return r; }(), _be = function() { function r(e) { this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this); } return r.prototype._dragStart = function(e) { for (var t = e.target; t && !t.draggable; ) t = t.parent || t.__hostTarget; t && (this._draggingTarget = t, t.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new Nv(t, e), "dragstart", e.event)); }, r.prototype._drag = function(e) { var t = this._draggingTarget; if (t) { var n = e.offsetX, i = e.offsetY, a = n - this._x, o = i - this._y; this._x = n, this._y = i, t.drift(a, o, e), this.handler.dispatchToElement(new Nv(t, e), "drag", e.event); var s = this.handler.findHover(n, i, t).target, u = this._dropTarget; this._dropTarget = s, t !== s && (u && s !== u && this.handler.dispatchToElement(new Nv(u, e), "dragleave", e.event), s && s !== u && this.handler.dispatchToElement(new Nv(s, e), "dragenter", e.event)); } }, r.prototype._dragEnd = function(e) { var t = this._draggingTarget; t && (t.dragging = !1), this.handler.dispatchToElement(new Nv(t, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new Nv(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null; }, r; }(); const wbe = _be; var xbe = function() { function r(e) { e && (this._$eventProcessor = e); } return r.prototype.on = function(e, t, n, i) { this._$handlers || (this._$handlers = {}); var a = this._$handlers; if (typeof t == "function" && (i = n, n = t, t = null), !n || !e) return this; var o = this._$eventProcessor; t != null && o && o.normalizeQuery && (t = o.normalizeQuery(t)), a[e] || (a[e] = []); for (var s = 0; s < a[e].length; s++) if (a[e][s].h === n) return this; var u = { h: n, query: t, ctx: i || this, callAtLast: n.zrEventfulCallAtLast }, l = a[e].length - 1, c = a[e][l]; return c && c.callAtLast ? a[e].splice(l, 0, u) : a[e].push(u), this; }, r.prototype.isSilent = function(e) { var t = this._$handlers; return !t || !t[e] || !t[e].length; }, r.prototype.off = function(e, t) { var n = this._$handlers; if (!n) return this; if (!e) return this._$handlers = {}, this; if (t) { if (n[e]) { for (var i = [], a = 0, o = n[e].length; a < o; a++) n[e][a].h !== t && i.push(n[e][a]); n[e] = i; } n[e] && n[e].length === 0 && delete n[e]; } else delete n[e]; return this; }, r.prototype.trigger = function(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; if (!this._$handlers) return this; var i = this._$handlers[e], a = this._$eventProcessor; if (i) for (var o = t.length, s = i.length, u = 0; u < s; u++) { var l = i[u]; if (!(a && a.filter && l.query != null && !a.filter(e, l.query))) switch (o) { case 0: l.h.call(l.ctx); break; case 1: l.h.call(l.ctx, t[0]); break; case 2: l.h.call(l.ctx, t[0], t[1]); break; default: l.h.apply(l.ctx, t); break; } } return a && a.afterTrigger && a.afterTrigger(e), this; }, r.prototype.triggerWithContext = function(e) { for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; if (!this._$handlers) return this; var i = this._$handlers[e], a = this._$eventProcessor; if (i) for (var o = t.length, s = t[o - 1], u = i.length, l = 0; l < u; l++) { var c = i[l]; if (!(a && a.filter && c.query != null && !a.filter(e, c.query))) switch (o) { case 0: c.h.call(s); break; case 1: c.h.call(s, t[0]); break; case 2: c.h.call(s, t[0], t[1]); break; default: c.h.apply(s, t.slice(1, o - 1)); break; } } return a && a.afterTrigger && a.afterTrigger(e), this; }, r; }(); const Cu = xbe; var Cbe = Math.log(2); function vM(r, e, t, n, i, a) { var o = n + "-" + i, s = r.length; if (a.hasOwnProperty(o)) return a[o]; if (e === 1) { var u = Math.round(Math.log((1 << s) - 1 & ~i) / Cbe); return r[t][u]; } for (var l = n | 1 << t, c = t + 1; n & 1 << c; ) c++; for (var f = 0, h = 0, p = 0; h < s; h++) { var d = 1 << h; d & i || (f += (p % 2 ? -1 : 1) * r[t][h] * vM(r, e - 1, c, l, i | d, a), p++); } return a[o] = f, f; } function jV(r, e) { var t = [ [r[0], r[1], 1, 0, 0, 0, -e[0] * r[0], -e[0] * r[1]], [0, 0, 0, r[0], r[1], 1, -e[1] * r[0], -e[1] * r[1]], [r[2], r[3], 1, 0, 0, 0, -e[2] * r[2], -e[2] * r[3]], [0, 0, 0, r[2], r[3], 1, -e[3] * r[2], -e[3] * r[3]], [r[4], r[5], 1, 0, 0, 0, -e[4] * r[4], -e[4] * r[5]], [0, 0, 0, r[4], r[5], 1, -e[5] * r[4], -e[5] * r[5]], [r[6], r[7], 1, 0, 0, 0, -e[6] * r[6], -e[6] * r[7]], [0, 0, 0, r[6], r[7], 1, -e[7] * r[6], -e[7] * r[7]] ], n = {}, i = vM(t, 8, 0, 0, 0, n); if (i !== 0) { for (var a = [], o = 0; o < 8; o++) for (var s = 0; s < 8; s++) a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * vM(t, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, n) / i * e[o]; return function(u, l, c) { var f = l * a[6] + c * a[7] + 1; u[0] = (l * a[0] + c * a[1] + a[2]) / f, u[1] = (l * a[3] + c * a[4] + a[5]) / f; }; } } var YV = "___zrEVENTSAVED", yI = []; function Sbe(r, e, t, n, i) { return gM(yI, e, n, i, !0) && gM(r, t, yI[0], yI[1]); } function gM(r, e, t, n, i) { if (e.getBoundingClientRect && wr.domSupported && !VX(e)) { var a = e[YV] || (e[YV] = {}), o = Ebe(e, a), s = bbe(o, a, i); if (s) return s(r, t, n), !0; } return !1; } function Ebe(r, e) { var t = e.markers; if (t) return t; t = e.markers = []; for (var n = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) { var o = document.createElement("div"), s = o.style, u = a % 2, l = (a >> 1) % 2; s.cssText = [ "position: absolute", "visibility: hidden", "padding: 0", "margin: 0", "border-width: 0", "user-select: none", "width:0", "height:0", n[u] + ":0", i[l] + ":0", n[1 - u] + ":auto", i[1 - l] + ":auto", "" ].join("!important;"), r.appendChild(o), t.push(o); } return t; } function bbe(r, e, t) { for (var n = t ? "invTrans" : "trans", i = e[n], a = e.srcCoords, o = [], s = [], u = !0, l = 0; l < 4; l++) { var c = r[l].getBoundingClientRect(), f = 2 * l, h = c.left, p = c.top; o.push(h, p), u = u && a && h === a[f] && p === a[f + 1], s.push(r[l].offsetLeft, r[l].offsetTop); } return u && i ? i : (e.srcCoords = o, e[n] = t ? jV(s, o) : jV(o, s)); } function VX(r) { return r.nodeName.toUpperCase() === "CANVAS"; } var Tbe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, _I = [], Pbe = wr.browser.firefox && +wr.browser.version.split(".")[0] < 39; function mM(r, e, t, n) { return t = t || {}, n ? XV(r, e, t) : Pbe && e.layerX != null && e.layerX !== e.offsetX ? (t.zrX = e.layerX, t.zrY = e.layerY) : e.offsetX != null ? (t.zrX = e.offsetX, t.zrY = e.offsetY) : XV(r, e, t), t; } function XV(r, e, t) { if (wr.domSupported && r.getBoundingClientRect) { var n = e.clientX, i = e.clientY; if (VX(r)) { var a = r.getBoundingClientRect(); t.zrX = n - a.left, t.zrY = i - a.top; return; } else if (gM(_I, r, n, i)) { t.zrX = _I[0], t.zrY = _I[1]; return; } } t.zrX = t.zrY = 0; } function FN(r) { return r || window.event; } function zs(r, e, t) { if (e = FN(e), e.zrX != null) return e; var n = e.type, i = n && n.indexOf("touch") >= 0; if (i) { var o = n !== "touchend" ? e.targetTouches[0] : e.changedTouches[0]; o && mM(r, o, e, t); } else { mM(r, e, e, t); var a = Ibe(e); e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3; } var s = e.button; return e.which == null && s !== void 0 && Tbe.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e; } function Ibe(r) { var e = r.wheelDelta; if (e) return e; var t = r.deltaX, n = r.deltaY; if (t == null || n == null) return e; var i = Math.abs(n !== 0 ? n : t), a = n > 0 ? -1 : n < 0 ? 1 : t > 0 ? -1 : 1; return 3 * i * a; } function yM(r, e, t, n) { r.addEventListener(e, t, n); } function Abe(r, e, t, n) { r.removeEventListener(e, t, n); } var rf = function(r) { r.preventDefault(), r.stopPropagation(), r.cancelBubble = !0; }; function qV(r) { return r.which === 2 || r.which === 3; } var Lbe = function() { function r() { this._track = []; } return r.prototype.recognize = function(e, t, n) { return this._doTrack(e, t, n), this._recognize(e); }, r.prototype.clear = function() { return this._track.length = 0, this; }, r.prototype._doTrack = function(e, t, n) { var i = e.touches; if (!!i) { for (var a = { points: [], touches: [], target: t, event: e }, o = 0, s = i.length; o < s; o++) { var u = i[o], l = mM(n, u, {}); a.points.push([l.zrX, l.zrY]), a.touches.push(u); } this._track.push(a); } }, r.prototype._recognize = function(e) { for (var t in wI) if (wI.hasOwnProperty(t)) { var n = wI[t](this._track, e); if (n) return n; } }, r; }(); function ZV(r) { var e = r[1][0] - r[0][0], t = r[1][1] - r[0][1]; return Math.sqrt(e * e + t * t); } function Dbe(r) { return [ (r[0][0] + r[1][0]) / 2, (r[0][1] + r[1][1]) / 2 ]; } var wI = { pinch: function(r, e) { var t = r.length; if (!!t) { var n = (r[t - 1] || {}).points, i = (r[t - 2] || {}).points || n; if (i && i.length > 1 && n && n.length > 1) { var a = ZV(n) / ZV(i); !isFinite(a) && (a = 1), e.pinchScale = a; var o = Dbe(n); return e.pinchX = o[0], e.pinchY = o[1], { type: "pinch", target: r[0].target, event: e }; } } } }, GX = "silent"; function Mbe(r, e, t) { return { type: r, event: t, target: e.target, topTarget: e.topTarget, cancelBubble: !1, offsetX: t.zrX, offsetY: t.zrY, gestureEvent: t.gestureEvent, pinchX: t.pinchX, pinchY: t.pinchY, pinchScale: t.pinchScale, wheelDelta: t.zrDelta, zrByTouch: t.zrByTouch, which: t.which, stop: Obe }; } function Obe() { rf(this.event); } var Rbe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.handler = null, t; } return e.prototype.dispose = function() { }, e.prototype.setCursor = function() { }, e; }(Cu), Jy = function() { function r(e, t) { this.x = e, this.y = t; } return r; }(), Nbe = [ "click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu" ], zX = function(r) { W(e, r); function e(t, n, i, a) { var o = r.call(this) || this; return o._hovered = new Jy(0, 0), o.storage = t, o.painter = n, o.painterRoot = a, i = i || new Rbe(), o.proxy = null, o.setHandlerProxy(i), o._draggingMgr = new wbe(o), o; } return e.prototype.setHandlerProxy = function(t) { this.proxy && this.proxy.dispose(), t && (M(Nbe, function(n) { t.on && t.on(n, this[n], this); }, this), t.handler = this), this.proxy = t; }, e.prototype.mousemove = function(t) { var n = t.zrX, i = t.zrY, a = $X(this, n, i), o = this._hovered, s = o.target; s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target); var u = this._hovered = a ? new Jy(n, i) : this.findHover(n, i), l = u.target, c = this.proxy; c.setCursor && c.setCursor(l ? l.cursor : "default"), s && l !== s && this.dispatchToElement(o, "mouseout", t), this.dispatchToElement(u, "mousemove", t), l && l !== s && this.dispatchToElement(u, "mouseover", t); }, e.prototype.mouseout = function(t) { var n = t.zrEventControl; n !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", t), n !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: t }); }, e.prototype.resize = function() { this._hovered = new Jy(0, 0); }, e.prototype.dispatch = function(t, n) { var i = this[t]; i && i.call(this, n); }, e.prototype.dispose = function() { this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null; }, e.prototype.setCursorStyle = function(t) { var n = this.proxy; n.setCursor && n.setCursor(t); }, e.prototype.dispatchToElement = function(t, n, i) { t = t || {}; var a = t.target; if (!(a && a.silent)) { for (var o = "on" + n, s = Mbe(n, t, i); a && (a[o] && (s.cancelBubble = !!a[o].call(a, s)), a.trigger(n, s), a = a.__hostTarget ? a.__hostTarget : a.parent, !s.cancelBubble); ) ; s.cancelBubble || (this.trigger(n, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(u) { typeof u[o] == "function" && u[o].call(u, s), u.trigger && u.trigger(n, s); })); } }, e.prototype.findHover = function(t, n, i) { for (var a = this.storage.getDisplayList(), o = new Jy(t, n), s = a.length - 1; s >= 0; s--) { var u = void 0; if (a[s] !== i && !a[s].ignore && (u = Fbe(a[s], t, n)) && (!o.topTarget && (o.topTarget = a[s]), u !== GX)) { o.target = a[s]; break; } } return o; }, e.prototype.processGesture = function(t, n) { this._gestureMgr || (this._gestureMgr = new Lbe()); var i = this._gestureMgr; n === "start" && i.clear(); var a = i.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom); if (n === "end" && i.clear(), a) { var o = a.type; t.gestureEvent = o; var s = new Jy(); s.target = a.target, this.dispatchToElement(s, o, a.event); } }, e; }(Cu); M(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(r) { zX.prototype[r] = function(e) { var t = e.zrX, n = e.zrY, i = $X(this, t, n), a, o; if ((r !== "mouseup" || !i) && (a = this.findHover(t, n), o = a.target), r === "mousedown") this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o; else if (r === "mouseup") this._upEl = o; else if (r === "click") { if (this._downEl !== this._upEl || !this._downPoint || qf(this._downPoint, [e.zrX, e.zrY]) > 4) return; this._downPoint = null; } this.dispatchToElement(a, r, e); }; }); function Fbe(r, e, t) { if (r[r.rectHover ? "rectContain" : "contain"](e, t)) { for (var n = r, i = void 0, a = !1; n; ) { if (n.ignoreClip && (a = !0), !a) { var o = n.getClipPath(); if (o && !o.contain(e, t)) return !1; n.silent && (i = !0); } var s = n.__hostTarget; n = s || n.parent; } return i ? GX : !0; } return !1; } function $X(r, e, t) { var n = r.painter; return e < 0 || e > n.getWidth() || t < 0 || t > n.getHeight(); } const Bbe = zX; var HX = 32, Qy = 7; function kbe(r) { for (var e = 0; r >= HX; ) e |= r & 1, r >>= 1; return r + e; } function KV(r, e, t, n) { var i = e + 1; if (i === t) return 1; if (n(r[i++], r[e]) < 0) { for (; i < t && n(r[i], r[i - 1]) < 0; ) i++; Vbe(r, e, i); } else for (; i < t && n(r[i], r[i - 1]) >= 0; ) i++; return i - e; } function Vbe(r, e, t) { for (t--; e < t; ) { var n = r[e]; r[e++] = r[t], r[t--] = n; } } function JV(r, e, t, n, i) { for (n === e && n++; n < t; n++) { for (var a = r[n], o = e, s = n, u; o < s; ) u = o + s >>> 1, i(a, r[u]) < 0 ? s = u : o = u + 1; var l = n - o; switch (l) { case 3: r[o + 3] = r[o + 2]; case 2: r[o + 2] = r[o + 1]; case 1: r[o + 1] = r[o]; break; default: for (; l > 0; ) r[o + l] = r[o + l - 1], l--; } r[o] = a; } } function xI(r, e, t, n, i, a) { var o = 0, s = 0, u = 1; if (a(r, e[t + i]) > 0) { for (s = n - i; u < s && a(r, e[t + i + u]) > 0; ) o = u, u = (u << 1) + 1, u <= 0 && (u = s); u > s && (u = s), o += i, u += i; } else { for (s = i + 1; u < s && a(r, e[t + i - u]) <= 0; ) o = u, u = (u << 1) + 1, u <= 0 && (u = s); u > s && (u = s); var l = o; o = i - u, u = i - l; } for (o++; o < u; ) { var c = o + (u - o >>> 1); a(r, e[t + c]) > 0 ? o = c + 1 : u = c; } return u; } function CI(r, e, t, n, i, a) { var o = 0, s = 0, u = 1; if (a(r, e[t + i]) < 0) { for (s = i + 1; u < s && a(r, e[t + i - u]) < 0; ) o = u, u = (u << 1) + 1, u <= 0 && (u = s); u > s && (u = s); var l = o; o = i - u, u = i - l; } else { for (s = n - i; u < s && a(r, e[t + i + u]) >= 0; ) o = u, u = (u << 1) + 1, u <= 0 && (u = s); u > s && (u = s), o += i, u += i; } for (o++; o < u; ) { var c = o + (u - o >>> 1); a(r, e[t + c]) < 0 ? u = c : o = c + 1; } return u; } function Gbe(r, e) { var t = Qy, n, i, a = 0; r.length; var o = []; n = [], i = []; function s(p, d) { n[a] = p, i[a] = d, a += 1; } function u() { for (; a > 1; ) { var p = a - 2; if (p >= 1 && i[p - 1] <= i[p] + i[p + 1] || p >= 2 && i[p - 2] <= i[p] + i[p - 1]) i[p - 1] < i[p + 1] && p--; else if (i[p] > i[p + 1]) break; c(p); } } function l() { for (; a > 1; ) { var p = a - 2; p > 0 && i[p - 1] < i[p + 1] && p--, c(p); } } function c(p) { var d = n[p], v = i[p], g = n[p + 1], m = i[p + 1]; i[p] = v + m, p === a - 3 && (n[p + 1] = n[p + 2], i[p + 1] = i[p + 2]), a--; var y = CI(r[g], r, d, v, 0, e); d += y, v -= y, v !== 0 && (m = xI(r[d + v - 1], r, g, m, m - 1, e), m !== 0 && (v <= m ? f(d, v, g, m) : h(d, v, g, m))); } function f(p, d, v, g) { var m = 0; for (m = 0; m < d; m++) o[m] = r[p + m]; var y = 0, _ = v, w = p; if (r[w++] = r[_++], --g === 0) { for (m = 0; m < d; m++) r[w + m] = o[y + m]; return; } if (d === 1) { for (m = 0; m < g; m++) r[w + m] = r[_ + m]; r[w + g] = o[y]; return; } for (var x = t, C, S, b; ; ) { C = 0, S = 0, b = !1; do if (e(r[_], o[y]) < 0) { if (r[w++] = r[_++], S++, C = 0, --g === 0) { b = !0; break; } } else if (r[w++] = o[y++], C++, S = 0, --d === 1) { b = !0; break; } while ((C | S) < x); if (b) break; do { if (C = CI(r[_], o, y, d, 0, e), C !== 0) { for (m = 0; m < C; m++) r[w + m] = o[y + m]; if (w += C, y += C, d -= C, d <= 1) { b = !0; break; } } if (r[w++] = r[_++], --g === 0) { b = !0; break; } if (S = xI(o[y], r, _, g, 0, e), S !== 0) { for (m = 0; m < S; m++) r[w + m] = r[_ + m]; if (w += S, _ += S, g -= S, g === 0) { b = !0; break; } } if (r[w++] = o[y++], --d === 1) { b = !0; break; } x--; } while (C >= Qy || S >= Qy); if (b) break; x < 0 && (x = 0), x += 2; } if (t = x, t < 1 && (t = 1), d === 1) { for (m = 0; m < g; m++) r[w + m] = r[_ + m]; r[w + g] = o[y]; } else { if (d === 0) throw new Error(); for (m = 0; m < d; m++) r[w + m] = o[y + m]; } } function h(p, d, v, g) { var m = 0; for (m = 0; m < g; m++) o[m] = r[v + m]; var y = p + d - 1, _ = g - 1, w = v + g - 1, x = 0, C = 0; if (r[w--] = r[y--], --d === 0) { for (x = w - (g - 1), m = 0; m < g; m++) r[x + m] = o[m]; return; } if (g === 1) { for (w -= d, y -= d, C = w + 1, x = y + 1, m = d - 1; m >= 0; m--) r[C + m] = r[x + m]; r[w] = o[_]; return; } for (var S = t; ; ) { var b = 0, E = 0, T = !1; do if (e(o[_], r[y]) < 0) { if (r[w--] = r[y--], b++, E = 0, --d === 0) { T = !0; break; } } else if (r[w--] = o[_--], E++, b = 0, --g === 1) { T = !0; break; } while ((b | E) < S); if (T) break; do { if (b = d - CI(o[_], r, p, d, d - 1, e), b !== 0) { for (w -= b, y -= b, d -= b, C = w + 1, x = y + 1, m = b - 1; m >= 0; m--) r[C + m] = r[x + m]; if (d === 0) { T = !0; break; } } if (r[w--] = o[_--], --g === 1) { T = !0; break; } if (E = g - xI(r[y], o, 0, g, g - 1, e), E !== 0) { for (w -= E, _ -= E, g -= E, C = w + 1, x = _ + 1, m = 0; m < E; m++) r[C + m] = o[x + m]; if (g <= 1) { T = !0; break; } } if (r[w--] = r[y--], --d === 0) { T = !0; break; } S--; } while (b >= Qy || E >= Qy); if (T) break; S < 0 && (S = 0), S += 2; } if (t = S, t < 1 && (t = 1), g === 1) { for (w -= d, y -= d, C = w + 1, x = y + 1, m = d - 1; m >= 0; m--) r[C + m] = r[x + m]; r[w] = o[_]; } else { if (g === 0) throw new Error(); for (x = w - (g - 1), m = 0; m < g; m++) r[x + m] = o[m]; } } return { mergeRuns: u, forceMergeRuns: l, pushRun: s }; } function iS(r, e, t, n) { t || (t = 0), n || (n = r.length); var i = n - t; if (!(i < 2)) { var a = 0; if (i < HX) { a = KV(r, t, n, e), JV(r, t, n, t + a, e); return; } var o = Gbe(r, e), s = kbe(i); do { if (a = KV(r, t, n, e), a < s) { var u = i; u > s && (u = s), JV(r, t, t + u, t + a, e), a = u; } o.pushRun(t, a), o.mergeRuns(), i -= a, t += a; } while (i !== 0); o.forceMergeRuns(); } } var as = 1, H0 = 2, vg = 4, QV = !1; function SI() { QV || (QV = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors")); } function e6(r, e) { return r.zlevel === e.zlevel ? r.z === e.z ? r.z2 - e.z2 : r.z - e.z : r.zlevel - e.zlevel; } var zbe = function() { function r() { this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = e6; } return r.prototype.traverse = function(e, t) { for (var n = 0; n < this._roots.length; n++) this._roots[n].traverse(e, t); }, r.prototype.getDisplayList = function(e, t) { t = t || !1; var n = this._displayList; return (e || !n.length) && this.updateDisplayList(t), n; }, r.prototype.updateDisplayList = function(e) { this._displayListLen = 0; for (var t = this._roots, n = this._displayList, i = 0, a = t.length; i < a; i++) this._updateAndAddDisplayable(t[i], null, e); n.length = this._displayListLen, iS(n, e6); }, r.prototype._updateAndAddDisplayable = function(e, t, n) { if (!(e.ignore && !n)) { e.beforeUpdate(), e.update(), e.afterUpdate(); var i = e.getClipPath(); if (e.ignoreClip) t = null; else if (i) { t ? t = t.slice() : t = []; for (var a = i, o = e; a; ) a.parent = o, a.updateTransform(), t.push(a), o = a, a = a.getClipPath(); } if (e.childrenRef) { for (var s = e.childrenRef(), u = 0; u < s.length; u++) { var l = s[u]; e.__dirty && (l.__dirty |= as), this._updateAndAddDisplayable(l, t, n); } e.__dirty = 0; } else { var c = e; t && t.length ? c.__clipPaths = t : c.__clipPaths && c.__clipPaths.length > 0 && (c.__clipPaths = []), isNaN(c.z) && (SI(), c.z = 0), isNaN(c.z2) && (SI(), c.z2 = 0), isNaN(c.zlevel) && (SI(), c.zlevel = 0), this._displayList[this._displayListLen++] = c; } var f = e.getDecalElement && e.getDecalElement(); f && this._updateAndAddDisplayable(f, t, n); var h = e.getTextGuideLine(); h && this._updateAndAddDisplayable(h, t, n); var p = e.getTextContent(); p && this._updateAndAddDisplayable(p, t, n); } }, r.prototype.addRoot = function(e) { e.__zr && e.__zr.storage === this || this._roots.push(e); }, r.prototype.delRoot = function(e) { if (e instanceof Array) { for (var t = 0, n = e.length; t < n; t++) this.delRoot(e[t]); return; } var i = _t(this._roots, e); i >= 0 && this._roots.splice(i, 1); }, r.prototype.delAllRoots = function() { this._roots = [], this._displayList = [], this._displayListLen = 0; }, r.prototype.getRoots = function() { return this._roots; }, r.prototype.dispose = function() { this._displayList = null, this._roots = null; }, r; }(); const $be = zbe; var UX; UX = wr.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(r) { return setTimeout(r, 16); }; const _M = UX; var aS = { linear: function(r) { return r; }, quadraticIn: function(r) { return r * r; }, quadraticOut: function(r) { return r * (2 - r); }, quadraticInOut: function(r) { return (r *= 2) < 1 ? 0.5 * r * r : -0.5 * (--r * (r - 2) - 1); }, cubicIn: function(r) { return r * r * r; }, cubicOut: function(r) { return --r * r * r + 1; }, cubicInOut: function(r) { return (r *= 2) < 1 ? 0.5 * r * r * r : 0.5 * ((r -= 2) * r * r + 2); }, quarticIn: function(r) { return r * r * r * r; }, quarticOut: function(r) { return 1 - --r * r * r * r; }, quarticInOut: function(r) { return (r *= 2) < 1 ? 0.5 * r * r * r * r : -0.5 * ((r -= 2) * r * r * r - 2); }, quinticIn: function(r) { return r * r * r * r * r; }, quinticOut: function(r) { return --r * r * r * r * r + 1; }, quinticInOut: function(r) { return (r *= 2) < 1 ? 0.5 * r * r * r * r * r : 0.5 * ((r -= 2) * r * r * r * r + 2); }, sinusoidalIn: function(r) { return 1 - Math.cos(r * Math.PI / 2); }, sinusoidalOut: function(r) { return Math.sin(r * Math.PI / 2); }, sinusoidalInOut: function(r) { return 0.5 * (1 - Math.cos(Math.PI * r)); }, exponentialIn: function(r) { return r === 0 ? 0 : Math.pow(1024, r - 1); }, exponentialOut: function(r) { return r === 1 ? 1 : 1 - Math.pow(2, -10 * r); }, exponentialInOut: function(r) { return r === 0 ? 0 : r === 1 ? 1 : (r *= 2) < 1 ? 0.5 * Math.pow(1024, r - 1) : 0.5 * (-Math.pow(2, -10 * (r - 1)) + 2); }, circularIn: function(r) { return 1 - Math.sqrt(1 - r * r); }, circularOut: function(r) { return Math.sqrt(1 - --r * r); }, circularInOut: function(r) { return (r *= 2) < 1 ? -0.5 * (Math.sqrt(1 - r * r) - 1) : 0.5 * (Math.sqrt(1 - (r -= 2) * r) + 1); }, elasticIn: function(r) { var e, t = 0.1, n = 0.4; return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = n / 4) : e = n * Math.asin(1 / t) / (2 * Math.PI), -(t * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / n))); }, elasticOut: function(r) { var e, t = 0.1, n = 0.4; return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = n / 4) : e = n * Math.asin(1 / t) / (2 * Math.PI), t * Math.pow(2, -10 * r) * Math.sin((r - e) * (2 * Math.PI) / n) + 1); }, elasticInOut: function(r) { var e, t = 0.1, n = 0.4; return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = n / 4) : e = n * Math.asin(1 / t) / (2 * Math.PI), (r *= 2) < 1 ? -0.5 * (t * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / n)) : t * Math.pow(2, -10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / n) * 0.5 + 1); }, backIn: function(r) { var e = 1.70158; return r * r * ((e + 1) * r - e); }, backOut: function(r) { var e = 1.70158; return --r * r * ((e + 1) * r + e) + 1; }, backInOut: function(r) { var e = 2.5949095; return (r *= 2) < 1 ? 0.5 * (r * r * ((e + 1) * r - e)) : 0.5 * ((r -= 2) * r * ((e + 1) * r + e) + 2); }, bounceIn: function(r) { return 1 - aS.bounceOut(1 - r); }, bounceOut: function(r) { return r < 1 / 2.75 ? 7.5625 * r * r : r < 2 / 2.75 ? 7.5625 * (r -= 1.5 / 2.75) * r + 0.75 : r < 2.5 / 2.75 ? 7.5625 * (r -= 2.25 / 2.75) * r + 0.9375 : 7.5625 * (r -= 2.625 / 2.75) * r + 0.984375; }, bounceInOut: function(r) { return r < 0.5 ? aS.bounceIn(r * 2) * 0.5 : aS.bounceOut(r * 2 - 1) * 0.5 + 0.5; } }; const WX = aS; var Rx = Math.pow, ph = Math.sqrt, aE = 1e-8, jX = 1e-4, t6 = ph(3), Nx = 1 / 3, Dl = pv(), Ys = pv(), Yg = pv(); function Jf(r) { return r > -aE && r < aE; } function YX(r) { return r > aE || r < -aE; } function $i(r, e, t, n, i) { var a = 1 - i; return a * a * (a * r + 3 * i * e) + i * i * (i * n + 3 * a * t); } function r6(r, e, t, n, i) { var a = 1 - i; return 3 * (((e - r) * a + 2 * (t - e) * i) * a + (n - t) * i * i); } function oE(r, e, t, n, i, a) { var o = n + 3 * (e - t) - r, s = 3 * (t - e * 2 + r), u = 3 * (e - r), l = r - i, c = s * s - 3 * o * u, f = s * u - 9 * o * l, h = u * u - 3 * s * l, p = 0; if (Jf(c) && Jf(f)) if (Jf(s)) a[0] = 0; else { var d = -u / s; d >= 0 && d <= 1 && (a[p++] = d); } else { var v = f * f - 4 * c * h; if (Jf(v)) { var g = f / c, d = -s / o + g, m = -g / 2; d >= 0 && d <= 1 && (a[p++] = d), m >= 0 && m <= 1 && (a[p++] = m); } else if (v > 0) { var y = ph(v), _ = c * s + 1.5 * o * (-f + y), w = c * s + 1.5 * o * (-f - y); _ < 0 ? _ = -Rx(-_, Nx) : _ = Rx(_, Nx), w < 0 ? w = -Rx(-w, Nx) : w = Rx(w, Nx); var d = (-s - (_ + w)) / (3 * o); d >= 0 && d <= 1 && (a[p++] = d); } else { var x = (2 * c * s - 3 * o * f) / (2 * ph(c * c * c)), C = Math.acos(x) / 3, S = ph(c), b = Math.cos(C), d = (-s - 2 * S * b) / (3 * o), m = (-s + S * (b + t6 * Math.sin(C))) / (3 * o), E = (-s + S * (b - t6 * Math.sin(C))) / (3 * o); d >= 0 && d <= 1 && (a[p++] = d), m >= 0 && m <= 1 && (a[p++] = m), E >= 0 && E <= 1 && (a[p++] = E); } } return p; } function XX(r, e, t, n, i) { var a = 6 * t - 12 * e + 6 * r, o = 9 * e + 3 * n - 3 * r - 9 * t, s = 3 * e - 3 * r, u = 0; if (Jf(o)) { if (YX(a)) { var l = -s / a; l >= 0 && l <= 1 && (i[u++] = l); } } else { var c = a * a - 4 * o * s; if (Jf(c)) i[0] = -a / (2 * o); else if (c > 0) { var f = ph(c), l = (-a + f) / (2 * o), h = (-a - f) / (2 * o); l >= 0 && l <= 1 && (i[u++] = l), h >= 0 && h <= 1 && (i[u++] = h); } } return u; } function Mh(r, e, t, n, i, a) { var o = (e - r) * i + r, s = (t - e) * i + e, u = (n - t) * i + t, l = (s - o) * i + o, c = (u - s) * i + s, f = (c - l) * i + l; a[0] = r, a[1] = o, a[2] = l, a[3] = f, a[4] = f, a[5] = c, a[6] = u, a[7] = n; } function qX(r, e, t, n, i, a, o, s, u, l, c) { var f, h = 5e-3, p = 1 / 0, d, v, g, m; Dl[0] = u, Dl[1] = l; for (var y = 0; y < 1; y += 0.05) Ys[0] = $i(r, t, i, o, y), Ys[1] = $i(e, n, a, s, y), g = Qp(Dl, Ys), g < p && (f = y, p = g); p = 1 / 0; for (var _ = 0; _ < 32 && !(h < jX); _++) d = f - h, v = f + h, Ys[0] = $i(r, t, i, o, d), Ys[1] = $i(e, n, a, s, d), g = Qp(Ys, Dl), d >= 0 && g < p ? (f = d, p = g) : (Yg[0] = $i(r, t, i, o, v), Yg[1] = $i(e, n, a, s, v), m = Qp(Yg, Dl), v <= 1 && m < p ? (f = v, p = m) : h *= 0.5); return c && (c[0] = $i(r, t, i, o, f), c[1] = $i(e, n, a, s, f)), ph(p); } function Hbe(r, e, t, n, i, a, o, s, u) { for (var l = r, c = e, f = 0, h = 1 / u, p = 1; p <= u; p++) { var d = p * h, v = $i(r, t, i, o, d), g = $i(e, n, a, s, d), m = v - l, y = g - c; f += Math.sqrt(m * m + y * y), l = v, c = g; } return f; } function ia(r, e, t, n) { var i = 1 - n; return i * (i * r + 2 * n * e) + n * n * t; } function wM(r, e, t, n) { return 2 * ((1 - n) * (e - r) + n * (t - e)); } function Ube(r, e, t, n, i) { var a = r - 2 * e + t, o = 2 * (e - r), s = r - n, u = 0; if (Jf(a)) { if (YX(o)) { var l = -s / o; l >= 0 && l <= 1 && (i[u++] = l); } } else { var c = o * o - 4 * a * s; if (Jf(c)) { var l = -o / (2 * a); l >= 0 && l <= 1 && (i[u++] = l); } else if (c > 0) { var f = ph(c), l = (-o + f) / (2 * a), h = (-o - f) / (2 * a); l >= 0 && l <= 1 && (i[u++] = l), h >= 0 && h <= 1 && (i[u++] = h); } } return u; } function ZX(r, e, t) { var n = r + t - 2 * e; return n === 0 ? 0.5 : (r - e) / n; } function h1(r, e, t, n, i) { var a = (e - r) * n + r, o = (t - e) * n + e, s = (o - a) * n + a; i[0] = r, i[1] = a, i[2] = s, i[3] = s, i[4] = o, i[5] = t; } function KX(r, e, t, n, i, a, o, s, u) { var l, c = 5e-3, f = 1 / 0; Dl[0] = o, Dl[1] = s; for (var h = 0; h < 1; h += 0.05) { Ys[0] = ia(r, t, i, h), Ys[1] = ia(e, n, a, h); var p = Qp(Dl, Ys); p < f && (l = h, f = p); } f = 1 / 0; for (var d = 0; d < 32 && !(c < jX); d++) { var v = l - c, g = l + c; Ys[0] = ia(r, t, i, v), Ys[1] = ia(e, n, a, v); var p = Qp(Ys, Dl); if (v >= 0 && p < f) l = v, f = p; else { Yg[0] = ia(r, t, i, g), Yg[1] = ia(e, n, a, g); var m = Qp(Yg, Dl); g <= 1 && m < f ? (l = g, f = m) : c *= 0.5; } } return u && (u[0] = ia(r, t, i, l), u[1] = ia(e, n, a, l)), ph(f); } function Wbe(r, e, t, n, i, a, o) { for (var s = r, u = e, l = 0, c = 1 / o, f = 1; f <= o; f++) { var h = f * c, p = ia(r, t, i, h), d = ia(e, n, a, h), v = p - s, g = d - u; l += Math.sqrt(v * v + g * g), s = p, u = d; } return l; } var jbe = /cubic-bezier\(([0-9,\.e ]+)\)/; function BN(r) { var e = r && jbe.exec(r); if (e) { var t = e[1].split(","), n = +Bu(t[0]), i = +Bu(t[1]), a = +Bu(t[2]), o = +Bu(t[3]); if (isNaN(n + i + a + o)) return; var s = []; return function(u) { return u <= 0 ? 0 : u >= 1 ? 1 : oE(0, n, a, 1, u, s) && $i(0, i, o, 1, s[0]); }; } } var Ybe = function() { function r(e) { this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = e.life || 1e3, this._delay = e.delay || 0, this.loop = e.loop || !1, this.onframe = e.onframe || ci, this.ondestroy = e.ondestroy || ci, this.onrestart = e.onrestart || ci, e.easing && this.setEasing(e.easing); } return r.prototype.step = function(e, t) { if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) { this._pausedTime += t; return; } var n = this._life, i = e - this._startTime - this._pausedTime, a = i / n; a < 0 && (a = 0), a = Math.min(a, 1); var o = this.easingFunc, s = o ? o(a) : a; if (this.onframe(s), a === 1) if (this.loop) { var u = i % n; this._startTime = e - u, this._pausedTime = 0, this.onrestart(); } else return !0; return !1; }, r.prototype.pause = function() { this._paused = !0; }, r.prototype.resume = function() { this._paused = !1; }, r.prototype.setEasing = function(e) { this.easing = e, this.easingFunc = ze(e) ? e : WX[e] || BN(e); }, r; }(); const Xbe = Ybe; var JX = function() { function r(e) { this.value = e; } return r; }(), qbe = function() { function r() { this._len = 0; } return r.prototype.insert = function(e) { var t = new JX(e); return this.insertEntry(t), t; }, r.prototype.insertEntry = function(e) { this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++; }, r.prototype.remove = function(e) { var t = e.prev, n = e.next; t ? t.next = n : this.head = n, n ? n.prev = t : this.tail = t, e.next = e.prev = null, this._len--; }, r.prototype.len = function() { return this._len; }, r.prototype.clear = function() { this.head = this.tail = null, this._len = 0; }, r; }(), Zbe = function() { function r(e) { this._list = new qbe(), this._maxSize = 10, this._map = {}, this._maxSize = e; } return r.prototype.put = function(e, t) { var n = this._list, i = this._map, a = null; if (i[e] == null) { var o = n.len(), s = this._lastRemovedEntry; if (o >= this._maxSize && o > 0) { var u = n.head; n.remove(u), delete i[u.key], a = u.value, this._lastRemovedEntry = u; } s ? s.value = t : s = new JX(t), s.key = e, n.insertEntry(s), i[e] = s; } return a; }, r.prototype.get = function(e) { var t = this._map[e], n = this._list; if (t != null) return t !== n.tail && (n.remove(t), n.insertEntry(t)), t.value; }, r.prototype.clear = function() { this._list.clear(), this._map = {}; }, r.prototype.len = function() { return this._list.len(); }, r; }(); const Dw = Zbe; var n6 = { transparent: [0, 0, 0, 0], aliceblue: [240, 248, 255, 1], antiquewhite: [250, 235, 215, 1], aqua: [0, 255, 255, 1], aquamarine: [127, 255, 212, 1], azure: [240, 255, 255, 1], beige: [245, 245, 220, 1], bisque: [255, 228, 196, 1], black: [0, 0, 0, 1], blanchedalmond: [255, 235, 205, 1], blue: [0, 0, 255, 1], blueviolet: [138, 43, 226, 1], brown: [165, 42, 42, 1], burlywood: [222, 184, 135, 1], cadetblue: [95, 158, 160, 1], chartreuse: [127, 255, 0, 1], chocolate: [210, 105, 30, 1], coral: [255, 127, 80, 1], cornflowerblue: [100, 149, 237, 1], cornsilk: [255, 248, 220, 1], crimson: [220, 20, 60, 1], cyan: [0, 255, 255, 1], darkblue: [0, 0, 139, 1], darkcyan: [0, 139, 139, 1], darkgoldenrod: [184, 134, 11, 1], darkgray: [169, 169, 169, 1], darkgreen: [0, 100, 0, 1], darkgrey: [169, 169, 169, 1], darkkhaki: [189, 183, 107, 1], darkmagenta: [139, 0, 139, 1], darkolivegreen: [85, 107, 47, 1], darkorange: [255, 140, 0, 1], darkorchid: [153, 50, 204, 1], darkred: [139, 0, 0, 1], darksalmon: [233, 150, 122, 1], darkseagreen: [143, 188, 143, 1], darkslateblue: [72, 61, 139, 1], darkslategray: [47, 79, 79, 1], darkslategrey: [47, 79, 79, 1], darkturquoise: [0, 206, 209, 1], darkviolet: [148, 0, 211, 1], deeppink: [255, 20, 147, 1], deepskyblue: [0, 191, 255, 1], dimgray: [105, 105, 105, 1], dimgrey: [105, 105, 105, 1], dodgerblue: [30, 144, 255, 1], firebrick: [178, 34, 34, 1], floralwhite: [255, 250, 240, 1], forestgreen: [34, 139, 34, 1], fuchsia: [255, 0, 255, 1], gainsboro: [220, 220, 220, 1], ghostwhite: [248, 248, 255, 1], gold: [255, 215, 0, 1], goldenrod: [218, 165, 32, 1], gray: [128, 128, 128, 1], green: [0, 128, 0, 1], greenyellow: [173, 255, 47, 1], grey: [128, 128, 128, 1], honeydew: [240, 255, 240, 1], hotpink: [255, 105, 180, 1], indianred: [205, 92, 92, 1], indigo: [75, 0, 130, 1], ivory: [255, 255, 240, 1], khaki: [240, 230, 140, 1], lavender: [230, 230, 250, 1], lavenderblush: [255, 240, 245, 1], lawngreen: [124, 252, 0, 1], lemonchiffon: [255, 250, 205, 1], lightblue: [173, 216, 230, 1], lightcoral: [240, 128, 128, 1], lightcyan: [224, 255, 255, 1], lightgoldenrodyellow: [250, 250, 210, 1], lightgray: [211, 211, 211, 1], lightgreen: [144, 238, 144, 1], lightgrey: [211, 211, 211, 1], lightpink: [255, 182, 193, 1], lightsalmon: [255, 160, 122, 1], lightseagreen: [32, 178, 170, 1], lightskyblue: [135, 206, 250, 1], lightslategray: [119, 136, 153, 1], lightslategrey: [119, 136, 153, 1], lightsteelblue: [176, 196, 222, 1], lightyellow: [255, 255, 224, 1], lime: [0, 255, 0, 1], limegreen: [50, 205, 50, 1], linen: [250, 240, 230, 1], magenta: [255, 0, 255, 1], maroon: [128, 0, 0, 1], mediumaquamarine: [102, 205, 170, 1], mediumblue: [0, 0, 205, 1], mediumorchid: [186, 85, 211, 1], mediumpurple: [147, 112, 219, 1], mediumseagreen: [60, 179, 113, 1], mediumslateblue: [123, 104, 238, 1], mediumspringgreen: [0, 250, 154, 1], mediumturquoise: [72, 209, 204, 1], mediumvioletred: [199, 21, 133, 1], midnightblue: [25, 25, 112, 1], mintcream: [245, 255, 250, 1], mistyrose: [255, 228, 225, 1], moccasin: [255, 228, 181, 1], navajowhite: [255, 222, 173, 1], navy: [0, 0, 128, 1], oldlace: [253, 245, 230, 1], olive: [128, 128, 0, 1], olivedrab: [107, 142, 35, 1], orange: [255, 165, 0, 1], orangered: [255, 69, 0, 1], orchid: [218, 112, 214, 1], palegoldenrod: [238, 232, 170, 1], palegreen: [152, 251, 152, 1], paleturquoise: [175, 238, 238, 1], palevioletred: [219, 112, 147, 1], papayawhip: [255, 239, 213, 1], peachpuff: [255, 218, 185, 1], peru: [205, 133, 63, 1], pink: [255, 192, 203, 1], plum: [221, 160, 221, 1], powderblue: [176, 224, 230, 1], purple: [128, 0, 128, 1], red: [255, 0, 0, 1], rosybrown: [188, 143, 143, 1], royalblue: [65, 105, 225, 1], saddlebrown: [139, 69, 19, 1], salmon: [250, 128, 114, 1], sandybrown: [244, 164, 96, 1], seagreen: [46, 139, 87, 1], seashell: [255, 245, 238, 1], sienna: [160, 82, 45, 1], silver: [192, 192, 192, 1], skyblue: [135, 206, 235, 1], slateblue: [106, 90, 205, 1], slategray: [112, 128, 144, 1], slategrey: [112, 128, 144, 1], snow: [255, 250, 250, 1], springgreen: [0, 255, 127, 1], steelblue: [70, 130, 180, 1], tan: [210, 180, 140, 1], teal: [0, 128, 128, 1], thistle: [216, 191, 216, 1], tomato: [255, 99, 71, 1], turquoise: [64, 224, 208, 1], violet: [238, 130, 238, 1], wheat: [245, 222, 179, 1], white: [255, 255, 255, 1], whitesmoke: [245, 245, 245, 1], yellow: [255, 255, 0, 1], yellowgreen: [154, 205, 50, 1] }; function Hu(r) { return r = Math.round(r), r < 0 ? 0 : r > 255 ? 255 : r; } function Kbe(r) { return r = Math.round(r), r < 0 ? 0 : r > 360 ? 360 : r; } function p1(r) { return r < 0 ? 0 : r > 1 ? 1 : r; } function EI(r) { var e = r; return e.length && e.charAt(e.length - 1) === "%" ? Hu(parseFloat(e) / 100 * 255) : Hu(parseInt(e, 10)); } function Dm(r) { var e = r; return e.length && e.charAt(e.length - 1) === "%" ? p1(parseFloat(e) / 100) : p1(parseFloat(e)); } function bI(r, e, t) { return t < 0 ? t += 1 : t > 1 && (t -= 1), t * 6 < 1 ? r + (e - r) * t * 6 : t * 2 < 1 ? e : t * 3 < 2 ? r + (e - r) * (2 / 3 - t) * 6 : r; } function Qf(r, e, t) { return r + (e - r) * t; } function ks(r, e, t, n, i) { return r[0] = e, r[1] = t, r[2] = n, r[3] = i, r; } function xM(r, e) { return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r; } var QX = new Dw(20), Fx = null; function Fv(r, e) { Fx && xM(Fx, e), Fx = QX.put(r, Fx || e.slice()); } function hs(r, e) { if (!!r) { e = e || []; var t = QX.get(r); if (t) return xM(e, t); r = r + ""; var n = r.replace(/ /g, "").toLowerCase(); if (n in n6) return xM(e, n6[n]), Fv(r, e), e; var i = n.length; if (n.charAt(0) === "#") { if (i === 4 || i === 5) { var a = parseInt(n.slice(1, 4), 16); if (!(a >= 0 && a <= 4095)) { ks(e, 0, 0, 0, 1); return; } return ks(e, (a & 3840) >> 4 | (a & 3840) >> 8, a & 240 | (a & 240) >> 4, a & 15 | (a & 15) << 4, i === 5 ? parseInt(n.slice(4), 16) / 15 : 1), Fv(r, e), e; } else if (i === 7 || i === 9) { var a = parseInt(n.slice(1, 7), 16); if (!(a >= 0 && a <= 16777215)) { ks(e, 0, 0, 0, 1); return; } return ks(e, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255, i === 9 ? parseInt(n.slice(7), 16) / 255 : 1), Fv(r, e), e; } return; } var o = n.indexOf("("), s = n.indexOf(")"); if (o !== -1 && s + 1 === i) { var u = n.substr(0, o), l = n.substr(o + 1, s - (o + 1)).split(","), c = 1; switch (u) { case "rgba": if (l.length !== 4) return l.length === 3 ? ks(e, +l[0], +l[1], +l[2], 1) : ks(e, 0, 0, 0, 1); c = Dm(l.pop()); case "rgb": if (l.length !== 3) { ks(e, 0, 0, 0, 1); return; } return ks(e, EI(l[0]), EI(l[1]), EI(l[2]), c), Fv(r, e), e; case "hsla": if (l.length !== 4) { ks(e, 0, 0, 0, 1); return; } return l[3] = Dm(l[3]), CM(l, e), Fv(r, e), e; case "hsl": if (l.length !== 3) { ks(e, 0, 0, 0, 1); return; } return CM(l, e), Fv(r, e), e; default: return; } } ks(e, 0, 0, 0, 1); } } function CM(r, e) { var t = (parseFloat(r[0]) % 360 + 360) % 360 / 360, n = Dm(r[1]), i = Dm(r[2]), a = i <= 0.5 ? i * (n + 1) : i + n - i * n, o = i * 2 - a; return e = e || [], ks(e, Hu(bI(o, a, t + 1 / 3) * 255), Hu(bI(o, a, t) * 255), Hu(bI(o, a, t - 1 / 3) * 255), 1), r.length === 4 && (e[3] = r[3]), e; } function Jbe(r) { if (!!r) { var e = r[0] / 255, t = r[1] / 255, n = r[2] / 255, i = Math.min(e, t, n), a = Math.max(e, t, n), o = a - i, s = (a + i) / 2, u, l; if (o === 0) u = 0, l = 0; else { s < 0.5 ? l = o / (a + i) : l = o / (2 - a - i); var c = ((a - e) / 6 + o / 2) / o, f = ((a - t) / 6 + o / 2) / o, h = ((a - n) / 6 + o / 2) / o; e === a ? u = h - f : t === a ? u = 1 / 3 + c - h : n === a && (u = 2 / 3 + f - c), u < 0 && (u += 1), u > 1 && (u -= 1); } var p = [u * 360, l, s]; return r[3] != null && p.push(r[3]), p; } } function SM(r, e) { var t = hs(r); if (t) { for (var n = 0; n < 3; n++) e < 0 ? t[n] = t[n] * (1 - e) | 0 : t[n] = (255 - t[n]) * e + t[n] | 0, t[n] > 255 ? t[n] = 255 : t[n] < 0 && (t[n] = 0); return Fc(t, t.length === 4 ? "rgba" : "rgb"); } } function TI(r, e, t) { if (!(!(e && e.length) || !(r >= 0 && r <= 1))) { t = t || []; var n = r * (e.length - 1), i = Math.floor(n), a = Math.ceil(n), o = e[i], s = e[a], u = n - i; return t[0] = Hu(Qf(o[0], s[0], u)), t[1] = Hu(Qf(o[1], s[1], u)), t[2] = Hu(Qf(o[2], s[2], u)), t[3] = p1(Qf(o[3], s[3], u)), t; } } function Qbe(r, e, t) { if (!(!(e && e.length) || !(r >= 0 && r <= 1))) { var n = r * (e.length - 1), i = Math.floor(n), a = Math.ceil(n), o = hs(e[i]), s = hs(e[a]), u = n - i, l = Fc([ Hu(Qf(o[0], s[0], u)), Hu(Qf(o[1], s[1], u)), Hu(Qf(o[2], s[2], u)), p1(Qf(o[3], s[3], u)) ], "rgba"); return t ? { color: l, leftIndex: i, rightIndex: a, value: n } : l; } } function d_(r, e, t, n) { var i = hs(r); if (r) return i = Jbe(i), e != null && (i[0] = Kbe(e)), t != null && (i[1] = Dm(t)), n != null && (i[2] = Dm(n)), Fc(CM(i), "rgba"); } function sE(r, e) { var t = hs(r); if (t && e != null) return t[3] = p1(e), Fc(t, "rgba"); } function Fc(r, e) { if (!(!r || !r.length)) { var t = r[0] + "," + r[1] + "," + r[2]; return (e === "rgba" || e === "hsva" || e === "hsla") && (t += "," + r[3]), e + "(" + t + ")"; } } function uE(r, e) { var t = hs(r); return t ? (0.299 * t[0] + 0.587 * t[1] + 0.114 * t[2]) * t[3] / 255 + (1 - t[3]) * e : 0; } var lE = Math.round; function Mm(r) { var e; if (!r || r === "transparent") r = "none"; else if (typeof r == "string" && r.indexOf("rgba") > -1) { var t = hs(r); t && (r = "rgb(" + t[0] + "," + t[1] + "," + t[2] + ")", e = t[3]); } return { color: r, opacity: e == null ? 1 : e }; } var i6 = 1e-4; function eh(r) { return r < i6 && r > -i6; } function Bx(r) { return lE(r * 1e3) / 1e3; } function EM(r) { return lE(r * 1e4) / 1e4; } function eTe(r) { return "matrix(" + Bx(r[0]) + "," + Bx(r[1]) + "," + Bx(r[2]) + "," + Bx(r[3]) + "," + EM(r[4]) + "," + EM(r[5]) + ")"; } var tTe = { left: "start", right: "end", center: "middle", middle: "middle" }; function rTe(r, e, t) { return t === "top" ? r += e / 2 : t === "bottom" && (r -= e / 2), r; } function nTe(r) { return r && (r.shadowBlur || r.shadowOffsetX || r.shadowOffsetY); } function iTe(r) { var e = r.style, t = r.getGlobalScale(); return [ e.shadowColor, (e.shadowBlur || 0).toFixed(2), (e.shadowOffsetX || 0).toFixed(2), (e.shadowOffsetY || 0).toFixed(2), t[0], t[1] ].join(","); } function eq(r) { return r && !!r.image; } function aTe(r) { return r && !!r.svgElement; } function oTe(r) { return eq(r) || aTe(r); } function tq(r) { return r.type === "linear"; } function rq(r) { return r.type === "radial"; } function sTe(r) { return r && (r.type === "linear" || r.type === "radial"); } function MT(r) { return "url(#" + r + ")"; } function nq(r) { var e = r.getGlobalScale(), t = Math.max(e[0], e[1]); return Math.max(Math.ceil(Math.log(t) / Math.log(10)), 1); } function iq(r) { var e = r.x || 0, t = r.y || 0, n = (r.rotation || 0) * rS, i = wt(r.scaleX, 1), a = wt(r.scaleY, 1), o = r.skewX || 0, s = r.skewY || 0, u = []; return (e || t) && u.push("translate(" + e + "px," + t + "px)"), n && u.push("rotate(" + n + ")"), (i !== 1 || a !== 1) && u.push("scale(" + i + "," + a + ")"), (o || s) && u.push("skew(" + lE(o * rS) + "deg, " + lE(s * rS) + "deg)"), u.join(" "); } var uTe = function() { return wr.hasGlobalWindow && ze(window.btoa) ? function(r) { return window.btoa(unescape(r)); } : typeof Buffer < "u" ? function(r) { return Buffer.from(r).toString("base64"); } : function(r) { return process.env.NODE_ENV !== "production" && zu("Base64 isn't natively supported in the current environment."), null; }; }(), bM = Array.prototype.slice; function mc(r, e, t) { return (e - r) * t + r; } function PI(r, e, t, n) { for (var i = e.length, a = 0; a < i; a++) r[a] = mc(e[a], t[a], n); return r; } function lTe(r, e, t, n) { for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) { r[o] || (r[o] = []); for (var s = 0; s < a; s++) r[o][s] = mc(e[o][s], t[o][s], n); } return r; } function kx(r, e, t, n) { for (var i = e.length, a = 0; a < i; a++) r[a] = e[a] + t[a] * n; return r; } function a6(r, e, t, n) { for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) { r[o] || (r[o] = []); for (var s = 0; s < a; s++) r[o][s] = e[o][s] + t[o][s] * n; } return r; } function cTe(r, e) { for (var t = r.length, n = e.length, i = t > n ? e : r, a = Math.min(t, n), o = i[a - 1] || { color: [0, 0, 0, 0], offset: 0 }, s = a; s < Math.max(t, n); s++) i.push({ offset: o.offset, color: o.color.slice() }); } function fTe(r, e, t) { var n = r, i = e; if (!(!n.push || !i.push)) { var a = n.length, o = i.length; if (a !== o) { var s = a > o; if (s) n.length = o; else for (var u = a; u < o; u++) n.push(t === 1 ? i[u] : bM.call(i[u])); } for (var l = n[0] && n[0].length, u = 0; u < n.length; u++) if (t === 1) isNaN(n[u]) && (n[u] = i[u]); else for (var c = 0; c < l; c++) isNaN(n[u][c]) && (n[u][c] = i[u][c]); } } function v_(r) { if (eo(r)) { var e = r.length; if (eo(r[0])) { for (var t = [], n = 0; n < e; n++) t.push(bM.call(r[n])); return t; } return bM.call(r); } return r; } function oS(r) { return r[0] = Math.floor(r[0]) || 0, r[1] = Math.floor(r[1]) || 0, r[2] = Math.floor(r[2]) || 0, r[3] = r[3] == null ? 1 : r[3], "rgba(" + r.join(",") + ")"; } function hTe(r) { return eo(r && r[0]) ? 2 : 1; } var Vx = 0, sS = 1, aq = 2, U0 = 3, TM = 4, PM = 5, o6 = 6; function s6(r) { return r === TM || r === PM; } function Gx(r) { return r === sS || r === aq; } var e0 = [0, 0, 0, 0], pTe = function() { function r(e) { this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e; } return r.prototype.isFinished = function() { return this._finished; }, r.prototype.setFinished = function() { this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished(); }, r.prototype.needsAnimate = function() { return this.keyframes.length >= 1; }, r.prototype.getAdditiveTrack = function() { return this._additiveTrack; }, r.prototype.addKeyframe = function(e, t, n) { this._needsSort = !0; var i = this.keyframes, a = i.length, o = !1, s = o6, u = t; if (eo(t)) { var l = hTe(t); s = l, (l === 1 && !$t(t[0]) || l === 2 && !$t(t[0][0])) && (o = !0); } else if ($t(t) && !kd(t)) s = Vx; else if (Se(t)) if (!isNaN(+t)) s = Vx; else { var c = hs(t); c && (u = c, s = U0); } else if (LT(t)) { var f = oe({}, u); f.colorStops = ce(t.colorStops, function(p) { return { offset: p.offset, color: hs(p.color) }; }), tq(t) ? s = TM : rq(t) && (s = PM), u = f; } a === 0 ? this.valType = s : (s !== this.valType || s === o6) && (o = !0), this.discrete = this.discrete || o; var h = { time: e, value: u, rawValue: t, percent: 0 }; return n && (h.easing = n, h.easingFunc = ze(n) ? n : WX[n] || BN(n)), i.push(h), h; }, r.prototype.prepare = function(e, t) { var n = this.keyframes; this._needsSort && n.sort(function(v, g) { return v.time - g.time; }); for (var i = this.valType, a = n.length, o = n[a - 1], s = this.discrete, u = Gx(i), l = s6(i), c = 0; c < a; c++) { var f = n[c], h = f.value, p = o.value; f.percent = f.time / e, s || (u && c !== a - 1 ? fTe(h, p, i) : l && cTe(h.colorStops, p.colorStops)); } if (!s && i !== PM && t && this.needsAnimate() && t.needsAnimate() && i === t.valType && !t._finished) { this._additiveTrack = t; for (var d = n[0].value, c = 0; c < a; c++) i === Vx ? n[c].additiveValue = n[c].value - d : i === U0 ? n[c].additiveValue = kx([], n[c].value, d, -1) : Gx(i) && (n[c].additiveValue = i === sS ? kx([], n[c].value, d, -1) : a6([], n[c].value, d, -1)); } }, r.prototype.step = function(e, t) { if (!this._finished) { this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null); var n = this._additiveTrack != null, i = n ? "additiveValue" : "value", a = this.valType, o = this.keyframes, s = o.length, u = this.propName, l = a === U0, c, f = this._lastFr, h = Math.min, p, d; if (s === 1) p = d = o[0]; else { if (t < 0) c = 0; else if (t < this._lastFrP) { var v = h(f + 1, s - 1); for (c = v; c >= 0 && !(o[c].percent <= t); c--) ; c = h(c, s - 2); } else { for (c = f; c < s && !(o[c].percent > t); c++) ; c = h(c - 1, s - 2); } d = o[c + 1], p = o[c]; } if (!!(p && d)) { this._lastFr = c, this._lastFrP = t; var g = d.percent - p.percent, m = g === 0 ? 1 : h((t - p.percent) / g, 1); d.easingFunc && (m = d.easingFunc(m)); var y = n ? this._additiveValue : l ? e0 : e[u]; if ((Gx(a) || l) && !y && (y = this._additiveValue = []), this.discrete) e[u] = m < 1 ? p.rawValue : d.rawValue; else if (Gx(a)) a === sS ? PI(y, p[i], d[i], m) : lTe(y, p[i], d[i], m); else if (s6(a)) { var _ = p[i], w = d[i], x = a === TM; e[u] = { type: x ? "linear" : "radial", x: mc(_.x, w.x, m), y: mc(_.y, w.y, m), colorStops: ce(_.colorStops, function(S, b) { var E = w.colorStops[b]; return { offset: mc(S.offset, E.offset, m), color: oS(PI([], S.color, E.color, m)) }; }), global: w.global }, x ? (e[u].x2 = mc(_.x2, w.x2, m), e[u].y2 = mc(_.y2, w.y2, m)) : e[u].r = mc(_.r, w.r, m); } else if (l) PI(y, p[i], d[i], m), n || (e[u] = oS(y)); else { var C = mc(p[i], d[i], m); n ? this._additiveValue = C : e[u] = C; } n && this._addToTarget(e); } } }, r.prototype._addToTarget = function(e) { var t = this.valType, n = this.propName, i = this._additiveValue; t === Vx ? e[n] = e[n] + i : t === U0 ? (hs(e[n], e0), kx(e0, e0, i, 1), e[n] = oS(e0)) : t === sS ? kx(e[n], e[n], i, 1) : t === aq && a6(e[n], e[n], i, 1); }, r; }(), kN = function() { function r(e, t, n, i) { if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = t, t && i) { zu("Can' use additive animation on looped animation."); return; } this._additiveAnimators = i, this._allowDiscrete = n; } return r.prototype.getMaxTime = function() { return this._maxTime; }, r.prototype.getDelay = function() { return this._delay; }, r.prototype.getLoop = function() { return this._loop; }, r.prototype.getTarget = function() { return this._target; }, r.prototype.changeTarget = function(e) { this._target = e; }, r.prototype.when = function(e, t, n) { return this.whenWithKeys(e, t, At(t), n); }, r.prototype.whenWithKeys = function(e, t, n, i) { for (var a = this._tracks, o = 0; o < n.length; o++) { var s = n[o], u = a[s]; if (!u) { u = a[s] = new pTe(s); var l = void 0, c = this._getAdditiveTrack(s); if (c) { var f = c.keyframes, h = f[f.length - 1]; l = h && h.value, c.valType === U0 && l && (l = oS(l)); } else l = this._target[s]; if (l == null) continue; e > 0 && u.addKeyframe(0, v_(l), i), this._trackKeys.push(s); } u.addKeyframe(e, v_(t[s]), i); } return this._maxTime = Math.max(this._maxTime, e), this; }, r.prototype.pause = function() { this._clip.pause(), this._paused = !0; }, r.prototype.resume = function() { this._clip.resume(), this._paused = !1; }, r.prototype.isPaused = function() { return !!this._paused; }, r.prototype.duration = function(e) { return this._maxTime = e, this._force = !0, this; }, r.prototype._doneCallback = function() { this._setTracksFinished(), this._clip = null; var e = this._doneCbs; if (e) for (var t = e.length, n = 0; n < t; n++) e[n].call(this); }, r.prototype._abortedCallback = function() { this._setTracksFinished(); var e = this.animation, t = this._abortedCbs; if (e && e.removeClip(this._clip), this._clip = null, t) for (var n = 0; n < t.length; n++) t[n].call(this); }, r.prototype._setTracksFinished = function() { for (var e = this._tracks, t = this._trackKeys, n = 0; n < t.length; n++) e[t[n]].setFinished(); }, r.prototype._getAdditiveTrack = function(e) { var t, n = this._additiveAnimators; if (n) for (var i = 0; i < n.length; i++) { var a = n[i].getTrack(e); a && (t = a); } return t; }, r.prototype.start = function(e) { if (!(this._started > 0)) { this._started = 1; for (var t = this, n = [], i = this._maxTime || 0, a = 0; a < this._trackKeys.length; a++) { var o = this._trackKeys[a], s = this._tracks[o], u = this._getAdditiveTrack(o), l = s.keyframes, c = l.length; if (s.prepare(i, u), s.needsAnimate()) if (!this._allowDiscrete && s.discrete) { var f = l[c - 1]; f && (t._target[s.propName] = f.rawValue), s.setFinished(); } else n.push(s); } if (n.length || this._force) { var h = new Xbe({ life: i, loop: this._loop, delay: this._delay || 0, onframe: function(p) { t._started = 2; var d = t._additiveAnimators; if (d) { for (var v = !1, g = 0; g < d.length; g++) if (d[g]._clip) { v = !0; break; } v || (t._additiveAnimators = null); } for (var g = 0; g < n.length; g++) n[g].step(t._target, p); var m = t._onframeCbs; if (m) for (var g = 0; g < m.length; g++) m[g](t._target, p); }, ondestroy: function() { t._doneCallback(); } }); this._clip = h, this.animation && this.animation.addClip(h), e && h.setEasing(e); } else this._doneCallback(); return this; } }, r.prototype.stop = function(e) { if (!!this._clip) { var t = this._clip; e && t.onframe(1), this._abortedCallback(); } }, r.prototype.delay = function(e) { return this._delay = e, this; }, r.prototype.during = function(e) { return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this; }, r.prototype.done = function(e) { return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this; }, r.prototype.aborted = function(e) { return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this; }, r.prototype.getClip = function() { return this._clip; }, r.prototype.getTrack = function(e) { return this._tracks[e]; }, r.prototype.getTracks = function() { var e = this; return ce(this._trackKeys, function(t) { return e._tracks[t]; }); }, r.prototype.stopTracks = function(e, t) { if (!e.length || !this._clip) return !0; for (var n = this._tracks, i = this._trackKeys, a = 0; a < e.length; a++) { var o = n[e[a]]; o && !o.isFinished() && (t ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished()); } for (var s = !0, a = 0; a < i.length; a++) if (!n[i[a]].isFinished()) { s = !1; break; } return s && this._abortedCallback(), s; }, r.prototype.saveTo = function(e, t, n) { if (!!e) { t = t || this._trackKeys; for (var i = 0; i < t.length; i++) { var a = t[i], o = this._tracks[a]; if (!(!o || o.isFinished())) { var s = o.keyframes, u = s[n ? 0 : s.length - 1]; u && (e[a] = v_(u.rawValue)); } } } }, r.prototype.__changeFinalValue = function(e, t) { t = t || At(e); for (var n = 0; n < t.length; n++) { var i = t[n], a = this._tracks[i]; if (!!a) { var o = a.keyframes; if (o.length > 1) { var s = o.pop(); a.addKeyframe(s.time, e[i]), a.prepare(this._maxTime, a.getAdditiveTrack()); } } } }, r; }(); function Dg() { return new Date().getTime(); } var dTe = function(r) { W(e, r); function e(t) { var n = r.call(this) || this; return n._running = !1, n._time = 0, n._pausedTime = 0, n._pauseStart = 0, n._paused = !1, t = t || {}, n.stage = t.stage || {}, n; } return e.prototype.addClip = function(t) { t.animation && this.removeClip(t), this._head ? (this._tail.next = t, t.prev = this._tail, t.next = null, this._tail = t) : this._head = this._tail = t, t.animation = this; }, e.prototype.addAnimator = function(t) { t.animation = this; var n = t.getClip(); n && this.addClip(n); }, e.prototype.removeClip = function(t) { if (!!t.animation) { var n = t.prev, i = t.next; n ? n.next = i : this._head = i, i ? i.prev = n : this._tail = n, t.next = t.prev = t.animation = null; } }, e.prototype.removeAnimator = function(t) { var n = t.getClip(); n && this.removeClip(n), t.animation = null; }, e.prototype.update = function(t) { for (var n = Dg() - this._pausedTime, i = n - this._time, a = this._head; a; ) { var o = a.next, s = a.step(n, i); s && (a.ondestroy(), this.removeClip(a)), a = o; } this._time = n, t || (this.trigger("frame", i), this.stage.update && this.stage.update()); }, e.prototype._startLoop = function() { var t = this; this._running = !0; function n() { t._running && (_M(n), !t._paused && t.update()); } _M(n); }, e.prototype.start = function() { this._running || (this._time = Dg(), this._pausedTime = 0, this._startLoop()); }, e.prototype.stop = function() { this._running = !1; }, e.prototype.pause = function() { this._paused || (this._pauseStart = Dg(), this._paused = !0); }, e.prototype.resume = function() { this._paused && (this._pausedTime += Dg() - this._pauseStart, this._paused = !1); }, e.prototype.clear = function() { for (var t = this._head; t; ) { var n = t.next; t.prev = t.next = t.animation = null, t = n; } this._head = this._tail = null; }, e.prototype.isFinished = function() { return this._head == null; }, e.prototype.animate = function(t, n) { n = n || {}, this.start(); var i = new kN(t, n.loop); return this.addAnimator(i), i; }, e; }(Cu); const vTe = dTe; var gTe = 300, II = wr.domSupported, AI = function() { var r = [ "click", "dblclick", "mousewheel", "wheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu" ], e = [ "touchstart", "touchend", "touchmove" ], t = { pointerdown: 1, pointerup: 1, pointermove: 1, pointerout: 1 }, n = ce(r, function(i) { var a = i.replace("mouse", "pointer"); return t.hasOwnProperty(a) ? a : i; }); return { mouse: r, touch: e, pointer: n }; }(), u6 = { mouse: ["mousemove", "mouseup"], pointer: ["pointermove", "pointerup"] }, l6 = !1; function IM(r) { var e = r.pointerType; return e === "pen" || e === "touch"; } function mTe(r) { r.touching = !0, r.touchTimer != null && (clearTimeout(r.touchTimer), r.touchTimer = null), r.touchTimer = setTimeout(function() { r.touching = !1, r.touchTimer = null; }, 700); } function LI(r) { r && (r.zrByTouch = !0); } function yTe(r, e) { return zs(r.dom, new _Te(r, e), !0); } function oq(r, e) { for (var t = e, n = !1; t && t.nodeType !== 9 && !(n = t.domBelongToZr || t !== e && t === r.painterRoot); ) t = t.parentNode; return n; } var _Te = function() { function r(e, t) { this.stopPropagation = ci, this.stopImmediatePropagation = ci, this.preventDefault = ci, this.type = t.type, this.target = this.currentTarget = e.dom, this.pointerType = t.pointerType, this.clientX = t.clientX, this.clientY = t.clientY; } return r; }(), Au = { mousedown: function(r) { r = zs(this.dom, r), this.__mayPointerCapture = [r.zrX, r.zrY], this.trigger("mousedown", r); }, mousemove: function(r) { r = zs(this.dom, r); var e = this.__mayPointerCapture; e && (r.zrX !== e[0] || r.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", r); }, mouseup: function(r) { r = zs(this.dom, r), this.__togglePointerCapture(!1), this.trigger("mouseup", r); }, mouseout: function(r) { r = zs(this.dom, r); var e = r.toElement || r.relatedTarget; oq(this, e) || (this.__pointerCapturing && (r.zrEventControl = "no_globalout"), this.trigger("mouseout", r)); }, wheel: function(r) { l6 = !0, r = zs(this.dom, r), this.trigger("mousewheel", r); }, mousewheel: function(r) { l6 || (r = zs(this.dom, r), this.trigger("mousewheel", r)); }, touchstart: function(r) { r = zs(this.dom, r), LI(r), this.__lastTouchMoment = new Date(), this.handler.processGesture(r, "start"), Au.mousemove.call(this, r), Au.mousedown.call(this, r); }, touchmove: function(r) { r = zs(this.dom, r), LI(r), this.handler.processGesture(r, "change"), Au.mousemove.call(this, r); }, touchend: function(r) { r = zs(this.dom, r), LI(r), this.handler.processGesture(r, "end"), Au.mouseup.call(this, r), +new Date() - +this.__lastTouchMoment < gTe && Au.click.call(this, r); }, pointerdown: function(r) { Au.mousedown.call(this, r); }, pointermove: function(r) { IM(r) || Au.mousemove.call(this, r); }, pointerup: function(r) { Au.mouseup.call(this, r); }, pointerout: function(r) { IM(r) || Au.mouseout.call(this, r); } }; M(["click", "dblclick", "contextmenu"], function(r) { Au[r] = function(e) { e = zs(this.dom, e), this.trigger(r, e); }; }); var AM = { pointermove: function(r) { IM(r) || AM.mousemove.call(this, r); }, pointerup: function(r) { AM.mouseup.call(this, r); }, mousemove: function(r) { this.trigger("mousemove", r); }, mouseup: function(r) { var e = this.__pointerCapturing; this.__togglePointerCapture(!1), this.trigger("mouseup", r), e && (r.zrEventControl = "only_globalout", this.trigger("mouseout", r)); } }; function wTe(r, e) { var t = e.domHandlers; wr.pointerEventsSupported ? M(AI.pointer, function(n) { uS(e, n, function(i) { t[n].call(r, i); }); }) : (wr.touchEventsSupported && M(AI.touch, function(n) { uS(e, n, function(i) { t[n].call(r, i), mTe(e); }); }), M(AI.mouse, function(n) { uS(e, n, function(i) { i = FN(i), e.touching || t[n].call(r, i); }); })); } function xTe(r, e) { wr.pointerEventsSupported ? M(u6.pointer, t) : wr.touchEventsSupported || M(u6.mouse, t); function t(n) { function i(a) { a = FN(a), oq(r, a.target) || (a = yTe(r, a), e.domHandlers[n].call(r, a)); } uS(e, n, i, { capture: !0 }); } } function uS(r, e, t, n) { r.mounted[e] = t, r.listenerOpts[e] = n, yM(r.domTarget, e, t, n); } function DI(r) { var e = r.mounted; for (var t in e) e.hasOwnProperty(t) && Abe(r.domTarget, t, e[t], r.listenerOpts[t]); r.mounted = {}; } var c6 = function() { function r(e, t) { this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = t; } return r; }(), CTe = function(r) { W(e, r); function e(t, n) { var i = r.call(this) || this; return i.__pointerCapturing = !1, i.dom = t, i.painterRoot = n, i._localHandlerScope = new c6(t, Au), II && (i._globalHandlerScope = new c6(document, AM)), wTe(i, i._localHandlerScope), i; } return e.prototype.dispose = function() { DI(this._localHandlerScope), II && DI(this._globalHandlerScope); }, e.prototype.setCursor = function(t) { this.dom.style && (this.dom.style.cursor = t || "default"); }, e.prototype.__togglePointerCapture = function(t) { if (this.__mayPointerCapture = null, II && +this.__pointerCapturing ^ +t) { this.__pointerCapturing = t; var n = this._globalHandlerScope; t ? xTe(this, n) : DI(n); } }, e; }(Cu); const STe = CTe; var sq = 1; wr.hasGlobalWindow && (sq = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1)); var cE = sq, LM = 0.4, DM = "#333", MM = "#ccc", ETe = "#eee"; function xs() { return [1, 0, 0, 1, 0, 0]; } function OT(r) { return r[0] = 1, r[1] = 0, r[2] = 0, r[3] = 1, r[4] = 0, r[5] = 0, r; } function VN(r, e) { return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r; } function Bc(r, e, t) { var n = e[0] * t[0] + e[2] * t[1], i = e[1] * t[0] + e[3] * t[1], a = e[0] * t[2] + e[2] * t[3], o = e[1] * t[2] + e[3] * t[3], s = e[0] * t[4] + e[2] * t[5] + e[4], u = e[1] * t[4] + e[3] * t[5] + e[5]; return r[0] = n, r[1] = i, r[2] = a, r[3] = o, r[4] = s, r[5] = u, r; } function Jl(r, e, t) { return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4] + t[0], r[5] = e[5] + t[1], r; } function dv(r, e, t) { var n = e[0], i = e[2], a = e[4], o = e[1], s = e[3], u = e[5], l = Math.sin(t), c = Math.cos(t); return r[0] = n * c + o * l, r[1] = -n * l + o * c, r[2] = i * c + s * l, r[3] = -i * l + c * s, r[4] = c * a + l * u, r[5] = c * u - l * a, r; } function GN(r, e, t) { var n = t[0], i = t[1]; return r[0] = e[0] * n, r[1] = e[1] * i, r[2] = e[2] * n, r[3] = e[3] * i, r[4] = e[4] * n, r[5] = e[5] * i, r; } function yy(r, e) { var t = e[0], n = e[2], i = e[4], a = e[1], o = e[3], s = e[5], u = t * o - a * n; return u ? (u = 1 / u, r[0] = o * u, r[1] = -a * u, r[2] = -n * u, r[3] = t * u, r[4] = (n * s - o * i) * u, r[5] = (a * i - t * s) * u, r) : null; } function bTe(r) { var e = xs(); return VN(e, r), e; } var f6 = OT, h6 = 5e-5; function ep(r) { return r > h6 || r < -h6; } var tp = [], Bv = [], MI = xs(), OI = Math.abs, TTe = function() { function r() { } return r.prototype.getLocalTransform = function(e) { return r.getLocalTransform(this, e); }, r.prototype.setPosition = function(e) { this.x = e[0], this.y = e[1]; }, r.prototype.setScale = function(e) { this.scaleX = e[0], this.scaleY = e[1]; }, r.prototype.setSkew = function(e) { this.skewX = e[0], this.skewY = e[1]; }, r.prototype.setOrigin = function(e) { this.originX = e[0], this.originY = e[1]; }, r.prototype.needLocalTransform = function() { return ep(this.rotation) || ep(this.x) || ep(this.y) || ep(this.scaleX - 1) || ep(this.scaleY - 1) || ep(this.skewX) || ep(this.skewY); }, r.prototype.updateTransform = function() { var e = this.parent && this.parent.transform, t = this.needLocalTransform(), n = this.transform; if (!(t || e)) { n && f6(n); return; } n = n || xs(), t ? this.getLocalTransform(n) : f6(n), e && (t ? Bc(n, e, n) : VN(n, e)), this.transform = n, this._resolveGlobalScaleRatio(n); }, r.prototype._resolveGlobalScaleRatio = function(e) { var t = this.globalScaleRatio; if (t != null && t !== 1) { this.getGlobalScale(tp); var n = tp[0] < 0 ? -1 : 1, i = tp[1] < 0 ? -1 : 1, a = ((tp[0] - n) * t + n) / tp[0] || 0, o = ((tp[1] - i) * t + i) / tp[1] || 0; e[0] *= a, e[1] *= a, e[2] *= o, e[3] *= o; } this.invTransform = this.invTransform || xs(), yy(this.invTransform, e); }, r.prototype.getComputedTransform = function() { for (var e = this, t = []; e; ) t.push(e), e = e.parent; for (; e = t.pop(); ) e.updateTransform(); return this.transform; }, r.prototype.setLocalTransform = function(e) { if (!!e) { var t = e[0] * e[0] + e[1] * e[1], n = e[2] * e[2] + e[3] * e[3], i = Math.atan2(e[1], e[0]), a = Math.PI / 2 + i - Math.atan2(e[3], e[2]); n = Math.sqrt(n) * Math.cos(a), t = Math.sqrt(t), this.skewX = a, this.skewY = 0, this.rotation = -i, this.x = +e[4], this.y = +e[5], this.scaleX = t, this.scaleY = n, this.originX = 0, this.originY = 0; } }, r.prototype.decomposeTransform = function() { if (!!this.transform) { var e = this.parent, t = this.transform; e && e.transform && (Bc(Bv, e.invTransform, t), t = Bv); var n = this.originX, i = this.originY; (n || i) && (MI[4] = n, MI[5] = i, Bc(Bv, t, MI), Bv[4] -= n, Bv[5] -= i, t = Bv), this.setLocalTransform(t); } }, r.prototype.getGlobalScale = function(e) { var t = this.transform; return e = e || [], t ? (e[0] = Math.sqrt(t[0] * t[0] + t[1] * t[1]), e[1] = Math.sqrt(t[2] * t[2] + t[3] * t[3]), t[0] < 0 && (e[0] = -e[0]), t[3] < 0 && (e[1] = -e[1]), e) : (e[0] = 1, e[1] = 1, e); }, r.prototype.transformCoordToLocal = function(e, t) { var n = [e, t], i = this.invTransform; return i && Ia(n, n, i), n; }, r.prototype.transformCoordToGlobal = function(e, t) { var n = [e, t], i = this.transform; return i && Ia(n, n, i), n; }, r.prototype.getLineScale = function() { var e = this.transform; return e && OI(e[0] - 1) > 1e-10 && OI(e[3] - 1) > 1e-10 ? Math.sqrt(OI(e[0] * e[3] - e[2] * e[1])) : 1; }, r.prototype.copyTransform = function(e) { uq(this, e); }, r.getLocalTransform = function(e, t) { t = t || []; var n = e.originX || 0, i = e.originY || 0, a = e.scaleX, o = e.scaleY, s = e.anchorX, u = e.anchorY, l = e.rotation || 0, c = e.x, f = e.y, h = e.skewX ? Math.tan(e.skewX) : 0, p = e.skewY ? Math.tan(-e.skewY) : 0; if (n || i || s || u) { var d = n + s, v = i + u; t[4] = -d * a - h * v * o, t[5] = -v * o - p * d * a; } else t[4] = t[5] = 0; return t[0] = a, t[3] = o, t[1] = p * a, t[2] = h * o, l && dv(t, t, l), t[4] += n + c, t[5] += i + f, t; }, r.initDefaultProps = function() { var e = r.prototype; e.scaleX = e.scaleY = e.globalScaleRatio = 1, e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0; }(), r; }(), Ql = [ "x", "y", "originX", "originY", "anchorX", "anchorY", "rotation", "scaleX", "scaleY", "skewX", "skewY" ]; function uq(r, e) { for (var t = 0; t < Ql.length; t++) { var n = Ql[t]; r[n] = e[n]; } } const Ic = TTe; var PTe = function() { function r(e, t) { this.x = e || 0, this.y = t || 0; } return r.prototype.copy = function(e) { return this.x = e.x, this.y = e.y, this; }, r.prototype.clone = function() { return new r(this.x, this.y); }, r.prototype.set = function(e, t) { return this.x = e, this.y = t, this; }, r.prototype.equal = function(e) { return e.x === this.x && e.y === this.y; }, r.prototype.add = function(e) { return this.x += e.x, this.y += e.y, this; }, r.prototype.scale = function(e) { this.x *= e, this.y *= e; }, r.prototype.scaleAndAdd = function(e, t) { this.x += e.x * t, this.y += e.y * t; }, r.prototype.sub = function(e) { return this.x -= e.x, this.y -= e.y, this; }, r.prototype.dot = function(e) { return this.x * e.x + this.y * e.y; }, r.prototype.len = function() { return Math.sqrt(this.x * this.x + this.y * this.y); }, r.prototype.lenSquare = function() { return this.x * this.x + this.y * this.y; }, r.prototype.normalize = function() { var e = this.len(); return this.x /= e, this.y /= e, this; }, r.prototype.distance = function(e) { var t = this.x - e.x, n = this.y - e.y; return Math.sqrt(t * t + n * n); }, r.prototype.distanceSquare = function(e) { var t = this.x - e.x, n = this.y - e.y; return t * t + n * n; }, r.prototype.negate = function() { return this.x = -this.x, this.y = -this.y, this; }, r.prototype.transform = function(e) { if (!!e) { var t = this.x, n = this.y; return this.x = e[0] * t + e[2] * n + e[4], this.y = e[1] * t + e[3] * n + e[5], this; } }, r.prototype.toArray = function(e) { return e[0] = this.x, e[1] = this.y, e; }, r.prototype.fromArray = function(e) { this.x = e[0], this.y = e[1]; }, r.set = function(e, t, n) { e.x = t, e.y = n; }, r.copy = function(e, t) { e.x = t.x, e.y = t.y; }, r.len = function(e) { return Math.sqrt(e.x * e.x + e.y * e.y); }, r.lenSquare = function(e) { return e.x * e.x + e.y * e.y; }, r.dot = function(e, t) { return e.x * t.x + e.y * t.y; }, r.add = function(e, t, n) { e.x = t.x + n.x, e.y = t.y + n.y; }, r.sub = function(e, t, n) { e.x = t.x - n.x, e.y = t.y - n.y; }, r.scale = function(e, t, n) { e.x = t.x * n, e.y = t.y * n; }, r.scaleAndAdd = function(e, t, n, i) { e.x = t.x + n.x * i, e.y = t.y + n.y * i; }, r.lerp = function(e, t, n, i) { var a = 1 - i; e.x = a * t.x + i * n.x, e.y = a * t.y + i * n.y; }, r; }(); const ft = PTe; var zx = Math.min, $x = Math.max, rp = new ft(), np = new ft(), ip = new ft(), ap = new ft(), t0 = new ft(), r0 = new ft(), ITe = function() { function r(e, t, n, i) { n < 0 && (e = e + n, n = -n), i < 0 && (t = t + i, i = -i), this.x = e, this.y = t, this.width = n, this.height = i; } return r.prototype.union = function(e) { var t = zx(e.x, this.x), n = zx(e.y, this.y); isFinite(this.x) && isFinite(this.width) ? this.width = $x(e.x + e.width, this.x + this.width) - t : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = $x(e.y + e.height, this.y + this.height) - n : this.height = e.height, this.x = t, this.y = n; }, r.prototype.applyTransform = function(e) { r.applyTransform(this, this, e); }, r.prototype.calculateTransform = function(e) { var t = this, n = e.width / t.width, i = e.height / t.height, a = xs(); return Jl(a, a, [-t.x, -t.y]), GN(a, a, [n, i]), Jl(a, a, [e.x, e.y]), a; }, r.prototype.intersect = function(e, t) { if (!e) return !1; e instanceof r || (e = r.create(e)); var n = this, i = n.x, a = n.x + n.width, o = n.y, s = n.y + n.height, u = e.x, l = e.x + e.width, c = e.y, f = e.y + e.height, h = !(a < u || l < i || s < c || f < o); if (t) { var p = 1 / 0, d = 0, v = Math.abs(a - u), g = Math.abs(l - i), m = Math.abs(s - c), y = Math.abs(f - o), _ = Math.min(v, g), w = Math.min(m, y); a < u || l < i ? _ > d && (d = _, v < g ? ft.set(r0, -v, 0) : ft.set(r0, g, 0)) : _ < p && (p = _, v < g ? ft.set(t0, v, 0) : ft.set(t0, -g, 0)), s < c || f < o ? w > d && (d = w, m < y ? ft.set(r0, 0, -m) : ft.set(r0, 0, y)) : _ < p && (p = _, m < y ? ft.set(t0, 0, m) : ft.set(t0, 0, -y)); } return t && ft.copy(t, h ? t0 : r0), h; }, r.prototype.contain = function(e, t) { var n = this; return e >= n.x && e <= n.x + n.width && t >= n.y && t <= n.y + n.height; }, r.prototype.clone = function() { return new r(this.x, this.y, this.width, this.height); }, r.prototype.copy = function(e) { r.copy(this, e); }, r.prototype.plain = function() { return { x: this.x, y: this.y, width: this.width, height: this.height }; }, r.prototype.isFinite = function() { return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height); }, r.prototype.isZero = function() { return this.width === 0 || this.height === 0; }, r.create = function(e) { return new r(e.x, e.y, e.width, e.height); }, r.copy = function(e, t) { e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height; }, r.applyTransform = function(e, t, n) { if (!n) { e !== t && r.copy(e, t); return; } if (n[1] < 1e-5 && n[1] > -1e-5 && n[2] < 1e-5 && n[2] > -1e-5) { var i = n[0], a = n[3], o = n[4], s = n[5]; e.x = t.x * i + o, e.y = t.y * a + s, e.width = t.width * i, e.height = t.height * a, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height); return; } rp.x = ip.x = t.x, rp.y = ap.y = t.y, np.x = ap.x = t.x + t.width, np.y = ip.y = t.y + t.height, rp.transform(n), ap.transform(n), np.transform(n), ip.transform(n), e.x = zx(rp.x, np.x, ip.x, ap.x), e.y = zx(rp.y, np.y, ip.y, ap.y); var u = $x(rp.x, np.x, ip.x, ap.x), l = $x(rp.y, np.y, ip.y, ap.y); e.width = u - e.x, e.height = l - e.y; }, r; }(); const gt = ITe; var p6 = {}; function ps(r, e) { e = e || Dh; var t = p6[e]; t || (t = p6[e] = new Dw(500)); var n = t.get(r); return n == null && (n = tf.measureText(r, e).width, t.put(r, n)), n; } function d6(r, e, t, n) { var i = ps(r, e), a = RT(e), o = W0(0, i, t), s = gg(0, a, n), u = new gt(o, s, i, a); return u; } function Mw(r, e, t, n) { var i = ((r || "") + "").split(` `), a = i.length; if (a === 1) return d6(i[0], e, t, n); for (var o = new gt(0, 0, 0, 0), s = 0; s < i.length; s++) { var u = d6(i[s], e, t, n); s === 0 ? o.copy(u) : o.union(u); } return o; } function W0(r, e, t) { return t === "right" ? r -= e : t === "center" && (r -= e / 2), r; } function gg(r, e, t) { return t === "middle" ? r -= e / 2 : t === "bottom" && (r -= e), r; } function RT(r) { return ps("\u56FD", r); } function tl(r, e) { return typeof r == "string" ? r.lastIndexOf("%") >= 0 ? parseFloat(r) / 100 * e : parseFloat(r) : r; } function fE(r, e, t) { var n = e.position || "inside", i = e.distance != null ? e.distance : 5, a = t.height, o = t.width, s = a / 2, u = t.x, l = t.y, c = "left", f = "top"; if (n instanceof Array) u += tl(n[0], t.width), l += tl(n[1], t.height), c = null, f = null; else switch (n) { case "left": u -= i, l += s, c = "right", f = "middle"; break; case "right": u += i + o, l += s, f = "middle"; break; case "top": u += o / 2, l -= i, c = "center", f = "bottom"; break; case "bottom": u += o / 2, l += a + i, c = "center"; break; case "inside": u += o / 2, l += s, c = "center", f = "middle"; break; case "insideLeft": u += i, l += s, f = "middle"; break; case "insideRight": u += o - i, l += s, c = "right", f = "middle"; break; case "insideTop": u += o / 2, l += i, c = "center"; break; case "insideBottom": u += o / 2, l += a - i, c = "center", f = "bottom"; break; case "insideTopLeft": u += i, l += i; break; case "insideTopRight": u += o - i, l += i, c = "right"; break; case "insideBottomLeft": u += i, l += a - i, f = "bottom"; break; case "insideBottomRight": u += o - i, l += a - i, c = "right", f = "bottom"; break; } return r = r || {}, r.x = u, r.y = l, r.align = c, r.verticalAlign = f, r; } var RI = "__zr_normal__", NI = Ql.concat(["ignore"]), ATe = Kl(Ql, function(r, e) { return r[e] = !0, r; }, { ignore: !1 }), kv = {}, LTe = new gt(0, 0, 0, 0), zN = function() { function r(e) { this.id = NX(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e); } return r.prototype._init = function(e) { this.attr(e); }, r.prototype.drift = function(e, t, n) { switch (this.draggable) { case "horizontal": t = 0; break; case "vertical": e = 0; break; } var i = this.transform; i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += e, i[5] += t, this.decomposeTransform(), this.markRedraw(); }, r.prototype.beforeUpdate = function() { }, r.prototype.afterUpdate = function() { }, r.prototype.update = function() { this.updateTransform(), this.__dirty && this.updateInnerText(); }, r.prototype.updateInnerText = function(e) { var t = this._textContent; if (t && (!t.ignore || e)) { this.textConfig || (this.textConfig = {}); var n = this.textConfig, i = n.local, a = t.innerTransformable, o = void 0, s = void 0, u = !1; a.parent = i ? this : null; var l = !1; if (a.copyTransform(t), n.position != null) { var c = LTe; n.layoutRect ? c.copy(n.layoutRect) : c.copy(this.getBoundingRect()), i || c.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(kv, n, c) : fE(kv, n, c), a.x = kv.x, a.y = kv.y, o = kv.align, s = kv.verticalAlign; var f = n.origin; if (f && n.rotation != null) { var h = void 0, p = void 0; f === "center" ? (h = c.width * 0.5, p = c.height * 0.5) : (h = tl(f[0], c.width), p = tl(f[1], c.height)), l = !0, a.originX = -a.x + h + (i ? 0 : c.x), a.originY = -a.y + p + (i ? 0 : c.y); } } n.rotation != null && (a.rotation = n.rotation); var d = n.offset; d && (a.x += d[0], a.y += d[1], l || (a.originX = -d[0], a.originY = -d[1])); var v = n.inside == null ? typeof n.position == "string" && n.position.indexOf("inside") >= 0 : n.inside, g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}), m = void 0, y = void 0, _ = void 0; v && this.canBeInsideText() ? (m = n.insideFill, y = n.insideStroke, (m == null || m === "auto") && (m = this.getInsideTextFill()), (y == null || y === "auto") && (y = this.getInsideTextStroke(m), _ = !0)) : (m = n.outsideFill, y = n.outsideStroke, (m == null || m === "auto") && (m = this.getOutsideFill()), (y == null || y === "auto") && (y = this.getOutsideStroke(m), _ = !0)), m = m || "#000", (m !== g.fill || y !== g.stroke || _ !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (u = !0, g.fill = m, g.stroke = y, g.autoStroke = _, g.align = o, g.verticalAlign = s, t.setDefaultTextStyle(g)), t.__dirty |= as, u && t.dirtyStyle(!0); } }, r.prototype.canBeInsideText = function() { return !0; }, r.prototype.getInsideTextFill = function() { return "#fff"; }, r.prototype.getInsideTextStroke = function(e) { return "#000"; }, r.prototype.getOutsideFill = function() { return this.__zr && this.__zr.isDarkMode() ? MM : DM; }, r.prototype.getOutsideStroke = function(e) { var t = this.__zr && this.__zr.getBackgroundColor(), n = typeof t == "string" && hs(t); n || (n = [255, 255, 255, 1]); for (var i = n[3], a = this.__zr.isDarkMode(), o = 0; o < 3; o++) n[o] = n[o] * i + (a ? 0 : 255) * (1 - i); return n[3] = 1, Fc(n, "rgba"); }, r.prototype.traverse = function(e, t) { }, r.prototype.attrKV = function(e, t) { e === "textConfig" ? this.setTextConfig(t) : e === "textContent" ? this.setTextContent(t) : e === "clipPath" ? this.setClipPath(t) : e === "extra" ? (this.extra = this.extra || {}, oe(this.extra, t)) : this[e] = t; }, r.prototype.hide = function() { this.ignore = !0, this.markRedraw(); }, r.prototype.show = function() { this.ignore = !1, this.markRedraw(); }, r.prototype.attr = function(e, t) { if (typeof e == "string") this.attrKV(e, t); else if (Xe(e)) for (var n = e, i = At(n), a = 0; a < i.length; a++) { var o = i[a]; this.attrKV(o, e[o]); } return this.markRedraw(), this; }, r.prototype.saveCurrentToNormalState = function(e) { this._innerSaveToNormal(e); for (var t = this._normalState, n = 0; n < this.animators.length; n++) { var i = this.animators[n], a = i.__fromStateTransition; if (!(i.getLoop() || a && a !== RI)) { var o = i.targetName, s = o ? t[o] : t; i.saveTo(s); } } }, r.prototype._innerSaveToNormal = function(e) { var t = this._normalState; t || (t = this._normalState = {}), e.textConfig && !t.textConfig && (t.textConfig = this.textConfig), this._savePrimaryToNormal(e, t, NI); }, r.prototype._savePrimaryToNormal = function(e, t, n) { for (var i = 0; i < n.length; i++) { var a = n[i]; e[a] != null && !(a in t) && (t[a] = this[a]); } }, r.prototype.hasState = function() { return this.currentStates.length > 0; }, r.prototype.getState = function(e) { return this.states[e]; }, r.prototype.ensureState = function(e) { var t = this.states; return t[e] || (t[e] = {}), t[e]; }, r.prototype.clearStates = function(e) { this.useState(RI, !1, e); }, r.prototype.useState = function(e, t, n, i) { var a = e === RI, o = this.hasState(); if (!(!o && a)) { var s = this.currentStates, u = this.stateTransition; if (!(_t(s, e) >= 0 && (t || s.length === 1))) { var l; if (this.stateProxy && !a && (l = this.stateProxy(e)), l || (l = this.states && this.states[e]), !l && !a) { zu("State " + e + " not exists."); return; } a || this.saveCurrentToNormalState(l); var c = !!(l && l.hoverLayer || i); c && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, l, this._normalState, t, !n && !this.__inHover && u && u.duration > 0, u); var f = this._textContent, h = this._textGuide; return f && f.useState(e, t, n, c), h && h.useState(e, t, n, c), a ? (this.currentStates = [], this._normalState = {}) : t ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~as), l; } } }, r.prototype.useStates = function(e, t, n) { if (!e.length) this.clearStates(); else { var i = [], a = this.currentStates, o = e.length, s = o === a.length; if (s) { for (var u = 0; u < o; u++) if (e[u] !== a[u]) { s = !1; break; } } if (s) return; for (var u = 0; u < o; u++) { var l = e[u], c = void 0; this.stateProxy && (c = this.stateProxy(l, e)), c || (c = this.states[l]), c && i.push(c); } var f = i[o - 1], h = !!(f && f.hoverLayer || n); h && this._toggleHoverLayerFlag(!0); var p = this._mergeStates(i), d = this.stateTransition; this.saveCurrentToNormalState(p), this._applyStateObj(e.join(","), p, this._normalState, !1, !t && !this.__inHover && d && d.duration > 0, d); var v = this._textContent, g = this._textGuide; v && v.useStates(e, t, h), g && g.useStates(e, t, h), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !h && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~as); } }, r.prototype._updateAnimationTargets = function() { for (var e = 0; e < this.animators.length; e++) { var t = this.animators[e]; t.targetName && t.changeTarget(this[t.targetName]); } }, r.prototype.removeState = function(e) { var t = _t(this.currentStates, e); if (t >= 0) { var n = this.currentStates.slice(); n.splice(t, 1), this.useStates(n); } }, r.prototype.replaceState = function(e, t, n) { var i = this.currentStates.slice(), a = _t(i, e), o = _t(i, t) >= 0; a >= 0 ? o ? i.splice(a, 1) : i[a] = t : n && !o && i.push(t), this.useStates(i); }, r.prototype.toggleState = function(e, t) { t ? this.useState(e, !0) : this.removeState(e); }, r.prototype._mergeStates = function(e) { for (var t = {}, n, i = 0; i < e.length; i++) { var a = e[i]; oe(t, a), a.textConfig && (n = n || {}, oe(n, a.textConfig)); } return n && (t.textConfig = n), t; }, r.prototype._applyStateObj = function(e, t, n, i, a, o) { var s = !(t && i); t && t.textConfig ? (this.textConfig = oe({}, i ? this.textConfig : n.textConfig), oe(this.textConfig, t.textConfig)) : s && n.textConfig && (this.textConfig = n.textConfig); for (var u = {}, l = !1, c = 0; c < NI.length; c++) { var f = NI[c], h = a && ATe[f]; t && t[f] != null ? h ? (l = !0, u[f] = t[f]) : this[f] = t[f] : s && n[f] != null && (h ? (l = !0, u[f] = n[f]) : this[f] = n[f]); } if (!a) for (var c = 0; c < this.animators.length; c++) { var p = this.animators[c], d = p.targetName; p.getLoop() || p.__changeFinalValue(d ? (t || n)[d] : t || n); } l && this._transitionState(e, u, o); }, r.prototype._attachComponent = function(e) { if (e.__zr && !e.__hostTarget) { if (process.env.NODE_ENV !== "production") throw new Error("Text element has been added to zrender."); return; } if (e === this) { if (process.env.NODE_ENV !== "production") throw new Error("Recursive component attachment."); return; } var t = this.__zr; t && e.addSelfToZr(t), e.__zr = t, e.__hostTarget = this; }, r.prototype._detachComponent = function(e) { e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null; }, r.prototype.getClipPath = function() { return this._clipPath; }, r.prototype.setClipPath = function(e) { this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw(); }, r.prototype.removeClipPath = function() { var e = this._clipPath; e && (this._detachComponent(e), this._clipPath = null, this.markRedraw()); }, r.prototype.getTextContent = function() { return this._textContent; }, r.prototype.setTextContent = function(e) { var t = this._textContent; if (t !== e) { if (t && t !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget) throw new Error("Text element has been added to zrender."); e.innerTransformable = new Ic(), this._attachComponent(e), this._textContent = e, this.markRedraw(); } }, r.prototype.setTextConfig = function(e) { this.textConfig || (this.textConfig = {}), oe(this.textConfig, e), this.markRedraw(); }, r.prototype.removeTextConfig = function() { this.textConfig = null, this.markRedraw(); }, r.prototype.removeTextContent = function() { var e = this._textContent; e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw()); }, r.prototype.getTextGuideLine = function() { return this._textGuide; }, r.prototype.setTextGuideLine = function(e) { this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw(); }, r.prototype.removeTextGuideLine = function() { var e = this._textGuide; e && (this._detachComponent(e), this._textGuide = null, this.markRedraw()); }, r.prototype.markRedraw = function() { this.__dirty |= as; var e = this.__zr; e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw(); }, r.prototype.dirty = function() { this.markRedraw(); }, r.prototype._toggleHoverLayerFlag = function(e) { this.__inHover = e; var t = this._textContent, n = this._textGuide; t && (t.__inHover = e), n && (n.__inHover = e); }, r.prototype.addSelfToZr = function(e) { if (this.__zr !== e) { this.__zr = e; var t = this.animators; if (t) for (var n = 0; n < t.length; n++) e.animation.addAnimator(t[n]); this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e); } }, r.prototype.removeSelfFromZr = function(e) { if (!!this.__zr) { this.__zr = null; var t = this.animators; if (t) for (var n = 0; n < t.length; n++) e.animation.removeAnimator(t[n]); this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e); } }, r.prototype.animate = function(e, t, n) { var i = e ? this[e] : this; if (process.env.NODE_ENV !== "production" && !i) { zu('Property "' + e + '" is not existed in element ' + this.id); return; } var a = new kN(i, t, n); return e && (a.targetName = e), this.addAnimator(a, e), a; }, r.prototype.addAnimator = function(e, t) { var n = this.__zr, i = this; e.during(function() { i.updateDuringAnimation(t); }).done(function() { var a = i.animators, o = _t(a, e); o >= 0 && a.splice(o, 1); }), this.animators.push(e), n && n.animation.addAnimator(e), n && n.wakeUp(); }, r.prototype.updateDuringAnimation = function(e) { this.markRedraw(); }, r.prototype.stopAnimation = function(e, t) { for (var n = this.animators, i = n.length, a = [], o = 0; o < i; o++) { var s = n[o]; !e || e === s.scope ? s.stop(t) : a.push(s); } return this.animators = a, this; }, r.prototype.animateTo = function(e, t, n) { FI(this, e, t, n); }, r.prototype.animateFrom = function(e, t, n) { FI(this, e, t, n, !0); }, r.prototype._transitionState = function(e, t, n, i) { for (var a = FI(this, t, n, i), o = 0; o < a.length; o++) a[o].__fromStateTransition = e; }, r.prototype.getBoundingRect = function() { return null; }, r.prototype.getPaintRect = function() { return null; }, r.initDefaultProps = function() { var e = r.prototype; e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = as; var t = {}; function n(a, o, s) { t[a + o + s] || (console.warn("DEPRECATED: '" + a + "' has been deprecated. use '" + o + "', '" + s + "' instead"), t[a + o + s] = !0); } function i(a, o, s, u) { Object.defineProperty(e, a, { get: function() { if (process.env.NODE_ENV !== "production" && n(a, s, u), !this[o]) { var c = this[o] = []; l(this, c); } return this[o]; }, set: function(c) { process.env.NODE_ENV !== "production" && n(a, s, u), this[s] = c[0], this[u] = c[1], this[o] = c, l(this, c); } }); function l(c, f) { Object.defineProperty(f, 0, { get: function() { return c[s]; }, set: function(h) { c[s] = h; } }), Object.defineProperty(f, 1, { get: function() { return c[u]; }, set: function(h) { c[u] = h; } }); } } Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY")); }(), r; }(); gi(zN, Cu); gi(zN, Ic); function FI(r, e, t, n, i) { t = t || {}; var a = []; lq(r, "", r, e, t, n, a, i); var o = a.length, s = !1, u = t.done, l = t.aborted, c = function() { s = !0, o--, o <= 0 && (s ? u && u() : l && l()); }, f = function() { o--, o <= 0 && (s ? u && u() : l && l()); }; o || u && u(), a.length > 0 && t.during && a[0].during(function(d, v) { t.during(v); }); for (var h = 0; h < a.length; h++) { var p = a[h]; c && p.done(c), f && p.aborted(f), t.force && p.duration(t.duration), p.start(t.easing); } return a; } function BI(r, e, t) { for (var n = 0; n < t; n++) r[n] = e[n]; } function DTe(r) { return eo(r[0]); } function MTe(r, e, t) { if (eo(e[t])) if (eo(r[t]) || (r[t] = []), zo(e[t])) { var n = e[t].length; r[t].length !== n && (r[t] = new e[t].constructor(n), BI(r[t], e[t], n)); } else { var i = e[t], a = r[t], o = i.length; if (DTe(i)) for (var s = i[0].length, u = 0; u < o; u++) a[u] ? BI(a[u], i[u], s) : a[u] = Array.prototype.slice.call(i[u]); else BI(a, i, o); a.length = i.length; } else r[t] = e[t]; } function OTe(r, e) { return r === e || eo(r) && eo(e) && RTe(r, e); } function RTe(r, e) { var t = r.length; if (t !== e.length) return !1; for (var n = 0; n < t; n++) if (r[n] !== e[n]) return !1; return !0; } function lq(r, e, t, n, i, a, o, s) { for (var u = At(n), l = i.duration, c = i.delay, f = i.additive, h = i.setToFinal, p = !Xe(a), d = r.animators, v = [], g = 0; g < u.length; g++) { var m = u[g], y = n[m]; if (y != null && t[m] != null && (p || a[m])) if (Xe(y) && !eo(y) && !LT(y)) { if (e) { s || (t[m] = y, r.updateDuringAnimation(e)); continue; } lq(r, m, t[m], y, i, a && a[m], o, s); } else v.push(m); else s || (t[m] = y, r.updateDuringAnimation(e), v.push(m)); } var _ = v.length; if (!f && _) for (var w = 0; w < d.length; w++) { var x = d[w]; if (x.targetName === e) { var C = x.stopTracks(v); if (C) { var S = _t(d, x); d.splice(S, 1); } } } if (i.force || (v = Wr(v, function(P) { return !OTe(n[P], t[P]); }), _ = v.length), _ > 0 || i.force && !o.length) { var b = void 0, E = void 0, T = void 0; if (s) { E = {}, h && (b = {}); for (var w = 0; w < _; w++) { var m = v[w]; E[m] = t[m], h ? b[m] = n[m] : t[m] = n[m]; } } else if (h) { T = {}; for (var w = 0; w < _; w++) { var m = v[w]; T[m] = v_(t[m]), MTe(t, n, m); } } var x = new kN(t, !1, !1, f ? Wr(d, function(I) { return I.targetName === e; }) : null); x.targetName = e, i.scope && (x.scope = i.scope), h && b && x.whenWithKeys(0, b, v), T && x.whenWithKeys(0, T, v), x.whenWithKeys(l == null ? 500 : l, s ? E : n, v).delay(c || 0), r.addAnimator(x, e), o.push(x); } } const cq = zN; var fq = function(r) { W(e, r); function e(t) { var n = r.call(this) || this; return n.isGroup = !0, n._children = [], n.attr(t), n; } return e.prototype.childrenRef = function() { return this._children; }, e.prototype.children = function() { return this._children.slice(); }, e.prototype.childAt = function(t) { return this._children[t]; }, e.prototype.childOfName = function(t) { for (var n = this._children, i = 0; i < n.length; i++) if (n[i].name === t) return n[i]; }, e.prototype.childCount = function() { return this._children.length; }, e.prototype.add = function(t) { if (t && (t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), process.env.NODE_ENV !== "production" && t.__hostTarget)) throw "This elemenet has been used as an attachment"; return this; }, e.prototype.addBefore = function(t, n) { if (t && t !== this && t.parent !== this && n && n.parent === this) { var i = this._children, a = i.indexOf(n); a >= 0 && (i.splice(a, 0, t), this._doAdd(t)); } return this; }, e.prototype.replace = function(t, n) { var i = _t(this._children, t); return i >= 0 && this.replaceAt(n, i), this; }, e.prototype.replaceAt = function(t, n) { var i = this._children, a = i[n]; if (t && t !== this && t.parent !== this && t !== a) { i[n] = t, a.parent = null; var o = this.__zr; o && a.removeSelfFromZr(o), this._doAdd(t); } return this; }, e.prototype._doAdd = function(t) { t.parent && t.parent.remove(t), t.parent = this; var n = this.__zr; n && n !== t.__zr && t.addSelfToZr(n), n && n.refresh(); }, e.prototype.remove = function(t) { var n = this.__zr, i = this._children, a = _t(i, t); return a < 0 ? this : (i.splice(a, 1), t.parent = null, n && t.removeSelfFromZr(n), n && n.refresh(), this); }, e.prototype.removeAll = function() { for (var t = this._children, n = this.__zr, i = 0; i < t.length; i++) { var a = t[i]; n && a.removeSelfFromZr(n), a.parent = null; } return t.length = 0, this; }, e.prototype.eachChild = function(t, n) { for (var i = this._children, a = 0; a < i.length; a++) { var o = i[a]; t.call(n, o, a); } return this; }, e.prototype.traverse = function(t, n) { for (var i = 0; i < this._children.length; i++) { var a = this._children[i], o = t.call(n, a); a.isGroup && !o && a.traverse(t, n); } return this; }, e.prototype.addSelfToZr = function(t) { r.prototype.addSelfToZr.call(this, t); for (var n = 0; n < this._children.length; n++) { var i = this._children[n]; i.addSelfToZr(t); } }, e.prototype.removeSelfFromZr = function(t) { r.prototype.removeSelfFromZr.call(this, t); for (var n = 0; n < this._children.length; n++) { var i = this._children[n]; i.removeSelfFromZr(t); } }, e.prototype.getBoundingRect = function(t) { for (var n = new gt(0, 0, 0, 0), i = t || this._children, a = [], o = null, s = 0; s < i.length; s++) { var u = i[s]; if (!(u.ignore || u.invisible)) { var l = u.getBoundingRect(), c = u.getLocalTransform(a); c ? (gt.applyTransform(n, l, c), o = o || n.clone(), o.union(n)) : (o = o || l.clone(), o.union(l)); } } return o || n; }, e; }(cq); fq.prototype.type = "group"; const rt = fq; /*! * ZRender, a high performance 2d drawing library. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt */ var j0 = {}, hq = {}; function NTe(r) { delete hq[r]; } function FTe(r) { if (!r) return !1; if (typeof r == "string") return uE(r, 1) < LM; if (r.colorStops) { for (var e = r.colorStops, t = 0, n = e.length, i = 0; i < n; i++) t += uE(e[i].color, 1); return t /= n, t < LM; } return !1; } var BTe = function() { function r(e, t, n) { var i = this; this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, n = n || {}, this.dom = t, this.id = e; var a = new $be(), o = n.renderer || "canvas"; if (j0[o] || (o = At(j0)[0]), process.env.NODE_ENV !== "production" && !j0[o]) throw new Error("Renderer '" + o + "' is not imported. Please import it first."); n.useDirtyRect = n.useDirtyRect == null ? !1 : n.useDirtyRect; var s = new j0[o](t, a, n, e), u = n.ssr || s.ssrOnly; this.storage = a, this.painter = s; var l = !wr.node && !wr.worker && !u ? new STe(s.getViewportRoot(), s.root) : null; this.handler = new Bbe(a, s, l, s.root), this.animation = new vTe({ stage: { update: u ? null : function() { return i._flush(!0); } } }), u || this.animation.start(); } return r.prototype.add = function(e) { !e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh()); }, r.prototype.remove = function(e) { !e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh()); }, r.prototype.configLayer = function(e, t) { this.painter.configLayer && this.painter.configLayer(e, t), this.refresh(); }, r.prototype.setBackgroundColor = function(e) { this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = FTe(e); }, r.prototype.getBackgroundColor = function() { return this._backgroundColor; }, r.prototype.setDarkMode = function(e) { this._darkMode = e; }, r.prototype.isDarkMode = function() { return this._darkMode; }, r.prototype.refreshImmediately = function(e) { e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1; }, r.prototype.refresh = function() { this._needsRefresh = !0, this.animation.start(); }, r.prototype.flush = function() { this._flush(!1); }, r.prototype._flush = function(e) { var t, n = Dg(); this._needsRefresh && (t = !0, this.refreshImmediately(e)), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately()); var i = Dg(); t ? (this._stillFrameAccum = 0, this.trigger("rendered", { elapsedTime: i - n })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop()); }, r.prototype.setSleepAfterStill = function(e) { this._sleepAfterStill = e; }, r.prototype.wakeUp = function() { this.animation.start(), this._stillFrameAccum = 0; }, r.prototype.refreshHover = function() { this._needsRefreshHover = !0; }, r.prototype.refreshHoverImmediately = function() { this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover(); }, r.prototype.resize = function(e) { e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize(); }, r.prototype.clearAnimation = function() { this.animation.clear(); }, r.prototype.getWidth = function() { return this.painter.getWidth(); }, r.prototype.getHeight = function() { return this.painter.getHeight(); }, r.prototype.setCursorStyle = function(e) { this.handler.setCursorStyle(e); }, r.prototype.findHover = function(e, t) { return this.handler.findHover(e, t); }, r.prototype.on = function(e, t, n) { return this.handler.on(e, t, n), this; }, r.prototype.off = function(e, t) { this.handler.off(e, t); }, r.prototype.trigger = function(e, t) { this.handler.trigger(e, t); }, r.prototype.clear = function() { for (var e = this.storage.getRoots(), t = 0; t < e.length; t++) e[t] instanceof rt && e[t].removeSelfFromZr(this); this.storage.delAllRoots(), this.painter.clear(); }, r.prototype.dispose = function() { this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, NTe(this.id); }, r; }(); function v6(r, e) { var t = new BTe(NX(), r, e); return hq[t.id] = t, t; } function kTe(r, e) { j0[r] = e; } var g6 = 1e-4, pq = 20; function VTe(r) { return r.replace(/^\s+|\s+$/g, ""); } function Fr(r, e, t, n) { var i = e[0], a = e[1], o = t[0], s = t[1], u = a - i, l = s - o; if (u === 0) return l === 0 ? o : (o + s) / 2; if (n) if (u > 0) { if (r <= i) return o; if (r >= a) return s; } else { if (r >= i) return o; if (r <= a) return s; } else { if (r === i) return o; if (r === a) return s; } return (r - i) / u * l + o; } function ye(r, e) { switch (r) { case "center": case "middle": r = "50%"; break; case "left": case "top": r = "0%"; break; case "right": case "bottom": r = "100%"; break; } return Se(r) ? VTe(r).match(/%$/) ? parseFloat(r) / 100 * e : parseFloat(r) : r == null ? NaN : +r; } function Xn(r, e, t) { return e == null && (e = 10), e = Math.min(Math.max(0, e), pq), r = (+r).toFixed(e), t ? r : +r; } function Js(r) { return r.sort(function(e, t) { return e - t; }), r; } function Rl(r) { if (r = +r, isNaN(r)) return 0; if (r > 1e-14) { for (var e = 1, t = 0; t < 15; t++, e *= 10) if (Math.round(r * e) / e === r) return t; } return OM(r); } function OM(r) { var e = r.toString().toLowerCase(), t = e.indexOf("e"), n = t > 0 ? +e.slice(t + 1) : 0, i = t > 0 ? t : e.length, a = e.indexOf("."), o = a < 0 ? 0 : i - 1 - a; return Math.max(0, o - n); } function dq(r, e) { var t = Math.log, n = Math.LN10, i = Math.floor(t(r[1] - r[0]) / n), a = Math.round(t(Math.abs(e[1] - e[0])) / n), o = Math.min(Math.max(-i + a, 0), 20); return isFinite(o) ? o : 20; } function GTe(r, e, t) { if (!r[e]) return 0; var n = Kl(r, function(d, v) { return d + (isNaN(v) ? 0 : v); }, 0); if (n === 0) return 0; for (var i = Math.pow(10, t), a = ce(r, function(d) { return (isNaN(d) ? 0 : d) / n * i * 100; }), o = i * 100, s = ce(a, function(d) { return Math.floor(d); }), u = Kl(s, function(d, v) { return d + v; }, 0), l = ce(a, function(d, v) { return d - s[v]; }); u < o; ) { for (var c = Number.NEGATIVE_INFINITY, f = null, h = 0, p = l.length; h < p; ++h) l[h] > c && (c = l[h], f = h); ++s[f], l[f] = 0, ++u; } return s[e] / i; } function zTe(r, e) { var t = Math.max(Rl(r), Rl(e)), n = r + e; return t > pq ? n : Xn(n, t); } var m6 = 9007199254740991; function vq(r) { var e = Math.PI * 2; return (r % e + e) % e; } function hE(r) { return r > -g6 && r < g6; } var $Te = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/; function ec(r) { if (r instanceof Date) return r; if (Se(r)) { var e = $Te.exec(r); if (!e) return new Date(NaN); if (e[8]) { var t = +e[4] || 0; return e[8].toUpperCase() !== "Z" && (t -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, t, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0)); } else return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0); } else if (r == null) return new Date(NaN); return new Date(Math.round(r)); } function HTe(r) { return Math.pow(10, NT(r)); } function NT(r) { if (r === 0) return 0; var e = Math.floor(Math.log(r) / Math.LN10); return r / Math.pow(10, e) >= 10 && e++, e; } function gq(r, e) { var t = NT(r), n = Math.pow(10, t), i = r / n, a; return e ? i < 1.5 ? a = 1 : i < 2.5 ? a = 2 : i < 4 ? a = 3 : i < 7 ? a = 5 : a = 10 : i < 1 ? a = 1 : i < 2 ? a = 2 : i < 3 ? a = 3 : i < 5 ? a = 5 : a = 10, r = a * n, t >= -20 ? +r.toFixed(t < 0 ? -t : 0) : r; } function kI(r, e) { var t = (r.length - 1) * e + 1, n = Math.floor(t), i = +r[n - 1], a = t - n; return a ? i + a * (r[n] - i) : i; } function y6(r) { r.sort(function(u, l) { return s(u, l, 0) ? -1 : 1; }); for (var e = -1 / 0, t = 1, n = 0; n < r.length; ) { for (var i = r[n].interval, a = r[n].close, o = 0; o < 2; o++) i[o] <= e && (i[o] = e, a[o] = o ? 1 : 1 - t), e = i[o], t = a[o]; i[0] === i[1] && a[0] * a[1] !== 1 ? r.splice(n, 1) : n++; } return r; function s(u, l, c) { return u.interval[c] < l.interval[c] || u.interval[c] === l.interval[c] && (u.close[c] - l.close[c] === (c ? -1 : 1) || !c && s(u, l, 1)); } } function nf(r) { var e = parseFloat(r); return e == r && (e !== 0 || !Se(r) || r.indexOf("x") <= 0) ? e : NaN; } function $N(r) { return !isNaN(nf(r)); } function mq() { return Math.round(Math.random() * 9); } function yq(r, e) { return e === 0 ? r : yq(e, r % e); } function _6(r, e) { return r == null ? e : e == null ? r : r * e / yq(r, e); } var UTe = "[ECharts] ", w6 = {}, WTe = typeof console < "u" && console.warn && console.log; function FT(r, e, t) { if (WTe) { if (t) { if (w6[e]) return; w6[e] = !0; } console[r](UTe + e); } } function jTe(r, e) { FT("log", r, e); } function to(r, e) { FT("warn", r, e); } function Oa(r, e) { FT("error", r, e); } function rl(r) { process.env.NODE_ENV !== "production" && FT("warn", "DEPRECATED: " + r, !0); } function ii(r, e, t) { process.env.NODE_ENV !== "production" && rl((t ? "[" + t + "]" : "") + (r + " is deprecated, use " + e + " instead.")); } function xo() { for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e]; var t = ""; if (process.env.NODE_ENV !== "production") { var n = function(i) { return i === void 0 ? "undefined" : i === 1 / 0 ? "Infinity" : i === -1 / 0 ? "-Infinity" : kd(i) ? "NaN" : i instanceof Date ? "Date(" + i.toISOString() + ")" : ze(i) ? "function () { ... }" : FX(i) ? i + "" : null; }; t = ce(r, function(i) { if (Se(i)) return i; var a = n(i); if (a != null) return a; if (typeof JSON < "u" && JSON.stringify) try { return JSON.stringify(i, function(o, s) { var u = n(s); return u == null ? s : u; }); } catch { return "?"; } else return "?"; }).join(" "); } return t; } function Ar(r) { throw new Error(r); } function x6(r, e, t) { return (e - r) * t + r; } var _q = "series\0", wq = "\0_ec_\0"; function jr(r) { return r instanceof Array ? r : r == null ? [] : [r]; } function Vd(r, e, t) { if (r) { r[e] = r[e] || {}, r.emphasis = r.emphasis || {}, r.emphasis[e] = r.emphasis[e] || {}; for (var n = 0, i = t.length; n < i; n++) { var a = t[n]; !r.emphasis[e].hasOwnProperty(a) && r[e].hasOwnProperty(a) && (r.emphasis[e][a] = r[e][a]); } } } var C6 = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"]; function _y(r) { return Xe(r) && !le(r) && !(r instanceof Date) ? r.value : r; } function YTe(r) { return Xe(r) && !(r instanceof Array); } function xq(r, e, t) { var n = t === "normalMerge", i = t === "replaceMerge", a = t === "replaceAll"; r = r || [], e = (e || []).slice(); var o = $e(); M(e, function(u, l) { if (!Xe(u)) { e[l] = null; return; } process.env.NODE_ENV !== "production" && (u.id != null && !E6(u.id) && S6(u.id), u.name != null && !E6(u.name) && S6(u.name)); }); var s = XTe(r, o, t); return (n || i) && qTe(s, r, o, e), n && ZTe(s, e), n || i ? KTe(s, e, i) : a && JTe(s, e), QTe(s), s; } function XTe(r, e, t) { var n = []; if (t === "replaceAll") return n; for (var i = 0; i < r.length; i++) { var a = r[i]; a && a.id != null && e.set(a.id, i), n.push({ existing: t === "replaceMerge" || Om(a) ? null : a, newOption: null, keyInfo: null, brandNew: null }); } return n; } function qTe(r, e, t, n) { M(n, function(i, a) { if (!(!i || i.id == null)) { var o = g_(i.id), s = t.get(o); if (s != null) { var u = r[s]; Ze(!u.newOption, 'Duplicated option on id "' + o + '".'), u.newOption = i, u.existing = e[s], n[a] = null; } } }); } function ZTe(r, e) { M(e, function(t, n) { if (!(!t || t.name == null)) for (var i = 0; i < r.length; i++) { var a = r[i].existing; if (!r[i].newOption && a && (a.id == null || t.id == null) && !Om(t) && !Om(a) && Cq("name", a, t)) { r[i].newOption = t, e[n] = null; return; } } }); } function KTe(r, e, t) { M(e, function(n) { if (!!n) { for (var i, a = 0; (i = r[a]) && (i.newOption || Om(i.existing) || i.existing && n.id != null && !Cq("id", n, i.existing)); ) a++; i ? (i.newOption = n, i.brandNew = t) : r.push({ newOption: n, brandNew: t, existing: null, keyInfo: null }), a++; } }); } function JTe(r, e) { M(e, function(t) { r.push({ newOption: t, brandNew: !0, existing: null, keyInfo: null }); }); } function QTe(r) { var e = $e(); M(r, function(t) { var n = t.existing; n && e.set(n.id, t); }), M(r, function(t) { var n = t.newOption; Ze(!n || n.id == null || !e.get(n.id) || e.get(n.id) === t, "id duplicates: " + (n && n.id)), n && n.id != null && e.set(n.id, t), !t.keyInfo && (t.keyInfo = {}); }), M(r, function(t, n) { var i = t.existing, a = t.newOption, o = t.keyInfo; if (!!Xe(a)) { if (o.name = a.name != null ? g_(a.name) : i ? i.name : _q + n, i) o.id = g_(i.id); else if (a.id != null) o.id = g_(a.id); else { var s = 0; do o.id = "\0" + o.name + "\0" + s++; while (e.get(o.id)); } e.set(o.id, t); } }); } function Cq(r, e, t) { var n = Li(e[r], null), i = Li(t[r], null); return n != null && i != null && n === i; } function g_(r) { if (process.env.NODE_ENV !== "production" && r == null) throw new Error(); return Li(r, ""); } function Li(r, e) { return r == null ? e : Se(r) ? r : $t(r) || rE(r) ? r + "" : e; } function S6(r) { process.env.NODE_ENV !== "production" && to("`" + r + "` is invalid id or name. Must be a string or number."); } function E6(r) { return rE(r) || $N(r); } function HN(r) { var e = r.name; return !!(e && e.indexOf(_q)); } function Om(r) { return r && r.id != null && g_(r.id).indexOf(wq) === 0; } function ePe(r) { return wq + r; } function tPe(r, e, t) { M(r, function(n) { var i = n.newOption; Xe(i) && (n.keyInfo.mainType = e, n.keyInfo.subType = rPe(e, i, n.existing, t)); }); } function rPe(r, e, t, n) { var i = e.type ? e.type : t ? t.subType : n.determineSubType(r, e); return i; } function nPe(r, e) { var t = {}, n = {}; return i(r || [], t), i(e || [], n, t), [a(t), a(n)]; function i(o, s, u) { for (var l = 0, c = o.length; l < c; l++) { var f = Li(o[l].seriesId, null); if (f == null) return; for (var h = jr(o[l].dataIndex), p = u && u[f], d = 0, v = h.length; d < v; d++) { var g = h[d]; p && p[g] ? p[g] = null : (s[f] || (s[f] = {}))[g] = 1; } } } function a(o, s) { var u = []; for (var l in o) if (o.hasOwnProperty(l) && o[l] != null) if (s) u.push(+l); else { var c = a(o[l], !0); c.length && u.push({ seriesId: l, dataIndex: c }); } return u; } } function Gd(r, e) { if (e.dataIndexInside != null) return e.dataIndexInside; if (e.dataIndex != null) return le(e.dataIndex) ? ce(e.dataIndex, function(t) { return r.indexOfRawIndex(t); }) : r.indexOfRawIndex(e.dataIndex); if (e.name != null) return le(e.name) ? ce(e.name, function(t) { return r.indexOfName(t); }) : r.indexOfName(e.name); } function Ut() { var r = "__ec_inner_" + iPe++; return function(e) { return e[r] || (e[r] = {}); }; } var iPe = mq(); function m_(r, e, t) { var n = UN(e, t), i = n.mainTypeSpecified, a = n.queryOptionMap, o = n.others, s = o, u = t ? t.defaultMainType : null; return !i && u && a.set(u, {}), a.each(function(l, c) { var f = Ow(r, c, l, { useDefault: u === c, enableAll: t && t.enableAll != null ? t.enableAll : !0, enableNone: t && t.enableNone != null ? t.enableNone : !0 }); s[c + "Models"] = f.models, s[c + "Model"] = f.models[0]; }), s; } function UN(r, e) { var t; if (Se(r)) { var n = {}; n[r + "Index"] = 0, t = n; } else t = r; var i = $e(), a = {}, o = !1; return M(t, function(s, u) { if (u === "dataIndex" || u === "dataIndexInside") { a[u] = s; return; } var l = u.match(/^(\w+)(Index|Id|Name)$/) || [], c = l[1], f = (l[2] || "").toLowerCase(); if (!(!c || !f || e && e.includeMainTypes && _t(e.includeMainTypes, c) < 0)) { o = o || !!c; var h = i.get(c) || i.set(c, {}); h[f] = s; } }), { mainTypeSpecified: o, queryOptionMap: i, others: a }; } var ui = { useDefault: !0, enableAll: !1, enableNone: !1 }, aPe = { useDefault: !1, enableAll: !0, enableNone: !0 }; function Ow(r, e, t, n) { n = n || ui; var i = t.index, a = t.id, o = t.name, s = { models: null, specified: i != null || a != null || o != null }; if (!s.specified) { var u = void 0; return s.models = n.useDefault && (u = r.getComponent(e)) ? [u] : [], s; } return i === "none" || i === !1 ? (Ze(n.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (i === "all" && (Ze(n.enableAll, '`"all"` is not a valid value on index option.'), i = a = o = null), s.models = r.queryComponents({ mainType: e, index: i, id: a, name: o }), s); } function Sq(r, e, t) { r.setAttribute ? r.setAttribute(e, t) : r[e] = t; } function oPe(r, e) { return r.getAttribute ? r.getAttribute(e) : r[e]; } function sPe(r) { return r === "auto" ? wr.domSupported ? "html" : "richText" : r || "html"; } function RM(r, e) { var t = $e(), n = []; return M(r, function(i) { var a = e(i); (t.get(a) || (n.push(a), t.set(a, []))).push(i); }), { keys: n, buckets: t }; } function Eq(r, e, t, n, i) { var a = e == null || e === "auto"; if (n == null) return n; if ($t(n)) { var o = x6(t || 0, n, i); return Xn(o, a ? Math.max(Rl(t || 0), Rl(n)) : e); } else { if (Se(n)) return i < 1 ? t : n; for (var s = [], u = t, l = n, c = Math.max(u ? u.length : 0, l.length), f = 0; f < c; ++f) { var h = r.getDimensionInfo(f); if (h && h.type === "ordinal") s[f] = (i < 1 && u ? u : l)[f]; else { var p = u && u[f] ? u[f] : 0, d = l[f], o = x6(p, d, i); s[f] = Xn(o, a ? Math.max(Rl(p), Rl(d)) : e); } } return s; } } var uPe = ".", op = "___EC__COMPONENT__CONTAINER___", bq = "___EC__EXTENDED_CLASS___"; function Nl(r) { var e = { main: "", sub: "" }; if (r) { var t = r.split(uPe); e.main = t[0] || "", e.sub = t[1] || ""; } return e; } function lPe(r) { Ze(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r), 'componentType "' + r + '" illegal'); } function cPe(r) { return !!(r && r[bq]); } function WN(r, e) { r.$constructor = r, r.extend = function(t) { process.env.NODE_ENV !== "production" && M(e, function(a) { t[a] || console.warn("Method `" + a + "` should be implemented" + (t.type ? " in " + t.type : "") + "."); }); var n = this, i; return fPe(n) ? i = function(a) { W(o, a); function o() { return a.apply(this, arguments) || this; } return o; }(n) : (i = function() { (t.$constructor || n).apply(this, arguments); }, fbe(i, this)), oe(i.prototype, t), i[bq] = !0, i.extend = this.extend, i.superCall = dPe, i.superApply = vPe, i.superClass = n, i; }; } function fPe(r) { return ze(r) && /^class\s/.test(Function.prototype.toString.call(r)); } function Tq(r, e) { r.extend = e.extend; } var hPe = Math.round(Math.random() * 10); function pPe(r) { var e = ["__\0is_clz", hPe++].join("_"); r.prototype[e] = !0, process.env.NODE_ENV !== "production" && Ze(!r.isInstance, 'The method "is" can not be defined.'), r.isInstance = function(t) { return !!(t && t[e]); }; } function dPe(r, e) { for (var t = [], n = 2; n < arguments.length; n++) t[n - 2] = arguments[n]; return this.superClass.prototype[e].apply(r, t); } function vPe(r, e, t) { return this.superClass.prototype[e].apply(r, t); } function BT(r) { var e = {}; r.registerClass = function(n) { var i = n.type || n.prototype.type; if (i) { lPe(i), n.prototype.type = i; var a = Nl(i); if (!a.sub) process.env.NODE_ENV !== "production" && e[a.main] && console.warn(a.main + " exists."), e[a.main] = n; else if (a.sub !== op) { var o = t(a); o[a.sub] = n; } } return n; }, r.getClass = function(n, i, a) { var o = e[n]; if (o && o[op] && (o = i ? o[i] : null), a && !o) throw new Error(i ? "Component " + n + "." + (i || "") + " is used but not imported." : n + ".type should be specified."); return o; }, r.getClassesByMainType = function(n) { var i = Nl(n), a = [], o = e[i.main]; return o && o[op] ? M(o, function(s, u) { u !== op && a.push(s); }) : a.push(o), a; }, r.hasClass = function(n) { var i = Nl(n); return !!e[i.main]; }, r.getAllClassMainTypes = function() { var n = []; return M(e, function(i, a) { n.push(a); }), n; }, r.hasSubTypes = function(n) { var i = Nl(n), a = e[i.main]; return a && a[op]; }; function t(n) { var i = e[n.main]; return (!i || !i[op]) && (i = e[n.main] = {}, i[op] = !0), i; } } function zd(r, e) { for (var t = 0; t < r.length; t++) r[t][1] || (r[t][1] = r[t][0]); return e = e || !1, function(n, i, a) { for (var o = {}, s = 0; s < r.length; s++) { var u = r[s][1]; if (!(i && _t(i, u) >= 0 || a && _t(a, u) < 0)) { var l = n.getShallow(u, e); l != null && (o[r[s][0]] = l); } } return o; }; } var gPe = [ ["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"] ], mPe = zd(gPe), yPe = function() { function r() { } return r.prototype.getAreaStyle = function(e, t) { return mPe(this, e, t); }, r; }(), NM = new Dw(50); function _Pe(r) { if (typeof r == "string") { var e = NM.get(r); return e && e.image; } else return r; } function jN(r, e, t, n, i) { if (r) if (typeof r == "string") { if (e && e.__zrImageSrc === r || !t) return e; var a = NM.get(r), o = { hostEl: t, cb: n, cbPayload: i }; return a ? (e = a.image, !kT(e) && a.pending.push(o)) : (e = tf.loadImage(r, b6, b6), e.__zrImageSrc = r, NM.put(r, e.__cachedImgObj = { image: e, pending: [o] })), e; } else return r; else return e; } function b6() { var r = this.__cachedImgObj; this.onload = this.onerror = this.__cachedImgObj = null; for (var e = 0; e < r.pending.length; e++) { var t = r.pending[e], n = t.cb; n && n(this, t.cbPayload), t.hostEl.dirty(); } r.pending.length = 0; } function kT(r) { return r && r.width && r.height; } var VI = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g; function wPe(r, e, t, n, i) { if (!e) return ""; var a = (r + "").split(` `); i = Pq(e, t, n, i); for (var o = 0, s = a.length; o < s; o++) a[o] = Iq(a[o], i); return a.join(` `); } function Pq(r, e, t, n) { n = n || {}; var i = oe({}, n); i.font = e, t = wt(t, "..."), i.maxIterations = wt(n.maxIterations, 2); var a = i.minChar = wt(n.minChar, 0); i.cnCharWidth = ps("\u56FD", e); var o = i.ascCharWidth = ps("a", e); i.placeholder = wt(n.placeholder, ""); for (var s = r = Math.max(0, r - 1), u = 0; u < a && s >= o; u++) s -= o; var l = ps(t, e); return l > s && (t = "", l = 0), s = r - l, i.ellipsis = t, i.ellipsisWidth = l, i.contentWidth = s, i.containerWidth = r, i; } function Iq(r, e) { var t = e.containerWidth, n = e.font, i = e.contentWidth; if (!t) return ""; var a = ps(r, n); if (a <= t) return r; for (var o = 0; ; o++) { if (a <= i || o >= e.maxIterations) { r += e.ellipsis; break; } var s = o === 0 ? xPe(r, i, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(r.length * i / a) : 0; r = r.substr(0, s), a = ps(r, n); } return r === "" && (r = e.placeholder), r; } function xPe(r, e, t, n) { for (var i = 0, a = 0, o = r.length; a < o && i < e; a++) { var s = r.charCodeAt(a); i += 0 <= s && s <= 127 ? t : n; } return a; } function CPe(r, e) { r != null && (r += ""); var t = e.overflow, n = e.padding, i = e.font, a = t === "truncate", o = RT(i), s = wt(e.lineHeight, o), u = !!e.backgroundColor, l = e.lineOverflow === "truncate", c = e.width, f; c != null && (t === "break" || t === "breakAll") ? f = r ? Aq(r, e.font, c, t === "breakAll", 0).lines : [] : f = r ? r.split(` `) : []; var h = f.length * s, p = wt(e.height, h); if (h > p && l) { var d = Math.floor(p / s); f = f.slice(0, d); } if (r && a && c != null) for (var v = Pq(c, i, e.ellipsis, { minChar: e.truncateMinChar, placeholder: e.placeholder }), g = 0; g < f.length; g++) f[g] = Iq(f[g], v); for (var m = p, y = 0, g = 0; g < f.length; g++) y = Math.max(ps(f[g], i), y); c == null && (c = y); var _ = y; return n && (m += n[0] + n[2], _ += n[1] + n[3], c += n[1] + n[3]), u && (_ = c), { lines: f, height: p, outerWidth: _, outerHeight: m, lineHeight: s, calculatedLineHeight: o, contentWidth: y, contentHeight: h, width: c }; } var SPe = function() { function r() { } return r; }(), T6 = function() { function r(e) { this.tokens = [], e && (this.tokens = e); } return r; }(), EPe = function() { function r() { this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = []; } return r; }(); function bPe(r, e) { var t = new EPe(); if (r != null && (r += ""), !r) return t; for (var n = e.width, i = e.height, a = e.overflow, o = (a === "break" || a === "breakAll") && n != null ? { width: n, accumWidth: 0, breakAll: a === "breakAll" } : null, s = VI.lastIndex = 0, u; (u = VI.exec(r)) != null; ) { var l = u.index; l > s && GI(t, r.substring(s, l), e, o), GI(t, u[2], e, o, u[1]), s = VI.lastIndex; } s < r.length && GI(t, r.substring(s, r.length), e, o); var c = [], f = 0, h = 0, p = e.padding, d = a === "truncate", v = e.lineOverflow === "truncate"; function g(F, k, G) { F.width = k, F.lineHeight = G, f += G, h = Math.max(h, k); } e: for (var m = 0; m < t.lines.length; m++) { for (var y = t.lines[m], _ = 0, w = 0, x = 0; x < y.tokens.length; x++) { var C = y.tokens[x], S = C.styleName && e.rich[C.styleName] || {}, b = C.textPadding = S.padding, E = b ? b[1] + b[3] : 0, T = C.font = S.font || e.font; C.contentHeight = RT(T); var P = wt(S.height, C.contentHeight); if (C.innerHeight = P, b && (P += b[0] + b[2]), C.height = P, C.lineHeight = $u(S.lineHeight, e.lineHeight, P), C.align = S && S.align || e.align, C.verticalAlign = S && S.verticalAlign || "middle", v && i != null && f + C.lineHeight > i) { x > 0 ? (y.tokens = y.tokens.slice(0, x), g(y, w, _), t.lines = t.lines.slice(0, m + 1)) : t.lines = t.lines.slice(0, m); break e; } var I = S.width, A = I == null || I === "auto"; if (typeof I == "string" && I.charAt(I.length - 1) === "%") C.percentWidth = I, c.push(C), C.contentWidth = ps(C.text, T); else { if (A) { var L = S.backgroundColor, D = L && L.image; D && (D = _Pe(D), kT(D) && (C.width = Math.max(C.width, D.width * P / D.height))); } var O = d && n != null ? n - w : null; O != null && O < C.width ? !A || O < E ? (C.text = "", C.width = C.contentWidth = 0) : (C.text = wPe(C.text, O - E, T, e.ellipsis, { minChar: e.truncateMinChar }), C.width = C.contentWidth = ps(C.text, T)) : C.contentWidth = ps(C.text, T); } C.width += E, w += C.width, S && (_ = Math.max(_, C.lineHeight)); } g(y, w, _); } t.outerWidth = t.width = wt(n, h), t.outerHeight = t.height = wt(i, f), t.contentHeight = f, t.contentWidth = h, p && (t.outerWidth += p[1] + p[3], t.outerHeight += p[0] + p[2]); for (var m = 0; m < c.length; m++) { var C = c[m], N = C.percentWidth; C.width = parseInt(N, 10) / 100 * t.width; } return t; } function GI(r, e, t, n, i) { var a = e === "", o = i && t.rich[i] || {}, s = r.lines, u = o.font || t.font, l = !1, c, f; if (n) { var h = o.padding, p = h ? h[1] + h[3] : 0; if (o.width != null && o.width !== "auto") { var d = tl(o.width, n.width) + p; s.length > 0 && d + n.accumWidth > n.width && (c = e.split(` `), l = !0), n.accumWidth = d; } else { var v = Aq(e, u, n.width, n.breakAll, n.accumWidth); n.accumWidth = v.accumWidth + p, f = v.linesWidths, c = v.lines; } } else c = e.split(` `); for (var g = 0; g < c.length; g++) { var m = c[g], y = new SPe(); if (y.styleName = i, y.text = m, y.isLineHolder = !m && !a, typeof o.width == "number" ? y.width = o.width : y.width = f ? f[g] : ps(m, u), !g && !l) { var _ = (s[s.length - 1] || (s[0] = new T6())).tokens, w = _.length; w === 1 && _[0].isLineHolder ? _[0] = y : (m || !w || a) && _.push(y); } else s.push(new T6([y])); } } function TPe(r) { var e = r.charCodeAt(0); return e >= 33 && e <= 383; } var PPe = Kl(",&?/;] ".split(""), function(r, e) { return r[e] = !0, r; }, {}); function IPe(r) { return TPe(r) ? !!PPe[r] : !0; } function Aq(r, e, t, n, i) { for (var a = [], o = [], s = "", u = "", l = 0, c = 0, f = 0; f < r.length; f++) { var h = r.charAt(f); if (h === ` `) { u && (s += u, c += l), a.push(s), o.push(c), s = "", u = "", l = 0, c = 0; continue; } var p = ps(h, e), d = n ? !1 : !IPe(h); if (a.length ? c + p > t : i + c + p > t) { c ? (s || u) && (d ? (s || (s = u, u = "", l = 0, c = l), a.push(s), o.push(c - l), u += h, l += p, s = "", c = l) : (u && (s += u, u = "", l = 0), a.push(s), o.push(c), s = h, c = p)) : d ? (a.push(u), o.push(l), u = h, l = p) : (a.push(h), o.push(p)); continue; } c += p, d ? (u += h, l += p) : (u && (s += u, u = "", l = 0), s += h); } return !a.length && !s && (s = r, u = "", l = 0), u && (s += u), s && (a.push(s), o.push(c)), a.length === 1 && (c += i), { accumWidth: c, lines: a, linesWidths: o }; } var FM = "__zr_style_" + Math.round(Math.random() * 10), ed = { shadowBlur: 0, shadowOffsetX: 0, shadowOffsetY: 0, shadowColor: "#000", opacity: 1, blend: "source-over" }, VT = { style: { shadowBlur: !0, shadowOffsetX: !0, shadowOffsetY: !0, shadowColor: !0, opacity: !0 } }; ed[FM] = !0; var P6 = ["z", "z2", "invisible"], APe = ["invisible"], LPe = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype._init = function(t) { for (var n = At(t), i = 0; i < n.length; i++) { var a = n[i]; a === "style" ? this.useStyle(t[a]) : r.prototype.attrKV.call(this, a, t[a]); } this.style || this.useStyle({}); }, e.prototype.beforeBrush = function() { }, e.prototype.afterBrush = function() { }, e.prototype.innerBeforeBrush = function() { }, e.prototype.innerAfterBrush = function() { }, e.prototype.shouldBePainted = function(t, n, i, a) { var o = this.transform; if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && DPe(this, t, n) || o && !o[0] && !o[3]) return !1; if (i && this.__clipPaths) { for (var s = 0; s < this.__clipPaths.length; ++s) if (this.__clipPaths[s].isZeroArea()) return !1; } if (a && this.parent) for (var u = this.parent; u; ) { if (u.ignore) return !1; u = u.parent; } return !0; }, e.prototype.contain = function(t, n) { return this.rectContain(t, n); }, e.prototype.traverse = function(t, n) { t.call(n, this); }, e.prototype.rectContain = function(t, n) { var i = this.transformCoordToLocal(t, n), a = this.getBoundingRect(); return a.contain(i[0], i[1]); }, e.prototype.getPaintRect = function() { var t = this._paintRect; if (!this._paintRect || this.__dirty) { var n = this.transform, i = this.getBoundingRect(), a = this.style, o = a.shadowBlur || 0, s = a.shadowOffsetX || 0, u = a.shadowOffsetY || 0; t = this._paintRect || (this._paintRect = new gt(0, 0, 0, 0)), n ? gt.applyTransform(t, i, n) : t.copy(i), (o || s || u) && (t.width += o * 2 + Math.abs(s), t.height += o * 2 + Math.abs(u), t.x = Math.min(t.x, t.x + s - o), t.y = Math.min(t.y, t.y + u - o)); var l = this.dirtyRectTolerance; t.isZero() || (t.x = Math.floor(t.x - l), t.y = Math.floor(t.y - l), t.width = Math.ceil(t.width + 1 + l * 2), t.height = Math.ceil(t.height + 1 + l * 2)); } return t; }, e.prototype.setPrevPaintRect = function(t) { t ? (this._prevPaintRect = this._prevPaintRect || new gt(0, 0, 0, 0), this._prevPaintRect.copy(t)) : this._prevPaintRect = null; }, e.prototype.getPrevPaintRect = function() { return this._prevPaintRect; }, e.prototype.animateStyle = function(t) { return this.animate("style", t); }, e.prototype.updateDuringAnimation = function(t) { t === "style" ? this.dirtyStyle() : this.markRedraw(); }, e.prototype.attrKV = function(t, n) { t !== "style" ? r.prototype.attrKV.call(this, t, n) : this.style ? this.setStyle(n) : this.useStyle(n); }, e.prototype.setStyle = function(t, n) { return typeof t == "string" ? this.style[t] = n : oe(this.style, t), this.dirtyStyle(), this; }, e.prototype.dirtyStyle = function(t) { t || this.markRedraw(), this.__dirty |= H0, this._rect && (this._rect = null); }, e.prototype.dirty = function() { this.dirtyStyle(); }, e.prototype.styleChanged = function() { return !!(this.__dirty & H0); }, e.prototype.styleUpdated = function() { this.__dirty &= ~H0; }, e.prototype.createStyle = function(t) { return DT(ed, t); }, e.prototype.useStyle = function(t) { t[FM] || (t = this.createStyle(t)), this.__inHover ? this.__hoverStyle = t : this.style = t, this.dirtyStyle(); }, e.prototype.isStyleObject = function(t) { return t[FM]; }, e.prototype._innerSaveToNormal = function(t) { r.prototype._innerSaveToNormal.call(this, t); var n = this._normalState; t.style && !n.style && (n.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(t, n, P6); }, e.prototype._applyStateObj = function(t, n, i, a, o, s) { r.prototype._applyStateObj.call(this, t, n, i, a, o, s); var u = !(n && a), l; if (n && n.style ? o ? a ? l = n.style : (l = this._mergeStyle(this.createStyle(), i.style), this._mergeStyle(l, n.style)) : (l = this._mergeStyle(this.createStyle(), a ? this.style : i.style), this._mergeStyle(l, n.style)) : u && (l = i.style), l) if (o) { var c = this.style; if (this.style = this.createStyle(u ? {} : c), u) for (var f = At(c), h = 0; h < f.length; h++) { var p = f[h]; p in l && (l[p] = l[p], this.style[p] = c[p]); } for (var d = At(l), h = 0; h < d.length; h++) { var p = d[h]; this.style[p] = this.style[p]; } this._transitionState(t, { style: l }, s, this.getAnimationStyleProps()); } else this.useStyle(l); for (var v = this.__inHover ? APe : P6, h = 0; h < v.length; h++) { var p = v[h]; n && n[p] != null ? this[p] = n[p] : u && i[p] != null && (this[p] = i[p]); } }, e.prototype._mergeStates = function(t) { for (var n = r.prototype._mergeStates.call(this, t), i, a = 0; a < t.length; a++) { var o = t[a]; o.style && (i = i || {}, this._mergeStyle(i, o.style)); } return i && (n.style = i), n; }, e.prototype._mergeStyle = function(t, n) { return oe(t, n), t; }, e.prototype.getAnimationStyleProps = function() { return VT; }, e.initDefaultProps = function() { var t = e.prototype; t.type = "displayable", t.invisible = !1, t.z = 0, t.z2 = 0, t.zlevel = 0, t.culling = !1, t.cursor = "pointer", t.rectHover = !1, t.incremental = !1, t._rect = null, t.dirtyRectTolerance = 0, t.__dirty = as | H0; }(), e; }(cq), zI = new gt(0, 0, 0, 0), $I = new gt(0, 0, 0, 0); function DPe(r, e, t) { return zI.copy(r.getBoundingRect()), r.transform && zI.applyTransform(r.transform), $I.width = e, $I.height = t, !zI.intersect($I); } const vu = LPe; var Po = Math.min, Io = Math.max, HI = Math.sin, UI = Math.cos, sp = Math.PI * 2, Hx = pv(), Ux = pv(), Wx = pv(); function GT(r, e, t) { if (r.length !== 0) { for (var n = r[0], i = n[0], a = n[0], o = n[1], s = n[1], u = 1; u < r.length; u++) n = r[u], i = Po(i, n[0]), a = Io(a, n[0]), o = Po(o, n[1]), s = Io(s, n[1]); e[0] = i, e[1] = o, t[0] = a, t[1] = s; } } function I6(r, e, t, n, i, a) { i[0] = Po(r, t), i[1] = Po(e, n), a[0] = Io(r, t), a[1] = Io(e, n); } var A6 = [], L6 = []; function MPe(r, e, t, n, i, a, o, s, u, l) { var c = XX, f = $i, h = c(r, t, i, o, A6); u[0] = 1 / 0, u[1] = 1 / 0, l[0] = -1 / 0, l[1] = -1 / 0; for (var p = 0; p < h; p++) { var d = f(r, t, i, o, A6[p]); u[0] = Po(d, u[0]), l[0] = Io(d, l[0]); } h = c(e, n, a, s, L6); for (var p = 0; p < h; p++) { var v = f(e, n, a, s, L6[p]); u[1] = Po(v, u[1]), l[1] = Io(v, l[1]); } u[0] = Po(r, u[0]), l[0] = Io(r, l[0]), u[0] = Po(o, u[0]), l[0] = Io(o, l[0]), u[1] = Po(e, u[1]), l[1] = Io(e, l[1]), u[1] = Po(s, u[1]), l[1] = Io(s, l[1]); } function OPe(r, e, t, n, i, a, o, s) { var u = ZX, l = ia, c = Io(Po(u(r, t, i), 1), 0), f = Io(Po(u(e, n, a), 1), 0), h = l(r, t, i, c), p = l(e, n, a, f); o[0] = Po(r, i, h), o[1] = Po(e, a, p), s[0] = Io(r, i, h), s[1] = Io(e, a, p); } function RPe(r, e, t, n, i, a, o, s, u) { var l = Zf, c = Kf, f = Math.abs(i - a); if (f % sp < 1e-4 && f > 1e-4) { s[0] = r - t, s[1] = e - n, u[0] = r + t, u[1] = e + n; return; } if (Hx[0] = UI(i) * t + r, Hx[1] = HI(i) * n + e, Ux[0] = UI(a) * t + r, Ux[1] = HI(a) * n + e, l(s, Hx, Ux), c(u, Hx, Ux), i = i % sp, i < 0 && (i = i + sp), a = a % sp, a < 0 && (a = a + sp), i > a && !o ? a += sp : i < a && o && (i += sp), o) { var h = a; a = i, i = h; } for (var p = 0; p < a; p += Math.PI / 2) p > i && (Wx[0] = UI(p) * t + r, Wx[1] = HI(p) * n + e, l(s, Wx, s), c(u, Wx, u)); } var Jr = { M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7 }, up = [], lp = [], yl = [], Pf = [], _l = [], wl = [], WI = Math.min, jI = Math.max, cp = Math.cos, fp = Math.sin, fc = Math.abs, BM = Math.PI, Vf = BM * 2, YI = typeof Float32Array < "u", n0 = []; function XI(r) { var e = Math.round(r / BM * 1e8) / 1e8; return e % 2 * BM; } function Lq(r, e) { var t = XI(r[0]); t < 0 && (t += Vf); var n = t - r[0], i = r[1]; i += n, !e && i - t >= Vf ? i = t + Vf : e && t - i >= Vf ? i = t - Vf : !e && t > i ? i = t + (Vf - XI(t - i)) : e && t < i && (i = t - (Vf - XI(i - t))), r[0] = t, r[1] = i; } var tc = function() { function r(e) { this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, e && (this._saveData = !1), this._saveData && (this.data = []); } return r.prototype.increaseVersion = function() { this._version++; }, r.prototype.getVersion = function() { return this._version; }, r.prototype.setScale = function(e, t, n) { n = n || 0, n > 0 && (this._ux = fc(n / cE / e) || 0, this._uy = fc(n / cE / t) || 0); }, r.prototype.setDPR = function(e) { this.dpr = e; }, r.prototype.setContext = function(e) { this._ctx = e; }, r.prototype.getContext = function() { return this._ctx; }, r.prototype.beginPath = function() { return this._ctx && this._ctx.beginPath(), this.reset(), this; }, r.prototype.reset = function() { this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++; }, r.prototype.moveTo = function(e, t) { return this._drawPendingPt(), this.addData(Jr.M, e, t), this._ctx && this._ctx.moveTo(e, t), this._x0 = e, this._y0 = t, this._xi = e, this._yi = t, this; }, r.prototype.lineTo = function(e, t) { var n = fc(e - this._xi), i = fc(t - this._yi), a = n > this._ux || i > this._uy; if (this.addData(Jr.L, e, t), this._ctx && a && this._ctx.lineTo(e, t), a) this._xi = e, this._yi = t, this._pendingPtDist = 0; else { var o = n * n + i * i; o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = t, this._pendingPtDist = o); } return this; }, r.prototype.bezierCurveTo = function(e, t, n, i, a, o) { return this._drawPendingPt(), this.addData(Jr.C, e, t, n, i, a, o), this._ctx && this._ctx.bezierCurveTo(e, t, n, i, a, o), this._xi = a, this._yi = o, this; }, r.prototype.quadraticCurveTo = function(e, t, n, i) { return this._drawPendingPt(), this.addData(Jr.Q, e, t, n, i), this._ctx && this._ctx.quadraticCurveTo(e, t, n, i), this._xi = n, this._yi = i, this; }, r.prototype.arc = function(e, t, n, i, a, o) { this._drawPendingPt(), n0[0] = i, n0[1] = a, Lq(n0, o), i = n0[0], a = n0[1]; var s = a - i; return this.addData(Jr.A, e, t, n, n, i, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, t, n, i, a, o), this._xi = cp(a) * n + e, this._yi = fp(a) * n + t, this; }, r.prototype.arcTo = function(e, t, n, i, a) { return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, t, n, i, a), this; }, r.prototype.rect = function(e, t, n, i) { return this._drawPendingPt(), this._ctx && this._ctx.rect(e, t, n, i), this.addData(Jr.R, e, t, n, i), this; }, r.prototype.closePath = function() { this._drawPendingPt(), this.addData(Jr.Z); var e = this._ctx, t = this._x0, n = this._y0; return e && e.closePath(), this._xi = t, this._yi = n, this; }, r.prototype.fill = function(e) { e && e.fill(), this.toStatic(); }, r.prototype.stroke = function(e) { e && e.stroke(), this.toStatic(); }, r.prototype.len = function() { return this._len; }, r.prototype.setData = function(e) { var t = e.length; !(this.data && this.data.length === t) && YI && (this.data = new Float32Array(t)); for (var n = 0; n < t; n++) this.data[n] = e[n]; this._len = t; }, r.prototype.appendPath = function(e) { e instanceof Array || (e = [e]); for (var t = e.length, n = 0, i = this._len, a = 0; a < t; a++) n += e[a].len(); YI && this.data instanceof Float32Array && (this.data = new Float32Array(i + n)); for (var a = 0; a < t; a++) for (var o = e[a].data, s = 0; s < o.length; s++) this.data[i++] = o[s]; this._len = i; }, r.prototype.addData = function(e, t, n, i, a, o, s, u, l) { if (!!this._saveData) { var c = this.data; this._len + arguments.length > c.length && (this._expandData(), c = this.data); for (var f = 0; f < arguments.length; f++) c[this._len++] = arguments[f]; } }, r.prototype._drawPendingPt = function() { this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0); }, r.prototype._expandData = function() { if (!(this.data instanceof Array)) { for (var e = [], t = 0; t < this._len; t++) e[t] = this.data[t]; this.data = e; } }, r.prototype.toStatic = function() { if (!!this._saveData) { this._drawPendingPt(); var e = this.data; e instanceof Array && (e.length = this._len, YI && this._len > 11 && (this.data = new Float32Array(e))); } }, r.prototype.getBoundingRect = function() { yl[0] = yl[1] = _l[0] = _l[1] = Number.MAX_VALUE, Pf[0] = Pf[1] = wl[0] = wl[1] = -Number.MAX_VALUE; var e = this.data, t = 0, n = 0, i = 0, a = 0, o; for (o = 0; o < this._len; ) { var s = e[o++], u = o === 1; switch (u && (t = e[o], n = e[o + 1], i = t, a = n), s) { case Jr.M: t = i = e[o++], n = a = e[o++], _l[0] = i, _l[1] = a, wl[0] = i, wl[1] = a; break; case Jr.L: I6(t, n, e[o], e[o + 1], _l, wl), t = e[o++], n = e[o++]; break; case Jr.C: MPe(t, n, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], _l, wl), t = e[o++], n = e[o++]; break; case Jr.Q: OPe(t, n, e[o++], e[o++], e[o], e[o + 1], _l, wl), t = e[o++], n = e[o++]; break; case Jr.A: var l = e[o++], c = e[o++], f = e[o++], h = e[o++], p = e[o++], d = e[o++] + p; o += 1; var v = !e[o++]; u && (i = cp(p) * f + l, a = fp(p) * h + c), RPe(l, c, f, h, p, d, v, _l, wl), t = cp(d) * f + l, n = fp(d) * h + c; break; case Jr.R: i = t = e[o++], a = n = e[o++]; var g = e[o++], m = e[o++]; I6(i, a, i + g, a + m, _l, wl); break; case Jr.Z: t = i, n = a; break; } Zf(yl, yl, _l), Kf(Pf, Pf, wl); } return o === 0 && (yl[0] = yl[1] = Pf[0] = Pf[1] = 0), new gt(yl[0], yl[1], Pf[0] - yl[0], Pf[1] - yl[1]); }, r.prototype._calculateLength = function() { var e = this.data, t = this._len, n = this._ux, i = this._uy, a = 0, o = 0, s = 0, u = 0; this._pathSegLen || (this._pathSegLen = []); for (var l = this._pathSegLen, c = 0, f = 0, h = 0; h < t; ) { var p = e[h++], d = h === 1; d && (a = e[h], o = e[h + 1], s = a, u = o); var v = -1; switch (p) { case Jr.M: a = s = e[h++], o = u = e[h++]; break; case Jr.L: { var g = e[h++], m = e[h++], y = g - a, _ = m - o; (fc(y) > n || fc(_) > i || h === t - 1) && (v = Math.sqrt(y * y + _ * _), a = g, o = m); break; } case Jr.C: { var w = e[h++], x = e[h++], g = e[h++], m = e[h++], C = e[h++], S = e[h++]; v = Hbe(a, o, w, x, g, m, C, S, 10), a = C, o = S; break; } case Jr.Q: { var w = e[h++], x = e[h++], g = e[h++], m = e[h++]; v = Wbe(a, o, w, x, g, m, 10), a = g, o = m; break; } case Jr.A: var b = e[h++], E = e[h++], T = e[h++], P = e[h++], I = e[h++], A = e[h++], L = A + I; h += 1, e[h++], d && (s = cp(I) * T + b, u = fp(I) * P + E), v = jI(T, P) * WI(Vf, Math.abs(A)), a = cp(L) * T + b, o = fp(L) * P + E; break; case Jr.R: { s = a = e[h++], u = o = e[h++]; var D = e[h++], O = e[h++]; v = D * 2 + O * 2; break; } case Jr.Z: { var y = s - a, _ = u - o; v = Math.sqrt(y * y + _ * _), a = s, o = u; break; } } v >= 0 && (l[f++] = v, c += v); } return this._pathLen = c, c; }, r.prototype.rebuildPath = function(e, t) { var n = this.data, i = this._ux, a = this._uy, o = this._len, s, u, l, c, f, h, p = t < 1, d, v, g = 0, m = 0, y, _ = 0, w, x; if (p && (this._pathSegLen || this._calculateLength(), d = this._pathSegLen, v = this._pathLen, y = t * v, !y)) return; e: for (var C = 0; C < o; ) { var S = n[C++], b = C === 1; switch (b && (l = n[C], c = n[C + 1], s = l, u = c), S !== Jr.L && _ > 0 && (e.lineTo(w, x), _ = 0), S) { case Jr.M: s = l = n[C++], u = c = n[C++], e.moveTo(l, c); break; case Jr.L: { f = n[C++], h = n[C++]; var E = fc(f - l), T = fc(h - c); if (E > i || T > a) { if (p) { var P = d[m++]; if (g + P > y) { var I = (y - g) / P; e.lineTo(l * (1 - I) + f * I, c * (1 - I) + h * I); break e; } g += P; } e.lineTo(f, h), l = f, c = h, _ = 0; } else { var A = E * E + T * T; A > _ && (w = f, x = h, _ = A); } break; } case Jr.C: { var L = n[C++], D = n[C++], O = n[C++], N = n[C++], F = n[C++], k = n[C++]; if (p) { var P = d[m++]; if (g + P > y) { var I = (y - g) / P; Mh(l, L, O, F, I, up), Mh(c, D, N, k, I, lp), e.bezierCurveTo(up[1], lp[1], up[2], lp[2], up[3], lp[3]); break e; } g += P; } e.bezierCurveTo(L, D, O, N, F, k), l = F, c = k; break; } case Jr.Q: { var L = n[C++], D = n[C++], O = n[C++], N = n[C++]; if (p) { var P = d[m++]; if (g + P > y) { var I = (y - g) / P; h1(l, L, O, I, up), h1(c, D, N, I, lp), e.quadraticCurveTo(up[1], lp[1], up[2], lp[2]); break e; } g += P; } e.quadraticCurveTo(L, D, O, N), l = O, c = N; break; } case Jr.A: var G = n[C++], U = n[C++], B = n[C++], X = n[C++], j = n[C++], ae = n[C++], se = n[C++], $ = !n[C++], V = B > X ? B : X, q = fc(B - X) > 1e-3, ee = j + ae, Y = !1; if (p) { var P = d[m++]; g + P > y && (ee = j + ae * (y - g) / P, Y = !0), g += P; } if (q && e.ellipse ? e.ellipse(G, U, B, X, se, j, ee, $) : e.arc(G, U, V, j, ee, $), Y) break e; b && (s = cp(j) * B + G, u = fp(j) * X + U), l = cp(ee) * B + G, c = fp(ee) * X + U; break; case Jr.R: s = l = n[C], u = c = n[C + 1], f = n[C++], h = n[C++]; var K = n[C++], fe = n[C++]; if (p) { var P = d[m++]; if (g + P > y) { var J = y - g; e.moveTo(f, h), e.lineTo(f + WI(J, K), h), J -= K, J > 0 && e.lineTo(f + K, h + WI(J, fe)), J -= fe, J > 0 && e.lineTo(f + jI(K - J, 0), h + fe), J -= K, J > 0 && e.lineTo(f, h + jI(fe - J, 0)); break e; } g += P; } e.rect(f, h, K, fe); break; case Jr.Z: if (p) { var P = d[m++]; if (g + P > y) { var I = (y - g) / P; e.lineTo(l * (1 - I) + s * I, c * (1 - I) + u * I); break e; } g += P; } e.closePath(), l = s, c = u; } } }, r.prototype.clone = function() { var e = new r(), t = this.data; return e.data = t.slice ? t.slice() : Array.prototype.slice.call(t), e._len = this._len, e; }, r.CMD = Jr, r.initDefaultProps = function() { var e = r.prototype; e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0; }(), r; }(); function $f(r, e, t, n, i, a, o) { if (i === 0) return !1; var s = i, u = 0, l = r; if (o > e + s && o > n + s || o < e - s && o < n - s || a > r + s && a > t + s || a < r - s && a < t - s) return !1; if (r !== t) u = (e - n) / (r - t), l = (r * n - t * e) / (r - t); else return Math.abs(a - r) <= s / 2; var c = u * a - o + l, f = c * c / (u * u + 1); return f <= s / 2 * s / 2; } function NPe(r, e, t, n, i, a, o, s, u, l, c) { if (u === 0) return !1; var f = u; if (c > e + f && c > n + f && c > a + f && c > s + f || c < e - f && c < n - f && c < a - f && c < s - f || l > r + f && l > t + f && l > i + f && l > o + f || l < r - f && l < t - f && l < i - f && l < o - f) return !1; var h = qX(r, e, t, n, i, a, o, s, l, c, null); return h <= f / 2; } function Dq(r, e, t, n, i, a, o, s, u) { if (o === 0) return !1; var l = o; if (u > e + l && u > n + l && u > a + l || u < e - l && u < n - l && u < a - l || s > r + l && s > t + l && s > i + l || s < r - l && s < t - l && s < i - l) return !1; var c = KX(r, e, t, n, i, a, s, u, null); return c <= l / 2; } var D6 = Math.PI * 2; function th(r) { return r %= D6, r < 0 && (r += D6), r; } var i0 = Math.PI * 2; function FPe(r, e, t, n, i, a, o, s, u) { if (o === 0) return !1; var l = o; s -= r, u -= e; var c = Math.sqrt(s * s + u * u); if (c - l > t || c + l < t) return !1; if (Math.abs(n - i) % i0 < 1e-4) return !0; if (a) { var f = n; n = th(i), i = th(f); } else n = th(n), i = th(i); n > i && (i += i0); var h = Math.atan2(u, s); return h < 0 && (h += i0), h >= n && h <= i || h + i0 >= n && h + i0 <= i; } function yc(r, e, t, n, i, a) { if (a > e && a > n || a < e && a < n || n === e) return 0; var o = (a - e) / (n - e), s = n < e ? 1 : -1; (o === 1 || o === 0) && (s = n < e ? 0.5 : -0.5); var u = o * (t - r) + r; return u === i ? 1 / 0 : u > i ? s : 0; } var If = tc.CMD, hp = Math.PI * 2, BPe = 1e-4; function kPe(r, e) { return Math.abs(r - e) < BPe; } var so = [-1, -1, -1], Us = [-1, -1]; function VPe() { var r = Us[0]; Us[0] = Us[1], Us[1] = r; } function GPe(r, e, t, n, i, a, o, s, u, l) { if (l > e && l > n && l > a && l > s || l < e && l < n && l < a && l < s) return 0; var c = oE(e, n, a, s, l, so); if (c === 0) return 0; for (var f = 0, h = -1, p = void 0, d = void 0, v = 0; v < c; v++) { var g = so[v], m = g === 0 || g === 1 ? 0.5 : 1, y = $i(r, t, i, o, g); y < u || (h < 0 && (h = XX(e, n, a, s, Us), Us[1] < Us[0] && h > 1 && VPe(), p = $i(e, n, a, s, Us[0]), h > 1 && (d = $i(e, n, a, s, Us[1]))), h === 2 ? g < Us[0] ? f += p < e ? m : -m : g < Us[1] ? f += d < p ? m : -m : f += s < d ? m : -m : g < Us[0] ? f += p < e ? m : -m : f += s < p ? m : -m); } return f; } function zPe(r, e, t, n, i, a, o, s) { if (s > e && s > n && s > a || s < e && s < n && s < a) return 0; var u = Ube(e, n, a, s, so); if (u === 0) return 0; var l = ZX(e, n, a); if (l >= 0 && l <= 1) { for (var c = 0, f = ia(e, n, a, l), h = 0; h < u; h++) { var p = so[h] === 0 || so[h] === 1 ? 0.5 : 1, d = ia(r, t, i, so[h]); d < o || (so[h] < l ? c += f < e ? p : -p : c += a < f ? p : -p); } return c; } else { var p = so[0] === 0 || so[0] === 1 ? 0.5 : 1, d = ia(r, t, i, so[0]); return d < o ? 0 : a < e ? p : -p; } } function $Pe(r, e, t, n, i, a, o, s) { if (s -= e, s > t || s < -t) return 0; var u = Math.sqrt(t * t - s * s); so[0] = -u, so[1] = u; var l = Math.abs(n - i); if (l < 1e-4) return 0; if (l >= hp - 1e-4) { n = 0, i = hp; var c = a ? 1 : -1; return o >= so[0] + r && o <= so[1] + r ? c : 0; } if (n > i) { var f = n; n = i, i = f; } n < 0 && (n += hp, i += hp); for (var h = 0, p = 0; p < 2; p++) { var d = so[p]; if (d + r > o) { var v = Math.atan2(s, d), c = a ? 1 : -1; v < 0 && (v = hp + v), (v >= n && v <= i || v + hp >= n && v + hp <= i) && (v > Math.PI / 2 && v < Math.PI * 1.5 && (c = -c), h += c); } } return h; } function Mq(r, e, t, n, i) { for (var a = r.data, o = r.len(), s = 0, u = 0, l = 0, c = 0, f = 0, h, p, d = 0; d < o; ) { var v = a[d++], g = d === 1; switch (v === If.M && d > 1 && (t || (s += yc(u, l, c, f, n, i))), g && (u = a[d], l = a[d + 1], c = u, f = l), v) { case If.M: c = a[d++], f = a[d++], u = c, l = f; break; case If.L: if (t) { if ($f(u, l, a[d], a[d + 1], e, n, i)) return !0; } else s += yc(u, l, a[d], a[d + 1], n, i) || 0; u = a[d++], l = a[d++]; break; case If.C: if (t) { if (NPe(u, l, a[d++], a[d++], a[d++], a[d++], a[d], a[d + 1], e, n, i)) return !0; } else s += GPe(u, l, a[d++], a[d++], a[d++], a[d++], a[d], a[d + 1], n, i) || 0; u = a[d++], l = a[d++]; break; case If.Q: if (t) { if (Dq(u, l, a[d++], a[d++], a[d], a[d + 1], e, n, i)) return !0; } else s += zPe(u, l, a[d++], a[d++], a[d], a[d + 1], n, i) || 0; u = a[d++], l = a[d++]; break; case If.A: var m = a[d++], y = a[d++], _ = a[d++], w = a[d++], x = a[d++], C = a[d++]; d += 1; var S = !!(1 - a[d++]); h = Math.cos(x) * _ + m, p = Math.sin(x) * w + y, g ? (c = h, f = p) : s += yc(u, l, h, p, n, i); var b = (n - m) * w / _ + m; if (t) { if (FPe(m, y, w, x, x + C, S, e, b, i)) return !0; } else s += $Pe(m, y, w, x, x + C, S, b, i); u = Math.cos(x + C) * _ + m, l = Math.sin(x + C) * w + y; break; case If.R: c = u = a[d++], f = l = a[d++]; var E = a[d++], T = a[d++]; if (h = c + E, p = f + T, t) { if ($f(c, f, h, f, e, n, i) || $f(h, f, h, p, e, n, i) || $f(h, p, c, p, e, n, i) || $f(c, p, c, f, e, n, i)) return !0; } else s += yc(h, f, h, p, n, i), s += yc(c, p, c, f, n, i); break; case If.Z: if (t) { if ($f(u, l, c, f, e, n, i)) return !0; } else s += yc(u, l, c, f, n, i); u = c, l = f; break; } } return !t && !kPe(l, f) && (s += yc(u, l, c, f, n, i) || 0), s !== 0; } function HPe(r, e, t) { return Mq(r, 0, !1, e, t); } function UPe(r, e, t, n) { return Mq(r, e, !0, t, n); } var pE = qe({ fill: "#000", stroke: null, strokePercent: 1, fillOpacity: 1, strokeOpacity: 1, lineDashOffset: 0, lineWidth: 1, lineCap: "butt", miterLimit: 10, strokeNoScale: !1, strokeFirst: !1 }, ed), WPe = { style: qe({ fill: !0, stroke: !0, strokePercent: !0, fillOpacity: !0, strokeOpacity: !0, lineDashOffset: !0, lineWidth: !0, miterLimit: !0 }, VT.style) }, qI = Ql.concat([ "invisible", "culling", "z", "z2", "zlevel", "parent" ]), jPe = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.update = function() { var t = this; r.prototype.update.call(this); var n = this.style; if (n.decal) { var i = this._decalEl = this._decalEl || new e(); i.buildPath === e.prototype.buildPath && (i.buildPath = function(u) { t.buildPath(u, t.shape); }), i.silent = !0; var a = i.style; for (var o in n) a[o] !== n[o] && (a[o] = n[o]); a.fill = n.fill ? n.decal : null, a.decal = null, a.shadowColor = null, n.strokeFirst && (a.stroke = null); for (var s = 0; s < qI.length; ++s) i[qI[s]] = this[qI[s]]; i.__dirty |= as; } else this._decalEl && (this._decalEl = null); }, e.prototype.getDecalElement = function() { return this._decalEl; }, e.prototype._init = function(t) { var n = At(t); this.shape = this.getDefaultShape(); var i = this.getDefaultStyle(); i && this.useStyle(i); for (var a = 0; a < n.length; a++) { var o = n[a], s = t[o]; o === "style" ? this.style ? oe(this.style, s) : this.useStyle(s) : o === "shape" ? oe(this.shape, s) : r.prototype.attrKV.call(this, o, s); } this.style || this.useStyle({}); }, e.prototype.getDefaultStyle = function() { return null; }, e.prototype.getDefaultShape = function() { return {}; }, e.prototype.canBeInsideText = function() { return this.hasFill(); }, e.prototype.getInsideTextFill = function() { var t = this.style.fill; if (t !== "none") { if (Se(t)) { var n = uE(t, 0); return n > 0.5 ? DM : n > 0.2 ? ETe : MM; } else if (t) return MM; } return DM; }, e.prototype.getInsideTextStroke = function(t) { var n = this.style.fill; if (Se(n)) { var i = this.__zr, a = !!(i && i.isDarkMode()), o = uE(t, 0) < LM; if (a === o) return n; } }, e.prototype.buildPath = function(t, n, i) { }, e.prototype.pathUpdated = function() { this.__dirty &= ~vg; }, e.prototype.getUpdatedPathProxy = function(t) { return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, t), this.path; }, e.prototype.createPathProxy = function() { this.path = new tc(!1); }, e.prototype.hasStroke = function() { var t = this.style, n = t.stroke; return !(n == null || n === "none" || !(t.lineWidth > 0)); }, e.prototype.hasFill = function() { var t = this.style, n = t.fill; return n != null && n !== "none"; }, e.prototype.getBoundingRect = function() { var t = this._rect, n = this.style, i = !t; if (i) { var a = !1; this.path || (a = !0, this.createPathProxy()); var o = this.path; (a || this.__dirty & vg) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), t = o.getBoundingRect(); } if (this._rect = t, this.hasStroke() && this.path && this.path.len() > 0) { var s = this._rectStroke || (this._rectStroke = t.clone()); if (this.__dirty || i) { s.copy(t); var u = n.strokeNoScale ? this.getLineScale() : 1, l = n.lineWidth; if (!this.hasFill()) { var c = this.strokeContainThreshold; l = Math.max(l, c == null ? 4 : c); } u > 1e-10 && (s.width += l / u, s.height += l / u, s.x -= l / u / 2, s.y -= l / u / 2); } return s; } return t; }, e.prototype.contain = function(t, n) { var i = this.transformCoordToLocal(t, n), a = this.getBoundingRect(), o = this.style; if (t = i[0], n = i[1], a.contain(t, n)) { var s = this.path; if (this.hasStroke()) { var u = o.lineWidth, l = o.strokeNoScale ? this.getLineScale() : 1; if (l > 1e-10 && (this.hasFill() || (u = Math.max(u, this.strokeContainThreshold)), UPe(s, u / l, t, n))) return !0; } if (this.hasFill()) return HPe(s, t, n); } return !1; }, e.prototype.dirtyShape = function() { this.__dirty |= vg, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw(); }, e.prototype.dirty = function() { this.dirtyStyle(), this.dirtyShape(); }, e.prototype.animateShape = function(t) { return this.animate("shape", t); }, e.prototype.updateDuringAnimation = function(t) { t === "style" ? this.dirtyStyle() : t === "shape" ? this.dirtyShape() : this.markRedraw(); }, e.prototype.attrKV = function(t, n) { t === "shape" ? this.setShape(n) : r.prototype.attrKV.call(this, t, n); }, e.prototype.setShape = function(t, n) { var i = this.shape; return i || (i = this.shape = {}), typeof t == "string" ? i[t] = n : oe(i, t), this.dirtyShape(), this; }, e.prototype.shapeChanged = function() { return !!(this.__dirty & vg); }, e.prototype.createStyle = function(t) { return DT(pE, t); }, e.prototype._innerSaveToNormal = function(t) { r.prototype._innerSaveToNormal.call(this, t); var n = this._normalState; t.shape && !n.shape && (n.shape = oe({}, this.shape)); }, e.prototype._applyStateObj = function(t, n, i, a, o, s) { r.prototype._applyStateObj.call(this, t, n, i, a, o, s); var u = !(n && a), l; if (n && n.shape ? o ? a ? l = n.shape : (l = oe({}, i.shape), oe(l, n.shape)) : (l = oe({}, a ? this.shape : i.shape), oe(l, n.shape)) : u && (l = i.shape), l) if (o) { this.shape = oe({}, this.shape); for (var c = {}, f = At(l), h = 0; h < f.length; h++) { var p = f[h]; typeof l[p] == "object" ? this.shape[p] = l[p] : c[p] = l[p]; } this._transitionState(t, { shape: c }, s); } else this.shape = l, this.dirtyShape(); }, e.prototype._mergeStates = function(t) { for (var n = r.prototype._mergeStates.call(this, t), i, a = 0; a < t.length; a++) { var o = t[a]; o.shape && (i = i || {}, this._mergeStyle(i, o.shape)); } return i && (n.shape = i), n; }, e.prototype.getAnimationStyleProps = function() { return WPe; }, e.prototype.isZeroArea = function() { return !1; }, e.extend = function(t) { var n = function(a) { W(o, a); function o(s) { var u = a.call(this, s) || this; return t.init && t.init.call(u, s), u; } return o.prototype.getDefaultStyle = function() { return Qe(t.style); }, o.prototype.getDefaultShape = function() { return Qe(t.shape); }, o; }(e); for (var i in t) typeof t[i] == "function" && (n.prototype[i] = t[i]); return n; }, e.initDefaultProps = function() { var t = e.prototype; t.type = "path", t.strokeContainThreshold = 5, t.segmentIgnoreThreshold = 0, t.subPixelOptimize = !1, t.autoBatch = !1, t.__dirty = as | H0 | vg; }(), e; }(vu); const Tt = jPe; var YPe = qe({ strokeFirst: !0, font: Dh, x: 0, y: 0, textAlign: "left", textBaseline: "top", miterLimit: 2 }, pE), Oq = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.hasStroke = function() { var t = this.style, n = t.stroke; return n != null && n !== "none" && t.lineWidth > 0; }, e.prototype.hasFill = function() { var t = this.style, n = t.fill; return n != null && n !== "none"; }, e.prototype.createStyle = function(t) { return DT(YPe, t); }, e.prototype.setBoundingRect = function(t) { this._rect = t; }, e.prototype.getBoundingRect = function() { var t = this.style; if (!this._rect) { var n = t.text; n != null ? n += "" : n = ""; var i = Mw(n, t.font, t.textAlign, t.textBaseline); if (i.x += t.x || 0, i.y += t.y || 0, this.hasStroke()) { var a = t.lineWidth; i.x -= a / 2, i.y -= a / 2, i.width += a, i.height += a; } this._rect = i; } return this._rect; }, e.initDefaultProps = function() { var t = e.prototype; t.dirtyRectTolerance = 10; }(), e; }(vu); Oq.prototype.type = "tspan"; const d1 = Oq; var XPe = qe({ x: 0, y: 0 }, ed), qPe = { style: qe({ x: !0, y: !0, width: !0, height: !0, sx: !0, sy: !0, sWidth: !0, sHeight: !0 }, VT.style) }; function ZPe(r) { return !!(r && typeof r != "string" && r.width && r.height); } var Rq = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.createStyle = function(t) { return DT(XPe, t); }, e.prototype._getSize = function(t) { var n = this.style, i = n[t]; if (i != null) return i; var a = ZPe(n.image) ? n.image : this.__image; if (!a) return 0; var o = t === "width" ? "height" : "width", s = n[o]; return s == null ? a[t] : a[t] / a[o] * s; }, e.prototype.getWidth = function() { return this._getSize("width"); }, e.prototype.getHeight = function() { return this._getSize("height"); }, e.prototype.getAnimationStyleProps = function() { return qPe; }, e.prototype.getBoundingRect = function() { var t = this.style; return this._rect || (this._rect = new gt(t.x || 0, t.y || 0, this.getWidth(), this.getHeight())), this._rect; }, e; }(vu); Rq.prototype.type = "image"; const Ba = Rq; function KPe(r, e) { var t = e.x, n = e.y, i = e.width, a = e.height, o = e.r, s, u, l, c; i < 0 && (t = t + i, i = -i), a < 0 && (n = n + a, a = -a), typeof o == "number" ? s = u = l = c = o : o instanceof Array ? o.length === 1 ? s = u = l = c = o[0] : o.length === 2 ? (s = l = o[0], u = c = o[1]) : o.length === 3 ? (s = o[0], u = c = o[1], l = o[2]) : (s = o[0], u = o[1], l = o[2], c = o[3]) : s = u = l = c = 0; var f; s + u > i && (f = s + u, s *= i / f, u *= i / f), l + c > i && (f = l + c, l *= i / f, c *= i / f), u + l > a && (f = u + l, u *= a / f, l *= a / f), s + c > a && (f = s + c, s *= a / f, c *= a / f), r.moveTo(t + s, n), r.lineTo(t + i - u, n), u !== 0 && r.arc(t + i - u, n + u, u, -Math.PI / 2, 0), r.lineTo(t + i, n + a - l), l !== 0 && r.arc(t + i - l, n + a - l, l, 0, Math.PI / 2), r.lineTo(t + c, n + a), c !== 0 && r.arc(t + c, n + a - c, c, Math.PI / 2, Math.PI), r.lineTo(t, n + s), s !== 0 && r.arc(t + s, n + s, s, Math.PI, Math.PI * 1.5); } var Mg = Math.round; function Nq(r, e, t) { if (!!e) { var n = e.x1, i = e.x2, a = e.y1, o = e.y2; r.x1 = n, r.x2 = i, r.y1 = a, r.y2 = o; var s = t && t.lineWidth; return s && (Mg(n * 2) === Mg(i * 2) && (r.x1 = r.x2 = Hp(n, s, !0)), Mg(a * 2) === Mg(o * 2) && (r.y1 = r.y2 = Hp(a, s, !0))), r; } } function Fq(r, e, t) { if (!!e) { var n = e.x, i = e.y, a = e.width, o = e.height; r.x = n, r.y = i, r.width = a, r.height = o; var s = t && t.lineWidth; return s && (r.x = Hp(n, s, !0), r.y = Hp(i, s, !0), r.width = Math.max(Hp(n + a, s, !1) - r.x, a === 0 ? 0 : 1), r.height = Math.max(Hp(i + o, s, !1) - r.y, o === 0 ? 0 : 1)), r; } } function Hp(r, e, t) { if (!e) return r; var n = Mg(r * 2); return (n + Mg(e)) % 2 === 0 ? n / 2 : (n + (t ? 1 : -1)) / 2; } var JPe = function() { function r() { this.x = 0, this.y = 0, this.width = 0, this.height = 0; } return r; }(), QPe = {}, Bq = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultShape = function() { return new JPe(); }, e.prototype.buildPath = function(t, n) { var i, a, o, s; if (this.subPixelOptimize) { var u = Fq(QPe, n, this.style); i = u.x, a = u.y, o = u.width, s = u.height, u.r = n.r, n = u; } else i = n.x, a = n.y, o = n.width, s = n.height; n.r ? KPe(t, n) : t.rect(i, a, o, s); }, e.prototype.isZeroArea = function() { return !this.shape.width || !this.shape.height; }, e; }(Tt); Bq.prototype.type = "rect"; const Vt = Bq; var M6 = { fill: "#000" }, O6 = 2, eIe = { style: qe({ fill: !0, stroke: !0, fillOpacity: !0, strokeOpacity: !0, lineWidth: !0, fontSize: !0, lineHeight: !0, width: !0, height: !0, textShadowColor: !0, textShadowBlur: !0, textShadowOffsetX: !0, textShadowOffsetY: !0, backgroundColor: !0, padding: !0, borderColor: !0, borderWidth: !0, borderRadius: !0 }, VT.style) }, kq = function(r) { W(e, r); function e(t) { var n = r.call(this) || this; return n.type = "text", n._children = [], n._defaultStyle = M6, n.attr(t), n; } return e.prototype.childrenRef = function() { return this._children; }, e.prototype.update = function() { r.prototype.update.call(this), this.styleChanged() && this._updateSubTexts(); for (var t = 0; t < this._children.length; t++) { var n = this._children[t]; n.zlevel = this.zlevel, n.z = this.z, n.z2 = this.z2, n.culling = this.culling, n.cursor = this.cursor, n.invisible = this.invisible; } }, e.prototype.updateTransform = function() { var t = this.innerTransformable; t ? (t.updateTransform(), t.transform && (this.transform = t.transform)) : r.prototype.updateTransform.call(this); }, e.prototype.getLocalTransform = function(t) { var n = this.innerTransformable; return n ? n.getLocalTransform(t) : r.prototype.getLocalTransform.call(this, t); }, e.prototype.getComputedTransform = function() { return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), r.prototype.getComputedTransform.call(this); }, e.prototype._updateSubTexts = function() { this._childCursor = 0, nIe(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated(); }, e.prototype.addSelfToZr = function(t) { r.prototype.addSelfToZr.call(this, t); for (var n = 0; n < this._children.length; n++) this._children[n].__zr = t; }, e.prototype.removeSelfFromZr = function(t) { r.prototype.removeSelfFromZr.call(this, t); for (var n = 0; n < this._children.length; n++) this._children[n].__zr = null; }, e.prototype.getBoundingRect = function() { if (this.styleChanged() && this._updateSubTexts(), !this._rect) { for (var t = new gt(0, 0, 0, 0), n = this._children, i = [], a = null, o = 0; o < n.length; o++) { var s = n[o], u = s.getBoundingRect(), l = s.getLocalTransform(i); l ? (t.copy(u), t.applyTransform(l), a = a || t.clone(), a.union(t)) : (a = a || u.clone(), a.union(u)); } this._rect = a || t; } return this._rect; }, e.prototype.setDefaultTextStyle = function(t) { this._defaultStyle = t || M6; }, e.prototype.setTextContent = function(t) { if (process.env.NODE_ENV !== "production") throw new Error("Can't attach text on another text"); }, e.prototype._mergeStyle = function(t, n) { if (!n) return t; var i = n.rich, a = t.rich || i && {}; return oe(t, n), i && a ? (this._mergeRich(a, i), t.rich = a) : a && (t.rich = a), t; }, e.prototype._mergeRich = function(t, n) { for (var i = At(n), a = 0; a < i.length; a++) { var o = i[a]; t[o] = t[o] || {}, oe(t[o], n[o]); } }, e.prototype.getAnimationStyleProps = function() { return eIe; }, e.prototype._getOrCreateChild = function(t) { var n = this._children[this._childCursor]; return (!n || !(n instanceof t)) && (n = new t()), this._children[this._childCursor++] = n, n.__zr = this.__zr, n.parent = this, n; }, e.prototype._updatePlainTexts = function() { var t = this.style, n = t.font || Dh, i = t.padding, a = G6(t), o = CPe(a, t), s = ZI(t), u = !!t.backgroundColor, l = o.outerHeight, c = o.outerWidth, f = o.contentWidth, h = o.lines, p = o.lineHeight, d = this._defaultStyle, v = t.x || 0, g = t.y || 0, m = t.align || d.align || "left", y = t.verticalAlign || d.verticalAlign || "top", _ = v, w = gg(g, o.contentHeight, y); if (s || i) { var x = W0(v, c, m), C = gg(g, l, y); s && this._renderBackground(t, t, x, C, c, l); } w += p / 2, i && (_ = V6(v, m, i), y === "top" ? w += i[0] : y === "bottom" && (w -= i[2])); for (var S = 0, b = !1, E = k6("fill" in t ? t.fill : (b = !0, d.fill)), T = B6("stroke" in t ? t.stroke : !u && (!d.autoStroke || b) ? (S = O6, d.stroke) : null), P = t.textShadowBlur > 0, I = t.width != null && (t.overflow === "truncate" || t.overflow === "break" || t.overflow === "breakAll"), A = o.calculatedLineHeight, L = 0; L < h.length; L++) { var D = this._getOrCreateChild(d1), O = D.createStyle(); D.useStyle(O), O.text = h[L], O.x = _, O.y = w, m && (O.textAlign = m), O.textBaseline = "middle", O.opacity = t.opacity, O.strokeFirst = !0, P && (O.shadowBlur = t.textShadowBlur || 0, O.shadowColor = t.textShadowColor || "transparent", O.shadowOffsetX = t.textShadowOffsetX || 0, O.shadowOffsetY = t.textShadowOffsetY || 0), O.stroke = T, O.fill = E, T && (O.lineWidth = t.lineWidth || S, O.lineDash = t.lineDash, O.lineDashOffset = t.lineDashOffset || 0), O.font = n, N6(O, t), w += p, I && D.setBoundingRect(new gt(W0(O.x, t.width, O.textAlign), gg(O.y, A, O.textBaseline), f, A)); } }, e.prototype._updateRichTexts = function() { var t = this.style, n = G6(t), i = bPe(n, t), a = i.width, o = i.outerWidth, s = i.outerHeight, u = t.padding, l = t.x || 0, c = t.y || 0, f = this._defaultStyle, h = t.align || f.align, p = t.verticalAlign || f.verticalAlign, d = W0(l, o, h), v = gg(c, s, p), g = d, m = v; u && (g += u[3], m += u[0]); var y = g + a; ZI(t) && this._renderBackground(t, t, d, v, o, s); for (var _ = !!t.backgroundColor, w = 0; w < i.lines.length; w++) { for (var x = i.lines[w], C = x.tokens, S = C.length, b = x.lineHeight, E = x.width, T = 0, P = g, I = y, A = S - 1, L = void 0; T < S && (L = C[T], !L.align || L.align === "left"); ) this._placeToken(L, t, b, m, P, "left", _), E -= L.width, P += L.width, T++; for (; A >= 0 && (L = C[A], L.align === "right"); ) this._placeToken(L, t, b, m, I, "right", _), E -= L.width, I -= L.width, A--; for (P += (a - (P - g) - (y - I) - E) / 2; T <= A; ) L = C[T], this._placeToken(L, t, b, m, P + L.width / 2, "center", _), P += L.width, T++; m += b; } }, e.prototype._placeToken = function(t, n, i, a, o, s, u) { var l = n.rich[t.styleName] || {}; l.text = t.text; var c = t.verticalAlign, f = a + i / 2; c === "top" ? f = a + t.height / 2 : c === "bottom" && (f = a + i - t.height / 2); var h = !t.isLineHolder && ZI(l); h && this._renderBackground(l, n, s === "right" ? o - t.width : s === "center" ? o - t.width / 2 : o, f - t.height / 2, t.width, t.height); var p = !!l.backgroundColor, d = t.textPadding; d && (o = V6(o, s, d), f -= t.height / 2 - d[0] - t.innerHeight / 2); var v = this._getOrCreateChild(d1), g = v.createStyle(); v.useStyle(g); var m = this._defaultStyle, y = !1, _ = 0, w = k6("fill" in l ? l.fill : "fill" in n ? n.fill : (y = !0, m.fill)), x = B6("stroke" in l ? l.stroke : "stroke" in n ? n.stroke : !p && !u && (!m.autoStroke || y) ? (_ = O6, m.stroke) : null), C = l.textShadowBlur > 0 || n.textShadowBlur > 0; g.text = t.text, g.x = o, g.y = f, C && (g.shadowBlur = l.textShadowBlur || n.textShadowBlur || 0, g.shadowColor = l.textShadowColor || n.textShadowColor || "transparent", g.shadowOffsetX = l.textShadowOffsetX || n.textShadowOffsetX || 0, g.shadowOffsetY = l.textShadowOffsetY || n.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = t.font || Dh, g.opacity = $u(l.opacity, n.opacity, 1), N6(g, l), x && (g.lineWidth = $u(l.lineWidth, n.lineWidth, _), g.lineDash = wt(l.lineDash, n.lineDash), g.lineDashOffset = n.lineDashOffset || 0, g.stroke = x), w && (g.fill = w); var S = t.contentWidth, b = t.contentHeight; v.setBoundingRect(new gt(W0(g.x, S, g.textAlign), gg(g.y, b, g.textBaseline), S, b)); }, e.prototype._renderBackground = function(t, n, i, a, o, s) { var u = t.backgroundColor, l = t.borderWidth, c = t.borderColor, f = u && u.image, h = u && !f, p = t.borderRadius, d = this, v, g; if (h || t.lineHeight || l && c) { v = this._getOrCreateChild(Vt), v.useStyle(v.createStyle()), v.style.fill = null; var m = v.shape; m.x = i, m.y = a, m.width = o, m.height = s, m.r = p, v.dirtyShape(); } if (h) { var y = v.style; y.fill = u || null, y.fillOpacity = wt(t.fillOpacity, 1); } else if (f) { g = this._getOrCreateChild(Ba), g.onload = function() { d.dirtyStyle(); }; var _ = g.style; _.image = u.image, _.x = i, _.y = a, _.width = o, _.height = s; } if (l && c) { var y = v.style; y.lineWidth = l, y.stroke = c, y.strokeOpacity = wt(t.strokeOpacity, 1), y.lineDash = t.borderDash, y.lineDashOffset = t.borderDashOffset || 0, v.strokeContainThreshold = 0, v.hasFill() && v.hasStroke() && (y.strokeFirst = !0, y.lineWidth *= 2); } var w = (v || g).style; w.shadowBlur = t.shadowBlur || 0, w.shadowColor = t.shadowColor || "transparent", w.shadowOffsetX = t.shadowOffsetX || 0, w.shadowOffsetY = t.shadowOffsetY || 0, w.opacity = $u(t.opacity, n.opacity, 1); }, e.makeFont = function(t) { var n = ""; return Gq(t) && (n = [ t.fontStyle, t.fontWeight, Vq(t.fontSize), t.fontFamily || "sans-serif" ].join(" ")), n && Bu(n) || t.textFont || t.font; }, e; }(vu), tIe = { left: !0, right: 1, center: 1 }, rIe = { top: 1, bottom: 1, middle: 1 }, R6 = ["fontStyle", "fontWeight", "fontSize", "fontFamily"]; function Vq(r) { return typeof r == "string" && (r.indexOf("px") !== -1 || r.indexOf("rem") !== -1 || r.indexOf("em") !== -1) ? r : isNaN(+r) ? LN + "px" : r + "px"; } function N6(r, e) { for (var t = 0; t < R6.length; t++) { var n = R6[t], i = e[n]; i != null && (r[n] = i); } } function Gq(r) { return r.fontSize != null || r.fontFamily || r.fontWeight; } function nIe(r) { return F6(r), M(r.rich, F6), r; } function F6(r) { if (r) { r.font = kq.makeFont(r); var e = r.align; e === "middle" && (e = "center"), r.align = e == null || tIe[e] ? e : "left"; var t = r.verticalAlign; t === "center" && (t = "middle"), r.verticalAlign = t == null || rIe[t] ? t : "top"; var n = r.padding; n && (r.padding = NN(r.padding)); } } function B6(r, e) { return r == null || e <= 0 || r === "transparent" || r === "none" ? null : r.image || r.colorStops ? "#000" : r; } function k6(r) { return r == null || r === "none" ? null : r.image || r.colorStops ? "#000" : r; } function V6(r, e, t) { return e === "right" ? r - t[1] : e === "center" ? r + t[3] / 2 - t[1] / 2 : r + t[3]; } function G6(r) { var e = r.text; return e != null && (e += ""), e; } function ZI(r) { return !!(r.backgroundColor || r.lineHeight || r.borderWidth && r.borderColor); } const Yt = kq; var nt = Ut(), kM = function(r, e, t, n) { if (n) { var i = nt(n); i.dataIndex = t, i.dataType = e, i.seriesIndex = r, n.type === "group" && n.traverse(function(a) { var o = nt(a); o.seriesIndex = r, o.dataIndex = t, o.dataType = e; }); } }, z6 = 1, $6 = {}, zq = Ut(), YN = Ut(), XN = 0, Rw = 1, zT = 2, Co = ["emphasis", "blur", "select"], v1 = ["normal", "emphasis", "blur", "select"], wy = 10, iIe = 9, td = "highlight", lS = "downplay", y_ = "select", cS = "unselect", __ = "toggleSelect"; function Vv(r) { return r != null && r !== "none"; } var H6 = new Dw(100); function U6(r) { if (Se(r)) { var e = H6.get(r); return e || (e = SM(r, -0.1), H6.put(r, e)), e; } else if (LT(r)) { var t = oe({}, r); return t.colorStops = ce(r.colorStops, function(n) { return { offset: n.offset, color: SM(n.color, -0.1) }; }), t; } return r; } function $T(r, e, t) { r.onHoverStateChange && (r.hoverState || 0) !== t && r.onHoverStateChange(e), r.hoverState = t; } function $q(r) { $T(r, "emphasis", zT); } function Hq(r) { r.hoverState === zT && $T(r, "normal", XN); } function qN(r) { $T(r, "blur", Rw); } function Uq(r) { r.hoverState === Rw && $T(r, "normal", XN); } function aIe(r) { r.selected = !0; } function oIe(r) { r.selected = !1; } function W6(r, e, t) { e(r, t); } function yf(r, e, t) { W6(r, e, t), r.isGroup && r.traverse(function(n) { W6(n, e, t); }); } function dE(r, e) { switch (e) { case "emphasis": r.hoverState = zT; break; case "normal": r.hoverState = XN; break; case "blur": r.hoverState = Rw; break; case "select": r.selected = !0; } } function sIe(r, e, t, n) { for (var i = r.style, a = {}, o = 0; o < e.length; o++) { var s = e[o], u = i[s]; a[s] = u == null ? n && n[s] : u; } for (var o = 0; o < r.animators.length; o++) { var l = r.animators[o]; l.__fromStateTransition && l.__fromStateTransition.indexOf(t) < 0 && l.targetName === "style" && l.saveTo(a, e); } return a; } function uIe(r, e, t, n) { var i = t && _t(t, "select") >= 0, a = !1; if (r instanceof Tt) { var o = zq(r), s = i && o.selectFill || o.normalFill, u = i && o.selectStroke || o.normalStroke; if (Vv(s) || Vv(u)) { n = n || {}; var l = n.style || {}; l.fill === "inherit" ? (a = !0, n = oe({}, n), l = oe({}, l), l.fill = s) : !Vv(l.fill) && Vv(s) ? (a = !0, n = oe({}, n), l = oe({}, l), l.fill = U6(s)) : !Vv(l.stroke) && Vv(u) && (a || (n = oe({}, n), l = oe({}, l)), l.stroke = U6(u)), n.style = l; } } if (n && n.z2 == null) { a || (n = oe({}, n)); var c = r.z2EmphasisLift; n.z2 = r.z2 + (c != null ? c : wy); } return n; } function lIe(r, e, t) { if (t && t.z2 == null) { t = oe({}, t); var n = r.z2SelectLift; t.z2 = r.z2 + (n != null ? n : iIe); } return t; } function cIe(r, e, t) { var n = _t(r.currentStates, e) >= 0, i = r.style.opacity, a = n ? null : sIe(r, ["opacity"], e, { opacity: 1 }); t = t || {}; var o = t.style || {}; return o.opacity == null && (t = oe({}, t), o = oe({ opacity: n ? i : a.opacity * 0.1 }, o), t.style = o), t; } function KI(r, e) { var t = this.states[r]; if (this.style) { if (r === "emphasis") return uIe(this, r, e, t); if (r === "blur") return cIe(this, r, t); if (r === "select") return lIe(this, r, t); } return t; } function $d(r) { r.stateProxy = KI; var e = r.getTextContent(), t = r.getTextGuideLine(); e && (e.stateProxy = KI), t && (t.stateProxy = KI); } function j6(r, e) { !Xq(r, e) && !r.__highByOuter && yf(r, $q); } function Y6(r, e) { !Xq(r, e) && !r.__highByOuter && yf(r, Hq); } function af(r, e) { r.__highByOuter |= 1 << (e || 0), yf(r, $q); } function of(r, e) { !(r.__highByOuter &= ~(1 << (e || 0))) && yf(r, Hq); } function Wq(r) { yf(r, qN); } function ZN(r) { yf(r, Uq); } function jq(r) { yf(r, aIe); } function Yq(r) { yf(r, oIe); } function Xq(r, e) { return r.__highDownSilentOnTouch && e.zrByTouch; } function qq(r) { var e = r.getModel(), t = [], n = []; e.eachComponent(function(i, a) { var o = YN(a), s = i === "series", u = s ? r.getViewOfSeriesModel(a) : r.getViewOfComponentModel(a); !s && n.push(u), o.isBlured && (u.group.traverse(function(l) { Uq(l); }), s && t.push(a)), o.isBlured = !1; }), M(n, function(i) { i && i.toggleBlurSeries && i.toggleBlurSeries(t, !1, e); }); } function VM(r, e, t, n) { var i = n.getModel(); t = t || "coordinateSystem"; function a(l, c) { for (var f = 0; f < c.length; f++) { var h = l.getItemGraphicEl(c[f]); h && ZN(h); } } if (r != null && !(!e || e === "none")) { var o = i.getSeriesByIndex(r), s = o.coordinateSystem; s && s.master && (s = s.master); var u = []; i.eachSeries(function(l) { var c = o === l, f = l.coordinateSystem; f && f.master && (f = f.master); var h = f && s ? f === s : c; if (!(t === "series" && !c || t === "coordinateSystem" && !h || e === "series" && c)) { var p = n.getViewOfSeriesModel(l); if (p.group.traverse(function(g) { qN(g); }), eo(e)) a(l.getData(), e); else if (Xe(e)) for (var d = At(e), v = 0; v < d.length; v++) a(l.getData(d[v]), e[d[v]]); u.push(l), YN(l).isBlured = !0; } }), i.eachComponent(function(l, c) { if (l !== "series") { var f = n.getViewOfComponentModel(c); f && f.toggleBlurSeries && f.toggleBlurSeries(u, !0, i); } }); } } function GM(r, e, t) { if (!(r == null || e == null)) { var n = t.getModel().getComponent(r, e); if (!!n) { YN(n).isBlured = !0; var i = t.getViewOfComponentModel(n); !i || !i.focusBlurEnabled || i.group.traverse(function(a) { qN(a); }); } } } function fIe(r, e, t) { var n = r.seriesIndex, i = r.getData(e.dataType); if (!i) { process.env.NODE_ENV !== "production" && Oa("Unknown dataType " + e.dataType); return; } var a = Gd(i, e); a = (le(a) ? a[0] : a) || 0; var o = i.getItemGraphicEl(a); if (!o) for (var s = i.count(), u = 0; !o && u < s; ) o = i.getItemGraphicEl(u++); if (o) { var l = nt(o); VM(n, l.focus, l.blurScope, t); } else { var c = r.get(["emphasis", "focus"]), f = r.get(["emphasis", "blurScope"]); c != null && VM(n, c, f, t); } } function KN(r, e, t, n) { var i = { focusSelf: !1, dispatchers: null }; if (r == null || r === "series" || e == null || t == null) return i; var a = n.getModel().getComponent(r, e); if (!a) return i; var o = n.getViewOfComponentModel(a); if (!o || !o.findHighDownDispatchers) return i; for (var s = o.findHighDownDispatchers(t), u, l = 0; l < s.length; l++) if (process.env.NODE_ENV !== "production" && !Oh(s[l]) && Oa("param should be highDownDispatcher"), nt(s[l]).focus === "self") { u = !0; break; } return { focusSelf: u, dispatchers: s }; } function hIe(r, e, t) { process.env.NODE_ENV !== "production" && !Oh(r) && Oa("param should be highDownDispatcher"); var n = nt(r), i = KN(n.componentMainType, n.componentIndex, n.componentHighDownName, t), a = i.dispatchers, o = i.focusSelf; a ? (o && GM(n.componentMainType, n.componentIndex, t), M(a, function(s) { return j6(s, e); })) : (VM(n.seriesIndex, n.focus, n.blurScope, t), n.focus === "self" && GM(n.componentMainType, n.componentIndex, t), j6(r, e)); } function pIe(r, e, t) { process.env.NODE_ENV !== "production" && !Oh(r) && Oa("param should be highDownDispatcher"), qq(t); var n = nt(r), i = KN(n.componentMainType, n.componentIndex, n.componentHighDownName, t).dispatchers; i ? M(i, function(a) { return Y6(a, e); }) : Y6(r, e); } function dIe(r, e, t) { if (!!$M(e)) { var n = e.dataType, i = r.getData(n), a = Gd(i, e); le(a) || (a = [a]), r[e.type === __ ? "toggleSelect" : e.type === y_ ? "select" : "unselect"](a, n); } } function X6(r) { var e = r.getAllData(); M(e, function(t) { var n = t.data, i = t.type; n.eachItemGraphicEl(function(a, o) { r.isSelected(o, i) ? jq(a) : Yq(a); }); }); } function vIe(r) { var e = []; return r.eachSeries(function(t) { var n = t.getAllData(); M(n, function(i) { i.data; var a = i.type, o = t.getSelectedDataIndices(); if (o.length > 0) { var s = { dataIndex: o, seriesIndex: t.seriesIndex }; a != null && (s.dataType = a), e.push(s); } }); }), e; } function rd(r, e, t) { Up(r, !0), yf(r, $d), zM(r, e, t); } function gIe(r) { Up(r, !1); } function Zn(r, e, t, n) { n ? gIe(r) : rd(r, e, t); } function zM(r, e, t) { var n = nt(r); e != null ? (n.focus = e, n.blurScope = t) : n.focus && (n.focus = null); } var q6 = ["emphasis", "blur", "select"], mIe = { itemStyle: "getItemStyle", lineStyle: "getLineStyle", areaStyle: "getAreaStyle" }; function Ra(r, e, t, n) { t = t || "itemStyle"; for (var i = 0; i < q6.length; i++) { var a = q6[i], o = e.getModel([a, t]), s = r.ensureState(a); s.style = n ? n(o) : o[mIe[t]](); } } function Up(r, e) { var t = e === !1, n = r; r.highDownSilentOnTouch && (n.__highDownSilentOnTouch = r.highDownSilentOnTouch), (!t || n.__highDownDispatcher) && (n.__highByOuter = n.__highByOuter || 0, n.__highDownDispatcher = !t); } function Oh(r) { return !!(r && r.__highDownDispatcher); } function yIe(r, e, t) { var n = nt(r); n.componentMainType = e.mainType, n.componentIndex = e.componentIndex, n.componentHighDownName = t; } function _Ie(r) { var e = $6[r]; return e == null && z6 <= 32 && (e = $6[r] = z6++), e; } function $M(r) { var e = r.type; return e === y_ || e === cS || e === __; } function Z6(r) { var e = r.type; return e === td || e === lS; } function wIe(r) { var e = zq(r); e.normalFill = r.style.fill, e.normalStroke = r.style.stroke; var t = r.states.select || {}; e.selectFill = t.style && t.style.fill || null, e.selectStroke = t.style && t.style.stroke || null; } var Gv = tc.CMD, xIe = [[], [], []], K6 = Math.sqrt, CIe = Math.atan2; function Zq(r, e) { if (!!e) { var t = r.data, n = r.len(), i, a, o, s, u, l, c = Gv.M, f = Gv.C, h = Gv.L, p = Gv.R, d = Gv.A, v = Gv.Q; for (o = 0, s = 0; o < n; ) { switch (i = t[o++], s = o, a = 0, i) { case c: a = 1; break; case h: a = 1; break; case f: a = 3; break; case v: a = 2; break; case d: var g = e[4], m = e[5], y = K6(e[0] * e[0] + e[1] * e[1]), _ = K6(e[2] * e[2] + e[3] * e[3]), w = CIe(-e[1] / _, e[0] / y); t[o] *= y, t[o++] += g, t[o] *= _, t[o++] += m, t[o++] *= y, t[o++] *= _, t[o++] += w, t[o++] += w, o += 2, s = o; break; case p: l[0] = t[o++], l[1] = t[o++], Ia(l, l, e), t[s++] = l[0], t[s++] = l[1], l[0] += t[o++], l[1] += t[o++], Ia(l, l, e), t[s++] = l[0], t[s++] = l[1]; } for (u = 0; u < a; u++) { var x = xIe[u]; x[0] = t[o++], x[1] = t[o++], Ia(x, x, e), t[s++] = x[0], t[s++] = x[1]; } } r.increaseVersion(); } } var JI = Math.sqrt, jx = Math.sin, Yx = Math.cos, a0 = Math.PI; function J6(r) { return Math.sqrt(r[0] * r[0] + r[1] * r[1]); } function HM(r, e) { return (r[0] * e[0] + r[1] * e[1]) / (J6(r) * J6(e)); } function Q6(r, e) { return (r[0] * e[1] < r[1] * e[0] ? -1 : 1) * Math.acos(HM(r, e)); } function eG(r, e, t, n, i, a, o, s, u, l, c) { var f = u * (a0 / 180), h = Yx(f) * (r - t) / 2 + jx(f) * (e - n) / 2, p = -1 * jx(f) * (r - t) / 2 + Yx(f) * (e - n) / 2, d = h * h / (o * o) + p * p / (s * s); d > 1 && (o *= JI(d), s *= JI(d)); var v = (i === a ? -1 : 1) * JI((o * o * (s * s) - o * o * (p * p) - s * s * (h * h)) / (o * o * (p * p) + s * s * (h * h))) || 0, g = v * o * p / s, m = v * -s * h / o, y = (r + t) / 2 + Yx(f) * g - jx(f) * m, _ = (e + n) / 2 + jx(f) * g + Yx(f) * m, w = Q6([1, 0], [(h - g) / o, (p - m) / s]), x = [(h - g) / o, (p - m) / s], C = [(-1 * h - g) / o, (-1 * p - m) / s], S = Q6(x, C); if (HM(x, C) <= -1 && (S = a0), HM(x, C) >= 1 && (S = 0), S < 0) { var b = Math.round(S / a0 * 1e6) / 1e6; S = a0 * 2 + b % 2 * a0; } c.addData(l, y, _, o, s, w, S, f, a); } var SIe = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, EIe = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g; function bIe(r) { var e = new tc(); if (!r) return e; var t = 0, n = 0, i = t, a = n, o, s = tc.CMD, u = r.match(SIe); if (!u) return e; for (var l = 0; l < u.length; l++) { for (var c = u[l], f = c.charAt(0), h = void 0, p = c.match(EIe) || [], d = p.length, v = 0; v < d; v++) p[v] = parseFloat(p[v]); for (var g = 0; g < d; ) { var m = void 0, y = void 0, _ = void 0, w = void 0, x = void 0, C = void 0, S = void 0, b = t, E = n, T = void 0, P = void 0; switch (f) { case "l": t += p[g++], n += p[g++], h = s.L, e.addData(h, t, n); break; case "L": t = p[g++], n = p[g++], h = s.L, e.addData(h, t, n); break; case "m": t += p[g++], n += p[g++], h = s.M, e.addData(h, t, n), i = t, a = n, f = "l"; break; case "M": t = p[g++], n = p[g++], h = s.M, e.addData(h, t, n), i = t, a = n, f = "L"; break; case "h": t += p[g++], h = s.L, e.addData(h, t, n); break; case "H": t = p[g++], h = s.L, e.addData(h, t, n); break; case "v": n += p[g++], h = s.L, e.addData(h, t, n); break; case "V": n = p[g++], h = s.L, e.addData(h, t, n); break; case "C": h = s.C, e.addData(h, p[g++], p[g++], p[g++], p[g++], p[g++], p[g++]), t = p[g - 2], n = p[g - 1]; break; case "c": h = s.C, e.addData(h, p[g++] + t, p[g++] + n, p[g++] + t, p[g++] + n, p[g++] + t, p[g++] + n), t += p[g - 2], n += p[g - 1]; break; case "S": m = t, y = n, T = e.len(), P = e.data, o === s.C && (m += t - P[T - 4], y += n - P[T - 3]), h = s.C, b = p[g++], E = p[g++], t = p[g++], n = p[g++], e.addData(h, m, y, b, E, t, n); break; case "s": m = t, y = n, T = e.len(), P = e.data, o === s.C && (m += t - P[T - 4], y += n - P[T - 3]), h = s.C, b = t + p[g++], E = n + p[g++], t += p[g++], n += p[g++], e.addData(h, m, y, b, E, t, n); break; case "Q": b = p[g++], E = p[g++], t = p[g++], n = p[g++], h = s.Q, e.addData(h, b, E, t, n); break; case "q": b = p[g++] + t, E = p[g++] + n, t += p[g++], n += p[g++], h = s.Q, e.addData(h, b, E, t, n); break; case "T": m = t, y = n, T = e.len(), P = e.data, o === s.Q && (m += t - P[T - 4], y += n - P[T - 3]), t = p[g++], n = p[g++], h = s.Q, e.addData(h, m, y, t, n); break; case "t": m = t, y = n, T = e.len(), P = e.data, o === s.Q && (m += t - P[T - 4], y += n - P[T - 3]), t += p[g++], n += p[g++], h = s.Q, e.addData(h, m, y, t, n); break; case "A": _ = p[g++], w = p[g++], x = p[g++], C = p[g++], S = p[g++], b = t, E = n, t = p[g++], n = p[g++], h = s.A, eG(b, E, t, n, C, S, _, w, x, h, e); break; case "a": _ = p[g++], w = p[g++], x = p[g++], C = p[g++], S = p[g++], b = t, E = n, t += p[g++], n += p[g++], h = s.A, eG(b, E, t, n, C, S, _, w, x, h, e); break; } } (f === "z" || f === "Z") && (h = s.Z, e.addData(h), t = i, n = a), o = h; } return e.toStatic(), e; } var Kq = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.applyTransform = function(t) { }, e; }(Tt); function Jq(r) { return r.setData != null; } function Qq(r, e) { var t = bIe(r), n = oe({}, e); return n.buildPath = function(i) { if (Jq(i)) { i.setData(t.data); var a = i.getContext(); a && i.rebuildPath(a, 1); } else { var a = i; t.rebuildPath(a, 1); } }, n.applyTransform = function(i) { Zq(t, i), this.dirtyShape(); }, n; } function eZ(r, e) { return new Kq(Qq(r, e)); } function TIe(r, e) { var t = Qq(r, e), n = function(i) { W(a, i); function a(o) { var s = i.call(this, o) || this; return s.applyTransform = t.applyTransform, s.buildPath = t.buildPath, s; } return a; }(Kq); return n; } function PIe(r, e) { for (var t = [], n = r.length, i = 0; i < n; i++) { var a = r[i]; t.push(a.getUpdatedPathProxy(!0)); } var o = new Tt(e); return o.createPathProxy(), o.buildPath = function(s) { if (Jq(s)) { s.appendPath(t); var u = s.getContext(); u && s.rebuildPath(u, 1); } }, o; } function JN(r, e) { e = e || {}; var t = new Tt(); return r.shape && t.setShape(r.shape), t.setStyle(r.style), e.bakeTransform ? Zq(t.path, r.getComputedTransform()) : e.toLocal ? t.setLocalTransform(r.getComputedTransform()) : t.copyTransform(r), t.buildPath = r.buildPath, t.applyTransform = t.applyTransform, t.z = r.z, t.z2 = r.z2, t.zlevel = r.zlevel, t; } var IIe = function() { function r() { this.cx = 0, this.cy = 0, this.r = 0; } return r; }(), tZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultShape = function() { return new IIe(); }, e.prototype.buildPath = function(t, n) { t.moveTo(n.cx + n.r, n.cy), t.arc(n.cx, n.cy, n.r, 0, Math.PI * 2); }, e; }(Tt); tZ.prototype.type = "circle"; const rc = tZ; var AIe = function() { function r() { this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0; } return r; }(), rZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultShape = function() { return new AIe(); }, e.prototype.buildPath = function(t, n) { var i = 0.5522848, a = n.cx, o = n.cy, s = n.rx, u = n.ry, l = s * i, c = u * i; t.moveTo(a - s, o), t.bezierCurveTo(a - s, o - c, a - l, o - u, a, o - u), t.bezierCurveTo(a + l, o - u, a + s, o - c, a + s, o), t.bezierCurveTo(a + s, o + c, a + l, o + u, a, o + u), t.bezierCurveTo(a - l, o + u, a - s, o + c, a - s, o), t.closePath(); }, e; }(Tt); rZ.prototype.type = "ellipse"; const QN = rZ; var nZ = Math.PI, QI = nZ * 2, pp = Math.sin, zv = Math.cos, LIe = Math.acos, Ga = Math.atan2, tG = Math.abs, w_ = Math.sqrt, Y0 = Math.max, xl = Math.min, Iu = 1e-4; function DIe(r, e, t, n, i, a, o, s) { var u = t - r, l = n - e, c = o - i, f = s - a, h = f * u - c * l; if (!(h * h < Iu)) return h = (c * (e - a) - f * (r - i)) / h, [r + h * u, e + h * l]; } function Xx(r, e, t, n, i, a, o) { var s = r - t, u = e - n, l = (o ? a : -a) / w_(s * s + u * u), c = l * u, f = -l * s, h = r + c, p = e + f, d = t + c, v = n + f, g = (h + d) / 2, m = (p + v) / 2, y = d - h, _ = v - p, w = y * y + _ * _, x = i - a, C = h * v - d * p, S = (_ < 0 ? -1 : 1) * w_(Y0(0, x * x * w - C * C)), b = (C * _ - y * S) / w, E = (-C * y - _ * S) / w, T = (C * _ + y * S) / w, P = (-C * y + _ * S) / w, I = b - g, A = E - m, L = T - g, D = P - m; return I * I + A * A > L * L + D * D && (b = T, E = P), { cx: b, cy: E, x0: -c, y0: -f, x1: b * (i / x - 1), y1: E * (i / x - 1) }; } function MIe(r) { var e; if (le(r)) { var t = r.length; if (!t) return r; t === 1 ? e = [r[0], r[0], 0, 0] : t === 2 ? e = [r[0], r[0], r[1], r[1]] : t === 3 ? e = r.concat(r[2]) : e = r; } else e = [r, r, r, r]; return e; } function OIe(r, e) { var t, n = Y0(e.r, 0), i = Y0(e.r0 || 0, 0), a = n > 0, o = i > 0; if (!(!a && !o)) { if (a || (n = i, i = 0), i > n) { var s = n; n = i, i = s; } var u = e.startAngle, l = e.endAngle; if (!(isNaN(u) || isNaN(l))) { var c = e.cx, f = e.cy, h = !!e.clockwise, p = tG(l - u), d = p > QI && p % QI; if (d > Iu && (p = d), !(n > Iu)) r.moveTo(c, f); else if (p > QI - Iu) r.moveTo(c + n * zv(u), f + n * pp(u)), r.arc(c, f, n, u, l, !h), i > Iu && (r.moveTo(c + i * zv(l), f + i * pp(l)), r.arc(c, f, i, l, u, h)); else { var v = void 0, g = void 0, m = void 0, y = void 0, _ = void 0, w = void 0, x = void 0, C = void 0, S = void 0, b = void 0, E = void 0, T = void 0, P = void 0, I = void 0, A = void 0, L = void 0, D = n * zv(u), O = n * pp(u), N = i * zv(l), F = i * pp(l), k = p > Iu; if (k) { var G = e.cornerRadius; G && (t = MIe(G), v = t[0], g = t[1], m = t[2], y = t[3]); var U = tG(n - i) / 2; if (_ = xl(U, m), w = xl(U, y), x = xl(U, v), C = xl(U, g), E = S = Y0(_, w), T = b = Y0(x, C), (S > Iu || b > Iu) && (P = n * zv(l), I = n * pp(l), A = i * zv(u), L = i * pp(u), p < nZ)) { var B = DIe(D, O, A, L, P, I, N, F); if (B) { var X = D - B[0], j = O - B[1], ae = P - B[0], se = I - B[1], $ = 1 / pp(LIe((X * ae + j * se) / (w_(X * X + j * j) * w_(ae * ae + se * se))) / 2), V = w_(B[0] * B[0] + B[1] * B[1]); E = xl(S, (n - V) / ($ + 1)), T = xl(b, (i - V) / ($ - 1)); } } } if (!k) r.moveTo(c + D, f + O); else if (E > Iu) { var q = xl(m, E), ee = xl(y, E), Y = Xx(A, L, D, O, n, q, h), K = Xx(P, I, N, F, n, ee, h); r.moveTo(c + Y.cx + Y.x0, f + Y.cy + Y.y0), E < S && q === ee ? r.arc(c + Y.cx, f + Y.cy, E, Ga(Y.y0, Y.x0), Ga(K.y0, K.x0), !h) : (q > 0 && r.arc(c + Y.cx, f + Y.cy, q, Ga(Y.y0, Y.x0), Ga(Y.y1, Y.x1), !h), r.arc(c, f, n, Ga(Y.cy + Y.y1, Y.cx + Y.x1), Ga(K.cy + K.y1, K.cx + K.x1), !h), ee > 0 && r.arc(c + K.cx, f + K.cy, ee, Ga(K.y1, K.x1), Ga(K.y0, K.x0), !h)); } else r.moveTo(c + D, f + O), r.arc(c, f, n, u, l, !h); if (!(i > Iu) || !k) r.lineTo(c + N, f + F); else if (T > Iu) { var q = xl(v, T), ee = xl(g, T), Y = Xx(N, F, P, I, i, -ee, h), K = Xx(D, O, A, L, i, -q, h); r.lineTo(c + Y.cx + Y.x0, f + Y.cy + Y.y0), T < b && q === ee ? r.arc(c + Y.cx, f + Y.cy, T, Ga(Y.y0, Y.x0), Ga(K.y0, K.x0), !h) : (ee > 0 && r.arc(c + Y.cx, f + Y.cy, ee, Ga(Y.y0, Y.x0), Ga(Y.y1, Y.x1), !h), r.arc(c, f, i, Ga(Y.cy + Y.y1, Y.cx + Y.x1), Ga(K.cy + K.y1, K.cx + K.x1), h), q > 0 && r.arc(c + K.cx, f + K.cy, q, Ga(K.y1, K.x1), Ga(K.y0, K.x0), !h)); } else r.lineTo(c + N, f + F), r.arc(c, f, i, l, u, h); } r.closePath(); } } } var RIe = function() { function r() { this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0, this.cornerRadius = 0; } return r; }(), iZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultShape = function() { return new RIe(); }, e.prototype.buildPath = function(t, n) { OIe(t, n); }, e.prototype.isZeroArea = function() { return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0; }, e; }(Tt); iZ.prototype.type = "sector"; const $o = iZ; var NIe = function() { function r() { this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0; } return r; }(), aZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultShape = function() { return new NIe(); }, e.prototype.buildPath = function(t, n) { var i = n.cx, a = n.cy, o = Math.PI * 2; t.moveTo(i + n.r, a), t.arc(i, a, n.r, 0, o, !1), t.moveTo(i + n.r0, a), t.arc(i, a, n.r0, 0, o, !0); }, e; }(Tt); aZ.prototype.type = "ring"; const HT = aZ; function FIe(r, e, t, n) { var i = [], a = [], o = [], s = [], u, l, c, f; if (n) { c = [1 / 0, 1 / 0], f = [-1 / 0, -1 / 0]; for (var h = 0, p = r.length; h < p; h++) Zf(c, c, r[h]), Kf(f, f, r[h]); Zf(c, c, n[0]), Kf(f, f, n[1]); } for (var h = 0, p = r.length; h < p; h++) { var d = r[h]; if (t) u = r[h ? h - 1 : p - 1], l = r[(h + 1) % p]; else if (h === 0 || h === p - 1) { i.push(Nc(r[h])); continue; } else u = r[h - 1], l = r[h + 1]; $p(a, l, u), mI(a, a, e); var v = dM(d, u), g = dM(d, l), m = v + g; m !== 0 && (v /= m, g /= m), mI(o, a, -v), mI(s, a, g); var y = WV([], d, o), _ = WV([], d, s); n && (Kf(y, y, c), Zf(y, y, f), Kf(_, _, c), Zf(_, _, f)), i.push(y), i.push(_); } return t && i.push(i.shift()), i; } function oZ(r, e, t) { var n = e.smooth, i = e.points; if (i && i.length >= 2) { if (n) { var a = FIe(i, n, t, e.smoothConstraint); r.moveTo(i[0][0], i[0][1]); for (var o = i.length, s = 0; s < (t ? o : o - 1); s++) { var u = a[s * 2], l = a[s * 2 + 1], c = i[(s + 1) % o]; r.bezierCurveTo(u[0], u[1], l[0], l[1], c[0], c[1]); } } else { r.moveTo(i[0][0], i[0][1]); for (var s = 1, f = i.length; s < f; s++) r.lineTo(i[s][0], i[s][1]); } t && r.closePath(); } } var BIe = function() { function r() { this.points = null, this.smooth = 0, this.smoothConstraint = null; } return r; }(), sZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultShape = function() { return new BIe(); }, e.prototype.buildPath = function(t, n) { oZ(t, n, !0); }, e; }(Tt); sZ.prototype.type = "polygon"; const Ho = sZ; var kIe = function() { function r() { this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null; } return r; }(), uZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new kIe(); }, e.prototype.buildPath = function(t, n) { oZ(t, n, !1); }, e; }(Tt); uZ.prototype.type = "polyline"; const jo = uZ; var VIe = {}, GIe = function() { function r() { this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1; } return r; }(), lZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new GIe(); }, e.prototype.buildPath = function(t, n) { var i, a, o, s; if (this.subPixelOptimize) { var u = Nq(VIe, n, this.style); i = u.x1, a = u.y1, o = u.x2, s = u.y2; } else i = n.x1, a = n.y1, o = n.x2, s = n.y2; var l = n.percent; l !== 0 && (t.moveTo(i, a), l < 1 && (o = i * (1 - l) + o * l, s = a * (1 - l) + s * l), t.lineTo(o, s)); }, e.prototype.pointAt = function(t) { var n = this.shape; return [ n.x1 * (1 - t) + n.x2 * t, n.y1 * (1 - t) + n.y2 * t ]; }, e; }(Tt); lZ.prototype.type = "line"; const fa = lZ; var Eo = [], zIe = function() { function r() { this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1; } return r; }(); function rG(r, e, t) { var n = r.cpx2, i = r.cpy2; return n != null || i != null ? [ (t ? r6 : $i)(r.x1, r.cpx1, r.cpx2, r.x2, e), (t ? r6 : $i)(r.y1, r.cpy1, r.cpy2, r.y2, e) ] : [ (t ? wM : ia)(r.x1, r.cpx1, r.x2, e), (t ? wM : ia)(r.y1, r.cpy1, r.y2, e) ]; } var cZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new zIe(); }, e.prototype.buildPath = function(t, n) { var i = n.x1, a = n.y1, o = n.x2, s = n.y2, u = n.cpx1, l = n.cpy1, c = n.cpx2, f = n.cpy2, h = n.percent; h !== 0 && (t.moveTo(i, a), c == null || f == null ? (h < 1 && (h1(i, u, o, h, Eo), u = Eo[1], o = Eo[2], h1(a, l, s, h, Eo), l = Eo[1], s = Eo[2]), t.quadraticCurveTo(u, l, o, s)) : (h < 1 && (Mh(i, u, c, o, h, Eo), u = Eo[1], c = Eo[2], o = Eo[3], Mh(a, l, f, s, h, Eo), l = Eo[1], f = Eo[2], s = Eo[3]), t.bezierCurveTo(u, l, c, f, o, s))); }, e.prototype.pointAt = function(t) { return rG(this.shape, t, !1); }, e.prototype.tangentAt = function(t) { var n = rG(this.shape, t, !0); return Lw(n, n); }, e; }(Tt); cZ.prototype.type = "bezier-curve"; const UT = cZ; var $Ie = function() { function r() { this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0; } return r; }(), fZ = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new $Ie(); }, e.prototype.buildPath = function(t, n) { var i = n.cx, a = n.cy, o = Math.max(n.r, 0), s = n.startAngle, u = n.endAngle, l = n.clockwise, c = Math.cos(s), f = Math.sin(s); t.moveTo(c * o + i, f * o + a), t.arc(i, a, o, s, u, !l); }, e; }(Tt); fZ.prototype.type = "arc"; const eF = fZ; var HIe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "compound", t; } return e.prototype._updatePathDirty = function() { for (var t = this.shape.paths, n = this.shapeChanged(), i = 0; i < t.length; i++) n = n || t[i].shapeChanged(); n && this.dirtyShape(); }, e.prototype.beforeBrush = function() { this._updatePathDirty(); for (var t = this.shape.paths || [], n = this.getGlobalScale(), i = 0; i < t.length; i++) t[i].path || t[i].createPathProxy(), t[i].path.setScale(n[0], n[1], t[i].segmentIgnoreThreshold); }, e.prototype.buildPath = function(t, n) { for (var i = n.paths || [], a = 0; a < i.length; a++) i[a].buildPath(t, i[a].shape, !0); }, e.prototype.afterBrush = function() { for (var t = this.shape.paths || [], n = 0; n < t.length; n++) t[n].pathUpdated(); }, e.prototype.getBoundingRect = function() { return this._updatePathDirty.call(this), Tt.prototype.getBoundingRect.call(this); }, e; }(Tt); const tF = HIe; var UIe = function() { function r(e) { this.colorStops = e || []; } return r.prototype.addColorStop = function(e, t) { this.colorStops.push({ offset: e, color: t }); }, r; }(); const hZ = UIe; var WIe = function(r) { W(e, r); function e(t, n, i, a, o, s) { var u = r.call(this, o) || this; return u.x = t == null ? 0 : t, u.y = n == null ? 0 : n, u.x2 = i == null ? 1 : i, u.y2 = a == null ? 0 : a, u.type = "linear", u.global = s || !1, u; } return e; }(hZ); const xy = WIe; var jIe = function(r) { W(e, r); function e(t, n, i, a, o) { var s = r.call(this, a) || this; return s.x = t == null ? 0.5 : t, s.y = n == null ? 0.5 : n, s.r = i == null ? 0.5 : i, s.type = "radial", s.global = o || !1, s; } return e; }(hZ); const pZ = jIe; var dp = [0, 0], vp = [0, 0], qx = new ft(), Zx = new ft(), YIe = function() { function r(e, t) { this._corners = [], this._axes = [], this._origin = [0, 0]; for (var n = 0; n < 4; n++) this._corners[n] = new ft(); for (var n = 0; n < 2; n++) this._axes[n] = new ft(); e && this.fromBoundingRect(e, t); } return r.prototype.fromBoundingRect = function(e, t) { var n = this._corners, i = this._axes, a = e.x, o = e.y, s = a + e.width, u = o + e.height; if (n[0].set(a, o), n[1].set(s, o), n[2].set(s, u), n[3].set(a, u), t) for (var l = 0; l < 4; l++) n[l].transform(t); ft.sub(i[0], n[1], n[0]), ft.sub(i[1], n[3], n[0]), i[0].normalize(), i[1].normalize(); for (var l = 0; l < 2; l++) this._origin[l] = i[l].dot(n[0]); }, r.prototype.intersect = function(e, t) { var n = !0, i = !t; return qx.set(1 / 0, 1 / 0), Zx.set(0, 0), !this._intersectCheckOneSide(this, e, qx, Zx, i, 1) && (n = !1, i) || !this._intersectCheckOneSide(e, this, qx, Zx, i, -1) && (n = !1, i) || i || ft.copy(t, n ? qx : Zx), n; }, r.prototype._intersectCheckOneSide = function(e, t, n, i, a, o) { for (var s = !0, u = 0; u < 2; u++) { var l = this._axes[u]; if (this._getProjMinMaxOnAxis(u, e._corners, dp), this._getProjMinMaxOnAxis(u, t._corners, vp), dp[1] < vp[0] || dp[0] > vp[1]) { if (s = !1, a) return s; var c = Math.abs(vp[0] - dp[1]), f = Math.abs(dp[0] - vp[1]); Math.min(c, f) > i.len() && (c < f ? ft.scale(i, l, -c * o) : ft.scale(i, l, f * o)); } else if (n) { var c = Math.abs(vp[0] - dp[1]), f = Math.abs(dp[0] - vp[1]); Math.min(c, f) < n.len() && (c < f ? ft.scale(n, l, c * o) : ft.scale(n, l, -f * o)); } } return s; }, r.prototype._getProjMinMaxOnAxis = function(e, t, n) { for (var i = this._axes[e], a = this._origin, o = t[0].dot(i) + a[e], s = o, u = o, l = 1; l < t.length; l++) { var c = t[l].dot(i) + a[e]; s = Math.min(c, s), u = Math.max(c, u); } n[0] = s, n[1] = u; }, r; }(); const vE = YIe; var XIe = [], qIe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.notClear = !0, t.incremental = !0, t._displayables = [], t._temporaryDisplayables = [], t._cursor = 0, t; } return e.prototype.traverse = function(t, n) { t.call(n, this); }, e.prototype.useStyle = function() { this.style = {}; }, e.prototype.getCursor = function() { return this._cursor; }, e.prototype.innerAfterBrush = function() { this._cursor = this._displayables.length; }, e.prototype.clearDisplaybles = function() { this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1; }, e.prototype.clearTemporalDisplayables = function() { this._temporaryDisplayables = []; }, e.prototype.addDisplayable = function(t, n) { n ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.markRedraw(); }, e.prototype.addDisplayables = function(t, n) { n = n || !1; for (var i = 0; i < t.length; i++) this.addDisplayable(t[i], n); }, e.prototype.getDisplayables = function() { return this._displayables; }, e.prototype.getTemporalDisplayables = function() { return this._temporaryDisplayables; }, e.prototype.eachPendingDisplayable = function(t) { for (var n = this._cursor; n < this._displayables.length; n++) t && t(this._displayables[n]); for (var n = 0; n < this._temporaryDisplayables.length; n++) t && t(this._temporaryDisplayables[n]); }, e.prototype.update = function() { this.updateTransform(); for (var t = this._cursor; t < this._displayables.length; t++) { var n = this._displayables[t]; n.parent = this, n.update(), n.parent = null; } for (var t = 0; t < this._temporaryDisplayables.length; t++) { var n = this._temporaryDisplayables[t]; n.parent = this, n.update(), n.parent = null; } }, e.prototype.getBoundingRect = function() { if (!this._rect) { for (var t = new gt(1 / 0, 1 / 0, -1 / 0, -1 / 0), n = 0; n < this._displayables.length; n++) { var i = this._displayables[n], a = i.getBoundingRect().clone(); i.needLocalTransform() && a.applyTransform(i.getLocalTransform(XIe)), t.union(a); } this._rect = t; } return this._rect; }, e.prototype.contain = function(t, n) { var i = this.transformCoordToLocal(t, n), a = this.getBoundingRect(); if (a.contain(i[0], i[1])) for (var o = 0; o < this._displayables.length; o++) { var s = this._displayables[o]; if (s.contain(t, n)) return !0; } return !1; }, e; }(vu); const ZIe = qIe; var dZ = Ut(); function Cy(r, e, t, n, i) { var a; if (e && e.ecModel) { var o = e.ecModel.getUpdatePayload(); a = o && o.animation; } var s = e && e.isAnimationEnabled(), u = r === "update"; if (s) { var l = void 0, c = void 0, f = void 0; n ? (l = wt(n.duration, 200), c = wt(n.easing, "cubicOut"), f = 0) : (l = e.getShallow(u ? "animationDurationUpdate" : "animationDuration"), c = e.getShallow(u ? "animationEasingUpdate" : "animationEasing"), f = e.getShallow(u ? "animationDelayUpdate" : "animationDelay")), a && (a.duration != null && (l = a.duration), a.easing != null && (c = a.easing), a.delay != null && (f = a.delay)), ze(f) && (f = f(t, i)), ze(l) && (l = l(t)); var h = { duration: l || 0, delay: f, easing: c }; return h; } else return null; } function rF(r, e, t, n, i, a, o) { var s = !1, u; ze(i) ? (o = a, a = i, i = null) : Xe(i) && (a = i.cb, o = i.during, s = i.isFrom, u = i.removeOpt, i = i.dataIndex); var l = r === "leave"; l || e.stopAnimation("leave"); var c = Cy(r, n, i, l ? u || {} : null, n && n.getAnimationDelayParams ? n.getAnimationDelayParams(e, i) : null); if (c && c.duration > 0) { var f = c.duration, h = c.delay, p = c.easing, d = { duration: f, delay: h || 0, easing: p, done: a, force: !!a || !!o, setToFinal: !l, scope: r, during: o }; s ? e.animateFrom(t, d) : e.animateTo(t, d); } else e.stopAnimation(), !s && e.attr(t), o && o(1), a && a(); } function Ht(r, e, t, n, i, a) { rF("update", r, e, t, n, i, a); } function Cn(r, e, t, n, i, a) { rF("enter", r, e, t, n, i, a); } function Xg(r) { if (!r.__zr) return !0; for (var e = 0; e < r.animators.length; e++) { var t = r.animators[e]; if (t.scope === "leave") return !0; } return !1; } function Rh(r, e, t, n, i, a) { Xg(r) || rF("leave", r, e, t, n, i, a); } function nG(r, e, t, n) { r.removeTextContent(), r.removeTextGuideLine(), Rh(r, { style: { opacity: 0 } }, e, t, n); } function g1(r, e, t) { function n() { r.parent && r.parent.remove(r); } r.isGroup ? r.traverse(function(i) { i.isGroup || nG(i, e, t, n); }) : nG(r, e, t, n); } function nl(r) { dZ(r).oldStyle = r.style; } function KIe(r) { return dZ(r).oldStyle; } var gE = Math.max, mE = Math.min, UM = {}; function JIe(r) { return Tt.extend(r); } var QIe = TIe; function eAe(r, e) { return QIe(r, e); } function hl(r, e) { UM[r] = e; } function nF(r) { if (UM.hasOwnProperty(r)) return UM[r]; } function WT(r, e, t, n) { var i = eZ(r, e); return t && (n === "center" && (t = gZ(t, i.getBoundingRect())), mZ(i, t)), i; } function vZ(r, e, t) { var n = new Ba({ style: { image: r, x: e.x, y: e.y, width: e.width, height: e.height }, onload: function(i) { if (t === "center") { var a = { width: i.width, height: i.height }; n.setStyle(gZ(e, a)); } } }); return n; } function gZ(r, e) { var t = e.width / e.height, n = r.height * t, i; n <= r.width ? i = r.height : (n = r.width, i = n / t); var a = r.x + r.width / 2, o = r.y + r.height / 2; return { x: a - n / 2, y: o - i / 2, width: n, height: i }; } var qs = PIe; function mZ(r, e) { if (!!r.applyTransform) { var t = r.getBoundingRect(), n = t.calculateTransform(e); r.applyTransform(n); } } function tAe(r) { return Nq(r.shape, r.shape, r.style), r; } function rAe(r) { return Fq(r.shape, r.shape, r.style), r; } var fS = Hp; function nd(r, e) { for (var t = OT([]); r && r !== e; ) Bc(t, r.getLocalTransform(), t), r = r.parent; return t; } function Uu(r, e, t) { return e && !eo(e) && (e = Ic.getLocalTransform(e)), t && (e = yy([], e)), Ia([], r, e); } function jT(r, e, t) { var n = e[4] === 0 || e[5] === 0 || e[0] === 0 ? 1 : Math.abs(2 * e[4] / e[0]), i = e[4] === 0 || e[5] === 0 || e[2] === 0 ? 1 : Math.abs(2 * e[4] / e[2]), a = [r === "left" ? -n : r === "right" ? n : 0, r === "top" ? -i : r === "bottom" ? i : 0]; return a = Uu(a, e, t), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top"; } function iG(r) { return !r.isGroup; } function nAe(r) { return r.shape != null; } function Nw(r, e, t) { if (!r || !e) return; function n(o) { var s = {}; return o.traverse(function(u) { iG(u) && u.anid && (s[u.anid] = u); }), s; } function i(o) { var s = { x: o.x, y: o.y, rotation: o.rotation }; return nAe(o) && (s.shape = oe({}, o.shape)), s; } var a = n(r); e.traverse(function(o) { if (iG(o) && o.anid) { var s = a[o.anid]; if (s) { var u = i(o); o.attr(i(s)), Ht(o, u, t, nt(o).dataIndex); } } }); } function yZ(r, e) { return ce(r, function(t) { var n = t[0]; n = gE(n, e.x), n = mE(n, e.x + e.width); var i = t[1]; return i = gE(i, e.y), i = mE(i, e.y + e.height), [n, i]; }); } function iAe(r, e) { var t = gE(r.x, e.x), n = mE(r.x + r.width, e.x + e.width), i = gE(r.y, e.y), a = mE(r.y + r.height, e.y + e.height); if (n >= t && a >= i) return { x: t, y: i, width: n - t, height: a - i }; } function Fw(r, e, t) { var n = oe({ rectHover: !0 }, e), i = n.style = { strokeNoScale: !0 }; if (t = t || { x: -1, y: -1, width: 2, height: 2 }, r) return r.indexOf("image://") === 0 ? (i.image = r.slice(8), qe(i, t), new Ba(n)) : WT(r.replace("path://", ""), n, t, "center"); } function X0(r, e, t, n, i) { for (var a = 0, o = i[i.length - 1]; a < i.length; a++) { var s = i[a]; if (_Z(r, e, t, n, s[0], s[1], o[0], o[1])) return !0; o = s; } } function _Z(r, e, t, n, i, a, o, s) { var u = t - r, l = n - e, c = o - i, f = s - a, h = eA(c, f, u, l); if (aAe(h)) return !1; var p = r - i, d = e - a, v = eA(p, d, u, l) / h; if (v < 0 || v > 1) return !1; var g = eA(p, d, c, f) / h; return !(g < 0 || g > 1); } function eA(r, e, t, n) { return r * n - t * e; } function aAe(r) { return r <= 1e-6 && r >= -1e-6; } function Sy(r) { var e = r.itemTooltipOption, t = r.componentModel, n = r.itemName, i = Se(e) ? { formatter: e } : e, a = t.mainType, o = t.componentIndex, s = { componentType: a, name: n, $vars: ["name"] }; s[a + "Index"] = o; var u = r.formatterParamsExtra; u && M(At(u), function(c) { Te(s, c) || (s[c] = u[c], s.$vars.push(c)); }); var l = nt(r.el); l.componentMainType = a, l.componentIndex = o, l.tooltipConfig = { name: n, option: qe({ content: n, formatterParams: s }, i) }; } function aG(r, e) { var t; r.isGroup && (t = e(r)), t || r.traverse(e); } function Xh(r, e) { if (r) if (le(r)) for (var t = 0; t < r.length; t++) aG(r[t], e); else aG(r, e); } hl("circle", rc); hl("ellipse", QN); hl("sector", $o); hl("ring", HT); hl("polygon", Ho); hl("polyline", jo); hl("rect", Vt); hl("line", fa); hl("bezierCurve", UT); hl("arc", eF); const Bw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, updateProps: Ht, initProps: Cn, removeElement: Rh, removeElementWithFadeOut: g1, isElementRemoved: Xg, extendShape: JIe, extendPath: eAe, registerShape: hl, getShapeClass: nF, makePath: WT, makeImage: vZ, mergePath: qs, resizePath: mZ, subPixelOptimizeLine: tAe, subPixelOptimizeRect: rAe, subPixelOptimize: fS, getTransform: nd, applyTransform: Uu, transformDirection: jT, groupTransition: Nw, clipPointsByRect: yZ, clipRectByRect: iAe, createIcon: Fw, linePolygonIntersect: X0, lineLineIntersect: _Z, setTooltipConfig: Sy, traverseElements: Xh, Group: rt, Image: Ba, Text: Yt, Circle: rc, Ellipse: QN, Sector: $o, Ring: HT, Polygon: Ho, Polyline: jo, Rect: Vt, Line: fa, BezierCurve: UT, Arc: eF, IncrementalDisplayable: ZIe, CompoundPath: tF, LinearGradient: xy, RadialGradient: pZ, BoundingRect: gt, OrientedBoundingRect: vE, Point: ft, Path: Tt }, Symbol.toStringTag, { value: "Module" })); var YT = {}; function wZ(r, e) { for (var t = 0; t < Co.length; t++) { var n = Co[t], i = e[n], a = r.ensureState(n); a.style = a.style || {}, a.style.text = i; } var o = r.currentStates.slice(); r.clearStates(!0), r.setStyle({ text: e.normal }), r.useStates(o, !0); } function WM(r, e, t) { var n = r.labelFetcher, i = r.labelDataIndex, a = r.labelDimIndex, o = e.normal, s; n && (s = n.getFormattedLabel(i, "normal", null, a, o && o.get("formatter"), t != null ? { interpolatedValue: t } : null)), s == null && (s = ze(r.defaultText) ? r.defaultText(i, r, t) : r.defaultText); for (var u = { normal: s }, l = 0; l < Co.length; l++) { var c = Co[l], f = e[c]; u[c] = wt(n ? n.getFormattedLabel(i, c, null, a, f && f.get("formatter")) : null, s); } return u; } function no(r, e, t, n) { t = t || YT; for (var i = r instanceof Yt, a = !1, o = 0; o < v1.length; o++) { var s = e[v1[o]]; if (s && s.getShallow("show")) { a = !0; break; } } var u = i ? r : r.getTextContent(); if (a) { i || (u || (u = new Yt(), r.setTextContent(u)), r.stateProxy && (u.stateProxy = r.stateProxy)); var l = WM(t, e), c = e.normal, f = !!c.getShallow("show"), h = Sn(c, n && n.normal, t, !1, !i); h.text = l.normal, i || r.setTextConfig(yE(c, t, !1)); for (var o = 0; o < Co.length; o++) { var p = Co[o], s = e[p]; if (s) { var d = u.ensureState(p), v = !!wt(s.getShallow("show"), f); if (v !== f && (d.ignore = !v), d.style = Sn(s, n && n[p], t, !0, !i), d.style.text = l[p], !i) { var g = r.ensureState(p); g.textConfig = yE(s, t, !0); } } } u.silent = !!c.getShallow("silent"), u.style.x != null && (h.x = u.style.x), u.style.y != null && (h.y = u.style.y), u.ignore = !f, u.useStyle(h), u.dirty(), t.enableTextSetter && (Ey(u).setLabelText = function(m) { var y = WM(t, e, m); wZ(u, y); }); } else u && (u.ignore = !0); r.dirty(); } function wa(r, e) { e = e || "label"; for (var t = { normal: r.getModel(e) }, n = 0; n < Co.length; n++) { var i = Co[n]; t[i] = r.getModel([i, e]); } return t; } function Sn(r, e, t, n, i) { var a = {}; return oAe(a, r, t, n, i), e && oe(a, e), a; } function yE(r, e, t) { e = e || {}; var n = {}, i, a = r.getShallow("rotate"), o = wt(r.getShallow("distance"), t ? null : 5), s = r.getShallow("offset"); return i = r.getShallow("position") || (t ? null : "inside"), i === "outside" && (i = e.defaultOutsidePosition || "top"), i != null && (n.position = i), s != null && (n.offset = s), a != null && (a *= Math.PI / 180, n.rotation = a), o != null && (n.distance = o), n.outsideFill = r.get("color") === "inherit" ? e.inheritColor || null : "auto", n; } function oAe(r, e, t, n, i) { t = t || YT; var a = e.ecModel, o = a && a.option.textStyle, s = sAe(e), u; if (s) { u = {}; for (var l in s) if (s.hasOwnProperty(l)) { var c = e.getModel(["rich", l]); lG(u[l] = {}, c, o, t, n, i, !1, !0); } } u && (r.rich = u); var f = e.get("overflow"); f && (r.overflow = f); var h = e.get("minMargin"); h != null && (r.margin = h), lG(r, e, o, t, n, i, !0, !1); } function sAe(r) { for (var e; r && r !== r.ecModel; ) { var t = (r.option || YT).rich; if (t) { e = e || {}; for (var n = At(t), i = 0; i < n.length; i++) { var a = n[i]; e[a] = 1; } } r = r.parentModel; } return e; } var oG = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], sG = ["align", "lineHeight", "width", "height", "tag", "verticalAlign"], uG = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]; function lG(r, e, t, n, i, a, o, s) { t = !i && t || YT; var u = n && n.inheritColor, l = e.getShallow("color"), c = e.getShallow("textBorderColor"), f = wt(e.getShallow("opacity"), t.opacity); (l === "inherit" || l === "auto") && (process.env.NODE_ENV !== "production" && l === "auto" && ii("color: 'auto'", "color: 'inherit'"), u ? l = u : l = null), (c === "inherit" || c === "auto") && (process.env.NODE_ENV !== "production" && c === "auto" && ii("color: 'auto'", "color: 'inherit'"), u ? c = u : c = null), a || (l = l || t.color, c = c || t.textBorderColor), l != null && (r.fill = l), c != null && (r.stroke = c); var h = wt(e.getShallow("textBorderWidth"), t.textBorderWidth); h != null && (r.lineWidth = h); var p = wt(e.getShallow("textBorderType"), t.textBorderType); p != null && (r.lineDash = p); var d = wt(e.getShallow("textBorderDashOffset"), t.textBorderDashOffset); d != null && (r.lineDashOffset = d), !i && f == null && !s && (f = n && n.defaultOpacity), f != null && (r.opacity = f), !i && !a && r.fill == null && n.inheritColor && (r.fill = n.inheritColor); for (var v = 0; v < oG.length; v++) { var g = oG[v], m = wt(e.getShallow(g), t[g]); m != null && (r[g] = m); } for (var v = 0; v < sG.length; v++) { var g = sG[v], m = e.getShallow(g); m != null && (r[g] = m); } if (r.verticalAlign == null) { var y = e.getShallow("baseline"); y != null && (r.verticalAlign = y); } if (!o || !n.disableBox) { for (var v = 0; v < uG.length; v++) { var g = uG[v], m = e.getShallow(g); m != null && (r[g] = m); } var _ = e.getShallow("borderType"); _ != null && (r.borderDash = _), (r.backgroundColor === "auto" || r.backgroundColor === "inherit") && u && (process.env.NODE_ENV !== "production" && r.backgroundColor === "auto" && ii("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), r.backgroundColor = u), (r.borderColor === "auto" || r.borderColor === "inherit") && u && (process.env.NODE_ENV !== "production" && r.borderColor === "auto" && ii("borderColor: 'auto'", "borderColor: 'inherit'"), r.borderColor = u); } } function xZ(r, e) { var t = e && e.getModel("textStyle"); return Bu([ r.fontStyle || t && t.getShallow("fontStyle") || "", r.fontWeight || t && t.getShallow("fontWeight") || "", (r.fontSize || t && t.getShallow("fontSize") || 12) + "px", r.fontFamily || t && t.getShallow("fontFamily") || "sans-serif" ].join(" ")); } var Ey = Ut(); function CZ(r, e, t, n) { if (!!r) { var i = Ey(r); i.prevValue = i.value, i.value = t; var a = e.normal; i.valueAnimation = a.get("valueAnimation"), i.valueAnimation && (i.precision = a.get("precision"), i.defaultInterpolatedText = n, i.statesModels = e); } } function SZ(r, e, t, n, i) { var a = Ey(r); if (!a.valueAnimation || a.prevValue === a.value) return; var o = a.defaultInterpolatedText, s = wt(a.interpolatedValue, a.prevValue), u = a.value; function l(c) { var f = Eq(t, a.precision, s, u, c); a.interpolatedValue = c === 1 ? null : f; var h = WM({ labelDataIndex: e, labelFetcher: i, defaultText: o ? o(f) : f + "" }, a.statesModels, f); wZ(r, h); } r.percent = 0, (a.prevValue == null ? Cn : Ht)(r, { percent: 1 }, n, e, null, l); } var uAe = ["textStyle", "color"], tA = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], rA = new Yt(), lAe = function() { function r() { } return r.prototype.getTextColor = function(e) { var t = this.ecModel; return this.getShallow("color") || (!e && t ? t.get(uAe) : null); }, r.prototype.getFont = function() { return xZ({ fontStyle: this.getShallow("fontStyle"), fontWeight: this.getShallow("fontWeight"), fontSize: this.getShallow("fontSize"), fontFamily: this.getShallow("fontFamily") }, this.ecModel); }, r.prototype.getTextRect = function(e) { for (var t = { text: e, verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline") }, n = 0; n < tA.length; n++) t[tA[n]] = this.getShallow(tA[n]); return rA.useStyle(t), rA.update(), rA.getBoundingRect(); }, r; }(); const cAe = lAe; var EZ = [ ["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["lineDash", "type"], ["lineDashOffset", "dashOffset"], ["lineCap", "cap"], ["lineJoin", "join"], ["miterLimit"] ], fAe = zd(EZ), hAe = function() { function r() { } return r.prototype.getLineStyle = function(e) { return fAe(this, e); }, r; }(), bZ = [ ["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["lineDash", "borderType"], ["lineDashOffset", "borderDashOffset"], ["lineCap", "borderCap"], ["lineJoin", "borderJoin"], ["miterLimit", "borderMiterLimit"] ], pAe = zd(bZ), dAe = function() { function r() { } return r.prototype.getItemStyle = function(e, t) { return pAe(this, e, t); }, r; }(), vv = function() { function r(e, t, n) { this.parentModel = t, this.ecModel = n, this.option = e; } return r.prototype.init = function(e, t, n) { }, r.prototype.mergeOption = function(e, t) { dt(this.option, e, !0); }, r.prototype.get = function(e, t) { return e == null ? this.option : this._doGet(this.parsePath(e), !t && this.parentModel); }, r.prototype.getShallow = function(e, t) { var n = this.option, i = n == null ? n : n[e]; if (i == null && !t) { var a = this.parentModel; a && (i = a.getShallow(e)); } return i; }, r.prototype.getModel = function(e, t) { var n = e != null, i = n ? this.parsePath(e) : null, a = n ? this._doGet(i) : this.option; return t = t || this.parentModel && this.parentModel.getModel(this.resolveParentPath(i)), new r(a, t, this.ecModel); }, r.prototype.isEmpty = function() { return this.option == null; }, r.prototype.restoreData = function() { }, r.prototype.clone = function() { var e = this.constructor; return new e(Qe(this.option)); }, r.prototype.parsePath = function(e) { return typeof e == "string" ? e.split(".") : e; }, r.prototype.resolveParentPath = function(e) { return e; }, r.prototype.isAnimationEnabled = function() { if (!wr.node && this.option) { if (this.option.animation != null) return !!this.option.animation; if (this.parentModel) return this.parentModel.isAnimationEnabled(); } }, r.prototype._doGet = function(e, t) { var n = this.option; if (!e) return n; for (var i = 0; i < e.length && !(!!e[i] && (n = n && typeof n == "object" ? n[e[i]] : null, n == null)); i++) ; return n == null && t && (n = t._doGet(this.resolveParentPath(e), t.parentModel)), n; }, r; }(); WN(vv); pPe(vv); gi(vv, hAe); gi(vv, dAe); gi(vv, yPe); gi(vv, cAe); const rn = vv; var vAe = Math.round(Math.random() * 10); function by(r) { return [r || "", vAe++].join("_"); } function gAe(r) { var e = {}; r.registerSubTypeDefaulter = function(t, n) { var i = Nl(t); e[i.main] = n; }, r.determineSubType = function(t, n) { var i = n.type; if (!i) { var a = Nl(t).main; r.hasSubTypes(t) && e[a] && (i = e[a](n)); } return i; }; } function mAe(r, e) { r.topologicalTravel = function(a, o, s, u) { if (!a.length) return; var l = t(o), c = l.graph, f = l.noEntryList, h = {}; for (M(a, function(y) { h[y] = !0; }); f.length; ) { var p = f.pop(), d = c[p], v = !!h[p]; v && (s.call(u, p, d.originalDeps.slice()), delete h[p]), M(d.successor, v ? m : g); } M(h, function() { var y = ""; throw process.env.NODE_ENV !== "production" && (y = xo("Circular dependency may exists: ", h, a, o)), new Error(y); }); function g(y) { c[y].entryCount--, c[y].entryCount === 0 && f.push(y); } function m(y) { h[y] = !0, g(y); } }; function t(a) { var o = {}, s = []; return M(a, function(u) { var l = n(o, u), c = l.originalDeps = e(u), f = i(c, a); l.entryCount = f.length, l.entryCount === 0 && s.push(u), M(f, function(h) { _t(l.predecessor, h) < 0 && l.predecessor.push(h); var p = n(o, h); _t(p.successor, h) < 0 && p.successor.push(u); }); }), { graph: o, noEntryList: s }; } function n(a, o) { return a[o] || (a[o] = { predecessor: [], successor: [] }), a[o]; } function i(a, o) { var s = []; return M(a, function(u) { _t(o, u) >= 0 && s.push(u); }), s; } } function qh(r, e) { return dt(dt({}, r, !0), e, !0); } const yAe = { time: { month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] }, legend: { selector: { all: "All", inverse: "Inv" } }, toolbox: { brush: { title: { rect: "Box Select", polygon: "Lasso Select", lineX: "Horizontally Select", lineY: "Vertically Select", keep: "Keep Selections", clear: "Clear Selections" } }, dataView: { title: "Data View", lang: ["Data View", "Close", "Refresh"] }, dataZoom: { title: { zoom: "Zoom", back: "Zoom Reset" } }, magicType: { title: { line: "Switch to Line Chart", bar: "Switch to Bar Chart", stack: "Stack", tiled: "Tile" } }, restore: { title: "Restore" }, saveAsImage: { title: "Save as Image", lang: ["Right Click to Save Image"] } }, series: { typeNames: { pie: "Pie chart", bar: "Bar chart", line: "Line chart", scatter: "Scatter plot", effectScatter: "Ripple scatter plot", radar: "Radar chart", tree: "Tree", treemap: "Treemap", boxplot: "Boxplot", candlestick: "Candlestick", k: "K line chart", heatmap: "Heat map", map: "Map", parallel: "Parallel coordinate map", lines: "Line graph", graph: "Relationship graph", sankey: "Sankey diagram", funnel: "Funnel chart", gauge: "Gauge", pictorialBar: "Pictorial bar", themeRiver: "Theme River Map", sunburst: "Sunburst" } }, aria: { general: { withTitle: 'This is a chart about "{title}"', withoutTitle: "This is a chart" }, series: { single: { prefix: "", withName: " with type {seriesType} named {seriesName}.", withoutName: " with type {seriesType}." }, multiple: { prefix: ". It consists of {seriesCount} series count.", withName: " The {seriesId} series is a {seriesType} representing {seriesName}.", withoutName: " The {seriesId} series is a {seriesType}.", separator: { middle: "", end: "" } } }, data: { allData: "The data is as follows: ", partialData: "The first {displayCnt} items are: ", withName: "the data for {name} is {value}", withoutName: "{value}", separator: { middle: ", ", end: ". " } } } }, _Ae = { time: { month: ["\u4E00\u6708", "\u4E8C\u6708", "\u4E09\u6708", "\u56DB\u6708", "\u4E94\u6708", "\u516D\u6708", "\u4E03\u6708", "\u516B\u6708", "\u4E5D\u6708", "\u5341\u6708", "\u5341\u4E00\u6708", "\u5341\u4E8C\u6708"], monthAbbr: ["1\u6708", "2\u6708", "3\u6708", "4\u6708", "5\u6708", "6\u6708", "7\u6708", "8\u6708", "9\u6708", "10\u6708", "11\u6708", "12\u6708"], dayOfWeek: ["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"], dayOfWeekAbbr: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"] }, legend: { selector: { all: "\u5168\u9009", inverse: "\u53CD\u9009" } }, toolbox: { brush: { title: { rect: "\u77E9\u5F62\u9009\u62E9", polygon: "\u5708\u9009", lineX: "\u6A2A\u5411\u9009\u62E9", lineY: "\u7EB5\u5411\u9009\u62E9", keep: "\u4FDD\u6301\u9009\u62E9", clear: "\u6E05\u9664\u9009\u62E9" } }, dataView: { title: "\u6570\u636E\u89C6\u56FE", lang: ["\u6570\u636E\u89C6\u56FE", "\u5173\u95ED", "\u5237\u65B0"] }, dataZoom: { title: { zoom: "\u533A\u57DF\u7F29\u653E", back: "\u533A\u57DF\u7F29\u653E\u8FD8\u539F" } }, magicType: { title: { line: "\u5207\u6362\u4E3A\u6298\u7EBF\u56FE", bar: "\u5207\u6362\u4E3A\u67F1\u72B6\u56FE", stack: "\u5207\u6362\u4E3A\u5806\u53E0", tiled: "\u5207\u6362\u4E3A\u5E73\u94FA" } }, restore: { title: "\u8FD8\u539F" }, saveAsImage: { title: "\u4FDD\u5B58\u4E3A\u56FE\u7247", lang: ["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"] } }, series: { typeNames: { pie: "\u997C\u56FE", bar: "\u67F1\u72B6\u56FE", line: "\u6298\u7EBF\u56FE", scatter: "\u6563\u70B9\u56FE", effectScatter: "\u6D9F\u6F2A\u6563\u70B9\u56FE", radar: "\u96F7\u8FBE\u56FE", tree: "\u6811\u56FE", treemap: "\u77E9\u5F62\u6811\u56FE", boxplot: "\u7BB1\u578B\u56FE", candlestick: "K\u7EBF\u56FE", k: "K\u7EBF\u56FE", heatmap: "\u70ED\u529B\u56FE", map: "\u5730\u56FE", parallel: "\u5E73\u884C\u5750\u6807\u56FE", lines: "\u7EBF\u56FE", graph: "\u5173\u7CFB\u56FE", sankey: "\u6851\u57FA\u56FE", funnel: "\u6F0F\u6597\u56FE", gauge: "\u4EEA\u8868\u76D8\u56FE", pictorialBar: "\u8C61\u5F62\u67F1\u56FE", themeRiver: "\u4E3B\u9898\u6CB3\u6D41\u56FE", sunburst: "\u65ED\u65E5\u56FE" } }, aria: { general: { withTitle: "\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002", withoutTitle: "\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C" }, series: { single: { prefix: "", withName: "\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002", withoutName: "\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002" }, multiple: { prefix: "\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002", withName: "\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C", withoutName: "\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C", separator: { middle: "\uFF1B", end: "\u3002" } } }, data: { allData: "\u5176\u6570\u636E\u662F\u2014\u2014", partialData: "\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014", withName: "{name}\u7684\u6570\u636E\u662F{value}", withoutName: "{value}", separator: { middle: "\uFF0C", end: "" } } } }; var _E = "ZH", iF = "EN", m1 = iF, hS = {}, aF = {}, TZ = wr.domSupported ? function() { var r = (document.documentElement.lang || navigator.language || navigator.browserLanguage).toUpperCase(); return r.indexOf(_E) > -1 ? _E : m1; }() : m1; function PZ(r, e) { r = r.toUpperCase(), aF[r] = new rn(e), hS[r] = e; } function wAe(r) { if (Se(r)) { var e = hS[r.toUpperCase()] || {}; return r === _E || r === iF ? Qe(e) : dt(Qe(e), Qe(hS[m1]), !1); } else return dt(Qe(r), Qe(hS[m1]), !1); } function jM(r) { return aF[r]; } function xAe() { return aF[m1]; } PZ(iF, yAe); PZ(_E, _Ae); var oF = 1e3, sF = oF * 60, x_ = sF * 60, Zs = x_ * 24, cG = Zs * 365, q0 = { year: "{yyyy}", month: "{MMM}", day: "{d}", hour: "{HH}:{mm}", minute: "{HH}:{mm}", second: "{HH}:{mm}:{ss}", millisecond: "{HH}:{mm}:{ss} {SSS}", none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}" }, Kx = "{yyyy}-{MM}-{dd}", fG = { year: "{yyyy}", month: "{yyyy}-{MM}", day: Kx, hour: Kx + " " + q0.hour, minute: Kx + " " + q0.minute, second: Kx + " " + q0.second, millisecond: q0.none }, nA = ["year", "month", "day", "hour", "minute", "second", "millisecond"], IZ = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"]; function gp(r, e) { return r += "", "0000".substr(0, e - r.length) + r; } function qg(r) { switch (r) { case "half-year": case "quarter": return "month"; case "week": case "half-week": return "day"; case "half-day": case "quarter-day": return "hour"; default: return r; } } function CAe(r) { return r === qg(r); } function SAe(r) { switch (r) { case "year": case "month": return "day"; case "millisecond": return "millisecond"; default: return "second"; } } function XT(r, e, t, n) { var i = ec(r), a = i[uF(t)](), o = i[Zg(t)]() + 1, s = Math.floor((o - 1) / 3) + 1, u = i[qT(t)](), l = i["get" + (t ? "UTC" : "") + "Day"](), c = i[y1(t)](), f = (c - 1) % 12 + 1, h = i[ZT(t)](), p = i[KT(t)](), d = i[JT(t)](), v = n instanceof rn ? n : jM(n || TZ) || xAe(), g = v.getModel("time"), m = g.get("month"), y = g.get("monthAbbr"), _ = g.get("dayOfWeek"), w = g.get("dayOfWeekAbbr"); return (e || "").replace(/{yyyy}/g, a + "").replace(/{yy}/g, a % 100 + "").replace(/{Q}/g, s + "").replace(/{MMMM}/g, m[o - 1]).replace(/{MMM}/g, y[o - 1]).replace(/{MM}/g, gp(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, gp(u, 2)).replace(/{d}/g, u + "").replace(/{eeee}/g, _[l]).replace(/{ee}/g, w[l]).replace(/{e}/g, l + "").replace(/{HH}/g, gp(c, 2)).replace(/{H}/g, c + "").replace(/{hh}/g, gp(f + "", 2)).replace(/{h}/g, f + "").replace(/{mm}/g, gp(h, 2)).replace(/{m}/g, h + "").replace(/{ss}/g, gp(p, 2)).replace(/{s}/g, p + "").replace(/{SSS}/g, gp(d, 3)).replace(/{S}/g, d + ""); } function EAe(r, e, t, n, i) { var a = null; if (Se(t)) a = t; else if (ze(t)) a = t(r.value, e, { level: r.level }); else { var o = oe({}, q0); if (r.level > 0) for (var s = 0; s < nA.length; ++s) o[nA[s]] = "{primary|" + o[nA[s]] + "}"; var u = t ? t.inherit === !1 ? t : qe(t, o) : o, l = AZ(r.value, i); if (u[l]) a = u[l]; else if (u.inherit) { for (var c = IZ.indexOf(l), s = c - 1; s >= 0; --s) if (u[l]) { a = u[l]; break; } a = a || o.none; } if (le(a)) { var f = r.level == null ? 0 : r.level >= 0 ? r.level : a.length + r.level; f = Math.min(f, a.length - 1), a = a[f]; } } return XT(new Date(r.value), a, i, n); } function AZ(r, e) { var t = ec(r), n = t[Zg(e)]() + 1, i = t[qT(e)](), a = t[y1(e)](), o = t[ZT(e)](), s = t[KT(e)](), u = t[JT(e)](), l = u === 0, c = l && s === 0, f = c && o === 0, h = f && a === 0, p = h && i === 1, d = p && n === 1; return d ? "year" : p ? "month" : h ? "day" : f ? "hour" : c ? "minute" : l ? "second" : "millisecond"; } function hG(r, e, t) { var n = $t(r) ? ec(r) : r; switch (e = e || AZ(r, t), e) { case "year": return n[uF(t)](); case "half-year": return n[Zg(t)]() >= 6 ? 1 : 0; case "quarter": return Math.floor((n[Zg(t)]() + 1) / 4); case "month": return n[Zg(t)](); case "day": return n[qT(t)](); case "half-day": return n[y1(t)]() / 24; case "hour": return n[y1(t)](); case "minute": return n[ZT(t)](); case "second": return n[KT(t)](); case "millisecond": return n[JT(t)](); } } function uF(r) { return r ? "getUTCFullYear" : "getFullYear"; } function Zg(r) { return r ? "getUTCMonth" : "getMonth"; } function qT(r) { return r ? "getUTCDate" : "getDate"; } function y1(r) { return r ? "getUTCHours" : "getHours"; } function ZT(r) { return r ? "getUTCMinutes" : "getMinutes"; } function KT(r) { return r ? "getUTCSeconds" : "getSeconds"; } function JT(r) { return r ? "getUTCMilliseconds" : "getMilliseconds"; } function bAe(r) { return r ? "setUTCFullYear" : "setFullYear"; } function LZ(r) { return r ? "setUTCMonth" : "setMonth"; } function DZ(r) { return r ? "setUTCDate" : "setDate"; } function MZ(r) { return r ? "setUTCHours" : "setHours"; } function OZ(r) { return r ? "setUTCMinutes" : "setMinutes"; } function RZ(r) { return r ? "setUTCSeconds" : "setSeconds"; } function NZ(r) { return r ? "setUTCMilliseconds" : "setMilliseconds"; } function FZ(r) { if (!$N(r)) return Se(r) ? r : "-"; var e = (r + "").split("."); return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : ""); } function BZ(r, e) { return r = (r || "").toLowerCase().replace(/-(.)/g, function(t, n) { return n.toUpperCase(); }), e && r && (r = r.charAt(0).toUpperCase() + r.slice(1)), r; } var Ty = NN, TAe = /([&<>"'])/g, PAe = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }; function ns(r) { return r == null ? "" : (r + "").replace(TAe, function(e, t) { return PAe[t]; }); } function YM(r, e, t) { var n = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}"; function i(c) { return c && Bu(c) ? c : "-"; } function a(c) { return !!(c != null && !isNaN(c) && isFinite(c)); } var o = e === "time", s = r instanceof Date; if (o || s) { var u = o ? ec(r) : r; if (isNaN(+u)) { if (s) return "-"; } else return XT(u, n, t); } if (e === "ordinal") return rE(r) ? i(r) : $t(r) && a(r) ? r + "" : "-"; var l = nf(r); return a(l) ? FZ(l) : rE(r) ? i(r) : typeof r == "boolean" ? r + "" : "-"; } var pG = ["a", "b", "c", "d", "e", "f", "g"], iA = function(r, e) { return "{" + r + (e == null ? "" : e) + "}"; }; function kZ(r, e, t) { le(e) || (e = [e]); var n = e.length; if (!n) return ""; for (var i = e[0].$vars || [], a = 0; a < i.length; a++) { var o = pG[a]; r = r.replace(iA(o), iA(o, 0)); } for (var s = 0; s < n; s++) for (var u = 0; u < i.length; u++) { var l = e[s][i[u]]; r = r.replace(iA(pG[u], s), t ? ns(l) : l); } return r; } function IAe(r, e, t) { return M(e, function(n, i) { r = r.replace("{" + i + "}", t ? ns(n) : n); }), r; } function AAe(r, e) { var t = Se(r) ? { color: r, extraCssText: e } : r || {}, n = t.color, i = t.type; e = t.extraCssText; var a = t.renderMode || "html"; if (!n) return ""; if (a === "html") return i === "subItem" ? '' : ''; var o = t.markerId || "markerX"; return { renderMode: a, content: "{" + o + "|} ", style: i === "subItem" ? { width: 4, height: 4, borderRadius: 2, backgroundColor: n } : { width: 10, height: 10, borderRadius: 5, backgroundColor: n } }; } function Hd(r, e) { return e = e || "transparent", Se(r) ? r : Xe(r) && r.colorStops && (r.colorStops[0] || {}).color || e; } function wE(r, e) { if (e === "_blank" || e === "blank") { var t = window.open(); t.opener = null, t.location.href = r; } else window.open(r, e); } var pS = M, VZ = ["left", "right", "top", "bottom", "width", "height"], Wp = [["width", "left", "right"], ["height", "top", "bottom"]]; function lF(r, e, t, n, i) { var a = 0, o = 0; n == null && (n = 1 / 0), i == null && (i = 1 / 0); var s = 0; e.eachChild(function(u, l) { var c = u.getBoundingRect(), f = e.childAt(l + 1), h = f && f.getBoundingRect(), p, d; if (r === "horizontal") { var v = c.width + (h ? -h.x + c.x : 0); p = a + v, p > n || u.newline ? (a = 0, p = v, o += s + t, s = c.height) : s = Math.max(s, c.height); } else { var g = c.height + (h ? -h.y + c.y : 0); d = o + g, d > i || u.newline ? (a += s + t, o = 0, d = g, s = c.width) : s = Math.max(s, c.width); } u.newline || (u.x = a, u.y = o, u.markRedraw(), r === "horizontal" ? a = p + t : o = d + t); }); } var id = lF; ut(lF, "vertical"); ut(lF, "horizontal"); function LAe(r, e, t) { var n = e.width, i = e.height, a = ye(r.left, n), o = ye(r.top, i), s = ye(r.right, n), u = ye(r.bottom, i); return (isNaN(a) || isNaN(parseFloat(r.left))) && (a = 0), (isNaN(s) || isNaN(parseFloat(r.right))) && (s = n), (isNaN(o) || isNaN(parseFloat(r.top))) && (o = 0), (isNaN(u) || isNaN(parseFloat(r.bottom))) && (u = i), t = Ty(t || 0), { width: Math.max(s - a - t[1] - t[3], 0), height: Math.max(u - o - t[0] - t[2], 0) }; } function Bi(r, e, t) { t = Ty(t || 0); var n = e.width, i = e.height, a = ye(r.left, n), o = ye(r.top, i), s = ye(r.right, n), u = ye(r.bottom, i), l = ye(r.width, n), c = ye(r.height, i), f = t[2] + t[0], h = t[1] + t[3], p = r.aspect; switch (isNaN(l) && (l = n - s - h - a), isNaN(c) && (c = i - u - f - o), p != null && (isNaN(l) && isNaN(c) && (p > n / i ? l = n * 0.8 : c = i * 0.8), isNaN(l) && (l = p * c), isNaN(c) && (c = l / p)), isNaN(a) && (a = n - s - l - h), isNaN(o) && (o = i - u - c - f), r.left || r.right) { case "center": a = n / 2 - l / 2 - t[3]; break; case "right": a = n - l - h; break; } switch (r.top || r.bottom) { case "middle": case "center": o = i / 2 - c / 2 - t[0]; break; case "bottom": o = i - c - f; break; } a = a || 0, o = o || 0, isNaN(l) && (l = n - h - a - (s || 0)), isNaN(c) && (c = i - f - o - (u || 0)); var d = new gt(a + t[3], o + t[0], l, c); return d.margin = t, d; } function QT(r, e, t, n, i, a) { var o = !i || !i.hv || i.hv[0], s = !i || !i.hv || i.hv[1], u = i && i.boundingMode || "all"; if (a = a || r, a.x = r.x, a.y = r.y, !o && !s) return !1; var l; if (u === "raw") l = r.type === "group" ? new gt(0, 0, +e.width || 0, +e.height || 0) : r.getBoundingRect(); else if (l = r.getBoundingRect(), r.needLocalTransform()) { var c = r.getLocalTransform(); l = l.clone(), l.applyTransform(c); } var f = Bi(qe({ width: l.width, height: l.height }, e), t, n), h = o ? f.x - l.x : 0, p = s ? f.y - l.y : 0; return u === "raw" ? (a.x = h, a.y = p) : (a.x += h, a.y += p), a === r && r.markRedraw(), !0; } function DAe(r, e) { return r[Wp[e][0]] != null || r[Wp[e][1]] != null && r[Wp[e][2]] != null; } function _1(r) { var e = r.layoutMode || r.constructor.layoutMode; return Xe(e) ? e : e ? { type: e } : null; } function Nh(r, e, t) { var n = t && t.ignoreSize; !le(n) && (n = [n, n]); var i = o(Wp[0], 0), a = o(Wp[1], 1); l(Wp[0], r, i), l(Wp[1], r, a); function o(c, f) { var h = {}, p = 0, d = {}, v = 0, g = 2; if (pS(c, function(_) { d[_] = r[_]; }), pS(c, function(_) { s(e, _) && (h[_] = d[_] = e[_]), u(h, _) && p++, u(d, _) && v++; }), n[f]) return u(e, c[1]) ? d[c[2]] = null : u(e, c[2]) && (d[c[1]] = null), d; if (v === g || !p) return d; if (p >= g) return h; for (var m = 0; m < c.length; m++) { var y = c[m]; if (!s(h, y) && s(r, y)) { h[y] = r[y]; break; } } return h; } function s(c, f) { return c.hasOwnProperty(f); } function u(c, f) { return c[f] != null && c[f] !== "auto"; } function l(c, f, h) { pS(c, function(p) { f[p] = h[p]; }); } } function Py(r) { return GZ({}, r); } function GZ(r, e) { return e && r && pS(VZ, function(t) { e.hasOwnProperty(t) && (r[t] = e[t]); }), r; } var MAe = Ut(), Iy = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this, t, n, i) || this; return a.uid = by("ec_cpt_model"), a; } return e.prototype.init = function(t, n, i) { this.mergeDefaultAndTheme(t, i); }, e.prototype.mergeDefaultAndTheme = function(t, n) { var i = _1(this), a = i ? Py(t) : {}, o = n.getTheme(); dt(t, o.get(this.mainType)), dt(t, this.getDefaultOption()), i && Nh(t, a, i); }, e.prototype.mergeOption = function(t, n) { dt(this.option, t, !0); var i = _1(this); i && Nh(this.option, t, i); }, e.prototype.optionUpdated = function(t, n) { }, e.prototype.getDefaultOption = function() { var t = this.constructor; if (!cPe(t)) return t.defaultOption; var n = MAe(this); if (!n.defaultOption) { for (var i = [], a = t; a; ) { var o = a.prototype.defaultOption; o && i.push(o), a = a.superClass; } for (var s = {}, u = i.length - 1; u >= 0; u--) s = dt(s, i[u], !0); n.defaultOption = s; } return n.defaultOption; }, e.prototype.getReferringComponents = function(t, n) { var i = t + "Index", a = t + "Id"; return Ow(this.ecModel, t, { index: this.get(i, !0), id: this.get(a, !0) }, n); }, e.prototype.getBoxLayoutParams = function() { var t = this; return { left: t.get("left"), top: t.get("top"), right: t.get("right"), bottom: t.get("bottom"), width: t.get("width"), height: t.get("height") }; }, e.prototype.getZLevelKey = function() { return ""; }, e.prototype.setZLevel = function(t) { this.option.zlevel = t; }, e.protoInitialize = function() { var t = e.prototype; t.type = "component", t.id = "", t.name = "", t.mainType = "", t.subType = "", t.componentIndex = 0; }(), e; }(rn); Tq(Iy, rn); BT(Iy); gAe(Iy); mAe(Iy, OAe); function OAe(r) { var e = []; return M(Iy.getClassesByMainType(r), function(t) { e = e.concat(t.dependencies || t.prototype.dependencies || []); }), e = ce(e, function(t) { return Nl(t).main; }), r !== "dataset" && _t(e, "dataset") <= 0 && e.unshift("dataset"), e; } const Rt = Iy; var zZ = ""; typeof navigator < "u" && (zZ = navigator.platform || ""); var $v = "rgba(0, 0, 0, 0.2)"; const RAe = { darkMode: "auto", colorBy: "series", color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"], gradientColor: ["#f6efa6", "#d88273", "#bf444c"], aria: { decal: { decals: [{ color: $v, dashArrayX: [1, 0], dashArrayY: [2, 5], symbolSize: 1, rotation: Math.PI / 6 }, { color: $v, symbol: "circle", dashArrayX: [[8, 8], [0, 8, 8, 0]], dashArrayY: [6, 0], symbolSize: 0.8 }, { color: $v, dashArrayX: [1, 0], dashArrayY: [4, 3], rotation: -Math.PI / 4 }, { color: $v, dashArrayX: [[6, 6], [0, 6, 6, 0]], dashArrayY: [6, 0] }, { color: $v, dashArrayX: [[1, 0], [1, 6]], dashArrayY: [1, 0, 6, 0], rotation: Math.PI / 4 }, { color: $v, symbol: "triangle", dashArrayX: [[9, 9], [0, 9, 9, 0]], dashArrayY: [7, 2], symbolSize: 0.75 }] } }, textStyle: { fontFamily: zZ.match(/^Win/) ? "Microsoft YaHei" : "sans-serif", fontSize: 12, fontStyle: "normal", fontWeight: "normal" }, blendMode: null, stateAnimation: { duration: 300, easing: "cubicOut" }, animation: "auto", animationDuration: 1e3, animationDurationUpdate: 500, animationEasing: "cubicInOut", animationEasingUpdate: "cubicInOut", animationThreshold: 2e3, progressiveThreshold: 3e3, progressive: 400, hoverLayerThreshold: 3e3, useUTC: !1 }; var XM = $e(["tooltip", "label", "itemName", "itemId", "itemGroupId", "seriesName"]), Su = "original", ro = "arrayRows", Eu = "objectRows", lc = "keyedColumns", kc = "typedArray", $Z = "unknown", $l = "column", Ay = "row", Ea = { Must: 1, Might: 2, Not: 3 }, HZ = Ut(); function NAe(r) { HZ(r).datasetMap = $e(); } function UZ(r, e, t) { var n = {}, i = fF(e); if (!i || !r) return n; var a = [], o = [], s = e.ecModel, u = HZ(s).datasetMap, l = i.uid + "_" + t.seriesLayoutBy, c, f; r = r.slice(), M(r, function(v, g) { var m = Xe(v) ? v : r[g] = { name: v }; m.type === "ordinal" && c == null && (c = g, f = d(m)), n[m.name] = []; }); var h = u.get(l) || u.set(l, { categoryWayDim: f, valueWayDim: 0 }); M(r, function(v, g) { var m = v.name, y = d(v); if (c == null) { var _ = h.valueWayDim; p(n[m], _, y), p(o, _, y), h.valueWayDim += y; } else if (c === g) p(n[m], 0, y), p(a, 0, y); else { var _ = h.categoryWayDim; p(n[m], _, y), p(o, _, y), h.categoryWayDim += y; } }); function p(v, g, m) { for (var y = 0; y < m; y++) v.push(g + y); } function d(v) { var g = v.dimsDef; return g ? g.length : 1; } return a.length && (n.itemName = a), o.length && (n.seriesName = o), n; } function cF(r, e, t) { var n = {}, i = fF(r); if (!i) return n; var a = e.sourceFormat, o = e.dimensionsDefine, s; (a === Eu || a === lc) && M(o, function(c, f) { (Xe(c) ? c.name : c) === "name" && (s = f); }); var u = function() { for (var c = {}, f = {}, h = [], p = 0, d = Math.min(5, t); p < d; p++) { var v = jZ(e.data, a, e.seriesLayoutBy, o, e.startIndex, p); h.push(v); var g = v === Ea.Not; if (g && c.v == null && p !== s && (c.v = p), (c.n == null || c.n === c.v || !g && h[c.n] === Ea.Not) && (c.n = p), m(c) && h[c.n] !== Ea.Not) return c; g || (v === Ea.Might && f.v == null && p !== s && (f.v = p), (f.n == null || f.n === f.v) && (f.n = p)); } function m(y) { return y.v != null && y.n != null; } return m(c) ? c : m(f) ? f : null; }(); if (u) { n.value = [u.v]; var l = s != null ? s : u.n; n.itemName = [l], n.seriesName = [l]; } return n; } function fF(r) { var e = r.get("data", !0); if (!e) return Ow(r.ecModel, "dataset", { index: r.get("datasetIndex", !0), id: r.get("datasetId", !0) }, ui).models[0]; } function FAe(r) { return !r.get("transform", !0) && !r.get("fromTransformResult", !0) ? [] : Ow(r.ecModel, "dataset", { index: r.get("fromDatasetIndex", !0), id: r.get("fromDatasetId", !0) }, ui).models; } function WZ(r, e) { return jZ(r.data, r.sourceFormat, r.seriesLayoutBy, r.dimensionsDefine, r.startIndex, e); } function jZ(r, e, t, n, i, a) { var o, s = 5; if (zo(r)) return Ea.Not; var u, l; if (n) { var c = n[a]; Xe(c) ? (u = c.name, l = c.type) : Se(c) && (u = c); } if (l != null) return l === "ordinal" ? Ea.Must : Ea.Not; if (e === ro) { var f = r; if (t === Ay) { for (var h = f[a], p = 0; p < (h || []).length && p < s; p++) if ((o = w(h[i + p])) != null) return o; } else for (var p = 0; p < f.length && p < s; p++) { var d = f[i + p]; if (d && (o = w(d[a])) != null) return o; } } else if (e === Eu) { var v = r; if (!u) return Ea.Not; for (var p = 0; p < v.length && p < s; p++) { var g = v[p]; if (g && (o = w(g[u])) != null) return o; } } else if (e === lc) { var m = r; if (!u) return Ea.Not; var h = m[u]; if (!h || zo(h)) return Ea.Not; for (var p = 0; p < h.length && p < s; p++) if ((o = w(h[p])) != null) return o; } else if (e === Su) for (var y = r, p = 0; p < y.length && p < s; p++) { var g = y[p], _ = _y(g); if (!le(_)) return Ea.Not; if ((o = w(_[a])) != null) return o; } function w(x) { var C = Se(x); if (x != null && isFinite(x) && x !== "") return C ? Ea.Might : Ea.Not; if (C && x !== "-") return Ea.Must; } return Ea.Not; } var qM = $e(); function BAe(r, e) { Ze(qM.get(r) == null && e), qM.set(r, e); } function kAe(r, e, t) { var n = qM.get(e); if (!n) return t; var i = n(r); if (!i) return t; if (process.env.NODE_ENV !== "production") for (var a = 0; a < i.length; a++) Ze(Om(i[a])); return t.concat(i); } var dG = Ut(), VAe = Ut(), hF = function() { function r() { } return r.prototype.getColorFromPalette = function(e, t, n) { var i = jr(this.get("color", !0)), a = this.get("colorLayer", !0); return YZ(this, dG, i, a, e, t, n); }, r.prototype.clearColorPalette = function() { zAe(this, dG); }, r; }(); function ZM(r, e, t, n) { var i = jr(r.get(["aria", "decal", "decals"])); return YZ(r, VAe, i, null, e, t, n); } function GAe(r, e) { for (var t = r.length, n = 0; n < t; n++) if (r[n].length > e) return r[n]; return r[t - 1]; } function YZ(r, e, t, n, i, a, o) { a = a || r; var s = e(a), u = s.paletteIdx || 0, l = s.paletteNameMap = s.paletteNameMap || {}; if (l.hasOwnProperty(i)) return l[i]; var c = o == null || !n ? t : GAe(n, o); if (c = c || t, !(!c || !c.length)) { var f = c[u]; return i && (l[i] = f), s.paletteIdx = (u + 1) % c.length, f; } } function zAe(r, e) { e(r).paletteIdx = 0, e(r).paletteNameMap = {}; } var Jx, o0, vG, aA = "\0_ec_inner", gG = 1, $Ae = { grid: "GridComponent", polar: "PolarComponent", geo: "GeoComponent", singleAxis: "SingleAxisComponent", parallel: "ParallelComponent", calendar: "CalendarComponent", graphic: "GraphicComponent", toolbox: "ToolboxComponent", tooltip: "TooltipComponent", axisPointer: "AxisPointerComponent", brush: "BrushComponent", title: "TitleComponent", timeline: "TimelineComponent", markPoint: "MarkPointComponent", markLine: "MarkLineComponent", markArea: "MarkAreaComponent", legend: "LegendComponent", dataZoom: "DataZoomComponent", visualMap: "VisualMapComponent", xAxis: "GridComponent", yAxis: "GridComponent", angleAxis: "PolarComponent", radiusAxis: "PolarComponent" }, HAe = { line: "LineChart", bar: "BarChart", pie: "PieChart", scatter: "ScatterChart", radar: "RadarChart", map: "MapChart", tree: "TreeChart", treemap: "TreemapChart", graph: "GraphChart", gauge: "GaugeChart", funnel: "FunnelChart", parallel: "ParallelChart", sankey: "SankeyChart", boxplot: "BoxplotChart", candlestick: "CandlestickChart", effectScatter: "EffectScatterChart", lines: "LinesChart", heatmap: "HeatmapChart", pictorialBar: "PictorialBarChart", themeRiver: "ThemeRiverChart", sunburst: "SunburstChart", custom: "CustomChart" }, xE = {}; function UAe(r) { M(r, function(e, t) { if (!Rt.hasClass(t)) { var n = $Ae[t]; n && !xE[n] && (Oa("Component " + t + ` is used but not imported. import { ` + n + ` } from 'echarts/components'; echarts.use([` + n + "]);"), xE[n] = !0); } }); } var XZ = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.init = function(t, n, i, a, o, s) { a = a || {}, this.option = null, this._theme = new rn(a), this._locale = new rn(o), this._optionManager = s; }, e.prototype.setOption = function(t, n, i) { process.env.NODE_ENV !== "production" && (Ze(t != null, "option is null/undefined"), Ze(t[aA] !== gG, "please use chart.getOption()")); var a = _G(n); this._optionManager.setOption(t, i, a), this._resetOption(null, a); }, e.prototype.resetOption = function(t, n) { return this._resetOption(t, _G(n)); }, e.prototype._resetOption = function(t, n) { var i = !1, a = this._optionManager; if (!t || t === "recreate") { var o = a.mountOption(t === "recreate"); process.env.NODE_ENV !== "production" && UAe(o), !this.option || t === "recreate" ? vG(this, o) : (this.restoreData(), this._mergeOption(o, n)), i = !0; } if ((t === "timeline" || t === "media") && this.restoreData(), !t || t === "recreate" || t === "timeline") { var s = a.getTimelineOption(this); s && (i = !0, this._mergeOption(s, n)); } if (!t || t === "recreate" || t === "media") { var u = a.getMediaOption(this); u.length && M(u, function(l) { i = !0, this._mergeOption(l, n); }, this); } return i; }, e.prototype.mergeOption = function(t) { this._mergeOption(t, null); }, e.prototype._mergeOption = function(t, n) { var i = this.option, a = this._componentsMap, o = this._componentsCount, s = [], u = $e(), l = n && n.replaceMergeMainTypeMap; NAe(this), M(t, function(f, h) { f != null && (Rt.hasClass(h) ? h && (s.push(h), u.set(h, !0)) : i[h] = i[h] == null ? Qe(f) : dt(i[h], f, !0)); }), l && l.each(function(f, h) { Rt.hasClass(h) && !u.get(h) && (s.push(h), u.set(h, !0)); }), Rt.topologicalTravel(s, Rt.getAllClassMainTypes(), c, this); function c(f) { var h = kAe(this, f, jr(t[f])), p = a.get(f), d = p ? l && l.get(f) ? "replaceMerge" : "normalMerge" : "replaceAll", v = xq(p, h, d); tPe(v, f, Rt), i[f] = null, a.set(f, null), o.set(f, 0); var g = [], m = [], y = 0, _, w; M(v, function(x, C) { var S = x.existing, b = x.newOption; if (!b) S && (S.mergeOption({}, this), S.optionUpdated({}, !1)); else { var E = f === "series", T = Rt.getClass( f, x.keyInfo.subType, !E ); if (!T) { if (process.env.NODE_ENV !== "production") { var P = x.keyInfo.subType, I = HAe[P]; xE[P] || (xE[P] = !0, Oa(I ? "Series " + P + ` is used but not imported. import { ` + I + ` } from 'echarts/charts'; echarts.use([` + I + "]);" : "Unkown series " + P)); } return; } if (f === "tooltip") { if (_) { process.env.NODE_ENV !== "production" && (w || (to("Currently only one tooltip component is allowed."), w = !0)); return; } _ = !0; } if (S && S.constructor === T) S.name = x.keyInfo.name, S.mergeOption(b, this), S.optionUpdated(b, !1); else { var A = oe({ componentIndex: C }, x.keyInfo); S = new T(b, this, this, A), oe(S, A), x.brandNew && (S.__requireNewView = !0), S.init(b, this, this), S.optionUpdated(null, !0); } } S ? (g.push(S.option), m.push(S), y++) : (g.push(void 0), m.push(void 0)); }, this), i[f] = g, a.set(f, m), o.set(f, y), f === "series" && Jx(this); } this._seriesIndices || Jx(this); }, e.prototype.getOption = function() { var t = Qe(this.option); return M(t, function(n, i) { if (Rt.hasClass(i)) { for (var a = jr(n), o = a.length, s = !1, u = o - 1; u >= 0; u--) a[u] && !Om(a[u]) ? s = !0 : (a[u] = null, !s && o--); a.length = o, t[i] = a; } }), delete t[aA], t; }, e.prototype.getTheme = function() { return this._theme; }, e.prototype.getLocaleModel = function() { return this._locale; }, e.prototype.setUpdatePayload = function(t) { this._payload = t; }, e.prototype.getUpdatePayload = function() { return this._payload; }, e.prototype.getComponent = function(t, n) { var i = this._componentsMap.get(t); if (i) { var a = i[n || 0]; if (a) return a; if (n == null) { for (var o = 0; o < i.length; o++) if (i[o]) return i[o]; } } }, e.prototype.queryComponents = function(t) { var n = t.mainType; if (!n) return []; var i = t.index, a = t.id, o = t.name, s = this._componentsMap.get(n); if (!s || !s.length) return []; var u; return i != null ? (u = [], M(jr(i), function(l) { s[l] && u.push(s[l]); })) : a != null ? u = mG("id", a, s) : o != null ? u = mG("name", o, s) : u = Wr(s, function(l) { return !!l; }), yG(u, t); }, e.prototype.findComponents = function(t) { var n = t.query, i = t.mainType, a = s(n), o = a ? this.queryComponents(a) : Wr(this._componentsMap.get(i), function(l) { return !!l; }); return u(yG(o, t)); function s(l) { var c = i + "Index", f = i + "Id", h = i + "Name"; return l && (l[c] != null || l[f] != null || l[h] != null) ? { mainType: i, index: l[c], id: l[f], name: l[h] } : null; } function u(l) { return t.filter ? Wr(l, t.filter) : l; } }, e.prototype.eachComponent = function(t, n, i) { var a = this._componentsMap; if (ze(t)) { var o = n, s = t; a.each(function(f, h) { for (var p = 0; f && p < f.length; p++) { var d = f[p]; d && s.call(o, h, d, d.componentIndex); } }); } else for (var u = Se(t) ? a.get(t) : Xe(t) ? this.findComponents(t) : null, l = 0; u && l < u.length; l++) { var c = u[l]; c && n.call(i, c, c.componentIndex); } }, e.prototype.getSeriesByName = function(t) { var n = Li(t, null); return Wr(this._componentsMap.get("series"), function(i) { return !!i && n != null && i.name === n; }); }, e.prototype.getSeriesByIndex = function(t) { return this._componentsMap.get("series")[t]; }, e.prototype.getSeriesByType = function(t) { return Wr(this._componentsMap.get("series"), function(n) { return !!n && n.subType === t; }); }, e.prototype.getSeries = function() { return Wr(this._componentsMap.get("series"), function(t) { return !!t; }); }, e.prototype.getSeriesCount = function() { return this._componentsCount.get("series"); }, e.prototype.eachSeries = function(t, n) { o0(this), M(this._seriesIndices, function(i) { var a = this._componentsMap.get("series")[i]; t.call(n, a, i); }, this); }, e.prototype.eachRawSeries = function(t, n) { M(this._componentsMap.get("series"), function(i) { i && t.call(n, i, i.componentIndex); }); }, e.prototype.eachSeriesByType = function(t, n, i) { o0(this), M(this._seriesIndices, function(a) { var o = this._componentsMap.get("series")[a]; o.subType === t && n.call(i, o, a); }, this); }, e.prototype.eachRawSeriesByType = function(t, n, i) { return M(this.getSeriesByType(t), n, i); }, e.prototype.isSeriesFiltered = function(t) { return o0(this), this._seriesIndicesMap.get(t.componentIndex) == null; }, e.prototype.getCurrentSeriesIndices = function() { return (this._seriesIndices || []).slice(); }, e.prototype.filterSeries = function(t, n) { o0(this); var i = []; M(this._seriesIndices, function(a) { var o = this._componentsMap.get("series")[a]; t.call(n, o, a) && i.push(a); }, this), this._seriesIndices = i, this._seriesIndicesMap = $e(i); }, e.prototype.restoreData = function(t) { Jx(this); var n = this._componentsMap, i = []; n.each(function(a, o) { Rt.hasClass(o) && i.push(o); }), Rt.topologicalTravel(i, Rt.getAllClassMainTypes(), function(a) { M(n.get(a), function(o) { o && (a !== "series" || !WAe(o, t)) && o.restoreData(); }); }); }, e.internalField = function() { Jx = function(t) { var n = t._seriesIndices = []; M(t._componentsMap.get("series"), function(i) { i && n.push(i.componentIndex); }), t._seriesIndicesMap = $e(n); }, o0 = function(t) { if (process.env.NODE_ENV !== "production" && !t._seriesIndices) throw new Error("Option should contains series."); }, vG = function(t, n) { t.option = {}, t.option[aA] = gG, t._componentsMap = $e({ series: [] }), t._componentsCount = $e(); var i = n.aria; Xe(i) && i.enabled == null && (i.enabled = !0), jAe(n, t._theme.option), dt(n, RAe, !1), t._mergeOption(n, null); }; }(), e; }(rn); function WAe(r, e) { if (e) { var t = e.seriesIndex, n = e.seriesId, i = e.seriesName; return t != null && r.componentIndex !== t || n != null && r.id !== n || i != null && r.name !== i; } } function jAe(r, e) { var t = r.color && !r.colorLayer; M(e, function(n, i) { i === "colorLayer" && t || Rt.hasClass(i) || (typeof n == "object" ? r[i] = r[i] ? dt(r[i], n, !1) : Qe(n) : r[i] == null && (r[i] = n)); }); } function mG(r, e, t) { if (le(e)) { var n = $e(); return M(e, function(a) { if (a != null) { var o = Li(a, null); o != null && n.set(a, !0); } }), Wr(t, function(a) { return a && n.get(a[r]); }); } else { var i = Li(e, null); return Wr(t, function(a) { return a && i != null && a[r] === i; }); } } function yG(r, e) { return e.hasOwnProperty("subType") ? Wr(r, function(t) { return t && t.subType === e.subType; }) : r; } function _G(r) { var e = $e(); return r && M(jr(r.replaceMerge), function(t) { process.env.NODE_ENV !== "production" && Ze(Rt.hasClass(t), '"' + t + '" is not valid component main type in "replaceMerge"'), e.set(t, !0); }), { replaceMergeMainTypeMap: e }; } gi(XZ, hF); const qZ = XZ; var YAe = [ "getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isSSR", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getOption", "getId", "updateLabelLayout" ], XAe = function() { function r(e) { M(YAe, function(t) { this[t] = Ae(e[t], e); }, this); } return r; }(); const ZZ = XAe; var oA = {}, qAe = function() { function r() { this._coordinateSystems = []; } return r.prototype.create = function(e, t) { var n = []; M(oA, function(i, a) { var o = i.create(e, t); n = n.concat(o || []); }), this._coordinateSystems = n; }, r.prototype.update = function(e, t) { M(this._coordinateSystems, function(n) { n.update && n.update(e, t); }); }, r.prototype.getCoordinateSystems = function() { return this._coordinateSystems.slice(); }, r.register = function(e, t) { oA[e] = t; }, r.get = function(e) { return oA[e]; }, r; }(); const Ly = qAe; var ZAe = /^(min|max)?(.+)$/, KAe = function() { function r(e) { this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e; } return r.prototype.setOption = function(e, t, n) { e && (M(jr(e.series), function(o) { o && o.data && zo(o.data) && nE(o.data); }), M(jr(e.dataset), function(o) { o && o.source && zo(o.source) && nE(o.source); })), e = Qe(e); var i = this._optionBackup, a = JAe(e, t, !i); this._newBaseOption = a.baseOption, i ? (a.timelineOptions.length && (i.timelineOptions = a.timelineOptions), a.mediaList.length && (i.mediaList = a.mediaList), a.mediaDefault && (i.mediaDefault = a.mediaDefault)) : this._optionBackup = a; }, r.prototype.mountOption = function(e) { var t = this._optionBackup; return this._timelineOptions = t.timelineOptions, this._mediaList = t.mediaList, this._mediaDefault = t.mediaDefault, this._currentMediaIndices = [], Qe(e ? t.baseOption : this._newBaseOption); }, r.prototype.getTimelineOption = function(e) { var t, n = this._timelineOptions; if (n.length) { var i = e.getComponent("timeline"); i && (t = Qe( n[i.getCurrentIndex()] )); } return t; }, r.prototype.getMediaOption = function(e) { var t = this._api.getWidth(), n = this._api.getHeight(), i = this._mediaList, a = this._mediaDefault, o = [], s = []; if (!i.length && !a) return s; for (var u = 0, l = i.length; u < l; u++) QAe(i[u].query, t, n) && o.push(u); return !o.length && a && (o = [-1]), o.length && !tLe(o, this._currentMediaIndices) && (s = ce(o, function(c) { return Qe(c === -1 ? a.option : i[c].option); })), this._currentMediaIndices = o, s; }, r; }(); function JAe(r, e, t) { var n = [], i, a, o = r.baseOption, s = r.timeline, u = r.options, l = r.media, c = !!r.media, f = !!(u || s || o && o.timeline); o ? (a = o, a.timeline || (a.timeline = s)) : ((f || c) && (r.options = r.media = null), a = r), c && (le(l) ? M(l, function(p) { process.env.NODE_ENV !== "production" && p && !p.option && Xe(p.query) && Xe(p.query.option) && Oa("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), p && p.option && (p.query ? n.push(p) : i || (i = p)); }) : process.env.NODE_ENV !== "production" && Oa("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), h(a), M(u, function(p) { return h(p); }), M(n, function(p) { return h(p.option); }); function h(p) { M(e, function(d) { d(p, t); }); } return { baseOption: a, timelineOptions: u || [], mediaDefault: i, mediaList: n }; } function QAe(r, e, t) { var n = { width: e, height: t, aspectratio: e / t }, i = !0; return M(r, function(a, o) { var s = o.match(ZAe); if (!(!s || !s[1] || !s[2])) { var u = s[1], l = s[2].toLowerCase(); eLe(n[l], a, u) || (i = !1); } }), i; } function eLe(r, e, t) { return t === "min" ? r >= e : t === "max" ? r <= e : r === e; } function tLe(r, e) { return r.join(",") === e.join(","); } const rLe = KAe; var Ls = M, w1 = Xe, wG = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"]; function sA(r) { var e = r && r.itemStyle; if (!!e) for (var t = 0, n = wG.length; t < n; t++) { var i = wG[t], a = e.normal, o = e.emphasis; a && a[i] && (process.env.NODE_ENV !== "production" && ii("itemStyle.normal." + i, i), r[i] = r[i] || {}, r[i].normal ? dt(r[i].normal, a[i]) : r[i].normal = a[i], a[i] = null), o && o[i] && (process.env.NODE_ENV !== "production" && ii("itemStyle.emphasis." + i, "emphasis." + i), r[i] = r[i] || {}, r[i].emphasis ? dt(r[i].emphasis, o[i]) : r[i].emphasis = o[i], o[i] = null); } } function ja(r, e, t) { if (r && r[e] && (r[e].normal || r[e].emphasis)) { var n = r[e].normal, i = r[e].emphasis; n && (process.env.NODE_ENV !== "production" && rl("'normal' hierarchy in " + e + " has been removed since 4.0. All style properties are configured in " + e + " directly now."), t ? (r[e].normal = r[e].emphasis = null, qe(r[e], n)) : r[e] = n), i && (process.env.NODE_ENV !== "production" && rl(e + ".emphasis has been changed to emphasis." + e + " since 4.0"), r.emphasis = r.emphasis || {}, r.emphasis[e] = i, i.focus && (r.emphasis.focus = i.focus), i.blurScope && (r.emphasis.blurScope = i.blurScope)); } } function Z0(r) { ja(r, "itemStyle"), ja(r, "lineStyle"), ja(r, "areaStyle"), ja(r, "label"), ja(r, "labelLine"), ja(r, "upperLabel"), ja(r, "edgeLabel"); } function ni(r, e) { var t = w1(r) && r[e], n = w1(t) && t.textStyle; if (n) { process.env.NODE_ENV !== "production" && rl("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now."); for (var i = 0, a = C6.length; i < a; i++) { var o = C6[i]; n.hasOwnProperty(o) && (t[o] = n[o]); } } } function $s(r) { r && (Z0(r), ni(r, "label"), r.emphasis && ni(r.emphasis, "label")); } function nLe(r) { if (!!w1(r)) { sA(r), Z0(r), ni(r, "label"), ni(r, "upperLabel"), ni(r, "edgeLabel"), r.emphasis && (ni(r.emphasis, "label"), ni(r.emphasis, "upperLabel"), ni(r.emphasis, "edgeLabel")); var e = r.markPoint; e && (sA(e), $s(e)); var t = r.markLine; t && (sA(t), $s(t)); var n = r.markArea; n && $s(n); var i = r.data; if (r.type === "graph") { i = i || r.nodes; var a = r.links || r.edges; if (a && !zo(a)) for (var o = 0; o < a.length; o++) $s(a[o]); M(r.categories, function(l) { Z0(l); }); } if (i && !zo(i)) for (var o = 0; o < i.length; o++) $s(i[o]); if (e = r.markPoint, e && e.data) for (var s = e.data, o = 0; o < s.length; o++) $s(s[o]); if (t = r.markLine, t && t.data) for (var u = t.data, o = 0; o < u.length; o++) le(u[o]) ? ($s(u[o][0]), $s(u[o][1])) : $s(u[o]); r.type === "gauge" ? (ni(r, "axisLabel"), ni(r, "title"), ni(r, "detail")) : r.type === "treemap" ? (ja(r.breadcrumb, "itemStyle"), M(r.levels, function(l) { Z0(l); })) : r.type === "tree" && Z0(r.leaves); } } function hc(r) { return le(r) ? r : r ? [r] : []; } function xG(r) { return (le(r) ? r[0] : r) || {}; } function iLe(r, e) { Ls(hc(r.series), function(n) { w1(n) && nLe(n); }); var t = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"]; e && t.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Ls(t, function(n) { Ls(hc(r[n]), function(i) { i && (ni(i, "axisLabel"), ni(i.axisPointer, "label")); }); }), Ls(hc(r.parallel), function(n) { var i = n && n.parallelAxisDefault; ni(i, "axisLabel"), ni(i && i.axisPointer, "label"); }), Ls(hc(r.calendar), function(n) { ja(n, "itemStyle"), ni(n, "dayLabel"), ni(n, "monthLabel"), ni(n, "yearLabel"); }), Ls(hc(r.radar), function(n) { ni(n, "name"), n.name && n.axisName == null && (n.axisName = n.name, delete n.name, process.env.NODE_ENV !== "production" && rl("name property in radar component has been changed to axisName")), n.nameGap != null && n.axisNameGap == null && (n.axisNameGap = n.nameGap, delete n.nameGap, process.env.NODE_ENV !== "production" && rl("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && Ls(n.indicator, function(i) { i.text && ii("text", "name", "radar.indicator"); }); }), Ls(hc(r.geo), function(n) { w1(n) && ($s(n), Ls(hc(n.regions), function(i) { $s(i); })); }), Ls(hc(r.timeline), function(n) { $s(n), ja(n, "label"), ja(n, "itemStyle"), ja(n, "controlStyle", !0); var i = n.data; le(i) && M(i, function(a) { Xe(a) && (ja(a, "label"), ja(a, "itemStyle")); }); }), Ls(hc(r.toolbox), function(n) { ja(n, "iconStyle"), Ls(n.feature, function(i) { ja(i, "iconStyle"); }); }), ni(xG(r.axisPointer), "label"), ni(xG(r.tooltip).axisPointer, "label"); } function aLe(r, e) { for (var t = e.split(","), n = r, i = 0; i < t.length && (n = n && n[t[i]], n != null); i++) ; return n; } function oLe(r, e, t, n) { for (var i = e.split(","), a = r, o, s = 0; s < i.length - 1; s++) o = i[s], a[o] == null && (a[o] = {}), a = a[o]; (n || a[i[s]] == null) && (a[i[s]] = t); } function CG(r) { r && M(sLe, function(e) { e[0] in r && !(e[1] in r) && (r[e[1]] = r[e[0]]); }); } var sLe = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], uLe = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], uA = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]]; function s0(r) { var e = r && r.itemStyle; if (e) for (var t = 0; t < uA.length; t++) { var n = uA[t][1], i = uA[t][0]; e[n] != null && (e[i] = e[n], process.env.NODE_ENV !== "production" && ii(n, i)); } } function SG(r) { !r || r.alignTo === "edge" && r.margin != null && r.edgeDistance == null && (process.env.NODE_ENV !== "production" && ii("label.margin", "label.edgeDistance", "pie"), r.edgeDistance = r.margin); } function EG(r) { !r || r.downplay && !r.blur && (r.blur = r.downplay, process.env.NODE_ENV !== "production" && ii("downplay", "blur", "sunburst")); } function lLe(r) { !r || r.focusNodeAdjacency != null && (r.emphasis = r.emphasis || {}, r.emphasis.focus == null && (process.env.NODE_ENV !== "production" && ii("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), r.emphasis.focus = "adjacency")); } function KZ(r, e) { if (r) for (var t = 0; t < r.length; t++) e(r[t]), r[t] && KZ(r[t].children, e); } function JZ(r, e) { iLe(r, e), r.series = jr(r.series), M(r.series, function(t) { if (!!Xe(t)) { var n = t.type; if (n === "line") t.clipOverflow != null && (t.clip = t.clipOverflow, process.env.NODE_ENV !== "production" && ii("clipOverflow", "clip", "line")); else if (n === "pie" || n === "gauge") { t.clockWise != null && (t.clockwise = t.clockWise, process.env.NODE_ENV !== "production" && ii("clockWise", "clockwise")), SG(t.label); var i = t.data; if (i && !zo(i)) for (var a = 0; a < i.length; a++) SG(i[a]); t.hoverOffset != null && (t.emphasis = t.emphasis || {}, (t.emphasis.scaleSize = null) && (process.env.NODE_ENV !== "production" && ii("hoverOffset", "emphasis.scaleSize"), t.emphasis.scaleSize = t.hoverOffset)); } else if (n === "gauge") { var o = aLe(t, "pointer.color"); o != null && oLe(t, "itemStyle.color", o); } else if (n === "bar") { s0(t), s0(t.backgroundStyle), s0(t.emphasis); var i = t.data; if (i && !zo(i)) for (var a = 0; a < i.length; a++) typeof i[a] == "object" && (s0(i[a]), s0(i[a] && i[a].emphasis)); } else if (n === "sunburst") { var s = t.highlightPolicy; s && (t.emphasis = t.emphasis || {}, t.emphasis.focus || (t.emphasis.focus = s, process.env.NODE_ENV !== "production" && ii("highlightPolicy", "emphasis.focus", "sunburst"))), EG(t), KZ(t.data, EG); } else n === "graph" || n === "sankey" ? lLe(t) : n === "map" && (t.mapType && !t.map && (process.env.NODE_ENV !== "production" && ii("mapType", "map", "map"), t.map = t.mapType), t.mapLocation && (process.env.NODE_ENV !== "production" && rl("`mapLocation` is not used anymore."), qe(t, t.mapLocation))); t.hoverAnimation != null && (t.emphasis = t.emphasis || {}, t.emphasis && t.emphasis.scale == null && (process.env.NODE_ENV !== "production" && ii("hoverAnimation", "emphasis.scale"), t.emphasis.scale = t.hoverAnimation)), CG(t); } }), r.dataRange && (r.visualMap = r.dataRange), M(uLe, function(t) { var n = r[t]; n && (le(n) || (n = [n]), M(n, function(i) { CG(i); })); }); } function cLe(r) { var e = $e(); r.eachSeries(function(t) { var n = t.get("stack"); if (n) { var i = e.get(n) || e.set(n, []), a = t.getData(), o = { stackResultDimension: a.getCalculationInfo("stackResultDimension"), stackedOverDimension: a.getCalculationInfo("stackedOverDimension"), stackedDimension: a.getCalculationInfo("stackedDimension"), stackedByDimension: a.getCalculationInfo("stackedByDimension"), isStackedByIndex: a.getCalculationInfo("isStackedByIndex"), data: a, seriesModel: t }; if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension)) return; i.length && a.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o); } }), e.each(fLe); } function fLe(r) { M(r, function(e, t) { var n = [], i = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, u = e.seriesModel.get("stackStrategy") || "samesign"; o.modify(a, function(l, c, f) { var h = o.get(e.stackedDimension, f); if (isNaN(h)) return i; var p, d; s ? d = o.getRawIndex(f) : p = o.get(e.stackedByDimension, f); for (var v = NaN, g = t - 1; g >= 0; g--) { var m = r[g]; if (s || (d = m.data.rawIndexOf(m.stackedByDimension, p)), d >= 0) { var y = m.data.getByRawIndex(m.stackResultDimension, d); if (u === "all" || u === "positive" && y > 0 || u === "negative" && y < 0 || u === "samesign" && h >= 0 && y > 0 || u === "samesign" && h <= 0 && y < 0) { h = zTe(h, y), v = y; break; } } } return n[0] = h, n[1] = v, n; }); }); } var eP = function() { function r(e) { this.data = e.data || (e.sourceFormat === lc ? {} : []), this.sourceFormat = e.sourceFormat || $Z, this.seriesLayoutBy = e.seriesLayoutBy || $l, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption; var t = this.dimensionsDefine = e.dimensionsDefine; if (t) for (var n = 0; n < t.length; n++) { var i = t[n]; i.type == null && WZ(this, n) === Ea.Must && (i.type = "ordinal"); } } return r; }(); function pF(r) { return r instanceof eP; } function KM(r, e, t) { t = t || QZ(r); var n = e.seriesLayoutBy, i = pLe(r, t, n, e.sourceHeader, e.dimensions), a = new eP({ data: r, sourceFormat: t, seriesLayoutBy: n, dimensionsDefine: i.dimensionsDefine, startIndex: i.startIndex, dimensionsDetectedCount: i.dimensionsDetectedCount, metaRawOption: Qe(e) }); return a; } function dF(r) { return new eP({ data: r, sourceFormat: zo(r) ? kc : Su }); } function hLe(r) { return new eP({ data: r.data, sourceFormat: r.sourceFormat, seriesLayoutBy: r.seriesLayoutBy, dimensionsDefine: Qe(r.dimensionsDefine), startIndex: r.startIndex, dimensionsDetectedCount: r.dimensionsDetectedCount }); } function QZ(r) { var e = $Z; if (zo(r)) e = kc; else if (le(r)) { r.length === 0 && (e = ro); for (var t = 0, n = r.length; t < n; t++) { var i = r[t]; if (i != null) { if (le(i)) { e = ro; break; } else if (Xe(i)) { e = Eu; break; } } } } else if (Xe(r)) { for (var a in r) if (Te(r, a) && eo(r[a])) { e = lc; break; } } return e; } function pLe(r, e, t, n, i) { var a, o; if (!r) return { dimensionsDefine: bG(i), startIndex: o, dimensionsDetectedCount: a }; if (e === ro) { var s = r; n === "auto" || n == null ? TG(function(l) { l != null && l !== "-" && (Se(l) ? o == null && (o = 1) : o = 0); }, t, s, 10) : o = $t(n) ? n : n ? 1 : 0, !i && o === 1 && (i = [], TG(function(l, c) { i[c] = l != null ? l + "" : ""; }, t, s, 1 / 0)), a = i ? i.length : t === Ay ? s.length : s[0] ? s[0].length : null; } else if (e === Eu) i || (i = dLe(r)); else if (e === lc) i || (i = [], M(r, function(l, c) { i.push(c); })); else if (e === Su) { var u = _y(r[0]); a = le(u) && u.length || 1; } else e === kc && process.env.NODE_ENV !== "production" && Ze(!!i, "dimensions must be given if data is TypedArray."); return { startIndex: o, dimensionsDefine: bG(i), dimensionsDetectedCount: a }; } function dLe(r) { for (var e = 0, t; e < r.length && !(t = r[e++]); ) ; if (t) { var n = []; return M(t, function(i, a) { n.push(a); }), n; } } function bG(r) { if (!!r) { var e = $e(); return ce(r, function(t, n) { t = Xe(t) ? t : { name: t }; var i = { name: t.name, displayName: t.displayName, type: t.type }; if (i.name == null) return i; i.name += "", i.displayName == null && (i.displayName = i.name); var a = e.get(i.name); return a ? i.name += "-" + a.count++ : e.set(i.name, { count: 1 }), i; }); } } function TG(r, e, t, n) { if (e === Ay) for (var i = 0; i < t.length && i < n; i++) r(t[i] ? t[i][0] : null, i); else for (var a = t[0] || [], i = 0; i < a.length && i < n; i++) r(a[i], i); } function eK(r) { var e = r.sourceFormat; return e === Eu || e === lc; } var mp, yp, _p, PG, IG, tK = function() { function r(e, t) { var n = pF(e) ? e : dF(e); this._source = n; var i = this._data = n.data; if (n.sourceFormat === kc) { if (process.env.NODE_ENV !== "production" && t == null) throw new Error("Typed array data must specify dimension size"); this._offset = 0, this._dimSize = t, this._data = i; } IG(this, i, n); } return r.prototype.getSource = function() { return this._source; }, r.prototype.count = function() { return 0; }, r.prototype.getItem = function(e, t) { }, r.prototype.appendData = function(e) { }, r.prototype.clean = function() { }, r.protoInitialize = function() { var e = r.prototype; e.pure = !1, e.persistent = !0; }(), r.internalField = function() { var e; IG = function(o, s, u) { var l = u.sourceFormat, c = u.seriesLayoutBy, f = u.startIndex, h = u.dimensionsDefine, p = PG[vF(l, c)]; if (process.env.NODE_ENV !== "production" && Ze(p, "Invalide sourceFormat: " + l), oe(o, p), l === kc) o.getItem = t, o.count = i, o.fillStorage = n; else { var d = rK(l, c); o.getItem = Ae(d, null, s, f, h); var v = nK(l, c); o.count = Ae(v, null, s, f, h); } }; var t = function(o, s) { o = o - this._offset, s = s || []; for (var u = this._data, l = this._dimSize, c = l * o, f = 0; f < l; f++) s[f] = u[c + f]; return s; }, n = function(o, s, u, l) { for (var c = this._data, f = this._dimSize, h = 0; h < f; h++) { for (var p = l[h], d = p[0] == null ? 1 / 0 : p[0], v = p[1] == null ? -1 / 0 : p[1], g = s - o, m = u[h], y = 0; y < g; y++) { var _ = c[y * f + h]; m[o + y] = _, _ < d && (d = _), _ > v && (v = _); } p[0] = d, p[1] = v; } }, i = function() { return this._data ? this._data.length / this._dimSize : 0; }; PG = (e = {}, e[ro + "_" + $l] = { pure: !0, appendData: a }, e[ro + "_" + Ay] = { pure: !0, appendData: function() { throw new Error('Do not support appendData when set seriesLayoutBy: "row".'); } }, e[Eu] = { pure: !0, appendData: a }, e[lc] = { pure: !0, appendData: function(o) { var s = this._data; M(o, function(u, l) { for (var c = s[l] || (s[l] = []), f = 0; f < (u || []).length; f++) c.push(u[f]); }); } }, e[Su] = { appendData: a }, e[kc] = { persistent: !1, pure: !0, appendData: function(o) { process.env.NODE_ENV !== "production" && Ze(zo(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o; }, clean: function() { this._offset += this.count(), this._data = null; } }, e); function a(o) { for (var s = 0; s < o.length; s++) this._data.push(o[s]); } }(), r; }(), AG = function(r, e, t, n) { return r[n]; }, vLe = (mp = {}, mp[ro + "_" + $l] = function(r, e, t, n) { return r[n + e]; }, mp[ro + "_" + Ay] = function(r, e, t, n, i) { n += e; for (var a = i || [], o = r, s = 0; s < o.length; s++) { var u = o[s]; a[s] = u ? u[n] : null; } return a; }, mp[Eu] = AG, mp[lc] = function(r, e, t, n, i) { for (var a = i || [], o = 0; o < t.length; o++) { var s = t[o].name; if (process.env.NODE_ENV !== "production" && s == null) throw new Error(); var u = r[s]; a[o] = u ? u[n] : null; } return a; }, mp[Su] = AG, mp); function rK(r, e) { var t = vLe[vF(r, e)]; return process.env.NODE_ENV !== "production" && Ze(t, 'Do not support get item on "' + r + '", "' + e + '".'), t; } var LG = function(r, e, t) { return r.length; }, gLe = (yp = {}, yp[ro + "_" + $l] = function(r, e, t) { return Math.max(0, r.length - e); }, yp[ro + "_" + Ay] = function(r, e, t) { var n = r[0]; return n ? Math.max(0, n.length - e) : 0; }, yp[Eu] = LG, yp[lc] = function(r, e, t) { var n = t[0].name; if (process.env.NODE_ENV !== "production" && n == null) throw new Error(); var i = r[n]; return i ? i.length : 0; }, yp[Su] = LG, yp); function nK(r, e) { var t = gLe[vF(r, e)]; return process.env.NODE_ENV !== "production" && Ze(t, 'Do not suppport count on "' + r + '", "' + e + '".'), t; } var lA = function(r, e, t) { return r[e]; }, mLe = (_p = {}, _p[ro] = lA, _p[Eu] = function(r, e, t) { return r[t]; }, _p[lc] = lA, _p[Su] = function(r, e, t) { var n = _y(r); return n instanceof Array ? n[e] : n; }, _p[kc] = lA, _p); function iK(r) { var e = mLe[r]; return process.env.NODE_ENV !== "production" && Ze(e, 'Do not suppport get value on "' + r + '".'), e; } function vF(r, e) { return r === ro ? r + "_" + e : r; } function Rm(r, e, t) { if (!!r) { var n = r.getRawDataItem(e); if (n != null) { var i = r.getStore(), a = i.getSource().sourceFormat; if (t != null) { var o = r.getDimensionIndex(t), s = i.getDimensionProperty(o); return iK(a)(n, o, s); } else { var u = n; return a === Su && (u = _y(n)), u; } } } } var yLe = /\{@(.+?)\}/g, gF = function() { function r() { } return r.prototype.getDataParams = function(e, t) { var n = this.getData(t), i = this.getRawValue(e, t), a = n.getRawIndex(e), o = n.getName(e), s = n.getRawDataItem(e), u = n.getItemVisual(e, "style"), l = u && u[n.getItemVisual(e, "drawType") || "fill"], c = u && u.stroke, f = this.mainType, h = f === "series", p = n.userOutput && n.userOutput.get(); return { componentType: f, componentSubType: this.subType, componentIndex: this.componentIndex, seriesType: h ? this.subType : null, seriesIndex: this.seriesIndex, seriesId: h ? this.id : null, seriesName: h ? this.name : null, name: o, dataIndex: a, data: s, dataType: t, value: i, color: l, borderColor: c, dimensionNames: p ? p.fullDimensions : null, encode: p ? p.encode : null, $vars: ["seriesName", "name", "value"] }; }, r.prototype.getFormattedLabel = function(e, t, n, i, a, o) { t = t || "normal"; var s = this.getData(n), u = this.getDataParams(e, n); if (o && (u.value = o.interpolatedValue), i != null && le(u.value) && (u.value = u.value[i]), !a) { var l = s.getItemModel(e); a = l.get(t === "normal" ? ["label", "formatter"] : [t, "label", "formatter"]); } if (ze(a)) return u.status = t, u.dimensionIndex = i, a(u); if (Se(a)) { var c = kZ(a, u); return c.replace(yLe, function(f, h) { var p = h.length, d = h; d.charAt(0) === "[" && d.charAt(p - 1) === "]" && (d = +d.slice(1, p - 1), process.env.NODE_ENV !== "production" && isNaN(d) && Oa("Invalide label formatter: @" + h + ", only support @[0], @[1], @[2], ...")); var v = Rm(s, e, d); if (o && le(o.interpolatedValue)) { var g = s.getDimensionIndex(d); g >= 0 && (v = o.interpolatedValue[g]); } return v != null ? v + "" : ""; }); } }, r.prototype.getRawValue = function(e, t) { return Rm(this.getData(t), e); }, r.prototype.formatTooltip = function(e, t, n) { }, r; }(); function DG(r) { var e, t; return Xe(r) ? r.type ? t = r : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + xo(r)) : e = r, { text: e, frag: t }; } function C_(r) { return new _Le(r); } var _Le = function() { function r(e) { e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0; } return r.prototype.perform = function(e) { var t = this._upstream, n = e && e.skip; if (this._dirty && t) { var i = this.context; i.data = i.outputData = t.context.outputData; } this.__pipeline && (this.__pipeline.currentTask = this); var a; this._plan && !n && (a = this._plan(this.context)); var o = c(this._modBy), s = this._modDataCount || 0, u = c(e && e.modBy), l = e && e.modDataCount || 0; (o !== u || s !== l) && (a = "reset"); function c(y) { return !(y >= 1) && (y = 1), y; } var f; (this._dirty || a === "reset") && (this._dirty = !1, f = this._doReset(n)), this._modBy = u, this._modDataCount = l; var h = e && e.step; if (t ? (process.env.NODE_ENV !== "production" && Ze(t._outputDueEnd != null), this._dueEnd = t._outputDueEnd) : (process.env.NODE_ENV !== "production" && Ze(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) { var p = this._dueIndex, d = Math.min(h != null ? this._dueIndex + h : 1 / 0, this._dueEnd); if (!n && (f || p < d)) { var v = this._progress; if (le(v)) for (var g = 0; g < v.length; g++) this._doProgress(v[g], p, d, u, l); else this._doProgress(v, p, d, u, l); } this._dueIndex = d; var m = this._settedOutputEnd != null ? this._settedOutputEnd : d; process.env.NODE_ENV !== "production" && Ze(m >= this._outputDueEnd), this._outputDueEnd = m; } else this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd; return this.unfinished(); }, r.prototype.dirty = function() { this._dirty = !0, this._onDirty && this._onDirty(this.context); }, r.prototype._doProgress = function(e, t, n, i, a) { MG.reset(t, n, i, a), this._callingProgress = e, this._callingProgress({ start: t, end: n, count: n - t, next: MG.next }, this.context); }, r.prototype._doReset = function(e) { this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null; var t, n; !e && this._reset && (t = this._reset(this.context), t && t.progress && (n = t.forceFirstProgress, t = t.progress), le(t) && !t.length && (t = null)), this._progress = t, this._modBy = this._modDataCount = null; var i = this._downstream; return i && i.dirty(), n; }, r.prototype.unfinished = function() { return this._progress && this._dueIndex < this._dueEnd; }, r.prototype.pipe = function(e) { process.env.NODE_ENV !== "production" && Ze(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty()); }, r.prototype.dispose = function() { this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0); }, r.prototype.getUpstream = function() { return this._upstream; }, r.prototype.getDownstream = function() { return this._downstream; }, r.prototype.setOutputEnd = function(e) { this._outputDueEnd = this._settedOutputEnd = e; }, r; }(), MG = function() { var r, e, t, n, i, a = { reset: function(u, l, c, f) { e = u, r = l, t = c, n = f, i = Math.ceil(n / t), a.next = t > 1 && n > 0 ? s : o; } }; return a; function o() { return e < r ? e++ : null; } function s() { var u = e % i * t + Math.ceil(e / i), l = e >= r ? null : u < n ? u : e; return e++, l; } }(); function dh(r, e) { var t = e && e.type; return t === "ordinal" ? r : (t === "time" && !$t(r) && r != null && r !== "-" && (r = +ec(r)), r == null || r === "" ? NaN : +r); } var wLe = $e({ number: function(r) { return parseFloat(r); }, time: function(r) { return +ec(r); }, trim: function(r) { return Se(r) ? Bu(r) : r; } }); function aK(r) { return wLe.get(r); } var oK = { lt: function(r, e) { return r < e; }, lte: function(r, e) { return r <= e; }, gt: function(r, e) { return r > e; }, gte: function(r, e) { return r >= e; } }, xLe = function() { function r(e, t) { if (!$t(t)) { var n = ""; process.env.NODE_ENV !== "production" && (n = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), Ar(n); } this._opFn = oK[e], this._rvalFloat = nf(t); } return r.prototype.evaluate = function(e) { return $t(e) ? this._opFn(e, this._rvalFloat) : this._opFn(nf(e), this._rvalFloat); }, r; }(), sK = function() { function r(e, t) { var n = e === "desc"; this._resultLT = n ? 1 : -1, t == null && (t = n ? "min" : "max"), this._incomparable = t === "min" ? -1 / 0 : 1 / 0; } return r.prototype.evaluate = function(e, t) { var n = $t(e) ? e : nf(e), i = $t(t) ? t : nf(t), a = isNaN(n), o = isNaN(i); if (a && (n = this._incomparable), o && (i = this._incomparable), a && o) { var s = Se(e), u = Se(t); s && (n = u ? e : 0), u && (i = s ? t : 0); } return n < i ? this._resultLT : n > i ? -this._resultLT : 0; }, r; }(), CLe = function() { function r(e, t) { this._rval = t, this._isEQ = e, this._rvalTypeof = typeof t, this._rvalFloat = nf(t); } return r.prototype.evaluate = function(e) { var t = e === this._rval; if (!t) { var n = typeof e; n !== this._rvalTypeof && (n === "number" || this._rvalTypeof === "number") && (t = nf(e) === this._rvalFloat); } return this._isEQ ? t : !t; }, r; }(); function SLe(r, e) { return r === "eq" || r === "ne" ? new CLe(r === "eq", e) : Te(oK, r) ? new xLe(r, e) : null; } var ELe = function() { function r() { } return r.prototype.getRawData = function() { throw new Error("not supported"); }, r.prototype.getRawDataItem = function(e) { throw new Error("not supported"); }, r.prototype.cloneRawData = function() { }, r.prototype.getDimensionInfo = function(e) { }, r.prototype.cloneAllDimensionInfo = function() { }, r.prototype.count = function() { }, r.prototype.retrieveValue = function(e, t) { }, r.prototype.retrieveValueFromItem = function(e, t) { }, r.prototype.convertValue = function(e, t) { return dh(e, t); }, r; }(); function bLe(r, e) { var t = new ELe(), n = r.data, i = t.sourceFormat = r.sourceFormat, a = r.startIndex, o = ""; r.seriesLayoutBy !== $l && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), Ar(o)); var s = [], u = {}, l = r.dimensionsDefine; if (l) M(l, function(v, g) { var m = v.name, y = { index: g, name: m, displayName: v.displayName }; if (s.push(y), m != null) { var _ = ""; Te(u, m) && (process.env.NODE_ENV !== "production" && (_ = 'dimension name "' + m + '" duplicated.'), Ar(_)), u[m] = y; } }); else for (var c = 0; c < r.dimensionsDetectedCount; c++) s.push({ index: c }); var f = rK(i, $l); e.__isBuiltIn && (t.getRawDataItem = function(v) { return f(n, a, s, v); }, t.getRawData = Ae(TLe, null, r)), t.cloneRawData = Ae(PLe, null, r); var h = nK(i, $l); t.count = Ae(h, null, n, a, s); var p = iK(i); t.retrieveValue = function(v, g) { var m = f(n, a, s, v); return d(m, g); }; var d = t.retrieveValueFromItem = function(v, g) { if (v != null) { var m = s[g]; if (m) return p(v, g, m.name); } }; return t.getDimensionInfo = Ae(ILe, null, s, u), t.cloneAllDimensionInfo = Ae(ALe, null, s), t; } function TLe(r) { var e = r.sourceFormat; if (!mF(e)) { var t = ""; process.env.NODE_ENV !== "production" && (t = "`getRawData` is not supported in source format " + e), Ar(t); } return r.data; } function PLe(r) { var e = r.sourceFormat, t = r.data; if (!mF(e)) { var n = ""; process.env.NODE_ENV !== "production" && (n = "`cloneRawData` is not supported in source format " + e), Ar(n); } if (e === ro) { for (var i = [], a = 0, o = t.length; a < o; a++) i.push(t[a].slice()); return i; } else if (e === Eu) { for (var i = [], a = 0, o = t.length; a < o; a++) i.push(oe({}, t[a])); return i; } } function ILe(r, e, t) { if (t != null) { if ($t(t) || !isNaN(t) && !Te(e, t)) return r[t]; if (Te(e, t)) return e[t]; } } function ALe(r) { return Qe(r); } var uK = $e(); function LLe(r) { r = Qe(r); var e = r.type, t = ""; e || (process.env.NODE_ENV !== "production" && (t = "Must have a `type` when `registerTransform`."), Ar(t)); var n = e.split(":"); n.length !== 2 && (process.env.NODE_ENV !== "production" && (t = 'Name must include namespace like "ns:regression".'), Ar(t)); var i = !1; n[0] === "echarts" && (e = n[1], i = !0), r.__isBuiltIn = i, uK.set(e, r); } function DLe(r, e, t) { var n = jr(r), i = n.length, a = ""; i || (process.env.NODE_ENV !== "production" && (a = "If `transform` declared, it should at least contain one transform."), Ar(a)); for (var o = 0, s = i; o < s; o++) { var u = n[o]; e = MLe(u, e, t, i === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1)); } return e; } function MLe(r, e, t, n) { var i = ""; e.length || (process.env.NODE_ENV !== "production" && (i = "Must have at least one upstream dataset."), Ar(i)), Xe(r) || (process.env.NODE_ENV !== "production" && (i = "transform declaration must be an object rather than " + typeof r + "."), Ar(i)); var a = r.type, o = uK.get(a); o || (process.env.NODE_ENV !== "production" && (i = 'Can not find transform on type "' + a + '".'), Ar(i)); var s = ce(e, function(c) { return bLe(c, o); }), u = jr(o.transform({ upstream: s[0], upstreamList: s, config: Qe(r.config) })); if (process.env.NODE_ENV !== "production" && r.print) { var l = ce(u, function(c) { var f = n != null ? " === pipe index: " + n : ""; return ["=== dataset index: " + t.datasetIndex + f + " ===", "- transform result data:", xo(c.data), "- transform result dimensions:", xo(c.dimensions)].join(` `); }).join(` `); jTe(l); } return ce(u, function(c, f) { var h = ""; Xe(c) || (process.env.NODE_ENV !== "production" && (h = "A transform should not return some empty results."), Ar(h)), c.data || (process.env.NODE_ENV !== "production" && (h = "Transform result data should be not be null or undefined"), Ar(h)); var p = QZ(c.data); mF(p) || (process.env.NODE_ENV !== "production" && (h = "Transform result data should be array rows or object rows."), Ar(h)); var d, v = e[0]; if (v && f === 0 && !c.dimensions) { var g = v.startIndex; g && (c.data = v.data.slice(0, g).concat(c.data)), d = { seriesLayoutBy: $l, sourceHeader: g, dimensions: v.metaRawOption.dimensions }; } else d = { seriesLayoutBy: $l, sourceHeader: 0, dimensions: c.dimensions }; return KM(c.data, d, null); }); } function mF(r) { return r === ro || r === Eu; } var tP = "undefined", OLe = typeof Uint32Array === tP ? Array : Uint32Array, RLe = typeof Uint16Array === tP ? Array : Uint16Array, lK = typeof Int32Array === tP ? Array : Int32Array, OG = typeof Float64Array === tP ? Array : Float64Array, cK = { float: OG, int: lK, ordinal: Array, number: Array, time: OG }, cA; function u0(r) { return r > 65535 ? OLe : RLe; } function Hv() { return [1 / 0, -1 / 0]; } function NLe(r) { var e = r.constructor; return e === Array ? r.slice() : new e(r); } function RG(r, e, t, n, i) { var a = cK[t || "float"]; if (i) { var o = r[e], s = o && o.length; if (s !== n) { for (var u = new a(n), l = 0; l < s; l++) u[l] = o[l]; r[e] = u; } } else r[e] = new a(n); } var JM = function() { function r() { this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = $e(); } return r.prototype.initData = function(e, t, n) { process.env.NODE_ENV !== "production" && Ze(ze(e.getItem) && ze(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity; var i = e.getSource(), a = this.defaultDimValueGetter = cA[i.sourceFormat]; this._dimValueGetter = n || a, this._rawExtent = []; var o = eK(i); this._dimensions = ce(t, function(s) { return process.env.NODE_ENV !== "production" && o && Ze(s.property != null), { type: s.type, property: s.property }; }), this._initDataFromProvider(0, e.count()); }, r.prototype.getProvider = function() { return this._provider; }, r.prototype.getSource = function() { return this._provider.getSource(); }, r.prototype.ensureCalculationDimension = function(e, t) { var n = this._calcDimNameToIdx, i = this._dimensions, a = n.get(e); if (a != null) { if (i[a].type === t) return a; } else a = i.length; return i[a] = { type: t }, n.set(e, a), this._chunks[a] = new cK[t || "float"](this._rawCount), this._rawExtent[a] = Hv(), a; }, r.prototype.collectOrdinalMeta = function(e, t) { var n = this._chunks[e], i = this._dimensions[e], a = this._rawExtent, o = i.ordinalOffset || 0, s = n.length; o === 0 && (a[e] = Hv()); for (var u = a[e], l = o; l < s; l++) { var c = n[l] = t.parseAndCollect(n[l]); isNaN(c) || (u[0] = Math.min(c, u[0]), u[1] = Math.max(c, u[1])); } i.ordinalMeta = t, i.ordinalOffset = s, i.type = "ordinal"; }, r.prototype.getOrdinalMeta = function(e) { var t = this._dimensions[e], n = t.ordinalMeta; return n; }, r.prototype.getDimensionProperty = function(e) { var t = this._dimensions[e]; return t && t.property; }, r.prototype.appendData = function(e) { process.env.NODE_ENV !== "production" && Ze(!this._indices, "appendData can only be called on raw data."); var t = this._provider, n = this.count(); t.appendData(e); var i = t.count(); return t.persistent || (i += n), n < i && this._initDataFromProvider(n, i, !0), [n, i]; }, r.prototype.appendValues = function(e, t) { for (var n = this._chunks, i = this._dimensions, a = i.length, o = this._rawExtent, s = this.count(), u = s + Math.max(e.length, t || 0), l = 0; l < a; l++) { var c = i[l]; RG(n, l, c.type, u, !0); } for (var f = [], h = s; h < u; h++) for (var p = h - s, d = 0; d < a; d++) { var c = i[d], v = cA.arrayRows.call(this, e[p] || f, c.property, p, d); n[d][h] = v; var g = o[d]; v < g[0] && (g[0] = v), v > g[1] && (g[1] = v); } return this._rawCount = this._count = u, { start: s, end: u }; }, r.prototype._initDataFromProvider = function(e, t, n) { for (var i = this._provider, a = this._chunks, o = this._dimensions, s = o.length, u = this._rawExtent, l = ce(o, function(y) { return y.property; }), c = 0; c < s; c++) { var f = o[c]; u[c] || (u[c] = Hv()), RG(a, c, f.type, t, n); } if (i.fillStorage) i.fillStorage(e, t, a, u); else for (var h = [], p = e; p < t; p++) { h = i.getItem(p, h); for (var d = 0; d < s; d++) { var v = a[d], g = this._dimValueGetter(h, l[d], p, d); v[p] = g; var m = u[d]; g < m[0] && (m[0] = g), g > m[1] && (m[1] = g); } } !i.persistent && i.clean && i.clean(), this._rawCount = this._count = t, this._extent = []; }, r.prototype.count = function() { return this._count; }, r.prototype.get = function(e, t) { if (!(t >= 0 && t < this._count)) return NaN; var n = this._chunks[e]; return n ? n[this.getRawIndex(t)] : NaN; }, r.prototype.getValues = function(e, t) { var n = [], i = []; if (t == null) { t = e, e = []; for (var a = 0; a < this._dimensions.length; a++) i.push(a); } else i = e; for (var a = 0, o = i.length; a < o; a++) n.push(this.get(i[a], t)); return n; }, r.prototype.getByRawIndex = function(e, t) { if (!(t >= 0 && t < this._rawCount)) return NaN; var n = this._chunks[e]; return n ? n[t] : NaN; }, r.prototype.getSum = function(e) { var t = this._chunks[e], n = 0; if (t) for (var i = 0, a = this.count(); i < a; i++) { var o = this.get(e, i); isNaN(o) || (n += o); } return n; }, r.prototype.getMedian = function(e) { var t = []; this.each([e], function(a) { isNaN(a) || t.push(a); }); var n = t.sort(function(a, o) { return a - o; }), i = this.count(); return i === 0 ? 0 : i % 2 === 1 ? n[(i - 1) / 2] : (n[i / 2] + n[i / 2 - 1]) / 2; }, r.prototype.indexOfRawIndex = function(e) { if (e >= this._rawCount || e < 0) return -1; if (!this._indices) return e; var t = this._indices, n = t[e]; if (n != null && n < this._count && n === e) return e; for (var i = 0, a = this._count - 1; i <= a; ) { var o = (i + a) / 2 | 0; if (t[o] < e) i = o + 1; else if (t[o] > e) a = o - 1; else return o; } return -1; }, r.prototype.indicesOfNearest = function(e, t, n) { var i = this._chunks, a = i[e], o = []; if (!a) return o; n == null && (n = 1 / 0); for (var s = 1 / 0, u = -1, l = 0, c = 0, f = this.count(); c < f; c++) { var h = this.getRawIndex(c), p = t - a[h], d = Math.abs(p); d <= n && ((d < s || d === s && p >= 0 && u < 0) && (s = d, u = p, l = 0), p === u && (o[l++] = c)); } return o.length = l, o; }, r.prototype.getIndices = function() { var e, t = this._indices; if (t) { var n = t.constructor, i = this._count; if (n === Array) { e = new n(i); for (var a = 0; a < i; a++) e[a] = t[a]; } else e = new n(t.buffer, 0, i); } else { var n = u0(this._rawCount); e = new n(this.count()); for (var a = 0; a < e.length; a++) e[a] = a; } return e; }, r.prototype.filter = function(e, t) { if (!this._count) return this; for (var n = this.clone(), i = n.count(), a = u0(n._rawCount), o = new a(i), s = [], u = e.length, l = 0, c = e[0], f = n._chunks, h = 0; h < i; h++) { var p = void 0, d = n.getRawIndex(h); if (u === 0) p = t(h); else if (u === 1) { var v = f[c][d]; p = t(v, h); } else { for (var g = 0; g < u; g++) s[g] = f[e[g]][d]; s[g] = h, p = t.apply(null, s); } p && (o[l++] = d); } return l < i && (n._indices = o), n._count = l, n._extent = [], n._updateGetRawIdx(), n; }, r.prototype.selectRange = function(e) { var t = this.clone(), n = t._count; if (!n) return this; var i = At(e), a = i.length; if (!a) return this; var o = t.count(), s = u0(t._rawCount), u = new s(o), l = 0, c = i[0], f = e[c][0], h = e[c][1], p = t._chunks, d = !1; if (!t._indices) { var v = 0; if (a === 1) { for (var g = p[i[0]], m = 0; m < n; m++) { var y = g[m]; (y >= f && y <= h || isNaN(y)) && (u[l++] = v), v++; } d = !0; } else if (a === 2) { for (var g = p[i[0]], _ = p[i[1]], w = e[i[1]][0], x = e[i[1]][1], m = 0; m < n; m++) { var y = g[m], C = _[m]; (y >= f && y <= h || isNaN(y)) && (C >= w && C <= x || isNaN(C)) && (u[l++] = v), v++; } d = !0; } } if (!d) if (a === 1) for (var m = 0; m < o; m++) { var S = t.getRawIndex(m), y = p[i[0]][S]; (y >= f && y <= h || isNaN(y)) && (u[l++] = S); } else for (var m = 0; m < o; m++) { for (var b = !0, S = t.getRawIndex(m), E = 0; E < a; E++) { var T = i[E], y = p[T][S]; (y < e[T][0] || y > e[T][1]) && (b = !1); } b && (u[l++] = t.getRawIndex(m)); } return l < o && (t._indices = u), t._count = l, t._extent = [], t._updateGetRawIdx(), t; }, r.prototype.map = function(e, t) { var n = this.clone(e); return this._updateDims(n, e, t), n; }, r.prototype.modify = function(e, t) { this._updateDims(this, e, t); }, r.prototype._updateDims = function(e, t, n) { for (var i = e._chunks, a = [], o = t.length, s = e.count(), u = [], l = e._rawExtent, c = 0; c < t.length; c++) l[t[c]] = Hv(); for (var f = 0; f < s; f++) { for (var h = e.getRawIndex(f), p = 0; p < o; p++) u[p] = i[t[p]][h]; u[o] = f; var d = n && n.apply(null, u); if (d != null) { typeof d != "object" && (a[0] = d, d = a); for (var c = 0; c < d.length; c++) { var v = t[c], g = d[c], m = l[v], y = i[v]; y && (y[h] = g), g < m[0] && (m[0] = g), g > m[1] && (m[1] = g); } } } }, r.prototype.lttbDownSample = function(e, t) { var n = this.clone([e], !0), i = n._chunks, a = i[e], o = this.count(), s = 0, u = Math.floor(1 / t), l = this.getRawIndex(0), c, f, h, p = new (u0(this._rawCount))(Math.min((Math.ceil(o / u) + 2) * 2, o)); p[s++] = l; for (var d = 1; d < o - 1; d += u) { for (var v = Math.min(d + u, o - 1), g = Math.min(d + u * 2, o), m = (g + v) / 2, y = 0, _ = v; _ < g; _++) { var w = this.getRawIndex(_), x = a[w]; isNaN(x) || (y += x); } y /= g - v; var C = d, S = Math.min(d + u, o), b = d - 1, E = a[l]; c = -1, h = C; for (var T = -1, P = 0, _ = C; _ < S; _++) { var w = this.getRawIndex(_), x = a[w]; if (isNaN(x)) { P++, T < 0 && (T = w); continue; } f = Math.abs((b - m) * (x - E) - (b - _) * (y - E)), f > c && (c = f, h = w); } P > 0 && P < S - C && (p[s++] = Math.min(T, h), h = Math.max(T, h)), p[s++] = h, l = h; } return p[s++] = this.getRawIndex(o - 1), n._count = s, n._indices = p, n.getRawIndex = this._getRawIdx, n; }, r.prototype.downSample = function(e, t, n, i) { for (var a = this.clone([e], !0), o = a._chunks, s = [], u = Math.floor(1 / t), l = o[e], c = this.count(), f = a._rawExtent[e] = Hv(), h = new (u0(this._rawCount))(Math.ceil(c / u)), p = 0, d = 0; d < c; d += u) { u > c - d && (u = c - d, s.length = u); for (var v = 0; v < u; v++) { var g = this.getRawIndex(d + v); s[v] = l[g]; } var m = n(s), y = this.getRawIndex(Math.min(d + i(s, m) || 0, c - 1)); l[y] = m, m < f[0] && (f[0] = m), m > f[1] && (f[1] = m), h[p++] = y; } return a._count = p, a._indices = h, a._updateGetRawIdx(), a; }, r.prototype.each = function(e, t) { if (!!this._count) for (var n = e.length, i = this._chunks, a = 0, o = this.count(); a < o; a++) { var s = this.getRawIndex(a); switch (n) { case 0: t(a); break; case 1: t(i[e[0]][s], a); break; case 2: t(i[e[0]][s], i[e[1]][s], a); break; default: for (var u = 0, l = []; u < n; u++) l[u] = i[e[u]][s]; l[u] = a, t.apply(null, l); } } }, r.prototype.getDataExtent = function(e) { var t = this._chunks[e], n = Hv(); if (!t) return n; var i = this.count(), a = !this._indices, o; if (a) return this._rawExtent[e].slice(); if (o = this._extent[e], o) return o.slice(); o = n; for (var s = o[0], u = o[1], l = 0; l < i; l++) { var c = this.getRawIndex(l), f = t[c]; f < s && (s = f), f > u && (u = f); } return o = [s, u], this._extent[e] = o, o; }, r.prototype.getRawDataItem = function(e) { var t = this.getRawIndex(e); if (this._provider.persistent) return this._provider.getItem(t); for (var n = [], i = this._chunks, a = 0; a < i.length; a++) n.push(i[a][t]); return n; }, r.prototype.clone = function(e, t) { var n = new r(), i = this._chunks, a = e && Kl(e, function(s, u) { return s[u] = !0, s; }, {}); if (a) for (var o = 0; o < i.length; o++) n._chunks[o] = a[o] ? NLe(i[o]) : i[o]; else n._chunks = i; return this._copyCommonProps(n), t || (n._indices = this._cloneIndices()), n._updateGetRawIdx(), n; }, r.prototype._copyCommonProps = function(e) { e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = Qe(this._extent), e._rawExtent = Qe(this._rawExtent); }, r.prototype._cloneIndices = function() { if (this._indices) { var e = this._indices.constructor, t = void 0; if (e === Array) { var n = this._indices.length; t = new e(n); for (var i = 0; i < n; i++) t[i] = this._indices[i]; } else t = new e(this._indices); return t; } return null; }, r.prototype._getRawIdxIdentity = function(e) { return e; }, r.prototype._getRawIdx = function(e) { return e < this._count && e >= 0 ? this._indices[e] : -1; }, r.prototype._updateGetRawIdx = function() { this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity; }, r.internalField = function() { function e(t, n, i, a) { return dh(t[a], this._dimensions[a]); } cA = { arrayRows: e, objectRows: function(t, n, i, a) { return dh(t[n], this._dimensions[a]); }, keyedColumns: e, original: function(t, n, i, a) { var o = t && (t.value == null ? t : t.value); return dh(o instanceof Array ? o[a] : o, this._dimensions[a]); }, typedArray: function(t, n, i, a) { return t[a]; } }; }(), r; }(), fK = function() { function r(e) { this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e; } return r.prototype.dirty = function() { this._setLocalSource([], []), this._storeList = [], this._dirty = !0; }, r.prototype._setLocalSource = function(e, t) { this._sourceList = e, this._upstreamSignList = t, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0); }, r.prototype._getVersionSign = function() { return this._sourceHost.uid + "_" + this._versionSignBase; }, r.prototype.prepareSource = function() { this._isDirty() && (this._createSource(), this._dirty = !1); }, r.prototype._createSource = function() { this._setLocalSource([], []); var e = this._sourceHost, t = this._getUpstreamSourceManagers(), n = !!t.length, i, a; if (l0(e)) { var o = e, s = void 0, u = void 0, l = void 0; if (n) { var c = t[0]; c.prepareSource(), l = c.getSource(), s = l.data, u = l.sourceFormat, a = [c._getVersionSign()]; } else s = o.get("data", !0), u = zo(s) ? kc : Su, a = []; var f = this._getSourceMetaRawOption() || {}, h = l && l.metaRawOption || {}, p = wt(f.seriesLayoutBy, h.seriesLayoutBy) || null, d = wt(f.sourceHeader, h.sourceHeader), v = wt(f.dimensions, h.dimensions), g = p !== h.seriesLayoutBy || !!d != !!h.sourceHeader || v; i = g ? [KM(s, { seriesLayoutBy: p, sourceHeader: d, dimensions: v }, u)] : []; } else { var m = e; if (n) { var y = this._applyTransform(t); i = y.sourceList, a = y.upstreamSignList; } else { var _ = m.get("source", !0); i = [KM(_, this._getSourceMetaRawOption(), null)], a = []; } } process.env.NODE_ENV !== "production" && Ze(i && a), this._setLocalSource(i, a); }, r.prototype._applyTransform = function(e) { var t = this._sourceHost, n = t.get("transform", !0), i = t.get("fromTransformResult", !0); if (process.env.NODE_ENV !== "production" && Ze(i != null || n != null), i != null) { var a = ""; e.length !== 1 && (process.env.NODE_ENV !== "production" && (a = "When using `fromTransformResult`, there should be only one upstream dataset"), FG(a)); } var o, s = [], u = []; return M(e, function(l) { l.prepareSource(); var c = l.getSource(i || 0), f = ""; i != null && !c && (process.env.NODE_ENV !== "production" && (f = "Can not retrieve result by `fromTransformResult`: " + i), FG(f)), s.push(c), u.push(l._getVersionSign()); }), n ? o = DLe(n, s, { datasetIndex: t.componentIndex }) : i != null && (o = [hLe(s[0])]), { sourceList: o, upstreamSignList: u }; }, r.prototype._isDirty = function() { if (this._dirty) return !0; for (var e = this._getUpstreamSourceManagers(), t = 0; t < e.length; t++) { var n = e[t]; if (n._isDirty() || this._upstreamSignList[t] !== n._getVersionSign()) return !0; } }, r.prototype.getSource = function(e) { e = e || 0; var t = this._sourceList[e]; if (!t) { var n = this._getUpstreamSourceManagers(); return n[0] && n[0].getSource(e); } return t; }, r.prototype.getSharedDataStore = function(e) { process.env.NODE_ENV !== "production" && Ze(l0(this._sourceHost), "Can only call getDataStore on series source manager."); var t = e.makeStoreSchema(); return this._innerGetDataStore(t.dimensions, e.source, t.hash); }, r.prototype._innerGetDataStore = function(e, t, n) { var i = 0, a = this._storeList, o = a[i]; o || (o = a[i] = {}); var s = o[n]; if (!s) { var u = this._getUpstreamSourceManagers()[0]; l0(this._sourceHost) && u ? s = u._innerGetDataStore(e, t, n) : (s = new JM(), s.initData(new tK(t, e.length), e)), o[n] = s; } return s; }, r.prototype._getUpstreamSourceManagers = function() { var e = this._sourceHost; if (l0(e)) { var t = fF(e); return t ? [t.getSourceManager()] : []; } else return ce(FAe(e), function(n) { return n.getSourceManager(); }); }, r.prototype._getSourceMetaRawOption = function() { var e = this._sourceHost, t, n, i; if (l0(e)) t = e.get("seriesLayoutBy", !0), n = e.get("sourceHeader", !0), i = e.get("dimensions", !0); else if (!this._getUpstreamSourceManagers().length) { var a = e; t = a.get("seriesLayoutBy", !0), n = a.get("sourceHeader", !0), i = a.get("dimensions", !0); } return { seriesLayoutBy: t, sourceHeader: n, dimensions: i }; }, r; }(); function NG(r) { var e = r.option.transform; e && nE(r.option.transform); } function l0(r) { return r.mainType === "series"; } function FG(r) { throw new Error(r); } var hK = "line-height:1"; function pK(r, e) { var t = r.color || "#6e7079", n = r.fontSize || 12, i = r.fontWeight || "400", a = r.color || "#464646", o = r.fontSize || 14, s = r.fontWeight || "900"; return e === "html" ? { nameStyle: "font-size:" + ns(n + "") + "px;color:" + ns(t) + ";font-weight:" + ns(i + ""), valueStyle: "font-size:" + ns(o + "") + "px;color:" + ns(a) + ";font-weight:" + ns(s + "") } : { nameStyle: { fontSize: n, fill: t, fontWeight: i }, valueStyle: { fontSize: o, fill: a, fontWeight: s } }; } var FLe = [0, 10, 20, 30], BLe = ["", ` `, ` `, ` `]; function Ji(r, e) { return e.type = r, e; } function QM(r) { return r.type === "section"; } function dK(r) { return QM(r) ? kLe : VLe; } function vK(r) { if (QM(r)) { var e = 0, t = r.blocks.length, n = t > 1 || t > 0 && !r.noHeader; return M(r.blocks, function(i) { var a = vK(i); a >= e && (e = a + +(n && (!a || QM(i) && !i.noHeader))); }), e; } return 0; } function kLe(r, e, t, n) { var i = e.noHeader, a = GLe(vK(e)), o = [], s = e.blocks || []; Ze(!s || le(s)), s = s || []; var u = r.orderMode; if (e.sortBlocks && u) { s = s.slice(); var l = { valueAsc: "asc", valueDesc: "desc" }; if (Te(l, u)) { var c = new sK(l[u], null); s.sort(function(d, v) { return c.evaluate(d.sortParam, v.sortParam); }); } else u === "seriesDesc" && s.reverse(); } M(s, function(d, v) { var g = e.valueFormatter, m = dK(d)( g ? oe(oe({}, r), { valueFormatter: g }) : r, d, v > 0 ? a.html : 0, n ); m != null && o.push(m); }); var f = r.renderMode === "richText" ? o.join(a.richText) : e2(o.join(""), i ? t : a.html); if (i) return f; var h = YM(e.header, "ordinal", r.useUTC), p = pK(n, r.renderMode).nameStyle; return r.renderMode === "richText" ? gK(r, h, p) + a.richText + f : e2('
' + ns(h) + "
" + f, t); } function VLe(r, e, t, n) { var i = r.renderMode, a = e.noName, o = e.noValue, s = !e.markerType, u = e.name, l = r.useUTC, c = e.valueFormatter || r.valueFormatter || function(w) { return w = le(w) ? w : [w], ce(w, function(x, C) { return YM(x, le(p) ? p[C] : p, l); }); }; if (!(a && o)) { var f = s ? "" : r.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", i), h = a ? "" : YM(u, "ordinal", l), p = e.valueType, d = o ? [] : c(e.value), v = !s || !a, g = !s && a, m = pK(n, i), y = m.nameStyle, _ = m.valueStyle; return i === "richText" ? (s ? "" : f) + (a ? "" : gK(r, h, y)) + (o ? "" : HLe(r, d, v, g, _)) : e2((s ? "" : f) + (a ? "" : zLe(h, !s, y)) + (o ? "" : $Le(d, v, g, _)), t); } } function BG(r, e, t, n, i, a) { if (!!r) { var o = dK(r), s = { useUTC: i, renderMode: t, orderMode: n, markupStyleCreator: e, valueFormatter: r.valueFormatter }; return o(s, r, 0, a); } } function GLe(r) { return { html: FLe[r], richText: BLe[r] }; } function e2(r, e) { var t = '
', n = "margin: " + e + "px 0 0"; return '
' + r + t + "
"; } function zLe(r, e, t) { var n = e ? "margin-left:2px" : ""; return '' + ns(r) + ""; } function $Le(r, e, t, n) { var i = t ? "10px" : "20px", a = e ? "float:right;margin-left:" + i : ""; return r = le(r) ? r : [r], '' + ce(r, function(o) { return ns(o); }).join("  ") + ""; } function gK(r, e, t) { return r.markupStyleCreator.wrapRichTextStyle(e, t); } function HLe(r, e, t, n, i) { var a = [i], o = n ? 10 : 20; return t && a.push({ padding: [0, 0, 0, o], align: "right" }), r.markupStyleCreator.wrapRichTextStyle(le(e) ? e.join(" ") : e, a); } function mK(r, e) { var t = r.getData().getItemVisual(e, "style"), n = t[r.visualDrawType]; return Hd(n); } function yK(r, e) { var t = r.get("padding"); return t != null ? t : e === "richText" ? [8, 10] : 10; } var fA = function() { function r() { this.richTextStyles = {}, this._nextStyleNameId = mq(); } return r.prototype._generateStyleName = function() { return "__EC_aUTo_" + this._nextStyleNameId++; }, r.prototype.makeTooltipMarker = function(e, t, n) { var i = n === "richText" ? this._generateStyleName() : null, a = AAe({ color: t, type: e, renderMode: n, markerId: i }); return Se(a) ? a : (process.env.NODE_ENV !== "production" && Ze(i), this.richTextStyles[i] = a.style, a.content); }, r.prototype.wrapRichTextStyle = function(e, t) { var n = {}; le(t) ? M(t, function(a) { return oe(n, a); }) : oe(n, t); var i = this._generateStyleName(); return this.richTextStyles[i] = n, "{" + i + "|" + e + "}"; }, r; }(); function _K(r) { var e = r.series, t = r.dataIndex, n = r.multipleSeries, i = e.getData(), a = i.mapDimensionsAll("defaultedTooltip"), o = a.length, s = e.getRawValue(t), u = le(s), l = mK(e, t), c, f, h, p; if (o > 1 || u && !o) { var d = ULe(s, e, t, a, l); c = d.inlineValues, f = d.inlineValueTypes, h = d.blocks, p = d.inlineValues[0]; } else if (o) { var v = i.getDimensionInfo(a[0]); p = c = Rm(i, t, a[0]), f = v.type; } else p = c = u ? s[0] : s; var g = HN(e), m = g && e.name || "", y = i.getName(t), _ = n ? m : y; return Ji("section", { header: m, noHeader: n || !g, sortParam: p, blocks: [Ji("nameValue", { markerType: "item", markerColor: l, name: _, noName: !Bu(_), value: c, valueType: f })].concat(h || []) }); } function ULe(r, e, t, n, i) { var a = e.getData(), o = Kl(r, function(f, h, p) { var d = a.getDimensionInfo(p); return f = f || d && d.tooltip !== !1 && d.displayName != null; }, !1), s = [], u = [], l = []; n.length ? M(n, function(f) { c(Rm(a, t, f), f); }) : M(r, c); function c(f, h) { var p = a.getDimensionInfo(h); !p || p.otherDims.tooltip === !1 || (o ? l.push(Ji("nameValue", { markerType: "subItem", markerColor: i, name: p.displayName, value: f, valueType: p.type })) : (s.push(f), u.push(p.type))); } return { inlineValues: s, inlineValueTypes: u, blocks: l }; } var Af = Ut(); function Qx(r, e) { return r.getName(e) || r.getId(e); } var dS = "__universalTransitionEnabled", rP = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t._selectedDataIndicesMap = {}, t; } return e.prototype.init = function(t, n, i) { this.seriesIndex = this.componentIndex, this.dataTask = C_({ count: jLe, reset: YLe }), this.dataTask.context = { model: this }, this.mergeDefaultAndTheme(t, i); var a = Af(this).sourceManager = new fK(this); a.prepareSource(); var o = this.getInitialData(t, i); VG(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && Ze(o, "getInitialData returned invalid data."), Af(this).dataBeforeProcessed = o, kG(this), this._initSelectedMapFromData(o); }, e.prototype.mergeDefaultAndTheme = function(t, n) { var i = _1(this), a = i ? Py(t) : {}, o = this.subType; Rt.hasClass(o) && (o += "Series"), dt(t, n.getTheme().get(this.subType)), dt(t, this.getDefaultOption()), Vd(t, "label", ["show"]), this.fillDataTextStyle(t.data), i && Nh(t, a, i); }, e.prototype.mergeOption = function(t, n) { t = dt(this.option, t, !0), this.fillDataTextStyle(t.data); var i = _1(this); i && Nh(this.option, t, i); var a = Af(this).sourceManager; a.dirty(), a.prepareSource(); var o = this.getInitialData(t, n); VG(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, Af(this).dataBeforeProcessed = o, kG(this), this._initSelectedMapFromData(o); }, e.prototype.fillDataTextStyle = function(t) { if (t && !zo(t)) for (var n = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && Vd(t[i], "label", n); }, e.prototype.getInitialData = function(t, n) { }, e.prototype.appendData = function(t) { var n = this.getRawData(); n.appendData(t.data); }, e.prototype.getData = function(t) { var n = t2(this); if (n) { var i = n.context.data; return t == null ? i : i.getLinkedData(t); } else return Af(this).data; }, e.prototype.getAllData = function() { var t = this.getData(); return t && t.getLinkedDataAll ? t.getLinkedDataAll() : [{ data: t }]; }, e.prototype.setData = function(t) { var n = t2(this); if (n) { var i = n.context; i.outputData = t, n !== this.dataTask && (i.data = t); } Af(this).data = t; }, e.prototype.getEncode = function() { var t = this.get("encode", !0); if (t) return $e(t); }, e.prototype.getSourceManager = function() { return Af(this).sourceManager; }, e.prototype.getSource = function() { return this.getSourceManager().getSource(); }, e.prototype.getRawData = function() { return Af(this).dataBeforeProcessed; }, e.prototype.getColorBy = function() { var t = this.get("colorBy"); return t || "series"; }, e.prototype.isColorBySeries = function() { return this.getColorBy() === "series"; }, e.prototype.getBaseAxis = function() { var t = this.coordinateSystem; return t && t.getBaseAxis && t.getBaseAxis(); }, e.prototype.formatTooltip = function(t, n, i) { return _K({ series: this, dataIndex: t, multipleSeries: n }); }, e.prototype.isAnimationEnabled = function() { var t = this.ecModel; if (wr.node && !(t && t.ssr)) return !1; var n = this.getShallow("animation"); return n && this.getData().count() > this.getShallow("animationThreshold") && (n = !1), !!n; }, e.prototype.restoreData = function() { this.dataTask.dirty(); }, e.prototype.getColorFromPalette = function(t, n, i) { var a = this.ecModel, o = hF.prototype.getColorFromPalette.call(this, t, n, i); return o || (o = a.getColorFromPalette(t, n, i)), o; }, e.prototype.coordDimToDataDim = function(t) { return this.getRawData().mapDimensionsAll(t); }, e.prototype.getProgressive = function() { return this.get("progressive"); }, e.prototype.getProgressiveThreshold = function() { return this.get("progressiveThreshold"); }, e.prototype.select = function(t, n) { this._innerSelect(this.getData(n), t); }, e.prototype.unselect = function(t, n) { var i = this.option.selectedMap; if (!!i) { var a = this.option.selectedMode, o = this.getData(n); if (a === "series" || i === "all") { this.option.selectedMap = {}, this._selectedDataIndicesMap = {}; return; } for (var s = 0; s < t.length; s++) { var u = t[s], l = Qx(o, u); i[l] = !1, this._selectedDataIndicesMap[l] = -1; } } }, e.prototype.toggleSelect = function(t, n) { for (var i = [], a = 0; a < t.length; a++) i[0] = t[a], this.isSelected(t[a], n) ? this.unselect(i, n) : this.select(i, n); }, e.prototype.getSelectedDataIndices = function() { if (this.option.selectedMap === "all") return [].slice.call(this.getData().getIndices()); for (var t = this._selectedDataIndicesMap, n = At(t), i = [], a = 0; a < n.length; a++) { var o = t[n[a]]; o >= 0 && i.push(o); } return i; }, e.prototype.isSelected = function(t, n) { var i = this.option.selectedMap; if (!i) return !1; var a = this.getData(n); return (i === "all" || i[Qx(a, t)]) && !a.getItemModel(t).get(["select", "disabled"]); }, e.prototype.isUniversalTransitionEnabled = function() { if (this[dS]) return !0; var t = this.option.universalTransition; return t ? t === !0 ? !0 : t && t.enabled : !1; }, e.prototype._innerSelect = function(t, n) { var i, a, o = this.option, s = o.selectedMode, u = n.length; if (!(!s || !u)) { if (s === "series") o.selectedMap = "all"; else if (s === "multiple") { Xe(o.selectedMap) || (o.selectedMap = {}); for (var l = o.selectedMap, c = 0; c < u; c++) { var f = n[c], h = Qx(t, f); l[h] = !0, this._selectedDataIndicesMap[h] = t.getRawIndex(f); } } else if (s === "single" || s === !0) { var p = n[u - 1], h = Qx(t, p); o.selectedMap = (i = {}, i[h] = !0, i), this._selectedDataIndicesMap = (a = {}, a[h] = t.getRawIndex(p), a); } } }, e.prototype._initSelectedMapFromData = function(t) { if (!this.option.selectedMap) { var n = []; t.hasItemOption && t.each(function(i) { var a = t.getRawDataItem(i); a && a.selected && n.push(i); }), n.length > 0 && this._innerSelect(t, n); } }, e.registerClass = function(t) { return Rt.registerClass(t); }, e.protoInitialize = function() { var t = e.prototype; t.type = "series.__base__", t.seriesIndex = 0, t.ignoreStyleOnData = !1, t.hasSymbolVisual = !1, t.defaultSymbol = "circle", t.visualStyleAccessPath = "itemStyle", t.visualDrawType = "fill"; }(), e; }(Rt); gi(rP, gF); gi(rP, hF); Tq(rP, Rt); function kG(r) { var e = r.name; HN(r) || (r.name = WLe(r) || e); } function WLe(r) { var e = r.getRawData(), t = e.mapDimensionsAll("seriesName"), n = []; return M(t, function(i) { var a = e.getDimensionInfo(i); a.displayName && n.push(a.displayName); }), n.join(" "); } function jLe(r) { return r.model.getRawData().count(); } function YLe(r) { var e = r.model; return e.setData(e.getRawData().cloneShallow()), XLe; } function XLe(r, e) { e.outputData && r.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData); } function VG(r, e) { M(iE(r.CHANGABLE_METHODS, r.DOWNSAMPLE_METHODS), function(t) { r.wrapMethod(t, ut(qLe, e)); }); } function qLe(r, e) { var t = t2(r); return t && t.setOutputEnd((e || this).count()), e; } function t2(r) { var e = (r.ecModel || {}).scheduler, t = e && e.getPipeline(r.uid); if (t) { var n = t.currentTask; if (n) { var i = n.agentStubMap; i && (n = i.get(r.uid)); } return n; } } const bn = rP; var yF = function() { function r() { this.group = new rt(), this.uid = by("viewComponent"); } return r.prototype.init = function(e, t) { }, r.prototype.render = function(e, t, n, i) { }, r.prototype.dispose = function(e, t) { }, r.prototype.updateView = function(e, t, n, i) { }, r.prototype.updateLayout = function(e, t, n, i) { }, r.prototype.updateVisual = function(e, t, n, i) { }, r.prototype.toggleBlurSeries = function(e, t, n) { }, r.prototype.eachRendered = function(e) { var t = this.group; t && t.traverse(e); }, r; }(); WN(yF); BT(yF); const Gn = yF; function Dy() { var r = Ut(); return function(e) { var t = r(e), n = e.pipelineContext, i = !!t.large, a = !!t.progressiveRender, o = t.large = !!(n && n.large), s = t.progressiveRender = !!(n && n.progressiveRender); return (i !== o || a !== s) && "reset"; }; } var wK = Ut(), ZLe = Dy(), _F = function() { function r() { this.group = new rt(), this.uid = by("viewChart"), this.renderTask = C_({ plan: KLe, reset: JLe }), this.renderTask.context = { view: this }; } return r.prototype.init = function(e, t) { }, r.prototype.render = function(e, t, n, i) { if (process.env.NODE_ENV !== "production") throw new Error("render method must been implemented"); }, r.prototype.highlight = function(e, t, n, i) { var a = e.getData(i && i.dataType); if (!a) { process.env.NODE_ENV !== "production" && Oa("Unknown dataType " + i.dataType); return; } zG(a, i, "emphasis"); }, r.prototype.downplay = function(e, t, n, i) { var a = e.getData(i && i.dataType); if (!a) { process.env.NODE_ENV !== "production" && Oa("Unknown dataType " + i.dataType); return; } zG(a, i, "normal"); }, r.prototype.remove = function(e, t) { this.group.removeAll(); }, r.prototype.dispose = function(e, t) { }, r.prototype.updateView = function(e, t, n, i) { this.render(e, t, n, i); }, r.prototype.updateLayout = function(e, t, n, i) { this.render(e, t, n, i); }, r.prototype.updateVisual = function(e, t, n, i) { this.render(e, t, n, i); }, r.prototype.eachRendered = function(e) { Xh(this.group, e); }, r.markUpdateMethod = function(e, t) { wK(e).updateMethod = t; }, r.protoInitialize = function() { var e = r.prototype; e.type = "chart"; }(), r; }(); function GG(r, e, t) { r && Oh(r) && (e === "emphasis" ? af : of)(r, t); } function zG(r, e, t) { var n = Gd(r, e), i = e && e.highlightKey != null ? _Ie(e.highlightKey) : null; n != null ? M(jr(n), function(a) { GG(r.getItemGraphicEl(a), t, i); }) : r.eachItemGraphicEl(function(a) { GG(a, t, i); }); } WN(_F, ["dispose"]); BT(_F); function KLe(r) { return ZLe(r.model); } function JLe(r) { var e = r.model, t = r.ecModel, n = r.api, i = r.payload, a = e.pipelineContext.progressiveRender, o = r.view, s = i && wK(i).updateMethod, u = a ? "incrementalPrepareRender" : s && o[s] ? s : "render"; return u !== "render" && o[u](e, t, n, i), QLe[u]; } var QLe = { incrementalPrepareRender: { progress: function(r, e) { e.view.incrementalRender(r, e.model, e.ecModel, e.api, e.payload); } }, render: { forceFirstProgress: !0, progress: function(r, e) { e.view.render(e.model, e.ecModel, e.api, e.payload); } } }; const an = _F; var CE = "\0__throttleOriginMethod", $G = "\0__throttleRate", HG = "\0__throttleType"; function wF(r, e, t) { var n, i = 0, a = 0, o = null, s, u, l, c; e = e || 0; function f() { a = new Date().getTime(), o = null, r.apply(u, l || []); } var h = function() { for (var p = [], d = 0; d < arguments.length; d++) p[d] = arguments[d]; n = new Date().getTime(), u = this, l = p; var v = c || e, g = c || t; c = null, s = n - (g ? i : a) - v, clearTimeout(o), g ? o = setTimeout(f, v) : s >= 0 ? f() : o = setTimeout(f, -s), i = n; }; return h.clear = function() { o && (clearTimeout(o), o = null); }, h.debounceNextCall = function(p) { c = p; }, h; } function My(r, e, t, n) { var i = r[e]; if (!!i) { var a = i[CE] || i, o = i[HG], s = i[$G]; if (s !== t || o !== n) { if (t == null || !n) return r[e] = a; i = r[e] = wF(a, t, n === "debounce"), i[CE] = a, i[HG] = n, i[$G] = t; } return i; } } function x1(r, e) { var t = r[e]; t && t[CE] && (t.clear && t.clear(), r[e] = t[CE]); } var UG = Ut(), WG = { itemStyle: zd(bZ, !0), lineStyle: zd(EZ, !0) }, eDe = { lineStyle: "stroke", itemStyle: "fill" }; function xK(r, e) { var t = r.visualStyleMapper || WG[e]; return t || (console.warn("Unkown style type '" + e + "'."), WG.itemStyle); } function CK(r, e) { var t = r.visualDrawType || eDe[e]; return t || (console.warn("Unkown style type '" + e + "'."), "fill"); } var tDe = { createOnAllSeries: !0, performRawSeries: !0, reset: function(r, e) { var t = r.getData(), n = r.visualStyleAccessPath || "itemStyle", i = r.getModel(n), a = xK(r, n), o = a(i), s = i.getShallow("decal"); s && (t.setVisual("decal", s), s.dirty = !0); var u = CK(r, n), l = o[u], c = ze(l) ? l : null, f = o.fill === "auto" || o.stroke === "auto"; if (!o[u] || c || f) { var h = r.getColorFromPalette( r.name, null, e.getSeriesCount() ); o[u] || (o[u] = h, t.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || ze(o.fill) ? h : o.fill, o.stroke = o.stroke === "auto" || ze(o.stroke) ? h : o.stroke; } if (t.setVisual("style", o), t.setVisual("drawType", u), !e.isSeriesFiltered(r) && c) return t.setVisual("colorFromPalette", !1), { dataEach: function(p, d) { var v = r.getDataParams(d), g = oe({}, o); g[u] = c(v), p.setItemVisual(d, "style", g); } }; } }, c0 = new rn(), rDe = { createOnAllSeries: !0, performRawSeries: !0, reset: function(r, e) { if (!(r.ignoreStyleOnData || e.isSeriesFiltered(r))) { var t = r.getData(), n = r.visualStyleAccessPath || "itemStyle", i = xK(r, n), a = t.getVisual("drawType"); return { dataEach: t.hasItemOption ? function(o, s) { var u = o.getRawDataItem(s); if (u && u[n]) { c0.option = u[n]; var l = i(c0), c = o.ensureUniqueItemVisual(s, "style"); oe(c, l), c0.option.decal && (o.setItemVisual(s, "decal", c0.option.decal), c0.option.decal.dirty = !0), a in l && o.setItemVisual(s, "colorFromPalette", !1); } } : null }; } } }, nDe = { performRawSeries: !0, overallReset: function(r) { var e = $e(); r.eachSeries(function(t) { var n = t.getColorBy(); if (!t.isColorBySeries()) { var i = t.type + "-" + n, a = e.get(i); a || (a = {}, e.set(i, a)), UG(t).scope = a; } }), r.eachSeries(function(t) { if (!(t.isColorBySeries() || r.isSeriesFiltered(t))) { var n = t.getRawData(), i = {}, a = t.getData(), o = UG(t).scope, s = t.visualStyleAccessPath || "itemStyle", u = CK(t, s); a.each(function(l) { var c = a.getRawIndex(l); i[c] = l; }), n.each(function(l) { var c = i[l], f = a.getItemVisual(c, "colorFromPalette"); if (f) { var h = a.ensureUniqueItemVisual(c, "style"), p = n.getName(l) || l + "", d = n.count(); h[u] = t.getColorFromPalette(p, o, d); } }); } }); } }, eC = Math.PI; function iDe(r, e) { e = e || {}, qe(e, { text: "loading", textColor: "#000", fontSize: 12, fontWeight: "normal", fontStyle: "normal", fontFamily: "sans-serif", maskColor: "rgba(255, 255, 255, 0.8)", showSpinner: !0, color: "#5470c6", spinnerRadius: 10, lineWidth: 5, zlevel: 0 }); var t = new rt(), n = new Vt({ style: { fill: e.maskColor }, zlevel: e.zlevel, z: 1e4 }); t.add(n); var i = new Yt({ style: { text: e.text, fill: e.textColor, fontSize: e.fontSize, fontWeight: e.fontWeight, fontStyle: e.fontStyle, fontFamily: e.fontFamily }, zlevel: e.zlevel, z: 10001 }), a = new Vt({ style: { fill: "none" }, textContent: i, textConfig: { position: "right", distance: 10 }, zlevel: e.zlevel, z: 10001 }); t.add(a); var o; return e.showSpinner && (o = new eF({ shape: { startAngle: -eC / 2, endAngle: -eC / 2 + 0.1, r: e.spinnerRadius }, style: { stroke: e.color, lineCap: "round", lineWidth: e.lineWidth }, zlevel: e.zlevel, z: 10001 }), o.animateShape(!0).when(1e3, { endAngle: eC * 3 / 2 }).start("circularInOut"), o.animateShape(!0).when(1e3, { startAngle: eC * 3 / 2 }).delay(300).start("circularInOut"), t.add(o)), t.resize = function() { var s = i.getBoundingRect().width, u = e.showSpinner ? e.spinnerRadius : 0, l = (r.getWidth() - u * 2 - (e.showSpinner && s ? 10 : 0) - s) / 2 - (e.showSpinner && s ? 0 : 5 + s / 2) + (e.showSpinner ? 0 : s / 2) + (s ? 0 : u), c = r.getHeight() / 2; e.showSpinner && o.setShape({ cx: l, cy: c }), a.setShape({ x: l - u, y: c - u, width: u * 2, height: u * 2 }), n.setShape({ x: 0, y: 0, width: r.getWidth(), height: r.getHeight() }); }, t.resize(), t; } var aDe = function() { function r(e, t, n, i) { this._stageTaskMap = $e(), this.ecInstance = e, this.api = t, n = this._dataProcessorHandlers = n.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = n.concat(i); } return r.prototype.restoreData = function(e, t) { e.restoreData(t), this._stageTaskMap.each(function(n) { var i = n.overallTask; i && i.dirty(); }); }, r.prototype.getPerformArgs = function(e, t) { if (!!e.__pipeline) { var n = this._pipelineMap.get(e.__pipeline.id), i = n.context, a = !t && n.progressiveEnabled && (!i || i.progressiveRender) && e.__idxInPipeline > n.blockIndex, o = a ? n.step : null, s = i && i.modDataCount, u = s != null ? Math.ceil(s / o) : null; return { step: o, modBy: u, modDataCount: s }; } }, r.prototype.getPipeline = function(e) { return this._pipelineMap.get(e); }, r.prototype.updateStreamModes = function(e, t) { var n = this._pipelineMap.get(e.uid), i = e.getData(), a = i.count(), o = n.progressiveEnabled && t.incrementalPrepareRender && a >= n.threshold, s = e.get("large") && a >= e.get("largeThreshold"), u = e.get("progressiveChunkMode") === "mod" ? a : null; e.pipelineContext = n.context = { progressiveRender: o, modDataCount: u, large: s }; }, r.prototype.restorePipelines = function(e) { var t = this, n = t._pipelineMap = $e(); e.eachSeries(function(i) { var a = i.getProgressive(), o = i.uid; n.set(o, { id: o, head: null, tail: null, threshold: i.getProgressiveThreshold(), progressiveEnabled: a && !(i.preventIncremental && i.preventIncremental()), blockIndex: -1, step: Math.round(a || 700), count: 0 }), t._pipe(i, i.dataTask); }); }, r.prototype.prepareStageTasks = function() { var e = this._stageTaskMap, t = this.api.getModel(), n = this.api; M(this._allHandlers, function(i) { var a = e.get(i.uid) || e.set(i.uid, {}), o = ""; process.env.NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), Ze(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, a, t, n), i.overallReset && this._createOverallStageTask(i, a, t, n); }, this); }, r.prototype.prepareView = function(e, t, n, i) { var a = e.renderTask, o = a.context; o.model = t, o.ecModel = n, o.api = i, a.__block = !e.incrementalPrepareRender, this._pipe(t, a); }, r.prototype.performDataProcessorTasks = function(e, t) { this._performStageTasks(this._dataProcessorHandlers, e, t, { block: !0 }); }, r.prototype.performVisualTasks = function(e, t, n) { this._performStageTasks(this._visualHandlers, e, t, n); }, r.prototype._performStageTasks = function(e, t, n, i) { i = i || {}; var a = !1, o = this; M(e, function(u, l) { if (!(i.visualType && i.visualType !== u.visualType)) { var c = o._stageTaskMap.get(u.uid), f = c.seriesTaskMap, h = c.overallTask; if (h) { var p, d = h.agentStubMap; d.each(function(g) { s(i, g) && (g.dirty(), p = !0); }), p && h.dirty(), o.updatePayload(h, n); var v = o.getPerformArgs(h, i.block); d.each(function(g) { g.perform(v); }), h.perform(v) && (a = !0); } else f && f.each(function(g, m) { s(i, g) && g.dirty(); var y = o.getPerformArgs(g, i.block); y.skip = !u.performRawSeries && t.isSeriesFiltered(g.context.model), o.updatePayload(g, n), g.perform(y) && (a = !0); }); } }); function s(u, l) { return u.setDirty && (!u.dirtyMap || u.dirtyMap.get(l.__pipeline.id)); } this.unfinished = a || this.unfinished; }, r.prototype.performSeriesTasks = function(e) { var t; e.eachSeries(function(n) { t = n.dataTask.perform() || t; }), this.unfinished = t || this.unfinished; }, r.prototype.plan = function() { this._pipelineMap.each(function(e) { var t = e.tail; do { if (t.__block) { e.blockIndex = t.__idxInPipeline; break; } t = t.getUpstream(); } while (t); }); }, r.prototype.updatePayload = function(e, t) { t !== "remain" && (e.context.payload = t); }, r.prototype._createSeriesStageTask = function(e, t, n, i) { var a = this, o = t.seriesTaskMap, s = t.seriesTaskMap = $e(), u = e.seriesType, l = e.getTargetSeries; e.createOnAllSeries ? n.eachRawSeries(c) : u ? n.eachRawSeriesByType(u, c) : l && l(n, i).each(c); function c(f) { var h = f.uid, p = s.set(h, o && o.get(h) || C_({ plan: cDe, reset: fDe, count: pDe })); p.context = { model: f, ecModel: n, api: i, useClearVisual: e.isVisual && !e.isLayout, plan: e.plan, reset: e.reset, scheduler: a }, a._pipe(f, p); } }, r.prototype._createOverallStageTask = function(e, t, n, i) { var a = this, o = t.overallTask = t.overallTask || C_({ reset: oDe }); o.context = { ecModel: n, api: i, overallReset: e.overallReset, scheduler: a }; var s = o.agentStubMap, u = o.agentStubMap = $e(), l = e.seriesType, c = e.getTargetSeries, f = !0, h = !1, p = ""; process.env.NODE_ENV !== "production" && (p = '"createOnAllSeries" do not supported for "overallReset", becuase it will block all streams.'), Ze(!e.createOnAllSeries, p), l ? n.eachRawSeriesByType(l, d) : c ? c(n, i).each(d) : (f = !1, M(n.getSeries(), d)); function d(v) { var g = v.uid, m = u.set(g, s && s.get(g) || (h = !0, C_({ reset: sDe, onDirty: lDe }))); m.context = { model: v, overallProgress: f }, m.agent = o, m.__block = f, a._pipe(v, m); } h && o.dirty(); }, r.prototype._pipe = function(e, t) { var n = e.uid, i = this._pipelineMap.get(n); !i.head && (i.head = t), i.tail && i.tail.pipe(t), i.tail = t, t.__idxInPipeline = i.count++, t.__pipeline = i; }, r.wrapStageHandler = function(e, t) { return ze(e) && (e = { overallReset: e, seriesType: dDe(e) }), e.uid = by("stageHandler"), t && (e.visualType = t), e; }, r; }(); function oDe(r) { r.overallReset(r.ecModel, r.api, r.payload); } function sDe(r) { return r.overallProgress && uDe; } function uDe() { this.agent.dirty(), this.getDownstream().dirty(); } function lDe() { this.agent && this.agent.dirty(); } function cDe(r) { return r.plan ? r.plan(r.model, r.ecModel, r.api, r.payload) : null; } function fDe(r) { r.useClearVisual && r.data.clearAllVisual(); var e = r.resetDefines = jr(r.reset(r.model, r.ecModel, r.api, r.payload)); return e.length > 1 ? ce(e, function(t, n) { return SK(n); }) : hDe; } var hDe = SK(0); function SK(r) { return function(e, t) { var n = t.data, i = t.resetDefines[r]; if (i && i.dataEach) for (var a = e.start; a < e.end; a++) i.dataEach(n, a); else i && i.progress && i.progress(e, n); }; } function pDe(r) { return r.data.count(); } function dDe(r) { SE = null; try { r(C1, EK); } catch { } return SE; } var C1 = {}, EK = {}, SE; bK(C1, qZ); bK(EK, ZZ); C1.eachSeriesByType = C1.eachRawSeriesByType = function(r) { SE = r; }; C1.eachComponent = function(r) { r.mainType === "series" && r.subType && (SE = r.subType); }; function bK(r, e) { for (var t in e.prototype) r[t] = ci; } const TK = aDe; var jG = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"]; const vDe = { color: jG, colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], jG] }; var io = "#B9B8CE", YG = "#100C2A", tC = function() { return { axisLine: { lineStyle: { color: io } }, splitLine: { lineStyle: { color: "#484753" } }, splitArea: { areaStyle: { color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"] } }, minorSplitLine: { lineStyle: { color: "#20203B" } } }; }, XG = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], PK = { darkMode: !0, color: XG, backgroundColor: YG, axisPointer: { lineStyle: { color: "#817f91" }, crossStyle: { color: "#817f91" }, label: { color: "#fff" } }, legend: { textStyle: { color: io } }, textStyle: { color: io }, title: { textStyle: { color: "#EEF1FA" }, subtextStyle: { color: "#B9B8CE" } }, toolbox: { iconStyle: { borderColor: io } }, dataZoom: { borderColor: "#71708A", textStyle: { color: io }, brushStyle: { color: "rgba(135,163,206,0.3)" }, handleStyle: { color: "#353450", borderColor: "#C5CBE3" }, moveHandleStyle: { color: "#B0B6C3", opacity: 0.3 }, fillerColor: "rgba(135,163,206,0.2)", emphasis: { handleStyle: { borderColor: "#91B7F2", color: "#4D587D" }, moveHandleStyle: { color: "#636D9A", opacity: 0.7 } }, dataBackground: { lineStyle: { color: "#71708A", width: 1 }, areaStyle: { color: "#71708A" } }, selectedDataBackground: { lineStyle: { color: "#87A3CE" }, areaStyle: { color: "#87A3CE" } } }, visualMap: { textStyle: { color: io } }, timeline: { lineStyle: { color: io }, label: { color: io }, controlStyle: { color: io, borderColor: io } }, calendar: { itemStyle: { color: YG }, dayLabel: { color: io }, monthLabel: { color: io }, yearLabel: { color: io } }, timeAxis: tC(), logAxis: tC(), valueAxis: tC(), categoryAxis: tC(), line: { symbol: "circle" }, graph: { color: XG }, gauge: { title: { color: io }, axisLine: { lineStyle: { color: [[1, "rgba(207,212,219,0.2)"]] } }, axisLabel: { color: io }, detail: { color: "#EEF1FA" } }, candlestick: { itemStyle: { color: "#f64e56", color0: "#54ea92", borderColor: "#f64e56", borderColor0: "#54ea92" } } }; PK.categoryAxis.splitLine.show = !1; const gDe = PK; var mDe = function() { function r() { } return r.prototype.normalizeQuery = function(e) { var t = {}, n = {}, i = {}; if (Se(e)) { var a = Nl(e); t.mainType = a.main || null, t.subType = a.sub || null; } else { var o = ["Index", "Name", "Id"], s = { name: 1, dataIndex: 1, dataType: 1 }; M(e, function(u, l) { for (var c = !1, f = 0; f < o.length; f++) { var h = o[f], p = l.lastIndexOf(h); if (p > 0 && p === l.length - h.length) { var d = l.slice(0, p); d !== "data" && (t.mainType = d, t[h.toLowerCase()] = u, c = !0); } } s.hasOwnProperty(l) && (n[l] = u, c = !0), c || (i[l] = u); }); } return { cptQuery: t, dataQuery: n, otherQuery: i }; }, r.prototype.filter = function(e, t) { var n = this.eventInfo; if (!n) return !0; var i = n.targetEl, a = n.packedEvent, o = n.model, s = n.view; if (!o || !s) return !0; var u = t.cptQuery, l = t.dataQuery; return c(u, o, "mainType") && c(u, o, "subType") && c(u, o, "index", "componentIndex") && c(u, o, "name") && c(u, o, "id") && c(l, a, "name") && c(l, a, "dataIndex") && c(l, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, t.otherQuery, i, a)); function c(f, h, p, d) { return f[p] == null || h[d || p] === f[p]; } }, r.prototype.afterTrigger = function() { this.eventInfo = null; }, r; }(), r2 = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], qG = r2.concat(["symbolKeepAspect"]), yDe = { createOnAllSeries: !0, performRawSeries: !0, reset: function(r, e) { var t = r.getData(); if (r.legendIcon && t.setVisual("legendIcon", r.legendIcon), !r.hasSymbolVisual) return; for (var n = {}, i = {}, a = !1, o = 0; o < r2.length; o++) { var s = r2[o], u = r.get(s); ze(u) ? (a = !0, i[s] = u) : n[s] = u; } if (n.symbol = n.symbol || r.defaultSymbol, t.setVisual(oe({ legendIcon: r.legendIcon || n.symbol, symbolKeepAspect: r.get("symbolKeepAspect") }, n)), e.isSeriesFiltered(r)) return; var l = At(i); function c(f, h) { for (var p = r.getRawValue(h), d = r.getDataParams(h), v = 0; v < l.length; v++) { var g = l[v]; f.setItemVisual(h, g, i[g](p, d)); } } return { dataEach: a ? c : null }; } }, _De = { createOnAllSeries: !0, performRawSeries: !0, reset: function(r, e) { if (!r.hasSymbolVisual || e.isSeriesFiltered(r)) return; var t = r.getData(); function n(i, a) { for (var o = i.getItemModel(a), s = 0; s < qG.length; s++) { var u = qG[s], l = o.getShallow(u, !0); l != null && i.setItemVisual(a, u, l); } } return { dataEach: t.hasItemOption ? n : null }; } }; function xF(r, e, t) { switch (t) { case "color": var n = r.getItemVisual(e, "style"); return n[r.getVisual("drawType")]; case "opacity": return r.getItemVisual(e, "style").opacity; case "symbol": case "symbolSize": case "liftZ": return r.getItemVisual(e, t); default: process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + t); } } function kw(r, e) { switch (e) { case "color": var t = r.getVisual("style"); return t[r.getVisual("drawType")]; case "opacity": return r.getVisual("style").opacity; case "symbol": case "symbolSize": case "liftZ": return r.getVisual(e); default: process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e); } } function IK(r, e, t, n) { switch (t) { case "color": var i = r.ensureUniqueItemVisual(e, "style"); i[r.getVisual("drawType")] = n, r.setItemVisual(e, "colorFromPalette", !1); break; case "opacity": r.ensureUniqueItemVisual(e, "style").opacity = n; break; case "symbol": case "symbolSize": case "liftZ": r.setItemVisual(e, t, n); break; default: process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + t); } } function AK(r, e) { function t(n, i) { var a = []; return n.eachComponent({ mainType: "series", subType: r, query: i }, function(o) { a.push(o.seriesIndex); }), a; } M([[r + "ToggleSelect", "toggleSelect"], [r + "Select", "select"], [r + "UnSelect", "unselect"]], function(n) { e(n[0], function(i, a, o) { i = oe({}, i), process.env.NODE_ENV !== "production" && ii(i.type, n[1]), o.dispatchAction(oe(i, { type: n[1], seriesIndex: t(a, i) })); }); }); } function Uv(r, e, t, n, i) { var a = r + e; t.isSilent(a) || (process.env.NODE_ENV !== "production" && rl("event " + a + " is deprecated."), n.eachComponent({ mainType: "series", subType: "pie" }, function(o) { for (var s = o.seriesIndex, u = o.option.selectedMap, l = i.selected, c = 0; c < l.length; c++) if (l[c].seriesIndex === s) { var f = o.getData(), h = Gd(f, i.fromActionPayload); t.trigger(a, { type: a, seriesId: o.id, name: le(h) ? f.getName(h[0]) : f.getName(h), selected: Se(u) ? u : oe({}, u) }); } })); } function wDe(r, e, t) { r.on("selectchanged", function(n) { var i = t.getModel(); n.isFromClick ? (Uv("map", "selectchanged", e, i, n), Uv("pie", "selectchanged", e, i, n)) : n.fromAction === "select" ? (Uv("map", "selected", e, i, n), Uv("pie", "selected", e, i, n)) : n.fromAction === "unselect" && (Uv("map", "unselected", e, i, n), Uv("pie", "unselected", e, i, n)); }); } function Og(r, e, t) { for (var n; r && !(e(r) && (n = r, t)); ) r = r.__hostTarget || r.parent; return n; } var xDe = Math.round(Math.random() * 9), CDe = typeof Object.defineProperty == "function", SDe = function() { function r() { this._id = "__ec_inner_" + xDe++; } return r.prototype.get = function(e) { return this._guard(e)[this._id]; }, r.prototype.set = function(e, t) { var n = this._guard(e); return CDe ? Object.defineProperty(n, this._id, { value: t, enumerable: !1, configurable: !0 }) : n[this._id] = t, this; }, r.prototype.delete = function(e) { return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1; }, r.prototype.has = function(e) { return !!this._guard(e)[this._id]; }, r.prototype._guard = function(e) { if (e !== Object(e)) throw TypeError("Value of WeakMap is not a non-null object."); return e; }, r; }(); const EDe = SDe; var bDe = Tt.extend({ type: "triangle", shape: { cx: 0, cy: 0, width: 0, height: 0 }, buildPath: function(r, e) { var t = e.cx, n = e.cy, i = e.width / 2, a = e.height / 2; r.moveTo(t, n - a), r.lineTo(t + i, n + a), r.lineTo(t - i, n + a), r.closePath(); } }), TDe = Tt.extend({ type: "diamond", shape: { cx: 0, cy: 0, width: 0, height: 0 }, buildPath: function(r, e) { var t = e.cx, n = e.cy, i = e.width / 2, a = e.height / 2; r.moveTo(t, n - a), r.lineTo(t + i, n), r.lineTo(t, n + a), r.lineTo(t - i, n), r.closePath(); } }), PDe = Tt.extend({ type: "pin", shape: { x: 0, y: 0, width: 0, height: 0 }, buildPath: function(r, e) { var t = e.x, n = e.y, i = e.width / 5 * 3, a = Math.max(i, e.height), o = i / 2, s = o * o / (a - o), u = n - a + o + s, l = Math.asin(s / o), c = Math.cos(l) * o, f = Math.sin(l), h = Math.cos(l), p = o * 0.6, d = o * 0.7; r.moveTo(t - c, u + s), r.arc(t, u, o, Math.PI - l, Math.PI * 2 + l), r.bezierCurveTo(t + c - f * p, u + s + h * p, t, n - d, t, n), r.bezierCurveTo(t, n - d, t - c + f * p, u + s + h * p, t - c, u + s), r.closePath(); } }), IDe = Tt.extend({ type: "arrow", shape: { x: 0, y: 0, width: 0, height: 0 }, buildPath: function(r, e) { var t = e.height, n = e.width, i = e.x, a = e.y, o = n / 3 * 2; r.moveTo(i, a), r.lineTo(i + o, a + t), r.lineTo(i, a + t / 4 * 3), r.lineTo(i - o, a + t), r.lineTo(i, a), r.closePath(); } }), ADe = { line: fa, rect: Vt, roundRect: Vt, square: Vt, circle: rc, diamond: TDe, pin: PDe, arrow: IDe, triangle: bDe }, LDe = { line: function(r, e, t, n, i) { i.x1 = r, i.y1 = e + n / 2, i.x2 = r + t, i.y2 = e + n / 2; }, rect: function(r, e, t, n, i) { i.x = r, i.y = e, i.width = t, i.height = n; }, roundRect: function(r, e, t, n, i) { i.x = r, i.y = e, i.width = t, i.height = n, i.r = Math.min(t, n) / 4; }, square: function(r, e, t, n, i) { var a = Math.min(t, n); i.x = r, i.y = e, i.width = a, i.height = a; }, circle: function(r, e, t, n, i) { i.cx = r + t / 2, i.cy = e + n / 2, i.r = Math.min(t, n) / 2; }, diamond: function(r, e, t, n, i) { i.cx = r + t / 2, i.cy = e + n / 2, i.width = t, i.height = n; }, pin: function(r, e, t, n, i) { i.x = r + t / 2, i.y = e + n / 2, i.width = t, i.height = n; }, arrow: function(r, e, t, n, i) { i.x = r + t / 2, i.y = e + n / 2, i.width = t, i.height = n; }, triangle: function(r, e, t, n, i) { i.cx = r + t / 2, i.cy = e + n / 2, i.width = t, i.height = n; } }, EE = {}; M(ADe, function(r, e) { EE[e] = new r(); }); var DDe = Tt.extend({ type: "symbol", shape: { symbolType: "", x: 0, y: 0, width: 0, height: 0 }, calculateTextPosition: function(r, e, t) { var n = fE(r, e, t), i = this.shape; return i && i.symbolType === "pin" && e.position === "inside" && (n.y = t.y + t.height * 0.4), n; }, buildPath: function(r, e, t) { var n = e.symbolType; if (n !== "none") { var i = EE[n]; i || (n = "rect", i = EE[n]), LDe[n](e.x, e.y, e.width, e.height, i.shape), i.buildPath(r, i.shape, t); } } }); function MDe(r, e) { if (this.type !== "image") { var t = this.style; this.__isEmptyBrush ? (t.stroke = r, t.fill = e || "#fff", t.lineWidth = 2) : this.shape.symbolType === "line" ? t.stroke = r : t.fill = r, this.markRedraw(); } } function vi(r, e, t, n, i, a, o) { var s = r.indexOf("empty") === 0; s && (r = r.substr(5, 1).toLowerCase() + r.substr(6)); var u; return r.indexOf("image://") === 0 ? u = vZ(r.slice(8), new gt(e, t, n, i), o ? "center" : "cover") : r.indexOf("path://") === 0 ? u = WT(r.slice(7), {}, new gt(e, t, n, i), o ? "center" : "cover") : u = new DDe({ shape: { symbolType: r, x: e, y: t, width: n, height: i } }), u.__isEmptyBrush = s, u.setColor = MDe, a && u.setColor(a), u; } function Vw(r) { return le(r) || (r = [+r, +r]), [r[0] || 0, r[1] || 0]; } function Oy(r, e) { if (r != null) return le(r) || (r = [r, r]), [ye(r[0], e[0]) || 0, ye(wt(r[1], r[0]), e[1]) || 0]; } function jp(r) { return isFinite(r); } function ODe(r, e, t) { var n = e.x == null ? 0 : e.x, i = e.x2 == null ? 1 : e.x2, a = e.y == null ? 0 : e.y, o = e.y2 == null ? 0 : e.y2; e.global || (n = n * t.width + t.x, i = i * t.width + t.x, a = a * t.height + t.y, o = o * t.height + t.y), n = jp(n) ? n : 0, i = jp(i) ? i : 1, a = jp(a) ? a : 0, o = jp(o) ? o : 0; var s = r.createLinearGradient(n, a, i, o); return s; } function RDe(r, e, t) { var n = t.width, i = t.height, a = Math.min(n, i), o = e.x == null ? 0.5 : e.x, s = e.y == null ? 0.5 : e.y, u = e.r == null ? 0.5 : e.r; e.global || (o = o * n + t.x, s = s * i + t.y, u = u * a), o = jp(o) ? o : 0.5, s = jp(s) ? s : 0.5, u = u >= 0 && jp(u) ? u : 0.5; var l = r.createRadialGradient(o, s, 0, o, s, u); return l; } function n2(r, e, t) { for (var n = e.type === "radial" ? RDe(r, e, t) : ODe(r, e, t), i = e.colorStops, a = 0; a < i.length; a++) n.addColorStop(i[a].offset, i[a].color); return n; } function NDe(r, e) { if (r === e || !r && !e) return !1; if (!r || !e || r.length !== e.length) return !0; for (var t = 0; t < r.length; t++) if (r[t] !== e[t]) return !0; return !1; } function rC(r) { return parseInt(r, 10); } function Rg(r, e, t) { var n = ["width", "height"][e], i = ["clientWidth", "clientHeight"][e], a = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e]; if (t[n] != null && t[n] !== "auto") return parseFloat(t[n]); var s = document.defaultView.getComputedStyle(r); return (r[i] || rC(s[n]) || rC(r.style[n])) - (rC(s[a]) || 0) - (rC(s[o]) || 0) | 0; } function FDe(r, e) { return !r || r === "solid" || !(e > 0) ? null : r === "dashed" ? [4 * e, 2 * e] : r === "dotted" ? [e] : $t(r) ? [r] : le(r) ? r : null; } function CF(r) { var e = r.style, t = e.lineDash && e.lineWidth > 0 && FDe(e.lineDash, e.lineWidth), n = e.lineDashOffset; if (t) { var i = e.strokeNoScale && r.getLineScale ? r.getLineScale() : 1; i && i !== 1 && (t = ce(t, function(a) { return a / i; }), n /= i); } return [t, n]; } var BDe = new tc(!0); function bE(r) { var e = r.stroke; return !(e == null || e === "none" || !(r.lineWidth > 0)); } function ZG(r) { return typeof r == "string" && r !== "none"; } function TE(r) { var e = r.fill; return e != null && e !== "none"; } function KG(r, e) { if (e.fillOpacity != null && e.fillOpacity !== 1) { var t = r.globalAlpha; r.globalAlpha = e.fillOpacity * e.opacity, r.fill(), r.globalAlpha = t; } else r.fill(); } function JG(r, e) { if (e.strokeOpacity != null && e.strokeOpacity !== 1) { var t = r.globalAlpha; r.globalAlpha = e.strokeOpacity * e.opacity, r.stroke(), r.globalAlpha = t; } else r.stroke(); } function i2(r, e, t) { var n = jN(e.image, e.__image, t); if (kT(n)) { var i = r.createPattern(n, e.repeat || "repeat"); if (typeof DOMMatrix == "function" && i && i.setTransform) { var a = new DOMMatrix(); a.translateSelf(e.x || 0, e.y || 0), a.rotateSelf(0, 0, (e.rotation || 0) * rS), a.scaleSelf(e.scaleX || 1, e.scaleY || 1), i.setTransform(a); } return i; } } function kDe(r, e, t, n) { var i, a = bE(t), o = TE(t), s = t.strokePercent, u = s < 1, l = !e.path; (!e.silent || u) && l && e.createPathProxy(); var c = e.path || BDe, f = e.__dirty; if (!n) { var h = t.fill, p = t.stroke, d = o && !!h.colorStops, v = a && !!p.colorStops, g = o && !!h.image, m = a && !!p.image, y = void 0, _ = void 0, w = void 0, x = void 0, C = void 0; (d || v) && (C = e.getBoundingRect()), d && (y = f ? n2(r, h, C) : e.__canvasFillGradient, e.__canvasFillGradient = y), v && (_ = f ? n2(r, p, C) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = _), g && (w = f || !e.__canvasFillPattern ? i2(r, h, e) : e.__canvasFillPattern, e.__canvasFillPattern = w), m && (x = f || !e.__canvasStrokePattern ? i2(r, p, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = w), d ? r.fillStyle = y : g && (w ? r.fillStyle = w : o = !1), v ? r.strokeStyle = _ : m && (x ? r.strokeStyle = x : a = !1); } var S = e.getGlobalScale(); c.setScale(S[0], S[1], e.segmentIgnoreThreshold); var b, E; r.setLineDash && t.lineDash && (i = CF(e), b = i[0], E = i[1]); var T = !0; (l || f & vg) && (c.setDPR(r.dpr), u ? c.setContext(null) : (c.setContext(r), T = !1), c.reset(), e.buildPath(c, e.shape, n), c.toStatic(), e.pathUpdated()), T && c.rebuildPath(r, u ? s : 1), b && (r.setLineDash(b), r.lineDashOffset = E), n || (t.strokeFirst ? (a && JG(r, t), o && KG(r, t)) : (o && KG(r, t), a && JG(r, t))), b && r.setLineDash([]); } function VDe(r, e, t) { var n = e.__image = jN(t.image, e.__image, e, e.onload); if (!(!n || !kT(n))) { var i = t.x || 0, a = t.y || 0, o = e.getWidth(), s = e.getHeight(), u = n.width / n.height; if (o == null && s != null ? o = s * u : s == null && o != null ? s = o / u : o == null && s == null && (o = n.width, s = n.height), t.sWidth && t.sHeight) { var l = t.sx || 0, c = t.sy || 0; r.drawImage(n, l, c, t.sWidth, t.sHeight, i, a, o, s); } else if (t.sx && t.sy) { var l = t.sx, c = t.sy, f = o - l, h = s - c; r.drawImage(n, l, c, f, h, i, a, o, s); } else r.drawImage(n, i, a, o, s); } } function GDe(r, e, t) { var n, i = t.text; if (i != null && (i += ""), i) { r.font = t.font || Dh, r.textAlign = t.textAlign, r.textBaseline = t.textBaseline; var a = void 0, o = void 0; r.setLineDash && t.lineDash && (n = CF(e), a = n[0], o = n[1]), a && (r.setLineDash(a), r.lineDashOffset = o), t.strokeFirst ? (bE(t) && r.strokeText(i, t.x, t.y), TE(t) && r.fillText(i, t.x, t.y)) : (TE(t) && r.fillText(i, t.x, t.y), bE(t) && r.strokeText(i, t.x, t.y)), a && r.setLineDash([]); } } var QG = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], e4 = [ ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10] ]; function LK(r, e, t, n, i) { var a = !1; if (!n && (t = t || {}, e === t)) return !1; if (n || e.opacity !== t.opacity) { Do(r, i), a = !0; var o = Math.max(Math.min(e.opacity, 1), 0); r.globalAlpha = isNaN(o) ? ed.opacity : o; } (n || e.blend !== t.blend) && (a || (Do(r, i), a = !0), r.globalCompositeOperation = e.blend || ed.blend); for (var s = 0; s < QG.length; s++) { var u = QG[s]; (n || e[u] !== t[u]) && (a || (Do(r, i), a = !0), r[u] = r.dpr * (e[u] || 0)); } return (n || e.shadowColor !== t.shadowColor) && (a || (Do(r, i), a = !0), r.shadowColor = e.shadowColor || ed.shadowColor), a; } function t4(r, e, t, n, i) { var a = S1(e, i.inHover), o = n ? null : t && S1(t, i.inHover) || {}; if (a === o) return !1; var s = LK(r, a, o, n, i); if ((n || a.fill !== o.fill) && (s || (Do(r, i), s = !0), ZG(a.fill) && (r.fillStyle = a.fill)), (n || a.stroke !== o.stroke) && (s || (Do(r, i), s = !0), ZG(a.stroke) && (r.strokeStyle = a.stroke)), (n || a.opacity !== o.opacity) && (s || (Do(r, i), s = !0), r.globalAlpha = a.opacity == null ? 1 : a.opacity), e.hasStroke()) { var u = a.lineWidth, l = u / (a.strokeNoScale && e.getLineScale ? e.getLineScale() : 1); r.lineWidth !== l && (s || (Do(r, i), s = !0), r.lineWidth = l); } for (var c = 0; c < e4.length; c++) { var f = e4[c], h = f[0]; (n || a[h] !== o[h]) && (s || (Do(r, i), s = !0), r[h] = a[h] || f[1]); } return s; } function zDe(r, e, t, n, i) { return LK(r, S1(e, i.inHover), t && S1(t, i.inHover), n, i); } function DK(r, e) { var t = e.transform, n = r.dpr || 1; t ? r.setTransform(n * t[0], n * t[1], n * t[2], n * t[3], n * t[4], n * t[5]) : r.setTransform(n, 0, 0, n, 0, 0); } function $De(r, e, t) { for (var n = !1, i = 0; i < r.length; i++) { var a = r[i]; n = n || a.isZeroArea(), DK(e, a), e.beginPath(), a.buildPath(e, a.shape), e.clip(); } t.allClipped = n; } function HDe(r, e) { return r && e ? r[0] !== e[0] || r[1] !== e[1] || r[2] !== e[2] || r[3] !== e[3] || r[4] !== e[4] || r[5] !== e[5] : !(!r && !e); } var r4 = 1, n4 = 2, i4 = 3, a4 = 4; function UDe(r) { var e = TE(r), t = bE(r); return !(r.lineDash || !(+e ^ +t) || e && typeof r.fill != "string" || t && typeof r.stroke != "string" || r.strokePercent < 1 || r.strokeOpacity < 1 || r.fillOpacity < 1); } function Do(r, e) { e.batchFill && r.fill(), e.batchStroke && r.stroke(), e.batchFill = "", e.batchStroke = ""; } function S1(r, e) { return e && r.__hoverStyle || r.style; } function MK(r, e) { Yp(r, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0); } function Yp(r, e, t, n) { var i = e.transform; if (!e.shouldBePainted(t.viewWidth, t.viewHeight, !1, !1)) { e.__dirty &= ~as, e.__isRendered = !1; return; } var a = e.__clipPaths, o = t.prevElClipPaths, s = !1, u = !1; if ((!o || NDe(a, o)) && (o && o.length && (Do(r, t), r.restore(), u = s = !0, t.prevElClipPaths = null, t.allClipped = !1, t.prevEl = null), a && a.length && (Do(r, t), r.save(), $De(a, r, t), s = !0), t.prevElClipPaths = a), t.allClipped) { e.__isRendered = !1; return; } e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush(); var l = t.prevEl; l || (u = s = !0); var c = e instanceof Tt && e.autoBatch && UDe(e.style); s || HDe(i, l.transform) ? (Do(r, t), DK(r, e)) : c || Do(r, t); var f = S1(e, t.inHover); e instanceof Tt ? (t.lastDrawType !== r4 && (u = !0, t.lastDrawType = r4), t4(r, e, l, u, t), (!c || !t.batchFill && !t.batchStroke) && r.beginPath(), kDe(r, e, f, c), c && (t.batchFill = f.fill || "", t.batchStroke = f.stroke || "")) : e instanceof d1 ? (t.lastDrawType !== i4 && (u = !0, t.lastDrawType = i4), t4(r, e, l, u, t), GDe(r, e, f)) : e instanceof Ba ? (t.lastDrawType !== n4 && (u = !0, t.lastDrawType = n4), zDe(r, e, l, u, t), VDe(r, e, f)) : e.getTemporalDisplayables && (t.lastDrawType !== a4 && (u = !0, t.lastDrawType = a4), WDe(r, e, t)), c && n && Do(r, t), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), t.prevEl = e, e.__dirty = 0, e.__isRendered = !0; } function WDe(r, e, t) { var n = e.getDisplayables(), i = e.getTemporalDisplayables(); r.save(); var a = { prevElClipPaths: null, prevEl: null, allClipped: !1, viewWidth: t.viewWidth, viewHeight: t.viewHeight, inHover: t.inHover }, o, s; for (o = e.getCursor(), s = n.length; o < s; o++) { var u = n[o]; u.beforeBrush && u.beforeBrush(), u.innerBeforeBrush(), Yp(r, u, a, o === s - 1), u.innerAfterBrush(), u.afterBrush && u.afterBrush(), a.prevEl = u; } for (var l = 0, c = i.length; l < c; l++) { var u = i[l]; u.beforeBrush && u.beforeBrush(), u.innerBeforeBrush(), Yp(r, u, a, l === c - 1), u.innerAfterBrush(), u.afterBrush && u.afterBrush(), a.prevEl = u; } e.clearTemporalDisplayables(), e.notClear = !0, r.restore(); } var hA = new EDe(), o4 = new Dw(100), s4 = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"]; function Nm(r, e) { if (r === "none") return null; var t = e.getDevicePixelRatio(), n = e.getZr(), i = n.painter.type === "svg"; r.dirty && hA.delete(r); var a = hA.get(r); if (a) return a; var o = qe(r, { symbol: "rect", symbolSize: 1, symbolKeepAspect: !0, color: "rgba(0, 0, 0, 0.2)", backgroundColor: null, dashArrayX: 5, dashArrayY: 5, rotation: 0, maxTileWidth: 512, maxTileHeight: 512 }); o.backgroundColor === "none" && (o.backgroundColor = null); var s = { repeat: "repeat" }; return u(s), s.rotation = o.rotation, s.scaleX = s.scaleY = i ? 1 : 1 / t, hA.set(r, s), r.dirty = !1, s; function u(l) { for (var c = [t], f = !0, h = 0; h < s4.length; ++h) { var p = o[s4[h]]; if (p != null && !le(p) && !Se(p) && !$t(p) && typeof p != "boolean") { f = !1; break; } c.push(p); } var d; if (f) { d = c.join(",") + (i ? "-svg" : ""); var v = o4.get(d); v && (i ? l.svgElement = v : l.image = v); } var g = RK(o.dashArrayX), m = jDe(o.dashArrayY), y = OK(o.symbol), _ = YDe(g), w = NK(m), x = !i && tf.createCanvas(), C = i && { tag: "g", attrs: {}, key: "dcl", children: [] }, S = E(), b; x && (x.width = S.width * t, x.height = S.height * t, b = x.getContext("2d")), T(), f && o4.put(d, x || C), l.image = x, l.svgElement = C, l.svgWidth = S.width, l.svgHeight = S.height; function E() { for (var P = 1, I = 0, A = _.length; I < A; ++I) P = _6(P, _[I]); for (var L = 1, I = 0, A = y.length; I < A; ++I) L = _6(L, y[I].length); P *= L; var D = w * _.length * y.length; if (process.env.NODE_ENV !== "production") { var O = function(N) { console.warn("Calculated decal size is greater than " + N + " due to decal option settings so " + N + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + N + " to be larger to avoid incontinuity."); }; P > o.maxTileWidth && O("maxTileWidth"), D > o.maxTileHeight && O("maxTileHeight"); } return { width: Math.max(1, Math.min(P, o.maxTileWidth)), height: Math.max(1, Math.min(D, o.maxTileHeight)) }; } function T() { b && (b.clearRect(0, 0, x.width, x.height), o.backgroundColor && (b.fillStyle = o.backgroundColor, b.fillRect(0, 0, x.width, x.height))); for (var P = 0, I = 0; I < m.length; ++I) P += m[I]; if (P <= 0) return; for (var A = -w, L = 0, D = 0, O = 0; A < S.height; ) { if (L % 2 === 0) { for (var N = D / 2 % y.length, F = 0, k = 0, G = 0; F < S.width * 2; ) { for (var U = 0, I = 0; I < g[O].length; ++I) U += g[O][I]; if (U <= 0) break; if (k % 2 === 0) { var B = (1 - o.symbolSize) * 0.5, X = F + g[O][k] * B, j = A + m[L] * B, ae = g[O][k] * o.symbolSize, se = m[L] * o.symbolSize, $ = G / 2 % y[N].length; V(X, j, ae, se, y[N][$]); } F += g[O][k], ++G, ++k, k === g[O].length && (k = 0); } ++O, O === g.length && (O = 0); } A += m[L], ++D, ++L, L === m.length && (L = 0); } function V(q, ee, Y, K, fe) { var J = i ? 1 : t, ue = vi(fe, q * J, ee * J, Y * J, K * J, o.color, o.symbolKeepAspect); if (i) { var ne = n.painter.renderOneToVNode(ue); ne && C.children.push(ne); } else MK(b, ue); } } } } function OK(r) { if (!r || r.length === 0) return [["rect"]]; if (Se(r)) return [[r]]; for (var e = !0, t = 0; t < r.length; ++t) if (!Se(r[t])) { e = !1; break; } if (e) return OK([r]); for (var n = [], t = 0; t < r.length; ++t) Se(r[t]) ? n.push([r[t]]) : n.push(r[t]); return n; } function RK(r) { if (!r || r.length === 0) return [[0, 0]]; if ($t(r)) { var e = Math.ceil(r); return [[e, e]]; } for (var t = !0, n = 0; n < r.length; ++n) if (!$t(r[n])) { t = !1; break; } if (t) return RK([r]); for (var i = [], n = 0; n < r.length; ++n) if ($t(r[n])) { var e = Math.ceil(r[n]); i.push([e, e]); } else { var e = ce(r[n], function(s) { return Math.ceil(s); }); e.length % 2 === 1 ? i.push(e.concat(e)) : i.push(e); } return i; } function jDe(r) { if (!r || typeof r == "object" && r.length === 0) return [0, 0]; if ($t(r)) { var e = Math.ceil(r); return [e, e]; } var t = ce(r, function(n) { return Math.ceil(n); }); return r.length % 2 ? t.concat(t) : t; } function YDe(r) { return ce(r, function(e) { return NK(e); }); } function NK(r) { for (var e = 0, t = 0; t < r.length; ++t) e += r[t]; return r.length % 2 === 1 ? e * 2 : e; } function XDe(r, e) { r.eachRawSeries(function(t) { if (!r.isSeriesFiltered(t)) { var n = t.getData(); n.hasItemVisual() && n.each(function(o) { var s = n.getItemVisual(o, "decal"); if (s) { var u = n.ensureUniqueItemVisual(o, "style"); u.decal = Nm(s, e); } }); var i = n.getVisual("decal"); if (i) { var a = n.getVisual("style"); a.decal = Nm(i, e); } } }); } var qDe = new Cu(); const Lu = qDe; var PE = {}; function ZDe(r, e) { process.env.NODE_ENV !== "production" && PE[r] && Oa("Already has an implementation of " + r + "."), PE[r] = e; } function KDe(r) { return process.env.NODE_ENV !== "production" && (PE[r] || Oa("Implementation of " + r + " doesn't exists.")), PE[r]; } var u4 = typeof window < "u", JDe = 1, QDe = 800, eMe = 900, tMe = 1e3, rMe = 2e3, nMe = 5e3, FK = 1e3, iMe = 1100, SF = 2e3, BK = 3e3, aMe = 4e3, nP = 4500, oMe = 4600, sMe = 5e3, uMe = 6e3, kK = 7e3, lMe = { PROCESSOR: { FILTER: tMe, SERIES_FILTER: QDe, STATISTIC: nMe }, VISUAL: { LAYOUT: FK, PROGRESSIVE_LAYOUT: iMe, GLOBAL: SF, CHART: BK, POST_CHART_LAYOUT: oMe, COMPONENT: aMe, BRUSH: sMe, CHART_ITEM: nP, ARIA: uMe, DECAL: kK } }, za = "__flagInMainProcess", bo = "__pendingUpdate", pA = "__needsUpdateStatus", l4 = /^[a-zA-Z0-9_]+$/, dA = "__connectUpdateStatus", c4 = 0, cMe = 1, fMe = 2; function VK(r) { return function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; if (this.isDisposed()) { Jo(this.id); return; } return zK(this, r, e); }; } function GK(r) { return function() { for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; return zK(this, r, e); }; } function zK(r, e, t) { return t[0] = t[0] && t[0].toLowerCase(), Cu.prototype[e].apply(r, t); } var $K = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e; }(Cu), HK = $K.prototype; HK.on = GK("on"); HK.off = GK("off"); var Wv, vA, nC, Lf, gA, mA, yA, f0, h0, f4, h4, _A, p4, iC, d4, UK, Ds, v4, WK = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this, new mDe()) || this; a._chartsViews = [], a._chartsMap = {}, a._componentsViews = [], a._componentsMap = {}, a._pendingActions = [], i = i || {}, Se(n) && (n = jK[n]), a._dom = t; var o = "canvas", s = !1; if (process.env.NODE_ENV !== "production") { var u = u4 ? window : global; o = u.__ECHARTS__DEFAULT__RENDERER__ || o; var l = u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__; s = l == null ? s : l; } var c = a._zr = v6(t, { renderer: i.renderer || o, devicePixelRatio: i.devicePixelRatio, width: i.width, height: i.height, ssr: i.ssr, useDirtyRect: i.useDirtyRect == null ? s : i.useDirtyRect }); a._ssr = i.ssr, a._throttledZrFlush = wF(Ae(c.flush, c), 17), n = Qe(n), n && JZ(n, !0), a._theme = n, a._locale = wAe(i.locale || TZ), a._coordSysMgr = new Ly(); var f = a._api = d4(a); function h(p, d) { return p.__prio - d.__prio; } return iS(AE, h), iS(a2, h), a._scheduler = new TK(a, f, a2, AE), a._messageCenter = new $K(), a._initEvents(), a.resize = Ae(a.resize, a), c.animation.on("frame", a._onframe, a), f4(c, a), h4(c, a), nE(a), a; } return e.prototype._onframe = function() { if (!this._disposed) { v4(this); var t = this._scheduler; if (this[bo]) { var n = this[bo].silent; this[za] = !0; try { Wv(this), Lf.update.call(this, null, this[bo].updateParams); } catch (u) { throw this[za] = !1, this[bo] = null, u; } this._zr.flush(), this[za] = !1, this[bo] = null, f0.call(this, n), h0.call(this, n); } else if (t.unfinished) { var i = JDe, a = this._model, o = this._api; t.unfinished = !1; do { var s = +new Date(); t.performSeriesTasks(a), t.performDataProcessorTasks(a), mA(this, a), t.performVisualTasks(a), iC(this, this._model, o, "remain", {}), i -= +new Date() - s; } while (i > 0 && t.unfinished); t.unfinished || this._zr.flush(); } } }, e.prototype.getDom = function() { return this._dom; }, e.prototype.getId = function() { return this.id; }, e.prototype.getZr = function() { return this._zr; }, e.prototype.isSSR = function() { return this._ssr; }, e.prototype.setOption = function(t, n, i) { if (this[za]) { process.env.NODE_ENV !== "production" && Oa("`setOption` should not be called during main process."); return; } if (this._disposed) { Jo(this.id); return; } var a, o, s; if (Xe(n) && (i = n.lazyUpdate, a = n.silent, o = n.replaceMerge, s = n.transition, n = n.notMerge), this[za] = !0, !this._model || n) { var u = new rLe(this._api), l = this._theme, c = this._model = new qZ(); c.scheduler = this._scheduler, c.ssr = this._ssr, c.init(null, null, null, l, this._locale, u); } this._model.setOption(t, { replaceMerge: o }, o2); var f = { seriesTransition: s, optionChanged: !0 }; if (i) this[bo] = { silent: a, updateParams: f }, this[za] = !1, this.getZr().wakeUp(); else { try { Wv(this), Lf.update.call(this, null, f); } catch (h) { throw this[bo] = null, this[za] = !1, h; } this._ssr || this._zr.flush(), this[bo] = null, this[za] = !1, f0.call(this, a), h0.call(this, a); } }, e.prototype.setTheme = function() { rl("ECharts#setTheme() is DEPRECATED in ECharts 3.0"); }, e.prototype.getModel = function() { return this._model; }, e.prototype.getOption = function() { return this._model && this._model.getOption(); }, e.prototype.getWidth = function() { return this._zr.getWidth(); }, e.prototype.getHeight = function() { return this._zr.getHeight(); }, e.prototype.getDevicePixelRatio = function() { return this._zr.painter.dpr || u4 && window.devicePixelRatio || 1; }, e.prototype.getRenderedCanvas = function(t) { return process.env.NODE_ENV !== "production" && ii("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(t); }, e.prototype.renderToCanvas = function(t) { t = t || {}; var n = this._zr.painter; if (process.env.NODE_ENV !== "production" && n.type !== "canvas") throw new Error("renderToCanvas can only be used in the canvas renderer."); return n.getRenderedCanvas({ backgroundColor: t.backgroundColor || this._model.get("backgroundColor"), pixelRatio: t.pixelRatio || this.getDevicePixelRatio() }); }, e.prototype.renderToSVGString = function(t) { t = t || {}; var n = this._zr.painter; if (process.env.NODE_ENV !== "production" && n.type !== "svg") throw new Error("renderToSVGString can only be used in the svg renderer."); return n.renderToString({ useViewBox: t.useViewBox }); }, e.prototype.getSvgDataURL = function() { if (!!wr.svgSupported) { var t = this._zr, n = t.storage.getDisplayList(); return M(n, function(i) { i.stopAnimation(null, !0); }), t.painter.toDataURL(); } }, e.prototype.getDataURL = function(t) { if (this._disposed) { Jo(this.id); return; } t = t || {}; var n = t.excludeComponents, i = this._model, a = [], o = this; M(n, function(u) { i.eachComponent({ mainType: u }, function(l) { var c = o._componentsMap[l.__viewId]; c.group.ignore || (a.push(c), c.group.ignore = !0); }); }); var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(t).toDataURL("image/" + (t && t.type || "png")); return M(a, function(u) { u.group.ignore = !1; }), s; }, e.prototype.getConnectedDataURL = function(t) { if (this._disposed) { Jo(this.id); return; } var n = t.type === "svg", i = this.group, a = Math.min, o = Math.max, s = 1 / 0; if (g4[i]) { var u = s, l = s, c = -s, f = -s, h = [], p = t && t.pixelRatio || this.getDevicePixelRatio(); M(E_, function(_, w) { if (_.group === i) { var x = n ? _.getZr().painter.getSvgDom().innerHTML : _.renderToCanvas(Qe(t)), C = _.getDom().getBoundingClientRect(); u = a(C.left, u), l = a(C.top, l), c = o(C.right, c), f = o(C.bottom, f), h.push({ dom: x, left: C.left, top: C.top }); } }), u *= p, l *= p, c *= p, f *= p; var d = c - u, v = f - l, g = tf.createCanvas(), m = v6(g, { renderer: n ? "svg" : "canvas" }); if (m.resize({ width: d, height: v }), n) { var y = ""; return M(h, function(_) { var w = _.left - u, x = _.top - l; y += '' + _.dom + ""; }), m.painter.getSvgRoot().innerHTML = y, t.connectedBackgroundColor && m.painter.setBackgroundColor(t.connectedBackgroundColor), m.refreshImmediately(), m.painter.toDataURL(); } else return t.connectedBackgroundColor && m.add(new Vt({ shape: { x: 0, y: 0, width: d, height: v }, style: { fill: t.connectedBackgroundColor } })), M(h, function(_) { var w = new Ba({ style: { x: _.left * p - u, y: _.top * p - l, image: _.dom } }); m.add(w); }), m.refreshImmediately(), g.toDataURL("image/" + (t && t.type || "png")); } else return this.getDataURL(t); }, e.prototype.convertToPixel = function(t, n) { return gA(this, "convertToPixel", t, n); }, e.prototype.convertFromPixel = function(t, n) { return gA(this, "convertFromPixel", t, n); }, e.prototype.containPixel = function(t, n) { if (this._disposed) { Jo(this.id); return; } var i = this._model, a, o = m_(i, t); return M(o, function(s, u) { u.indexOf("Models") >= 0 && M(s, function(l) { var c = l.coordinateSystem; if (c && c.containPoint) a = a || !!c.containPoint(n); else if (u === "seriesModels") { var f = this._chartsMap[l.__viewId]; f && f.containPoint ? a = a || f.containPoint(n, l) : process.env.NODE_ENV !== "production" && console.warn(u + ": " + (f ? "The found component do not support containPoint." : "No view mapping to the found component.")); } else process.env.NODE_ENV !== "production" && console.warn(u + ": containPoint is not supported"); }, this); }, this), !!a; }, e.prototype.getVisual = function(t, n) { var i = this._model, a = m_(i, t, { defaultMainType: "series" }), o = a.seriesModel; process.env.NODE_ENV !== "production" && (o || console.warn("There is no specified seires model")); var s = o.getData(), u = a.hasOwnProperty("dataIndexInside") ? a.dataIndexInside : a.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(a.dataIndex) : null; return u != null ? xF(s, u, n) : kw(s, n); }, e.prototype.getViewOfComponentModel = function(t) { return this._componentsMap[t.__viewId]; }, e.prototype.getViewOfSeriesModel = function(t) { return this._chartsMap[t.__viewId]; }, e.prototype._initEvents = function() { var t = this; M(hMe, function(n) { var i = function(a) { var o = t.getModel(), s = a.target, u, l = n === "globalout"; if (l ? u = {} : s && Og(s, function(d) { var v = nt(d); if (v && v.dataIndex != null) { var g = v.dataModel || o.getSeriesByIndex(v.seriesIndex); return u = g && g.getDataParams(v.dataIndex, v.dataType) || {}, !0; } else if (v.eventData) return u = oe({}, v.eventData), !0; }, !0), u) { var c = u.componentType, f = u.componentIndex; (c === "markLine" || c === "markPoint" || c === "markArea") && (c = "series", f = u.seriesIndex); var h = c && f != null && o.getComponent(c, f), p = h && t[h.mainType === "series" ? "_chartsMap" : "_componentsMap"][h.__viewId]; process.env.NODE_ENV !== "production" && !l && !(h && p) && console.warn("model or view can not be found by params"), u.event = a, u.type = n, t._$eventProcessor.eventInfo = { targetEl: s, packedEvent: u, model: h, view: p }, t.trigger(n, u); } }; i.zrEventfulCallAtLast = !0, t._zr.on(n, i, t); }), M(S_, function(n, i) { t._messageCenter.on(i, function(a) { this.trigger(i, a); }, t); }), M(["selectchanged"], function(n) { t._messageCenter.on(n, function(i) { this.trigger(n, i); }, t); }), wDe(this._messageCenter, this, this._api); }, e.prototype.isDisposed = function() { return this._disposed; }, e.prototype.clear = function() { if (this._disposed) { Jo(this.id); return; } this.setOption({ series: [] }, !0); }, e.prototype.dispose = function() { if (this._disposed) { Jo(this.id); return; } this._disposed = !0; var t = this.getDom(); t && Sq(this.getDom(), bF, ""); var n = this, i = n._api, a = n._model; M(n._componentsViews, function(o) { o.dispose(a, i); }), M(n._chartsViews, function(o) { o.dispose(a, i); }), n._zr.dispose(), n._dom = n._model = n._chartsMap = n._componentsMap = n._chartsViews = n._componentsViews = n._scheduler = n._api = n._zr = n._throttledZrFlush = n._theme = n._coordSysMgr = n._messageCenter = null, delete E_[n.id]; }, e.prototype.resize = function(t) { if (this[za]) { process.env.NODE_ENV !== "production" && Oa("`resize` should not be called during main process."); return; } if (this._disposed) { Jo(this.id); return; } this._zr.resize(t); var n = this._model; if (this._loadingFX && this._loadingFX.resize(), !!n) { var i = n.resetOption("media"), a = t && t.silent; this[bo] && (a == null && (a = this[bo].silent), i = !0, this[bo] = null), this[za] = !0; try { i && Wv(this), Lf.update.call(this, { type: "resize", animation: oe({ duration: 0 }, t && t.animation) }); } catch (o) { throw this[za] = !1, o; } this[za] = !1, f0.call(this, a), h0.call(this, a); } }, e.prototype.showLoading = function(t, n) { if (this._disposed) { Jo(this.id); return; } if (Xe(t) && (n = t, t = ""), t = t || "default", this.hideLoading(), !s2[t]) { process.env.NODE_ENV !== "production" && console.warn("Loading effects " + t + " not exists."); return; } var i = s2[t](this._api, n), a = this._zr; this._loadingFX = i, a.add(i); }, e.prototype.hideLoading = function() { if (this._disposed) { Jo(this.id); return; } this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null; }, e.prototype.makeActionFromEvent = function(t) { var n = oe({}, t); return n.type = S_[t.type], n; }, e.prototype.dispatchAction = function(t, n) { if (this._disposed) { Jo(this.id); return; } if (Xe(n) || (n = { silent: !!n }), !!IE[t.type] && !!this._model) { if (this[za]) { this._pendingActions.push(t); return; } var i = n.silent; yA.call(this, t, i); var a = n.flush; a ? this._zr.flush() : a !== !1 && wr.browser.weChat && this._throttledZrFlush(), f0.call(this, i), h0.call(this, i); } }, e.prototype.updateLabelLayout = function() { Lu.trigger("series:layoutlabels", this._model, this._api, { updatedSeries: [] }); }, e.prototype.appendData = function(t) { if (this._disposed) { Jo(this.id); return; } var n = t.seriesIndex, i = this.getModel(), a = i.getSeriesByIndex(n); process.env.NODE_ENV !== "production" && Ze(t.data && a), a.appendData(t), this._scheduler.unfinished = !0, this.getZr().wakeUp(); }, e.internalField = function() { Wv = function(f) { var h = f._scheduler; h.restorePipelines(f._model), h.prepareStageTasks(), vA(f, !0), vA(f, !1), h.plan(); }, vA = function(f, h) { for (var p = f._model, d = f._scheduler, v = h ? f._componentsViews : f._chartsViews, g = h ? f._componentsMap : f._chartsMap, m = f._zr, y = f._api, _ = 0; _ < v.length; _++) v[_].__alive = !1; h ? p.eachComponent(function(C, S) { C !== "series" && w(S); }) : p.eachSeries(w); function w(C) { var S = C.__requireNewView; C.__requireNewView = !1; var b = "_ec_" + C.id + "_" + C.type, E = !S && g[b]; if (!E) { var T = Nl(C.type), P = h ? Gn.getClass(T.main, T.sub) : an.getClass(T.sub); process.env.NODE_ENV !== "production" && Ze(P, T.sub + " does not exist."), E = new P(), E.init(p, y), g[b] = E, v.push(E), m.add(E.group); } C.__viewId = E.__id = b, E.__alive = !0, E.__model = C, E.group.__ecComponentInfo = { mainType: C.mainType, index: C.componentIndex }, !h && d.prepareView(E, C, p, y); } for (var _ = 0; _ < v.length; ) { var x = v[_]; x.__alive ? _++ : (!h && x.renderTask.dispose(), m.remove(x.group), x.dispose(p, y), v.splice(_, 1), g[x.__id] === x && delete g[x.__id], x.__id = x.group.__ecComponentInfo = null); } }, nC = function(f, h, p, d, v) { var g = f._model; if (g.setUpdatePayload(p), !d) { M([].concat(f._componentsViews).concat(f._chartsViews), x); return; } var m = {}; m[d + "Id"] = p[d + "Id"], m[d + "Index"] = p[d + "Index"], m[d + "Name"] = p[d + "Name"]; var y = { mainType: d, query: m }; v && (y.subType = v); var _ = p.excludeSeriesId, w; _ != null && (w = $e(), M(jr(_), function(C) { var S = Li(C, null); S != null && w.set(S, !0); })), g && g.eachComponent(y, function(C) { var S = w && w.get(C.id) !== null; if (!S) if (Z6(p)) if (C instanceof bn) p.type === td && !p.notBlur && !C.get(["emphasis", "disabled"]) && fIe(C, p, f._api); else { var b = KN(C.mainType, C.componentIndex, p.name, f._api), E = b.focusSelf, T = b.dispatchers; p.type === td && E && !p.notBlur && GM(C.mainType, C.componentIndex, f._api), T && M(T, function(P) { p.type === td ? af(P) : of(P); }); } else $M(p) && C instanceof bn && (dIe(C, p, f._api), X6(C), Ds(f)); }, f), g && g.eachComponent(y, function(C) { var S = w && w.get(C.id) !== null; S || x(f[d === "series" ? "_chartsMap" : "_componentsMap"][C.__viewId]); }, f); function x(C) { C && C.__alive && C[h] && C[h](C.__model, g, f._api, p); } }, Lf = { prepareAndUpdate: function(f) { Wv(this), Lf.update.call(this, f, { optionChanged: f.newOption != null }); }, update: function(f, h) { var p = this._model, d = this._api, v = this._zr, g = this._coordSysMgr, m = this._scheduler; if (!!p) { p.setUpdatePayload(f), m.restoreData(p, f), m.performSeriesTasks(p), g.create(p, d), m.performDataProcessorTasks(p, f), mA(this, p), g.update(p, d), t(p), m.performVisualTasks(p, f), _A(this, p, d, f, h); var y = p.get("backgroundColor") || "transparent", _ = p.get("darkMode"); v.setBackgroundColor(y), _ != null && _ !== "auto" && v.setDarkMode(_), Lu.trigger("afterupdate", p, d); } }, updateTransform: function(f) { var h = this, p = this._model, d = this._api; if (!!p) { p.setUpdatePayload(f); var v = []; p.eachComponent(function(m, y) { if (m !== "series") { var _ = h.getViewOfComponentModel(y); if (_ && _.__alive) if (_.updateTransform) { var w = _.updateTransform(y, p, d, f); w && w.update && v.push(_); } else v.push(_); } }); var g = $e(); p.eachSeries(function(m) { var y = h._chartsMap[m.__viewId]; if (y.updateTransform) { var _ = y.updateTransform(m, p, d, f); _ && _.update && g.set(m.uid, 1); } else g.set(m.uid, 1); }), t(p), this._scheduler.performVisualTasks(p, f, { setDirty: !0, dirtyMap: g }), iC(this, p, d, f, {}, g), Lu.trigger("afterupdate", p, d); } }, updateView: function(f) { var h = this._model; !h || (h.setUpdatePayload(f), an.markUpdateMethod(f, "updateView"), t(h), this._scheduler.performVisualTasks(h, f, { setDirty: !0 }), _A(this, h, this._api, f, {}), Lu.trigger("afterupdate", h, this._api)); }, updateVisual: function(f) { var h = this, p = this._model; !p || (p.setUpdatePayload(f), p.eachSeries(function(d) { d.getData().clearAllVisual(); }), an.markUpdateMethod(f, "updateVisual"), t(p), this._scheduler.performVisualTasks(p, f, { visualType: "visual", setDirty: !0 }), p.eachComponent(function(d, v) { if (d !== "series") { var g = h.getViewOfComponentModel(v); g && g.__alive && g.updateVisual(v, p, h._api, f); } }), p.eachSeries(function(d) { var v = h._chartsMap[d.__viewId]; v.updateVisual(d, p, h._api, f); }), Lu.trigger("afterupdate", p, this._api)); }, updateLayout: function(f) { Lf.update.call(this, f); } }, gA = function(f, h, p, d) { if (f._disposed) { Jo(f.id); return; } for (var v = f._model, g = f._coordSysMgr.getCoordinateSystems(), m, y = m_(v, p), _ = 0; _ < g.length; _++) { var w = g[_]; if (w[h] && (m = w[h](v, y, d)) != null) return m; } process.env.NODE_ENV !== "production" && console.warn("No coordinate system that supports " + h + " found by the given finder."); }, mA = function(f, h) { var p = f._chartsMap, d = f._scheduler; h.eachSeries(function(v) { d.updateStreamModes(v, p[v.__viewId]); }); }, yA = function(f, h) { var p = this, d = this.getModel(), v = f.type, g = f.escapeConnect, m = IE[v], y = m.actionInfo, _ = (y.update || "update").split(":"), w = _.pop(), x = _[0] != null && Nl(_[0]); this[za] = !0; var C = [f], S = !1; f.batch && (S = !0, C = ce(f.batch, function(L) { return L = qe(oe({}, L), f), L.batch = null, L; })); var b = [], E, T = $M(f), P = Z6(f); if (P && qq(this._api), M(C, function(L) { if (E = m.action(L, p._model, p._api), E = E || oe({}, L), E.type = y.event || E.type, b.push(E), P) { var D = UN(f), O = D.queryOptionMap, N = D.mainTypeSpecified, F = N ? O.keys()[0] : "series"; nC(p, w, L, F), Ds(p); } else T ? (nC(p, w, L, "series"), Ds(p)) : x && nC(p, w, L, x.main, x.sub); }), w !== "none" && !P && !T && !x) try { this[bo] ? (Wv(this), Lf.update.call(this, f), this[bo] = null) : Lf[w].call(this, f); } catch (L) { throw this[za] = !1, L; } if (S ? E = { type: y.event || v, escapeConnect: g, batch: b } : E = b[0], this[za] = !1, !h) { var I = this._messageCenter; if (I.trigger(E.type, E), T) { var A = { type: "selectchanged", escapeConnect: g, selected: vIe(d), isFromClick: f.isFromClick || !1, fromAction: f.type, fromActionPayload: f }; I.trigger(A.type, A); } } }, f0 = function(f) { for (var h = this._pendingActions; h.length; ) { var p = h.shift(); yA.call(this, p, f); } }, h0 = function(f) { !f && this.trigger("updated"); }, f4 = function(f, h) { f.on("rendered", function(p) { h.trigger("rendered", p), f.animation.isFinished() && !h[bo] && !h._scheduler.unfinished && !h._pendingActions.length && h.trigger("finished"); }); }, h4 = function(f, h) { f.on("mouseover", function(p) { var d = p.target, v = Og(d, Oh); v && (hIe(v, p, h._api), Ds(h)); }).on("mouseout", function(p) { var d = p.target, v = Og(d, Oh); v && (pIe(v, p, h._api), Ds(h)); }).on("click", function(p) { var d = p.target, v = Og(d, function(y) { return nt(y).dataIndex != null; }, !0); if (v) { var g = v.selected ? "unselect" : "select", m = nt(v); h._api.dispatchAction({ type: g, dataType: m.dataType, dataIndexInside: m.dataIndex, seriesIndex: m.seriesIndex, isFromClick: !0 }); } }); }; function t(f) { f.clearColorPalette(), f.eachSeries(function(h) { h.clearColorPalette(); }); } function n(f) { var h = [], p = [], d = !1; if (f.eachComponent(function(y, _) { var w = _.get("zlevel") || 0, x = _.get("z") || 0, C = _.getZLevelKey(); d = d || !!C, (y === "series" ? p : h).push({ zlevel: w, z: x, idx: _.componentIndex, type: y, key: C }); }), d) { var v = h.concat(p), g, m; iS(v, function(y, _) { return y.zlevel === _.zlevel ? y.z - _.z : y.zlevel - _.zlevel; }), M(v, function(y) { var _ = f.getComponent(y.type, y.idx), w = y.zlevel, x = y.key; g != null && (w = Math.max(g, w)), x ? (w === g && x !== m && w++, m = x) : m && (w === g && w++, m = ""), g = w, _.setZLevel(w); }); } } _A = function(f, h, p, d, v) { n(h), p4(f, h, p, d, v), M(f._chartsViews, function(g) { g.__alive = !1; }), iC(f, h, p, d, v), M(f._chartsViews, function(g) { g.__alive || g.remove(h, p); }); }, p4 = function(f, h, p, d, v, g) { M(g || f._componentsViews, function(m) { var y = m.__model; l(y, m), m.render(y, h, p, d), s(y, m), c(y, m); }); }, iC = function(f, h, p, d, v, g) { var m = f._scheduler; v = oe(v || {}, { updatedSeries: h.getSeries() }), Lu.trigger("series:beforeupdate", h, p, v); var y = !1; h.eachSeries(function(_) { var w = f._chartsMap[_.__viewId]; w.__alive = !0; var x = w.renderTask; m.updatePayload(x, d), l(_, w), g && g.get(_.uid) && x.dirty(), x.perform(m.getPerformArgs(x)) && (y = !0), w.group.silent = !!_.get("silent"), o(_, w), X6(_); }), m.unfinished = y || m.unfinished, Lu.trigger("series:layoutlabels", h, p, v), Lu.trigger("series:transition", h, p, v), h.eachSeries(function(_) { var w = f._chartsMap[_.__viewId]; s(_, w), c(_, w); }), a(f, h), Lu.trigger("series:afterupdate", h, p, v); }, Ds = function(f) { f[pA] = !0, f.getZr().wakeUp(); }, v4 = function(f) { !f[pA] || (f.getZr().storage.traverse(function(h) { Xg(h) || i(h); }), f[pA] = !1); }; function i(f) { for (var h = [], p = f.currentStates, d = 0; d < p.length; d++) { var v = p[d]; v === "emphasis" || v === "blur" || v === "select" || h.push(v); } f.selected && f.states.select && h.push("select"), f.hoverState === zT && f.states.emphasis ? h.push("emphasis") : f.hoverState === Rw && f.states.blur && h.push("blur"), f.useStates(h); } function a(f, h) { var p = f._zr, d = p.storage, v = 0; d.traverse(function(g) { g.isGroup || v++; }), v > h.get("hoverLayerThreshold") && !wr.node && !wr.worker && h.eachSeries(function(g) { if (!g.preventUsingHoverLayer) { var m = f._chartsMap[g.__viewId]; m.__alive && m.eachRendered(function(y) { y.states.emphasis && (y.states.emphasis.hoverLayer = !0); }); } }); } function o(f, h) { var p = f.get("blendMode") || null; h.eachRendered(function(d) { d.isGroup || (d.style.blend = p); }); } function s(f, h) { if (!f.preventAutoZ) { var p = f.get("z") || 0, d = f.get("zlevel") || 0; h.eachRendered(function(v) { return u(v, p, d, -1 / 0), !0; }); } } function u(f, h, p, d) { var v = f.getTextContent(), g = f.getTextGuideLine(), m = f.isGroup; if (m) for (var y = f.childrenRef(), _ = 0; _ < y.length; _++) d = Math.max(u(y[_], h, p, d), d); else f.z = h, f.zlevel = p, d = Math.max(f.z2, d); if (v && (v.z = h, v.zlevel = p, isFinite(d) && (v.z2 = d + 2)), g) { var w = f.textGuideLineConfig; g.z = h, g.zlevel = p, isFinite(d) && (g.z2 = d + (w && w.showAbove ? 1 : -1)); } return d; } function l(f, h) { h.eachRendered(function(p) { if (!Xg(p)) { var d = p.getTextContent(), v = p.getTextGuideLine(); p.stateTransition && (p.stateTransition = null), d && d.stateTransition && (d.stateTransition = null), v && v.stateTransition && (v.stateTransition = null), p.hasState() ? (p.prevStates = p.currentStates, p.clearStates()) : p.prevStates && (p.prevStates = null); } }); } function c(f, h) { var p = f.getModel("stateAnimation"), d = f.isAnimationEnabled(), v = p.get("duration"), g = v > 0 ? { duration: v, delay: p.get("delay"), easing: p.get("easing") } : null; h.eachRendered(function(m) { if (m.states && m.states.emphasis) { if (Xg(m)) return; if (m instanceof Tt && wIe(m), m.__dirty) { var y = m.prevStates; y && m.useStates(y); } if (d) { m.stateTransition = g; var _ = m.getTextContent(), w = m.getTextGuideLine(); _ && (_.stateTransition = g), w && (w.stateTransition = g); } m.__dirty && i(m); } }); } d4 = function(f) { return new (function(h) { W(p, h); function p() { return h !== null && h.apply(this, arguments) || this; } return p.prototype.getCoordinateSystems = function() { return f._coordSysMgr.getCoordinateSystems(); }, p.prototype.getComponentByElement = function(d) { for (; d; ) { var v = d.__ecComponentInfo; if (v != null) return f._model.getComponent(v.mainType, v.index); d = d.parent; } }, p.prototype.enterEmphasis = function(d, v) { af(d, v), Ds(f); }, p.prototype.leaveEmphasis = function(d, v) { of(d, v), Ds(f); }, p.prototype.enterBlur = function(d) { Wq(d), Ds(f); }, p.prototype.leaveBlur = function(d) { ZN(d), Ds(f); }, p.prototype.enterSelect = function(d) { jq(d), Ds(f); }, p.prototype.leaveSelect = function(d) { Yq(d), Ds(f); }, p.prototype.getModel = function() { return f.getModel(); }, p.prototype.getViewOfComponentModel = function(d) { return f.getViewOfComponentModel(d); }, p.prototype.getViewOfSeriesModel = function(d) { return f.getViewOfSeriesModel(d); }, p; }(ZZ))(f); }, UK = function(f) { function h(p, d) { for (var v = 0; v < p.length; v++) { var g = p[v]; g[dA] = d; } } M(S_, function(p, d) { f._messageCenter.on(d, function(v) { if (g4[f.group] && f[dA] !== c4) { if (v && v.escapeConnect) return; var g = f.makeActionFromEvent(v), m = []; M(E_, function(y) { y !== f && y.group === f.group && m.push(y); }), h(m, c4), M(m, function(y) { y[dA] !== cMe && y.dispatchAction(g); }), h(m, fMe); } }); }); }; }(), e; }(Cu), EF = WK.prototype; EF.on = VK("on"); EF.off = VK("off"); EF.one = function(r, e, t) { var n = this; rl("ECharts#one is deprecated."); function i() { for (var a = [], o = 0; o < arguments.length; o++) a[o] = arguments[o]; e && e.apply && e.apply(this, a), n.off(r, i); } this.on.call(this, r, i, t); }; var hMe = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"]; function Jo(r) { process.env.NODE_ENV !== "production" && console.warn("Instance " + r + " has been disposed"); } var IE = {}, S_ = {}, a2 = [], o2 = [], AE = [], jK = {}, s2 = {}, E_ = {}, g4 = {}, pMe = +new Date() - 0, bF = "_echarts_instance_"; function YK(r, e, t) { var n = !(t && t.ssr); if (n) { if (process.env.NODE_ENV !== "production" && !r) throw new Error("Initialize failed: invalid dom."); var i = dMe(r); if (i) return process.env.NODE_ENV !== "production" && console.warn("There is a chart instance already initialized on the dom."), i; process.env.NODE_ENV !== "production" && Lm(r) && r.nodeName.toUpperCase() !== "CANVAS" && (!r.clientWidth && (!t || t.width == null) || !r.clientHeight && (!t || t.height == null)) && console.warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload."); } var a = new WK(r, e, t); return a.id = "ec_" + pMe++, E_[a.id] = a, n && Sq(r, bF, a.id), UK(a), Lu.trigger("afterinit", a), a; } function dMe(r) { return E_[oPe(r, bF)]; } function XK(r, e) { jK[r] = e; } function qK(r) { _t(o2, r) < 0 && o2.push(r); } function ZK(r, e) { PF(a2, r, e, rMe); } function vMe(r) { TF("afterinit", r); } function gMe(r) { TF("afterupdate", r); } function TF(r, e) { Lu.on(r, e); } function cc(r, e, t) { ze(e) && (t = e, e = ""); var n = Xe(r) ? r.type : [r, r = { event: e }][0]; r.event = (r.event || n).toLowerCase(), e = r.event, !S_[e] && (Ze(l4.test(n) && l4.test(e)), IE[n] || (IE[n] = { action: t, actionInfo: r }), S_[e] = n); } function KK(r, e) { Ly.register(r, e); } function mMe(r, e) { PF(AE, r, e, FK, "layout"); } function gv(r, e) { PF(AE, r, e, BK, "visual"); } var m4 = []; function PF(r, e, t, n, i) { if ((ze(e) || Xe(e)) && (t = e, e = n), process.env.NODE_ENV !== "production") { if (isNaN(e) || e == null) throw new Error("Illegal priority"); M(r, function(o) { Ze(o.__raw !== t); }); } if (!(_t(m4, t) >= 0)) { m4.push(t); var a = TK.wrapStageHandler(t, i); a.__prio = e, a.__raw = t, r.push(a); } } function JK(r, e) { s2[r] = e; } function yMe(r, e, t) { var n = KDe("registerMap"); n && n(r, e, t); } var _Me = LLe; gv(SF, tDe); gv(nP, rDe); gv(nP, nDe); gv(SF, yDe); gv(nP, _De); gv(kK, XDe); qK(JZ); ZK(eMe, cLe); JK("default", iDe); cc({ type: td, event: td, update: td }, ci); cc({ type: lS, event: lS, update: lS }, ci); cc({ type: y_, event: y_, update: y_ }, ci); cc({ type: cS, event: cS, update: cS }, ci); cc({ type: __, event: __, update: __ }, ci); XK("light", vDe); XK("dark", gDe); var y4 = [], wMe = { registerPreprocessor: qK, registerProcessor: ZK, registerPostInit: vMe, registerPostUpdate: gMe, registerUpdateLifecycle: TF, registerAction: cc, registerCoordinateSystem: KK, registerLayout: mMe, registerVisual: gv, registerTransform: _Me, registerLoading: JK, registerMap: yMe, registerImpl: ZDe, PRIORITY: lMe, ComponentModel: Rt, ComponentView: Gn, SeriesModel: bn, ChartView: an, registerComponentModel: function(r) { Rt.registerClass(r); }, registerComponentView: function(r) { Gn.registerClass(r); }, registerSeriesModel: function(r) { bn.registerClass(r); }, registerChartView: function(r) { an.registerClass(r); }, registerSubTypeDefaulter: function(r, e) { Rt.registerSubTypeDefaulter(r, e); }, registerPainter: function(r, e) { kTe(r, e); } }; function bt(r) { if (le(r)) { M(r, function(e) { bt(e); }); return; } _t(y4, r) >= 0 || (y4.push(r), ze(r) && (r = { install: r }), r.install(wMe)); } function p0(r) { return r == null ? 0 : r.length || 1; } function _4(r) { return r; } var xMe = function() { function r(e, t, n, i, a, o) { this._old = e, this._new = t, this._oldKeyGetter = n || _4, this._newKeyGetter = i || _4, this.context = a, this._diffModeMultiple = o === "multiple"; } return r.prototype.add = function(e) { return this._add = e, this; }, r.prototype.update = function(e) { return this._update = e, this; }, r.prototype.updateManyToOne = function(e) { return this._updateManyToOne = e, this; }, r.prototype.updateOneToMany = function(e) { return this._updateOneToMany = e, this; }, r.prototype.updateManyToMany = function(e) { return this._updateManyToMany = e, this; }, r.prototype.remove = function(e) { return this._remove = e, this; }, r.prototype.execute = function() { this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"](); }, r.prototype._executeOneToOne = function() { var e = this._old, t = this._new, n = {}, i = new Array(e.length), a = new Array(t.length); this._initIndexMap(e, null, i, "_oldKeyGetter"), this._initIndexMap(t, n, a, "_newKeyGetter"); for (var o = 0; o < e.length; o++) { var s = i[o], u = n[s], l = p0(u); if (l > 1) { var c = u.shift(); u.length === 1 && (n[s] = u[0]), this._update && this._update(c, o); } else l === 1 ? (n[s] = null, this._update && this._update(u, o)) : this._remove && this._remove(o); } this._performRestAdd(a, n); }, r.prototype._executeMultiple = function() { var e = this._old, t = this._new, n = {}, i = {}, a = [], o = []; this._initIndexMap(e, n, a, "_oldKeyGetter"), this._initIndexMap(t, i, o, "_newKeyGetter"); for (var s = 0; s < a.length; s++) { var u = a[s], l = n[u], c = i[u], f = p0(l), h = p0(c); if (f > 1 && h === 1) this._updateManyToOne && this._updateManyToOne(c, l), i[u] = null; else if (f === 1 && h > 1) this._updateOneToMany && this._updateOneToMany(c, l), i[u] = null; else if (f === 1 && h === 1) this._update && this._update(c, l), i[u] = null; else if (f > 1 && h > 1) this._updateManyToMany && this._updateManyToMany(c, l), i[u] = null; else if (f > 1) for (var p = 0; p < f; p++) this._remove && this._remove(l[p]); else this._remove && this._remove(l); } this._performRestAdd(o, i); }, r.prototype._performRestAdd = function(e, t) { for (var n = 0; n < e.length; n++) { var i = e[n], a = t[i], o = p0(a); if (o > 1) for (var s = 0; s < o; s++) this._add && this._add(a[s]); else o === 1 && this._add && this._add(a); t[i] = null; } }, r.prototype._initIndexMap = function(e, t, n, i) { for (var a = this._diffModeMultiple, o = 0; o < e.length; o++) { var s = "_ec_" + this[i](e[o], o); if (a || (n[o] = s), !!t) { var u = t[s], l = p0(u); l === 0 ? (t[s] = o, a && n.push(s)) : l === 1 ? t[s] = [u, o] : u.push(o); } } }, r; }(); const sf = xMe; var CMe = function() { function r(e, t) { this._encode = e, this._schema = t; } return r.prototype.get = function() { return { fullDimensions: this._getFullDimensionNames(), encode: this._encode }; }, r.prototype._getFullDimensionNames = function() { return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames; }, r; }(); function SMe(r, e) { var t = {}, n = t.encode = {}, i = $e(), a = [], o = [], s = {}; M(r.dimensions, function(h) { var p = r.getDimensionInfo(h), d = p.coordDim; if (d) { process.env.NODE_ENV !== "production" && Ze(XM.get(d) == null); var v = p.coordDimIndex; wA(n, d)[v] = h, p.isExtraCoord || (i.set(d, 1), EMe(p.type) && (a[0] = h), wA(s, d)[v] = r.getDimensionIndex(p.name)), p.defaultTooltip && o.push(h); } XM.each(function(g, m) { var y = wA(n, m), _ = p.otherDims[m]; _ != null && _ !== !1 && (y[_] = p.name); }); }); var u = [], l = {}; i.each(function(h, p) { var d = n[p]; l[p] = d[0], u = u.concat(d); }), t.dataDimsOnCoord = u, t.dataDimIndicesOnCoord = ce(u, function(h) { return r.getDimensionInfo(h).storeDimIndex; }), t.encodeFirstDimNotExtra = l; var c = n.label; c && c.length && (a = c.slice()); var f = n.tooltip; return f && f.length ? o = f.slice() : o.length || (o = a.slice()), n.defaultedLabel = a, n.defaultedTooltip = o, t.userOutput = new CMe(s, e), t; } function wA(r, e) { return r.hasOwnProperty(e) || (r[e] = []), r[e]; } function LE(r) { return r === "category" ? "ordinal" : r === "time" ? "time" : "float"; } function EMe(r) { return !(r === "ordinal" || r === "time"); } var bMe = function() { function r(e) { this.otherDims = {}, e != null && oe(this, e); } return r; }(); const vS = bMe; var TMe = Ut(), PMe = { float: "f", int: "i", ordinal: "o", number: "n", time: "t" }, QK = function() { function r(e) { this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted); } return r.prototype.isDimensionOmitted = function() { return this._dimOmitted; }, r.prototype._updateDimOmitted = function(e) { this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = rJ(this.source))); }, r.prototype.getSourceDimensionIndex = function(e) { return wt(this._dimNameMap.get(e), -1); }, r.prototype.getSourceDimension = function(e) { var t = this.source.dimensionsDefine; if (t) return t[e]; }, r.prototype.makeStoreSchema = function() { for (var e = this._fullDimCount, t = eK(this.source), n = !nJ(e), i = "", a = [], o = 0, s = 0; o < e; o++) { var u = void 0, l = void 0, c = void 0, f = this.dimensions[s]; if (f && f.storeDimIndex === o) u = t ? f.name : null, l = f.type, c = f.ordinalMeta, s++; else { var h = this.getSourceDimension(o); h && (u = t ? h.name : null, l = h.type); } a.push({ property: u, type: l, ordinalMeta: c }), t && u != null && (!f || !f.isCalculationCoord) && (i += n ? u.replace(/\`/g, "`1").replace(/\$/g, "`2") : u), i += "$", i += PMe[l] || "f", c && (i += c.uid), i += "$"; } var p = this.source, d = [p.seriesLayoutBy, p.startIndex, i].join("$$"); return { dimensions: a, hash: d }; }, r.prototype.makeOutputDimensionNames = function() { for (var e = [], t = 0, n = 0; t < this._fullDimCount; t++) { var i = void 0, a = this.dimensions[n]; if (a && a.storeDimIndex === t) a.isCalculationCoord || (i = a.name), n++; else { var o = this.getSourceDimension(t); o && (i = o.name); } e.push(i); } return e; }, r.prototype.appendCalculationDimension = function(e) { this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0); }, r; }(); function eJ(r) { return r instanceof QK; } function tJ(r) { for (var e = $e(), t = 0; t < (r || []).length; t++) { var n = r[t], i = Xe(n) ? n.name : n; i != null && e.get(i) == null && e.set(i, t); } return e; } function rJ(r) { var e = TMe(r); return e.dimNameMap || (e.dimNameMap = tJ(r.dimensionsDefine)); } function nJ(r) { return r > 30; } var d0 = Xe, Df = ce, IMe = typeof Int32Array > "u" ? Array : Int32Array, AMe = "e\0\0", w4 = -1, LMe = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], DMe = ["_approximateExtent"], x4, aC, v0, jv, xA, oC, CA, MMe = function() { function r(e, t) { this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "lttbDownSample", "map"], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = ["downSample", "lttbDownSample"]; var n, i = !1; eJ(e) ? (n = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (i = !0, n = e), n = n || ["x", "y"]; for (var a = {}, o = [], s = {}, u = !1, l = {}, c = 0; c < n.length; c++) { var f = n[c], h = Se(f) ? new vS({ name: f }) : f instanceof vS ? f : new vS(f), p = h.name; h.type = h.type || "float", h.coordDim || (h.coordDim = p, h.coordDimIndex = 0); var d = h.otherDims = h.otherDims || {}; o.push(p), a[p] = h, l[p] != null && (u = !0), h.createInvertedIndices && (s[p] = []), d.itemName === 0 && (this._nameDimIdx = c), d.itemId === 0 && (this._idDimIdx = c), process.env.NODE_ENV !== "production" && Ze(i || h.storeDimIndex >= 0), i && (h.storeDimIndex = c); } if (this.dimensions = o, this._dimInfos = a, this._initGetDimensionInfo(u), this.hostModel = t, this._invertedIndicesMap = s, this._dimOmitted) { var v = this._dimIdxToName = $e(); M(o, function(g) { v.set(a[g].storeDimIndex, g); }); } } return r.prototype.getDimension = function(e) { var t = this._recognizeDimIndex(e); if (t == null) return e; if (t = e, !this._dimOmitted) return this.dimensions[t]; var n = this._dimIdxToName.get(t); if (n != null) return n; var i = this._schema.getSourceDimension(t); if (i) return i.name; }, r.prototype.getDimensionIndex = function(e) { var t = this._recognizeDimIndex(e); if (t != null) return t; if (e == null) return -1; var n = this._getDimInfo(e); return n ? n.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1; }, r.prototype._recognizeDimIndex = function(e) { if ($t(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0)) return +e; }, r.prototype._getStoreDimIndex = function(e) { var t = this.getDimensionIndex(e); if (process.env.NODE_ENV !== "production" && t == null) throw new Error("Unkown dimension " + e); return t; }, r.prototype.getDimensionInfo = function(e) { return this._getDimInfo(this.getDimension(e)); }, r.prototype._initGetDimensionInfo = function(e) { var t = this._dimInfos; this._getDimInfo = e ? function(n) { return t.hasOwnProperty(n) ? t[n] : void 0; } : function(n) { return t[n]; }; }, r.prototype.getDimensionsOnCoord = function() { return this._dimSummary.dataDimsOnCoord.slice(); }, r.prototype.mapDimension = function(e, t) { var n = this._dimSummary; if (t == null) return n.encodeFirstDimNotExtra[e]; var i = n.encode[e]; return i ? i[t] : null; }, r.prototype.mapDimensionsAll = function(e) { var t = this._dimSummary, n = t.encode[e]; return (n || []).slice(); }, r.prototype.getStore = function() { return this._store; }, r.prototype.initData = function(e, t, n) { var i = this, a; if (e instanceof JM && (a = e), !a) { var o = this.dimensions, s = pF(e) || eo(e) ? new tK(e, o.length) : e; a = new JM(); var u = Df(o, function(l) { return { type: i._dimInfos[l].type, property: l }; }); a.initData(s, u, n); } this._store = a, this._nameList = (t || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, a.count()), this._dimSummary = SMe(this, this._schema), this.userOutput = this._dimSummary.userOutput; }, r.prototype.appendData = function(e) { var t = this._store.appendData(e); this._doInit(t[0], t[1]); }, r.prototype.appendValues = function(e, t) { var n = this._store.appendValues(e, t.length), i = n.start, a = n.end, o = this._shouldMakeIdFromName(); if (this._updateOrdinalMeta(), t) for (var s = i; s < a; s++) { var u = s - i; this._nameList[s] = t[u], o && CA(this, s); } }, r.prototype._updateOrdinalMeta = function() { for (var e = this._store, t = this.dimensions, n = 0; n < t.length; n++) { var i = this._dimInfos[t[n]]; i.ordinalMeta && e.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta); } }, r.prototype._shouldMakeIdFromName = function() { var e = this._store.getProvider(); return this._idDimIdx == null && e.getSource().sourceFormat !== kc && !e.fillStorage; }, r.prototype._doInit = function(e, t) { if (!(e >= t)) { var n = this._store, i = n.getProvider(); this._updateOrdinalMeta(); var a = this._nameList, o = this._idList, s = i.getSource().sourceFormat, u = s === Su; if (u && !i.pure) for (var l = [], c = e; c < t; c++) { var f = i.getItem(c, l); if (!this.hasItemOption && YTe(f) && (this.hasItemOption = !0), f) { var h = f.name; a[c] == null && h != null && (a[c] = Li(h, null)); var p = f.id; o[c] == null && p != null && (o[c] = Li(p, null)); } } if (this._shouldMakeIdFromName()) for (var c = e; c < t; c++) CA(this, c); x4(this); } }, r.prototype.getApproximateExtent = function(e) { return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e)); }, r.prototype.setApproximateExtent = function(e, t) { t = this.getDimension(t), this._approximateExtent[t] = e.slice(); }, r.prototype.getCalculationInfo = function(e) { return this._calculationInfo[e]; }, r.prototype.setCalculationInfo = function(e, t) { d0(e) ? oe(this._calculationInfo, e) : this._calculationInfo[e] = t; }, r.prototype.getName = function(e) { var t = this.getRawIndex(e), n = this._nameList[t]; return n == null && this._nameDimIdx != null && (n = v0(this, this._nameDimIdx, t)), n == null && (n = ""), n; }, r.prototype._getCategory = function(e, t) { var n = this._store.get(e, t), i = this._store.getOrdinalMeta(e); return i ? i.categories[n] : n; }, r.prototype.getId = function(e) { return aC(this, this.getRawIndex(e)); }, r.prototype.count = function() { return this._store.count(); }, r.prototype.get = function(e, t) { var n = this._store, i = this._dimInfos[e]; if (i) return n.get(i.storeDimIndex, t); }, r.prototype.getByRawIndex = function(e, t) { var n = this._store, i = this._dimInfos[e]; if (i) return n.getByRawIndex(i.storeDimIndex, t); }, r.prototype.getIndices = function() { return this._store.getIndices(); }, r.prototype.getDataExtent = function(e) { return this._store.getDataExtent(this._getStoreDimIndex(e)); }, r.prototype.getSum = function(e) { return this._store.getSum(this._getStoreDimIndex(e)); }, r.prototype.getMedian = function(e) { return this._store.getMedian(this._getStoreDimIndex(e)); }, r.prototype.getValues = function(e, t) { var n = this, i = this._store; return le(e) ? i.getValues(Df(e, function(a) { return n._getStoreDimIndex(a); }), t) : i.getValues(e); }, r.prototype.hasValue = function(e) { for (var t = this._dimSummary.dataDimIndicesOnCoord, n = 0, i = t.length; n < i; n++) if (isNaN(this._store.get(t[n], e))) return !1; return !0; }, r.prototype.indexOfName = function(e) { for (var t = 0, n = this._store.count(); t < n; t++) if (this.getName(t) === e) return t; return -1; }, r.prototype.getRawIndex = function(e) { return this._store.getRawIndex(e); }, r.prototype.indexOfRawIndex = function(e) { return this._store.indexOfRawIndex(e); }, r.prototype.rawIndexOf = function(e, t) { var n = e && this._invertedIndicesMap[e]; if (process.env.NODE_ENV !== "production" && !n) throw new Error("Do not supported yet"); var i = n[t]; return i == null || isNaN(i) ? w4 : i; }, r.prototype.indicesOfNearest = function(e, t, n) { return this._store.indicesOfNearest(this._getStoreDimIndex(e), t, n); }, r.prototype.each = function(e, t, n) { ze(e) && (n = t, t = e, e = []); var i = n || this, a = Df(jv(e), this._getStoreDimIndex, this); this._store.each(a, i ? Ae(t, i) : t); }, r.prototype.filterSelf = function(e, t, n) { ze(e) && (n = t, t = e, e = []); var i = n || this, a = Df(jv(e), this._getStoreDimIndex, this); return this._store = this._store.filter(a, i ? Ae(t, i) : t), this; }, r.prototype.selectRange = function(e) { var t = this, n = {}, i = At(e); return M(i, function(a) { var o = t._getStoreDimIndex(a); n[o] = e[a]; }), this._store = this._store.selectRange(n), this; }, r.prototype.mapArray = function(e, t, n) { ze(e) && (n = t, t = e, e = []), n = n || this; var i = []; return this.each(e, function() { i.push(t && t.apply(this, arguments)); }, n), i; }, r.prototype.map = function(e, t, n, i) { var a = n || i || this, o = Df(jv(e), this._getStoreDimIndex, this), s = oC(this); return s._store = this._store.map(o, a ? Ae(t, a) : t), s; }, r.prototype.modify = function(e, t, n, i) { var a = this, o = n || i || this; process.env.NODE_ENV !== "production" && M(jv(e), function(u) { var l = a.getDimensionInfo(u); l.isCalculationCoord || console.error("Danger: only stack dimension can be modified"); }); var s = Df(jv(e), this._getStoreDimIndex, this); this._store.modify(s, o ? Ae(t, o) : t); }, r.prototype.downSample = function(e, t, n, i) { var a = oC(this); return a._store = this._store.downSample(this._getStoreDimIndex(e), t, n, i), a; }, r.prototype.lttbDownSample = function(e, t) { var n = oC(this); return n._store = this._store.lttbDownSample(this._getStoreDimIndex(e), t), n; }, r.prototype.getRawDataItem = function(e) { return this._store.getRawDataItem(e); }, r.prototype.getItemModel = function(e) { var t = this.hostModel, n = this.getRawDataItem(e); return new rn(n, t, t && t.ecModel); }, r.prototype.diff = function(e) { var t = this; return new sf(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(n) { return aC(e, n); }, function(n) { return aC(t, n); }); }, r.prototype.getVisual = function(e) { var t = this._visual; return t && t[e]; }, r.prototype.setVisual = function(e, t) { this._visual = this._visual || {}, d0(e) ? oe(this._visual, e) : this._visual[e] = t; }, r.prototype.getItemVisual = function(e, t) { var n = this._itemVisuals[e], i = n && n[t]; return i == null ? this.getVisual(t) : i; }, r.prototype.hasItemVisual = function() { return this._itemVisuals.length > 0; }, r.prototype.ensureUniqueItemVisual = function(e, t) { var n = this._itemVisuals, i = n[e]; i || (i = n[e] = {}); var a = i[t]; return a == null && (a = this.getVisual(t), le(a) ? a = a.slice() : d0(a) && (a = oe({}, a)), i[t] = a), a; }, r.prototype.setItemVisual = function(e, t, n) { var i = this._itemVisuals[e] || {}; this._itemVisuals[e] = i, d0(t) ? oe(i, t) : i[t] = n; }, r.prototype.clearAllVisual = function() { this._visual = {}, this._itemVisuals = []; }, r.prototype.setLayout = function(e, t) { d0(e) ? oe(this._layout, e) : this._layout[e] = t; }, r.prototype.getLayout = function(e) { return this._layout[e]; }, r.prototype.getItemLayout = function(e) { return this._itemLayouts[e]; }, r.prototype.setItemLayout = function(e, t, n) { this._itemLayouts[e] = n ? oe(this._itemLayouts[e] || {}, t) : t; }, r.prototype.clearItemLayouts = function() { this._itemLayouts.length = 0; }, r.prototype.setItemGraphicEl = function(e, t) { var n = this.hostModel && this.hostModel.seriesIndex; kM(n, this.dataType, e, t), this._graphicEls[e] = t; }, r.prototype.getItemGraphicEl = function(e) { return this._graphicEls[e]; }, r.prototype.eachItemGraphicEl = function(e, t) { M(this._graphicEls, function(n, i) { n && e && e.call(t, n, i); }); }, r.prototype.cloneShallow = function(e) { return e || (e = new r(this._schema ? this._schema : Df(this.dimensions, this._getDimInfo, this), this.hostModel)), xA(e, this), e._store = this._store, e; }, r.prototype.wrapMethod = function(e, t) { var n = this[e]; !ze(n) || (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() { var i = n.apply(this, arguments); return t.apply(this, [i].concat(RN(arguments))); }); }, r.internalField = function() { x4 = function(e) { var t = e._invertedIndicesMap; M(t, function(n, i) { var a = e._dimInfos[i], o = a.ordinalMeta, s = e._store; if (o) { n = t[i] = new IMe(o.categories.length); for (var u = 0; u < n.length; u++) n[u] = w4; for (var u = 0; u < s.count(); u++) n[s.get(a.storeDimIndex, u)] = u; } }); }, v0 = function(e, t, n) { return Li(e._getCategory(t, n), null); }, aC = function(e, t) { var n = e._idList[t]; return n == null && e._idDimIdx != null && (n = v0(e, e._idDimIdx, t)), n == null && (n = AMe + t), n; }, jv = function(e) { return le(e) || (e = e != null ? [e] : []), e; }, oC = function(e) { var t = new r(e._schema ? e._schema : Df(e.dimensions, e._getDimInfo, e), e.hostModel); return xA(t, e), t; }, xA = function(e, t) { M(LMe.concat(t.__wrappedMethods || []), function(n) { t.hasOwnProperty(n) && (e[n] = t[n]); }), e.__wrappedMethods = t.__wrappedMethods, M(DMe, function(n) { e[n] = Qe(t[n]); }), e._calculationInfo = oe({}, t._calculationInfo); }, CA = function(e, t) { var n = e._nameList, i = e._idList, a = e._nameDimIdx, o = e._idDimIdx, s = n[t], u = i[t]; if (s == null && a != null && (n[t] = s = v0(e, a, t)), u == null && o != null && (i[t] = u = v0(e, o, t)), u == null && s != null) { var l = e._nameRepeatCount, c = l[s] = (l[s] || 0) + 1; u = s, c > 1 && (u += "__ec__" + c), i[t] = u; } }; }(), r; }(); const ho = MMe; function Gw(r, e) { pF(r) || (r = dF(r)), e = e || {}; var t = e.coordDimensions || [], n = e.dimensionsDefine || r.dimensionsDefine || [], i = $e(), a = [], o = RMe(r, t, n, e.dimensionsCount), s = e.canOmitUnusedDimensions && nJ(o), u = n === r.dimensionsDefine, l = u ? rJ(r) : tJ(n), c = e.encodeDefine; !c && e.encodeDefaulter && (c = e.encodeDefaulter(r, o)); for (var f = $e(c), h = new lK(o), p = 0; p < h.length; p++) h[p] = -1; function d(E) { var T = h[E]; if (T < 0) { var P = n[E], I = Xe(P) ? P : { name: P }, A = new vS(), L = I.name; L != null && l.get(L) != null && (A.name = A.displayName = L), I.type != null && (A.type = I.type), I.displayName != null && (A.displayName = I.displayName); var D = a.length; return h[E] = D, A.storeDimIndex = E, a.push(A), A; } return a[T]; } if (!s) for (var p = 0; p < o; p++) d(p); f.each(function(E, T) { var P = jr(E).slice(); if (P.length === 1 && !Se(P[0]) && P[0] < 0) { f.set(T, !1); return; } var I = f.set(T, []); M(P, function(A, L) { var D = Se(A) ? l.get(A) : A; D != null && D < o && (I[L] = D, g(d(D), T, L)); }); }); var v = 0; M(t, function(E) { var T, P, I, A; if (Se(E)) T = E, A = {}; else { A = E, T = A.name; var L = A.ordinalMeta; A.ordinalMeta = null, A = oe({}, A), A.ordinalMeta = L, P = A.dimsDef, I = A.otherDims, A.name = A.coordDim = A.coordDimIndex = A.dimsDef = A.otherDims = null; } var D = f.get(T); if (D !== !1) { if (D = jr(D), !D.length) for (var O = 0; O < (P && P.length || 1); O++) { for (; v < o && d(v).coordDim != null; ) v++; v < o && D.push(v++); } M(D, function(N, F) { var k = d(N); if (u && A.type != null && (k.type = A.type), g(qe(k, A), T, F), k.name == null && P) { var G = P[F]; !Xe(G) && (G = { name: G }), k.name = k.displayName = G.name, k.defaultTooltip = G.defaultTooltip; } I && qe(k.otherDims, I); }); } }); function g(E, T, P) { XM.get(T) != null ? E.otherDims[T] = P : (E.coordDim = T, E.coordDimIndex = P, i.set(T, !0)); } var m = e.generateCoord, y = e.generateCoordCount, _ = y != null; y = m ? y || 1 : 0; var w = m || "value"; function x(E) { E.name == null && (E.name = E.coordDim); } if (s) M(a, function(E) { x(E); }), a.sort(function(E, T) { return E.storeDimIndex - T.storeDimIndex; }); else for (var C = 0; C < o; C++) { var S = d(C), b = S.coordDim; b == null && (S.coordDim = NMe(w, i, _), S.coordDimIndex = 0, (!m || y <= 0) && (S.isExtraCoord = !0), y--), x(S), S.type == null && (WZ(r, C) === Ea.Must || S.isExtraCoord && (S.otherDims.itemName != null || S.otherDims.seriesName != null)) && (S.type = "ordinal"); } return OMe(a), new QK({ source: r, dimensions: a, fullDimensionCount: o, dimensionOmitted: s }); } function OMe(r) { for (var e = $e(), t = 0; t < r.length; t++) { var n = r[t], i = n.name, a = e.get(i) || 0; a > 0 && (n.name = i + (a - 1)), a++, e.set(i, a); } } function RMe(r, e, t, n) { var i = Math.max(r.dimensionsDetectedCount || 1, e.length, t.length, n || 0); return M(e, function(a) { var o; Xe(a) && (o = a.dimsDef) && (i = Math.max(i, o.length)); }), i; } function NMe(r, e, t) { var n = e.data; if (t || n.hasOwnProperty(r)) { for (var i = 0; n.hasOwnProperty(r + i); ) i++; r += i; } return e.set(r, !0), r; } var FMe = function() { function r(e) { this.coordSysDims = [], this.axisMap = $e(), this.categoryAxisMap = $e(), this.coordSysName = e; } return r; }(); function BMe(r) { var e = r.get("coordinateSystem"), t = new FMe(e), n = kMe[e]; if (n) return n(r, t, t.axisMap, t.categoryAxisMap), t; } var kMe = { cartesian2d: function(r, e, t, n) { var i = r.getReferringComponents("xAxis", ui).models[0], a = r.getReferringComponents("yAxis", ui).models[0]; if (process.env.NODE_ENV !== "production") { if (!i) throw new Error('xAxis "' + si(r.get("xAxisIndex"), r.get("xAxisId"), 0) + '" not found'); if (!a) throw new Error('yAxis "' + si(r.get("xAxisIndex"), r.get("yAxisId"), 0) + '" not found'); } e.coordSysDims = ["x", "y"], t.set("x", i), t.set("y", a), Yv(i) && (n.set("x", i), e.firstCategoryDimIndex = 0), Yv(a) && (n.set("y", a), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1)); }, singleAxis: function(r, e, t, n) { var i = r.getReferringComponents("singleAxis", ui).models[0]; if (process.env.NODE_ENV !== "production" && !i) throw new Error("singleAxis should be specified."); e.coordSysDims = ["single"], t.set("single", i), Yv(i) && (n.set("single", i), e.firstCategoryDimIndex = 0); }, polar: function(r, e, t, n) { var i = r.getReferringComponents("polar", ui).models[0], a = i.findAxisModel("radiusAxis"), o = i.findAxisModel("angleAxis"); if (process.env.NODE_ENV !== "production") { if (!o) throw new Error("angleAxis option not found"); if (!a) throw new Error("radiusAxis option not found"); } e.coordSysDims = ["radius", "angle"], t.set("radius", a), t.set("angle", o), Yv(a) && (n.set("radius", a), e.firstCategoryDimIndex = 0), Yv(o) && (n.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1)); }, geo: function(r, e, t, n) { e.coordSysDims = ["lng", "lat"]; }, parallel: function(r, e, t, n) { var i = r.ecModel, a = i.getComponent("parallel", r.get("parallelIndex")), o = e.coordSysDims = a.dimensions.slice(); M(a.parallelAxisIndex, function(s, u) { var l = i.getComponent("parallelAxis", s), c = o[u]; t.set(c, l), Yv(l) && (n.set(c, l), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = u)); }); } }; function Yv(r) { return r.get("type") === "category"; } function VMe(r, e, t) { t = t || {}; var n = t.byIndex, i = t.stackedCoordDimension, a, o, s; GMe(e) ? a = e : (o = e.schema, a = o.dimensions, s = e.store); var u = !!(r && r.get("stack")), l, c, f, h; if (M(a, function(y, _) { Se(y) && (a[_] = y = { name: y }), u && !y.isExtraCoord && (!n && !l && y.ordinalMeta && (l = y), !c && y.type !== "ordinal" && y.type !== "time" && (!i || i === y.coordDim) && (c = y)); }), c && !n && !l && (n = !0), c) { f = "__\0ecstackresult_" + r.id, h = "__\0ecstackedover_" + r.id, l && (l.createInvertedIndices = !0); var p = c.coordDim, d = c.type, v = 0; M(a, function(y) { y.coordDim === p && v++; }); var g = { name: f, coordDim: p, coordDimIndex: v, type: d, isExtraCoord: !0, isCalculationCoord: !0, storeDimIndex: a.length }, m = { name: h, coordDim: h, coordDimIndex: v + 1, type: d, isExtraCoord: !0, isCalculationCoord: !0, storeDimIndex: a.length + 1 }; o ? (s && (g.storeDimIndex = s.ensureCalculationDimension(h, d), m.storeDimIndex = s.ensureCalculationDimension(f, d)), o.appendCalculationDimension(g), o.appendCalculationDimension(m)) : (a.push(g), a.push(m)); } return { stackedDimension: c && c.name, stackedByDimension: l && l.name, isStackedByIndex: n, stackedOverDimension: h, stackResultDimension: f }; } function GMe(r) { return !eJ(r.schema); } function Fh(r, e) { return !!e && e === r.getCalculationInfo("stackedDimension"); } function iJ(r, e) { return Fh(r, e) ? r.getCalculationInfo("stackResultDimension") : e; } function zMe(r, e) { var t = r.get("coordinateSystem"), n = Ly.get(t), i; return e && e.coordSysDims && (i = ce(e.coordSysDims, function(a) { var o = { name: a }, s = e.axisMap.get(a); if (s) { var u = s.get("type"); o.type = LE(u); } return o; })), i || (i = n && (n.getDimensionsInfo ? n.getDimensionsInfo() : n.dimensions.slice()) || ["x", "y"]), i; } function $Me(r, e, t) { var n, i; return t && M(r, function(a, o) { var s = a.coordDim, u = t.categoryAxisMap.get(s); u && (n == null && (n = o), a.ordinalMeta = u.getOrdinalMeta(), e && (a.createInvertedIndices = !0)), a.otherDims.itemName != null && (i = !0); }), !i && n != null && (r[n].otherDims.itemName = 0), n; } function _f(r, e, t) { t = t || {}; var n = e.getSourceManager(), i, a = !1; r ? (a = !0, i = dF(r)) : (i = n.getSource(), a = i.sourceFormat === Su); var o = BMe(e), s = zMe(e, o), u = t.useEncodeDefaulter, l = ze(u) ? u : u ? ut(UZ, s, e) : null, c = { coordDimensions: s, generateCoord: t.generateCoord, encodeDefine: e.getEncode(), encodeDefaulter: l, canOmitUnusedDimensions: !a }, f = Gw(i, c), h = $Me(f.dimensions, t.createInvertedIndices, o), p = a ? null : n.getSharedDataStore(f), d = VMe(e, { schema: f, store: p }), v = new ho(f, e); v.setCalculationInfo(d); var g = h != null && HMe(i) ? function(m, y, _, w) { return w === h ? _ : this.defaultDimValueGetter(m, y, _, w); } : null; return v.hasItemOption = !1, v.initData( a ? i : p, null, g ), v; } function HMe(r) { if (r.sourceFormat === Su) { var e = UMe(r.data || []); return !le(_y(e)); } } function UMe(r) { for (var e = 0; e < r.length && r[e] == null; ) e++; return r[e]; } var aJ = function() { function r(e) { this._setting = e || {}, this._extent = [1 / 0, -1 / 0]; } return r.prototype.getSetting = function(e) { return this._setting[e]; }, r.prototype.unionExtent = function(e) { var t = this._extent; e[0] < t[0] && (t[0] = e[0]), e[1] > t[1] && (t[1] = e[1]); }, r.prototype.unionExtentFromData = function(e, t) { this.unionExtent(e.getApproximateExtent(t)); }, r.prototype.getExtent = function() { return this._extent.slice(); }, r.prototype.setExtent = function(e, t) { var n = this._extent; isNaN(e) || (n[0] = e), isNaN(t) || (n[1] = t); }, r.prototype.isInExtentRange = function(e) { return this._extent[0] <= e && this._extent[1] >= e; }, r.prototype.isBlank = function() { return this._isBlank; }, r.prototype.setBlank = function(e) { this._isBlank = e; }, r; }(); BT(aJ); const wf = aJ; var WMe = 0, jMe = function() { function r(e) { this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++WMe; } return r.createByAxisModel = function(e) { var t = e.option, n = t.data, i = n && ce(n, YMe); return new r({ categories: i, needCollect: !i, deduplication: t.dedplication !== !1 }); }, r.prototype.getOrdinal = function(e) { return this._getOrCreateMap().get(e); }, r.prototype.parseAndCollect = function(e) { var t, n = this._needCollect; if (!Se(e) && !n) return e; if (n && !this._deduplication) return t = this.categories.length, this.categories[t] = e, t; var i = this._getOrCreateMap(); return t = i.get(e), t == null && (n ? (t = this.categories.length, this.categories[t] = e, i.set(e, t)) : t = NaN), t; }, r.prototype._getOrCreateMap = function() { return this._map || (this._map = $e(this.categories)); }, r; }(); function YMe(r) { return Xe(r) && r.value != null ? r.value : r + ""; } const u2 = jMe; function XMe(r) { var e = Math.pow(10, NT(Math.abs(r))), t = Math.abs(r / e); return t === 0 || t === 1 || t === 2 || t === 3 || t === 5; } function l2(r) { return r.type === "interval" || r.type === "log"; } function qMe(r, e, t, n) { var i = {}, a = r[1] - r[0], o = i.interval = gq(a / e, !0); t != null && o < t && (o = i.interval = t), n != null && o > n && (o = i.interval = n); var s = i.intervalPrecision = oJ(o), u = i.niceTickExtent = [Xn(Math.ceil(r[0] / o) * o, s), Xn(Math.floor(r[1] / o) * o, s)]; return ZMe(u, r), i; } function SA(r) { var e = Math.pow(10, NT(r)), t = r / e; return t ? t === 2 ? t = 3 : t === 3 ? t = 5 : t *= 2 : t = 1, Xn(t * e); } function oJ(r) { return Rl(r) + 2; } function C4(r, e, t) { r[e] = Math.max(Math.min(r[e], t[1]), t[0]); } function ZMe(r, e) { !isFinite(r[0]) && (r[0] = e[0]), !isFinite(r[1]) && (r[1] = e[1]), C4(r, 0, e), C4(r, 1, e), r[0] > r[1] && (r[0] = r[1]); } function iP(r, e) { return r >= e[0] && r <= e[1]; } function aP(r, e) { return e[1] === e[0] ? 0.5 : (r - e[0]) / (e[1] - e[0]); } function oP(r, e) { return r * (e[1] - e[0]) + e[0]; } var sJ = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; n.type = "ordinal"; var i = n.getSetting("ordinalMeta"); return i || (i = new u2({})), le(i) && (i = new u2({ categories: ce(i, function(a) { return Xe(a) ? a.value : a; }) })), n._ordinalMeta = i, n._extent = n.getSetting("extent") || [0, i.categories.length - 1], n; } return e.prototype.parse = function(t) { return t == null ? NaN : Se(t) ? this._ordinalMeta.getOrdinal(t) : Math.round(t); }, e.prototype.contain = function(t) { return t = this.parse(t), iP(t, this._extent) && this._ordinalMeta.categories[t] != null; }, e.prototype.normalize = function(t) { return t = this._getTickNumber(this.parse(t)), aP(t, this._extent); }, e.prototype.scale = function(t) { return t = Math.round(oP(t, this._extent)), this.getRawOrdinalNumber(t); }, e.prototype.getTicks = function() { for (var t = [], n = this._extent, i = n[0]; i <= n[1]; ) t.push({ value: i }), i++; return t; }, e.prototype.getMinorTicks = function(t) { }, e.prototype.setSortInfo = function(t) { if (t == null) { this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null; return; } for (var n = t.ordinalNumbers, i = this._ordinalNumbersByTick = [], a = this._ticksByOrdinalNumber = [], o = 0, s = this._ordinalMeta.categories.length, u = Math.min(s, n.length); o < u; ++o) { var l = n[o]; i[o] = l, a[l] = o; } for (var c = 0; o < s; ++o) { for (; a[c] != null; ) c++; i.push(c), a[c] = o; } }, e.prototype._getTickNumber = function(t) { var n = this._ticksByOrdinalNumber; return n && t >= 0 && t < n.length ? n[t] : t; }, e.prototype.getRawOrdinalNumber = function(t) { var n = this._ordinalNumbersByTick; return n && t >= 0 && t < n.length ? n[t] : t; }, e.prototype.getLabel = function(t) { if (!this.isBlank()) { var n = this.getRawOrdinalNumber(t.value), i = this._ordinalMeta.categories[n]; return i == null ? "" : i + ""; } }, e.prototype.count = function() { return this._extent[1] - this._extent[0] + 1; }, e.prototype.unionExtentFromData = function(t, n) { this.unionExtent(t.getApproximateExtent(n)); }, e.prototype.isInExtentRange = function(t) { return t = this._getTickNumber(t), this._extent[0] <= t && this._extent[1] >= t; }, e.prototype.getOrdinalMeta = function() { return this._ordinalMeta; }, e.prototype.calcNiceTicks = function() { }, e.prototype.calcNiceExtent = function() { }, e.type = "ordinal", e; }(wf); wf.registerClass(sJ); const IF = sJ; var wp = Xn, uJ = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "interval", t._interval = 0, t._intervalPrecision = 2, t; } return e.prototype.parse = function(t) { return t; }, e.prototype.contain = function(t) { return iP(t, this._extent); }, e.prototype.normalize = function(t) { return aP(t, this._extent); }, e.prototype.scale = function(t) { return oP(t, this._extent); }, e.prototype.setExtent = function(t, n) { var i = this._extent; isNaN(t) || (i[0] = parseFloat(t)), isNaN(n) || (i[1] = parseFloat(n)); }, e.prototype.unionExtent = function(t) { var n = this._extent; t[0] < n[0] && (n[0] = t[0]), t[1] > n[1] && (n[1] = t[1]), this.setExtent(n[0], n[1]); }, e.prototype.getInterval = function() { return this._interval; }, e.prototype.setInterval = function(t) { this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = oJ(t); }, e.prototype.getTicks = function(t) { var n = this._interval, i = this._extent, a = this._niceExtent, o = this._intervalPrecision, s = []; if (!n) return s; var u = 1e4; i[0] < a[0] && (t ? s.push({ value: wp(a[0] - n, o) }) : s.push({ value: i[0] })); for (var l = a[0]; l <= a[1] && (s.push({ value: l }), l = wp(l + n, o), l !== s[s.length - 1].value); ) if (s.length > u) return []; var c = s.length ? s[s.length - 1].value : a[1]; return i[1] > c && (t ? s.push({ value: wp(c + n, o) }) : s.push({ value: i[1] })), s; }, e.prototype.getMinorTicks = function(t) { for (var n = this.getTicks(!0), i = [], a = this.getExtent(), o = 1; o < n.length; o++) { for (var s = n[o], u = n[o - 1], l = 0, c = [], f = s.value - u.value, h = f / t; l < t - 1; ) { var p = wp(u.value + (l + 1) * h); p > a[0] && p < a[1] && c.push(p), l++; } i.push(c); } return i; }, e.prototype.getLabel = function(t, n) { if (t == null) return ""; var i = n && n.precision; i == null ? i = Rl(t.value) || 0 : i === "auto" && (i = this._intervalPrecision); var a = wp(t.value, i, !0); return FZ(a); }, e.prototype.calcNiceTicks = function(t, n, i) { t = t || 5; var a = this._extent, o = a[1] - a[0]; if (!!isFinite(o)) { o < 0 && (o = -o, a.reverse()); var s = qMe(a, t, n, i); this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent; } }, e.prototype.calcNiceExtent = function(t) { var n = this._extent; if (n[0] === n[1]) if (n[0] !== 0) { var i = n[0]; t.fixMax || (n[1] += i / 2), n[0] -= i / 2; } else n[1] = 1; var a = n[1] - n[0]; isFinite(a) || (n[0] = 0, n[1] = 1), this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval); var o = this._interval; t.fixMin || (n[0] = wp(Math.floor(n[0] / o) * o)), t.fixMax || (n[1] = wp(Math.ceil(n[1] / o) * o)); }, e.prototype.setNiceExtent = function(t, n) { this._niceExtent = [t, n]; }, e.type = "interval", e; }(wf); wf.registerClass(uJ); const Bh = uJ; var lJ = typeof Float32Array < "u", KMe = lJ ? Float32Array : Array; function Fl(r) { return le(r) ? lJ ? new Float32Array(r) : r : new KMe(r); } var c2 = "__ec_stack_"; function AF(r) { return r.get("stack") || c2 + r.seriesIndex; } function LF(r) { return r.dim + r.index; } function JMe(r) { var e = [], t = r.axis, n = "axis0"; if (t.type === "category") { for (var i = t.getBandWidth(), a = 0; a < r.count; a++) e.push(qe({ bandWidth: i, axisKey: n, stackId: c2 + a }, r)); for (var o = hJ(e), s = [], a = 0; a < r.count; a++) { var u = o[n][c2 + a]; u.offsetCenter = u.offset + u.width / 2, s.push(u); } return s; } } function cJ(r, e) { var t = []; return e.eachSeriesByType(r, function(n) { vJ(n) && t.push(n); }), t; } function QMe(r) { var e = {}; M(r, function(u) { var l = u.coordinateSystem, c = l.getBaseAxis(); if (!(c.type !== "time" && c.type !== "value")) for (var f = u.getData(), h = c.dim + "_" + c.index, p = f.getDimensionIndex(f.mapDimension(c.dim)), d = f.getStore(), v = 0, g = d.count(); v < g; ++v) { var m = d.get(p, v); e[h] ? e[h].push(m) : e[h] = [m]; } }); var t = {}; for (var n in e) if (e.hasOwnProperty(n)) { var i = e[n]; if (i) { i.sort(function(u, l) { return u - l; }); for (var a = null, o = 1; o < i.length; ++o) { var s = i[o] - i[o - 1]; s > 0 && (a = a === null ? s : Math.min(a, s)); } t[n] = a; } } return t; } function fJ(r) { var e = QMe(r), t = []; return M(r, function(n) { var i = n.coordinateSystem, a = i.getBaseAxis(), o = a.getExtent(), s; if (a.type === "category") s = a.getBandWidth(); else if (a.type === "value" || a.type === "time") { var u = a.dim + "_" + a.index, l = e[u], c = Math.abs(o[1] - o[0]), f = a.scale.getExtent(), h = Math.abs(f[1] - f[0]); s = l ? c / h * l : c; } else { var p = n.getData(); s = Math.abs(o[1] - o[0]) / p.count(); } var d = ye(n.get("barWidth"), s), v = ye(n.get("barMaxWidth"), s), g = ye( n.get("barMinWidth") || (gJ(n) ? 0.5 : 1), s ), m = n.get("barGap"), y = n.get("barCategoryGap"); t.push({ bandWidth: s, barWidth: d, barMaxWidth: v, barMinWidth: g, barGap: m, barCategoryGap: y, axisKey: LF(a), stackId: AF(n) }); }), hJ(t); } function hJ(r) { var e = {}; M(r, function(n, i) { var a = n.axisKey, o = n.bandWidth, s = e[a] || { bandWidth: o, remainedWidth: o, autoWidthCount: 0, categoryGap: null, gap: "20%", stacks: {} }, u = s.stacks; e[a] = s; var l = n.stackId; u[l] || s.autoWidthCount++, u[l] = u[l] || { width: 0, maxWidth: 0 }; var c = n.barWidth; c && !u[l].width && (u[l].width = c, c = Math.min(s.remainedWidth, c), s.remainedWidth -= c); var f = n.barMaxWidth; f && (u[l].maxWidth = f); var h = n.barMinWidth; h && (u[l].minWidth = h); var p = n.barGap; p != null && (s.gap = p); var d = n.barCategoryGap; d != null && (s.categoryGap = d); }); var t = {}; return M(e, function(n, i) { t[i] = {}; var a = n.stacks, o = n.bandWidth, s = n.categoryGap; if (s == null) { var u = At(a).length; s = Math.max(35 - u * 4, 15) + "%"; } var l = ye(s, o), c = ye(n.gap, 1), f = n.remainedWidth, h = n.autoWidthCount, p = (f - l) / (h + (h - 1) * c); p = Math.max(p, 0), M(a, function(m) { var y = m.maxWidth, _ = m.minWidth; if (m.width) { var w = m.width; y && (w = Math.min(w, y)), _ && (w = Math.max(w, _)), m.width = w, f -= w + c * w, h--; } else { var w = p; y && y < w && (w = Math.min(y, f)), _ && _ > w && (w = _), w !== p && (m.width = w, f -= w + c * w, h--); } }), p = (f - l) / (h + (h - 1) * c), p = Math.max(p, 0); var d = 0, v; M(a, function(m, y) { m.width || (m.width = p), v = m, d += m.width * (1 + c); }), v && (d -= v.width * c); var g = -d / 2; M(a, function(m, y) { t[i][y] = t[i][y] || { bandWidth: o, offset: g, width: m.width }, g += m.width * (1 + c); }); }), t; } function e2e(r, e, t) { if (r && e) { var n = r[LF(e)]; return n != null && t != null ? n[AF(t)] : n; } } function pJ(r, e) { var t = cJ(r, e), n = fJ(t); M(t, function(i) { var a = i.getData(), o = i.coordinateSystem, s = o.getBaseAxis(), u = AF(i), l = n[LF(s)][u], c = l.offset, f = l.width; a.setLayout({ bandWidth: l.bandWidth, offset: c, size: f }); }); } function dJ(r) { return { seriesType: r, plan: Dy(), reset: function(e) { if (!!vJ(e)) { var t = e.getData(), n = e.coordinateSystem, i = n.getBaseAxis(), a = n.getOtherAxis(i), o = t.getDimensionIndex(t.mapDimension(a.dim)), s = t.getDimensionIndex(t.mapDimension(i.dim)), u = e.get("showBackground", !0), l = t.mapDimension(a.dim), c = t.getCalculationInfo("stackResultDimension"), f = Fh(t, l) && !!t.getCalculationInfo("stackedOnSeries"), h = a.isHorizontal(), p = t2e(i, a), d = gJ(e), v = e.get("barMinHeight") || 0, g = c && t.getDimensionIndex(c), m = t.getLayout("size"), y = t.getLayout("offset"); return { progress: function(_, w) { for (var x = _.count, C = d && Fl(x * 3), S = d && u && Fl(x * 3), b = d && Fl(x), E = n.master.getRect(), T = h ? E.width : E.height, P, I = w.getStore(), A = 0; (P = _.next()) != null; ) { var L = I.get(f ? g : o, P), D = I.get(s, P), O = p, N = void 0; f && (N = +L - I.get(o, P)); var F = void 0, k = void 0, G = void 0, U = void 0; if (h) { var B = n.dataToPoint([L, D]); if (f) { var X = n.dataToPoint([N, D]); O = X[0]; } F = O, k = B[1] + y, G = B[0] - O, U = m, Math.abs(G) < v && (G = (G < 0 ? -1 : 1) * v); } else { var B = n.dataToPoint([D, L]); if (f) { var X = n.dataToPoint([D, N]); O = X[1]; } F = B[0] + y, k = O, G = m, U = B[1] - O, Math.abs(U) < v && (U = (U <= 0 ? -1 : 1) * v); } d ? (C[A] = F, C[A + 1] = k, C[A + 2] = h ? G : U, S && (S[A] = h ? E.x : F, S[A + 1] = h ? k : E.y, S[A + 2] = T), b[P] = P) : w.setItemLayout(P, { x: F, y: k, width: G, height: U }), A += 3; } d && w.setLayout({ largePoints: C, largeDataIndices: b, largeBackgroundPoints: S, valueAxisHorizontal: h }); } }; } } }; } function vJ(r) { return r.coordinateSystem && r.coordinateSystem.type === "cartesian2d"; } function gJ(r) { return r.pipelineContext && r.pipelineContext.large; } function t2e(r, e) { return e.toGlobalCoord(e.dataToCoord(e.type === "log" ? 1 : 0)); } var r2e = function(r, e, t, n) { for (; t < n; ) { var i = t + n >>> 1; r[i][1] < e ? t = i + 1 : n = i; } return t; }, mJ = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "time", n; } return e.prototype.getLabel = function(t) { var n = this.getSetting("useUTC"); return XT(t.value, fG[SAe(qg(this._minLevelUnit))] || fG.second, n, this.getSetting("locale")); }, e.prototype.getFormattedLabel = function(t, n, i) { var a = this.getSetting("useUTC"), o = this.getSetting("locale"); return EAe(t, n, i, o, a); }, e.prototype.getTicks = function() { var t = this._interval, n = this._extent, i = []; if (!t) return i; i.push({ value: n[0], level: 0 }); var a = this.getSetting("useUTC"), o = l2e(this._minLevelUnit, this._approxInterval, a, n); return i = i.concat(o), i.push({ value: n[1], level: 0 }), i; }, e.prototype.calcNiceExtent = function(t) { var n = this._extent; if (n[0] === n[1] && (n[0] -= Zs, n[1] += Zs), n[1] === -1 / 0 && n[0] === 1 / 0) { var i = new Date(); n[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), n[0] = n[1] - Zs; } this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval); }, e.prototype.calcNiceTicks = function(t, n, i) { t = t || 10; var a = this._extent, o = a[1] - a[0]; this._approxInterval = o / t, n != null && this._approxInterval < n && (this._approxInterval = n), i != null && this._approxInterval > i && (this._approxInterval = i); var s = sC.length, u = Math.min(r2e(sC, this._approxInterval, 0, s), s - 1); this._interval = sC[u][1], this._minLevelUnit = sC[Math.max(u - 1, 0)][0]; }, e.prototype.parse = function(t) { return $t(t) ? t : +ec(t); }, e.prototype.contain = function(t) { return iP(this.parse(t), this._extent); }, e.prototype.normalize = function(t) { return aP(this.parse(t), this._extent); }, e.prototype.scale = function(t) { return oP(t, this._extent); }, e.type = "time", e; }(Bh), sC = [ ["second", oF], ["minute", sF], ["hour", x_], ["quarter-day", x_ * 6], ["half-day", x_ * 12], ["day", Zs * 1.2], ["half-week", Zs * 3.5], ["week", Zs * 7], ["month", Zs * 31], ["quarter", Zs * 95], ["half-year", cG / 2], ["year", cG] ]; function n2e(r, e, t, n) { var i = ec(e), a = ec(t), o = function(d) { return hG(i, d, n) === hG(a, d, n); }, s = function() { return o("year"); }, u = function() { return s() && o("month"); }, l = function() { return u() && o("day"); }, c = function() { return l() && o("hour"); }, f = function() { return c() && o("minute"); }, h = function() { return f() && o("second"); }, p = function() { return h() && o("millisecond"); }; switch (r) { case "year": return s(); case "month": return u(); case "day": return l(); case "hour": return c(); case "minute": return f(); case "second": return h(); case "millisecond": return p(); } } function i2e(r, e) { return r /= Zs, r > 16 ? 16 : r > 7.5 ? 7 : r > 3.5 ? 4 : r > 1.5 ? 2 : 1; } function a2e(r) { var e = 30 * Zs; return r /= e, r > 6 ? 6 : r > 3 ? 3 : r > 2 ? 2 : 1; } function o2e(r) { return r /= x_, r > 12 ? 12 : r > 6 ? 6 : r > 3.5 ? 4 : r > 2 ? 2 : 1; } function S4(r, e) { return r /= e ? sF : oF, r > 30 ? 30 : r > 20 ? 20 : r > 15 ? 15 : r > 10 ? 10 : r > 5 ? 5 : r > 2 ? 2 : 1; } function s2e(r) { return gq(r, !0); } function u2e(r, e, t) { var n = new Date(r); switch (qg(e)) { case "year": case "month": n[LZ(t)](0); case "day": n[DZ(t)](1); case "hour": n[MZ(t)](0); case "minute": n[OZ(t)](0); case "second": n[RZ(t)](0), n[NZ(t)](0); } return n.getTime(); } function l2e(r, e, t, n) { var i = 1e4, a = IZ, o = 0; function s(T, P, I, A, L, D, O) { for (var N = new Date(P), F = P, k = N[A](); F < I && F <= n[1]; ) O.push({ value: F }), k += T, N[L](k), F = N.getTime(); O.push({ value: F, notAdd: !0 }); } function u(T, P, I) { var A = [], L = !P.length; if (!n2e(qg(T), n[0], n[1], t)) { L && (P = [{ value: u2e(new Date(n[0]), T, t) }, { value: n[1] }]); for (var D = 0; D < P.length - 1; D++) { var O = P[D].value, N = P[D + 1].value; if (O !== N) { var F = void 0, k = void 0, G = void 0, U = !1; switch (T) { case "year": F = Math.max(1, Math.round(e / Zs / 365)), k = uF(t), G = bAe(t); break; case "half-year": case "quarter": case "month": F = a2e(e), k = Zg(t), G = LZ(t); break; case "week": case "half-week": case "day": F = i2e(e), k = qT(t), G = DZ(t), U = !0; break; case "half-day": case "quarter-day": case "hour": F = o2e(e), k = y1(t), G = MZ(t); break; case "minute": F = S4(e, !0), k = ZT(t), G = OZ(t); break; case "second": F = S4(e, !1), k = KT(t), G = RZ(t); break; case "millisecond": F = s2e(e), k = JT(t), G = NZ(t); break; } s(F, O, N, k, G, U, A), T === "year" && I.length > 1 && D === 0 && I.unshift({ value: I[0].value - F }); } } for (var D = 0; D < A.length; D++) I.push(A[D]); return A; } } for (var l = [], c = [], f = 0, h = 0, p = 0; p < a.length && o++ < i; ++p) { var d = qg(a[p]); if (!!CAe(a[p])) { u(a[p], l[l.length - 1] || [], c); var v = a[p + 1] ? qg(a[p + 1]) : null; if (d !== v) { if (c.length) { h = f, c.sort(function(T, P) { return T.value - P.value; }); for (var g = [], m = 0; m < c.length; ++m) { var y = c[m].value; (m === 0 || c[m - 1].value !== y) && (g.push(c[m]), y >= n[0] && y <= n[1] && f++); } var _ = (n[1] - n[0]) / e; if (f > _ * 1.5 && h > _ / 1.5 || (l.push(g), f > _ || r === a[p])) break; } c = []; } } } process.env.NODE_ENV !== "production" && o >= i && to("Exceed safe limit."); for (var w = Wr(ce(l, function(T) { return Wr(T, function(P) { return P.value >= n[0] && P.value <= n[1] && !P.notAdd; }); }), function(T) { return T.length > 0; }), x = [], C = w.length - 1, p = 0; p < w.length; ++p) for (var S = w[p], b = 0; b < S.length; ++b) x.push({ value: S[b].value, level: C - p }); x.sort(function(T, P) { return T.value - P.value; }); for (var E = [], p = 0; p < x.length; ++p) (p === 0 || x[p].value !== x[p - 1].value) && E.push(x[p]); return E; } wf.registerClass(mJ); const yJ = mJ; var E4 = wf.prototype, b_ = Bh.prototype, c2e = Xn, f2e = Math.floor, h2e = Math.ceil, uC = Math.pow, Ms = Math.log, DF = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "log", t.base = 10, t._originalScale = new Bh(), t._interval = 0, t; } return e.prototype.getTicks = function(t) { var n = this._originalScale, i = this._extent, a = n.getExtent(), o = b_.getTicks.call(this, t); return ce(o, function(s) { var u = s.value, l = Xn(uC(this.base, u)); return l = u === i[0] && this._fixMin ? lC(l, a[0]) : l, l = u === i[1] && this._fixMax ? lC(l, a[1]) : l, { value: l }; }, this); }, e.prototype.setExtent = function(t, n) { var i = this.base; t = Ms(t) / Ms(i), n = Ms(n) / Ms(i), b_.setExtent.call(this, t, n); }, e.prototype.getExtent = function() { var t = this.base, n = E4.getExtent.call(this); n[0] = uC(t, n[0]), n[1] = uC(t, n[1]); var i = this._originalScale, a = i.getExtent(); return this._fixMin && (n[0] = lC(n[0], a[0])), this._fixMax && (n[1] = lC(n[1], a[1])), n; }, e.prototype.unionExtent = function(t) { this._originalScale.unionExtent(t); var n = this.base; t[0] = Ms(t[0]) / Ms(n), t[1] = Ms(t[1]) / Ms(n), E4.unionExtent.call(this, t); }, e.prototype.unionExtentFromData = function(t, n) { this.unionExtent(t.getApproximateExtent(n)); }, e.prototype.calcNiceTicks = function(t) { t = t || 10; var n = this._extent, i = n[1] - n[0]; if (!(i === 1 / 0 || i <= 0)) { var a = HTe(i), o = t / i * a; for (o <= 0.5 && (a *= 10); !isNaN(a) && Math.abs(a) < 1 && Math.abs(a) > 0; ) a *= 10; var s = [Xn(h2e(n[0] / a) * a), Xn(f2e(n[1] / a) * a)]; this._interval = a, this._niceExtent = s; } }, e.prototype.calcNiceExtent = function(t) { b_.calcNiceExtent.call(this, t), this._fixMin = t.fixMin, this._fixMax = t.fixMax; }, e.prototype.parse = function(t) { return t; }, e.prototype.contain = function(t) { return t = Ms(t) / Ms(this.base), iP(t, this._extent); }, e.prototype.normalize = function(t) { return t = Ms(t) / Ms(this.base), aP(t, this._extent); }, e.prototype.scale = function(t) { return t = oP(t, this._extent), uC(this.base, t); }, e.type = "log", e; }(wf), _J = DF.prototype; _J.getMinorTicks = b_.getMinorTicks; _J.getLabel = b_.getLabel; function lC(r, e) { return c2e(r, Rl(e)); } wf.registerClass(DF); const p2e = DF; var d2e = function() { function r(e, t, n) { this._prepareParams(e, t, n); } return r.prototype._prepareParams = function(e, t, n) { n[1] < n[0] && (n = [NaN, NaN]), this._dataMin = n[0], this._dataMax = n[1]; var i = this._isOrdinal = e.type === "ordinal"; this._needCrossZero = e.type === "interval" && t.getNeedCrossZero && t.getNeedCrossZero(); var a = this._modelMinRaw = t.get("min", !0); ze(a) ? this._modelMinNum = cC(e, a({ min: n[0], max: n[1] })) : a !== "dataMin" && (this._modelMinNum = cC(e, a)); var o = this._modelMaxRaw = t.get("max", !0); if (ze(o) ? this._modelMaxNum = cC(e, o({ min: n[0], max: n[1] })) : o !== "dataMax" && (this._modelMaxNum = cC(e, o)), i) this._axisDataLen = t.getCategories().length; else { var s = t.get("boundaryGap"), u = le(s) ? s : [s || 0, s || 0]; typeof u[0] == "boolean" || typeof u[1] == "boolean" ? (process.env.NODE_ENV !== "production" && console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'), this._boundaryGapInner = [0, 0]) : this._boundaryGapInner = [tl(u[0], 1), tl(u[1], 1)]; } }, r.prototype.calculate = function() { var e = this._isOrdinal, t = this._dataMin, n = this._dataMax, i = this._axisDataLen, a = this._boundaryGapInner, o = e ? null : n - t || Math.abs(t), s = this._modelMinRaw === "dataMin" ? t : this._modelMinNum, u = this._modelMaxRaw === "dataMax" ? n : this._modelMaxNum, l = s != null, c = u != null; s == null && (s = e ? i ? 0 : NaN : t - a[0] * o), u == null && (u = e ? i ? i - 1 : NaN : n + a[1] * o), (s == null || !isFinite(s)) && (s = NaN), (u == null || !isFinite(u)) && (u = NaN); var f = kd(s) || kd(u) || e && !i; this._needCrossZero && (s > 0 && u > 0 && !l && (s = 0), s < 0 && u < 0 && !c && (u = 0)); var h = this._determinedMin, p = this._determinedMax; return h != null && (s = h, l = !0), p != null && (u = p, c = !0), { min: s, max: u, minFixed: l, maxFixed: c, isBlank: f }; }, r.prototype.modifyDataMinMax = function(e, t) { process.env.NODE_ENV !== "production" && Ze(!this.frozen), this[g2e[e]] = t; }, r.prototype.setDeterminedMinMax = function(e, t) { var n = v2e[e]; process.env.NODE_ENV !== "production" && Ze(!this.frozen && this[n] == null), this[n] = t; }, r.prototype.freeze = function() { this.frozen = !0; }, r; }(), v2e = { min: "_determinedMin", max: "_determinedMax" }, g2e = { min: "_dataMin", max: "_dataMax" }; function wJ(r, e, t) { var n = r.rawExtentInfo; return n || (n = new d2e(r, e, t), r.rawExtentInfo = n, n); } function cC(r, e) { return e == null ? null : kd(e) ? NaN : r.parse(e); } function xJ(r, e) { var t = r.type, n = wJ(r, e, r.getExtent()).calculate(); r.setBlank(n.isBlank); var i = n.min, a = n.max, o = e.ecModel; if (o && t === "time") { var s = cJ("bar", o), u = !1; if (M(s, function(f) { u = u || f.getBaseAxis() === e.axis; }), u) { var l = fJ(s), c = m2e(i, a, e, l); i = c.min, a = c.max; } } return { extent: [i, a], fixMin: n.minFixed, fixMax: n.maxFixed }; } function m2e(r, e, t, n) { var i = t.axis.getExtent(), a = i[1] - i[0], o = e2e(n, t.axis); if (o === void 0) return { min: r, max: e }; var s = 1 / 0; M(o, function(p) { s = Math.min(p.offset, s); }); var u = -1 / 0; M(o, function(p) { u = Math.max(p.offset + p.width, u); }), s = Math.abs(s), u = Math.abs(u); var l = s + u, c = e - r, f = 1 - (s + u) / a, h = c / f - c; return e += h * (u / l), r -= h * (s / l), { min: r, max: e }; } function Fm(r, e) { var t = e, n = xJ(r, t), i = n.extent, a = t.get("splitNumber"); r instanceof p2e && (r.base = t.get("logBase")); var o = r.type, s = t.get("interval"), u = o === "interval" || o === "time"; r.setExtent(i[0], i[1]), r.calcNiceExtent({ splitNumber: a, fixMin: n.fixMin, fixMax: n.fixMax, minInterval: u ? t.get("minInterval") : null, maxInterval: u ? t.get("maxInterval") : null }), s != null && r.setInterval && r.setInterval(s); } function sP(r, e) { if (e = e || r.get("type"), e) switch (e) { case "category": return new IF({ ordinalMeta: r.getOrdinalMeta ? r.getOrdinalMeta() : r.getCategories(), extent: [1 / 0, -1 / 0] }); case "time": return new yJ({ locale: r.ecModel.getLocaleModel(), useUTC: r.ecModel.get("useUTC") }); default: return new (wf.getClass(e) || Bh)(); } } function y2e(r) { var e = r.scale.getExtent(), t = e[0], n = e[1]; return !(t > 0 && n > 0 || t < 0 && n < 0); } function zw(r) { var e = r.getLabelModel().get("formatter"), t = r.type === "category" ? r.scale.getExtent()[0] : null; return r.scale.type === "time" ? function(n) { return function(i, a) { return r.scale.getFormattedLabel(i, a, n); }; }(e) : Se(e) ? function(n) { return function(i) { var a = r.scale.getLabel(i), o = n.replace("{value}", a != null ? a : ""); return o; }; }(e) : ze(e) ? function(n) { return function(i, a) { return t != null && (a = i.value - t), n(MF(r, i), a, i.level != null ? { level: i.level } : null); }; }(e) : function(n) { return r.scale.getLabel(n); }; } function MF(r, e) { return r.type === "category" ? r.scale.getLabel(e) : e.value; } function _2e(r) { var e = r.model, t = r.scale; if (!(!e.get(["axisLabel", "show"]) || t.isBlank())) { var n, i, a = t.getExtent(); t instanceof IF ? i = t.count() : (n = t.getTicks(), i = n.length); var o = r.getLabelModel(), s = zw(r), u, l = 1; i > 40 && (l = Math.ceil(i / 40)); for (var c = 0; c < i; c += l) { var f = n ? n[c] : { value: a[0] + c }, h = s(f, c), p = o.getTextRect(h), d = w2e(p, o.get("rotate") || 0); u ? u.union(d) : u = d; } return u; } } function w2e(r, e) { var t = e * Math.PI / 180, n = r.width, i = r.height, a = n * Math.abs(Math.cos(t)) + Math.abs(i * Math.sin(t)), o = n * Math.abs(Math.sin(t)) + Math.abs(i * Math.cos(t)), s = new gt(r.x, r.y, a, o); return s; } function OF(r) { var e = r.get("interval"); return e == null ? "auto" : e; } function CJ(r) { return r.type === "category" && OF(r.getLabelModel()) === 0; } function DE(r, e) { var t = {}; return M(r.mapDimensionsAll(e), function(n) { t[iJ(r, n)] = !0; }), At(t); } function x2e(r, e, t) { e && M(DE(e, t), function(n) { var i = e.getApproximateExtent(n); i[0] < r[0] && (r[0] = i[0]), i[1] > r[1] && (r[1] = i[1]); }); } var $w = function() { function r() { } return r.prototype.getNeedCrossZero = function() { var e = this.option; return !e.scale; }, r.prototype.getCoordSysModel = function() { }, r; }(), C2e = 1e-8; function b4(r, e) { return Math.abs(r - e) < C2e; } function Bp(r, e, t) { var n = 0, i = r[0]; if (!i) return !1; for (var a = 1; a < r.length; a++) { var o = r[a]; n += yc(i[0], i[1], o[0], o[1], e, t), i = o; } var s = r[0]; return (!b4(i[0], s[0]) || !b4(i[1], s[1])) && (n += yc(i[0], i[1], s[0], s[1], e, t)), n !== 0; } var S2e = []; function EA(r, e) { for (var t = 0; t < r.length; t++) Ia(r[t], r[t], e); } function T4(r, e, t, n) { for (var i = 0; i < r.length; i++) { var a = r[i]; n && (a = n.project(a)), a && isFinite(a[0]) && isFinite(a[1]) && (Zf(e, e, a), Kf(t, t, a)); } } function E2e(r) { for (var e = 0, t = 0, n = 0, i = r.length, a = r[i - 1][0], o = r[i - 1][1], s = 0; s < i; s++) { var u = r[s][0], l = r[s][1], c = a * l - u * o; e += c, t += (a + u) * c, n += (o + l) * c, a = u, o = l; } return e ? [t / e / 3, n / e / 3, e] : [r[0][0] || 0, r[0][1] || 0]; } var SJ = function() { function r(e) { this.name = e; } return r.prototype.setCenter = function(e) { this._center = e; }, r.prototype.getCenter = function() { var e = this._center; return e || (e = this._center = this.calcCenter()), e; }, r; }(), P4 = function() { function r(e, t) { this.type = "polygon", this.exterior = e, this.interiors = t; } return r; }(), I4 = function() { function r(e) { this.type = "linestring", this.points = e; } return r; }(), EJ = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this, t) || this; return a.type = "geoJSON", a.geometries = n, a._center = i && [i[0], i[1]], a; } return e.prototype.calcCenter = function() { for (var t = this.geometries, n, i = 0, a = 0; a < t.length; a++) { var o = t[a], s = o.exterior, u = s && s.length; u > i && (n = o, i = u); } if (n) return E2e(n.exterior); var l = this.getBoundingRect(); return [l.x + l.width / 2, l.y + l.height / 2]; }, e.prototype.getBoundingRect = function(t) { var n = this._rect; if (n && !t) return n; var i = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0], o = this.geometries; return M(o, function(s) { s.type === "polygon" ? T4(s.exterior, i, a, t) : M(s.points, function(u) { T4(u, i, a, t); }); }), isFinite(i[0]) && isFinite(i[1]) && isFinite(a[0]) && isFinite(a[1]) || (i[0] = i[1] = a[0] = a[1] = 0), n = new gt(i[0], i[1], a[0] - i[0], a[1] - i[1]), t || (this._rect = n), n; }, e.prototype.contain = function(t) { var n = this.getBoundingRect(), i = this.geometries; if (!n.contain(t[0], t[1])) return !1; e: for (var a = 0, o = i.length; a < o; a++) { var s = i[a]; if (s.type === "polygon") { var u = s.exterior, l = s.interiors; if (Bp(u, t[0], t[1])) { for (var c = 0; c < (l ? l.length : 0); c++) if (Bp(l[c], t[0], t[1])) continue e; return !0; } } } return !1; }, e.prototype.transformTo = function(t, n, i, a) { var o = this.getBoundingRect(), s = o.width / o.height; i ? a || (a = i / s) : i = s * a; for (var u = new gt(t, n, i, a), l = o.calculateTransform(u), c = this.geometries, f = 0; f < c.length; f++) { var h = c[f]; h.type === "polygon" ? (EA(h.exterior, l), M(h.interiors, function(p) { EA(p, l); })) : M(h.points, function(p) { EA(p, l); }); } o = this._rect, o.copy(u), this._center = [o.x + o.width / 2, o.y + o.height / 2]; }, e.prototype.cloneShallow = function(t) { t == null && (t = this.name); var n = new e(t, this.geometries, this._center); return n._rect = this._rect, n.transformTo = null, n; }, e; }(SJ), b2e = function(r) { W(e, r); function e(t, n) { var i = r.call(this, t) || this; return i.type = "geoSVG", i._elOnlyForCalculate = n, i; } return e.prototype.calcCenter = function() { for (var t = this._elOnlyForCalculate, n = t.getBoundingRect(), i = [n.x + n.width / 2, n.y + n.height / 2], a = OT(S2e), o = t; o && !o.isGeoSVGGraphicRoot; ) Bc(a, o.getLocalTransform(), a), o = o.parent; return yy(a, a), Ia(i, i, a), i; }, e; }(SJ); function T2e(r) { if (!r.UTF8Encoding) return r; var e = r, t = e.UTF8Scale; t == null && (t = 1024); var n = e.features; return M(n, function(i) { var a = i.geometry, o = a.encodeOffsets, s = a.coordinates; if (!!o) switch (a.type) { case "LineString": a.coordinates = bJ(s, o, t); break; case "Polygon": bA(s, o, t); break; case "MultiLineString": bA(s, o, t); break; case "MultiPolygon": M(s, function(u, l) { return bA(u, o[l], t); }); } }), e.UTF8Encoding = !1, e; } function bA(r, e, t) { for (var n = 0; n < r.length; n++) r[n] = bJ(r[n], e[n], t); } function bJ(r, e, t) { for (var n = [], i = e[0], a = e[1], o = 0; o < r.length; o += 2) { var s = r.charCodeAt(o) - 64, u = r.charCodeAt(o + 1) - 64; s = s >> 1 ^ -(s & 1), u = u >> 1 ^ -(u & 1), s += i, u += a, i = s, a = u, n.push([s / t, u / t]); } return n; } function P2e(r, e) { return r = T2e(r), ce(Wr(r.features, function(t) { return t.geometry && t.properties && t.geometry.coordinates.length > 0; }), function(t) { var n = t.properties, i = t.geometry, a = []; switch (i.type) { case "Polygon": var o = i.coordinates; a.push(new P4(o[0], o.slice(1))); break; case "MultiPolygon": M(i.coordinates, function(u) { u[0] && a.push(new P4(u[0], u.slice(1))); }); break; case "LineString": a.push(new I4([i.coordinates])); break; case "MultiLineString": a.push(new I4(i.coordinates)); } var s = new EJ(n[e || "name"], a, n.cp); return s.properties = n, s; }); } var E1 = Ut(); function I2e(r) { return r.type === "category" ? L2e(r) : M2e(r); } function A2e(r, e) { return r.type === "category" ? D2e(r, e) : { ticks: ce(r.scale.getTicks(), function(t) { return t.value; }) }; } function L2e(r) { var e = r.getLabelModel(), t = TJ(r, e); return !e.get("show") || r.scale.isBlank() ? { labels: [], labelCategoryInterval: t.labelCategoryInterval } : t; } function TJ(r, e) { var t = PJ(r, "labels"), n = OF(e), i = IJ(t, n); if (i) return i; var a, o; return ze(n) ? a = DJ(r, n) : (o = n === "auto" ? O2e(r) : n, a = LJ(r, o)), AJ(t, n, { labels: a, labelCategoryInterval: o }); } function D2e(r, e) { var t = PJ(r, "ticks"), n = OF(e), i = IJ(t, n); if (i) return i; var a, o; if ((!e.get("show") || r.scale.isBlank()) && (a = []), ze(n)) a = DJ(r, n, !0); else if (n === "auto") { var s = TJ(r, r.getLabelModel()); o = s.labelCategoryInterval, a = ce(s.labels, function(u) { return u.tickValue; }); } else o = n, a = LJ(r, o, !0); return AJ(t, n, { ticks: a, tickCategoryInterval: o }); } function M2e(r) { var e = r.scale.getTicks(), t = zw(r); return { labels: ce(e, function(n, i) { return { level: n.level, formattedLabel: t(n, i), rawLabel: r.scale.getLabel(n), tickValue: n.value }; }) }; } function PJ(r, e) { return E1(r)[e] || (E1(r)[e] = []); } function IJ(r, e) { for (var t = 0; t < r.length; t++) if (r[t].key === e) return r[t].value; } function AJ(r, e, t) { return r.push({ key: e, value: t }), t; } function O2e(r) { var e = E1(r).autoInterval; return e != null ? e : E1(r).autoInterval = r.calculateCategoryInterval(); } function R2e(r) { var e = N2e(r), t = zw(r), n = (e.axisRotate - e.labelRotate) / 180 * Math.PI, i = r.scale, a = i.getExtent(), o = i.count(); if (a[1] - a[0] < 1) return 0; var s = 1; o > 40 && (s = Math.max(1, Math.floor(o / 40))); for (var u = a[0], l = r.dataToCoord(u + 1) - r.dataToCoord(u), c = Math.abs(l * Math.cos(n)), f = Math.abs(l * Math.sin(n)), h = 0, p = 0; u <= a[1]; u += s) { var d = 0, v = 0, g = Mw(t({ value: u }), e.font, "center", "top"); d = g.width * 1.3, v = g.height * 1.3, h = Math.max(h, d, 7), p = Math.max(p, v, 7); } var m = h / c, y = p / f; isNaN(m) && (m = 1 / 0), isNaN(y) && (y = 1 / 0); var _ = Math.max(0, Math.floor(Math.min(m, y))), w = E1(r.model), x = r.getExtent(), C = w.lastAutoInterval, S = w.lastTickCount; return C != null && S != null && Math.abs(C - _) <= 1 && Math.abs(S - o) <= 1 && C > _ && w.axisExtent0 === x[0] && w.axisExtent1 === x[1] ? _ = C : (w.lastTickCount = o, w.lastAutoInterval = _, w.axisExtent0 = x[0], w.axisExtent1 = x[1]), _; } function N2e(r) { var e = r.getLabelModel(); return { axisRotate: r.getRotate ? r.getRotate() : r.isHorizontal && !r.isHorizontal() ? 90 : 0, labelRotate: e.get("rotate") || 0, font: e.getFont() }; } function LJ(r, e, t) { var n = zw(r), i = r.scale, a = i.getExtent(), o = r.getLabelModel(), s = [], u = Math.max((e || 0) + 1, 1), l = a[0], c = i.count(); l !== 0 && u > 1 && c / u > 2 && (l = Math.round(Math.ceil(l / u) * u)); var f = CJ(r), h = o.get("showMinLabel") || f, p = o.get("showMaxLabel") || f; h && l !== a[0] && v(a[0]); for (var d = l; d <= a[1]; d += u) v(d); p && d - u !== a[1] && v(a[1]); function v(g) { var m = { value: g }; s.push(t ? g : { formattedLabel: n(m), rawLabel: i.getLabel(m), tickValue: g }); } return s; } function DJ(r, e, t) { var n = r.scale, i = zw(r), a = []; return M(n.getTicks(), function(o) { var s = n.getLabel(o), u = o.value; e(o.value, s) && a.push(t ? u : { formattedLabel: i(o), rawLabel: s, tickValue: u }); }), a; } var A4 = [0, 1], F2e = function() { function r(e, t, n) { this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = t, this._extent = n || [0, 0]; } return r.prototype.contain = function(e) { var t = this._extent, n = Math.min(t[0], t[1]), i = Math.max(t[0], t[1]); return e >= n && e <= i; }, r.prototype.containData = function(e) { return this.scale.contain(e); }, r.prototype.getExtent = function() { return this._extent.slice(); }, r.prototype.getPixelPrecision = function(e) { return dq(e || this.scale.getExtent(), this._extent); }, r.prototype.setExtent = function(e, t) { var n = this._extent; n[0] = e, n[1] = t; }, r.prototype.dataToCoord = function(e, t) { var n = this._extent, i = this.scale; return e = i.normalize(e), this.onBand && i.type === "ordinal" && (n = n.slice(), L4(n, i.count())), Fr(e, A4, n, t); }, r.prototype.coordToData = function(e, t) { var n = this._extent, i = this.scale; this.onBand && i.type === "ordinal" && (n = n.slice(), L4(n, i.count())); var a = Fr(e, n, A4, t); return this.scale.scale(a); }, r.prototype.pointToData = function(e, t) { }, r.prototype.getTicksCoords = function(e) { e = e || {}; var t = e.tickModel || this.getTickModel(), n = A2e(this, t), i = n.ticks, a = ce(i, function(s) { return { coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s), tickValue: s }; }, this), o = t.get("alignWithLabel"); return B2e(this, a, o, e.clamp), a; }, r.prototype.getMinorTicksCoords = function() { if (this.scale.type === "ordinal") return []; var e = this.model.getModel("minorTick"), t = e.get("splitNumber"); t > 0 && t < 100 || (t = 5); var n = this.scale.getMinorTicks(t), i = ce(n, function(a) { return ce(a, function(o) { return { coord: this.dataToCoord(o), tickValue: o }; }, this); }, this); return i; }, r.prototype.getViewLabels = function() { return I2e(this).labels; }, r.prototype.getLabelModel = function() { return this.model.getModel("axisLabel"); }, r.prototype.getTickModel = function() { return this.model.getModel("axisTick"); }, r.prototype.getBandWidth = function() { var e = this._extent, t = this.scale.getExtent(), n = t[1] - t[0] + (this.onBand ? 1 : 0); n === 0 && (n = 1); var i = Math.abs(e[1] - e[0]); return Math.abs(i) / n; }, r.prototype.calculateCategoryInterval = function() { return R2e(this); }, r; }(); function L4(r, e) { var t = r[1] - r[0], n = e, i = t / n / 2; r[0] += i, r[1] -= i; } function B2e(r, e, t, n) { var i = e.length; if (!r.onBand || t || !i) return; var a = r.getExtent(), o, s; if (i === 1) e[0].coord = a[0], o = e[1] = { coord: a[0] }; else { var u = e[i - 1].tickValue - e[0].tickValue, l = (e[i - 1].coord - e[0].coord) / u; M(e, function(p) { p.coord -= l / 2; }); var c = r.scale.getExtent(); s = 1 + c[1] - e[i - 1].tickValue, o = { coord: e[i - 1].coord + l * s }, e.push(o); } var f = a[0] > a[1]; h(e[0].coord, a[0]) && (n ? e[0].coord = a[0] : e.shift()), n && h(a[0], e[0].coord) && e.unshift({ coord: a[0] }), h(a[1], o.coord) && (n ? o.coord = a[1] : e.pop()), n && h(o.coord, a[1]) && e.push({ coord: a[1] }); function h(p, d) { return p = Xn(p), d = Xn(d), f ? p > d : p < d; } } const pl = F2e; var g0 = Math.PI * 2, xp = tc.CMD, k2e = ["top", "right", "bottom", "left"]; function V2e(r, e, t, n, i) { var a = t.width, o = t.height; switch (r) { case "top": n.set(t.x + a / 2, t.y - e), i.set(0, -1); break; case "bottom": n.set(t.x + a / 2, t.y + o + e), i.set(0, 1); break; case "left": n.set(t.x - e, t.y + o / 2), i.set(-1, 0); break; case "right": n.set(t.x + a + e, t.y + o / 2), i.set(1, 0); break; } } function G2e(r, e, t, n, i, a, o, s, u) { o -= r, s -= e; var l = Math.sqrt(o * o + s * s); o /= l, s /= l; var c = o * t + r, f = s * t + e; if (Math.abs(n - i) % g0 < 1e-4) return u[0] = c, u[1] = f, l - t; if (a) { var h = n; n = th(i), i = th(h); } else n = th(n), i = th(i); n > i && (i += g0); var p = Math.atan2(s, o); if (p < 0 && (p += g0), p >= n && p <= i || p + g0 >= n && p + g0 <= i) return u[0] = c, u[1] = f, l - t; var d = t * Math.cos(n) + r, v = t * Math.sin(n) + e, g = t * Math.cos(i) + r, m = t * Math.sin(i) + e, y = (d - o) * (d - o) + (v - s) * (v - s), _ = (g - o) * (g - o) + (m - s) * (m - s); return y < _ ? (u[0] = d, u[1] = v, Math.sqrt(y)) : (u[0] = g, u[1] = m, Math.sqrt(_)); } function ME(r, e, t, n, i, a, o, s) { var u = i - r, l = a - e, c = t - r, f = n - e, h = Math.sqrt(c * c + f * f); c /= h, f /= h; var p = u * c + l * f, d = p / h; s && (d = Math.min(Math.max(d, 0), 1)), d *= h; var v = o[0] = r + d * c, g = o[1] = e + d * f; return Math.sqrt((v - i) * (v - i) + (g - a) * (g - a)); } function MJ(r, e, t, n, i, a, o) { t < 0 && (r = r + t, t = -t), n < 0 && (e = e + n, n = -n); var s = r + t, u = e + n, l = o[0] = Math.min(Math.max(i, r), s), c = o[1] = Math.min(Math.max(a, e), u); return Math.sqrt((l - i) * (l - i) + (c - a) * (c - a)); } var Du = []; function z2e(r, e, t) { var n = MJ(e.x, e.y, e.width, e.height, r.x, r.y, Du); return t.set(Du[0], Du[1]), n; } function $2e(r, e, t) { for (var n = 0, i = 0, a = 0, o = 0, s, u, l = 1 / 0, c = e.data, f = r.x, h = r.y, p = 0; p < c.length; ) { var d = c[p++]; p === 1 && (n = c[p], i = c[p + 1], a = n, o = i); var v = l; switch (d) { case xp.M: a = c[p++], o = c[p++], n = a, i = o; break; case xp.L: v = ME(n, i, c[p], c[p + 1], f, h, Du, !0), n = c[p++], i = c[p++]; break; case xp.C: v = qX(n, i, c[p++], c[p++], c[p++], c[p++], c[p], c[p + 1], f, h, Du), n = c[p++], i = c[p++]; break; case xp.Q: v = KX(n, i, c[p++], c[p++], c[p], c[p + 1], f, h, Du), n = c[p++], i = c[p++]; break; case xp.A: var g = c[p++], m = c[p++], y = c[p++], _ = c[p++], w = c[p++], x = c[p++]; p += 1; var C = !!(1 - c[p++]); s = Math.cos(w) * y + g, u = Math.sin(w) * _ + m, p <= 1 && (a = s, o = u); var S = (f - g) * _ / y + g; v = G2e(g, m, _, w, w + x, C, S, h, Du), n = Math.cos(w + x) * y + g, i = Math.sin(w + x) * _ + m; break; case xp.R: a = n = c[p++], o = i = c[p++]; var b = c[p++], E = c[p++]; v = MJ(a, o, b, E, f, h, Du); break; case xp.Z: v = ME(n, i, a, o, f, h, Du, !0), n = a, i = o; break; } v < l && (l = v, t.set(Du[0], Du[1])); } return l; } var ku = new ft(), en = new ft(), Qn = new ft(), Bl = new ft(), Ml = new ft(); function D4(r, e) { if (!!r) { var t = r.getTextGuideLine(), n = r.getTextContent(); if (!!(n && t)) { var i = r.textGuideLineConfig || {}, a = [[0, 0], [0, 0], [0, 0]], o = i.candidates || k2e, s = n.getBoundingRect().clone(); s.applyTransform(n.getComputedTransform()); var u = 1 / 0, l = i.anchor, c = r.getComputedTransform(), f = c && yy([], c), h = e.get("length2") || 0; l && Qn.copy(l); for (var p = 0; p < o.length; p++) { var d = o[p]; V2e(d, 0, s, ku, Bl), ft.scaleAndAdd(en, ku, Bl, h), en.transform(f); var v = r.getBoundingRect(), g = l ? l.distance(en) : r instanceof Tt ? $2e(en, r.path, Qn) : z2e(en, v, Qn); g < u && (u = g, en.transform(c), Qn.transform(c), Qn.toArray(a[0]), en.toArray(a[1]), ku.toArray(a[2])); } OJ(a, e.get("minTurnAngle")), t.setShape({ points: a }); } } } var OE = [], uo = new ft(); function OJ(r, e) { if (e <= 180 && e > 0) { e = e / 180 * Math.PI, ku.fromArray(r[0]), en.fromArray(r[1]), Qn.fromArray(r[2]), ft.sub(Bl, ku, en), ft.sub(Ml, Qn, en); var t = Bl.len(), n = Ml.len(); if (!(t < 1e-3 || n < 1e-3)) { Bl.scale(1 / t), Ml.scale(1 / n); var i = Bl.dot(Ml), a = Math.cos(e); if (a < i) { var o = ME(en.x, en.y, Qn.x, Qn.y, ku.x, ku.y, OE, !1); uo.fromArray(OE), uo.scaleAndAdd(Ml, o / Math.tan(Math.PI - e)); var s = Qn.x !== en.x ? (uo.x - en.x) / (Qn.x - en.x) : (uo.y - en.y) / (Qn.y - en.y); if (isNaN(s)) return; s < 0 ? ft.copy(uo, en) : s > 1 && ft.copy(uo, Qn), uo.toArray(r[1]); } } } } function H2e(r, e, t) { if (t <= 180 && t > 0) { t = t / 180 * Math.PI, ku.fromArray(r[0]), en.fromArray(r[1]), Qn.fromArray(r[2]), ft.sub(Bl, en, ku), ft.sub(Ml, Qn, en); var n = Bl.len(), i = Ml.len(); if (!(n < 1e-3 || i < 1e-3)) { Bl.scale(1 / n), Ml.scale(1 / i); var a = Bl.dot(e), o = Math.cos(t); if (a < o) { var s = ME(en.x, en.y, Qn.x, Qn.y, ku.x, ku.y, OE, !1); uo.fromArray(OE); var u = Math.PI / 2, l = Math.acos(Ml.dot(e)), c = u + l - t; if (c >= u) ft.copy(uo, Qn); else { uo.scaleAndAdd(Ml, s / Math.tan(Math.PI / 2 - c)); var f = Qn.x !== en.x ? (uo.x - en.x) / (Qn.x - en.x) : (uo.y - en.y) / (Qn.y - en.y); if (isNaN(f)) return; f < 0 ? ft.copy(uo, en) : f > 1 && ft.copy(uo, Qn); } uo.toArray(r[1]); } } } } function M4(r, e, t, n) { var i = t === "normal", a = i ? r : r.ensureState(t); a.ignore = e; var o = n.get("smooth"); o && o === !0 && (o = 0.3), a.shape = a.shape || {}, o > 0 && (a.shape.smooth = o); var s = n.getModel("lineStyle").getLineStyle(); i ? r.useStyle(s) : a.style = s; } function U2e(r, e) { var t = e.smooth, n = e.points; if (!!n) if (r.moveTo(n[0][0], n[0][1]), t > 0 && n.length >= 3) { var i = qf(n[0], n[1]), a = qf(n[1], n[2]); if (!i || !a) { r.lineTo(n[1][0], n[1][1]), r.lineTo(n[2][0], n[2][1]); return; } var o = Math.min(i, a) * t, s = nS([], n[1], n[0], o / i), u = nS([], n[1], n[2], o / a), l = nS([], s, u, 0.5); r.bezierCurveTo(s[0], s[1], s[0], s[1], l[0], l[1]), r.bezierCurveTo(u[0], u[1], u[0], u[1], n[2][0], n[2][1]); } else for (var c = 1; c < n.length; c++) r.lineTo(n[c][0], n[c][1]); } function RF(r, e, t) { var n = r.getTextGuideLine(), i = r.getTextContent(); if (!i) { n && r.removeTextGuideLine(); return; } for (var a = e.normal, o = a.get("show"), s = i.ignore, u = 0; u < v1.length; u++) { var l = v1[u], c = e[l], f = l === "normal"; if (c) { var h = c.get("show"), p = f ? s : wt(i.states[l] && i.states[l].ignore, s); if (p || !wt(h, o)) { var d = f ? n : n && n.states[l]; d && (d.ignore = !0); continue; } n || (n = new jo(), r.setTextGuideLine(n), !f && (s || !o) && M4(n, !0, "normal", e.normal), r.stateProxy && (n.stateProxy = r.stateProxy)), M4(n, !1, l, c); } } if (n) { qe(n.style, t), n.style.fill = null; var v = a.get("showAbove"), g = r.textGuideLineConfig = r.textGuideLineConfig || {}; g.showAbove = v || !1, n.buildPath = U2e; } } function NF(r, e) { e = e || "labelLine"; for (var t = { normal: r.getModel(e) }, n = 0; n < Co.length; n++) { var i = Co[n]; t[i] = r.getModel([i, e]); } return t; } function RJ(r) { for (var e = [], t = 0; t < r.length; t++) { var n = r[t]; if (!n.defaultAttr.ignore) { var i = n.label, a = i.getComputedTransform(), o = i.getBoundingRect(), s = !a || a[1] < 1e-5 && a[2] < 1e-5, u = i.style.margin || 0, l = o.clone(); l.applyTransform(a), l.x -= u / 2, l.y -= u / 2, l.width += u, l.height += u; var c = s ? new vE(o, a) : null; e.push({ label: i, labelLine: n.labelLine, rect: l, localRect: o, obb: c, priority: n.priority, defaultAttr: n.defaultAttr, layoutOption: n.computedLayoutOption, axisAligned: s, transform: a }); } } return e; } function NJ(r, e, t, n, i, a) { var o = r.length; if (o < 2) return; r.sort(function(b, E) { return b.rect[e] - E.rect[e]; }); for (var s = 0, u, l = !1, c = 0, f = 0; f < o; f++) { var h = r[f], p = h.rect; u = p[e] - s, u < 0 && (p[e] -= u, h.label[e] -= u, l = !0); var d = Math.max(-u, 0); c += d, s = p[e] + p[t]; } c > 0 && a && x(-c / o, 0, o); var v = r[0], g = r[o - 1], m, y; _(), m < 0 && C(-m, 0.8), y < 0 && C(y, 0.8), _(), w(m, y, 1), w(y, m, -1), _(), m < 0 && S(-m), y < 0 && S(y); function _() { m = v.rect[e] - n, y = i - g.rect[e] - g.rect[t]; } function w(b, E, T) { if (b < 0) { var P = Math.min(E, -b); if (P > 0) { x(P * T, 0, o); var I = P + b; I < 0 && C(-I * T, 1); } else C(-b * T, 1); } } function x(b, E, T) { b !== 0 && (l = !0); for (var P = E; P < T; P++) { var I = r[P], A = I.rect; A[e] += b, I.label[e] += b; } } function C(b, E) { for (var T = [], P = 0, I = 1; I < o; I++) { var A = r[I - 1].rect, L = Math.max(r[I].rect[e] - A[e] - A[t], 0); T.push(L), P += L; } if (!!P) { var D = Math.min(Math.abs(b) / P, E); if (b > 0) for (var I = 0; I < o - 1; I++) { var O = T[I] * D; x(O, 0, I + 1); } else for (var I = o - 1; I > 0; I--) { var O = T[I - 1] * D; x(-O, I, o); } } } function S(b) { var E = b < 0 ? -1 : 1; b = Math.abs(b); for (var T = Math.ceil(b / (o - 1)), P = 0; P < o - 1; P++) if (E > 0 ? x(T, 0, P + 1) : x(-T, o - P - 1, o), b -= T, b <= 0) return; } return l; } function W2e(r, e, t, n) { return NJ(r, "x", "width", e, t, n); } function FJ(r, e, t, n) { return NJ(r, "y", "height", e, t, n); } function BJ(r) { var e = []; r.sort(function(v, g) { return g.priority - v.priority; }); var t = new gt(0, 0, 0, 0); function n(v) { if (!v.ignore) { var g = v.ensureState("emphasis"); g.ignore == null && (g.ignore = !1); } v.ignore = !0; } for (var i = 0; i < r.length; i++) { var a = r[i], o = a.axisAligned, s = a.localRect, u = a.transform, l = a.label, c = a.labelLine; t.copy(a.rect), t.width -= 0.1, t.height -= 0.1, t.x += 0.05, t.y += 0.05; for (var f = a.obb, h = !1, p = 0; p < e.length; p++) { var d = e[p]; if (!!t.intersect(d.rect)) { if (o && d.axisAligned) { h = !0; break; } if (d.obb || (d.obb = new vE(d.localRect, d.transform)), f || (f = new vE(s, u)), f.intersect(d.obb)) { h = !0; break; } } } h ? (n(l), c && n(c)) : (l.attr("ignore", a.defaultAttr.ignore), c && c.attr("ignore", a.defaultAttr.labelGuideIgnore), e.push(a)); } } function j2e(r) { if (r) { for (var e = [], t = 0; t < r.length; t++) e.push(r[t].slice()); return e; } } function Y2e(r, e) { var t = r.label, n = e && e.getTextGuideLine(); return { dataIndex: r.dataIndex, dataType: r.dataType, seriesIndex: r.seriesModel.seriesIndex, text: r.label.style.text, rect: r.hostRect, labelRect: r.rect, align: t.style.align, verticalAlign: t.style.verticalAlign, labelLinePoints: j2e(n && n.shape.points) }; } var O4 = ["align", "verticalAlign", "width", "height", "fontSize"], qo = new Ic(), TA = Ut(), X2e = Ut(); function fC(r, e, t) { for (var n = 0; n < t.length; n++) { var i = t[n]; e[i] != null && (r[i] = e[i]); } } var hC = ["x", "y", "rotation"], q2e = function() { function r() { this._labelList = [], this._chartViewList = []; } return r.prototype.clearLabels = function() { this._labelList = [], this._chartViewList = []; }, r.prototype._addLabel = function(e, t, n, i, a) { var o = i.style, s = i.__hostTarget, u = s.textConfig || {}, l = i.getComputedTransform(), c = i.getBoundingRect().plain(); gt.applyTransform(c, c, l), l ? qo.setLocalTransform(l) : (qo.x = qo.y = qo.rotation = qo.originX = qo.originY = 0, qo.scaleX = qo.scaleY = 1); var f = i.__hostTarget, h; if (f) { h = f.getBoundingRect().plain(); var p = f.getComputedTransform(); gt.applyTransform(h, h, p); } var d = h && f.getTextGuideLine(); this._labelList.push({ label: i, labelLine: d, seriesModel: n, dataIndex: e, dataType: t, layoutOption: a, computedLayoutOption: null, rect: c, hostRect: h, priority: h ? h.width * h.height : 0, defaultAttr: { ignore: i.ignore, labelGuideIgnore: d && d.ignore, x: qo.x, y: qo.y, scaleX: qo.scaleX, scaleY: qo.scaleY, rotation: qo.rotation, style: { x: o.x, y: o.y, align: o.align, verticalAlign: o.verticalAlign, width: o.width, height: o.height, fontSize: o.fontSize }, cursor: i.cursor, attachedPos: u.position, attachedRot: u.rotation } }); }, r.prototype.addLabelsOfSeries = function(e) { var t = this; this._chartViewList.push(e); var n = e.__model, i = n.get("labelLayout"); !(ze(i) || At(i).length) || e.group.traverse(function(a) { if (a.ignore) return !0; var o = a.getTextContent(), s = nt(a); o && !o.disableLabelLayout && t._addLabel(s.dataIndex, s.dataType, n, o, i); }); }, r.prototype.updateLayoutConfig = function(e) { var t = e.getWidth(), n = e.getHeight(); function i(_, w) { return function() { D4(_, w); }; } for (var a = 0; a < this._labelList.length; a++) { var o = this._labelList[a], s = o.label, u = s.__hostTarget, l = o.defaultAttr, c = void 0; ze(o.layoutOption) ? c = o.layoutOption(Y2e(o, u)) : c = o.layoutOption, c = c || {}, o.computedLayoutOption = c; var f = Math.PI / 180; u && u.setTextConfig({ local: !1, position: c.x != null || c.y != null ? null : l.attachedPos, rotation: c.rotate != null ? c.rotate * f : l.attachedRot, offset: [c.dx || 0, c.dy || 0] }); var h = !1; if (c.x != null ? (s.x = ye(c.x, t), s.setStyle("x", 0), h = !0) : (s.x = l.x, s.setStyle("x", l.style.x)), c.y != null ? (s.y = ye(c.y, n), s.setStyle("y", 0), h = !0) : (s.y = l.y, s.setStyle("y", l.style.y)), c.labelLinePoints) { var p = u.getTextGuideLine(); p && (p.setShape({ points: c.labelLinePoints }), h = !1); } var d = TA(s); d.needsUpdateLabelLine = h, s.rotation = c.rotate != null ? c.rotate * f : l.rotation, s.scaleX = l.scaleX, s.scaleY = l.scaleY; for (var v = 0; v < O4.length; v++) { var g = O4[v]; s.setStyle(g, c[g] != null ? c[g] : l.style[g]); } if (c.draggable) { if (s.draggable = !0, s.cursor = "move", u) { var m = o.seriesModel; if (o.dataIndex != null) { var y = o.seriesModel.getData(o.dataType); m = y.getItemModel(o.dataIndex); } s.on("drag", i(u, m.getModel("labelLine"))); } } else s.off("drag"), s.cursor = l.cursor; } }, r.prototype.layout = function(e) { var t = e.getWidth(), n = e.getHeight(), i = RJ(this._labelList), a = Wr(i, function(u) { return u.layoutOption.moveOverlap === "shiftX"; }), o = Wr(i, function(u) { return u.layoutOption.moveOverlap === "shiftY"; }); W2e(a, 0, t), FJ(o, 0, n); var s = Wr(i, function(u) { return u.layoutOption.hideOverlap; }); BJ(s); }, r.prototype.processLabelsOverall = function() { var e = this; M(this._chartViewList, function(t) { var n = t.__model, i = t.ignoreLabelLineUpdate, a = n.isAnimationEnabled(); t.group.traverse(function(o) { if (o.ignore && !o.forceLabelAnimation) return !0; var s = !i, u = o.getTextContent(); !s && u && (s = TA(u).needsUpdateLabelLine), s && e._updateLabelLine(o, n), a && e._animateLabels(o, n); }); }); }, r.prototype._updateLabelLine = function(e, t) { var n = e.getTextContent(), i = nt(e), a = i.dataIndex; if (n && a != null) { var o = t.getData(i.dataType), s = o.getItemModel(a), u = {}, l = o.getItemVisual(a, "style"), c = o.getVisual("drawType"); u.stroke = l[c]; var f = s.getModel("labelLine"); RF(e, NF(s), u), D4(e, f); } }, r.prototype._animateLabels = function(e, t) { var n = e.getTextContent(), i = e.getTextGuideLine(); if (n && (e.forceLabelAnimation || !n.ignore && !n.invisible && !e.disableLabelAnimation && !Xg(e))) { var a = TA(n), o = a.oldLayout, s = nt(e), u = s.dataIndex, l = { x: n.x, y: n.y, rotation: n.rotation }, c = t.getData(s.dataType); if (o) { n.attr(o); var h = e.prevStates; h && (_t(h, "select") >= 0 && n.attr(a.oldLayoutSelect), _t(h, "emphasis") >= 0 && n.attr(a.oldLayoutEmphasis)), Ht(n, l, t, u); } else if (n.attr(l), !Ey(n).valueAnimation) { var f = wt(n.style.opacity, 1); n.style.opacity = 0, Cn(n, { style: { opacity: f } }, t, u); } if (a.oldLayout = l, n.states.select) { var p = a.oldLayoutSelect = {}; fC(p, l, hC), fC(p, n.states.select, hC); } if (n.states.emphasis) { var d = a.oldLayoutEmphasis = {}; fC(d, l, hC), fC(d, n.states.emphasis, hC); } SZ(n, u, c, t, t); } if (i && !i.ignore && !i.invisible) { var a = X2e(i), o = a.oldLayout, v = { points: i.shape.points }; o ? (i.attr({ shape: o }), Ht(i, { shape: v }, t)) : (i.setShape(v), i.style.strokePercent = 0, Cn(i, { style: { strokePercent: 1 } }, t)), a.oldLayout = v; } }, r; }(); const Z2e = q2e; var PA = Ut(); function K2e(r) { r.registerUpdateLifecycle("series:beforeupdate", function(e, t, n) { var i = PA(t).labelManager; i || (i = PA(t).labelManager = new Z2e()), i.clearLabels(); }), r.registerUpdateLifecycle("series:layoutlabels", function(e, t, n) { var i = PA(t).labelManager; n.updatedSeries.forEach(function(a) { i.addLabelsOfSeries(t.getViewOfSeriesModel(a)); }), i.updateLayoutConfig(t), i.layout(t), i.processLabelsOverall(); }); } var IA = Math.sin, AA = Math.cos, kJ = Math.PI, Cp = Math.PI * 2, J2e = 180 / kJ, Q2e = function() { function r() { } return r.prototype.reset = function(e) { this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4); }, r.prototype.moveTo = function(e, t) { this._add("M", e, t); }, r.prototype.lineTo = function(e, t) { this._add("L", e, t); }, r.prototype.bezierCurveTo = function(e, t, n, i, a, o) { this._add("C", e, t, n, i, a, o); }, r.prototype.quadraticCurveTo = function(e, t, n, i) { this._add("Q", e, t, n, i); }, r.prototype.arc = function(e, t, n, i, a, o) { this.ellipse(e, t, n, n, 0, i, a, o); }, r.prototype.ellipse = function(e, t, n, i, a, o, s, u) { var l = s - o, c = !u, f = Math.abs(l), h = eh(f - Cp) || (c ? l >= Cp : -l >= Cp), p = l > 0 ? l % Cp : l % Cp + Cp, d = !1; h ? d = !0 : eh(f) ? d = !1 : d = p >= kJ == !!c; var v = e + n * AA(o), g = t + i * IA(o); this._start && this._add("M", v, g); var m = Math.round(a * J2e); if (h) { var y = 1 / this._p, _ = (c ? 1 : -1) * (Cp - y); this._add("A", n, i, m, 1, +c, e + n * AA(o + _), t + i * IA(o + _)), y > 0.01 && this._add("A", n, i, m, 0, +c, v, g); } else { var w = e + n * AA(s), x = t + i * IA(s); this._add("A", n, i, m, +d, +c, w, x); } }, r.prototype.rect = function(e, t, n, i) { this._add("M", e, t), this._add("l", n, 0), this._add("l", 0, i), this._add("l", -n, 0), this._add("Z"); }, r.prototype.closePath = function() { this._d.length > 0 && this._add("Z"); }, r.prototype._add = function(e, t, n, i, a, o, s, u, l) { for (var c = [], f = this._p, h = 1; h < arguments.length; h++) { var p = arguments[h]; if (isNaN(p)) { this._invalid = !0; return; } c.push(Math.round(p * f) / f); } this._d.push(e + c.join(" ")), this._start = e === "Z"; }, r.prototype.generateStr = function() { this._str = this._invalid ? "" : this._d.join(""), this._d = []; }, r.prototype.getStr = function() { return this._str; }, r; }(); const VJ = Q2e; var T_ = "none", eOe = Math.round; function tOe(r) { var e = r.fill; return e != null && e !== T_; } function rOe(r) { var e = r.stroke; return e != null && e !== T_; } var f2 = ["lineCap", "miterLimit", "lineJoin"], nOe = ce(f2, function(r) { return "stroke-" + r.toLowerCase(); }); function iOe(r, e, t, n) { var i = e.opacity == null ? 1 : e.opacity; if (t instanceof Ba) { r("opacity", i); return; } if (tOe(e)) { var a = Mm(e.fill); r("fill", a.color); var o = e.fillOpacity != null ? e.fillOpacity * a.opacity * i : a.opacity * i; (n || o < 1) && r("fill-opacity", o); } else r("fill", T_); if (rOe(e)) { var s = Mm(e.stroke); r("stroke", s.color); var u = e.strokeNoScale ? t.getLineScale() : 1, l = u ? (e.lineWidth || 0) / u : 0, c = e.strokeOpacity != null ? e.strokeOpacity * s.opacity * i : s.opacity * i, f = e.strokeFirst; if ((n || l !== 1) && r("stroke-width", l), (n || f) && r("paint-order", f ? "stroke" : "fill"), (n || c < 1) && r("stroke-opacity", c), e.lineDash) { var h = CF(t), p = h[0], d = h[1]; p && (d = eOe(d || 0), r("stroke-dasharray", p.join(",")), (d || n) && r("stroke-dashoffset", d)); } else n && r("stroke-dasharray", T_); for (var v = 0; v < f2.length; v++) { var g = f2[v]; if (n || e[g] !== pE[g]) { var m = e[g] || pE[g]; m && r(nOe[v], m); } } } else n && r("stroke", T_); } var GJ = "http://www.w3.org/2000/svg", zJ = "http://www.w3.org/1999/xlink", aOe = "http://www.w3.org/2000/xmlns/", oOe = "http://www.w3.org/XML/1998/namespace"; function $J(r) { return document.createElementNS(GJ, r); } function Wi(r, e, t, n, i) { return { tag: r, attrs: t || {}, children: n, text: i, key: e }; } function sOe(r, e) { var t = []; if (e) for (var n in e) { var i = e[n], a = n; i !== !1 && (i !== !0 && i != null && (a += '="' + i + '"'), t.push(a)); } return "<" + r + " " + t.join(" ") + ">"; } function uOe(r) { return ""; } function FF(r, e) { e = e || {}; var t = e.newline ? ` ` : ""; function n(i) { var a = i.children, o = i.tag, s = i.attrs; return sOe(o, s) + (i.text || "") + (a ? "" + t + ce(a, function(u) { return n(u); }).join(t) + t : "") + uOe(o); } return n(r); } function lOe(r, e, t) { t = t || {}; var n = t.newline ? ` ` : "", i = " {" + n, a = n + "}", o = ce(At(r), function(u) { return u + i + ce(At(r[u]), function(l) { return l + ":" + r[u][l] + ";"; }).join(n) + a; }).join(n), s = ce(At(e), function(u) { return "@keyframes " + u + i + ce(At(e[u]), function(l) { return l + i + ce(At(e[u][l]), function(c) { var f = e[u][l][c]; return c === "d" && (f = 'path("' + f + '")'), c + ":" + f + ";"; }).join(n) + a; }).join(n) + a; }).join(n); return !o && !s ? "" : [""].join(n); } function h2(r) { return { zrId: r, shadowCache: {}, patternCache: {}, gradientCache: {}, clipPathCache: {}, defs: {}, cssNodes: {}, cssAnims: {}, cssClassIdx: 0, cssAnimIdx: 0, shadowIdx: 0, gradientIdx: 0, patternIdx: 0, clipPathIdx: 0 }; } function R4(r, e, t, n) { return Wi("svg", "root", { width: r, height: e, xmlns: GJ, "xmlns:xlink": zJ, version: "1.1", baseProfile: "full", viewBox: n ? "0 0 " + r + " " + e : !1 }, t); } var N4 = { cubicIn: "0.32,0,0.67,0", cubicOut: "0.33,1,0.68,1", cubicInOut: "0.65,0,0.35,1", quadraticIn: "0.11,0,0.5,0", quadraticOut: "0.5,1,0.89,1", quadraticInOut: "0.45,0,0.55,1", quarticIn: "0.5,0,0.75,0", quarticOut: "0.25,1,0.5,1", quarticInOut: "0.76,0,0.24,1", quinticIn: "0.64,0,0.78,0", quinticOut: "0.22,1,0.36,1", quinticInOut: "0.83,0,0.17,1", sinusoidalIn: "0.12,0,0.39,0", sinusoidalOut: "0.61,1,0.88,1", sinusoidalInOut: "0.37,0,0.63,1", exponentialIn: "0.7,0,0.84,0", exponentialOut: "0.16,1,0.3,1", exponentialInOut: "0.87,0,0.13,1", circularIn: "0.55,0,1,0.45", circularOut: "0,0.55,0.45,1", circularInOut: "0.85,0,0.15,1" }, Ap = "transform-origin"; function cOe(r, e, t) { var n = oe({}, r.shape); oe(n, e), r.buildPath(t, n); var i = new VJ(); return i.reset(nq(r)), t.rebuildPath(i, 1), i.generateStr(), i.getStr(); } function fOe(r, e) { var t = e.originX, n = e.originY; (t || n) && (r[Ap] = t + "px " + n + "px"); } var hOe = { fill: "fill", opacity: "opacity", lineWidth: "stroke-width", lineDashOffset: "stroke-dashoffset" }; function HJ(r, e) { var t = e.zrId + "-ani-" + e.cssAnimIdx++; return e.cssAnims[t] = r, t; } function pOe(r, e, t) { var n = r.shape.paths, i = {}, a, o; if (M(n, function(u) { var l = h2(t.zrId); l.animation = !0, uP(u, {}, l, !0); var c = l.cssAnims, f = l.cssNodes, h = At(c), p = h.length; if (!!p) { o = h[p - 1]; var d = c[o]; for (var v in d) { var g = d[v]; i[v] = i[v] || { d: "" }, i[v].d += g.d || ""; } for (var m in f) { var y = f[m].animation; y.indexOf(o) >= 0 && (a = y); } } }), !!a) { e.d = !1; var s = HJ(i, t); return a.replace(o, s); } } function F4(r) { return Se(r) ? N4[r] ? "cubic-bezier(" + N4[r] + ")" : BN(r) ? r : "" : ""; } function uP(r, e, t, n) { var i = r.animators, a = i.length, o = []; if (r instanceof tF) { var s = pOe(r, e, t); if (s) o.push(s); else if (!a) return; } else if (!a) return; for (var u = {}, l = 0; l < a; l++) { var c = i[l], f = [c.getMaxTime() / 1e3 + "s"], h = F4(c.getClip().easing), p = c.getDelay(); h ? f.push(h) : f.push("linear"), p && f.push(p / 1e3 + "s"), c.getLoop() && f.push("infinite"); var d = f.join(" "); u[d] = u[d] || [d, []], u[d][1].push(c); } function v(y) { var _ = y[1], w = _.length, x = {}, C = {}, S = {}, b = "animation-timing-function"; function E(V, q, ee) { for (var Y = V.getTracks(), K = V.getMaxTime(), fe = 0; fe < Y.length; fe++) { var J = Y[fe]; if (J.needsAnimate()) { var ue = J.keyframes, ne = J.propName; if (ee && (ne = ee(ne)), ne) for (var ve = 0; ve < ue.length; ve++) { var Pe = ue[ve], Be = Math.round(Pe.time / K * 100) + "%", ke = F4(Pe.easing), Le = Pe.rawValue; (Se(Le) || $t(Le)) && (q[Be] = q[Be] || {}, q[Be][ne] = Pe.rawValue, ke && (q[Be][b] = ke)); } } } } for (var T = 0; T < w; T++) { var P = _[T], I = P.targetName; I ? I === "shape" && E(P, C) : !n && E(P, x); } for (var A in x) { var L = {}; uq(L, r), oe(L, x[A]); var D = iq(L), O = x[A][b]; S[A] = D ? { transform: D } : {}, fOe(S[A], L), O && (S[A][b] = O); } var N, F = !0; for (var A in C) { S[A] = S[A] || {}; var k = !N, O = C[A][b]; k && (N = new tc()); var G = N.len(); N.reset(), S[A].d = cOe(r, C[A], N); var U = N.len(); if (!k && G !== U) { F = !1; break; } O && (S[A][b] = O); } if (!F) for (var A in S) delete S[A].d; if (!n) for (var T = 0; T < w; T++) { var P = _[T], I = P.targetName; I === "style" && E(P, S, function(Y) { return hOe[Y]; }); } for (var B = At(S), X = !0, j, T = 1; T < B.length; T++) { var ae = B[T - 1], se = B[T]; if (S[ae][Ap] !== S[se][Ap]) { X = !1; break; } j = S[ae][Ap]; } if (X && j) { for (var A in S) S[A][Ap] && delete S[A][Ap]; e[Ap] = j; } if (Wr(B, function(V) { return At(S[V]).length > 0; }).length) { var $ = HJ(S, t); return $ + " " + y[0] + " both"; } } for (var g in u) { var s = v(u[g]); s && o.push(s); } if (o.length) { var m = t.zrId + "-cls-" + t.cssClassIdx++; t.cssNodes["." + m] = { animation: o.join(",") }, e.class = m; } } var b1 = Math.round; function UJ(r) { return r && Se(r.src); } function WJ(r) { return r && ze(r.toDataURL); } function BF(r, e, t, n) { iOe(function(i, a) { var o = i === "fill" || i === "stroke"; o && sTe(a) ? xOe(e, r, i, n) : o && oTe(a) ? COe(t, r, i, n) : r[i] = a; }, e, t, !1), wOe(t, r, n); } function B4(r) { return eh(r[0] - 1) && eh(r[1]) && eh(r[2]) && eh(r[3] - 1); } function dOe(r) { return eh(r[4]) && eh(r[5]); } function kF(r, e, t) { if (e && !(dOe(e) && B4(e))) { var n = t ? 10 : 1e4; r.transform = B4(e) ? "translate(" + b1(e[4] * n) / n + " " + b1(e[5] * n) / n + ")" : eTe(e); } } function k4(r, e, t) { for (var n = r.points, i = [], a = 0; a < n.length; a++) i.push(b1(n[a][0] * t) / t), i.push(b1(n[a][1] * t) / t); e.points = i.join(" "); } function V4(r) { return !r.smooth; } function vOe(r) { var e = ce(r, function(t) { return typeof t == "string" ? [t, t] : t; }); return function(t, n, i) { for (var a = 0; a < e.length; a++) { var o = e[a], s = t[o[0]]; s != null && (n[o[1]] = b1(s * i) / i); } }; } var gOe = { circle: [vOe(["cx", "cy", "r"])], polyline: [k4, V4], polygon: [k4, V4] }; function mOe(r) { for (var e = r.animators, t = 0; t < e.length; t++) if (e[t].targetName === "shape") return !0; return !1; } function jJ(r, e) { var t = r.style, n = r.shape, i = gOe[r.type], a = {}, o = e.animation, s = "path", u = r.style.strokePercent, l = e.compress && nq(r) || 4; if (i && !e.willUpdate && !(i[1] && !i[1](n)) && !(o && mOe(r)) && !(u < 1)) { s = r.type; var c = Math.pow(10, l); i[0](n, a, c); } else { r.path || r.createPathProxy(); var f = r.path; r.shapeChanged() && (f.beginPath(), r.buildPath(f, r.shape), r.pathUpdated()); var h = f.getVersion(), p = r, d = p.__svgPathBuilder; (p.__svgPathVersion !== h || !d || u !== p.__svgPathStrokePercent) && (d || (d = p.__svgPathBuilder = new VJ()), d.reset(l), f.rebuildPath(d, u), d.generateStr(), p.__svgPathVersion = h, p.__svgPathStrokePercent = u), a.d = d.getStr(); } return kF(a, r.transform), BF(a, t, r, e), e.animation && uP(r, a, e), Wi(s, r.id + "", a); } function yOe(r, e) { var t = r.style, n = t.image; if (n && !Se(n) && (UJ(n) ? n = n.src : WJ(n) && (n = n.toDataURL())), !!n) { var i = t.x || 0, a = t.y || 0, o = t.width, s = t.height, u = { href: n, width: o, height: s }; return i && (u.x = i), a && (u.y = a), kF(u, r.transform), BF(u, t, r, e), e.animation && uP(r, u, e), Wi("image", r.id + "", u); } } function _Oe(r, e) { var t = r.style, n = t.text; if (n != null && (n += ""), !(!n || isNaN(t.x) || isNaN(t.y))) { var i = t.font || Dh, a = t.x || 0, o = rTe(t.y || 0, RT(i), t.textBaseline), s = tTe[t.textAlign] || t.textAlign, u = { "dominant-baseline": "central", "text-anchor": s }; if (Gq(t)) { var l = "", c = t.fontStyle, f = Vq(t.fontSize); if (!parseFloat(f)) return; var h = t.fontFamily || MX, p = t.fontWeight; l += "font-size:" + f + ";font-family:" + h + ";", c && c !== "normal" && (l += "font-style:" + c + ";"), p && p !== "normal" && (l += "font-weight:" + p + ";"), u.style = l; } else u.style = "font: " + i; return n.match(/\s/) && (u["xml:space"] = "preserve"), a && (u.x = a), o && (u.y = o), kF(u, r.transform), BF(u, t, r, e), e.animation && uP(r, u, e), Wi("text", r.id + "", u, void 0, n); } } function G4(r, e) { if (r instanceof Tt) return jJ(r, e); if (r instanceof Ba) return yOe(r, e); if (r instanceof d1) return _Oe(r, e); } function wOe(r, e, t) { var n = r.style; if (nTe(n)) { var i = iTe(r), a = t.shadowCache, o = a[i]; if (!o) { var s = r.getGlobalScale(), u = s[0], l = s[1]; if (!u || !l) return; var c = n.shadowOffsetX || 0, f = n.shadowOffsetY || 0, h = n.shadowBlur, p = Mm(n.shadowColor), d = p.opacity, v = p.color, g = h / 2 / u, m = h / 2 / l, y = g + " " + m; o = t.zrId + "-s" + t.shadowIdx++, t.defs[o] = Wi("filter", o, { id: o, x: "-100%", y: "-100%", width: "300%", height: "300%" }, [ Wi("feDropShadow", "", { dx: c / u, dy: f / l, stdDeviation: y, "flood-color": v, "flood-opacity": d }) ]), a[i] = o; } e.filter = MT(o); } } function xOe(r, e, t, n) { var i = r[t], a, o = { gradientUnits: i.global ? "userSpaceOnUse" : "objectBoundingBox" }; if (tq(i)) a = "linearGradient", o.x1 = i.x, o.y1 = i.y, o.x2 = i.x2, o.y2 = i.y2; else if (rq(i)) a = "radialGradient", o.cx = wt(i.x, 0.5), o.cy = wt(i.y, 0.5), o.r = wt(i.r, 0.5); else { process.env.NODE_ENV !== "production" && zu("Illegal gradient type."); return; } for (var s = i.colorStops, u = [], l = 0, c = s.length; l < c; ++l) { var f = EM(s[l].offset) * 100 + "%", h = s[l].color, p = Mm(h), d = p.color, v = p.opacity, g = { offset: f }; g["stop-color"] = d, v < 1 && (g["stop-opacity"] = v), u.push(Wi("stop", l + "", g)); } var m = Wi(a, "", o, u), y = FF(m), _ = n.gradientCache, w = _[y]; w || (w = n.zrId + "-g" + n.gradientIdx++, _[y] = w, o.id = w, n.defs[w] = Wi(a, w, o, u)), e[t] = MT(w); } function COe(r, e, t, n) { var i = r.style[t], a = { patternUnits: "userSpaceOnUse" }, o; if (eq(i)) { var s = i.imageWidth, u = i.imageHeight, l = void 0, c = i.image; if (Se(c) ? l = c : UJ(c) ? l = c.src : WJ(c) && (l = c.toDataURL()), typeof Image > "u") { var f = "Image width/height must been given explictly in svg-ssr renderer."; Ze(s, f), Ze(u, f); } else if (s == null || u == null) { var h = function(y, _) { if (y) { var w = y.elm, x = y.attrs.width = s || _.width, C = y.attrs.height = u || _.height; w && (w.setAttribute("width", x), w.setAttribute("height", C)); } }, p = jN(l, null, r, function(y) { h(d, y), h(o, y); }); p && p.width && p.height && (s = s || p.width, u = u || p.height); } o = Wi("image", "img", { href: l, width: s, height: u }), a.width = s, a.height = u; } else i.svgElement && (o = Qe(i.svgElement), a.width = i.svgWidth, a.height = i.svgHeight); if (!!o) { a.patternTransform = iq(i); var d = Wi("pattern", "", a, [o]), v = FF(d), g = n.patternCache, m = g[v]; m || (m = n.zrId + "-p" + n.patternIdx++, g[v] = m, a.id = m, d = n.defs[m] = Wi("pattern", m, a, [o])), e[t] = MT(m); } } function SOe(r, e, t) { var n = t.clipPathCache, i = t.defs, a = n[r.id]; if (!a) { a = t.zrId + "-c" + t.clipPathIdx++; var o = { id: a }; n[r.id] = a, i[a] = Wi("clipPath", a, o, [jJ(r, t)]); } e["clip-path"] = MT(a); } function z4(r) { return document.createTextNode(r); } function kp(r, e, t) { r.insertBefore(e, t); } function $4(r, e) { r.removeChild(e); } function H4(r, e) { r.appendChild(e); } function YJ(r) { return r.parentNode; } function XJ(r) { return r.nextSibling; } function LA(r, e) { r.textContent = e; } var U4 = 58, EOe = 120, bOe = Wi("", ""); function p2(r) { return r === void 0; } function Ll(r) { return r !== void 0; } function TOe(r, e, t) { for (var n = {}, i = e; i <= t; ++i) { var a = r[i].key; a !== void 0 && (process.env.NODE_ENV !== "production" && n[a] != null && console.error("Duplicate key " + a), n[a] = i); } return n; } function K0(r, e) { var t = r.key === e.key, n = r.tag === e.tag; return n && t; } function T1(r) { var e, t = r.children, n = r.tag; if (Ll(n)) { var i = r.elm = $J(n); if (VF(bOe, r), le(t)) for (e = 0; e < t.length; ++e) { var a = t[e]; a != null && H4(i, T1(a)); } else Ll(r.text) && !Xe(r.text) && H4(i, z4(r.text)); } else r.elm = z4(r.text); return r.elm; } function qJ(r, e, t, n, i) { for (; n <= i; ++n) { var a = t[n]; a != null && kp(r, T1(a), e); } } function RE(r, e, t, n) { for (; t <= n; ++t) { var i = e[t]; if (i != null) if (Ll(i.tag)) { var a = YJ(i.elm); $4(a, i.elm); } else $4(r, i.elm); } } function VF(r, e) { var t, n = e.elm, i = r && r.attrs || {}, a = e.attrs || {}; if (i !== a) { for (t in a) { var o = a[t], s = i[t]; s !== o && (o === !0 ? n.setAttribute(t, "") : o === !1 ? n.removeAttribute(t) : t.charCodeAt(0) !== EOe ? n.setAttribute(t, o) : t === "xmlns:xlink" || t === "xmlns" ? n.setAttributeNS(aOe, t, o) : t.charCodeAt(3) === U4 ? n.setAttributeNS(oOe, t, o) : t.charCodeAt(5) === U4 ? n.setAttributeNS(zJ, t, o) : n.setAttribute(t, o)); } for (t in i) t in a || n.removeAttribute(t); } } function POe(r, e, t) { for (var n = 0, i = 0, a = e.length - 1, o = e[0], s = e[a], u = t.length - 1, l = t[0], c = t[u], f, h, p, d; n <= a && i <= u; ) o == null ? o = e[++n] : s == null ? s = e[--a] : l == null ? l = t[++i] : c == null ? c = t[--u] : K0(o, l) ? (mg(o, l), o = e[++n], l = t[++i]) : K0(s, c) ? (mg(s, c), s = e[--a], c = t[--u]) : K0(o, c) ? (mg(o, c), kp(r, o.elm, XJ(s.elm)), o = e[++n], c = t[--u]) : K0(s, l) ? (mg(s, l), kp(r, s.elm, o.elm), s = e[--a], l = t[++i]) : (p2(f) && (f = TOe(e, n, a)), h = f[l.key], p2(h) ? kp(r, T1(l), o.elm) : (p = e[h], p.tag !== l.tag ? kp(r, T1(l), o.elm) : (mg(p, l), e[h] = void 0, kp(r, p.elm, o.elm))), l = t[++i]); (n <= a || i <= u) && (n > a ? (d = t[u + 1] == null ? null : t[u + 1].elm, qJ(r, d, t, i, u)) : RE(r, e, n, a)); } function mg(r, e) { var t = e.elm = r.elm, n = r.children, i = e.children; r !== e && (VF(r, e), p2(e.text) ? Ll(n) && Ll(i) ? n !== i && POe(t, n, i) : Ll(i) ? (Ll(r.text) && LA(t, ""), qJ(t, null, i, 0, i.length - 1)) : Ll(n) ? RE(t, n, 0, n.length - 1) : Ll(r.text) && LA(t, "") : r.text !== e.text && (Ll(n) && RE(t, n, 0, n.length - 1), LA(t, e.text))); } function IOe(r, e) { if (K0(r, e)) mg(r, e); else { var t = r.elm, n = YJ(t); T1(e), n !== null && (kp(n, e.elm, XJ(t)), RE(n, [r], 0, 0)); } return e; } var AOe = 0, LOe = function() { function r(e, t, n) { if (this.type = "svg", this.refreshHover = W4("refreshHover"), this.configLayer = W4("configLayer"), this.storage = t, this._opts = n = oe({}, n), this.root = e, this._id = "zr" + AOe++, this._oldVNode = R4(n.width, n.height), e && !n.ssr) { var i = this._viewport = document.createElement("div"); i.style.cssText = "position:relative;overflow:hidden"; var a = this._svgDom = this._oldVNode.elm = $J("svg"); VF(null, this._oldVNode), i.appendChild(a), e.appendChild(i); } this.resize(n.width, n.height); } return r.prototype.getType = function() { return this.type; }, r.prototype.getViewportRoot = function() { return this._viewport; }, r.prototype.getViewportRootOffset = function() { var e = this.getViewportRoot(); if (e) return { offsetLeft: e.offsetLeft || 0, offsetTop: e.offsetTop || 0 }; }, r.prototype.getSvgDom = function() { return this._svgDom; }, r.prototype.refresh = function() { if (this.root) { var e = this.renderToVNode({ willUpdate: !0 }); e.attrs.style = "position:absolute;left:0;top:0;user-select:none", IOe(this._oldVNode, e), this._oldVNode = e; } }, r.prototype.renderOneToVNode = function(e) { return G4(e, h2(this._id)); }, r.prototype.renderToVNode = function(e) { e = e || {}; var t = this.storage.getDisplayList(!0), n = this._backgroundColor, i = this._width, a = this._height, o = h2(this._id); o.animation = e.animation, o.willUpdate = e.willUpdate, o.compress = e.compress; var s = []; if (n && n !== "none") { var u = Mm(n), l = u.color, c = u.opacity; this._bgVNode = Wi("rect", "bg", { width: i, height: a, x: "0", y: "0", id: "0", fill: l, "fill-opacity": c }), s.push(this._bgVNode); } else this._bgVNode = null; var f = e.compress ? null : this._mainVNode = Wi("g", "main", {}, []); this._paintList(t, o, f ? f.children : s), f && s.push(f); var h = ce(At(o.defs), function(v) { return o.defs[v]; }); if (h.length && s.push(Wi("defs", "defs", {}, h)), e.animation) { var p = lOe(o.cssNodes, o.cssAnims, { newline: !0 }); if (p) { var d = Wi("style", "stl", {}, [], p); s.push(d); } } return R4(i, a, s, e.useViewBox); }, r.prototype.renderToString = function(e) { return e = e || {}, FF(this.renderToVNode({ animation: wt(e.cssAnimation, !0), willUpdate: !1, compress: !0, useViewBox: wt(e.useViewBox, !0) }), { newline: !0 }); }, r.prototype.setBackgroundColor = function(e) { this._backgroundColor = e; var t = this._bgVNode; if (t && t.elm) { var n = Mm(e), i = n.color, a = n.opacity; t.elm.setAttribute("fill", i), a < 1 && t.elm.setAttribute("fill-opacity", a); } }, r.prototype.getSvgRoot = function() { return this._mainVNode && this._mainVNode.elm; }, r.prototype._paintList = function(e, t, n) { for (var i = e.length, a = [], o = 0, s, u, l = 0, c = 0; c < i; c++) { var f = e[c]; if (!f.invisible) { var h = f.__clipPaths, p = h && h.length || 0, d = u && u.length || 0, v = void 0; for (v = Math.max(p - 1, d - 1); v >= 0 && !(h && u && h[v] === u[v]); v--) ; for (var g = d - 1; g > v; g--) o--, s = a[o - 1]; for (var m = v + 1; m < p; m++) { var y = {}; SOe(h[m], y, t); var _ = Wi("g", "clip-g-" + l++, y, []); (s ? s.children : n).push(_), a[o++] = _, s = _; } u = h; var w = G4(f, t); w && (s ? s.children : n).push(w); } } }, r.prototype.resize = function(e, t) { var n = this._opts, i = this.root, a = this._viewport; if (e != null && (n.width = e), t != null && (n.height = t), i && a && (a.style.display = "none", e = Rg(i, 0, n), t = Rg(i, 1, n), a.style.display = ""), this._width !== e || this._height !== t) { if (this._width = e, this._height = t, a) { var o = a.style; o.width = e + "px", o.height = t + "px"; } var s = this._svgDom; s && (s.setAttribute("width", e), s.setAttribute("height", t)); } }, r.prototype.getWidth = function() { return this._width; }, r.prototype.getHeight = function() { return this._height; }, r.prototype.dispose = function() { this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null; }, r.prototype.clear = function() { this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null; }, r.prototype.toDataURL = function(e) { var t = encodeURIComponent(this.renderToString()), n = "data:image/svg+xml;"; return e ? (t = uTe(t), t && n + "base64," + t) : n + "charset=UTF-8," + t; }, r; }(); function W4(r) { return function() { process.env.NODE_ENV !== "production" && zu('In SVG mode painter not support method "' + r + '"'); }; } const DOe = LOe; function MOe(r) { r.registerPainter("svg", DOe); } function j4(r, e, t) { var n = tf.createCanvas(), i = e.getWidth(), a = e.getHeight(), o = n.style; return o && (o.position = "absolute", o.left = "0", o.top = "0", o.width = i + "px", o.height = a + "px", n.setAttribute("data-zr-dom-id", r)), n.width = i * t, n.height = a * t, n; } var OOe = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this) || this; a.motionBlur = !1, a.lastFrameAlpha = 0.7, a.dpr = 1, a.virtual = !1, a.config = {}, a.incremental = !1, a.zlevel = 0, a.maxRepaintRectCount = 5, a.__dirty = !0, a.__firstTimePaint = !0, a.__used = !1, a.__drawIndex = 0, a.__startIndex = 0, a.__endIndex = 0, a.__prevStartIndex = null, a.__prevEndIndex = null; var o; i = i || cE, typeof t == "string" ? o = j4(t, n, i) : Xe(t) && (o = t, t = o.id), a.id = t, a.dom = o; var s = o.style; return s && (kX(o), o.onselectstart = function() { return !1; }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), a.painter = n, a.dpr = i, a; } return e.prototype.getElementCount = function() { return this.__endIndex - this.__startIndex; }, e.prototype.afterBrush = function() { this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex; }, e.prototype.initContext = function() { this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr; }, e.prototype.setUnpainted = function() { this.__firstTimePaint = !0; }, e.prototype.createBackBuffer = function() { var t = this.dpr; this.domBack = j4("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), t !== 1 && this.ctxBack.scale(t, t); }, e.prototype.createRepaintRects = function(t, n, i, a) { if (this.__firstTimePaint) return this.__firstTimePaint = !1, null; var o = [], s = this.maxRepaintRectCount, u = !1, l = new gt(0, 0, 0, 0); function c(y) { if (!(!y.isFinite() || y.isZero())) if (o.length === 0) { var _ = new gt(0, 0, 0, 0); _.copy(y), o.push(_); } else { for (var w = !1, x = 1 / 0, C = 0, S = 0; S < o.length; ++S) { var b = o[S]; if (b.intersect(y)) { var E = new gt(0, 0, 0, 0); E.copy(b), E.union(y), o[S] = E, w = !0; break; } else if (u) { l.copy(y), l.union(b); var T = y.width * y.height, P = b.width * b.height, I = l.width * l.height, A = I - T - P; A < x && (x = A, C = S); } } if (u && (o[C].union(y), w = !0), !w) { var _ = new gt(0, 0, 0, 0); _.copy(y), o.push(_); } u || (u = o.length >= s); } } for (var f = this.__startIndex; f < this.__endIndex; ++f) { var h = t[f]; if (h) { var p = h.shouldBePainted(i, a, !0, !0), d = h.__isRendered && (h.__dirty & as || !p) ? h.getPrevPaintRect() : null; d && c(d); var v = p && (h.__dirty & as || !h.__isRendered) ? h.getPaintRect() : null; v && c(v); } } for (var f = this.__prevStartIndex; f < this.__prevEndIndex; ++f) { var h = n[f], p = h.shouldBePainted(i, a, !0, !0); if (h && (!p || !h.__zr) && h.__isRendered) { var d = h.getPrevPaintRect(); d && c(d); } } var g; do { g = !1; for (var f = 0; f < o.length; ) { if (o[f].isZero()) { o.splice(f, 1); continue; } for (var m = f + 1; m < o.length; ) o[f].intersect(o[m]) ? (g = !0, o[f].union(o[m]), o.splice(m, 1)) : m++; f++; } } while (g); return this._paintRects = o, o; }, e.prototype.debugGetPaintRects = function() { return (this._paintRects || []).slice(); }, e.prototype.resize = function(t, n) { var i = this.dpr, a = this.dom, o = a.style, s = this.domBack; o && (o.width = t + "px", o.height = n + "px"), a.width = t * i, a.height = n * i, s && (s.width = t * i, s.height = n * i, i !== 1 && this.ctxBack.scale(i, i)); }, e.prototype.clear = function(t, n, i) { var a = this.dom, o = this.ctx, s = a.width, u = a.height; n = n || this.clearColor; var l = this.motionBlur && !t, c = this.lastFrameAlpha, f = this.dpr, h = this; l && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(a, 0, 0, s / f, u / f)); var p = this.domBack; function d(v, g, m, y) { if (o.clearRect(v, g, m, y), n && n !== "transparent") { var _ = void 0; LT(n) ? (_ = n.__canvasGradient || n2(o, n, { x: 0, y: 0, width: m, height: y }), n.__canvasGradient = _) : dbe(n) && (_ = i2(o, n, { dirty: function() { h.setUnpainted(), h.__painter.refresh(); } })), o.save(), o.fillStyle = _ || n, o.fillRect(v, g, m, y), o.restore(); } l && (o.save(), o.globalAlpha = c, o.drawImage(p, v, g, m, y), o.restore()); } !i || l ? d(0, 0, s, u) : i.length && M(i, function(v) { d(v.x * f, v.y * f, v.width * f, v.height * f); }); }, e; }(Cu); const DA = OOe; var Y4 = 1e5, Sp = 314159, pC = 0.01, ROe = 1e-3; function NOe(r) { return r ? r.__builtin__ ? !0 : !(typeof r.resize != "function" || typeof r.refresh != "function") : !1; } function FOe(r, e) { var t = document.createElement("div"); return t.style.cssText = [ "position:relative", "width:" + r + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0" ].join(";") + ";", t; } var BOe = function() { function r(e, t, n, i) { this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas"; var a = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS"; this._opts = n = oe({}, n || {}), this.dpr = n.devicePixelRatio || cE, this._singleCanvas = a, this.root = e; var o = e.style; o && (kX(e), e.innerHTML = ""), this.storage = t; var s = this._zlevelList; this._prevDisplayList = []; var u = this._layers; if (a) { var c = e, f = c.width, h = c.height; n.width != null && (f = n.width), n.height != null && (h = n.height), this.dpr = n.devicePixelRatio || 1, c.width = f * this.dpr, c.height = h * this.dpr, this._width = f, this._height = h; var p = new DA(c, this, this.dpr); p.__builtin__ = !0, p.initContext(), u[Sp] = p, p.zlevel = Sp, s.push(Sp), this._domRoot = e; } else { this._width = Rg(e, 0, n), this._height = Rg(e, 1, n); var l = this._domRoot = FOe(this._width, this._height); e.appendChild(l); } } return r.prototype.getType = function() { return "canvas"; }, r.prototype.isSingleCanvas = function() { return this._singleCanvas; }, r.prototype.getViewportRoot = function() { return this._domRoot; }, r.prototype.getViewportRootOffset = function() { var e = this.getViewportRoot(); if (e) return { offsetLeft: e.offsetLeft || 0, offsetTop: e.offsetTop || 0 }; }, r.prototype.refresh = function(e) { var t = this.storage.getDisplayList(!0), n = this._prevDisplayList, i = this._zlevelList; this._redrawId = Math.random(), this._paintList(t, n, e, this._redrawId); for (var a = 0; a < i.length; a++) { var o = i[a], s = this._layers[o]; if (!s.__builtin__ && s.refresh) { var u = a === 0 ? this._backgroundColor : null; s.refresh(u); } } return this._opts.useDirtyRect && (this._prevDisplayList = t.slice()), this; }, r.prototype.refreshHover = function() { this._paintHoverList(this.storage.getDisplayList(!1)); }, r.prototype._paintHoverList = function(e) { var t = e.length, n = this._hoverlayer; if (n && n.clear(), !!t) { for (var i = { inHover: !0, viewWidth: this._width, viewHeight: this._height }, a, o = 0; o < t; o++) { var s = e[o]; s.__inHover && (n || (n = this._hoverlayer = this.getLayer(Y4)), a || (a = n.ctx, a.save()), Yp(a, s, i, o === t - 1)); } a && a.restore(); } }, r.prototype.getHoverLayer = function() { return this.getLayer(Y4); }, r.prototype.paintOne = function(e, t) { MK(e, t); }, r.prototype._paintList = function(e, t, n, i) { if (this._redrawId === i) { n = n || !1, this._updateLayerStatus(e); var a = this._doPaintList(e, t, n), o = a.finished, s = a.needsRefreshHover; if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o) this.eachLayer(function(l) { l.afterBrush && l.afterBrush(); }); else { var u = this; _M(function() { u._paintList(e, t, n, i); }); } } }, r.prototype._compositeManually = function() { var e = this.getLayer(Sp).ctx, t = this._domRoot.width, n = this._domRoot.height; e.clearRect(0, 0, t, n), this.eachBuiltinLayer(function(i) { i.virtual && e.drawImage(i.dom, 0, 0, t, n); }); }, r.prototype._doPaintList = function(e, t, n) { for (var i = this, a = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) { var u = this._zlevelList[s], l = this._layers[u]; l.__builtin__ && l !== this._hoverlayer && (l.__dirty || n) && a.push(l); } for (var c = !0, f = !1, h = function(v) { var g = a[v], m = g.ctx, y = o && g.createRepaintRects(e, t, p._width, p._height), _ = n ? g.__startIndex : g.__drawIndex, w = !n && g.incremental && Date.now, x = w && Date.now(), C = g.zlevel === p._zlevelList[0] ? p._backgroundColor : null; if (g.__startIndex === g.__endIndex) g.clear(!1, C, y); else if (_ === g.__startIndex) { var S = e[_]; (!S.incremental || !S.notClear || n) && g.clear(!1, C, y); } _ === -1 && (console.error("For some unknown reason. drawIndex is -1"), _ = g.__startIndex); var b, E = function(A) { var L = { inHover: !1, allClipped: !1, prevEl: null, viewWidth: i._width, viewHeight: i._height }; for (b = _; b < g.__endIndex; b++) { var D = e[b]; if (D.__inHover && (f = !0), i._doPaintEl(D, g, o, A, L, b === g.__endIndex - 1), w) { var O = Date.now() - x; if (O > 15) break; } } L.prevElClipPaths && m.restore(); }; if (y) if (y.length === 0) b = g.__endIndex; else for (var T = p.dpr, P = 0; P < y.length; ++P) { var I = y[P]; m.save(), m.beginPath(), m.rect(I.x * T, I.y * T, I.width * T, I.height * T), m.clip(), E(I), m.restore(); } else m.save(), E(), m.restore(); g.__drawIndex = b, g.__drawIndex < g.__endIndex && (c = !1); }, p = this, d = 0; d < a.length; d++) h(d); return wr.wxa && M(this._layers, function(v) { v && v.ctx && v.ctx.draw && v.ctx.draw(); }), { finished: c, needsRefreshHover: f }; }, r.prototype._doPaintEl = function(e, t, n, i, a, o) { var s = t.ctx; if (n) { var u = e.getPaintRect(); (!i || u && u.intersect(i)) && (Yp(s, e, a, o), e.setPrevPaintRect(u)); } else Yp(s, e, a, o); }, r.prototype.getLayer = function(e, t) { this._singleCanvas && !this._needsManuallyCompositing && (e = Sp); var n = this._layers[e]; return n || (n = new DA("zr_" + e, this, this.dpr), n.zlevel = e, n.__builtin__ = !0, this._layerConfig[e] ? dt(n, this._layerConfig[e], !0) : this._layerConfig[e - pC] && dt(n, this._layerConfig[e - pC], !0), t && (n.virtual = t), this.insertLayer(e, n), n.initContext()), n; }, r.prototype.insertLayer = function(e, t) { var n = this._layers, i = this._zlevelList, a = i.length, o = this._domRoot, s = null, u = -1; if (n[e]) { process.env.NODE_ENV !== "production" && zu("ZLevel " + e + " has been used already"); return; } if (!NOe(t)) { process.env.NODE_ENV !== "production" && zu("Layer of zlevel " + e + " is not valid"); return; } if (a > 0 && e > i[0]) { for (u = 0; u < a - 1 && !(i[u] < e && i[u + 1] > e); u++) ; s = n[i[u]]; } if (i.splice(u + 1, 0, e), n[e] = t, !t.virtual) if (s) { var l = s.dom; l.nextSibling ? o.insertBefore(t.dom, l.nextSibling) : o.appendChild(t.dom); } else o.firstChild ? o.insertBefore(t.dom, o.firstChild) : o.appendChild(t.dom); t.__painter = this; }, r.prototype.eachLayer = function(e, t) { for (var n = this._zlevelList, i = 0; i < n.length; i++) { var a = n[i]; e.call(t, this._layers[a], a); } }, r.prototype.eachBuiltinLayer = function(e, t) { for (var n = this._zlevelList, i = 0; i < n.length; i++) { var a = n[i], o = this._layers[a]; o.__builtin__ && e.call(t, o, a); } }, r.prototype.eachOtherLayer = function(e, t) { for (var n = this._zlevelList, i = 0; i < n.length; i++) { var a = n[i], o = this._layers[a]; o.__builtin__ || e.call(t, o, a); } }, r.prototype.getLayers = function() { return this._layers; }, r.prototype._updateLayerStatus = function(e) { this.eachBuiltinLayer(function(f, h) { f.__dirty = f.__used = !1; }); function t(f) { a && (a.__endIndex !== f && (a.__dirty = !0), a.__endIndex = f); } if (this._singleCanvas) for (var n = 1; n < e.length; n++) { var i = e[n]; if (i.zlevel !== e[n - 1].zlevel || i.incremental) { this._needsManuallyCompositing = !0; break; } } var a = null, o = 0, s, u; for (u = 0; u < e.length; u++) { var i = e[u], l = i.zlevel, c = void 0; s !== l && (s = l, o = 0), i.incremental ? (c = this.getLayer(l + ROe, this._needsManuallyCompositing), c.incremental = !0, o = 1) : c = this.getLayer(l + (o > 0 ? pC : 0), this._needsManuallyCompositing), c.__builtin__ || zu("ZLevel " + l + " has been used by unkown layer " + c.id), c !== a && (c.__used = !0, c.__startIndex !== u && (c.__dirty = !0), c.__startIndex = u, c.incremental ? c.__drawIndex = -1 : c.__drawIndex = u, t(u), a = c), i.__dirty & as && !i.__inHover && (c.__dirty = !0, c.incremental && c.__drawIndex < 0 && (c.__drawIndex = u)); } t(u), this.eachBuiltinLayer(function(f, h) { !f.__used && f.getElementCount() > 0 && (f.__dirty = !0, f.__startIndex = f.__endIndex = f.__drawIndex = 0), f.__dirty && f.__drawIndex < 0 && (f.__drawIndex = f.__startIndex); }); }, r.prototype.clear = function() { return this.eachBuiltinLayer(this._clearLayer), this; }, r.prototype._clearLayer = function(e) { e.clear(); }, r.prototype.setBackgroundColor = function(e) { this._backgroundColor = e, M(this._layers, function(t) { t.setUnpainted(); }); }, r.prototype.configLayer = function(e, t) { if (t) { var n = this._layerConfig; n[e] ? dt(n[e], t, !0) : n[e] = t; for (var i = 0; i < this._zlevelList.length; i++) { var a = this._zlevelList[i]; if (a === e || a === e + pC) { var o = this._layers[a]; dt(o, n[e], !0); } } } }, r.prototype.delLayer = function(e) { var t = this._layers, n = this._zlevelList, i = t[e]; !i || (i.dom.parentNode.removeChild(i.dom), delete t[e], n.splice(_t(n, e), 1)); }, r.prototype.resize = function(e, t) { if (this._domRoot.style) { var n = this._domRoot; n.style.display = "none"; var i = this._opts, a = this.root; if (e != null && (i.width = e), t != null && (i.height = t), e = Rg(a, 0, i), t = Rg(a, 1, i), n.style.display = "", this._width !== e || t !== this._height) { n.style.width = e + "px", n.style.height = t + "px"; for (var o in this._layers) this._layers.hasOwnProperty(o) && this._layers[o].resize(e, t); this.refresh(!0); } this._width = e, this._height = t; } else { if (e == null || t == null) return; this._width = e, this._height = t, this.getLayer(Sp).resize(e, t); } return this; }, r.prototype.clearLayer = function(e) { var t = this._layers[e]; t && t.clear(); }, r.prototype.dispose = function() { this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null; }, r.prototype.getRenderedCanvas = function(e) { if (e = e || {}, this._singleCanvas && !this._compositeManually) return this._layers[Sp].dom; var t = new DA("image", this, e.pixelRatio || this.dpr); t.initContext(), t.clear(!1, e.backgroundColor || this._backgroundColor); var n = t.ctx; if (e.pixelRatio <= this.dpr) { this.refresh(); var i = t.dom.width, a = t.dom.height; this.eachLayer(function(f) { f.__builtin__ ? n.drawImage(f.dom, 0, 0, i, a) : f.renderToCanvas && (n.save(), f.renderToCanvas(n), n.restore()); }); } else for (var o = { inHover: !1, viewWidth: this._width, viewHeight: this._height }, s = this.storage.getDisplayList(!0), u = 0, l = s.length; u < l; u++) { var c = s[u]; Yp(n, c, o, u === l - 1); } return t.dom; }, r.prototype.getWidth = function() { return this._width; }, r.prototype.getHeight = function() { return this._height; }, r; }(); const kOe = BOe; function VOe(r) { r.registerPainter("canvas", kOe); } var GOe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.hasSymbolVisual = !0, t; } return e.prototype.getInitialData = function(t) { if (process.env.NODE_ENV !== "production") { var n = t.coordinateSystem; if (n !== "polar" && n !== "cartesian2d") throw new Error("Line not support coordinateSystem besides cartesian and polar"); } return _f(null, this, { useEncodeDefaulter: !0 }); }, e.prototype.getLegendIcon = function(t) { var n = new rt(), i = vi("line", 0, t.itemHeight / 2, t.itemWidth, 0, t.lineStyle.stroke, !1); n.add(i), i.setStyle(t.lineStyle); var a = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = a === "none" ? "circle" : a, u = t.itemHeight * 0.8, l = vi(s, (t.itemWidth - u) / 2, (t.itemHeight - u) / 2, u, u, t.itemStyle.fill); n.add(l), l.setStyle(t.itemStyle); var c = t.iconRotate === "inherit" ? o : t.iconRotate || 0; return l.rotation = c * Math.PI / 180, l.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), s.indexOf("empty") > -1 && (l.style.stroke = l.style.fill, l.style.fill = "#fff", l.style.lineWidth = 2), n; }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = { z: 3, coordinateSystem: "cartesian2d", legendHoverLink: !0, clip: !0, label: { position: "top" }, endLabel: { show: !1, valueAnimation: !0, distance: 8 }, lineStyle: { width: 2, type: "solid" }, emphasis: { scale: !0 }, step: !1, smooth: !1, smoothMonotone: null, symbol: "emptyCircle", symbolSize: 4, symbolRotate: null, showSymbol: !0, showAllSymbol: "auto", connectNulls: !1, sampling: "none", animationEasing: "linear", progressive: 0, hoverLayerThreshold: 1 / 0, universalTransition: { divideShape: "clone" }, triggerLineEvent: !1 }, e; }(bn); const zOe = GOe; function Bm(r, e) { var t = r.mapDimensionsAll("defaultedLabel"), n = t.length; if (n === 1) { var i = Rm(r, e, t[0]); return i != null ? i + "" : null; } else if (n) { for (var a = [], o = 0; o < t.length; o++) a.push(Rm(r, e, t[o])); return a.join(" "); } } function ZJ(r, e) { var t = r.mapDimensionsAll("defaultedLabel"); if (!le(e)) return e + ""; for (var n = [], i = 0; i < t.length; i++) { var a = r.getDimensionIndex(t[i]); a >= 0 && n.push(e[a]); } return n.join(" "); } var $Oe = function(r) { W(e, r); function e(t, n, i, a) { var o = r.call(this) || this; return o.updateData(t, n, i, a), o; } return e.prototype._createSymbol = function(t, n, i, a, o) { this.removeAll(); var s = vi(t, -1, -1, 2, 2, null, o); s.attr({ z2: 100, culling: !0, scaleX: a[0] / 2, scaleY: a[1] / 2 }), s.drift = HOe, this._symbolType = t, this.add(s); }, e.prototype.stopSymbolAnimation = function(t) { this.childAt(0).stopAnimation(null, t); }, e.prototype.getSymbolType = function() { return this._symbolType; }, e.prototype.getSymbolPath = function() { return this.childAt(0); }, e.prototype.highlight = function() { af(this.childAt(0)); }, e.prototype.downplay = function() { of(this.childAt(0)); }, e.prototype.setZ = function(t, n) { var i = this.childAt(0); i.zlevel = t, i.z = n; }, e.prototype.setDraggable = function(t, n) { var i = this.childAt(0); i.draggable = t, i.cursor = !n && t ? "move" : i.cursor; }, e.prototype.updateData = function(t, n, i, a) { this.silent = !1; var o = t.getItemVisual(n, "symbol") || "circle", s = t.hostModel, u = e.getSymbolSize(t, n), l = o !== this._symbolType, c = a && a.disableAnimation; if (l) { var f = t.getItemVisual(n, "symbolKeepAspect"); this._createSymbol(o, t, n, u, f); } else { var h = this.childAt(0); h.silent = !1; var p = { scaleX: u[0] / 2, scaleY: u[1] / 2 }; c ? h.attr(p) : Ht(h, p, s, n), nl(h); } if (this._updateCommon(t, n, u, i, a), l) { var h = this.childAt(0); if (!c) { var p = { scaleX: this._sizeX, scaleY: this._sizeY, style: { opacity: h.style.opacity } }; h.scaleX = h.scaleY = 0, h.style.opacity = 0, Cn(h, p, s, n); } } c && this.childAt(0).stopAnimation("leave"); }, e.prototype._updateCommon = function(t, n, i, a, o) { var s = this.childAt(0), u = t.hostModel, l, c, f, h, p, d, v, g, m; if (a && (l = a.emphasisItemStyle, c = a.blurItemStyle, f = a.selectItemStyle, h = a.focus, p = a.blurScope, v = a.labelStatesModels, g = a.hoverScale, m = a.cursorStyle, d = a.emphasisDisabled), !a || t.hasItemOption) { var y = a && a.itemModel ? a.itemModel : t.getItemModel(n), _ = y.getModel("emphasis"); l = _.getModel("itemStyle").getItemStyle(), f = y.getModel(["select", "itemStyle"]).getItemStyle(), c = y.getModel(["blur", "itemStyle"]).getItemStyle(), h = _.get("focus"), p = _.get("blurScope"), d = _.get("disabled"), v = wa(y), g = _.getShallow("scale"), m = y.getShallow("cursor"); } var w = t.getItemVisual(n, "symbolRotate"); s.attr("rotation", (w || 0) * Math.PI / 180 || 0); var x = Oy(t.getItemVisual(n, "symbolOffset"), i); x && (s.x = x[0], s.y = x[1]), m && s.attr("cursor", m); var C = t.getItemVisual(n, "style"), S = C.fill; if (s instanceof Ba) { var b = s.style; s.useStyle(oe({ image: b.image, x: b.x, y: b.y, width: b.width, height: b.height }, C)); } else s.__isEmptyBrush ? s.useStyle(oe({}, C)) : s.useStyle(C), s.style.decal = null, s.setColor(S, o && o.symbolInnerColor), s.style.strokeNoScale = !0; var E = t.getItemVisual(n, "liftZ"), T = this._z2; E != null ? T == null && (this._z2 = s.z2, s.z2 += E) : T != null && (s.z2 = T, this._z2 = null); var P = o && o.useNameLabel; no(s, v, { labelFetcher: u, labelDataIndex: n, defaultText: I, inheritColor: S, defaultOpacity: C.opacity }); function I(D) { return P ? t.getName(D) : Bm(t, D); } this._sizeX = i[0] / 2, this._sizeY = i[1] / 2; var A = s.ensureState("emphasis"); if (A.style = l, s.ensureState("select").style = f, s.ensureState("blur").style = c, g) { var L = Math.max($t(g) ? g : 1.1, 3 / this._sizeY); A.scaleX = this._sizeX * L, A.scaleY = this._sizeY * L; } this.setSymbolScale(1), Zn(this, h, p, d); }, e.prototype.setSymbolScale = function(t) { this.scaleX = this.scaleY = t; }, e.prototype.fadeOut = function(t, n, i) { var a = this.childAt(0), o = nt(this).dataIndex, s = i && i.animation; if (this.silent = a.silent = !0, i && i.fadeLabel) { var u = a.getTextContent(); u && Rh(u, { style: { opacity: 0 } }, n, { dataIndex: o, removeOpt: s, cb: function() { a.removeTextContent(); } }); } else a.removeTextContent(); Rh(a, { style: { opacity: 0 }, scaleX: 0, scaleY: 0 }, n, { dataIndex: o, cb: t, removeOpt: s }); }, e.getSymbolSize = function(t, n) { return Vw(t.getItemVisual(n, "symbolSize")); }, e; }(rt); function HOe(r, e) { this.parent.drift(r, e); } const Hw = $Oe; function MA(r, e, t, n) { return e && !isNaN(e[0]) && !isNaN(e[1]) && !(n.isIgnore && n.isIgnore(t)) && !(n.clipShape && !n.clipShape.contain(e[0], e[1])) && r.getItemVisual(t, "symbol") !== "none"; } function X4(r) { return r != null && !Xe(r) && (r = { isIgnore: r }), r || {}; } function q4(r) { var e = r.hostModel, t = e.getModel("emphasis"); return { emphasisItemStyle: t.getModel("itemStyle").getItemStyle(), blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(), selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(), focus: t.get("focus"), blurScope: t.get("blurScope"), emphasisDisabled: t.get("disabled"), hoverScale: t.get("scale"), labelStatesModels: wa(e), cursorStyle: e.get("cursor") }; } var UOe = function() { function r(e) { this.group = new rt(), this._SymbolCtor = e || Hw; } return r.prototype.updateData = function(e, t) { this._progressiveEls = null, t = X4(t); var n = this.group, i = e.hostModel, a = this._data, o = this._SymbolCtor, s = t.disableAnimation, u = q4(e), l = { disableAnimation: s }, c = t.getSymbolPoint || function(f) { return e.getItemLayout(f); }; a || n.removeAll(), e.diff(a).add(function(f) { var h = c(f); if (MA(e, h, f, t)) { var p = new o(e, f, u, l); p.setPosition(h), e.setItemGraphicEl(f, p), n.add(p); } }).update(function(f, h) { var p = a.getItemGraphicEl(h), d = c(f); if (!MA(e, d, f, t)) { n.remove(p); return; } var v = e.getItemVisual(f, "symbol") || "circle", g = p && p.getSymbolType && p.getSymbolType(); if (!p || g && g !== v) n.remove(p), p = new o(e, f, u, l), p.setPosition(d); else { p.updateData(e, f, u, l); var m = { x: d[0], y: d[1] }; s ? p.attr(m) : Ht(p, m, i); } n.add(p), e.setItemGraphicEl(f, p); }).remove(function(f) { var h = a.getItemGraphicEl(f); h && h.fadeOut(function() { n.remove(h); }, i); }).execute(), this._getSymbolPoint = c, this._data = e; }, r.prototype.updateLayout = function() { var e = this, t = this._data; t && t.eachItemGraphicEl(function(n, i) { var a = e._getSymbolPoint(i); n.setPosition(a), n.markRedraw(); }); }, r.prototype.incrementalPrepareUpdate = function(e) { this._seriesScope = q4(e), this._data = null, this.group.removeAll(); }, r.prototype.incrementalUpdate = function(e, t, n) { this._progressiveEls = [], n = X4(n); function i(u) { u.isGroup || (u.incremental = !0, u.ensureState("emphasis").hoverLayer = !0); } for (var a = e.start; a < e.end; a++) { var o = t.getItemLayout(a); if (MA(t, o, a, n)) { var s = new this._SymbolCtor(t, a, this._seriesScope); s.traverse(i), s.setPosition(o), this.group.add(s), t.setItemGraphicEl(a, s), this._progressiveEls.push(s); } } }, r.prototype.eachRendered = function(e) { Xh(this._progressiveEls || this.group, e); }, r.prototype.remove = function(e) { var t = this.group, n = this._data; n && e ? n.eachItemGraphicEl(function(i) { i.fadeOut(function() { t.remove(i); }, n.hostModel); }) : t.removeAll(); }, r; }(); const Uw = UOe; function KJ(r, e, t) { var n = r.getBaseAxis(), i = r.getOtherAxis(n), a = WOe(i, t), o = n.dim, s = i.dim, u = e.mapDimension(s), l = e.mapDimension(o), c = s === "x" || s === "radius" ? 1 : 0, f = ce(r.dimensions, function(d) { return e.mapDimension(d); }), h = !1, p = e.getCalculationInfo("stackResultDimension"); return Fh( e, f[0] ) && (h = !0, f[0] = p), Fh( e, f[1] ) && (h = !0, f[1] = p), { dataDimsForPoint: f, valueStart: a, valueAxisDim: s, baseAxisDim: o, stacked: !!h, valueDim: u, baseDim: l, baseDataOffset: c, stackedOverDimension: e.getCalculationInfo("stackedOverDimension") }; } function WOe(r, e) { var t = 0, n = r.scale.getExtent(); return e === "start" ? t = n[0] : e === "end" ? t = n[1] : $t(e) && !isNaN(e) ? t = e : n[0] > 0 ? t = n[0] : n[1] < 0 && (t = n[1]), t; } function JJ(r, e, t, n) { var i = NaN; r.stacked && (i = t.get(t.getCalculationInfo("stackedOverDimension"), n)), isNaN(i) && (i = r.valueStart); var a = r.baseDataOffset, o = []; return o[a] = t.get(r.baseDim, n), o[1 - a] = i, e.dataToPoint(o); } function jOe(r, e) { var t = []; return e.diff(r).add(function(n) { t.push({ cmd: "+", idx: n }); }).update(function(n, i) { t.push({ cmd: "=", idx: i, idx1: n }); }).remove(function(n) { t.push({ cmd: "-", idx: n }); }).execute(), t; } function YOe(r, e, t, n, i, a, o, s) { for (var u = jOe(r, e), l = [], c = [], f = [], h = [], p = [], d = [], v = [], g = KJ(i, e, o), m = r.getLayout("points") || [], y = e.getLayout("points") || [], _ = 0; _ < u.length; _++) { var w = u[_], x = !0, C = void 0, S = void 0; switch (w.cmd) { case "=": C = w.idx * 2, S = w.idx1 * 2; var b = m[C], E = m[C + 1], T = y[S], P = y[S + 1]; (isNaN(b) || isNaN(E)) && (b = T, E = P), l.push(b, E), c.push(T, P), f.push(t[C], t[C + 1]), h.push(n[S], n[S + 1]), v.push(e.getRawIndex(w.idx1)); break; case "+": var I = w.idx, A = g.dataDimsForPoint, L = i.dataToPoint([e.get(A[0], I), e.get(A[1], I)]); S = I * 2, l.push(L[0], L[1]), c.push(y[S], y[S + 1]); var D = JJ(g, i, e, I); f.push(D[0], D[1]), h.push(n[S], n[S + 1]), v.push(e.getRawIndex(I)); break; case "-": x = !1; } x && (p.push(w), d.push(d.length)); } d.sort(function(ae, se) { return v[ae] - v[se]; }); for (var O = l.length, N = Fl(O), F = Fl(O), k = Fl(O), G = Fl(O), U = [], _ = 0; _ < d.length; _++) { var B = d[_], X = _ * 2, j = B * 2; N[X] = l[j], N[X + 1] = l[j + 1], F[X] = c[j], F[X + 1] = c[j + 1], k[X] = f[j], k[X + 1] = f[j + 1], G[X] = h[j], G[X + 1] = h[j + 1], U[_] = p[B]; } return { current: N, next: F, stackedOnCurrent: k, stackedOnNext: G, status: U }; } var Mf = Math.min, Of = Math.max; function ad(r, e) { return isNaN(r) || isNaN(e); } function d2(r, e, t, n, i, a, o, s, u) { for (var l, c, f, h, p, d, v = t, g = 0; g < n; g++) { var m = e[v * 2], y = e[v * 2 + 1]; if (v >= i || v < 0) break; if (ad(m, y)) { if (u) { v += a; continue; } break; } if (v === t) r[a > 0 ? "moveTo" : "lineTo"](m, y), f = m, h = y; else { var _ = m - l, w = y - c; if (_ * _ + w * w < 0.5) { v += a; continue; } if (o > 0) { for (var x = v + a, C = e[x * 2], S = e[x * 2 + 1]; C === m && S === y && g < n; ) g++, x += a, v += a, C = e[x * 2], S = e[x * 2 + 1], m = e[v * 2], y = e[v * 2 + 1], _ = m - l, w = y - c; var b = g + 1; if (u) for (; ad(C, S) && b < n; ) b++, x += a, C = e[x * 2], S = e[x * 2 + 1]; var E = 0.5, T = 0, P = 0, I = void 0, A = void 0; if (b >= n || ad(C, S)) p = m, d = y; else { T = C - l, P = S - c; var L = m - l, D = C - m, O = y - c, N = S - y, F = void 0, k = void 0; if (s === "x") { F = Math.abs(L), k = Math.abs(D); var G = T > 0 ? 1 : -1; p = m - G * F * o, d = y, I = m + G * k * o, A = y; } else if (s === "y") { F = Math.abs(O), k = Math.abs(N); var U = P > 0 ? 1 : -1; p = m, d = y - U * F * o, I = m, A = y + U * k * o; } else F = Math.sqrt(L * L + O * O), k = Math.sqrt(D * D + N * N), E = k / (k + F), p = m - T * o * (1 - E), d = y - P * o * (1 - E), I = m + T * o * E, A = y + P * o * E, I = Mf(I, Of(C, m)), A = Mf(A, Of(S, y)), I = Of(I, Mf(C, m)), A = Of(A, Mf(S, y)), T = I - m, P = A - y, p = m - T * F / k, d = y - P * F / k, p = Mf(p, Of(l, m)), d = Mf(d, Of(c, y)), p = Of(p, Mf(l, m)), d = Of(d, Mf(c, y)), T = m - p, P = y - d, I = m + T * k / F, A = y + P * k / F; } r.bezierCurveTo(f, h, p, d, m, y), f = I, h = A; } else r.lineTo(m, y); } l = m, c = y, v += a; } return g; } var QJ = function() { function r() { this.smooth = 0, this.smoothConstraint = !0; } return r; }(), XOe = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "ec-polyline", n; } return e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new QJ(); }, e.prototype.buildPath = function(t, n) { var i = n.points, a = 0, o = i.length / 2; if (n.connectNulls) { for (; o > 0 && ad(i[o * 2 - 2], i[o * 2 - 1]); o--) ; for (; a < o && ad(i[a * 2], i[a * 2 + 1]); a++) ; } for (; a < o; ) a += d2(t, i, a, o, o, 1, n.smooth, n.smoothMonotone, n.connectNulls) + 1; }, e.prototype.getPointOn = function(t, n) { this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape)); for (var i = this.path, a = i.data, o = tc.CMD, s, u, l = n === "x", c = [], f = 0; f < a.length; ) { var h = a[f++], p = void 0, d = void 0, v = void 0, g = void 0, m = void 0, y = void 0, _ = void 0; switch (h) { case o.M: s = a[f++], u = a[f++]; break; case o.L: if (p = a[f++], d = a[f++], _ = l ? (t - s) / (p - s) : (t - u) / (d - u), _ <= 1 && _ >= 0) { var w = l ? (d - u) * _ + u : (p - s) * _ + s; return l ? [t, w] : [w, t]; } s = p, u = d; break; case o.C: p = a[f++], d = a[f++], v = a[f++], g = a[f++], m = a[f++], y = a[f++]; var x = l ? oE(s, p, v, m, t, c) : oE(u, d, g, y, t, c); if (x > 0) for (var C = 0; C < x; C++) { var S = c[C]; if (S <= 1 && S >= 0) { var w = l ? $i(u, d, g, y, S) : $i(s, p, v, m, S); return l ? [t, w] : [w, t]; } } s = m, u = y; break; } } }, e; }(Tt), qOe = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e; }(QJ), eQ = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "ec-polygon", n; } return e.prototype.getDefaultShape = function() { return new qOe(); }, e.prototype.buildPath = function(t, n) { var i = n.points, a = n.stackedOnPoints, o = 0, s = i.length / 2, u = n.smoothMonotone; if (n.connectNulls) { for (; s > 0 && ad(i[s * 2 - 2], i[s * 2 - 1]); s--) ; for (; o < s && ad(i[o * 2], i[o * 2 + 1]); o++) ; } for (; o < s; ) { var l = d2(t, i, o, s, s, 1, n.smooth, u, n.connectNulls); d2(t, a, o + l - 1, l, s, -1, n.stackedOnSmooth, u, n.connectNulls), o += l + 1, t.closePath(); } }, e; }(Tt); function tQ(r, e, t, n, i) { var a = r.getArea(), o = a.x, s = a.y, u = a.width, l = a.height, c = t.get(["lineStyle", "width"]) || 2; o -= c / 2, s -= c / 2, u += c, l += c, o = Math.floor(o), u = Math.round(u); var f = new Vt({ shape: { x: o, y: s, width: u, height: l } }); if (e) { var h = r.getBaseAxis(), p = h.isHorizontal(), d = h.inverse; p ? (d && (f.shape.x += u), f.shape.width = 0) : (d || (f.shape.y += l), f.shape.height = 0); var v = ze(i) ? function(g) { i(g, f); } : null; Cn(f, { shape: { width: u, height: l, x: o, y: s } }, t, null, n, v); } return f; } function rQ(r, e, t) { var n = r.getArea(), i = Xn(n.r0, 1), a = Xn(n.r, 1), o = new $o({ shape: { cx: Xn(r.cx, 1), cy: Xn(r.cy, 1), r0: i, r: a, startAngle: n.startAngle, endAngle: n.endAngle, clockwise: n.clockwise } }); if (e) { var s = r.getBaseAxis().dim === "angle"; s ? o.shape.endAngle = n.startAngle : o.shape.r = i, Cn(o, { shape: { endAngle: n.endAngle, r: a } }, t); } return o; } function lP(r, e, t, n, i) { if (r) { if (r.type === "polar") return rQ(r, e, t); if (r.type === "cartesian2d") return tQ(r, e, t, n, i); } else return null; return null; } function mv(r, e) { return r.type === e; } function Z4(r, e) { if (r.length === e.length) { for (var t = 0; t < r.length; t++) if (r[t] !== e[t]) return; return !0; } } function K4(r) { for (var e = 1 / 0, t = 1 / 0, n = -1 / 0, i = -1 / 0, a = 0; a < r.length; ) { var o = r[a++], s = r[a++]; isNaN(o) || (e = Math.min(o, e), n = Math.max(o, n)), isNaN(s) || (t = Math.min(s, t), i = Math.max(s, i)); } return [[e, t], [n, i]]; } function J4(r, e) { var t = K4(r), n = t[0], i = t[1], a = K4(e), o = a[0], s = a[1]; return Math.max(Math.abs(n[0] - o[0]), Math.abs(n[1] - o[1]), Math.abs(i[0] - s[0]), Math.abs(i[1] - s[1])); } function Q4(r) { return $t(r) ? r : r ? 0.5 : 0; } function ZOe(r, e, t) { if (!t.valueDim) return []; for (var n = e.count(), i = Fl(n * 2), a = 0; a < n; a++) { var o = JJ(t, r, e, a); i[a * 2] = o[0], i[a * 2 + 1] = o[1]; } return i; } function Rf(r, e, t, n) { var i = e.getBaseAxis(), a = i.dim === "x" || i.dim === "radius" ? 0 : 1, o = [], s = 0, u = [], l = [], c = [], f = []; if (n) { for (s = 0; s < r.length; s += 2) !isNaN(r[s]) && !isNaN(r[s + 1]) && f.push(r[s], r[s + 1]); r = f; } for (s = 0; s < r.length - 2; s += 2) switch (c[0] = r[s + 2], c[1] = r[s + 3], l[0] = r[s], l[1] = r[s + 1], o.push(l[0], l[1]), t) { case "end": u[a] = c[a], u[1 - a] = l[1 - a], o.push(u[0], u[1]); break; case "middle": var h = (l[a] + c[a]) / 2, p = []; u[a] = p[a] = h, u[1 - a] = l[1 - a], p[1 - a] = c[1 - a], o.push(u[0], u[1]), o.push(p[0], p[1]); break; default: u[a] = l[a], u[1 - a] = c[1 - a], o.push(u[0], u[1]); } return o.push(r[s++], r[s++]), o; } function KOe(r, e) { var t = [], n = r.length, i, a; function o(c, f, h) { var p = c.coord, d = (h - p) / (f.coord - p), v = Qbe(d, [c.color, f.color]); return { coord: h, color: v }; } for (var s = 0; s < n; s++) { var u = r[s], l = u.coord; if (l < 0) i = u; else if (l > e) { a ? t.push(o(a, u, e)) : i && t.push(o(i, u, 0), o(i, u, e)); break; } else i && (t.push(o(i, u, 0)), i = null), t.push(u), a = u; } return t; } function JOe(r, e, t) { var n = r.getVisual("visualMeta"); if (!(!n || !n.length || !r.count())) { if (e.type !== "cartesian2d") { process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d."); return; } for (var i, a, o = n.length - 1; o >= 0; o--) { var s = r.getDimensionInfo(n[o].dimension); if (i = s && s.coordDim, i === "x" || i === "y") { a = n[o]; break; } } if (!a) { process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension."); return; } var u = e.getAxis(i), l = ce(a.stops, function(_) { return { coord: u.toGlobalCoord(u.dataToCoord(_.value)), color: _.color }; }), c = l.length, f = a.outerColors.slice(); c && l[0].coord > l[c - 1].coord && (l.reverse(), f.reverse()); var h = KOe(l, i === "x" ? t.getWidth() : t.getHeight()), p = h.length; if (!p && c) return l[0].coord < 0 ? f[1] ? f[1] : l[c - 1].color : f[0] ? f[0] : l[0].color; var d = 10, v = h[0].coord - d, g = h[p - 1].coord + d, m = g - v; if (m < 1e-3) return "transparent"; M(h, function(_) { _.offset = (_.coord - v) / m; }), h.push({ offset: p ? h[p - 1].offset : 0.5, color: f[1] || "transparent" }), h.unshift({ offset: p ? h[0].offset : 0.5, color: f[0] || "transparent" }); var y = new xy(0, 0, 0, 0, h, !0); return y[i] = v, y[i + "2"] = g, y; } } function QOe(r, e, t) { var n = r.get("showAllSymbol"), i = n === "auto"; if (!(n && !i)) { var a = t.getAxesByScale("ordinal")[0]; if (!!a && !(i && eRe(a, e))) { var o = e.mapDimension(a.dim), s = {}; return M(a.getViewLabels(), function(u) { var l = a.scale.getRawOrdinalNumber(u.tickValue); s[l] = 1; }), function(u) { return !s.hasOwnProperty(e.get(o, u)); }; } } } function eRe(r, e) { var t = r.getExtent(), n = Math.abs(t[1] - t[0]) / r.scale.count(); isNaN(n) && (n = 0); for (var i = e.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a) if (Hw.getSymbolSize( e, o )[r.isHorizontal() ? 1 : 0] * 1.5 > n) return !1; return !0; } function tRe(r, e) { return isNaN(r) || isNaN(e); } function rRe(r) { for (var e = r.length / 2; e > 0 && tRe(r[e * 2 - 2], r[e * 2 - 1]); e--) ; return e - 1; } function ez(r, e) { return [r[e * 2], r[e * 2 + 1]]; } function nRe(r, e, t) { for (var n = r.length / 2, i = t === "x" ? 0 : 1, a, o, s = 0, u = -1, l = 0; l < n; l++) if (o = r[l * 2 + i], !(isNaN(o) || isNaN(r[l * 2 + 1 - i]))) { if (l === 0) { a = o; continue; } if (a <= e && o >= e || a >= e && o <= e) { u = l; break; } s = l, a = o; } return { range: [s, u], t: (e - a) / (o - a) }; } function nQ(r) { if (r.get(["endLabel", "show"])) return !0; for (var e = 0; e < Co.length; e++) if (r.get([Co[e], "endLabel", "show"])) return !0; return !1; } function OA(r, e, t, n) { if (mv(e, "cartesian2d")) { var i = n.getModel("endLabel"), a = i.get("valueAnimation"), o = n.getData(), s = { lastFrameIndex: 0 }, u = nQ(n) ? function(p, d) { r._endLabelOnDuring(p, d, o, s, a, i, e); } : null, l = e.getBaseAxis().isHorizontal(), c = tQ(e, t, n, function() { var p = r._endLabel; p && t && s.originalX != null && p.attr({ x: s.originalX, y: s.originalY }); }, u); if (!n.get("clip", !0)) { var f = c.shape, h = Math.max(f.width, f.height); l ? (f.y -= h, f.height += h * 2) : (f.x -= h, f.width += h * 2); } return u && u(1, c), c; } else return process.env.NODE_ENV !== "production" && n.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), rQ(e, t, n); } function iRe(r, e) { var t = e.getBaseAxis(), n = t.isHorizontal(), i = t.inverse, a = n ? i ? "right" : "left" : "center", o = n ? "middle" : i ? "top" : "bottom"; return { normal: { align: r.get("align") || a, verticalAlign: r.get("verticalAlign") || o } }; } var aRe = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.init = function() { var t = new rt(), n = new Uw(); this.group.add(n.group), this._symbolDraw = n, this._lineGroup = t; }, e.prototype.render = function(t, n, i) { var a = this, o = t.coordinateSystem, s = this.group, u = t.getData(), l = t.getModel("lineStyle"), c = t.getModel("areaStyle"), f = u.getLayout("points") || [], h = o.type === "polar", p = this._coordSys, d = this._symbolDraw, v = this._polyline, g = this._polygon, m = this._lineGroup, y = t.get("animation"), _ = !c.isEmpty(), w = c.get("origin"), x = KJ(o, u, w), C = _ && ZOe(o, u, x), S = t.get("showSymbol"), b = t.get("connectNulls"), E = S && !h && QOe(t, u, o), T = this._data; T && T.eachItemGraphicEl(function(se, $) { se.__temp && (s.remove(se), T.setItemGraphicEl($, null)); }), S || d.remove(), s.add(m); var P = h ? !1 : t.get("step"), I; o && o.getArea && t.get("clip", !0) && (I = o.getArea(), I.width != null ? (I.x -= 0.1, I.y -= 0.1, I.width += 0.2, I.height += 0.2) : I.r0 && (I.r0 -= 0.5, I.r += 0.5)), this._clipShapeForSymbol = I; var A = JOe(u, o, i) || u.getVisual("style")[u.getVisual("drawType")]; if (!(v && p.type === o.type && P === this._step)) S && d.updateData(u, { isIgnore: E, clipShape: I, disableAnimation: !0, getSymbolPoint: function(se) { return [f[se * 2], f[se * 2 + 1]]; } }), y && this._initSymbolLabelAnimation(u, o, I), P && (f = Rf(f, o, P, b), C && (C = Rf(C, o, P, b))), v = this._newPolyline(f), _ ? g = this._newPolygon(f, C) : g && (m.remove(g), g = this._polygon = null), h || this._initOrUpdateEndLabel(t, o, Hd(A)), m.setClipPath(OA(this, o, !0, t)); else { _ && !g ? g = this._newPolygon(f, C) : g && !_ && (m.remove(g), g = this._polygon = null), h || this._initOrUpdateEndLabel(t, o, Hd(A)); var L = m.getClipPath(); if (L) { var D = OA(this, o, !1, t); Cn(L, { shape: D.shape }, t); } else m.setClipPath(OA(this, o, !0, t)); S && d.updateData(u, { isIgnore: E, clipShape: I, disableAnimation: !0, getSymbolPoint: function(se) { return [f[se * 2], f[se * 2 + 1]]; } }), (!Z4(this._stackedOnPoints, C) || !Z4(this._points, f)) && (y ? this._doUpdateAnimation(u, C, o, i, P, w, b) : (P && (f = Rf(f, o, P, b), C && (C = Rf(C, o, P, b))), v.setShape({ points: f }), g && g.setShape({ points: f, stackedOnPoints: C }))); } var O = t.getModel("emphasis"), N = O.get("focus"), F = O.get("blurScope"), k = O.get("disabled"); if (v.useStyle(qe( l.getLineStyle(), { fill: "none", stroke: A, lineJoin: "bevel" } )), Ra(v, t, "lineStyle"), v.style.lineWidth > 0 && t.get(["emphasis", "lineStyle", "width"]) === "bolder") { var G = v.getState("emphasis").style; G.lineWidth = +v.style.lineWidth + 1; } nt(v).seriesIndex = t.seriesIndex, Zn(v, N, F, k); var U = Q4(t.get("smooth")), B = t.get("smoothMonotone"); if (v.setShape({ smooth: U, smoothMonotone: B, connectNulls: b }), g) { var X = u.getCalculationInfo("stackedOnSeries"), j = 0; g.useStyle(qe(c.getAreaStyle(), { fill: A, opacity: 0.7, lineJoin: "bevel", decal: u.getVisual("style").decal })), X && (j = Q4(X.get("smooth"))), g.setShape({ smooth: U, stackedOnSmooth: j, smoothMonotone: B, connectNulls: b }), Ra(g, t, "areaStyle"), nt(g).seriesIndex = t.seriesIndex, Zn(g, N, F, k); } var ae = function(se) { a._changePolyState(se); }; u.eachItemGraphicEl(function(se) { se && (se.onHoverStateChange = ae); }), this._polyline.onHoverStateChange = ae, this._data = u, this._coordSys = o, this._stackedOnPoints = C, this._points = f, this._step = P, this._valueOrigin = w, t.get("triggerLineEvent") && (this.packEventData(t, v), g && this.packEventData(t, g)); }, e.prototype.packEventData = function(t, n) { nt(n).eventData = { componentType: "series", componentSubType: "line", componentIndex: t.componentIndex, seriesIndex: t.seriesIndex, seriesName: t.name, seriesType: "line" }; }, e.prototype.highlight = function(t, n, i, a) { var o = t.getData(), s = Gd(o, a); if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) { var u = o.getLayout("points"), l = o.getItemGraphicEl(s); if (!l) { var c = u[s * 2], f = u[s * 2 + 1]; if (isNaN(c) || isNaN(f) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, f)) return; var h = t.get("zlevel"), p = t.get("z"); l = new Hw(o, s), l.x = c, l.y = f, l.setZ(h, p); var d = l.getSymbolPath().getTextContent(); d && (d.zlevel = h, d.z = p, d.z2 = this._polyline.z2 + 1), l.__temp = !0, o.setItemGraphicEl(s, l), l.stopSymbolAnimation(!0), this.group.add(l); } l.highlight(); } else an.prototype.highlight.call(this, t, n, i, a); }, e.prototype.downplay = function(t, n, i, a) { var o = t.getData(), s = Gd(o, a); if (this._changePolyState("normal"), s != null && s >= 0) { var u = o.getItemGraphicEl(s); u && (u.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(u)) : u.downplay()); } else an.prototype.downplay.call(this, t, n, i, a); }, e.prototype._changePolyState = function(t) { var n = this._polygon; dE(this._polyline, t), n && dE(n, t); }, e.prototype._newPolyline = function(t) { var n = this._polyline; return n && this._lineGroup.remove(n), n = new XOe({ shape: { points: t }, segmentIgnoreThreshold: 2, z2: 10 }), this._lineGroup.add(n), this._polyline = n, n; }, e.prototype._newPolygon = function(t, n) { var i = this._polygon; return i && this._lineGroup.remove(i), i = new eQ({ shape: { points: t, stackedOnPoints: n }, segmentIgnoreThreshold: 2 }), this._lineGroup.add(i), this._polygon = i, i; }, e.prototype._initSymbolLabelAnimation = function(t, n, i) { var a, o, s = n.getBaseAxis(), u = s.inverse; n.type === "cartesian2d" ? (a = s.isHorizontal(), o = !1) : n.type === "polar" && (a = s.dim === "angle", o = !0); var l = t.hostModel, c = l.get("animationDuration"); ze(c) && (c = c(null)); var f = l.get("animationDelay") || 0, h = ze(f) ? f(null) : f; t.eachItemGraphicEl(function(p, d) { var v = p; if (v) { var g = [p.x, p.y], m = void 0, y = void 0, _ = void 0; if (i) if (o) { var w = i, x = n.pointToCoord(g); a ? (m = w.startAngle, y = w.endAngle, _ = -x[1] / 180 * Math.PI) : (m = w.r0, y = w.r, _ = x[0]); } else { var C = i; a ? (m = C.x, y = C.x + C.width, _ = p.x) : (m = C.y + C.height, y = C.y, _ = p.y); } var S = y === m ? 0 : (_ - m) / (y - m); u && (S = 1 - S); var b = ze(f) ? f(d) : c * S + h, E = v.getSymbolPath(), T = E.getTextContent(); v.attr({ scaleX: 0, scaleY: 0 }), v.animateTo({ scaleX: 1, scaleY: 1 }, { duration: 200, setToFinal: !0, delay: b }), T && T.animateFrom({ style: { opacity: 0 } }, { duration: 300, delay: b }), E.disableLabelAnimation = !0; } }); }, e.prototype._initOrUpdateEndLabel = function(t, n, i) { var a = t.getModel("endLabel"); if (nQ(t)) { var o = t.getData(), s = this._polyline, u = o.getLayout("points"); if (!u) { s.removeTextContent(), this._endLabel = null; return; } var l = this._endLabel; l || (l = this._endLabel = new Yt({ z2: 200 }), l.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0); var c = rRe(u); c >= 0 && (no(s, wa(t, "endLabel"), { inheritColor: i, labelFetcher: t, labelDataIndex: c, defaultText: function(f, h, p) { return p != null ? ZJ(o, p) : Bm(o, f); }, enableTextSetter: !0 }, iRe(a, n)), s.textConfig.position = null); } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null); }, e.prototype._endLabelOnDuring = function(t, n, i, a, o, s, u) { var l = this._endLabel, c = this._polyline; if (l) { t < 1 && a.originalX == null && (a.originalX = l.x, a.originalY = l.y); var f = i.getLayout("points"), h = i.hostModel, p = h.get("connectNulls"), d = s.get("precision"), v = s.get("distance") || 0, g = u.getBaseAxis(), m = g.isHorizontal(), y = g.inverse, _ = n.shape, w = y ? m ? _.x : _.y + _.height : m ? _.x + _.width : _.y, x = (m ? v : 0) * (y ? -1 : 1), C = (m ? 0 : -v) * (y ? -1 : 1), S = m ? "x" : "y", b = nRe(f, w, S), E = b.range, T = E[1] - E[0], P = void 0; if (T >= 1) { if (T > 1 && !p) { var I = ez(f, E[0]); l.attr({ x: I[0] + x, y: I[1] + C }), o && (P = h.getRawValue(E[0])); } else { var I = c.getPointOn(w, S); I && l.attr({ x: I[0] + x, y: I[1] + C }); var A = h.getRawValue(E[0]), L = h.getRawValue(E[1]); o && (P = Eq(i, d, A, L, b.t)); } a.lastFrameIndex = E[0]; } else { var D = t === 1 || a.lastFrameIndex > 0 ? E[0] : 0, I = ez(f, D); o && (P = h.getRawValue(D)), l.attr({ x: I[0] + x, y: I[1] + C }); } o && Ey(l).setLabelText(P); } }, e.prototype._doUpdateAnimation = function(t, n, i, a, o, s, u) { var l = this._polyline, c = this._polygon, f = t.hostModel, h = YOe(this._data, t, this._stackedOnPoints, n, this._coordSys, i, this._valueOrigin), p = h.current, d = h.stackedOnCurrent, v = h.next, g = h.stackedOnNext; if (o && (p = Rf(h.current, i, o, u), d = Rf(h.stackedOnCurrent, i, o, u), v = Rf(h.next, i, o, u), g = Rf(h.stackedOnNext, i, o, u)), J4(p, v) > 3e3 || c && J4(d, g) > 3e3) { l.stopAnimation(), l.setShape({ points: v }), c && (c.stopAnimation(), c.setShape({ points: v, stackedOnPoints: g })); return; } l.shape.__points = h.current, l.shape.points = p; var m = { shape: { points: v } }; h.current !== p && (m.shape.__points = h.next), l.stopAnimation(), Ht(l, m, f), c && (c.setShape({ points: p, stackedOnPoints: d }), c.stopAnimation(), Ht(c, { shape: { stackedOnPoints: g } }, f), l.shape.points !== c.shape.points && (c.shape.points = l.shape.points)); for (var y = [], _ = h.status, w = 0; w < _.length; w++) { var x = _[w].cmd; if (x === "=") { var C = t.getItemGraphicEl(_[w].idx1); C && y.push({ el: C, ptIdx: w }); } } l.animators && l.animators.length && l.animators[0].during(function() { c && c.dirtyShape(); for (var S = l.shape.__points, b = 0; b < y.length; b++) { var E = y[b].el, T = y[b].ptIdx * 2; E.x = S[T], E.y = S[T + 1], E.markRedraw(); } }); }, e.prototype.remove = function(t) { var n = this.group, i = this._data; this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(a, o) { a.__temp && (n.remove(a), i.setItemGraphicEl(o, null)); }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null; }, e.type = "line", e; }(an); const oRe = aRe; function Ww(r, e) { return { seriesType: r, plan: Dy(), reset: function(t) { var n = t.getData(), i = t.coordinateSystem, a = t.pipelineContext, o = e || a.large; if (!!i) { var s = ce(i.dimensions, function(p) { return n.mapDimension(p); }).slice(0, 2), u = s.length, l = n.getCalculationInfo("stackResultDimension"); Fh(n, s[0]) && (s[0] = l), Fh(n, s[1]) && (s[1] = l); var c = n.getStore(), f = n.getDimensionIndex(s[0]), h = n.getDimensionIndex(s[1]); return u && { progress: function(p, d) { for (var v = p.end - p.start, g = o && Fl(v * u), m = [], y = [], _ = p.start, w = 0; _ < p.end; _++) { var x = void 0; if (u === 1) { var C = c.get(f, _); x = i.dataToPoint(C, null, y); } else m[0] = c.get(f, _), m[1] = c.get(h, _), x = i.dataToPoint(m, null, y); o ? (g[w++] = x[0], g[w++] = x[1]) : d.setItemLayout(_, x.slice()); } o && d.setLayout("points", g); } }; } } }; } var sRe = { average: function(r) { for (var e = 0, t = 0, n = 0; n < r.length; n++) isNaN(r[n]) || (e += r[n], t++); return t === 0 ? NaN : e / t; }, sum: function(r) { for (var e = 0, t = 0; t < r.length; t++) e += r[t] || 0; return e; }, max: function(r) { for (var e = -1 / 0, t = 0; t < r.length; t++) r[t] > e && (e = r[t]); return isFinite(e) ? e : NaN; }, min: function(r) { for (var e = 1 / 0, t = 0; t < r.length; t++) r[t] < e && (e = r[t]); return isFinite(e) ? e : NaN; }, nearest: function(r) { return r[0]; } }, uRe = function(r) { return Math.round(r.length / 2); }; function iQ(r) { return { seriesType: r, reset: function(e, t, n) { var i = e.getData(), a = e.get("sampling"), o = e.coordinateSystem, s = i.count(); if (s > 10 && o.type === "cartesian2d" && a) { var u = o.getBaseAxis(), l = o.getOtherAxis(u), c = u.getExtent(), f = n.getDevicePixelRatio(), h = Math.abs(c[1] - c[0]) * (f || 1), p = Math.round(s / h); if (isFinite(p) && p > 1) { a === "lttb" && e.setData(i.lttbDownSample(i.mapDimension(l.dim), 1 / p)); var d = void 0; Se(a) ? d = sRe[a] : ze(a) && (d = a), d && e.setData(i.downSample(i.mapDimension(l.dim), 1 / p, d, uRe)); } } } }; } function lRe(r) { r.registerChartView(oRe), r.registerSeriesModel(zOe), r.registerLayout(Ww("line", !0)), r.registerVisual({ seriesType: "line", reset: function(e) { var t = e.getData(), n = e.getModel("lineStyle").getLineStyle(); n && !n.stroke && (n.stroke = t.getVisual("style").fill), t.setVisual("legendLineStyle", n); } }), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, iQ("line")); } var aQ = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.getInitialData = function(t, n) { return _f(null, this, { useEncodeDefaulter: !0 }); }, e.prototype.getMarkerPosition = function(t) { var n = this.coordinateSystem; if (n && n.clampData) { var i = n.dataToPoint(n.clampData(t)), a = this.getData(), o = a.getLayout("offset"), s = a.getLayout("size"), u = n.getBaseAxis().isHorizontal() ? 0 : 1; return i[u] += o + s / 2, i; } return [NaN, NaN]; }, e.type = "series.__base_bar__", e.defaultOption = { z: 2, coordinateSystem: "cartesian2d", legendHoverLink: !0, barMinHeight: 0, barMinAngle: 0, large: !1, largeThreshold: 400, progressive: 3e3, progressiveChunkMode: "mod" }, e; }(bn); bn.registerClass(aQ); const NE = aQ; var cRe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.getInitialData = function() { return _f(null, this, { useEncodeDefaulter: !0, createInvertedIndices: !!this.get("realtimeSort", !0) || null }); }, e.prototype.getProgressive = function() { return this.get("large") ? this.get("progressive") : !1; }, e.prototype.getProgressiveThreshold = function() { var t = this.get("progressiveThreshold"), n = this.get("largeThreshold"); return n > t && (t = n), t; }, e.prototype.brushSelector = function(t, n, i) { return i.rect(n.getItemLayout(t)); }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = qh(NE.defaultOption, { clip: !0, roundCap: !1, showBackground: !1, backgroundStyle: { color: "rgba(180, 180, 180, 0.2)", borderColor: null, borderWidth: 0, borderType: "solid", borderRadius: 0, shadowBlur: 0, shadowColor: null, shadowOffsetX: 0, shadowOffsetY: 0, opacity: 1 }, select: { itemStyle: { borderColor: "#212121" } }, realtimeSort: !1 }), e; }(NE); const fRe = cRe; var hRe = function() { function r() { this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0; } return r; }(), pRe = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "sausage", n; } return e.prototype.getDefaultShape = function() { return new hRe(); }, e.prototype.buildPath = function(t, n) { var i = n.cx, a = n.cy, o = Math.max(n.r0 || 0, 0), s = Math.max(n.r, 0), u = (s - o) * 0.5, l = o + u, c = n.startAngle, f = n.endAngle, h = n.clockwise, p = Math.PI * 2, d = h ? f - c < p : c - f < p; d || (c = f - (h ? p : -p)); var v = Math.cos(c), g = Math.sin(c), m = Math.cos(f), y = Math.sin(f); d ? (t.moveTo(v * o + i, g * o + a), t.arc(v * l + i, g * l + a, u, -Math.PI + c, c, !h)) : t.moveTo(v * s + i, g * s + a), t.arc(i, a, s, c, f, !h), t.arc(m * l + i, y * l + a, u, f - Math.PI * 2, f - Math.PI, !h), o !== 0 && t.arc(i, a, o, f, c, h); }, e; }(Tt); const FE = pRe; function dRe(r, e) { e = e || {}; var t = e.isRoundCap; return function(n, i, a) { var o = i.position; if (!o || o instanceof Array) return fE(n, i, a); var s = r(o), u = i.distance != null ? i.distance : 5, l = this.shape, c = l.cx, f = l.cy, h = l.r, p = l.r0, d = (h + p) / 2, v = l.startAngle, g = l.endAngle, m = (v + g) / 2, y = t ? Math.abs(h - p) / 2 : 0, _ = Math.cos, w = Math.sin, x = c + h * _(v), C = f + h * w(v), S = "left", b = "top"; switch (s) { case "startArc": x = c + (p - u) * _(m), C = f + (p - u) * w(m), S = "center", b = "top"; break; case "insideStartArc": x = c + (p + u) * _(m), C = f + (p + u) * w(m), S = "center", b = "bottom"; break; case "startAngle": x = c + d * _(v) + dC(v, u + y, !1), C = f + d * w(v) + vC(v, u + y, !1), S = "right", b = "middle"; break; case "insideStartAngle": x = c + d * _(v) + dC(v, -u + y, !1), C = f + d * w(v) + vC(v, -u + y, !1), S = "left", b = "middle"; break; case "middle": x = c + d * _(m), C = f + d * w(m), S = "center", b = "middle"; break; case "endArc": x = c + (h + u) * _(m), C = f + (h + u) * w(m), S = "center", b = "bottom"; break; case "insideEndArc": x = c + (h - u) * _(m), C = f + (h - u) * w(m), S = "center", b = "top"; break; case "endAngle": x = c + d * _(g) + dC(g, u + y, !0), C = f + d * w(g) + vC(g, u + y, !0), S = "left", b = "middle"; break; case "insideEndAngle": x = c + d * _(g) + dC(g, -u + y, !0), C = f + d * w(g) + vC(g, -u + y, !0), S = "right", b = "middle"; break; default: return fE(n, i, a); } return n = n || {}, n.x = x, n.y = C, n.align = S, n.verticalAlign = b, n; }; } function vRe(r, e, t, n) { if ($t(n)) { r.setTextConfig({ rotation: n }); return; } else if (le(e)) { r.setTextConfig({ rotation: 0 }); return; } var i = r.shape, a = i.clockwise ? i.startAngle : i.endAngle, o = i.clockwise ? i.endAngle : i.startAngle, s = (a + o) / 2, u, l = t(e); switch (l) { case "startArc": case "insideStartArc": case "middle": case "insideEndArc": case "endArc": u = s; break; case "startAngle": case "insideStartAngle": u = a; break; case "endAngle": case "insideEndAngle": u = o; break; default: r.setTextConfig({ rotation: 0 }); return; } var c = Math.PI * 1.5 - u; l === "middle" && c > Math.PI / 2 && c < Math.PI * 1.5 && (c -= Math.PI), r.setTextConfig({ rotation: c }); } function dC(r, e, t) { return e * Math.sin(r) * (t ? -1 : 1); } function vC(r, e, t) { return e * Math.cos(r) * (t ? 1 : -1); } var RA = Math.max, NA = Math.min; function gRe(r, e) { var t = r.getArea && r.getArea(); if (mv(r, "cartesian2d")) { var n = r.getBaseAxis(); if (n.type !== "category" || !n.onBand) { var i = e.getLayout("bandWidth"); n.isHorizontal() ? (t.x -= i, t.width += i * 2) : (t.y -= i, t.height += i * 2); } } return t; } var mRe = function(r) { W(e, r); function e() { var t = r.call(this) || this; return t.type = e.type, t._isFirstFrame = !0, t; } return e.prototype.render = function(t, n, i, a) { this._model = t, this._removeOnRenderedListener(i), this._updateDrawMode(t); var o = t.get("coordinateSystem"); o === "cartesian2d" || o === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(t, n, i) : this._renderNormal(t, n, i, a)) : process.env.NODE_ENV !== "production" && to("Only cartesian2d and polar supported for bar."); }, e.prototype.incrementalPrepareRender = function(t) { this._clear(), this._updateDrawMode(t), this._updateLargeClip(t); }, e.prototype.incrementalRender = function(t, n) { this._progressiveEls = [], this._incrementalRenderLarge(t, n); }, e.prototype.eachRendered = function(t) { Xh(this._progressiveEls || this.group, t); }, e.prototype._updateDrawMode = function(t) { var n = t.pipelineContext.large; (this._isLargeDraw == null || n !== this._isLargeDraw) && (this._isLargeDraw = n, this._clear()); }, e.prototype._renderNormal = function(t, n, i, a) { var o = this.group, s = t.getData(), u = this._data, l = t.coordinateSystem, c = l.getBaseAxis(), f; l.type === "cartesian2d" ? f = c.isHorizontal() : l.type === "polar" && (f = c.dim === "angle"); var h = t.isAnimationEnabled() ? t : null, p = yRe(t, l); p && this._enableRealtimeSort(p, s, i); var d = t.get("clip", !0) || p, v = gRe(l, s); o.removeClipPath(); var g = t.get("roundCap", !0), m = t.get("showBackground", !0), y = t.getModel("backgroundStyle"), _ = y.get("borderRadius") || 0, w = [], x = this._backgroundEls, C = a && a.isInitSort, S = a && a.type === "changeAxisOrder"; function b(P) { var I = gC[l.type](s, P), A = bRe(l, f, I); return A.useStyle(y.getItemStyle()), l.type === "cartesian2d" && A.setShape("r", _), w[P] = A, A; } s.diff(u).add(function(P) { var I = s.getItemModel(P), A = gC[l.type](s, P, I); if (m && b(P), !(!s.hasValue(P) || !az[l.type](A))) { var L = !1; d && (L = tz[l.type](v, A)); var D = rz[l.type](t, s, P, A, f, h, c.model, !1, g); p && (D.forceLabelAnimation = !0), oz(D, s, P, I, A, t, f, l.type === "polar"), C ? D.attr({ shape: A }) : p ? nz(p, h, D, A, P, f, !1, !1) : Cn(D, { shape: A }, t, P), s.setItemGraphicEl(P, D), o.add(D), D.ignore = L; } }).update(function(P, I) { var A = s.getItemModel(P), L = gC[l.type](s, P, A); if (m) { var D = void 0; x.length === 0 ? D = b(I) : (D = x[I], D.useStyle(y.getItemStyle()), l.type === "cartesian2d" && D.setShape("r", _), w[P] = D); var O = gC[l.type](s, P), N = sQ(f, O, l); Ht(D, { shape: N }, h, P); } var F = u.getItemGraphicEl(I); if (!s.hasValue(P) || !az[l.type](L)) { o.remove(F); return; } var k = !1; if (d && (k = tz[l.type](v, L), k && o.remove(F)), F ? nl(F) : F = rz[l.type](t, s, P, L, f, h, c.model, !!F, g), p && (F.forceLabelAnimation = !0), S) { var G = F.getTextContent(); if (G) { var U = Ey(G); U.prevValue != null && (U.prevValue = U.value); } } else oz(F, s, P, A, L, t, f, l.type === "polar"); C ? F.attr({ shape: L }) : p ? nz(p, h, F, L, P, f, !0, S) : Ht(F, { shape: L }, t, P, null), s.setItemGraphicEl(P, F), F.ignore = k, o.add(F); }).remove(function(P) { var I = u.getItemGraphicEl(P); I && g1(I, t, P); }).execute(); var E = this._backgroundGroup || (this._backgroundGroup = new rt()); E.removeAll(); for (var T = 0; T < w.length; ++T) E.add(w[T]); o.add(E), this._backgroundEls = w, this._data = s; }, e.prototype._renderLarge = function(t, n, i) { this._clear(), uz(t, this.group), this._updateLargeClip(t); }, e.prototype._incrementalRenderLarge = function(t, n) { this._removeBackground(), uz(n, this.group, this._progressiveEls, !0); }, e.prototype._updateLargeClip = function(t) { var n = t.get("clip", !0) && lP(t.coordinateSystem, !1, t), i = this.group; n ? i.setClipPath(n) : i.removeClipPath(); }, e.prototype._enableRealtimeSort = function(t, n, i) { var a = this; if (!!n.count()) { var o = t.baseAxis; if (this._isFirstFrame) this._dispatchInitSort(n, t, i), this._isFirstFrame = !1; else { var s = function(u) { var l = n.getItemGraphicEl(u), c = l && l.shape; return c && Math.abs(o.isHorizontal() ? c.height : c.width) || 0; }; this._onRendered = function() { a._updateSortWithinSameData(n, s, o, i); }, i.getZr().on("rendered", this._onRendered); } } }, e.prototype._dataSort = function(t, n, i) { var a = []; return t.each(t.mapDimension(n.dim), function(o, s) { var u = i(s); u = u == null ? NaN : u, a.push({ dataIndex: s, mappedValue: u, ordinalNumber: o }); }), a.sort(function(o, s) { return s.mappedValue - o.mappedValue; }), { ordinalNumbers: ce(a, function(o) { return o.ordinalNumber; }) }; }, e.prototype._isOrderChangedWithinSameData = function(t, n, i) { for (var a = i.scale, o = t.mapDimension(i.dim), s = Number.MAX_VALUE, u = 0, l = a.getOrdinalMeta().categories.length; u < l; ++u) { var c = t.rawIndexOf(o, a.getRawOrdinalNumber(u)), f = c < 0 ? Number.MIN_VALUE : n(t.indexOfRawIndex(c)); if (f > s) return !0; s = f; } return !1; }, e.prototype._isOrderDifferentInView = function(t, n) { for (var i = n.scale, a = i.getExtent(), o = Math.max(0, a[0]), s = Math.min(a[1], i.getOrdinalMeta().categories.length - 1); o <= s; ++o) if (t.ordinalNumbers[o] !== i.getRawOrdinalNumber(o)) return !0; }, e.prototype._updateSortWithinSameData = function(t, n, i, a) { if (!!this._isOrderChangedWithinSameData(t, n, i)) { var o = this._dataSort(t, i, n); this._isOrderDifferentInView(o, i) && (this._removeOnRenderedListener(a), a.dispatchAction({ type: "changeAxisOrder", componentType: i.dim + "Axis", axisId: i.index, sortInfo: o })); } }, e.prototype._dispatchInitSort = function(t, n, i) { var a = n.baseAxis, o = this._dataSort(t, a, function(s) { return t.get(t.mapDimension(n.otherAxis.dim), s); }); i.dispatchAction({ type: "changeAxisOrder", componentType: a.dim + "Axis", isInitSort: !0, axisId: a.index, sortInfo: o }); }, e.prototype.remove = function(t, n) { this._clear(this._model), this._removeOnRenderedListener(n); }, e.prototype.dispose = function(t, n) { this._removeOnRenderedListener(n); }, e.prototype._removeOnRenderedListener = function(t) { this._onRendered && (t.getZr().off("rendered", this._onRendered), this._onRendered = null); }, e.prototype._clear = function(t) { var n = this.group, i = this._data; t && t.isAnimationEnabled() && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function(a) { g1(a, t, nt(a).dataIndex); })) : n.removeAll(), this._data = null, this._isFirstFrame = !0; }, e.prototype._removeBackground = function() { this.group.remove(this._backgroundGroup), this._backgroundGroup = null; }, e.type = "bar", e; }(an), tz = { cartesian2d: function(r, e) { var t = e.width < 0 ? -1 : 1, n = e.height < 0 ? -1 : 1; t < 0 && (e.x += e.width, e.width = -e.width), n < 0 && (e.y += e.height, e.height = -e.height); var i = r.x + r.width, a = r.y + r.height, o = RA(e.x, r.x), s = NA(e.x + e.width, i), u = RA(e.y, r.y), l = NA(e.y + e.height, a), c = s < o, f = l < u; return e.x = c && o > i ? s : o, e.y = f && u > a ? l : u, e.width = c ? 0 : s - o, e.height = f ? 0 : l - u, t < 0 && (e.x += e.width, e.width = -e.width), n < 0 && (e.y += e.height, e.height = -e.height), c || f; }, polar: function(r, e) { var t = e.r0 <= e.r ? 1 : -1; if (t < 0) { var n = e.r; e.r = e.r0, e.r0 = n; } var i = NA(e.r, r.r), a = RA(e.r0, r.r0); e.r = i, e.r0 = a; var o = i - a < 0; if (t < 0) { var n = e.r; e.r = e.r0, e.r0 = n; } return o; } }, rz = { cartesian2d: function(r, e, t, n, i, a, o, s, u) { var l = new Vt({ shape: oe({}, n), z2: 1 }); if (l.__dataIndex = t, l.name = "item", a) { var c = l.shape, f = i ? "height" : "width"; c[f] = 0; } return l; }, polar: function(r, e, t, n, i, a, o, s, u) { var l = !i && u ? FE : $o, c = new l({ shape: n, z2: 1 }); c.name = "item"; var f = oQ(i); if (c.calculateTextPosition = dRe(f, { isRoundCap: l === FE }), a) { var h = c.shape, p = i ? "r" : "endAngle", d = {}; h[p] = i ? 0 : n.startAngle, d[p] = n[p], (s ? Ht : Cn)(c, { shape: d }, a); } return c; } }; function yRe(r, e) { var t = r.get("realtimeSort", !0), n = e.getBaseAxis(); if (process.env.NODE_ENV !== "production" && t && (n.type !== "category" && to("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && to("`realtimeSort` will not work because this bar series is not on cartesian2d.")), t && n.type === "category" && e.type === "cartesian2d") return { baseAxis: n, otherAxis: e.getOtherAxis(n) }; } function nz(r, e, t, n, i, a, o, s) { var u, l; a ? (l = { x: n.x, width: n.width }, u = { y: n.y, height: n.height }) : (l = { y: n.y, height: n.height }, u = { x: n.x, width: n.width }), s || (o ? Ht : Cn)(t, { shape: u }, e, i, null); var c = e ? r.baseAxis.model : null; (o ? Ht : Cn)(t, { shape: l }, c, i); } function iz(r, e) { for (var t = 0; t < e.length; t++) if (!isFinite(r[e[t]])) return !0; return !1; } var _Re = ["x", "y", "width", "height"], wRe = ["cx", "cy", "r", "startAngle", "endAngle"], az = { cartesian2d: function(r) { return !iz(r, _Re); }, polar: function(r) { return !iz(r, wRe); } }, gC = { cartesian2d: function(r, e, t) { var n = r.getItemLayout(e), i = t ? CRe(t, n) : 0, a = n.width > 0 ? 1 : -1, o = n.height > 0 ? 1 : -1; return { x: n.x + a * i / 2, y: n.y + o * i / 2, width: n.width - a * i, height: n.height - o * i }; }, polar: function(r, e, t) { var n = r.getItemLayout(e); return { cx: n.cx, cy: n.cy, r0: n.r0, r: n.r, startAngle: n.startAngle, endAngle: n.endAngle, clockwise: n.clockwise }; } }; function xRe(r) { return r.startAngle != null && r.endAngle != null && r.startAngle === r.endAngle; } function oQ(r) { return function(e) { var t = e ? "Arc" : "Angle"; return function(n) { switch (n) { case "start": case "insideStart": case "end": case "insideEnd": return n + t; default: return n; } }; }(r); } function oz(r, e, t, n, i, a, o, s) { var u = e.getItemVisual(t, "style"); s || r.setShape("r", n.get(["itemStyle", "borderRadius"]) || 0), r.useStyle(u); var l = n.getShallow("cursor"); l && r.attr("cursor", l); var c = s ? o ? i.r >= i.r0 ? "endArc" : "startArc" : i.endAngle >= i.startAngle ? "endAngle" : "startAngle" : o ? i.height >= 0 ? "bottom" : "top" : i.width >= 0 ? "right" : "left", f = wa(n); no(r, f, { labelFetcher: a, labelDataIndex: t, defaultText: Bm(a.getData(), t), inheritColor: u.fill, defaultOpacity: u.opacity, defaultOutsidePosition: c }); var h = r.getTextContent(); if (s && h) { var p = n.get(["label", "position"]); r.textConfig.inside = p === "middle" ? !0 : null, vRe(r, p === "outside" ? c : p, oQ(o), n.get(["label", "rotate"])); } CZ(h, f, a.getRawValue(t), function(v) { return ZJ(e, v); }); var d = n.getModel(["emphasis"]); Zn(r, d.get("focus"), d.get("blurScope"), d.get("disabled")), Ra(r, n), xRe(i) && (r.style.fill = "none", r.style.stroke = "none", M(r.states, function(v) { v.style && (v.style.fill = v.style.stroke = "none"); })); } function CRe(r, e) { var t = r.get(["itemStyle", "borderColor"]); if (!t || t === "none") return 0; var n = r.get(["itemStyle", "borderWidth"]) || 0, i = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width), a = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height); return Math.min(n, i, a); } var SRe = function() { function r() { } return r; }(), sz = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "largeBar", n; } return e.prototype.getDefaultShape = function() { return new SRe(); }, e.prototype.buildPath = function(t, n) { for (var i = n.points, a = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], u = [], l = this.barWidth, c = 0; c < i.length; c += 3) u[a] = l, u[o] = i[c + 2], s[a] = i[c + a], s[o] = i[c + o], t.rect(s[0], s[1], u[0], u[1]); }, e; }(Tt); function uz(r, e, t, n) { var i = r.getData(), a = i.getLayout("valueAxisHorizontal") ? 1 : 0, o = i.getLayout("largeDataIndices"), s = i.getLayout("size"), u = r.getModel("backgroundStyle"), l = i.getLayout("largeBackgroundPoints"); if (l) { var c = new sz({ shape: { points: l }, incremental: !!n, silent: !0, z2: 0 }); c.baseDimIdx = a, c.largeDataIndices = o, c.barWidth = s, c.useStyle(u.getItemStyle()), e.add(c), t && t.push(c); } var f = new sz({ shape: { points: i.getLayout("largePoints") }, incremental: !!n, z2: 1 }); f.baseDimIdx = a, f.largeDataIndices = o, f.barWidth = s, e.add(f), f.useStyle(i.getVisual("style")), nt(f).seriesIndex = r.seriesIndex, r.get("silent") || (f.on("mousedown", lz), f.on("mousemove", lz)), t && t.push(f); } var lz = wF(function(r) { var e = this, t = ERe(e, r.offsetX, r.offsetY); nt(e).dataIndex = t >= 0 ? t : null; }, 30, !1); function ERe(r, e, t) { for (var n = r.baseDimIdx, i = 1 - n, a = r.shape.points, o = r.largeDataIndices, s = [], u = [], l = r.barWidth, c = 0, f = a.length / 3; c < f; c++) { var h = c * 3; if (u[n] = l, u[i] = a[h + 2], s[n] = a[h + n], s[i] = a[h + i], u[i] < 0 && (s[i] += u[i], u[i] = -u[i]), e >= s[0] && e <= s[0] + u[0] && t >= s[1] && t <= s[1] + u[1]) return o[c]; } return -1; } function sQ(r, e, t) { if (mv(t, "cartesian2d")) { var n = e, i = t.getArea(); return { x: r ? n.x : i.x, y: r ? i.y : n.y, width: r ? n.width : i.width, height: r ? i.height : n.height }; } else { var i = t.getArea(), a = e; return { cx: i.cx, cy: i.cy, r0: r ? i.r0 : a.r0, r: r ? i.r : a.r, startAngle: r ? a.startAngle : 0, endAngle: r ? a.endAngle : Math.PI * 2 }; } } function bRe(r, e, t) { var n = r.type === "polar" ? $o : Vt; return new n({ shape: sQ(e, t, r), silent: !0, z2: 0 }); } const TRe = mRe; function PRe(r) { r.registerChartView(TRe), r.registerSeriesModel(fRe), r.registerLayout(r.PRIORITY.VISUAL.LAYOUT, ut(pJ, "bar")), r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, dJ("bar")), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, iQ("bar")), r.registerAction({ type: "changeAxisOrder", event: "changeAxisOrder", update: "update" }, function(e, t) { var n = e.componentType || "series"; t.eachComponent({ mainType: n, query: e }, function(i) { e.sortInfo && i.axis.setCategorySortInfo(e.sortInfo); }); }); } var mC = Math.PI * 2, cz = Math.PI / 180; function uQ(r, e) { return Bi(r.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }); } function lQ(r, e) { var t = uQ(r, e), n = r.get("center"), i = r.get("radius"); le(i) || (i = [0, i]), le(n) || (n = [n, n]); var a = ye(t.width, e.getWidth()), o = ye(t.height, e.getHeight()), s = Math.min(a, o), u = ye(n[0], a) + t.x, l = ye(n[1], o) + t.y, c = ye(i[0], s / 2), f = ye(i[1], s / 2); return { cx: u, cy: l, r0: c, r: f }; } function IRe(r, e, t) { e.eachSeriesByType(r, function(n) { var i = n.getData(), a = i.mapDimension("value"), o = uQ(n, t), s = lQ(n, t), u = s.cx, l = s.cy, c = s.r, f = s.r0, h = -n.get("startAngle") * cz, p = n.get("minAngle") * cz, d = 0; i.each(a, function(T) { !isNaN(T) && d++; }); var v = i.getSum(a), g = Math.PI / (v || d) * 2, m = n.get("clockwise"), y = n.get("roseType"), _ = n.get("stillShowZeroSum"), w = i.getDataExtent(a); w[0] = 0; var x = mC, C = 0, S = h, b = m ? 1 : -1; if (i.setLayout({ viewRect: o, r: c }), i.each(a, function(T, P) { var I; if (isNaN(T)) { i.setItemLayout(P, { angle: NaN, startAngle: NaN, endAngle: NaN, clockwise: m, cx: u, cy: l, r0: f, r: y ? NaN : c }); return; } y !== "area" ? I = v === 0 && _ ? g : T * g : I = mC / d, I < p ? (I = p, x -= p) : C += T; var A = S + b * I; i.setItemLayout(P, { angle: I, startAngle: S, endAngle: A, clockwise: m, cx: u, cy: l, r0: f, r: y ? Fr(T, w, [f, c]) : c }), S = A; }), x < mC && d) if (x <= 1e-3) { var E = mC / d; i.each(a, function(T, P) { if (!isNaN(T)) { var I = i.getItemLayout(P); I.angle = E, I.startAngle = h + b * P * E, I.endAngle = h + b * (P + 1) * E; } }); } else g = x / C, S = h, i.each(a, function(T, P) { if (!isNaN(T)) { var I = i.getItemLayout(P), A = I.angle === p ? p : T * g; I.startAngle = S, I.endAngle = S + b * A, S += b * A; } }); }); } function jw(r) { return { seriesType: r, reset: function(e, t) { var n = t.findComponents({ mainType: "legend" }); if (!(!n || !n.length)) { var i = e.getData(); i.filterSelf(function(a) { for (var o = i.getName(a), s = 0; s < n.length; s++) if (!n[s].isSelected(o)) return !1; return !0; }); } } }; } var ARe = Math.PI / 180; function fz(r, e, t, n, i, a, o, s, u, l) { if (r.length < 2) return; function c(v) { for (var g = v.rB, m = g * g, y = 0; y < v.list.length; y++) { var _ = v.list[y], w = Math.abs(_.label.y - t), x = n + _.len, C = x * x, S = Math.sqrt((1 - Math.abs(w * w / m)) * C), b = e + (S + _.len2) * i, E = b - _.label.x, T = _.targetTextWidth - E * i; cQ(_, T, !0), _.label.x = b; } } function f(v) { for (var g = { list: [], maxY: 0 }, m = { list: [], maxY: 0 }, y = 0; y < v.length; y++) if (v[y].labelAlignTo === "none") { var _ = v[y], w = _.label.y > t ? m : g, x = Math.abs(_.label.y - t); if (x >= w.maxY) { var C = _.label.x - e - _.len2 * i, S = n + _.len, b = Math.abs(C) < S ? Math.sqrt(x * x / (1 - C * C / S / S)) : S; w.rB = b, w.maxY = x; } w.list.push(_); } c(g), c(m); } for (var h = r.length, p = 0; p < h; p++) if (r[p].position === "outer" && r[p].labelAlignTo === "labelLine") { var d = r[p].label.x - l; r[p].linePoints[1][0] += d, r[p].label.x = l; } FJ(r, u, u + o) && f(r); } function LRe(r, e, t, n, i, a, o, s) { for (var u = [], l = [], c = Number.MAX_VALUE, f = -Number.MAX_VALUE, h = 0; h < r.length; h++) { var p = r[h].label; FA(r[h]) || (p.x < e ? (c = Math.min(c, p.x), u.push(r[h])) : (f = Math.max(f, p.x), l.push(r[h]))); } for (var h = 0; h < r.length; h++) { var d = r[h]; if (!FA(d) && d.linePoints) { if (d.labelStyleWidth != null) continue; var p = d.label, v = d.linePoints, g = void 0; d.labelAlignTo === "edge" ? p.x < e ? g = v[2][0] - d.labelDistance - o - d.edgeDistance : g = o + i - d.edgeDistance - v[2][0] - d.labelDistance : d.labelAlignTo === "labelLine" ? p.x < e ? g = c - o - d.bleedMargin : g = o + i - f - d.bleedMargin : p.x < e ? g = p.x - o - d.bleedMargin : g = o + i - p.x - d.bleedMargin, d.targetTextWidth = g, cQ(d, g); } } fz(l, e, t, n, 1, i, a, o, s, f), fz(u, e, t, n, -1, i, a, o, s, c); for (var h = 0; h < r.length; h++) { var d = r[h]; if (!FA(d) && d.linePoints) { var p = d.label, v = d.linePoints, m = d.labelAlignTo === "edge", y = p.style.padding, _ = y ? y[1] + y[3] : 0, w = p.style.backgroundColor ? 0 : _, x = d.rect.width + w, C = v[1][0] - v[2][0]; m ? p.x < e ? v[2][0] = o + d.edgeDistance + x + d.labelDistance : v[2][0] = o + i - d.edgeDistance - x - d.labelDistance : (p.x < e ? v[2][0] = p.x + d.labelDistance : v[2][0] = p.x - d.labelDistance, v[1][0] = v[2][0] + C), v[1][1] = v[2][1] = p.y; } } } function cQ(r, e, t) { if (t === void 0 && (t = !1), r.labelStyleWidth == null) { var n = r.label, i = n.style, a = r.rect, o = i.backgroundColor, s = i.padding, u = s ? s[1] + s[3] : 0, l = i.overflow, c = a.width + (o ? 0 : u); if (e < c || t) { var f = a.height; if (l && l.match("break")) { n.setStyle("backgroundColor", null), n.setStyle("width", e - u); var h = n.getBoundingRect(); n.setStyle("width", Math.ceil(h.width)), n.setStyle("backgroundColor", o); } else { var p = e - u, d = e < c ? p : t ? p > r.unconstrainedWidth ? null : p : null; n.setStyle("width", d); } var v = n.getBoundingRect(); a.width = v.width; var g = (n.style.margin || 0) + 2.1; a.height = v.height + g, a.y -= (a.height - f) / 2; } } } function FA(r) { return r.position === "center"; } function DRe(r) { var e = r.getData(), t = [], n, i, a = !1, o = (r.get("minShowLabelAngle") || 0) * ARe, s = e.getLayout("viewRect"), u = e.getLayout("r"), l = s.width, c = s.x, f = s.y, h = s.height; function p(C) { C.ignore = !0; } function d(C) { if (!C.ignore) return !0; for (var S in C.states) if (C.states[S].ignore === !1) return !0; return !1; } e.each(function(C) { var S = e.getItemGraphicEl(C), b = S.shape, E = S.getTextContent(), T = S.getTextGuideLine(), P = e.getItemModel(C), I = P.getModel("label"), A = I.get("position") || P.get(["emphasis", "label", "position"]), L = I.get("distanceToLabelLine"), D = I.get("alignTo"), O = ye(I.get("edgeDistance"), l), N = I.get("bleedMargin"), F = P.getModel("labelLine"), k = F.get("length"); k = ye(k, l); var G = F.get("length2"); if (G = ye(G, l), Math.abs(b.endAngle - b.startAngle) < o) { M(E.states, p), E.ignore = !0; return; } if (!!d(E)) { var U = (b.startAngle + b.endAngle) / 2, B = Math.cos(U), X = Math.sin(U), j, ae, se, $; n = b.cx, i = b.cy; var V = A === "inside" || A === "inner"; if (A === "center") j = b.cx, ae = b.cy, $ = "center"; else { var q = (V ? (b.r + b.r0) / 2 * B : b.r * B) + n, ee = (V ? (b.r + b.r0) / 2 * X : b.r * X) + i; if (j = q + B * 3, ae = ee + X * 3, !V) { var Y = q + B * (k + u - b.r), K = ee + X * (k + u - b.r), fe = Y + (B < 0 ? -1 : 1) * G, J = K; D === "edge" ? j = B < 0 ? c + O : c + l - O : j = fe + (B < 0 ? -L : L), ae = J, se = [[q, ee], [Y, K], [fe, J]]; } $ = V ? "center" : D === "edge" ? B > 0 ? "right" : "left" : B > 0 ? "left" : "right"; } var ue = Math.PI, ne = 0, ve = I.get("rotate"); if ($t(ve)) ne = ve * (ue / 180); else if (A === "center") ne = 0; else if (ve === "radial" || ve === !0) { var Pe = B < 0 ? -U + ue : -U; ne = Pe; } else if (ve === "tangential" && A !== "outside" && A !== "outer") { var Be = Math.atan2(B, X); Be < 0 && (Be = ue * 2 + Be); var ke = X > 0; ke && (Be = ue + Be), ne = Be - ue; } if (a = !!ne, E.x = j, E.y = ae, E.rotation = ne, E.setStyle({ verticalAlign: "middle" }), V) { E.setStyle({ align: $ }); var Oe = E.states.select; Oe && (Oe.x += E.x, Oe.y += E.y); } else { var Le = E.getBoundingRect().clone(); Le.applyTransform(E.getComputedTransform()); var Ye = (E.style.margin || 0) + 2.1; Le.y -= Ye / 2, Le.height += Ye, t.push({ label: E, labelLine: T, position: A, len: k, len2: G, minTurnAngle: F.get("minTurnAngle"), maxSurfaceAngle: F.get("maxSurfaceAngle"), surfaceNormal: new ft(B, X), linePoints: se, textAlign: $, labelDistance: L, labelAlignTo: D, edgeDistance: O, bleedMargin: N, rect: Le, unconstrainedWidth: Le.width, labelStyleWidth: E.style.width }); } S.setTextConfig({ inside: V }); } }), !a && r.get("avoidLabelOverlap") && LRe(t, n, i, u, l, h, c, f); for (var v = 0; v < t.length; v++) { var g = t[v], m = g.label, y = g.labelLine, _ = isNaN(m.x) || isNaN(m.y); if (m) { m.setStyle({ align: g.textAlign }), _ && (M(m.states, p), m.ignore = !0); var w = m.states.select; w && (w.x += m.x, w.y += m.y); } if (y) { var x = g.linePoints; _ || !x ? (M(y.states, p), y.ignore = !0) : (OJ(x, g.minTurnAngle), H2e(x, g.surfaceNormal, g.maxSurfaceAngle), y.setShape({ points: x }), m.__hostTarget.textGuideLineConfig = { anchor: new ft(x[0][0], x[0][1]) }); } } } function Ng(r, e, t) { var n = r.get("borderRadius"); if (n == null) return t ? { cornerRadius: 0 } : null; le(n) || (n = [n, n, n, n]); var i = Math.abs(e.r || 0 - e.r0 || 0); return { cornerRadius: ce(n, function(a) { return tl(a, i); }) }; } var MRe = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this) || this; a.z2 = 2; var o = new Yt(); return a.setTextContent(o), a.updateData(t, n, i, !0), a; } return e.prototype.updateData = function(t, n, i, a) { var o = this, s = t.hostModel, u = t.getItemModel(n), l = u.getModel("emphasis"), c = t.getItemLayout(n), f = oe(Ng(u.getModel("itemStyle"), c, !0), c); if (isNaN(f.startAngle)) { o.setShape(f); return; } if (a) { o.setShape(f); var h = s.getShallow("animationType"); s.ecModel.ssr ? (Cn(o, { scaleX: 0, scaleY: 0 }, s, { dataIndex: n, isFrom: !0 }), o.originX = f.cx, o.originY = f.cy) : h === "scale" ? (o.shape.r = c.r0, Cn(o, { shape: { r: c.r } }, s, n)) : i != null ? (o.setShape({ startAngle: i, endAngle: i }), Cn(o, { shape: { startAngle: c.startAngle, endAngle: c.endAngle } }, s, n)) : (o.shape.endAngle = c.startAngle, Ht(o, { shape: { endAngle: c.endAngle } }, s, n)); } else nl(o), Ht(o, { shape: f }, s, n); o.useStyle(t.getItemVisual(n, "style")), Ra(o, u); var p = (c.startAngle + c.endAngle) / 2, d = s.get("selectedOffset"), v = Math.cos(p) * d, g = Math.sin(p) * d, m = u.getShallow("cursor"); m && o.attr("cursor", m), this._updateLabel(s, t, n), o.ensureState("emphasis").shape = oe({ r: c.r + (l.get("scale") && l.get("scaleSize") || 0) }, Ng(l.getModel("itemStyle"), c)), oe(o.ensureState("select"), { x: v, y: g, shape: Ng(u.getModel(["select", "itemStyle"]), c) }), oe(o.ensureState("blur"), { shape: Ng(u.getModel(["blur", "itemStyle"]), c) }); var y = o.getTextGuideLine(), _ = o.getTextContent(); y && oe(y.ensureState("select"), { x: v, y: g }), oe(_.ensureState("select"), { x: v, y: g }), Zn(this, l.get("focus"), l.get("blurScope"), l.get("disabled")); }, e.prototype._updateLabel = function(t, n, i) { var a = this, o = n.getItemModel(i), s = o.getModel("labelLine"), u = n.getItemVisual(i, "style"), l = u && u.fill, c = u && u.opacity; no(a, wa(o), { labelFetcher: n.hostModel, labelDataIndex: i, inheritColor: l, defaultOpacity: c, defaultText: t.getFormattedLabel(i, "normal") || n.getName(i) }); var f = a.getTextContent(); a.setTextConfig({ position: null, rotation: null }), f.attr({ z2: 10 }); var h = t.get(["label", "position"]); if (h !== "outside" && h !== "outer") a.removeTextGuideLine(); else { var p = this.getTextGuideLine(); p || (p = new jo(), this.setTextGuideLine(p)), RF(this, NF(o), { stroke: l, opacity: $u(s.get(["lineStyle", "opacity"]), c, 1) }); } }, e; }($o), ORe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.ignoreLabelLineUpdate = !0, t; } return e.prototype.render = function(t, n, i, a) { var o = t.getData(), s = this._data, u = this.group, l; if (!s && o.count() > 0) { for (var c = o.getItemLayout(0), f = 1; isNaN(c && c.startAngle) && f < o.count(); ++f) c = o.getItemLayout(f); c && (l = c.startAngle); } if (this._emptyCircleSector && u.remove(this._emptyCircleSector), o.count() === 0 && t.get("showEmptyCircle")) { var h = new $o({ shape: lQ(t, i) }); h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, u.add(h); } o.diff(s).add(function(p) { var d = new MRe(o, p, l); o.setItemGraphicEl(p, d), u.add(d); }).update(function(p, d) { var v = s.getItemGraphicEl(d); v.updateData(o, p, l), v.off("click"), u.add(v), o.setItemGraphicEl(p, v); }).remove(function(p) { var d = s.getItemGraphicEl(p); g1(d, t, p); }).execute(), DRe(t), t.get("animationTypeUpdate") !== "expansion" && (this._data = o); }, e.prototype.dispose = function() { }, e.prototype.containPoint = function(t, n) { var i = n.getData(), a = i.getItemLayout(0); if (a) { var o = t[0] - a.cx, s = t[1] - a.cy, u = Math.sqrt(o * o + s * s); return u <= a.r && u >= a.r0; } }, e.type = "pie", e; }(an); const RRe = ORe; function Ry(r, e, t) { e = le(e) && { coordDimensions: e } || oe({ encodeDefine: r.getEncode() }, e); var n = r.getSource(), i = Gw(n, e).dimensions, a = new ho(i, r); return a.initData(n, t), a; } var NRe = function() { function r(e, t) { this._getDataWithEncodedVisual = e, this._getRawData = t; } return r.prototype.getAllNames = function() { var e = this._getRawData(); return e.mapArray(e.getName); }, r.prototype.containName = function(e) { var t = this._getRawData(); return t.indexOfName(e) >= 0; }, r.prototype.indexOfName = function(e) { var t = this._getDataWithEncodedVisual(); return t.indexOfName(e); }, r.prototype.getItemVisual = function(e, t) { var n = this._getDataWithEncodedVisual(); return n.getItemVisual(e, t); }, r; }(); const Yw = NRe; var FRe = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.init = function(t) { r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Yw(Ae(this.getData, this), Ae(this.getRawData, this)), this._defaultLabelLine(t); }, e.prototype.mergeOption = function() { r.prototype.mergeOption.apply(this, arguments); }, e.prototype.getInitialData = function() { return Ry(this, { coordDimensions: ["value"], encodeDefaulter: ut(cF, this) }); }, e.prototype.getDataParams = function(t) { var n = this.getData(), i = r.prototype.getDataParams.call(this, t), a = []; return n.each(n.mapDimension("value"), function(o) { a.push(o); }), i.percent = GTe(a, t, n.hostModel.get("percentPrecision")), i.$vars.push("percent"), i; }, e.prototype._defaultLabelLine = function(t) { Vd(t, "labelLine", ["show"]); var n = t.labelLine, i = t.emphasis.labelLine; n.show = n.show && t.label.show, i.show = i.show && t.emphasis.label.show; }, e.type = "series.pie", e.defaultOption = { z: 2, legendHoverLink: !0, colorBy: "data", center: ["50%", "50%"], radius: [0, "75%"], clockwise: !0, startAngle: 90, minAngle: 0, minShowLabelAngle: 0, selectedOffset: 10, percentPrecision: 2, stillShowZeroSum: !0, left: 0, top: 0, right: 0, bottom: 0, width: null, height: null, label: { rotate: 0, show: !0, overflow: "truncate", position: "outer", alignTo: "none", edgeDistance: "25%", bleedMargin: 10, distanceToLabelLine: 5 }, labelLine: { show: !0, length: 15, length2: 15, smooth: !1, minTurnAngle: 90, maxSurfaceAngle: 90, lineStyle: { width: 1, type: "solid" } }, itemStyle: { borderWidth: 1, borderJoin: "round" }, showEmptyCircle: !0, emptyCircleStyle: { color: "lightgray", opacity: 1 }, labelLayout: { hideOverlap: !0 }, emphasis: { scale: !0, scaleSize: 5 }, avoidLabelOverlap: !0, animationType: "expansion", animationDuration: 1e3, animationTypeUpdate: "transition", animationEasingUpdate: "cubicInOut", animationDurationUpdate: 500, animationEasing: "cubicInOut" }, e; }(bn); const BRe = FRe; function kRe(r) { return { seriesType: r, reset: function(e, t) { var n = e.getData(); n.filterSelf(function(i) { var a = n.mapDimension("value"), o = n.get(a, i); return !($t(o) && !isNaN(o) && o < 0); }); } }; } function VRe(r) { r.registerChartView(RRe), r.registerSeriesModel(BRe), AK("pie", r.registerAction), r.registerLayout(ut(IRe, "pie")), r.registerProcessor(jw("pie")), r.registerProcessor(kRe("pie")); } var GRe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.hasSymbolVisual = !0, t; } return e.prototype.getInitialData = function(t, n) { return _f(null, this, { useEncodeDefaulter: !0 }); }, e.prototype.getProgressive = function() { var t = this.option.progressive; return t == null ? this.option.large ? 5e3 : this.get("progressive") : t; }, e.prototype.getProgressiveThreshold = function() { var t = this.option.progressiveThreshold; return t == null ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t; }, e.prototype.brushSelector = function(t, n, i) { return i.point(n.getItemLayout(t)); }, e.prototype.getZLevelKey = function() { return this.getData().count() > this.getProgressiveThreshold() ? this.id : ""; }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = { coordinateSystem: "cartesian2d", z: 2, legendHoverLink: !0, symbolSize: 10, large: !1, largeThreshold: 2e3, itemStyle: { opacity: 0.8 }, emphasis: { scale: !0 }, clip: !0, select: { itemStyle: { borderColor: "#212121" } }, universalTransition: { divideShape: "clone" } }, e; }(bn); const zRe = GRe; var fQ = 4, $Re = function() { function r() { } return r; }(), HRe = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n._off = 0, n.hoverDataIdx = -1, n; } return e.prototype.getDefaultShape = function() { return new $Re(); }, e.prototype.reset = function() { this.notClear = !1, this._off = 0; }, e.prototype.buildPath = function(t, n) { var i = n.points, a = n.size, o = this.symbolProxy, s = o.shape, u = t.getContext ? t.getContext() : t, l = u && a[0] < fQ, c = this.softClipShape, f; if (l) { this._ctx = u; return; } for (this._ctx = null, f = this._off; f < i.length; ) { var h = i[f++], p = i[f++]; isNaN(h) || isNaN(p) || c && !c.contain(h, p) || (s.x = h - a[0] / 2, s.y = p - a[1] / 2, s.width = a[0], s.height = a[1], o.buildPath(t, s, !0)); } this.incremental && (this._off = f, this.notClear = !0); }, e.prototype.afterBrush = function() { var t = this.shape, n = t.points, i = t.size, a = this._ctx, o = this.softClipShape, s; if (!!a) { for (s = this._off; s < n.length; ) { var u = n[s++], l = n[s++]; isNaN(u) || isNaN(l) || o && !o.contain(u, l) || a.fillRect(u - i[0] / 2, l - i[1] / 2, i[0], i[1]); } this.incremental && (this._off = s, this.notClear = !0); } }, e.prototype.findDataIndex = function(t, n) { for (var i = this.shape, a = i.points, o = i.size, s = Math.max(o[0], 4), u = Math.max(o[1], 4), l = a.length / 2 - 1; l >= 0; l--) { var c = l * 2, f = a[c] - s / 2, h = a[c + 1] - u / 2; if (t >= f && n >= h && t <= f + s && n <= h + u) return l; } return -1; }, e.prototype.contain = function(t, n) { var i = this.transformCoordToLocal(t, n), a = this.getBoundingRect(); if (t = i[0], n = i[1], a.contain(t, n)) { var o = this.hoverDataIdx = this.findDataIndex(t, n); return o >= 0; } return this.hoverDataIdx = -1, !1; }, e.prototype.getBoundingRect = function() { var t = this._rect; if (!t) { for (var n = this.shape, i = n.points, a = n.size, o = a[0], s = a[1], u = 1 / 0, l = 1 / 0, c = -1 / 0, f = -1 / 0, h = 0; h < i.length; ) { var p = i[h++], d = i[h++]; u = Math.min(p, u), c = Math.max(p, c), l = Math.min(d, l), f = Math.max(d, f); } t = this._rect = new gt(u - o / 2, l - s / 2, c - u + o, f - l + s); } return t; }, e; }(Tt), URe = function() { function r() { this.group = new rt(); } return r.prototype.updateData = function(e, t) { this._clear(); var n = this._create(); n.setShape({ points: e.getLayout("points") }), this._setCommon(n, e, t); }, r.prototype.updateLayout = function(e) { var t = e.getLayout("points"); this.group.eachChild(function(n) { if (n.startIndex != null) { var i = (n.endIndex - n.startIndex) * 2, a = n.startIndex * 4 * 2; t = new Float32Array(t.buffer, a, i); } n.setShape("points", t), n.reset(); }); }, r.prototype.incrementalPrepareUpdate = function(e) { this._clear(); }, r.prototype.incrementalUpdate = function(e, t, n) { var i = this._newAdded[0], a = t.getLayout("points"), o = i && i.shape.points; if (o && o.length < 2e4) { var s = o.length, u = new Float32Array(s + a.length); u.set(o), u.set(a, s), i.endIndex = e.end, i.setShape({ points: u }); } else { this._newAdded = []; var l = this._create(); l.startIndex = e.start, l.endIndex = e.end, l.incremental = !0, l.setShape({ points: a }), this._setCommon(l, t, n); } }, r.prototype.eachRendered = function(e) { this._newAdded[0] && e(this._newAdded[0]); }, r.prototype._create = function() { var e = new HRe({ cursor: "default" }); return this.group.add(e), this._newAdded.push(e), e; }, r.prototype._setCommon = function(e, t, n) { var i = t.hostModel; n = n || {}; var a = t.getVisual("symbolSize"); e.setShape("size", a instanceof Array ? a : [a, a]), e.softClipShape = n.clipShape || null, e.symbolProxy = vi(t.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor; var o = e.shape.size[0] < fQ; e.useStyle( i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"]) ); var s = t.getVisual("style"), u = s && s.fill; u && e.setColor(u); var l = nt(e); l.seriesIndex = i.seriesIndex, e.on("mousemove", function(c) { l.dataIndex = null; var f = e.hoverDataIdx; f >= 0 && (l.dataIndex = f + (e.startIndex || 0)); }); }, r.prototype.remove = function() { this._clear(); }, r.prototype._clear = function() { this._newAdded = [], this.group.removeAll(); }, r; }(); const WRe = URe; var jRe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = t.getData(), o = this._updateSymbolDraw(a, t); o.updateData(a, { clipShape: this._getClipShape(t) }), this._finished = !0; }, e.prototype.incrementalPrepareRender = function(t, n, i) { var a = t.getData(), o = this._updateSymbolDraw(a, t); o.incrementalPrepareUpdate(a), this._finished = !1; }, e.prototype.incrementalRender = function(t, n, i) { this._symbolDraw.incrementalUpdate(t, n.getData(), { clipShape: this._getClipShape(n) }), this._finished = t.end === n.getData().count(); }, e.prototype.updateTransform = function(t, n, i) { var a = t.getData(); if (this.group.dirty(), !this._finished || a.count() > 1e4) return { update: !0 }; var o = Ww("").reset(t, n, i); o.progress && o.progress({ start: 0, end: a.count(), count: a.count() }, a), this._symbolDraw.updateLayout(a); }, e.prototype.eachRendered = function(t) { this._symbolDraw && this._symbolDraw.eachRendered(t); }, e.prototype._getClipShape = function(t) { var n = t.coordinateSystem, i = n && n.getArea && n.getArea(); return t.get("clip", !0) ? i : null; }, e.prototype._updateSymbolDraw = function(t, n) { var i = this._symbolDraw, a = n.pipelineContext, o = a.large; return (!i || o !== this._isLargeDraw) && (i && i.remove(), i = this._symbolDraw = o ? new WRe() : new Uw(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(i.group), i; }, e.prototype.remove = function(t, n) { this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null; }, e.prototype.dispose = function() { }, e.type = "scatter", e; }(an); const YRe = jRe; var XRe = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = { show: !1, z: 0, left: "10%", top: 60, right: "10%", bottom: 70, containLabel: !1, backgroundColor: "rgba(0,0,0,0)", borderWidth: 1, borderColor: "#ccc" }, e; }(Rt); const qRe = XRe; var v2 = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.getCoordSysModel = function() { return this.getReferringComponents("grid", ui).models[0]; }, e.type = "cartesian2dAxis", e; }(Rt); gi(v2, $w); var hQ = { show: !0, z: 0, inverse: !1, name: "", nameLocation: "end", nameRotate: null, nameTruncate: { maxWidth: null, ellipsis: "...", placeholder: "." }, nameTextStyle: {}, nameGap: 15, silent: !1, triggerEvent: !1, tooltip: { show: !1 }, axisPointer: {}, axisLine: { show: !0, onZero: !0, onZeroAxisIndex: null, lineStyle: { color: "#6E7079", width: 1, type: "solid" }, symbol: ["none", "none"], symbolSize: [10, 15] }, axisTick: { show: !0, inside: !1, length: 5, lineStyle: { width: 1 } }, axisLabel: { show: !0, inside: !1, rotate: 0, showMinLabel: null, showMaxLabel: null, margin: 8, fontSize: 12 }, splitLine: { show: !0, lineStyle: { color: ["#E0E6F1"], width: 1, type: "solid" } }, splitArea: { show: !1, areaStyle: { color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"] } } }, ZRe = dt({ boundaryGap: !0, deduplication: null, splitLine: { show: !1 }, axisTick: { alignWithLabel: !1, interval: "auto" }, axisLabel: { interval: "auto" } }, hQ), GF = dt({ boundaryGap: [0, 0], axisLine: { show: "auto" }, axisTick: { show: "auto" }, splitNumber: 5, minorTick: { show: !1, splitNumber: 5, length: 3, lineStyle: {} }, minorSplitLine: { show: !1, lineStyle: { color: "#F4F7FD", width: 1 } } }, hQ), KRe = dt({ splitNumber: 6, axisLabel: { showMinLabel: !1, showMaxLabel: !1, rich: { primary: { fontWeight: "bold" } } }, splitLine: { show: !1 } }, GF), JRe = qe({ logBase: 10 }, GF); const pQ = { category: ZRe, value: GF, time: KRe, log: JRe }; var QRe = { value: 1, category: 1, time: 1, log: 1 }; function km(r, e, t, n) { M(QRe, function(i, a) { var o = dt(dt({}, pQ[a], !0), n, !0), s = function(u) { W(l, u); function l() { var c = u !== null && u.apply(this, arguments) || this; return c.type = e + "Axis." + a, c; } return l.prototype.mergeDefaultAndTheme = function(c, f) { var h = _1(this), p = h ? Py(c) : {}, d = f.getTheme(); dt(c, d.get(a + "Axis")), dt(c, this.getDefaultOption()), c.type = hz(c), h && Nh(c, p, h); }, l.prototype.optionUpdated = function() { var c = this.option; c.type === "category" && (this.__ordinalMeta = u2.createByAxisModel(this)); }, l.prototype.getCategories = function(c) { var f = this.option; if (f.type === "category") return c ? f.data : this.__ordinalMeta.categories; }, l.prototype.getOrdinalMeta = function() { return this.__ordinalMeta; }, l.type = e + "Axis." + a, l.defaultOption = o, l; }(t); r.registerComponentModel(s); }), r.registerSubTypeDefaulter(e + "Axis", hz); } function hz(r) { return r.type || (r.data ? "category" : "value"); } var eNe = function() { function r(e) { this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || ""; } return r.prototype.getAxis = function(e) { return this._axes[e]; }, r.prototype.getAxes = function() { return ce(this._dimList, function(e) { return this._axes[e]; }, this); }, r.prototype.getAxesByScale = function(e) { return e = e.toLowerCase(), Wr(this.getAxes(), function(t) { return t.scale.type === e; }); }, r.prototype.addAxis = function(e) { var t = e.dim; this._axes[t] = e, this._dimList.push(t); }, r; }(); const tNe = eNe; var g2 = ["x", "y"]; function pz(r) { return r.type === "interval" || r.type === "time"; } var rNe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "cartesian2d", t.dimensions = g2, t; } return e.prototype.calcAffineTransform = function() { this._transform = this._invTransform = null; var t = this.getAxis("x").scale, n = this.getAxis("y").scale; if (!(!pz(t) || !pz(n))) { var i = t.getExtent(), a = n.getExtent(), o = this.dataToPoint([i[0], a[0]]), s = this.dataToPoint([i[1], a[1]]), u = i[1] - i[0], l = a[1] - a[0]; if (!(!u || !l)) { var c = (s[0] - o[0]) / u, f = (s[1] - o[1]) / l, h = o[0] - i[0] * c, p = o[1] - a[0] * f, d = this._transform = [c, 0, 0, f, h, p]; this._invTransform = yy([], d); } } }, e.prototype.getBaseAxis = function() { return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x"); }, e.prototype.containPoint = function(t) { var n = this.getAxis("x"), i = this.getAxis("y"); return n.contain(n.toLocalCoord(t[0])) && i.contain(i.toLocalCoord(t[1])); }, e.prototype.containData = function(t) { return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1]); }, e.prototype.containZone = function(t, n) { var i = this.dataToPoint(t), a = this.dataToPoint(n), o = this.getArea(), s = new gt(i[0], i[1], a[0] - i[0], a[1] - i[1]); return o.intersect(s); }, e.prototype.dataToPoint = function(t, n, i) { i = i || []; var a = t[0], o = t[1]; if (this._transform && a != null && isFinite(a) && o != null && isFinite(o)) return Ia(i, t, this._transform); var s = this.getAxis("x"), u = this.getAxis("y"); return i[0] = s.toGlobalCoord(s.dataToCoord(a, n)), i[1] = u.toGlobalCoord(u.dataToCoord(o, n)), i; }, e.prototype.clampData = function(t, n) { var i = this.getAxis("x").scale, a = this.getAxis("y").scale, o = i.getExtent(), s = a.getExtent(), u = i.parse(t[0]), l = a.parse(t[1]); return n = n || [], n[0] = Math.min(Math.max(Math.min(o[0], o[1]), u), Math.max(o[0], o[1])), n[1] = Math.min(Math.max(Math.min(s[0], s[1]), l), Math.max(s[0], s[1])), n; }, e.prototype.pointToData = function(t, n) { var i = []; if (this._invTransform) return Ia(i, t, this._invTransform); var a = this.getAxis("x"), o = this.getAxis("y"); return i[0] = a.coordToData(a.toLocalCoord(t[0]), n), i[1] = o.coordToData(o.toLocalCoord(t[1]), n), i; }, e.prototype.getOtherAxis = function(t) { return this.getAxis(t.dim === "x" ? "y" : "x"); }, e.prototype.getArea = function() { var t = this.getAxis("x").getGlobalExtent(), n = this.getAxis("y").getGlobalExtent(), i = Math.min(t[0], t[1]), a = Math.min(n[0], n[1]), o = Math.max(t[0], t[1]) - i, s = Math.max(n[0], n[1]) - a; return new gt(i, a, o, s); }, e; }(tNe), nNe = function(r) { W(e, r); function e(t, n, i, a, o) { var s = r.call(this, t, n, i) || this; return s.index = 0, s.type = a || "value", s.position = o || "bottom", s; } return e.prototype.isHorizontal = function() { var t = this.position; return t === "top" || t === "bottom"; }, e.prototype.getGlobalExtent = function(t) { var n = this.getExtent(); return n[0] = this.toGlobalCoord(n[0]), n[1] = this.toGlobalCoord(n[1]), t && n[0] > n[1] && n.reverse(), n; }, e.prototype.pointToData = function(t, n) { return this.coordToData(this.toLocalCoord(t[this.dim === "x" ? 0 : 1]), n); }, e.prototype.setCategorySortInfo = function(t) { if (this.type !== "category") return !1; this.model.option.categorySortInfo = t, this.scale.setSortInfo(t); }, e; }(pl); const iNe = nNe; function m2(r, e, t) { t = t || {}; var n = r.coordinateSystem, i = e.axis, a = {}, o = i.getAxesOnZeroOf()[0], s = i.position, u = o ? "onZero" : s, l = i.dim, c = n.getRect(), f = [c.x, c.x + c.width, c.y, c.y + c.height], h = { left: 0, right: 1, top: 0, bottom: 1, onZero: 2 }, p = e.get("offset") || 0, d = l === "x" ? [f[2] - p, f[3] + p] : [f[0] - p, f[1] + p]; if (o) { var v = o.toGlobalCoord(o.dataToCoord(0)); d[h.onZero] = Math.max(Math.min(v, d[1]), d[0]); } a.position = [l === "y" ? d[h[u]] : f[0], l === "x" ? d[h[u]] : f[3]], a.rotation = Math.PI / 2 * (l === "x" ? 0 : 1); var g = { top: -1, bottom: 1, left: -1, right: 1 }; a.labelDirection = a.tickDirection = a.nameDirection = g[s], a.labelOffset = o ? d[h[s]] - d[h.onZero] : 0, e.get(["axisTick", "inside"]) && (a.tickDirection = -a.tickDirection), si(t.labelInside, e.get(["axisLabel", "inside"])) && (a.labelDirection = -a.labelDirection); var m = e.get(["axisLabel", "rotate"]); return a.labelRotate = u === "top" ? -m : m, a.z2 = 1, a; } function dz(r) { return r.get("coordinateSystem") === "cartesian2d"; } function vz(r) { var e = { xAxisModel: null, yAxisModel: null }; return M(e, function(t, n) { var i = n.replace(/Model$/, ""), a = r.getReferringComponents(i, ui).models[0]; if (process.env.NODE_ENV !== "production" && !a) throw new Error(i + ' "' + $u(r.get(i + "Index"), r.get(i + "Id"), 0) + '" not found'); e[n] = a; }), e; } var BA = Math.log; function dQ(r, e, t) { var n = Bh.prototype, i = n.getTicks.call(t), a = n.getTicks.call(t, !0), o = i.length - 1, s = n.getInterval.call(t), u = xJ(r, e), l = u.extent, c = u.fixMin, f = u.fixMax; if (r.type === "log") { var h = BA(r.base); l = [BA(l[0]) / h, BA(l[1]) / h]; } r.setExtent(l[0], l[1]), r.calcNiceExtent({ splitNumber: o, fixMin: c, fixMax: f }); var p = n.getExtent.call(r); c && (l[0] = p[0]), f && (l[1] = p[1]); var d = n.getInterval.call(r), v = l[0], g = l[1]; if (c && f) d = (g - v) / o; else if (c) for (g = l[0] + d * o; g < l[1] && isFinite(g) && isFinite(l[1]); ) d = SA(d), g = l[0] + d * o; else if (f) for (v = l[1] - d * o; v > l[0] && isFinite(v) && isFinite(l[0]); ) d = SA(d), v = l[1] - d * o; else { var m = r.getTicks().length - 1; m > o && (d = SA(d)); var y = d * o; g = Math.ceil(l[1] / d) * d, v = Xn(g - y), v < 0 && l[0] >= 0 ? (v = 0, g = Xn(y)) : g > 0 && l[1] <= 0 && (g = 0, v = -Xn(y)); } var _ = (i[0].value - a[0].value) / s, w = (i[o].value - a[o].value) / s; if (n.setExtent.call(r, v + d * _, g + d * w), n.setInterval.call(r, d), (_ || w) && n.setNiceExtent.call(r, v + d, g - d), process.env.NODE_ENV !== "production") { var x = n.getTicks.call(r); x[1] && (!XMe(d) || OM(x[1].value) > OM(d)) && to( "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true" ); } } var aNe = function() { function r(e, t, n) { this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = g2, this._initCartesian(e, t, n), this.model = e; } return r.prototype.getRect = function() { return this._rect; }, r.prototype.update = function(e, t) { var n = this._axesMap; this._updateScale(e, this.model); function i(o) { var s, u = At(o), l = u.length; if (!!l) { for (var c = [], f = l - 1; f >= 0; f--) { var h = +u[f], p = o[h], d = p.model, v = p.scale; l2(v) && d.get("alignTicks") && d.get("interval") == null ? c.push(p) : (Fm(v, d), l2(v) && (s = p)); } c.length && (s || (s = c.pop(), Fm(s.scale, s.model)), M(c, function(g) { dQ(g.scale, g.model, s.scale); })); } } i(n.x), i(n.y); var a = {}; M(n.x, function(o) { gz(n, "y", o, a); }), M(n.y, function(o) { gz(n, "x", o, a); }), this.resize(this.model, t); }, r.prototype.resize = function(e, t, n) { var i = e.getBoxLayoutParams(), a = !n && e.get("containLabel"), o = Bi(i, { width: t.getWidth(), height: t.getHeight() }); this._rect = o; var s = this._axesList; u(), a && (M(s, function(l) { if (!l.model.get(["axisLabel", "inside"])) { var c = _2e(l); if (c) { var f = l.isHorizontal() ? "height" : "width", h = l.model.get(["axisLabel", "margin"]); o[f] -= c[f] + h, l.position === "top" ? o.y += c.height + h : l.position === "left" && (o.x += c.width + h); } } }), u()), M(this._coordsList, function(l) { l.calcAffineTransform(); }); function u() { M(s, function(l) { var c = l.isHorizontal(), f = c ? [0, o.width] : [0, o.height], h = l.inverse ? 1 : 0; l.setExtent(f[h], f[1 - h]), oNe(l, c ? o.x : o.y); }); } }, r.prototype.getAxis = function(e, t) { var n = this._axesMap[e]; if (n != null) return n[t || 0]; }, r.prototype.getAxes = function() { return this._axesList.slice(); }, r.prototype.getCartesian = function(e, t) { if (e != null && t != null) { var n = "x" + e + "y" + t; return this._coordsMap[n]; } Xe(e) && (t = e.yAxisIndex, e = e.xAxisIndex); for (var i = 0, a = this._coordsList; i < a.length; i++) if (a[i].getAxis("x").index === e || a[i].getAxis("y").index === t) return a[i]; }, r.prototype.getCartesians = function() { return this._coordsList.slice(); }, r.prototype.convertToPixel = function(e, t, n) { var i = this._findConvertTarget(t); return i.cartesian ? i.cartesian.dataToPoint(n) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(n)) : null; }, r.prototype.convertFromPixel = function(e, t, n) { var i = this._findConvertTarget(t); return i.cartesian ? i.cartesian.pointToData(n) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(n)) : null; }, r.prototype._findConvertTarget = function(e) { var t = e.seriesModel, n = e.xAxisModel || t && t.getReferringComponents("xAxis", ui).models[0], i = e.yAxisModel || t && t.getReferringComponents("yAxis", ui).models[0], a = e.gridModel, o = this._coordsList, s, u; if (t) s = t.coordinateSystem, _t(o, s) < 0 && (s = null); else if (n && i) s = this.getCartesian(n.componentIndex, i.componentIndex); else if (n) u = this.getAxis("x", n.componentIndex); else if (i) u = this.getAxis("y", i.componentIndex); else if (a) { var l = a.coordinateSystem; l === this && (s = this._coordsList[0]); } return { cartesian: s, axis: u }; }, r.prototype.containPoint = function(e) { var t = this._coordsList[0]; if (t) return t.containPoint(e); }, r.prototype._initCartesian = function(e, t, n) { var i = this, a = this, o = { left: !1, right: !1, top: !1, bottom: !1 }, s = { x: {}, y: {} }, u = { x: 0, y: 0 }; if (t.eachComponent("xAxis", l("x"), this), t.eachComponent("yAxis", l("y"), this), !u.x || !u.y) { this._axesMap = {}, this._axesList = []; return; } this._axesMap = s, M(s.x, function(c, f) { M(s.y, function(h, p) { var d = "x" + f + "y" + p, v = new rNe(d); v.master = i, v.model = e, i._coordsMap[d] = v, i._coordsList.push(v), v.addAxis(c), v.addAxis(h); }); }); function l(c) { return function(f, h) { if (!!kA(f, e)) { var p = f.get("position"); c === "x" ? p !== "top" && p !== "bottom" && (p = o.bottom ? "top" : "bottom") : p !== "left" && p !== "right" && (p = o.left ? "right" : "left"), o[p] = !0; var d = new iNe(c, sP(f), [0, 0], f.get("type"), p), v = d.type === "category"; d.onBand = v && f.get("boundaryGap"), d.inverse = f.get("inverse"), f.axis = d, d.model = f, d.grid = a, d.index = h, a._axesList.push(d), s[c][h] = d, u[c]++; } }; } }, r.prototype._updateScale = function(e, t) { M(this._axesList, function(i) { if (i.scale.setExtent(1 / 0, -1 / 0), i.type === "category") { var a = i.model.get("categorySortInfo"); i.scale.setSortInfo(a); } }), e.eachSeries(function(i) { if (dz(i)) { var a = vz(i), o = a.xAxisModel, s = a.yAxisModel; if (!kA(o, t) || !kA(s, t)) return; var u = this.getCartesian(o.componentIndex, s.componentIndex), l = i.getData(), c = u.getAxis("x"), f = u.getAxis("y"); n(l, c), n(l, f); } }, this); function n(i, a) { M(DE(i, a.dim), function(o) { a.scale.unionExtentFromData(i, o); }); } }, r.prototype.getTooltipAxes = function(e) { var t = [], n = []; return M(this.getCartesians(), function(i) { var a = e != null && e !== "auto" ? i.getAxis(e) : i.getBaseAxis(), o = i.getOtherAxis(a); _t(t, a) < 0 && t.push(a), _t(n, o) < 0 && n.push(o); }), { baseAxes: t, otherAxes: n }; }, r.create = function(e, t) { var n = []; return e.eachComponent("grid", function(i, a) { var o = new r(i, e, t); o.name = "grid_" + a, o.resize(i, t, !0), i.coordinateSystem = o, n.push(o); }), e.eachSeries(function(i) { if (!!dz(i)) { var a = vz(i), o = a.xAxisModel, s = a.yAxisModel, u = o.getCoordSysModel(); if (process.env.NODE_ENV !== "production") { if (!u) throw new Error('Grid "' + $u(o.get("gridIndex"), o.get("gridId"), 0) + '" not found'); if (o.getCoordSysModel() !== s.getCoordSysModel()) throw new Error("xAxis and yAxis must use the same grid"); } var l = u.coordinateSystem; i.coordinateSystem = l.getCartesian(o.componentIndex, s.componentIndex); } }), n; }, r.dimensions = g2, r; }(); function kA(r, e) { return r.getCoordSysModel() === e; } function gz(r, e, t, n) { t.getAxesOnZeroOf = function() { return a ? [a] : []; }; var i = r[e], a, o = t.model, s = o.get(["axisLine", "onZero"]), u = o.get(["axisLine", "onZeroAxisIndex"]); if (!s) return; if (u != null) mz(i[u]) && (a = i[u]); else for (var l in i) if (i.hasOwnProperty(l) && mz(i[l]) && !n[c(i[l])]) { a = i[l]; break; } a && (n[c(a)] = !0); function c(f) { return f.dim + "_" + f.index; } } function mz(r) { return r && r.type !== "category" && r.type !== "time" && y2e(r); } function oNe(r, e) { var t = r.getExtent(), n = t[0] + t[1]; r.toGlobalCoord = r.dim === "x" ? function(i) { return i + e; } : function(i) { return n - i + e; }, r.toLocalCoord = r.dim === "x" ? function(i) { return i - e; } : function(i) { return n - i + e; }; } const sNe = aNe; var rh = Math.PI, od = function() { function r(e, t) { this.group = new rt(), this.opt = t, this.axisModel = e, qe(t, { labelOffset: 0, nameDirection: 1, tickDirection: 1, labelDirection: 1, silent: !0, handleAutoShown: function() { return !0; } }); var n = new rt({ x: t.position[0], y: t.position[1], rotation: t.rotation }); n.updateTransform(), this._transformGroup = n; } return r.prototype.hasBuilder = function(e) { return !!yz[e]; }, r.prototype.add = function(e) { yz[e](this.opt, this.axisModel, this.group, this._transformGroup); }, r.prototype.getGroup = function() { return this.group; }, r.innerTextLayout = function(e, t, n) { var i = vq(t - e), a, o; return hE(i) ? (o = n > 0 ? "top" : "bottom", a = "center") : hE(i - rh) ? (o = n > 0 ? "bottom" : "top", a = "center") : (o = "middle", i > 0 && i < rh ? a = n > 0 ? "right" : "left" : a = n > 0 ? "left" : "right"), { rotation: i, textAlign: a, textVerticalAlign: o }; }, r.makeAxisEventDataBase = function(e) { var t = { componentType: e.mainType, componentIndex: e.componentIndex }; return t[e.mainType + "Index"] = e.componentIndex, t; }, r.isLabelSilent = function(e) { var t = e.get("tooltip"); return e.get("silent") || !(e.get("triggerEvent") || t && t.show); }, r; }(), yz = { axisLine: function(r, e, t, n) { var i = e.get(["axisLine", "show"]); if (i === "auto" && r.handleAutoShown && (i = r.handleAutoShown("axisLine")), !!i) { var a = e.axis.getExtent(), o = n.transform, s = [a[0], 0], u = [a[1], 0]; o && (Ia(s, s, o), Ia(u, u, o)); var l = oe({ lineCap: "round" }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), c = new fa({ subPixelOptimize: !0, shape: { x1: s[0], y1: s[1], x2: u[0], y2: u[1] }, style: l, strokeContainThreshold: r.strokeContainThreshold || 5, silent: !0, z2: 1 }); c.anid = "line", t.add(c); var f = e.get(["axisLine", "symbol"]); if (f != null) { var h = e.get(["axisLine", "symbolSize"]); Se(f) && (f = [f, f]), (Se(h) || $t(h)) && (h = [h, h]); var p = Oy(e.get(["axisLine", "symbolOffset"]) || 0, h), d = h[0], v = h[1]; M([{ rotate: r.rotation + Math.PI / 2, offset: p[0], r: 0 }, { rotate: r.rotation - Math.PI / 2, offset: p[1], r: Math.sqrt((s[0] - u[0]) * (s[0] - u[0]) + (s[1] - u[1]) * (s[1] - u[1])) }], function(g, m) { if (f[m] !== "none" && f[m] != null) { var y = vi(f[m], -d / 2, -v / 2, d, v, l.stroke, !0), _ = g.r + g.offset; y.attr({ rotation: g.rotate, x: s[0] + _ * Math.cos(r.rotation), y: s[1] - _ * Math.sin(r.rotation), silent: !0, z2: 11 }), t.add(y); } }); } } }, axisTickLabel: function(r, e, t, n) { var i = cNe(t, n, e, r), a = hNe(t, n, e, r); if (lNe(e, a, i), fNe(t, n, e, r.tickDirection), e.get(["axisLabel", "hideOverlap"])) { var o = RJ(ce(a, function(s) { return { label: s, priority: s.z2, defaultAttr: { ignore: s.ignore } }; })); BJ(o); } }, axisName: function(r, e, t, n) { var i = si(r.axisName, e.get("name")); if (!!i) { var a = e.get("nameLocation"), o = r.nameDirection, s = e.getModel("nameTextStyle"), u = e.get("nameGap") || 0, l = e.axis.getExtent(), c = l[0] > l[1] ? -1 : 1, f = [ a === "start" ? l[0] - c * u : a === "end" ? l[1] + c * u : (l[0] + l[1]) / 2, wz(a) ? r.labelOffset + o * u : 0 ], h, p = e.get("nameRotate"); p != null && (p = p * rh / 180); var d; wz(a) ? h = od.innerTextLayout( r.rotation, p != null ? p : r.rotation, o ) : (h = uNe(r.rotation, a, p || 0, l), d = r.axisNameAvailableWidth, d != null && (d = Math.abs(d / Math.sin(h.rotation)), !isFinite(d) && (d = null))); var v = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, y = si(r.nameTruncateMaxWidth, g.maxWidth, d), _ = new Yt({ x: f[0], y: f[1], rotation: h.rotation, silent: od.isLabelSilent(e), style: Sn(s, { text: i, font: v, overflow: "truncate", width: y, ellipsis: m, fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]), align: s.get("align") || h.textAlign, verticalAlign: s.get("verticalAlign") || h.textVerticalAlign }), z2: 1 }); if (Sy({ el: _, componentModel: e, itemName: i }), _.__fullText = i, _.anid = "name", e.get("triggerEvent")) { var w = od.makeAxisEventDataBase(e); w.targetType = "axisName", w.name = i, nt(_).eventData = w; } n.add(_), _.updateTransform(), t.add(_), _.decomposeTransform(); } } }; function uNe(r, e, t, n) { var i = vq(t - r), a, o, s = n[0] > n[1], u = e === "start" && !s || e !== "start" && s; return hE(i - rh / 2) ? (o = u ? "bottom" : "top", a = "center") : hE(i - rh * 1.5) ? (o = u ? "top" : "bottom", a = "center") : (o = "middle", i < rh * 1.5 && i > rh / 2 ? a = u ? "left" : "right" : a = u ? "right" : "left"), { rotation: i, textAlign: a, textVerticalAlign: o }; } function lNe(r, e, t) { if (!CJ(r.axis)) { var n = r.get(["axisLabel", "showMinLabel"]), i = r.get(["axisLabel", "showMaxLabel"]); e = e || [], t = t || []; var a = e[0], o = e[1], s = e[e.length - 1], u = e[e.length - 2], l = t[0], c = t[1], f = t[t.length - 1], h = t[t.length - 2]; n === !1 ? (Os(a), Os(l)) : _z(a, o) && (n ? (Os(o), Os(c)) : (Os(a), Os(l))), i === !1 ? (Os(s), Os(f)) : _z(u, s) && (i ? (Os(u), Os(h)) : (Os(s), Os(f))); } } function Os(r) { r && (r.ignore = !0); } function _z(r, e) { var t = r && r.getBoundingRect().clone(), n = e && e.getBoundingRect().clone(); if (!(!t || !n)) { var i = OT([]); return dv(i, i, -r.rotation), t.applyTransform(Bc([], i, r.getLocalTransform())), n.applyTransform(Bc([], i, e.getLocalTransform())), t.intersect(n); } } function wz(r) { return r === "middle" || r === "center"; } function vQ(r, e, t, n, i) { for (var a = [], o = [], s = [], u = 0; u < r.length; u++) { var l = r[u].coord; o[0] = l, o[1] = 0, s[0] = l, s[1] = t, e && (Ia(o, o, e), Ia(s, s, e)); var c = new fa({ subPixelOptimize: !0, shape: { x1: o[0], y1: o[1], x2: s[0], y2: s[1] }, style: n, z2: 2, autoBatch: !0, silent: !0 }); c.anid = i + "_" + r[u].tickValue, a.push(c); } return a; } function cNe(r, e, t, n) { var i = t.axis, a = t.getModel("axisTick"), o = a.get("show"); if (o === "auto" && n.handleAutoShown && (o = n.handleAutoShown("axisTick")), !(!o || i.scale.isBlank())) { for (var s = a.getModel("lineStyle"), u = n.tickDirection * a.get("length"), l = i.getTicksCoords(), c = vQ(l, e.transform, u, qe(s.getLineStyle(), { stroke: t.get(["axisLine", "lineStyle", "color"]) }), "ticks"), f = 0; f < c.length; f++) r.add(c[f]); return c; } } function fNe(r, e, t, n) { var i = t.axis, a = t.getModel("minorTick"); if (!(!a.get("show") || i.scale.isBlank())) { var o = i.getMinorTicksCoords(); if (!!o.length) for (var s = a.getModel("lineStyle"), u = n * a.get("length"), l = qe(s.getLineStyle(), qe(t.getModel("axisTick").getLineStyle(), { stroke: t.get(["axisLine", "lineStyle", "color"]) })), c = 0; c < o.length; c++) for (var f = vQ(o[c], e.transform, u, l, "minorticks_" + c), h = 0; h < f.length; h++) r.add(f[h]); } } function hNe(r, e, t, n) { var i = t.axis, a = si(n.axisLabelShow, t.get(["axisLabel", "show"])); if (!(!a || i.scale.isBlank())) { var o = t.getModel("axisLabel"), s = o.get("margin"), u = i.getViewLabels(), l = (si(n.labelRotate, o.get("rotate")) || 0) * rh / 180, c = od.innerTextLayout(n.rotation, l, n.labelDirection), f = t.getCategories && t.getCategories(!0), h = [], p = od.isLabelSilent(t), d = t.get("triggerEvent"); return M(u, function(v, g) { var m = i.scale.type === "ordinal" ? i.scale.getRawOrdinalNumber(v.tickValue) : v.tickValue, y = v.formattedLabel, _ = v.rawLabel, w = o; if (f && f[m]) { var x = f[m]; Xe(x) && x.textStyle && (w = new rn(x.textStyle, o, t.ecModel)); } var C = w.getTextColor() || t.get(["axisLine", "lineStyle", "color"]), S = i.dataToCoord(m), b = new Yt({ x: S, y: n.labelOffset + n.labelDirection * s, rotation: c.rotation, silent: p, z2: 10 + (v.level || 0), style: Sn(w, { text: y, align: w.getShallow("align", !0) || c.textAlign, verticalAlign: w.getShallow("verticalAlign", !0) || w.getShallow("baseline", !0) || c.textVerticalAlign, fill: ze(C) ? C( i.type === "category" ? _ : i.type === "value" ? m + "" : m, g ) : C }) }); if (b.anid = "label_" + m, d) { var E = od.makeAxisEventDataBase(t); E.targetType = "axisLabel", E.value = _, E.tickIndex = g, i.type === "category" && (E.dataIndex = m), nt(b).eventData = E; } e.add(b), b.updateTransform(), h.push(b), r.add(b), b.decomposeTransform(); }), h; } } const uf = od; function pNe(r, e) { var t = { axesInfo: {}, seriesInvolved: !1, coordSysAxesInfo: {}, coordSysMap: {} }; return dNe(t, r, e), t.seriesInvolved && gNe(t, r), t; } function dNe(r, e, t) { var n = e.getComponent("tooltip"), i = e.getComponent("axisPointer"), a = i.get("link", !0) || [], o = []; M(t.getCoordinateSystems(), function(s) { if (!s.axisPointerEnabled) return; var u = P1(s.model), l = r.coordSysAxesInfo[u] = {}; r.coordSysMap[u] = s; var c = s.model, f = c.getModel("tooltip", n); if (M(s.getAxes(), ut(v, !1, null)), s.getTooltipAxes && n && f.get("show")) { var h = f.get("trigger") === "axis", p = f.get(["axisPointer", "type"]) === "cross", d = s.getTooltipAxes(f.get(["axisPointer", "axis"])); (h || p) && M(d.baseAxes, ut(v, p ? "cross" : !0, h)), p && M(d.otherAxes, ut(v, "cross", !1)); } function v(g, m, y) { var _ = y.model.getModel("axisPointer", i), w = _.get("show"); if (!(!w || w === "auto" && !g && !y2(_))) { m == null && (m = _.get("triggerTooltip")), _ = g ? vNe(y, f, i, e, g, m) : _; var x = _.get("snap"), C = P1(y.model), S = m || x || y.type === "category", b = r.axesInfo[C] = { key: C, axis: y, coordSys: s, axisPointerModel: _, triggerTooltip: m, involveSeries: S, snap: x, useHandle: y2(_), seriesModels: [], linkGroup: null }; l[C] = b, r.seriesInvolved = r.seriesInvolved || S; var E = mNe(a, y); if (E != null) { var T = o[E] || (o[E] = { axesInfo: {} }); T.axesInfo[C] = b, T.mapper = a[E].mapper, b.linkGroup = T; } } } }); } function vNe(r, e, t, n, i, a) { var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], u = {}; M(s, function(h) { u[h] = Qe(o.get(h)); }), u.snap = r.type !== "category" && !!a, o.get("type") === "cross" && (u.type = "line"); var l = u.label || (u.label = {}); if (l.show == null && (l.show = !1), i === "cross") { var c = o.get(["label", "show"]); if (l.show = c != null ? c : !0, !a) { var f = u.lineStyle = o.get("crossStyle"); f && qe(l, f.textStyle); } } return r.model.getModel("axisPointer", new rn(u, t, n)); } function gNe(r, e) { e.eachSeries(function(t) { var n = t.coordinateSystem, i = t.get(["tooltip", "trigger"], !0), a = t.get(["tooltip", "show"], !0); !n || i === "none" || i === !1 || i === "item" || a === !1 || t.get(["axisPointer", "show"], !0) === !1 || M(r.coordSysAxesInfo[P1(n.model)], function(o) { var s = o.axis; n.getAxis(s.dim) === s && (o.seriesModels.push(t), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += t.getData().count()); }); }); } function mNe(r, e) { for (var t = e.model, n = e.dim, i = 0; i < r.length; i++) { var a = r[i] || {}; if (VA(a[n + "AxisId"], t.id) || VA(a[n + "AxisIndex"], t.componentIndex) || VA(a[n + "AxisName"], t.name)) return i; } } function VA(r, e) { return r === "all" || le(r) && _t(r, e) >= 0 || r === e; } function yNe(r) { var e = zF(r); if (!!e) { var t = e.axisPointerModel, n = e.axis.scale, i = t.option, a = t.get("status"), o = t.get("value"); o != null && (o = n.parse(o)); var s = y2(t); a == null && (i.status = s ? "show" : "hide"); var u = n.getExtent().slice(); u[0] > u[1] && u.reverse(), (o == null || o > u[1]) && (o = u[1]), o < u[0] && (o = u[0]), i.value = o, s && (i.status = e.axis.scale.isBlank() ? "hide" : "show"); } } function zF(r) { var e = (r.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo; return e && e.axesInfo[P1(r)]; } function _Ne(r) { var e = zF(r); return e && e.axisPointerModel; } function y2(r) { return !!r.get(["handle", "show"]); } function P1(r) { return r.type + "||" + r.id; } var GA = {}, wNe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i, a) { this.axisPointerClass && yNe(t), r.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(t, i, !0); }, e.prototype.updateAxisPointer = function(t, n, i, a) { this._doUpdateAxisPointerClass(t, i, !1); }, e.prototype.remove = function(t, n) { var i = this._axisPointer; i && i.remove(n); }, e.prototype.dispose = function(t, n) { this._disposeAxisPointer(n), r.prototype.dispose.apply(this, arguments); }, e.prototype._doUpdateAxisPointerClass = function(t, n, i) { var a = e.getAxisPointerClass(this.axisPointerClass); if (!!a) { var o = _Ne(t); o ? (this._axisPointer || (this._axisPointer = new a())).render(t, o, n, i) : this._disposeAxisPointer(n); } }, e.prototype._disposeAxisPointer = function(t) { this._axisPointer && this._axisPointer.dispose(t), this._axisPointer = null; }, e.registerAxisPointerClass = function(t, n) { if (process.env.NODE_ENV !== "production" && GA[t]) throw new Error("axisPointer " + t + " exists"); GA[t] = n; }, e.getAxisPointerClass = function(t) { return t && GA[t]; }, e.type = "axis", e; }(Gn); const yv = wNe; var _2 = Ut(); function gQ(r, e, t, n) { var i = t.axis; if (!i.scale.isBlank()) { var a = t.getModel("splitArea"), o = a.getModel("areaStyle"), s = o.get("color"), u = n.coordinateSystem.getRect(), l = i.getTicksCoords({ tickModel: a, clamp: !0 }); if (!!l.length) { var c = s.length, f = _2(r).splitAreaColors, h = $e(), p = 0; if (f) for (var d = 0; d < l.length; d++) { var v = f.get(l[d].tickValue); if (v != null) { p = (v + (c - 1) * d) % c; break; } } var g = i.toGlobalCoord(l[0].coord), m = o.getAreaStyle(); s = le(s) ? s : [s]; for (var d = 1; d < l.length; d++) { var y = i.toGlobalCoord(l[d].coord), _ = void 0, w = void 0, x = void 0, C = void 0; i.isHorizontal() ? (_ = g, w = u.y, x = y - _, C = u.height, g = _ + x) : (_ = u.x, w = g, x = u.width, C = y - w, g = w + C); var S = l[d - 1].tickValue; S != null && h.set(S, p), e.add(new Vt({ anid: S != null ? "area_" + S : null, shape: { x: _, y: w, width: x, height: C }, style: qe({ fill: s[p] }, m), autoBatch: !0, silent: !0 })), p = (p + 1) % c; } _2(r).splitAreaColors = h; } } } function mQ(r) { _2(r).splitAreaColors = null; } var xNe = ["axisLine", "axisTickLabel", "axisName"], CNe = ["splitArea", "splitLine", "minorSplitLine"], yQ = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.axisPointerClass = "CartesianAxisPointer", t; } return e.prototype.render = function(t, n, i, a) { this.group.removeAll(); var o = this._axisGroup; if (this._axisGroup = new rt(), this.group.add(this._axisGroup), !!t.get("show")) { var s = t.getCoordSysModel(), u = m2(s, t), l = new uf(t, oe({ handleAutoShown: function(f) { for (var h = s.coordinateSystem.getCartesians(), p = 0; p < h.length; p++) if (l2(h[p].getOtherAxis(t.axis).scale)) return !0; return !1; } }, u)); M(xNe, l.add, l), this._axisGroup.add(l.getGroup()), M(CNe, function(f) { t.get([f, "show"]) && SNe[f](this, this._axisGroup, t, s); }, this); var c = a && a.type === "changeAxisOrder" && a.isInitSort; c || Nw(o, this._axisGroup, t), r.prototype.render.call(this, t, n, i, a); } }, e.prototype.remove = function() { mQ(this); }, e.type = "cartesianAxis", e; }(yv), SNe = { splitLine: function(r, e, t, n) { var i = t.axis; if (!i.scale.isBlank()) { var a = t.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color"); s = le(s) ? s : [s]; for (var u = n.coordinateSystem.getRect(), l = i.isHorizontal(), c = 0, f = i.getTicksCoords({ tickModel: a }), h = [], p = [], d = o.getLineStyle(), v = 0; v < f.length; v++) { var g = i.toGlobalCoord(f[v].coord); l ? (h[0] = g, h[1] = u.y, p[0] = g, p[1] = u.y + u.height) : (h[0] = u.x, h[1] = g, p[0] = u.x + u.width, p[1] = g); var m = c++ % s.length, y = f[v].tickValue; e.add(new fa({ anid: y != null ? "line_" + f[v].tickValue : null, subPixelOptimize: !0, autoBatch: !0, shape: { x1: h[0], y1: h[1], x2: p[0], y2: p[1] }, style: qe({ stroke: s[m] }, d), silent: !0 })); } } }, minorSplitLine: function(r, e, t, n) { var i = t.axis, a = t.getModel("minorSplitLine"), o = a.getModel("lineStyle"), s = n.coordinateSystem.getRect(), u = i.isHorizontal(), l = i.getMinorTicksCoords(); if (!!l.length) for (var c = [], f = [], h = o.getLineStyle(), p = 0; p < l.length; p++) for (var d = 0; d < l[p].length; d++) { var v = i.toGlobalCoord(l[p][d].coord); u ? (c[0] = v, c[1] = s.y, f[0] = v, f[1] = s.y + s.height) : (c[0] = s.x, c[1] = v, f[0] = s.x + s.width, f[1] = v), e.add(new fa({ anid: "minor_line_" + l[p][d].tickValue, subPixelOptimize: !0, autoBatch: !0, shape: { x1: c[0], y1: c[1], x2: f[0], y2: f[1] }, style: h, silent: !0 })); } }, splitArea: function(r, e, t, n) { gQ(r, e, t, n); } }, _Q = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "xAxis", e; }(yQ), ENe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = _Q.type, t; } return e.type = "yAxis", e; }(yQ), bNe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "grid", t; } return e.prototype.render = function(t, n) { this.group.removeAll(), t.get("show") && this.group.add(new Vt({ shape: t.coordinateSystem.getRect(), style: qe({ fill: t.get("backgroundColor") }, t.getItemStyle()), silent: !0, z2: -1 })); }, e.type = "grid", e; }(Gn), xz = { offset: 0 }; function wQ(r) { r.registerComponentView(bNe), r.registerComponentModel(qRe), r.registerCoordinateSystem("cartesian2d", sNe), km(r, "x", v2, xz), km(r, "y", v2, xz), r.registerComponentView(_Q), r.registerComponentView(ENe), r.registerPreprocessor(function(e) { e.xAxis && e.yAxis && !e.grid && (e.grid = {}); }); } function TNe(r) { bt(wQ), r.registerSeriesModel(zRe), r.registerChartView(YRe), r.registerLayout(Ww("scatter")); } function PNe(r) { r.eachSeriesByType("radar", function(e) { var t = e.getData(), n = [], i = e.coordinateSystem; if (!!i) { var a = i.getIndicatorAxes(); M(a, function(o, s) { t.each(t.mapDimension(a[s].dim), function(u, l) { n[l] = n[l] || []; var c = i.dataToPoint(u, s); n[l][s] = Cz(c) ? c : Sz(i); }); }), t.each(function(o) { var s = hbe(n[o], function(u) { return Cz(u); }) || Sz(i); n[o].push(s.slice()), t.setItemLayout(o, n[o]); }); } }); } function Cz(r) { return !isNaN(r[0]) && !isNaN(r[1]); } function Sz(r) { return [r.cx, r.cy]; } function INe(r) { var e = r.polar; if (e) { le(e) || (e = [e]); var t = []; M(e, function(n, i) { n.indicator ? (n.type && !n.shape && (n.shape = n.type), r.radar = r.radar || [], le(r.radar) || (r.radar = [r.radar]), r.radar.push(n)) : t.push(n); }), r.polar = t; } M(r.series, function(n) { n && n.type === "radar" && n.polarIndex && (n.radarIndex = n.polarIndex); }); } var ANe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = t.coordinateSystem, o = this.group, s = t.getData(), u = this._data; function l(h, p) { var d = h.getItemVisual(p, "symbol") || "circle"; if (d !== "none") { var v = Vw(h.getItemVisual(p, "symbolSize")), g = vi(d, -1, -1, 2, 2), m = h.getItemVisual(p, "symbolRotate") || 0; return g.attr({ style: { strokeNoScale: !0 }, z2: 100, scaleX: v[0] / 2, scaleY: v[1] / 2, rotation: m * Math.PI / 180 || 0 }), g; } } function c(h, p, d, v, g, m) { d.removeAll(); for (var y = 0; y < p.length - 1; y++) { var _ = l(v, g); _ && (_.__dimIdx = y, h[y] ? (_.setPosition(h[y]), Bw[m ? "initProps" : "updateProps"](_, { x: p[y][0], y: p[y][1] }, t, g)) : _.setPosition(p[y]), d.add(_)); } } function f(h) { return ce(h, function(p) { return [a.cx, a.cy]; }); } s.diff(u).add(function(h) { var p = s.getItemLayout(h); if (!!p) { var d = new Ho(), v = new jo(), g = { shape: { points: p } }; d.shape.points = f(p), v.shape.points = f(p), Cn(d, g, t, h), Cn(v, g, t, h); var m = new rt(), y = new rt(); m.add(v), m.add(d), m.add(y), c(v.shape.points, p, y, s, h, !0), s.setItemGraphicEl(h, m); } }).update(function(h, p) { var d = u.getItemGraphicEl(p), v = d.childAt(0), g = d.childAt(1), m = d.childAt(2), y = { shape: { points: s.getItemLayout(h) } }; !y.shape.points || (c(v.shape.points, y.shape.points, m, s, h, !1), nl(g), nl(v), Ht(v, y, t), Ht(g, y, t), s.setItemGraphicEl(h, d)); }).remove(function(h) { o.remove(u.getItemGraphicEl(h)); }).execute(), s.eachItemGraphicEl(function(h, p) { var d = s.getItemModel(p), v = h.childAt(0), g = h.childAt(1), m = h.childAt(2), y = s.getItemVisual(p, "style"), _ = y.fill; o.add(h), v.useStyle(qe(d.getModel("lineStyle").getLineStyle(), { fill: "none", stroke: _ })), Ra(v, d, "lineStyle"), Ra(g, d, "areaStyle"); var w = d.getModel("areaStyle"), x = w.isEmpty() && w.parentModel.isEmpty(); g.ignore = x, M(["emphasis", "select", "blur"], function(b) { var E = d.getModel([b, "areaStyle"]), T = E.isEmpty() && E.parentModel.isEmpty(); g.ensureState(b).ignore = T && x; }), g.useStyle(qe(w.getAreaStyle(), { fill: _, opacity: 0.7, decal: y.decal })); var C = d.getModel("emphasis"), S = C.getModel("itemStyle").getItemStyle(); m.eachChild(function(b) { if (b instanceof Ba) { var E = b.style; b.useStyle(oe({ image: E.image, x: E.x, y: E.y, width: E.width, height: E.height }, y)); } else b.useStyle(y), b.setColor(_), b.style.strokeNoScale = !0; var T = b.ensureState("emphasis"); T.style = Qe(S); var P = s.getStore().get(s.getDimensionIndex(b.__dimIdx), p); (P == null || isNaN(P)) && (P = ""), no(b, wa(d), { labelFetcher: s.hostModel, labelDataIndex: p, labelDimIndex: b.__dimIdx, defaultText: P, inheritColor: _, defaultOpacity: y.opacity }); }), Zn(h, C.get("focus"), C.get("blurScope"), C.get("disabled")); }), this._data = s; }, e.prototype.remove = function() { this.group.removeAll(), this._data = null; }, e.type = "radar", e; }(an); const LNe = ANe; var DNe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.hasSymbolVisual = !0, t; } return e.prototype.init = function(t) { r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Yw(Ae(this.getData, this), Ae(this.getRawData, this)); }, e.prototype.getInitialData = function(t, n) { return Ry(this, { generateCoord: "indicator_", generateCoordCount: 1 / 0 }); }, e.prototype.formatTooltip = function(t, n, i) { var a = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), u = this.getData().getName(t), l = u === "" ? this.name : u, c = mK(this, t); return Ji("section", { header: l, sortBlocks: !0, blocks: ce(s, function(f) { var h = a.get(a.mapDimension(f.dim), t); return Ji("nameValue", { markerType: "subItem", markerColor: c, name: f.name, value: h, sortParam: h }); }) }); }, e.prototype.getTooltipPosition = function(t) { if (t != null) { for (var n = this.getData(), i = this.coordinateSystem, a = n.getValues(ce(i.dimensions, function(l) { return n.mapDimension(l); }), t), o = 0, s = a.length; o < s; o++) if (!isNaN(a[o])) { var u = i.getIndicatorAxes(); return i.coordToPoint(u[o].dataToCoord(a[o]), o); } } }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = { z: 2, colorBy: "data", coordinateSystem: "radar", legendHoverLink: !0, radarIndex: 0, lineStyle: { width: 2, type: "solid", join: "round" }, label: { position: "top" }, symbolSize: 8 }, e; }(bn); const MNe = DNe; var m0 = pQ.value; function yC(r, e) { return qe({ show: e }, r); } var ONe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.optionUpdated = function() { var t = this.get("boundaryGap"), n = this.get("splitNumber"), i = this.get("scale"), a = this.get("axisLine"), o = this.get("axisTick"), s = this.get("axisLabel"), u = this.get("axisName"), l = this.get(["axisName", "show"]), c = this.get(["axisName", "formatter"]), f = this.get("axisNameGap"), h = this.get("triggerEvent"), p = ce(this.get("indicator") || [], function(d) { d.max != null && d.max > 0 && !d.min ? d.min = 0 : d.min != null && d.min < 0 && !d.max && (d.max = 0); var v = u; d.color != null && (v = qe({ color: d.color }, u)); var g = dt(Qe(d), { boundaryGap: t, splitNumber: n, scale: i, axisLine: a, axisTick: o, axisLabel: s, name: d.text, showName: l, nameLocation: "end", nameGap: f, nameTextStyle: v, triggerEvent: h }, !1); if (Se(c)) { var m = g.name; g.name = c.replace("{value}", m != null ? m : ""); } else ze(c) && (g.name = c(g.name, g)); var y = new rn(g, null, this.ecModel); return gi(y, $w.prototype), y.mainType = "radar", y.componentIndex = this.componentIndex, y; }, this); this._indicatorModels = p; }, e.prototype.getIndicatorModels = function() { return this._indicatorModels; }, e.type = "radar", e.defaultOption = { z: 0, center: ["50%", "50%"], radius: "75%", startAngle: 90, axisName: { show: !0 }, boundaryGap: [0, 0], splitNumber: 5, axisNameGap: 15, scale: !1, shape: "polygon", axisLine: dt({ lineStyle: { color: "#bbb" } }, m0.axisLine), axisLabel: yC(m0.axisLabel, !1), axisTick: yC(m0.axisTick, !1), splitLine: yC(m0.splitLine, !0), splitArea: yC(m0.splitArea, !0), indicator: [] }, e; }(Rt); const RNe = ONe; var NNe = ["axisLine", "axisTickLabel", "axisName"], FNe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = this.group; a.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t); }, e.prototype._buildAxes = function(t) { var n = t.coordinateSystem, i = n.getIndicatorAxes(), a = ce(i, function(o) { var s = o.model.get("showName") ? o.name : "", u = new uf(o.model, { axisName: s, position: [n.cx, n.cy], rotation: o.angle, labelDirection: -1, tickDirection: -1, nameDirection: 1 }); return u; }); M(a, function(o) { M(NNe, o.add, o), this.group.add(o.getGroup()); }, this); }, e.prototype._buildSplitLineAndArea = function(t) { var n = t.coordinateSystem, i = n.getIndicatorAxes(); if (!i.length) return; var a = t.get("shape"), o = t.getModel("splitLine"), s = t.getModel("splitArea"), u = o.getModel("lineStyle"), l = s.getModel("areaStyle"), c = o.get("show"), f = s.get("show"), h = u.get("color"), p = l.get("color"), d = le(h) ? h : [h], v = le(p) ? p : [p], g = [], m = []; function y(D, O, N) { var F = N % O.length; return D[F] = D[F] || [], F; } if (a === "circle") for (var _ = i[0].getTicksCoords(), w = n.cx, x = n.cy, C = 0; C < _.length; C++) { if (c) { var S = y(g, d, C); g[S].push(new rc({ shape: { cx: w, cy: x, r: _[C].coord } })); } if (f && C < _.length - 1) { var S = y(m, v, C); m[S].push(new HT({ shape: { cx: w, cy: x, r0: _[C].coord, r: _[C + 1].coord } })); } } else for (var b, E = ce(i, function(D, O) { var N = D.getTicksCoords(); return b = b == null ? N.length - 1 : Math.min(N.length - 1, b), ce(N, function(F) { return n.coordToPoint(F.coord, O); }); }), T = [], C = 0; C <= b; C++) { for (var P = [], I = 0; I < i.length; I++) P.push(E[I][C]); if (P[0] ? P.push(P[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + C), c) { var S = y(g, d, C); g[S].push(new jo({ shape: { points: P } })); } if (f && T) { var S = y(m, v, C - 1); m[S].push(new Ho({ shape: { points: P.concat(T) } })); } T = P.slice().reverse(); } var A = u.getLineStyle(), L = l.getAreaStyle(); M(m, function(D, O) { this.group.add(qs(D, { style: qe({ stroke: "none", fill: v[O % v.length] }, L), silent: !0 })); }, this), M(g, function(D, O) { this.group.add(qs(D, { style: qe({ fill: "none", stroke: d[O % d.length] }, A), silent: !0 })); }, this); }, e.type = "radar", e; }(Gn); const BNe = FNe; var kNe = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this, t, n, i) || this; return a.type = "value", a.angle = 0, a.name = "", a; } return e; }(pl); const VNe = kNe; var GNe = function() { function r(e, t, n) { this.dimensions = [], this._model = e, this._indicatorAxes = ce(e.getIndicatorModels(), function(i, a) { var o = "indicator_" + a, s = new VNe( o, new Bh() ); return s.name = i.get("name"), s.model = i, i.axis = s, this.dimensions.push(o), s; }, this), this.resize(e, n); } return r.prototype.getIndicatorAxes = function() { return this._indicatorAxes; }, r.prototype.dataToPoint = function(e, t) { var n = this._indicatorAxes[t]; return this.coordToPoint(n.dataToCoord(e), t); }, r.prototype.coordToPoint = function(e, t) { var n = this._indicatorAxes[t], i = n.angle, a = this.cx + e * Math.cos(i), o = this.cy - e * Math.sin(i); return [a, o]; }, r.prototype.pointToData = function(e) { var t = e[0] - this.cx, n = e[1] - this.cy, i = Math.sqrt(t * t + n * n); t /= i, n /= i; for (var a = Math.atan2(-n, t), o = 1 / 0, s, u = -1, l = 0; l < this._indicatorAxes.length; l++) { var c = this._indicatorAxes[l], f = Math.abs(a - c.angle); f < o && (s = c, u = l, o = f); } return [u, +(s && s.coordToData(i))]; }, r.prototype.resize = function(e, t) { var n = e.get("center"), i = t.getWidth(), a = t.getHeight(), o = Math.min(i, a) / 2; this.cx = ye(n[0], i), this.cy = ye(n[1], a), this.startAngle = e.get("startAngle") * Math.PI / 180; var s = e.get("radius"); (Se(s) || $t(s)) && (s = [0, s]), this.r0 = ye(s[0], o), this.r = ye(s[1], o), M(this._indicatorAxes, function(u, l) { u.setExtent(this.r0, this.r); var c = this.startAngle + l * Math.PI * 2 / this._indicatorAxes.length; c = Math.atan2(Math.sin(c), Math.cos(c)), u.angle = c; }, this); }, r.prototype.update = function(e, t) { var n = this._indicatorAxes, i = this._model; M(n, function(s) { s.scale.setExtent(1 / 0, -1 / 0); }), e.eachSeriesByType("radar", function(s, u) { if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== i)) { var l = s.getData(); M(n, function(c) { c.scale.unionExtentFromData(l, l.mapDimension(c.dim)); }); } }, this); var a = i.get("splitNumber"), o = new Bh(); o.setExtent(0, a), o.setInterval(1), M(n, function(s, u) { dQ(s.scale, s.model, o); }); }, r.prototype.convertToPixel = function(e, t, n) { return console.warn("Not implemented."), null; }, r.prototype.convertFromPixel = function(e, t, n) { return console.warn("Not implemented."), null; }, r.prototype.containPoint = function(e) { return console.warn("Not implemented."), !1; }, r.create = function(e, t) { var n = []; return e.eachComponent("radar", function(i) { var a = new r(i, e, t); n.push(a), i.coordinateSystem = a; }), e.eachSeriesByType("radar", function(i) { i.get("coordinateSystem") === "radar" && (i.coordinateSystem = n[i.get("radarIndex") || 0]); }), n; }, r.dimensions = [], r; }(); const zNe = GNe; function $Ne(r) { r.registerCoordinateSystem("radar", zNe), r.registerComponentModel(RNe), r.registerComponentView(BNe), r.registerVisual({ seriesType: "radar", reset: function(e) { var t = e.getData(); t.each(function(n) { t.setItemVisual(n, "legendIcon", "roundRect"); }), t.setVisual("legendIcon", "roundRect"); } }); } function HNe(r) { bt($Ne), r.registerChartView(LNe), r.registerSeriesModel(MNe), r.registerLayout(PNe), r.registerProcessor(jw("radar")), r.registerPreprocessor(INe); } var Ez = "\0_ec_interaction_mutex"; function UNe(r, e, t) { var n = $F(r); n[e] = t; } function WNe(r, e, t) { var n = $F(r), i = n[e]; i === t && (n[e] = null); } function bz(r, e) { return !!$F(r)[e]; } function $F(r) { return r[Ez] || (r[Ez] = {}); } cc({ type: "takeGlobalCursor", event: "globalCursorTaken", update: "update" }, ci); var jNe = function(r) { W(e, r); function e(t) { var n = r.call(this) || this; n._zr = t; var i = Ae(n._mousedownHandler, n), a = Ae(n._mousemoveHandler, n), o = Ae(n._mouseupHandler, n), s = Ae(n._mousewheelHandler, n), u = Ae(n._pinchHandler, n); return n.enable = function(l, c) { this.disable(), this._opt = qe(Qe(c) || {}, { zoomOnMouseWheel: !0, moveOnMouseMove: !0, moveOnMouseWheel: !1, preventDefaultMouseMove: !0 }), l == null && (l = !0), (l === !0 || l === "move" || l === "pan") && (t.on("mousedown", i), t.on("mousemove", a), t.on("mouseup", o)), (l === !0 || l === "scale" || l === "zoom") && (t.on("mousewheel", s), t.on("pinch", u)); }, n.disable = function() { t.off("mousedown", i), t.off("mousemove", a), t.off("mouseup", o), t.off("mousewheel", s), t.off("pinch", u); }, n; } return e.prototype.isDragging = function() { return this._dragging; }, e.prototype.isPinching = function() { return this._pinching; }, e.prototype.setPointerChecker = function(t) { this.pointerChecker = t; }, e.prototype.dispose = function() { this.disable(); }, e.prototype._mousedownHandler = function(t) { if (!(qV(t) || t.target && t.target.draggable)) { var n = t.offsetX, i = t.offsetY; this.pointerChecker && this.pointerChecker(t, n, i) && (this._x = n, this._y = i, this._dragging = !0); } }, e.prototype._mousemoveHandler = function(t) { if (!(!this._dragging || !gS("moveOnMouseMove", t, this._opt) || t.gestureEvent === "pinch" || bz(this._zr, "globalPan"))) { var n = t.offsetX, i = t.offsetY, a = this._x, o = this._y, s = n - a, u = i - o; this._x = n, this._y = i, this._opt.preventDefaultMouseMove && rf(t.event), xQ(this, "pan", "moveOnMouseMove", t, { dx: s, dy: u, oldX: a, oldY: o, newX: n, newY: i, isAvailableBehavior: null }); } }, e.prototype._mouseupHandler = function(t) { qV(t) || (this._dragging = !1); }, e.prototype._mousewheelHandler = function(t) { var n = gS("zoomOnMouseWheel", t, this._opt), i = gS("moveOnMouseWheel", t, this._opt), a = t.wheelDelta, o = Math.abs(a), s = t.offsetX, u = t.offsetY; if (!(a === 0 || !n && !i)) { if (n) { var l = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, c = a > 0 ? l : 1 / l; zA(this, "zoom", "zoomOnMouseWheel", t, { scale: c, originX: s, originY: u, isAvailableBehavior: null }); } if (i) { var f = Math.abs(a), h = (a > 0 ? 1 : -1) * (f > 3 ? 0.4 : f > 1 ? 0.15 : 0.05); zA(this, "scrollMove", "moveOnMouseWheel", t, { scrollDelta: h, originX: s, originY: u, isAvailableBehavior: null }); } } }, e.prototype._pinchHandler = function(t) { if (!bz(this._zr, "globalPan")) { var n = t.pinchScale > 1 ? 1.1 : 1 / 1.1; zA(this, "zoom", null, t, { scale: n, originX: t.pinchX, originY: t.pinchY, isAvailableBehavior: null }); } }, e; }(Cu); function zA(r, e, t, n, i) { r.pointerChecker && r.pointerChecker(n, i.originX, i.originY) && (rf(n.event), xQ(r, e, t, n, i)); } function xQ(r, e, t, n, i) { i.isAvailableBehavior = Ae(gS, null, t, n), r.trigger(e, i); } function gS(r, e, t) { var n = t[r]; return !r || n && (!Se(n) || e.event[n + "Key"]); } const Xw = jNe; function HF(r, e, t) { var n = r.target; n.x += e, n.y += t, n.dirty(); } function UF(r, e, t, n) { var i = r.target, a = r.zoomLimit, o = r.zoom = r.zoom || 1; if (o *= e, a) { var s = a.min || 0, u = a.max || 1 / 0; o = Math.max(Math.min(u, o), s); } var l = o / r.zoom; r.zoom = o, i.x -= (t - i.x) * (l - 1), i.y -= (n - i.y) * (l - 1), i.scaleX *= l, i.scaleY *= l, i.dirty(); } var YNe = { axisPointer: 1, tooltip: 1, brush: 1 }; function cP(r, e, t) { var n = e.getComponentByElement(r.topTarget), i = n && n.coordinateSystem; return n && n !== t && !YNe.hasOwnProperty(n.mainType) && i && i.model !== t; } function CQ(r) { if (Se(r)) { var e = new DOMParser(); r = e.parseFromString(r, "text/xml"); } var t = r; for (t.nodeType === 9 && (t = t.firstChild); t.nodeName.toLowerCase() !== "svg" || t.nodeType !== 1; ) t = t.nextSibling; return t; } var $A, BE = { fill: "fill", stroke: "stroke", "stroke-width": "lineWidth", opacity: "opacity", "fill-opacity": "fillOpacity", "stroke-opacity": "strokeOpacity", "stroke-dasharray": "lineDash", "stroke-dashoffset": "lineDashOffset", "stroke-linecap": "lineCap", "stroke-linejoin": "lineJoin", "stroke-miterlimit": "miterLimit", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "text-anchor": "textAlign", visibility: "visibility", display: "display" }, Tz = At(BE), kE = { "alignment-baseline": "textBaseline", "stop-color": "stopColor" }, Pz = At(kE), XNe = function() { function r() { this._defs = {}, this._root = null; } return r.prototype.parse = function(e, t) { t = t || {}; var n = CQ(e); if (process.env.NODE_ENV !== "production" && !n) throw new Error("Illegal svg"); this._defsUsePending = []; var i = new rt(); this._root = i; var a = [], o = n.getAttribute("viewBox") || "", s = parseFloat(n.getAttribute("width") || t.width), u = parseFloat(n.getAttribute("height") || t.height); isNaN(s) && (s = null), isNaN(u) && (u = null), Zo(n, i, null, !0, !1); for (var l = n.firstChild; l; ) this._parseNode(l, i, a, null, !1, !1), l = l.nextSibling; KNe(this._defs, this._defsUsePending), this._defsUsePending = []; var c, f; if (o) { var h = fP(o); h.length >= 4 && (c = { x: parseFloat(h[0] || 0), y: parseFloat(h[1] || 0), width: parseFloat(h[2]), height: parseFloat(h[3]) }); } if (c && s != null && u != null && (f = EQ(c, { x: 0, y: 0, width: s, height: u }), !t.ignoreViewBox)) { var p = i; i = new rt(), i.add(p), p.scaleX = p.scaleY = f.scale, p.x = f.x, p.y = f.y; } return !t.ignoreRootClip && s != null && u != null && i.setClipPath(new Vt({ shape: { x: 0, y: 0, width: s, height: u } })), { root: i, width: s, height: u, viewBoxRect: c, viewBoxTransform: f, named: a }; }, r.prototype._parseNode = function(e, t, n, i, a, o) { var s = e.nodeName.toLowerCase(), u, l = i; if (s === "defs" && (a = !0), s === "text" && (o = !0), s === "defs" || s === "switch") u = t; else { if (!a) { var c = $A[s]; if (c && Te($A, s)) { u = c.call(this, e, t); var f = e.getAttribute("name"); if (f) { var h = { name: f, namedFrom: null, svgNodeTagLower: s, el: u }; n.push(h), s === "g" && (l = h); } else i && n.push({ name: i.name, namedFrom: i, svgNodeTagLower: s, el: u }); t.add(u); } } var p = Iz[s]; if (p && Te(Iz, s)) { var d = p.call(this, e), v = e.getAttribute("id"); v && (this._defs[v] = d); } } if (u && u.isGroup) for (var g = e.firstChild; g; ) g.nodeType === 1 ? this._parseNode(g, u, n, l, a, o) : g.nodeType === 3 && o && this._parseText(g, u), g = g.nextSibling; }, r.prototype._parseText = function(e, t) { var n = new d1({ style: { text: e.textContent }, silent: !0, x: this._textX || 0, y: this._textY || 0 }); Rs(t, n), Zo(e, n, this._defsUsePending, !1, !1), qNe(n, t); var i = n.style, a = i.fontSize; a && a < 9 && (i.fontSize = 9, n.scaleX *= a / 9, n.scaleY *= a / 9); var o = (i.fontSize || i.fontFamily) && [ i.fontStyle, i.fontWeight, (i.fontSize || 12) + "px", i.fontFamily || "sans-serif" ].join(" "); i.font = o; var s = n.getBoundingRect(); return this._textX += s.width, t.add(n), n; }, r.internalField = function() { $A = { g: function(e, t) { var n = new rt(); return Rs(t, n), Zo(e, n, this._defsUsePending, !1, !1), n; }, rect: function(e, t) { var n = new Vt(); return Rs(t, n), Zo(e, n, this._defsUsePending, !1, !1), n.setShape({ x: parseFloat(e.getAttribute("x") || "0"), y: parseFloat(e.getAttribute("y") || "0"), width: parseFloat(e.getAttribute("width") || "0"), height: parseFloat(e.getAttribute("height") || "0") }), n.silent = !0, n; }, circle: function(e, t) { var n = new rc(); return Rs(t, n), Zo(e, n, this._defsUsePending, !1, !1), n.setShape({ cx: parseFloat(e.getAttribute("cx") || "0"), cy: parseFloat(e.getAttribute("cy") || "0"), r: parseFloat(e.getAttribute("r") || "0") }), n.silent = !0, n; }, line: function(e, t) { var n = new fa(); return Rs(t, n), Zo(e, n, this._defsUsePending, !1, !1), n.setShape({ x1: parseFloat(e.getAttribute("x1") || "0"), y1: parseFloat(e.getAttribute("y1") || "0"), x2: parseFloat(e.getAttribute("x2") || "0"), y2: parseFloat(e.getAttribute("y2") || "0") }), n.silent = !0, n; }, ellipse: function(e, t) { var n = new QN(); return Rs(t, n), Zo(e, n, this._defsUsePending, !1, !1), n.setShape({ cx: parseFloat(e.getAttribute("cx") || "0"), cy: parseFloat(e.getAttribute("cy") || "0"), rx: parseFloat(e.getAttribute("rx") || "0"), ry: parseFloat(e.getAttribute("ry") || "0") }), n.silent = !0, n; }, polygon: function(e, t) { var n = e.getAttribute("points"), i; n && (i = Dz(n)); var a = new Ho({ shape: { points: i || [] }, silent: !0 }); return Rs(t, a), Zo(e, a, this._defsUsePending, !1, !1), a; }, polyline: function(e, t) { var n = e.getAttribute("points"), i; n && (i = Dz(n)); var a = new jo({ shape: { points: i || [] }, silent: !0 }); return Rs(t, a), Zo(e, a, this._defsUsePending, !1, !1), a; }, image: function(e, t) { var n = new Ba(); return Rs(t, n), Zo(e, n, this._defsUsePending, !1, !1), n.setStyle({ image: e.getAttribute("xlink:href") || e.getAttribute("href"), x: +e.getAttribute("x"), y: +e.getAttribute("y"), width: +e.getAttribute("width"), height: +e.getAttribute("height") }), n.silent = !0, n; }, text: function(e, t) { var n = e.getAttribute("x") || "0", i = e.getAttribute("y") || "0", a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0"; this._textX = parseFloat(n) + parseFloat(a), this._textY = parseFloat(i) + parseFloat(o); var s = new rt(); return Rs(t, s), Zo(e, s, this._defsUsePending, !1, !0), s; }, tspan: function(e, t) { var n = e.getAttribute("x"), i = e.getAttribute("y"); n != null && (this._textX = parseFloat(n)), i != null && (this._textY = parseFloat(i)); var a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new rt(); return Rs(t, s), Zo(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(a), this._textY += parseFloat(o), s; }, path: function(e, t) { var n = e.getAttribute("d") || "", i = eZ(n); return Rs(t, i), Zo(e, i, this._defsUsePending, !1, !1), i.silent = !0, i; } }; }(), r; }(), Iz = { lineargradient: function(r) { var e = parseInt(r.getAttribute("x1") || "0", 10), t = parseInt(r.getAttribute("y1") || "0", 10), n = parseInt(r.getAttribute("x2") || "10", 10), i = parseInt(r.getAttribute("y2") || "0", 10), a = new xy(e, t, n, i); return Az(r, a), Lz(r, a), a; }, radialgradient: function(r) { var e = parseInt(r.getAttribute("cx") || "0", 10), t = parseInt(r.getAttribute("cy") || "0", 10), n = parseInt(r.getAttribute("r") || "0", 10), i = new pZ(e, t, n); return Az(r, i), Lz(r, i), i; } }; function Az(r, e) { var t = r.getAttribute("gradientUnits"); t === "userSpaceOnUse" && (e.global = !0); } function Lz(r, e) { for (var t = r.firstChild; t; ) { if (t.nodeType === 1 && t.nodeName.toLocaleLowerCase() === "stop") { var n = t.getAttribute("offset"), i = void 0; n && n.indexOf("%") > 0 ? i = parseInt(n, 10) / 100 : n ? i = parseFloat(n) : i = 0; var a = {}; SQ(t, a, a); var o = a.stopColor || t.getAttribute("stop-color") || "#000000"; e.colorStops.push({ offset: i, color: o }); } t = t.nextSibling; } } function Rs(r, e) { r && r.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), qe(e.__inheritedStyle, r.__inheritedStyle)); } function Dz(r) { for (var e = fP(r), t = [], n = 0; n < e.length; n += 2) { var i = parseFloat(e[n]), a = parseFloat(e[n + 1]); t.push([i, a]); } return t; } function Zo(r, e, t, n, i) { var a = e, o = a.__inheritedStyle = a.__inheritedStyle || {}, s = {}; r.nodeType === 1 && (eFe(r, e), SQ(r, o, s), n || tFe(r, o, s)), a.style = a.style || {}, o.fill != null && (a.style.fill = Mz(a, "fill", o.fill, t)), o.stroke != null && (a.style.stroke = Mz(a, "stroke", o.stroke, t)), M([ "lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize" ], function(u) { o[u] != null && (a.style[u] = parseFloat(o[u])); }), M([ "lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign" ], function(u) { o[u] != null && (a.style[u] = o[u]); }), i && (a.__selfStyle = s), o.lineDash && (a.style.lineDash = ce(fP(o.lineDash), function(u) { return parseFloat(u); })), (o.visibility === "hidden" || o.visibility === "collapse") && (a.invisible = !0), o.display === "none" && (a.ignore = !0); } function qNe(r, e) { var t = e.__selfStyle; if (t) { var n = t.textBaseline, i = n; !n || n === "auto" || n === "baseline" ? i = "alphabetic" : n === "before-edge" || n === "text-before-edge" ? i = "top" : n === "after-edge" || n === "text-after-edge" ? i = "bottom" : (n === "central" || n === "mathematical") && (i = "middle"), r.style.textBaseline = i; } var a = e.__inheritedStyle; if (a) { var o = a.textAlign, s = o; o && (o === "middle" && (s = "center"), r.style.textAlign = s); } } var ZNe = /^url\(\s*#(.*?)\)/; function Mz(r, e, t, n) { var i = t && t.match(ZNe); if (i) { var a = Bu(i[1]); n.push([r, e, a]); return; } return t === "none" && (t = null), t; } function KNe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n[0].style[n[1]] = r[n[2]]; } } var JNe = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g; function fP(r) { return r.match(JNe) || []; } var QNe = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, HA = Math.PI / 180; function eFe(r, e) { var t = r.getAttribute("transform"); if (t) { t = t.replace(/,/g, " "); var n = [], i = null; t.replace(QNe, function(f, h, p) { return n.push(h, p), ""; }); for (var a = n.length - 1; a > 0; a -= 2) { var o = n[a], s = n[a - 1], u = fP(o); switch (i = i || xs(), s) { case "translate": Jl(i, i, [parseFloat(u[0]), parseFloat(u[1] || "0")]); break; case "scale": GN(i, i, [parseFloat(u[0]), parseFloat(u[1] || u[0])]); break; case "rotate": dv(i, i, -parseFloat(u[0]) * HA); break; case "skewX": var l = Math.tan(parseFloat(u[0]) * HA); Bc(i, [1, 0, l, 1, 0, 0], i); break; case "skewY": var c = Math.tan(parseFloat(u[0]) * HA); Bc(i, [1, c, 0, 1, 0, 0], i); break; case "matrix": i[0] = parseFloat(u[0]), i[1] = parseFloat(u[1]), i[2] = parseFloat(u[2]), i[3] = parseFloat(u[3]), i[4] = parseFloat(u[4]), i[5] = parseFloat(u[5]); break; } } e.setLocalTransform(i); } } var Oz = /([^\s:;]+)\s*:\s*([^:;]+)/g; function SQ(r, e, t) { var n = r.getAttribute("style"); if (!!n) { Oz.lastIndex = 0; for (var i; (i = Oz.exec(n)) != null; ) { var a = i[1], o = Te(BE, a) ? BE[a] : null; o && (e[o] = i[2]); var s = Te(kE, a) ? kE[a] : null; s && (t[s] = i[2]); } } } function tFe(r, e, t) { for (var n = 0; n < Tz.length; n++) { var i = Tz[n], a = r.getAttribute(i); a != null && (e[BE[i]] = a); } for (var n = 0; n < Pz.length; n++) { var i = Pz[n], a = r.getAttribute(i); a != null && (t[kE[i]] = a); } } function EQ(r, e) { var t = e.width / r.width, n = e.height / r.height, i = Math.min(t, n); return { scale: i, x: -(r.x + r.width / 2) * i + (e.x + e.width / 2), y: -(r.y + r.height / 2) * i + (e.y + e.height / 2) }; } function rFe(r, e) { var t = new XNe(); return t.parse(r, e); } var nFe = $e([ "rect", "circle", "line", "ellipse", "polygon", "polyline", "path", "text", "tspan", "g" ]), iFe = function() { function r(e, t) { this.type = "geoSVG", this._usedGraphicMap = $e(), this._freedGraphics = [], this._mapName = e, this._parsedXML = CQ(t); } return r.prototype.load = function() { var e = this._firstGraphic; if (!e) { e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone(); var t = oFe(e.named), n = t.regions, i = t.regionsMap; this._regions = n, this._regionsMap = i; } return { boundingRect: this._boundingRect, regions: this._regions, regionsMap: this._regionsMap }; }, r.prototype._buildGraphic = function(e) { var t, n; try { t = e && rFe(e, { ignoreViewBox: !0, ignoreRootClip: !0 }) || {}, n = t.root, Ze(n != null); } catch (g) { throw new Error(`Invalid svg format ` + g.message); } var i = new rt(); i.add(n), i.isGeoSVGGraphicRoot = !0; var a = t.width, o = t.height, s = t.viewBoxRect, u = this._boundingRect; if (!u) { var l = void 0, c = void 0, f = void 0, h = void 0; if (a != null ? (l = 0, f = a) : s && (l = s.x, f = s.width), o != null ? (c = 0, h = o) : s && (c = s.y, h = s.height), l == null || c == null) { var p = n.getBoundingRect(); l == null && (l = p.x, f = p.width), c == null && (c = p.y, h = p.height); } u = this._boundingRect = new gt(l, c, f, h); } if (s) { var d = EQ(s, u); n.scaleX = n.scaleY = d.scale, n.x = d.x, n.y = d.y; } i.setClipPath(new Vt({ shape: u.plain() })); var v = []; return M(t.named, function(g) { nFe.get(g.svgNodeTagLower) != null && (v.push(g), aFe(g.el)); }), { root: i, boundingRect: u, named: v }; }, r.prototype.useGraphic = function(e) { var t = this._usedGraphicMap, n = t.get(e); return n || (n = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), t.set(e, n), n); }, r.prototype.freeGraphic = function(e) { var t = this._usedGraphicMap, n = t.get(e); n && (t.removeKey(e), this._freedGraphics.push(n)); }, r; }(); function aFe(r) { r.silent = !1, r.isGroup && r.traverse(function(e) { e.silent = !1; }); } function oFe(r) { var e = [], t = $e(); return M(r, function(n) { if (n.namedFrom == null) { var i = new b2e(n.name, n.el); e.push(i), t.set(n.name, i); } }), { regions: e, regionsMap: t }; } var w2 = [126, 25], Rz = "\u5357\u6D77\u8BF8\u5C9B", Lp = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]]; for (var Ep = 0; Ep < Lp.length; Ep++) for (var Xv = 0; Xv < Lp[Ep].length; Xv++) Lp[Ep][Xv][0] /= 10.5, Lp[Ep][Xv][1] /= -10.5 / 0.75, Lp[Ep][Xv][0] += w2[0], Lp[Ep][Xv][1] += w2[1]; function sFe(r, e) { if (r === "china") { for (var t = 0; t < e.length; t++) if (e[t].name === Rz) return; e.push(new EJ(Rz, ce(Lp, function(n) { return { type: "polygon", exterior: n }; }), w2)); } } var uFe = { \u5357\u6D77\u8BF8\u5C9B: [32, 80], \u5E7F\u4E1C: [0, -10], \u9999\u6E2F: [10, 5], \u6FB3\u95E8: [-10, 10], \u5929\u6D25: [5, 5] }; function lFe(r, e) { if (r === "china") { var t = uFe[e.name]; if (t) { var n = e.getCenter(); n[0] += t[0] / 10.5, n[1] += -t[1] / (10.5 / 0.75), e.setCenter(n); } } } var cFe = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]]; function fFe(r, e) { r === "china" && e.name === "\u53F0\u6E7E" && e.geometries.push({ type: "polygon", exterior: cFe[0] }); } var hFe = "name", pFe = function() { function r(e, t, n) { this.type = "geoJSON", this._parsedMap = $e(), this._mapName = e, this._specialAreas = n, this._geoJSON = vFe(t); } return r.prototype.load = function(e, t) { t = t || hFe; var n = this._parsedMap.get(t); if (!n) { var i = this._parseToRegions(t); n = this._parsedMap.set(t, { regions: i, boundingRect: dFe(i) }); } var a = $e(), o = []; return M(n.regions, function(s) { var u = s.name; e && Te(e, u) && (s = s.cloneShallow(u = e[u])), o.push(s), a.set(u, s); }), { regions: o, boundingRect: n.boundingRect || new gt(0, 0, 0, 0), regionsMap: a }; }, r.prototype._parseToRegions = function(e) { var t = this._mapName, n = this._geoJSON, i; try { i = n ? P2e(n, e) : []; } catch (a) { throw new Error(`Invalid geoJson format ` + a.message); } return sFe(t, i), M(i, function(a) { var o = a.name; lFe(t, a), fFe(t, a); var s = this._specialAreas && this._specialAreas[o]; s && a.transformTo(s.left, s.top, s.width, s.height); }, this), i; }, r.prototype.getMapForUser = function() { return { geoJson: this._geoJSON, geoJSON: this._geoJSON, specialAreas: this._specialAreas }; }, r; }(); function dFe(r) { for (var e, t = 0; t < r.length; t++) { var n = r[t].getBoundingRect(); e = e || n.clone(), e.union(n); } return e; } function vFe(r) { return Se(r) ? typeof JSON < "u" && JSON.parse ? JSON.parse(r) : new Function("return (" + r + ");")() : r; } var y0 = $e(); const lf = { registerMap: function(r, e, t) { if (e.svg) { var n = new iFe(r, e.svg); y0.set(r, n); } else { var i = e.geoJson || e.geoJSON; i && !e.features ? t = e.specialAreas : i = e; var n = new pFe(r, i, t); y0.set(r, n); } }, getGeoResource: function(r) { return y0.get(r); }, getMapForUser: function(r) { var e = y0.get(r); return e && e.type === "geoJSON" && e.getMapForUser(); }, load: function(r, e, t) { var n = y0.get(r); if (!n) { process.env.NODE_ENV !== "production" && console.error("Map " + r + " not exists. The GeoJSON of the map must be provided."); return; } return n.load(e, t); } }; var WF = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], gFe = $e(WF), mFe = $e(WF.concat(["g"])), yFe = $e(WF.concat(["g"])), bQ = Ut(); function _C(r) { var e = r.getItemStyle(), t = r.get("areaColor"); return t != null && (e.fill = t), e; } function Nz(r) { var e = r.style; e && (e.stroke = e.stroke || e.fill, e.fill = null); } var _Fe = function() { function r(e) { var t = new rt(); this.uid = by("ec_map_draw"), this._controller = new Xw(e.getZr()), this._controllerHost = { target: t }, this.group = t, t.add(this._regionsGroup = new rt()), t.add(this._svgGroup = new rt()); } return r.prototype.draw = function(e, t, n, i, a) { var o = e.mainType === "geo", s = e.getData && e.getData(); o && t.eachComponent({ mainType: "series", subType: "map" }, function(m) { !s && m.getHostGeoModel() === e && (s = m.getData()); }); var u = e.coordinateSystem, l = this._regionsGroup, c = this.group, f = u.getTransformInfo(), h = f.raw, p = f.roam, d = !l.childAt(0) || a; d ? (c.x = p.x, c.y = p.y, c.scaleX = p.scaleX, c.scaleY = p.scaleY, c.dirty()) : Ht(c, p, e); var v = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = { api: n, geo: u, mapOrGeoModel: e, data: s, isVisualEncodedByVisualMap: v, isGeo: o, transformInfoRaw: h }; u.resourceType === "geoJSON" ? this._buildGeoJSON(g) : u.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, t, n), this._updateMapSelectHandler(e, l, n, i); }, r.prototype._buildGeoJSON = function(e) { var t = this._regionsGroupByName = $e(), n = $e(), i = this._regionsGroup, a = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, u = e.geo.projection, l = u && u.stream; function c(p, d) { return d && (p = d(p)), p && [p[0] * a.scaleX + a.x, p[1] * a.scaleY + a.y]; } function f(p) { for (var d = [], v = !l && u && u.project, g = 0; g < p.length; ++g) { var m = c(p[g], v); m && d.push(m); } return d; } function h(p) { return { shape: { points: f(p) } }; } i.removeAll(), M(e.geo.regions, function(p) { var d = p.name, v = t.get(d), g = n.get(d) || {}, m = g.dataIdx, y = g.regionModel; v || (v = t.set(d, new rt()), i.add(v), m = s ? s.indexOfName(d) : null, y = e.isGeo ? o.getRegionModel(d) : s ? s.getItemModel(m) : null, n.set(d, { dataIdx: m, regionModel: y })); var _ = [], w = []; M(p.geometries, function(S) { if (S.type === "polygon") { var b = [S.exterior].concat(S.interiors || []); l && (b = zz(b, l)), M(b, function(T) { _.push(new Ho(h(T))); }); } else { var E = S.points; l && (E = zz(E, l, !0)), M(E, function(T) { w.push(new jo(h(T))); }); } }); var x = c(p.getCenter(), u && u.project); function C(S, b) { if (!!S.length) { var E = new tF({ culling: !0, segmentIgnoreThreshold: 1, shape: { paths: S } }); v.add(E), Fz(e, E, m, y), Bz(e, E, d, y, o, m, x), b && (Nz(E), M(E.states, Nz)); } } C(_), C(w, !0); }), t.each(function(p, d) { var v = n.get(d), g = v.dataIdx, m = v.regionModel; kz(e, p, d, m, o, g), Vz(e, p, d, m, o), Gz(e, p, d, m, o); }, this); }, r.prototype._buildSVG = function(e) { var t = e.geo.map, n = e.transformInfoRaw; this._svgGroup.x = n.x, this._svgGroup.y = n.y, this._svgGroup.scaleX = n.scaleX, this._svgGroup.scaleY = n.scaleY, this._svgResourceChanged(t) && (this._freeSVG(), this._useSVG(t)); var i = this._svgDispatcherMap = $e(), a = !1; M(this._svgGraphicRecord.named, function(o) { var s = o.name, u = e.mapOrGeoModel, l = e.data, c = o.svgNodeTagLower, f = o.el, h = l ? l.indexOfName(s) : null, p = u.getRegionModel(s); if (gFe.get(c) != null && f instanceof vu && Fz(e, f, h, p), f instanceof vu && (f.culling = !0), f.z2EmphasisLift = 0, !o.namedFrom && (yFe.get(c) != null && Bz(e, f, s, p, u, h, null), kz(e, f, s, p, u, h), Vz(e, f, s, p, u), mFe.get(c) != null)) { var d = Gz(e, f, s, p, u); d === "self" && (a = !0); var v = i.get(s) || i.set(s, []); v.push(f); } }, this), this._enableBlurEntireSVG(a, e); }, r.prototype._enableBlurEntireSVG = function(e, t) { if (e && t.isGeo) { var n = t.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), i = n.opacity; this._svgGraphicRecord.root.traverse(function(a) { if (!a.isGroup) { $d(a); var o = a.ensureState("blur").style || {}; o.opacity == null && i != null && (o.opacity = i), a.ensureState("emphasis"); } }); } }, r.prototype.remove = function() { this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null; }, r.prototype.findHighDownDispatchers = function(e, t) { if (e == null) return []; var n = t.coordinateSystem; if (n.resourceType === "geoJSON") { var i = this._regionsGroupByName; if (i) { var a = i.get(e); return a ? [a] : []; } } else if (n.resourceType === "geoSVG") return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || []; }, r.prototype._svgResourceChanged = function(e) { return this._svgMapName !== e; }, r.prototype._useSVG = function(e) { var t = lf.getGeoResource(e); if (t && t.type === "geoSVG") { var n = t.useGraphic(this.uid); this._svgGroup.add(n.root), this._svgGraphicRecord = n, this._svgMapName = e; } }, r.prototype._freeSVG = function() { var e = this._svgMapName; if (e != null) { var t = lf.getGeoResource(e); t && t.type === "geoSVG" && t.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null; } }, r.prototype._updateController = function(e, t, n) { var i = e.coordinateSystem, a = this._controller, o = this._controllerHost; o.zoomLimit = e.get("scaleLimit"), o.zoom = i.getZoom(), a.enable(e.get("roam") || !1); var s = e.mainType; function u() { var l = { type: "geoRoam", componentType: s }; return l[s + "Id"] = e.id, l; } a.off("pan").on("pan", function(l) { this._mouseDownFlag = !1, HF(o, l.dx, l.dy), n.dispatchAction(oe(u(), { dx: l.dx, dy: l.dy, animation: { duration: 0 } })); }, this), a.off("zoom").on("zoom", function(l) { this._mouseDownFlag = !1, UF(o, l.scale, l.originX, l.originY), n.dispatchAction(oe(u(), { zoom: l.scale, originX: l.originX, originY: l.originY, animation: { duration: 0 } })); }, this), a.setPointerChecker(function(l, c, f) { return i.containPoint([c, f]) && !cP(l, n, e); }); }, r.prototype.resetForLabelLayout = function() { this.group.traverse(function(e) { var t = e.getTextContent(); t && (t.ignore = bQ(t).ignore); }); }, r.prototype._updateMapSelectHandler = function(e, t, n, i) { var a = this; t.off("mousedown"), t.off("click"), e.get("selectedMode") && (t.on("mousedown", function() { a._mouseDownFlag = !0; }), t.on("click", function(o) { !a._mouseDownFlag || (a._mouseDownFlag = !1); })); }, r; }(); function Fz(r, e, t, n) { var i = n.getModel("itemStyle"), a = n.getModel(["emphasis", "itemStyle"]), o = n.getModel(["blur", "itemStyle"]), s = n.getModel(["select", "itemStyle"]), u = _C(i), l = _C(a), c = _C(s), f = _C(o), h = r.data; if (h) { var p = h.getItemVisual(t, "style"), d = h.getItemVisual(t, "decal"); r.isVisualEncodedByVisualMap && p.fill && (u.fill = p.fill), d && (u.decal = Nm(d, r.api)); } e.setStyle(u), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = l, e.ensureState("select").style = c, e.ensureState("blur").style = f, $d(e); } function Bz(r, e, t, n, i, a, o) { var s = r.data, u = r.isGeo, l = s && isNaN(s.get(s.mapDimension("value"), a)), c = s && s.getItemLayout(a); if (u || l || c && c.showLabel) { var f = u ? t : a, h = void 0; (!s || a >= 0) && (h = i); var p = o ? { normal: { align: "center", verticalAlign: "middle" } } : null; no(e, wa(n), { labelFetcher: h, labelDataIndex: f, defaultText: t }, p); var d = e.getTextContent(); if (d && (bQ(d).ignore = d.ignore, e.textConfig && o)) { var v = e.getBoundingRect().clone(); e.textConfig.layoutRect = v, e.textConfig.position = [(o[0] - v.x) / v.width * 100 + "%", (o[1] - v.y) / v.height * 100 + "%"]; } e.disableLabelAnimation = !0; } else e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null; } function kz(r, e, t, n, i, a) { r.data ? r.data.setItemGraphicEl(a, e) : nt(e).eventData = { componentType: "geo", componentIndex: i.componentIndex, geoIndex: i.componentIndex, name: t, region: n && n.option || {} }; } function Vz(r, e, t, n, i) { r.data || Sy({ el: e, componentModel: i, itemName: t, itemTooltipOption: n.get("tooltip") }); } function Gz(r, e, t, n, i) { e.highDownSilentOnTouch = !!i.get("selectedMode"); var a = n.getModel("emphasis"), o = a.get("focus"); return Zn(e, o, a.get("blurScope"), a.get("disabled")), r.isGeo && yIe(e, i, t), o; } function zz(r, e, t) { var n = [], i; function a() { i = []; } function o() { i.length && (n.push(i), i = []); } var s = e({ polygonStart: a, polygonEnd: o, lineStart: a, lineEnd: o, point: function(u, l) { isFinite(u) && isFinite(l) && i.push([u, l]); }, sphere: function() { } }); return !t && s.polygonStart(), M(r, function(u) { s.lineStart(); for (var l = 0; l < u.length; l++) s.point(u[l][0], u[l][1]); s.lineEnd(); }), !t && s.polygonEnd(), n; } const TQ = _Fe; var wFe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i, a) { if (!(a && a.type === "mapToggleSelect" && a.from === this.uid)) { var o = this.group; if (o.removeAll(), !t.getHostGeoModel()) { if (this._mapDraw && a && a.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), a && a.type === "geoRoam" && a.componentType === "series" && a.seriesId === t.id) { var s = this._mapDraw; s && o.add(s.group); } else if (t.needsDrawMap) { var s = this._mapDraw || new TQ(i); o.add(s.group), s.draw(t, n, i, this, a), this._mapDraw = s; } else this._mapDraw && this._mapDraw.remove(), this._mapDraw = null; t.get("showLegendSymbol") && n.getComponent("legend") && this._renderSymbols(t, n, i); } } }, e.prototype.remove = function() { this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll(); }, e.prototype.dispose = function() { this._mapDraw && this._mapDraw.remove(), this._mapDraw = null; }, e.prototype._renderSymbols = function(t, n, i) { var a = t.originalData, o = this.group; a.each(a.mapDimension("value"), function(s, u) { if (!isNaN(s)) { var l = a.getItemLayout(u); if (!(!l || !l.point)) { var c = l.point, f = l.offset, h = new rc({ style: { fill: t.getData().getVisual("style").fill }, shape: { cx: c[0] + f * 9, cy: c[1], r: 3 }, silent: !0, z2: 8 + (f ? 0 : wy + 1) }); if (!f) { var p = t.mainSeries.getData(), d = a.getName(u), v = p.indexOfName(d), g = a.getItemModel(u), m = g.getModel("label"), y = p.getItemGraphicEl(v); no(h, wa(g), { labelFetcher: { getFormattedLabel: function(_, w) { return t.getFormattedLabel(v, w); } }, defaultText: d }), h.disableLabelAnimation = !0, m.get("position") || h.setTextConfig({ position: "bottom" }), y.onHoverStateChange = function(_) { dE(h, _); }; } o.add(h); } } }); }, e.type = "map", e; }(an); const xFe = wFe; var CFe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.needsDrawMap = !1, t.seriesGroup = [], t.getTooltipPosition = function(n) { if (n != null) { var i = this.getData().getName(n), a = this.coordinateSystem, o = a.getRegion(i); return o && a.dataToPoint(o.getCenter()); } }, t; } return e.prototype.getInitialData = function(t) { for (var n = Ry(this, { coordDimensions: ["value"], encodeDefaulter: ut(cF, this) }), i = $e(), a = [], o = 0, s = n.count(); o < s; o++) { var u = n.getName(o); i.set(u, !0); } var l = lf.load(this.getMapType(), this.option.nameMap, this.option.nameProperty); return M(l.regions, function(c) { var f = c.name; i.get(f) || a.push(f); }), n.appendValues([], a), n; }, e.prototype.getHostGeoModel = function() { var t = this.option.geoIndex; return t != null ? this.ecModel.getComponent("geo", t) : null; }, e.prototype.getMapType = function() { return (this.getHostGeoModel() || this).option.map; }, e.prototype.getRawValue = function(t) { var n = this.getData(); return n.get(n.mapDimension("value"), t); }, e.prototype.getRegionModel = function(t) { var n = this.getData(); return n.getItemModel(n.indexOfName(t)); }, e.prototype.formatTooltip = function(t, n, i) { for (var a = this.getData(), o = this.getRawValue(t), s = a.getName(t), u = this.seriesGroup, l = [], c = 0; c < u.length; c++) { var f = u[c].originalData.indexOfName(s), h = a.mapDimension("value"); isNaN(u[c].originalData.get(h, f)) || l.push(u[c].name); } return Ji("section", { header: l.join(", "), noHeader: !l.length, blocks: [Ji("nameValue", { name: s, value: o })] }); }, e.prototype.setZoom = function(t) { this.option.zoom = t; }, e.prototype.setCenter = function(t) { this.option.center = t; }, e.prototype.getLegendIcon = function(t) { var n = t.icon || "roundRect", i = vi(n, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill); return i.setStyle(t.itemStyle), i.style.stroke = "none", n.indexOf("empty") > -1 && (i.style.stroke = i.style.fill, i.style.fill = "#fff", i.style.lineWidth = 2), i; }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = { z: 2, coordinateSystem: "geo", map: "", left: "center", top: "center", aspectScale: null, showLegendSymbol: !0, boundingCoords: null, center: null, zoom: 1, scaleLimit: null, selectedMode: !0, label: { show: !1, color: "#000" }, itemStyle: { borderWidth: 0.5, borderColor: "#444", areaColor: "#eee" }, emphasis: { label: { show: !0, color: "rgb(100,0,0)" }, itemStyle: { areaColor: "rgba(255,215,0,0.8)" } }, select: { label: { show: !0, color: "rgb(100,0,0)" }, itemStyle: { color: "rgba(255,215,0,0.8)" } }, nameProperty: "name" }, e; }(bn); const SFe = CFe; function EFe(r, e) { var t = {}; return M(r, function(n) { n.each(n.mapDimension("value"), function(i, a) { var o = "ec-" + n.getName(a); t[o] = t[o] || [], isNaN(i) || t[o].push(i); }); }), r[0].map(r[0].mapDimension("value"), function(n, i) { for (var a = "ec-" + r[0].getName(i), o = 0, s = 1 / 0, u = -1 / 0, l = t[a].length, c = 0; c < l; c++) s = Math.min(s, t[a][c]), u = Math.max(u, t[a][c]), o += t[a][c]; var f; return e === "min" ? f = s : e === "max" ? f = u : e === "average" ? f = o / l : f = o, l === 0 ? NaN : f; }); } function bFe(r) { var e = {}; r.eachSeriesByType("map", function(t) { var n = t.getHostGeoModel(), i = n ? "o" + n.id : "i" + t.getMapType(); (e[i] = e[i] || []).push(t); }), M(e, function(t, n) { for (var i = EFe(ce(t, function(o) { return o.getData(); }), t[0].get("mapValueCalculation")), a = 0; a < t.length; a++) t[a].originalData = t[a].getData(); for (var a = 0; a < t.length; a++) t[a].seriesGroup = t, t[a].needsDrawMap = a === 0 && !t[a].getHostGeoModel(), t[a].setData(i.cloneShallow()), t[a].mainSeries = t[0]; }); } function TFe(r) { var e = {}; r.eachSeriesByType("map", function(t) { var n = t.getMapType(); if (!(t.getHostGeoModel() || e[n])) { var i = {}; M(t.seriesGroup, function(o) { var s = o.coordinateSystem, u = o.originalData; o.get("showLegendSymbol") && r.getComponent("legend") && u.each(u.mapDimension("value"), function(l, c) { var f = u.getName(c), h = s.getRegion(f); if (!(!h || isNaN(l))) { var p = i[f] || 0, d = s.dataToPoint(h.getCenter()); i[f] = p + 1, u.setItemLayout(c, { point: d, offset: p }); } }); }); var a = t.getData(); a.each(function(o) { var s = a.getName(o), u = a.getItemLayout(o) || {}; u.showLabel = !i[s], a.setItemLayout(o, u); }), e[n] = !0; } }); } var $z = Ia, PFe = function(r) { W(e, r); function e(t) { var n = r.call(this) || this; return n.type = "view", n.dimensions = ["x", "y"], n._roamTransformable = new Ic(), n._rawTransformable = new Ic(), n.name = t, n; } return e.prototype.setBoundingRect = function(t, n, i, a) { return this._rect = new gt(t, n, i, a), this._rect; }, e.prototype.getBoundingRect = function() { return this._rect; }, e.prototype.setViewRect = function(t, n, i, a) { this._transformTo(t, n, i, a), this._viewRect = new gt(t, n, i, a); }, e.prototype._transformTo = function(t, n, i, a) { var o = this.getBoundingRect(), s = this._rawTransformable; s.transform = o.calculateTransform(new gt(t, n, i, a)); var u = s.parent; s.parent = null, s.decomposeTransform(), s.parent = u, this._updateTransform(); }, e.prototype.setCenter = function(t, n) { !t || (this._center = [ye(t[0], n.getWidth()), ye(t[1], n.getHeight())], this._updateCenterAndZoom()); }, e.prototype.setZoom = function(t) { t = t || 1; var n = this.zoomLimit; n && (n.max != null && (t = Math.min(n.max, t)), n.min != null && (t = Math.max(n.min, t))), this._zoom = t, this._updateCenterAndZoom(); }, e.prototype.getDefaultCenter = function() { var t = this.getBoundingRect(), n = t.x + t.width / 2, i = t.y + t.height / 2; return [n, i]; }, e.prototype.getCenter = function() { return this._center || this.getDefaultCenter(); }, e.prototype.getZoom = function() { return this._zoom || 1; }, e.prototype.getRoamTransform = function() { return this._roamTransformable.getLocalTransform(); }, e.prototype._updateCenterAndZoom = function() { var t = this._rawTransformable.getLocalTransform(), n = this._roamTransformable, i = this.getDefaultCenter(), a = this.getCenter(), o = this.getZoom(); a = Ia([], a, t), i = Ia([], i, t), n.originX = a[0], n.originY = a[1], n.x = i[0] - a[0], n.y = i[1] - a[1], n.scaleX = n.scaleY = o, this._updateTransform(); }, e.prototype._updateTransform = function() { var t = this._roamTransformable, n = this._rawTransformable; n.parent = t, t.updateTransform(), n.updateTransform(), VN(this.transform || (this.transform = []), n.transform || xs()), this._rawTransform = n.getLocalTransform(), this.invTransform = this.invTransform || [], yy(this.invTransform, this.transform), this.decomposeTransform(); }, e.prototype.getTransformInfo = function() { var t = this._rawTransformable, n = this._roamTransformable, i = new Ic(); return i.transform = n.transform, i.decomposeTransform(), { roam: { x: i.x, y: i.y, scaleX: i.scaleX, scaleY: i.scaleY }, raw: { x: t.x, y: t.y, scaleX: t.scaleX, scaleY: t.scaleY } }; }, e.prototype.getViewRect = function() { return this._viewRect; }, e.prototype.getViewRectAfterRoam = function() { var t = this.getBoundingRect().clone(); return t.applyTransform(this.transform), t; }, e.prototype.dataToPoint = function(t, n, i) { var a = n ? this._rawTransform : this.transform; return i = i || [], a ? $z(i, t, a) : oo(i, t); }, e.prototype.pointToData = function(t) { var n = this.invTransform; return n ? $z([], t, n) : [t[0], t[1]]; }, e.prototype.convertToPixel = function(t, n, i) { var a = Hz(n); return a === this ? a.dataToPoint(i) : null; }, e.prototype.convertFromPixel = function(t, n, i) { var a = Hz(n); return a === this ? a.pointToData(i) : null; }, e.prototype.containPoint = function(t) { return this.getViewRectAfterRoam().contain(t[0], t[1]); }, e.dimensions = ["x", "y"], e; }(Ic); function Hz(r) { var e = r.seriesModel; return e ? e.coordinateSystem : null; } const qw = PFe; var IFe = { geoJSON: { aspectScale: 0.75, invertLongitute: !0 }, geoSVG: { aspectScale: 1, invertLongitute: !1 } }, PQ = ["lng", "lat"], IQ = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this, t) || this; a.dimensions = PQ, a.type = "geo", a._nameCoordMap = $e(), a.map = n; var o = i.projection, s = lf.load(n, i.nameMap, i.nameProperty), u = lf.getGeoResource(n), l = a.resourceType = u ? u.type : null, c = a.regions = s.regions, f = IFe[u.type]; a._regionsMap = s.regionsMap, a.regions = s.regions, process.env.NODE_ENV !== "production" && o && (l === "geoSVG" && (process.env.NODE_ENV !== "production" && to("Map " + n + " with SVG source can't use projection. Only GeoJSON source supports projection."), o = null), o.project && o.unproject || (process.env.NODE_ENV !== "production" && to("project and unproject must be both provided in the projeciton."), o = null)), a.projection = o; var h; if (o) for (var p = 0; p < c.length; p++) { var d = c[p].getBoundingRect(o); h = h || d.clone(), h.union(d); } else h = s.boundingRect; return a.setBoundingRect(h.x, h.y, h.width, h.height), a.aspectScale = o ? 1 : wt(i.aspectScale, f.aspectScale), a._invertLongitute = o ? !1 : f.invertLongitute, a; } return e.prototype._transformTo = function(t, n, i, a) { var o = this.getBoundingRect(), s = this._invertLongitute; o = o.clone(), s && (o.y = -o.y - o.height); var u = this._rawTransformable; u.transform = o.calculateTransform(new gt(t, n, i, a)); var l = u.parent; u.parent = null, u.decomposeTransform(), u.parent = l, s && (u.scaleY = -u.scaleY), this._updateTransform(); }, e.prototype.getRegion = function(t) { return this._regionsMap.get(t); }, e.prototype.getRegionByCoord = function(t) { for (var n = this.regions, i = 0; i < n.length; i++) { var a = n[i]; if (a.type === "geoJSON" && a.contain(t)) return n[i]; } }, e.prototype.addGeoCoord = function(t, n) { this._nameCoordMap.set(t, n); }, e.prototype.getGeoCoord = function(t) { var n = this._regionsMap.get(t); return this._nameCoordMap.get(t) || n && n.getCenter(); }, e.prototype.dataToPoint = function(t, n, i) { if (Se(t) && (t = this.getGeoCoord(t)), t) { var a = this.projection; return a && (t = a.project(t)), t && this.projectedToPoint(t, n, i); } }, e.prototype.pointToData = function(t) { var n = this.projection; return n && (t = n.unproject(t)), t && this.pointToProjected(t); }, e.prototype.pointToProjected = function(t) { return r.prototype.pointToData.call(this, t); }, e.prototype.projectedToPoint = function(t, n, i) { return r.prototype.dataToPoint.call(this, t, n, i); }, e.prototype.convertToPixel = function(t, n, i) { var a = Uz(n); return a === this ? a.dataToPoint(i) : null; }, e.prototype.convertFromPixel = function(t, n, i) { var a = Uz(n); return a === this ? a.pointToData(i) : null; }, e; }(qw); gi(IQ, qw); function Uz(r) { var e = r.geoModel, t = r.seriesModel; return e ? e.coordinateSystem : t ? t.coordinateSystem || (t.getReferringComponents("geo", ui).models[0] || {}).coordinateSystem : null; } const Wz = IQ; function jz(r, e) { var t = r.get("boundingCoords"); if (t != null) { var n = t[0], i = t[1]; if (!(isFinite(n[0]) && isFinite(n[1]) && isFinite(i[0]) && isFinite(i[1]))) process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords"); else { var a = this.projection; if (a) { var o = n[0], s = n[1], u = i[0], l = i[1]; n = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0]; var c = function(C, S, b, E) { for (var T = b - C, P = E - S, I = 0; I <= 100; I++) { var A = I / 100, L = a.project([C + T * A, S + P * A]); Zf(n, n, L), Kf(i, i, L); } }; c(o, s, u, s), c(u, s, u, l), c(u, l, o, l), c(o, l, u, s); } this.setBoundingRect(n[0], n[1], i[0] - n[0], i[1] - n[1]); } } var f = this.getBoundingRect(), h = r.get("layoutCenter"), p = r.get("layoutSize"), d = e.getWidth(), v = e.getHeight(), g = f.width / f.height * this.aspectScale, m = !1, y, _; h && p && (y = [ye(h[0], d), ye(h[1], v)], _ = ye(p, Math.min(d, v)), !isNaN(y[0]) && !isNaN(y[1]) && !isNaN(_) ? m = !0 : process.env.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.")); var w; if (m) w = {}, g > 1 ? (w.width = _, w.height = _ / g) : (w.height = _, w.width = _ * g), w.y = y[1] - w.height / 2, w.x = y[0] - w.width / 2; else { var x = r.getBoxLayoutParams(); x.aspect = g, w = Bi(x, { width: d, height: v }); } this.setViewRect(w.x, w.y, w.width, w.height), this.setCenter(r.get("center"), e), this.setZoom(r.get("zoom")); } function AFe(r, e) { M(e.get("geoCoord"), function(t, n) { r.addGeoCoord(n, t); }); } var LFe = function() { function r() { this.dimensions = PQ; } return r.prototype.create = function(e, t) { var n = []; function i(o) { return { nameProperty: o.get("nameProperty"), aspectScale: o.get("aspectScale"), projection: o.get("projection") }; } e.eachComponent("geo", function(o, s) { var u = o.get("map"), l = new Wz(u + s, u, oe({ nameMap: o.get("nameMap") }, i(o))); l.zoomLimit = o.get("scaleLimit"), n.push(l), o.coordinateSystem = l, l.model = o, l.resize = jz, l.resize(o, t); }), e.eachSeries(function(o) { var s = o.get("coordinateSystem"); if (s === "geo") { var u = o.get("geoIndex") || 0; o.coordinateSystem = n[u]; } }); var a = {}; return e.eachSeriesByType("map", function(o) { if (!o.getHostGeoModel()) { var s = o.getMapType(); a[s] = a[s] || [], a[s].push(o); } }), M(a, function(o, s) { var u = ce(o, function(c) { return c.get("nameMap"); }), l = new Wz(s, s, oe({ nameMap: ON(u) }, i(o[0]))); l.zoomLimit = si.apply(null, ce(o, function(c) { return c.get("scaleLimit"); })), n.push(l), l.resize = jz, l.resize(o[0], t), M(o, function(c) { c.coordinateSystem = l, AFe(l, c); }); }), n; }, r.prototype.getFilledRegions = function(e, t, n, i) { for (var a = (e || []).slice(), o = $e(), s = 0; s < a.length; s++) o.set(a[s].name, a[s]); var u = lf.load(t, n, i); return M(u.regions, function(l) { var c = l.name; !o.get(c) && a.push({ name: c }); }), a; }, r; }(), DFe = new LFe(); const AQ = DFe; var MFe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t, n, i) { var a = lf.getGeoResource(t.map); if (a && a.type === "geoJSON") { var o = t.itemStyle = t.itemStyle || {}; "color" in o || (o.color = "#eee"); } this.mergeDefaultAndTheme(t, i), Vd(t, "label", ["show"]); }, e.prototype.optionUpdated = function() { var t = this, n = this.option; n.regions = AQ.getFilledRegions(n.regions, n.map, n.nameMap, n.nameProperty); var i = {}; this._optionModelMap = Kl(n.regions || [], function(a, o) { var s = o.name; return s && (a.set(s, new rn(o, t, t.ecModel)), o.selected && (i[s] = !0)), a; }, $e()), n.selectedMap || (n.selectedMap = i); }, e.prototype.getRegionModel = function(t) { return this._optionModelMap.get(t) || new rn(null, this, this.ecModel); }, e.prototype.getFormattedLabel = function(t, n) { var i = this.getRegionModel(t), a = n === "normal" ? i.get(["label", "formatter"]) : i.get(["emphasis", "label", "formatter"]), o = { name: t }; if (ze(a)) return o.status = n, a(o); if (Se(a)) return a.replace("{a}", t != null ? t : ""); }, e.prototype.setZoom = function(t) { this.option.zoom = t; }, e.prototype.setCenter = function(t) { this.option.center = t; }, e.prototype.select = function(t) { var n = this.option, i = n.selectedMode; if (!!i) { i !== "multiple" && (n.selectedMap = null); var a = n.selectedMap || (n.selectedMap = {}); a[t] = !0; } }, e.prototype.unSelect = function(t) { var n = this.option.selectedMap; n && (n[t] = !1); }, e.prototype.toggleSelected = function(t) { this[this.isSelected(t) ? "unSelect" : "select"](t); }, e.prototype.isSelected = function(t) { var n = this.option.selectedMap; return !!(n && n[t]); }, e.type = "geo", e.layoutMode = "box", e.defaultOption = { z: 0, show: !0, left: "center", top: "center", aspectScale: null, silent: !1, map: "", boundingCoords: null, center: null, zoom: 1, scaleLimit: null, label: { show: !1, color: "#000" }, itemStyle: { borderWidth: 0.5, borderColor: "#444" }, emphasis: { label: { show: !0, color: "rgb(100,0,0)" }, itemStyle: { color: "rgba(255,215,0,0.8)" } }, select: { label: { show: !0, color: "rgb(100,0,0)" }, itemStyle: { color: "rgba(255,215,0,0.8)" } }, regions: [] }, e; }(Rt); const OFe = MFe; function Yz(r, e) { return r.pointToProjected ? r.pointToProjected(e) : r.pointToData(e); } function jF(r, e, t, n) { var i = r.getZoom(), a = r.getCenter(), o = e.zoom, s = r.projectedToPoint ? r.projectedToPoint(a) : r.dataToPoint(a); if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, r.setCenter(Yz(r, s), n)), o != null) { if (t) { var u = t.min || 0, l = t.max || 1 / 0; o = Math.max(Math.min(i * o, l), u) / i; } r.scaleX *= o, r.scaleY *= o; var c = (e.originX - r.x) * (o - 1), f = (e.originY - r.y) * (o - 1); r.x -= c, r.y -= f, r.updateTransform(), r.setCenter(Yz(r, s), n), r.setZoom(o * i); } return { center: r.getCenter(), zoom: r.getZoom() }; } var RFe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.focusBlurEnabled = !0, t; } return e.prototype.init = function(t, n) { this._api = n; }, e.prototype.render = function(t, n, i, a) { if (this._model = t, !t.get("show")) { this._mapDraw && this._mapDraw.remove(), this._mapDraw = null; return; } this._mapDraw || (this._mapDraw = new TQ(i)); var o = this._mapDraw; o.draw(t, n, i, this, a), o.group.on("click", this._handleRegionClick, this), o.group.silent = t.get("silent"), this.group.add(o.group), this.updateSelectStatus(t, n, i); }, e.prototype._handleRegionClick = function(t) { var n; Og(t.target, function(i) { return (n = nt(i).eventData) != null; }, !0), n && this._api.dispatchAction({ type: "geoToggleSelect", geoId: this._model.id, name: n.name }); }, e.prototype.updateSelectStatus = function(t, n, i) { var a = this; this._mapDraw.group.traverse(function(o) { var s = nt(o).eventData; if (s) return a._model.isSelected(s.name) ? i.enterSelect(o) : i.leaveSelect(o), !0; }); }, e.prototype.findHighDownDispatchers = function(t) { return this._mapDraw && this._mapDraw.findHighDownDispatchers(t, this._model); }, e.prototype.dispose = function() { this._mapDraw && this._mapDraw.remove(); }, e.type = "geo", e; }(Gn); const NFe = RFe; function FFe(r, e, t) { lf.registerMap(r, e, t); } function LQ(r) { r.registerCoordinateSystem("geo", AQ), r.registerComponentModel(OFe), r.registerComponentView(NFe), r.registerImpl("registerMap", FFe), r.registerImpl("getMap", function(t) { return lf.getMapForUser(t); }); function e(t, n) { n.update = "geo:updateSelectStatus", r.registerAction(n, function(i, a) { var o = {}, s = []; return a.eachComponent({ mainType: "geo", query: i }, function(u) { u[t](i.name); var l = u.coordinateSystem; M(l.regions, function(f) { o[f.name] = u.isSelected(f.name) || !1; }); var c = []; M(o, function(f, h) { o[h] && c.push(h); }), s.push({ geoIndex: u.componentIndex, name: c }); }), { selected: o, allSelected: s, name: i.name }; }); } e("toggleSelected", { type: "geoToggleSelect", event: "geoselectchanged" }), e("select", { type: "geoSelect", event: "geoselected" }), e("unSelect", { type: "geoUnSelect", event: "geounselected" }), r.registerAction({ type: "geoRoam", event: "geoRoam", update: "updateTransform" }, function(t, n, i) { var a = t.componentType || "series"; n.eachComponent({ mainType: a, query: t }, function(o) { var s = o.coordinateSystem; if (s.type === "geo") { var u = jF(s, t, o.get("scaleLimit"), i); o.setCenter && o.setCenter(u.center), o.setZoom && o.setZoom(u.zoom), a === "series" && M(o.seriesGroup, function(l) { l.setCenter(u.center), l.setZoom(u.zoom); }); } }); }); } function BFe(r) { bt(LQ), r.registerChartView(xFe), r.registerSeriesModel(SFe), r.registerLayout(TFe), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, bFe), AK("map", r.registerAction); } function kFe(r) { var e = r; e.hierNode = { defaultAncestor: null, ancestor: e, prelim: 0, modifier: 0, change: 0, shift: 0, i: 0, thread: null }; for (var t = [e], n, i; n = t.pop(); ) if (i = n.children, n.isExpand && i.length) for (var a = i.length, o = a - 1; o >= 0; o--) { var s = i[o]; s.hierNode = { defaultAncestor: null, ancestor: s, prelim: 0, modifier: 0, change: 0, shift: 0, i: o, thread: null }, t.push(s); } } function VFe(r, e) { var t = r.isExpand ? r.children : [], n = r.parentNode.children, i = r.hierNode.i ? n[r.hierNode.i - 1] : null; if (t.length) { $Fe(r); var a = (t[0].hierNode.prelim + t[t.length - 1].hierNode.prelim) / 2; i ? (r.hierNode.prelim = i.hierNode.prelim + e(r, i), r.hierNode.modifier = r.hierNode.prelim - a) : r.hierNode.prelim = a; } else i && (r.hierNode.prelim = i.hierNode.prelim + e(r, i)); r.parentNode.hierNode.defaultAncestor = HFe(r, i, r.parentNode.hierNode.defaultAncestor || n[0], e); } function GFe(r) { var e = r.hierNode.prelim + r.parentNode.hierNode.modifier; r.setLayout({ x: e }, !0), r.hierNode.modifier += r.parentNode.hierNode.modifier; } function Xz(r) { return arguments.length ? r : jFe; } function J0(r, e) { return r -= Math.PI / 2, { x: e * Math.cos(r), y: e * Math.sin(r) }; } function zFe(r, e) { return Bi(r.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }); } function $Fe(r) { for (var e = r.children, t = e.length, n = 0, i = 0; --t >= 0; ) { var a = e[t]; a.hierNode.prelim += n, a.hierNode.modifier += n, i += a.hierNode.change, n += a.hierNode.shift + i; } } function HFe(r, e, t, n) { if (e) { for (var i = r, a = r, o = a.parentNode.children[0], s = e, u = i.hierNode.modifier, l = a.hierNode.modifier, c = o.hierNode.modifier, f = s.hierNode.modifier; s = UA(s), a = WA(a), s && a; ) { i = UA(i), o = WA(o), i.hierNode.ancestor = r; var h = s.hierNode.prelim + f - a.hierNode.prelim - l + n(s, a); h > 0 && (WFe(UFe(s, r, t), r, h), l += h, u += h), f += s.hierNode.modifier, l += a.hierNode.modifier, u += i.hierNode.modifier, c += o.hierNode.modifier; } s && !UA(i) && (i.hierNode.thread = s, i.hierNode.modifier += f - u), a && !WA(o) && (o.hierNode.thread = a, o.hierNode.modifier += l - c, t = r); } return t; } function UA(r) { var e = r.children; return e.length && r.isExpand ? e[e.length - 1] : r.hierNode.thread; } function WA(r) { var e = r.children; return e.length && r.isExpand ? e[0] : r.hierNode.thread; } function UFe(r, e, t) { return r.hierNode.ancestor.parentNode === e.parentNode ? r.hierNode.ancestor : t; } function WFe(r, e, t) { var n = t / (e.hierNode.i - r.hierNode.i); e.hierNode.change -= n, e.hierNode.shift += t, e.hierNode.modifier += t, e.hierNode.prelim += t, r.hierNode.change += n; } function jFe(r, e) { return r.parentNode === e.parentNode ? 1 : 2; } var YFe = function() { function r() { this.parentPoint = [], this.childPoints = []; } return r; }(), XFe = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new YFe(); }, e.prototype.buildPath = function(t, n) { var i = n.childPoints, a = i.length, o = n.parentPoint, s = i[0], u = i[a - 1]; if (a === 1) { t.moveTo(o[0], o[1]), t.lineTo(s[0], s[1]); return; } var l = n.orient, c = l === "TB" || l === "BT" ? 0 : 1, f = 1 - c, h = ye(n.forkPosition, 1), p = []; p[c] = o[c], p[f] = o[f] + (u[f] - o[f]) * h, t.moveTo(o[0], o[1]), t.lineTo(p[0], p[1]), t.moveTo(s[0], s[1]), p[c] = s[c], t.lineTo(p[0], p[1]), p[c] = u[c], t.lineTo(p[0], p[1]), t.lineTo(u[0], u[1]); for (var d = 1; d < a - 1; d++) { var v = i[d]; t.moveTo(v[0], v[1]), p[c] = v[c], t.lineTo(p[0], p[1]); } }, e; }(Tt), qFe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._mainGroup = new rt(), t; } return e.prototype.init = function(t, n) { this._controller = new Xw(n.getZr()), this._controllerHost = { target: this.group }, this.group.add(this._mainGroup); }, e.prototype.render = function(t, n, i) { var a = t.getData(), o = t.layoutInfo, s = this._mainGroup, u = t.get("layout"); u === "radial" ? (s.x = o.x + o.width / 2, s.y = o.y + o.height / 2) : (s.x = o.x, s.y = o.y), this._updateViewCoordSys(t, i), this._updateController(t, n, i); var l = this._data; a.diff(l).add(function(c) { qz(a, c) && Zz(a, c, null, s, t); }).update(function(c, f) { var h = l.getItemGraphicEl(f); if (!qz(a, c)) { h && Jz(l, f, h, s, t); return; } Zz(a, c, h, s, t); }).remove(function(c) { var f = l.getItemGraphicEl(c); f && Jz(l, c, f, s, t); }).execute(), this._nodeScaleRatio = t.get("nodeScaleRatio"), this._updateNodeAndLinkScale(t), t.get("expandAndCollapse") === !0 && a.eachItemGraphicEl(function(c, f) { c.off("click").on("click", function() { i.dispatchAction({ type: "treeExpandAndCollapse", seriesId: t.id, dataIndex: f }); }); }), this._data = a; }, e.prototype._updateViewCoordSys = function(t, n) { var i = t.getData(), a = []; i.each(function(f) { var h = i.getItemLayout(f); h && !isNaN(h.x) && !isNaN(h.y) && a.push([+h.x, +h.y]); }); var o = [], s = []; GT(a, o, s); var u = this._min, l = this._max; s[0] - o[0] === 0 && (o[0] = u ? u[0] : o[0] - 1, s[0] = l ? l[0] : s[0] + 1), s[1] - o[1] === 0 && (o[1] = u ? u[1] : o[1] - 1, s[1] = l ? l[1] : s[1] + 1); var c = t.coordinateSystem = new qw(); c.zoomLimit = t.get("scaleLimit"), c.setBoundingRect(o[0], o[1], s[0] - o[0], s[1] - o[1]), c.setCenter(t.get("center"), n), c.setZoom(t.get("zoom")), this.group.attr({ x: c.x, y: c.y, scaleX: c.scaleX, scaleY: c.scaleY }), this._min = o, this._max = s; }, e.prototype._updateController = function(t, n, i) { var a = this, o = this._controller, s = this._controllerHost, u = this.group; o.setPointerChecker(function(l, c, f) { var h = u.getBoundingRect(); return h.applyTransform(u.transform), h.contain(c, f) && !cP(l, i, t); }), o.enable(t.get("roam")), s.zoomLimit = t.get("scaleLimit"), s.zoom = t.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(l) { HF(s, l.dx, l.dy), i.dispatchAction({ seriesId: t.id, type: "treeRoam", dx: l.dx, dy: l.dy }); }).on("zoom", function(l) { UF(s, l.scale, l.originX, l.originY), i.dispatchAction({ seriesId: t.id, type: "treeRoam", zoom: l.scale, originX: l.originX, originY: l.originY }), a._updateNodeAndLinkScale(t), i.updateLabelLayout(); }); }, e.prototype._updateNodeAndLinkScale = function(t) { var n = t.getData(), i = this._getNodeGlobalScale(t); n.eachItemGraphicEl(function(a, o) { a.setSymbolScale(i); }); }, e.prototype._getNodeGlobalScale = function(t) { var n = t.coordinateSystem; if (n.type !== "view") return 1; var i = this._nodeScaleRatio, a = n.scaleX || 1, o = n.getZoom(), s = (o - 1) * i + 1; return s / a; }, e.prototype.dispose = function() { this._controller && this._controller.dispose(), this._controllerHost = null; }, e.prototype.remove = function() { this._mainGroup.removeAll(), this._data = null; }, e.type = "tree", e; }(an); function qz(r, e) { var t = r.getItemLayout(e); return t && !isNaN(t.x) && !isNaN(t.y); } function Zz(r, e, t, n, i) { var a = !t, o = r.tree.getNodeByDataIndex(e), s = o.getModel(), u = o.getVisual("style").fill, l = o.isExpand === !1 && o.children.length !== 0 ? u : "#fff", c = r.tree.root, f = o.parentNode === c ? o : o.parentNode || o, h = r.getItemGraphicEl(f.dataIndex), p = f.getLayout(), d = h ? { x: h.__oldX, y: h.__oldY, rawX: h.__radialOldRawX, rawY: h.__radialOldRawY } : p, v = o.getLayout(); a ? (t = new Hw(r, e, null, { symbolInnerColor: l, useNameLabel: !0 }), t.x = d.x, t.y = d.y) : t.updateData(r, e, null, { symbolInnerColor: l, useNameLabel: !0 }), t.__radialOldRawX = t.__radialRawX, t.__radialOldRawY = t.__radialRawY, t.__radialRawX = v.rawX, t.__radialRawY = v.rawY, n.add(t), r.setItemGraphicEl(e, t), t.__oldX = t.x, t.__oldY = t.y, Ht(t, { x: v.x, y: v.y }, i); var g = t.getSymbolPath(); if (i.get("layout") === "radial") { var m = c.children[0], y = m.getLayout(), _ = m.children.length, w = void 0, x = void 0; if (v.x === y.x && o.isExpand === !0 && m.children.length) { var C = { x: (m.children[0].getLayout().x + m.children[_ - 1].getLayout().x) / 2, y: (m.children[0].getLayout().y + m.children[_ - 1].getLayout().y) / 2 }; w = Math.atan2(C.y - y.y, C.x - y.x), w < 0 && (w = Math.PI * 2 + w), x = C.x < y.x, x && (w = w - Math.PI); } else w = Math.atan2(v.y - y.y, v.x - y.x), w < 0 && (w = Math.PI * 2 + w), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (x = v.x < y.x, x && (w = w - Math.PI)) : (x = v.x > y.x, x || (w = w - Math.PI)); var S = x ? "left" : "right", b = s.getModel("label"), E = b.get("rotate"), T = E * (Math.PI / 180), P = g.getTextContent(); P && (g.setTextConfig({ position: b.get("position") || S, rotation: E == null ? -w : T, origin: "center" }), P.setStyle("verticalAlign", "middle")); } var I = s.get(["emphasis", "focus"]), A = I === "relative" ? iE(o.getAncestorsIndices(), o.getDescendantIndices()) : I === "ancestor" ? o.getAncestorsIndices() : I === "descendant" ? o.getDescendantIndices() : null; A && (nt(t).focus = A), ZFe(i, o, c, t, d, p, v, n), t.__edge && (t.onHoverStateChange = function(L) { if (L !== "blur") { var D = o.parentNode && r.getItemGraphicEl(o.parentNode.dataIndex); D && D.hoverState === Rw || dE(t.__edge, L); } }); } function ZFe(r, e, t, n, i, a, o, s) { var u = e.getModel(), l = r.get("edgeShape"), c = r.get("layout"), f = r.getOrient(), h = r.get(["lineStyle", "curveness"]), p = r.get("edgeForkPosition"), d = u.getModel("lineStyle").getLineStyle(), v = n.__edge; if (l === "curve") e.parentNode && e.parentNode !== t && (v || (v = n.__edge = new UT({ shape: x2(c, f, h, i, i) })), Ht(v, { shape: x2(c, f, h, a, o) }, r)); else if (l === "polyline") { if (c === "orthogonal") { if (e !== t && e.children && e.children.length !== 0 && e.isExpand === !0) { for (var g = e.children, m = [], y = 0; y < g.length; y++) { var _ = g[y].getLayout(); m.push([_.x, _.y]); } v || (v = n.__edge = new XFe({ shape: { parentPoint: [o.x, o.y], childPoints: [[o.x, o.y]], orient: f, forkPosition: p } })), Ht(v, { shape: { parentPoint: [o.x, o.y], childPoints: m } }, r); } } else if (process.env.NODE_ENV !== "production") throw new Error("The polyline edgeShape can only be used in orthogonal layout"); } v && !(l === "polyline" && !e.isExpand) && (v.useStyle(qe({ strokeNoScale: !0, fill: null }, d)), Ra(v, u, "lineStyle"), $d(v), s.add(v)); } function Kz(r, e, t, n, i) { var a = e.tree.root, o = DQ(a, r), s = o.source, u = o.sourceLayout, l = e.getItemGraphicEl(r.dataIndex); if (!!l) { var c = e.getItemGraphicEl(s.dataIndex), f = c.__edge, h = l.__edge || (s.isExpand === !1 || s.children.length === 1 ? f : void 0), p = n.get("edgeShape"), d = n.get("layout"), v = n.get("orient"), g = n.get(["lineStyle", "curveness"]); h && (p === "curve" ? Rh(h, { shape: x2(d, v, g, u, u), style: { opacity: 0 } }, n, { cb: function() { t.remove(h); }, removeOpt: i }) : p === "polyline" && n.get("layout") === "orthogonal" && Rh(h, { shape: { parentPoint: [u.x, u.y], childPoints: [[u.x, u.y]] }, style: { opacity: 0 } }, n, { cb: function() { t.remove(h); }, removeOpt: i })); } } function DQ(r, e) { for (var t = e.parentNode === r ? e : e.parentNode || e, n; n = t.getLayout(), n == null; ) t = t.parentNode === r ? t : t.parentNode || t; return { source: t, sourceLayout: n }; } function Jz(r, e, t, n, i) { var a = r.tree.getNodeByDataIndex(e), o = r.tree.root, s = DQ(o, a).sourceLayout, u = { duration: i.get("animationDurationUpdate"), easing: i.get("animationEasingUpdate") }; Rh(t, { x: s.x + 1, y: s.y + 1 }, i, { cb: function() { n.remove(t), r.setItemGraphicEl(e, null); }, removeOpt: u }), t.fadeOut(null, r.hostModel, { fadeLabel: !0, animation: u }), a.children.forEach(function(l) { Kz(l, r, n, i, u); }), Kz(a, r, n, i, u); } function x2(r, e, t, n, i) { var a, o, s, u, l, c, f, h; if (r === "radial") { l = n.rawX, f = n.rawY, c = i.rawX, h = i.rawY; var p = J0(l, f), d = J0(l, f + (h - f) * t), v = J0(c, h + (f - h) * t), g = J0(c, h); return { x1: p.x || 0, y1: p.y || 0, x2: g.x || 0, y2: g.y || 0, cpx1: d.x || 0, cpy1: d.y || 0, cpx2: v.x || 0, cpy2: v.y || 0 }; } else l = n.x, f = n.y, c = i.x, h = i.y, (e === "LR" || e === "RL") && (a = l + (c - l) * t, o = f, s = c + (l - c) * t, u = h), (e === "TB" || e === "BT") && (a = l, o = f + (h - f) * t, s = c, u = h + (f - h) * t); return { x1: l, y1: f, x2: c, y2: h, cpx1: a, cpy1: o, cpx2: s, cpy2: u }; } const KFe = qFe; var ru = Ut(); function MQ(r) { var e = r.mainData, t = r.datas; t || (t = { main: e }, r.datasAttr = { main: "data" }), r.datas = r.mainData = null, OQ(e, t, r), M(t, function(n) { M(e.TRANSFERABLE_METHODS, function(i) { n.wrapMethod(i, ut(JFe, r)); }); }), e.wrapMethod("cloneShallow", ut(e5e, r)), M(e.CHANGABLE_METHODS, function(n) { e.wrapMethod(n, ut(QFe, r)); }), Ze(t[e.dataType] === e); } function JFe(r, e) { if (n5e(this)) { var t = oe({}, ru(this).datas); t[this.dataType] = e, OQ(e, t, r); } else YF(e, this.dataType, ru(this).mainData, r); return e; } function QFe(r, e) { return r.struct && r.struct.update(), e; } function e5e(r, e) { return M(ru(e).datas, function(t, n) { t !== e && YF(t.cloneShallow(), n, e, r); }), e; } function t5e(r) { var e = ru(this).mainData; return r == null || e == null ? e : ru(e).datas[r]; } function r5e() { var r = ru(this).mainData; return r == null ? [{ data: r }] : ce(At(ru(r).datas), function(e) { return { type: e, data: ru(r).datas[e] }; }); } function n5e(r) { return ru(r).mainData === r; } function OQ(r, e, t) { ru(r).datas = {}, M(e, function(n, i) { YF(n, i, r, t); }); } function YF(r, e, t, n) { ru(t).datas[e] = r, ru(r).mainData = t, r.dataType = e, n.struct && (r[n.structAttr] = n.struct, n.struct[n.datasAttr[e]] = r), r.getLinkedData = t5e, r.getLinkedDataAll = r5e; } var i5e = function() { function r(e, t) { this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = t; } return r.prototype.isRemoved = function() { return this.dataIndex < 0; }, r.prototype.eachNode = function(e, t, n) { ze(e) && (n = t, t = e, e = null), e = e || {}, Se(e) && (e = { order: e }); var i = e.order || "preorder", a = this[e.attr || "children"], o; i === "preorder" && (o = t.call(n, this)); for (var s = 0; !o && s < a.length; s++) a[s].eachNode(e, t, n); i === "postorder" && t.call(n, this); }, r.prototype.updateDepthAndHeight = function(e) { var t = 0; this.depth = e; for (var n = 0; n < this.children.length; n++) { var i = this.children[n]; i.updateDepthAndHeight(e + 1), i.height > t && (t = i.height); } this.height = t + 1; }, r.prototype.getNodeById = function(e) { if (this.getId() === e) return this; for (var t = 0, n = this.children, i = n.length; t < i; t++) { var a = n[t].getNodeById(e); if (a) return a; } }, r.prototype.contains = function(e) { if (e === this) return !0; for (var t = 0, n = this.children, i = n.length; t < i; t++) { var a = n[t].contains(e); if (a) return a; } }, r.prototype.getAncestors = function(e) { for (var t = [], n = e ? this : this.parentNode; n; ) t.push(n), n = n.parentNode; return t.reverse(), t; }, r.prototype.getAncestorsIndices = function() { for (var e = [], t = this; t; ) e.push(t.dataIndex), t = t.parentNode; return e.reverse(), e; }, r.prototype.getDescendantIndices = function() { var e = []; return this.eachNode(function(t) { e.push(t.dataIndex); }), e; }, r.prototype.getValue = function(e) { var t = this.hostTree.data; return t.getStore().get(t.getDimensionIndex(e || "value"), this.dataIndex); }, r.prototype.setLayout = function(e, t) { this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, t); }, r.prototype.getLayout = function() { return this.hostTree.data.getItemLayout(this.dataIndex); }, r.prototype.getModel = function(e) { if (!(this.dataIndex < 0)) { var t = this.hostTree, n = t.data.getItemModel(this.dataIndex); return n.getModel(e); } }, r.prototype.getLevelModel = function() { return (this.hostTree.levelModels || [])[this.depth]; }, r.prototype.setVisual = function(e, t) { this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, t); }, r.prototype.getVisual = function(e) { return this.hostTree.data.getItemVisual(this.dataIndex, e); }, r.prototype.getRawIndex = function() { return this.hostTree.data.getRawIndex(this.dataIndex); }, r.prototype.getId = function() { return this.hostTree.data.getId(this.dataIndex); }, r.prototype.getChildIndex = function() { if (this.parentNode) { for (var e = this.parentNode.children, t = 0; t < e.length; ++t) if (e[t] === this) return t; return -1; } return -1; }, r.prototype.isAncestorOf = function(e) { for (var t = e.parentNode; t; ) { if (t === this) return !0; t = t.parentNode; } return !1; }, r.prototype.isDescendantOf = function(e) { return e !== this && e.isAncestorOf(this); }, r; }(), a5e = function() { function r(e) { this.type = "tree", this._nodes = [], this.hostModel = e; } return r.prototype.eachNode = function(e, t, n) { this.root.eachNode(e, t, n); }, r.prototype.getNodeByDataIndex = function(e) { var t = this.data.getRawIndex(e); return this._nodes[t]; }, r.prototype.getNodeById = function(e) { return this.root.getNodeById(e); }, r.prototype.update = function() { for (var e = this.data, t = this._nodes, n = 0, i = t.length; n < i; n++) t[n].dataIndex = -1; for (var n = 0, i = e.count(); n < i; n++) t[e.getRawIndex(n)].dataIndex = n; }, r.prototype.clearLayouts = function() { this.data.clearItemLayouts(); }, r.createTree = function(e, t, n) { var i = new r(t), a = [], o = 1; s(e); function s(c, f) { var h = c.value; o = Math.max(o, le(h) ? h.length : 1), a.push(c); var p = new i5e(Li(c.name, ""), i); f ? o5e(p, f) : i.root = p, i._nodes.push(p); var d = c.children; if (d) for (var v = 0; v < d.length; v++) s(d[v], p); } i.root.updateDepthAndHeight(0); var u = Gw(a, { coordDimensions: ["value"], dimensionsCount: o }).dimensions, l = new ho(u, t); return l.initData(a), n && n(l), MQ({ mainData: l, struct: i, structAttr: "tree" }), i.update(), i; }, r; }(); function o5e(r, e) { var t = e.children; r.parentNode !== e && (t.push(r), r.parentNode = e); } const XF = a5e; function I1(r, e, t) { if (r && _t(e, r.type) >= 0) { var n = t.getData().tree.root, i = r.targetNode; if (Se(i) && (i = n.getNodeById(i)), i && n.contains(i)) return { node: i }; var a = r.targetNodeId; if (a != null && (i = n.getNodeById(a))) return { node: i }; } } function RQ(r) { for (var e = []; r; ) r = r.parentNode, r && e.push(r); return e.reverse(); } function qF(r, e) { var t = RQ(r); return _t(t, e) >= 0; } function hP(r, e) { for (var t = []; r; ) { var n = r.dataIndex; t.push({ name: r.name, dataIndex: n, value: e.getRawValue(n) }), r = r.parentNode; } return t.reverse(), t; } var s5e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.hasSymbolVisual = !0, t.ignoreStyleOnData = !0, t; } return e.prototype.getInitialData = function(t) { var n = { name: t.name, children: t.data }, i = t.leaves || {}, a = new rn(i, this, this.ecModel), o = XF.createTree(n, this, s); function s(f) { f.wrapMethod("getItemModel", function(h, p) { var d = o.getNodeByDataIndex(p); return d && d.children.length && d.isExpand || (h.parentModel = a), h; }); } var u = 0; o.eachNode("preorder", function(f) { f.depth > u && (u = f.depth); }); var l = t.expandAndCollapse, c = l && t.initialTreeDepth >= 0 ? t.initialTreeDepth : u; return o.root.eachNode("preorder", function(f) { var h = f.hostTree.data.getRawDataItem(f.dataIndex); f.isExpand = h && h.collapsed != null ? !h.collapsed : f.depth <= c; }), o.data; }, e.prototype.getOrient = function() { var t = this.get("orient"); return t === "horizontal" ? t = "LR" : t === "vertical" && (t = "TB"), t; }, e.prototype.setZoom = function(t) { this.option.zoom = t; }, e.prototype.setCenter = function(t) { this.option.center = t; }, e.prototype.formatTooltip = function(t, n, i) { for (var a = this.getData().tree, o = a.root.children[0], s = a.getNodeByDataIndex(t), u = s.getValue(), l = s.name; s && s !== o; ) l = s.parentNode.name + "." + l, s = s.parentNode; return Ji("nameValue", { name: l, value: u, noValue: isNaN(u) || u == null }); }, e.prototype.getDataParams = function(t) { var n = r.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(t); return n.treeAncestors = hP(i, this), n.collapsed = !i.isExpand, n; }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = { z: 2, coordinateSystem: "view", left: "12%", top: "12%", right: "12%", bottom: "12%", layout: "orthogonal", edgeShape: "curve", edgeForkPosition: "50%", roam: !1, nodeScaleRatio: 0.4, center: null, zoom: 1, orient: "LR", symbol: "emptyCircle", symbolSize: 7, expandAndCollapse: !0, initialTreeDepth: 2, lineStyle: { color: "#ccc", width: 1.5, curveness: 0.5 }, itemStyle: { color: "lightsteelblue", borderWidth: 1.5 }, label: { show: !0 }, animationEasing: "linear", animationDuration: 700, animationDurationUpdate: 500 }, e; }(bn); const u5e = s5e; function l5e(r, e, t) { for (var n = [r], i = [], a; a = n.pop(); ) if (i.push(a), a.isExpand) { var o = a.children; if (o.length) for (var s = 0; s < o.length; s++) n.push(o[s]); } for (; a = i.pop(); ) e(a, t); } function _0(r, e) { for (var t = [r], n; n = t.pop(); ) if (e(n), n.isExpand) { var i = n.children; if (i.length) for (var a = i.length - 1; a >= 0; a--) t.push(i[a]); } } function c5e(r, e) { r.eachSeriesByType("tree", function(t) { f5e(t, e); }); } function f5e(r, e) { var t = zFe(r, e); r.layoutInfo = t; var n = r.get("layout"), i = 0, a = 0, o = null; n === "radial" ? (i = 2 * Math.PI, a = Math.min(t.height, t.width) / 2, o = Xz(function(_, w) { return (_.parentNode === w.parentNode ? 1 : 2) / _.depth; })) : (i = t.width, a = t.height, o = Xz()); var s = r.getData().tree.root, u = s.children[0]; if (u) { kFe(s), l5e(u, VFe, o), s.hierNode.modifier = -u.hierNode.prelim, _0(u, GFe); var l = u, c = u, f = u; _0(u, function(_) { var w = _.getLayout().x; w < l.getLayout().x && (l = _), w > c.getLayout().x && (c = _), _.depth > f.depth && (f = _); }); var h = l === c ? 1 : o(l, c) / 2, p = h - l.getLayout().x, d = 0, v = 0, g = 0, m = 0; if (n === "radial") d = i / (c.getLayout().x + h + p), v = a / (f.depth - 1 || 1), _0(u, function(_) { g = (_.getLayout().x + p) * d, m = (_.depth - 1) * v; var w = J0(g, m); _.setLayout({ x: w.x, y: w.y, rawX: g, rawY: m }, !0); }); else { var y = r.getOrient(); y === "RL" || y === "LR" ? (v = a / (c.getLayout().x + h + p), d = i / (f.depth - 1 || 1), _0(u, function(_) { m = (_.getLayout().x + p) * v, g = y === "LR" ? (_.depth - 1) * d : i - (_.depth - 1) * d, _.setLayout({ x: g, y: m }, !0); })) : (y === "TB" || y === "BT") && (d = i / (c.getLayout().x + h + p), v = a / (f.depth - 1 || 1), _0(u, function(_) { g = (_.getLayout().x + p) * d, m = y === "TB" ? (_.depth - 1) * v : a - (_.depth - 1) * v, _.setLayout({ x: g, y: m }, !0); })); } } } function h5e(r) { r.eachSeriesByType("tree", function(e) { var t = e.getData(), n = t.tree; n.eachNode(function(i) { var a = i.getModel(), o = a.getModel("itemStyle").getItemStyle(), s = t.ensureUniqueItemVisual(i.dataIndex, "style"); oe(s, o); }); }); } function p5e(r) { r.registerAction({ type: "treeExpandAndCollapse", event: "treeExpandAndCollapse", update: "update" }, function(e, t) { t.eachComponent({ mainType: "series", subType: "tree", query: e }, function(n) { var i = e.dataIndex, a = n.getData().tree, o = a.getNodeByDataIndex(i); o.isExpand = !o.isExpand; }); }), r.registerAction({ type: "treeRoam", event: "treeRoam", update: "none" }, function(e, t, n) { t.eachComponent({ mainType: "series", subType: "tree", query: e }, function(i) { var a = i.coordinateSystem, o = jF(a, e, void 0, n); i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom); }); }); } function d5e(r) { r.registerChartView(KFe), r.registerSeriesModel(u5e), r.registerLayout(c5e), r.registerVisual(h5e), p5e(r); } var Qz = ["treemapZoomToNode", "treemapRender", "treemapMove"]; function v5e(r) { for (var e = 0; e < Qz.length; e++) r.registerAction({ type: Qz[e], update: "updateView" }, ci); r.registerAction({ type: "treemapRootToNode", update: "updateView" }, function(t, n) { n.eachComponent({ mainType: "series", subType: "treemap", query: t }, i); function i(a, o) { var s = ["treemapZoomToNode", "treemapRootToNode"], u = I1(t, s, a); if (u) { var l = a.getViewRoot(); l && (t.direction = qF(l, u.node) ? "rollUp" : "drillDown"), a.resetViewRoot(u.node); } } }); } function NQ(r) { var e = r.getData(), t = e.tree, n = {}; t.eachNode(function(i) { for (var a = i; a && a.depth > 1; ) a = a.parentNode; var o = ZM(r.ecModel, a.name || a.dataIndex + "", n); i.setVisual("decal", o); }); } var g5e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.preventUsingHoverLayer = !0, t; } return e.prototype.getInitialData = function(t, n) { var i = { name: t.name, children: t.data }; FQ(i); var a = t.levels || [], o = this.designatedVisualItemStyle = {}, s = new rn({ itemStyle: o }, this, n); a = t.levels = m5e(a, n); var u = ce(a || [], function(f) { return new rn(f, s, n); }, this), l = XF.createTree(i, this, c); function c(f) { f.wrapMethod("getItemModel", function(h, p) { var d = l.getNodeByDataIndex(p), v = d ? u[d.depth] : null; return h.parentModel = v || s, h; }); } return l.data; }, e.prototype.optionUpdated = function() { this.resetViewRoot(); }, e.prototype.formatTooltip = function(t, n, i) { var a = this.getData(), o = this.getRawValue(t), s = a.getName(t); return Ji("nameValue", { name: s, value: o }); }, e.prototype.getDataParams = function(t) { var n = r.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(t); return n.treeAncestors = hP(i, this), n.treePathInfo = n.treeAncestors, n; }, e.prototype.setLayoutInfo = function(t) { this.layoutInfo = this.layoutInfo || {}, oe(this.layoutInfo, t); }, e.prototype.mapIdToIndex = function(t) { var n = this._idIndexMap; n || (n = this._idIndexMap = $e(), this._idIndexMapCount = 0); var i = n.get(t); return i == null && n.set(t, i = this._idIndexMapCount++), i; }, e.prototype.getViewRoot = function() { return this._viewRoot; }, e.prototype.resetViewRoot = function(t) { t ? this._viewRoot = t : t = this._viewRoot; var n = this.getRawData().tree.root; (!t || t !== n && !n.contains(t)) && (this._viewRoot = n); }, e.prototype.enableAriaDecal = function() { NQ(this); }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = { progressive: 0, left: "center", top: "middle", width: "80%", height: "80%", sort: !0, clipWindow: "origin", squareRatio: 0.5 * (1 + Math.sqrt(5)), leafDepth: null, drillDownIcon: "\u25B6", zoomToNodeRatio: 0.32 * 0.32, roam: !0, nodeClick: "zoomToNode", animation: !0, animationDurationUpdate: 900, animationEasing: "quinticInOut", breadcrumb: { show: !0, height: 22, left: "center", top: "bottom", emptyItemWidth: 25, itemStyle: { color: "rgba(0,0,0,0.7)", textStyle: { color: "#fff" } } }, label: { show: !0, distance: 0, padding: 5, position: "inside", color: "#fff", overflow: "truncate" }, upperLabel: { show: !1, position: [0, "50%"], height: 20, overflow: "truncate", verticalAlign: "middle" }, itemStyle: { color: null, colorAlpha: null, colorSaturation: null, borderWidth: 0, gapWidth: 0, borderColor: "#fff", borderColorSaturation: null }, emphasis: { upperLabel: { show: !0, position: [0, "50%"], overflow: "truncate", verticalAlign: "middle" } }, visualDimension: 0, visualMin: null, visualMax: null, color: [], colorAlpha: null, colorSaturation: null, colorMappingBy: "index", visibleMin: 10, childrenVisibleMin: null, levels: [] }, e; }(bn); function FQ(r) { var e = 0; M(r.children, function(n) { FQ(n); var i = n.value; le(i) && (i = i[0]), e += i; }); var t = r.value; le(t) && (t = t[0]), (t == null || isNaN(t)) && (t = e), t < 0 && (t = 0), le(r.value) ? r.value[0] = t : r.value = t; } function m5e(r, e) { var t = jr(e.get("color")), n = jr(e.get(["aria", "decal", "decals"])); if (!!t) { r = r || []; var i, a; M(r, function(s) { var u = new rn(s), l = u.get("color"), c = u.get("decal"); (u.get(["itemStyle", "color"]) || l && l !== "none") && (i = !0), (u.get(["itemStyle", "decal"]) || c && c !== "none") && (a = !0); }); var o = r[0] || (r[0] = {}); return i || (o.color = t.slice()), !a && n && (o.decal = n.slice()), r; } } const y5e = g5e; var _5e = 8, e8 = 8, jA = 5, w5e = function() { function r(e) { this.group = new rt(), e.add(this.group); } return r.prototype.render = function(e, t, n, i) { var a = e.getModel("breadcrumb"), o = this.group; if (o.removeAll(), !(!a.get("show") || !n)) { var s = a.getModel("itemStyle"), u = s.getModel("textStyle"), l = { pos: { left: a.get("left"), right: a.get("right"), top: a.get("top"), bottom: a.get("bottom") }, box: { width: t.getWidth(), height: t.getHeight() }, emptyItemWidth: a.get("emptyItemWidth"), totalWidth: 0, renderList: [] }; this._prepare(n, l, u), this._renderContent(e, l, s, u, i), QT(o, l.pos, l.box); } }, r.prototype._prepare = function(e, t, n) { for (var i = e; i; i = i.parentNode) { var a = Li(i.getModel().get("name"), ""), o = n.getTextRect(a), s = Math.max(o.width + _5e * 2, t.emptyItemWidth); t.totalWidth += s + e8, t.renderList.push({ node: i, text: a, width: s }); } }, r.prototype._renderContent = function(e, t, n, i, a) { for (var o = 0, s = t.emptyItemWidth, u = e.get(["breadcrumb", "height"]), l = LAe(t.pos, t.box), c = t.totalWidth, f = t.renderList, h = f.length - 1; h >= 0; h--) { var p = f[h], d = p.node, v = p.width, g = p.text; c > l.width && (c -= v - s, v = s, g = null); var m = new Ho({ shape: { points: x5e(o, 0, v, u, h === f.length - 1, h === 0) }, style: qe(n.getItemStyle(), { lineJoin: "bevel" }), textContent: new Yt({ style: { text: g, fill: i.getTextColor(), font: i.getFont() } }), textConfig: { position: "inside" }, z2: wy * 1e4, onclick: ut(a, d) }); m.disableLabelAnimation = !0, this.group.add(m), C5e(m, e, d), o += v + e8; } }, r.prototype.remove = function() { this.group.removeAll(); }, r; }(); function x5e(r, e, t, n, i, a) { var o = [[i ? r : r - jA, e], [r + t, e], [r + t, e + n], [i ? r : r - jA, e + n]]; return !a && o.splice(2, 0, [r + t + jA, e + n / 2]), !i && o.push([r, e + n / 2]), o; } function C5e(r, e, t) { nt(r).eventData = { componentType: "series", componentSubType: "treemap", componentIndex: e.componentIndex, seriesIndex: e.seriesIndex, seriesName: e.name, seriesType: "treemap", selfType: "breadcrumb", nodeData: { dataIndex: t && t.dataIndex, name: t && t.name }, treePathInfo: t && hP(t, e) }; } const S5e = w5e; var E5e = function() { function r() { this._storage = [], this._elExistsMap = {}; } return r.prototype.add = function(e, t, n, i, a) { return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({ el: e, target: t, duration: n, delay: i, easing: a }), !0); }, r.prototype.finished = function(e) { return this._finishedCallback = e, this; }, r.prototype.start = function() { for (var e = this, t = this._storage.length, n = function() { t--, t <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback()); }, i = 0, a = this._storage.length; i < a; i++) { var o = this._storage[i]; o.el.animateTo(o.target, { duration: o.duration, delay: o.delay, easing: o.easing, setToFinal: !0, done: n, aborted: n }); } return this; }, r; }(); function b5e() { return new E5e(); } var C2 = rt, t8 = Vt, r8 = 3, n8 = "label", i8 = "upperLabel", T5e = wy * 10, P5e = wy * 2, I5e = wy * 3, Dp = zd([ ["fill", "color"], ["stroke", "strokeColor"], ["lineWidth", "strokeWidth"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"] ]), a8 = function(r) { var e = Dp(r); return e.stroke = e.fill = e.lineWidth = null, e; }, VE = Ut(), A5e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._state = "ready", t._storage = w0(), t; } return e.prototype.render = function(t, n, i, a) { var o = n.findComponents({ mainType: "series", subType: "treemap", query: a }); if (!(_t(o, t) < 0)) { this.seriesModel = t, this.api = i, this.ecModel = n; var s = ["treemapZoomToNode", "treemapRootToNode"], u = I1(a, s, t), l = a && a.type, c = t.layoutInfo, f = !this._oldTree, h = this._storage, p = l === "treemapRootToNode" && u && h ? { rootNodeGroup: h.nodeGroup[u.node.getRawIndex()], direction: a.direction } : null, d = this._giveContainerGroup(c), v = t.get("animation"), g = this._doRender(d, t, p); v && !f && (!l || l === "treemapZoomToNode" || l === "treemapRootToNode") ? this._doAnimation(d, g, t, p) : g.renderFinally(), this._resetController(i), this._renderBreadcrumb(t, i, u); } }, e.prototype._giveContainerGroup = function(t) { var n = this._containerGroup; return n || (n = this._containerGroup = new C2(), this._initEvents(n), this.group.add(n)), n.x = t.x, n.y = t.y, n; }, e.prototype._doRender = function(t, n, i) { var a = n.getData().tree, o = this._oldTree, s = w0(), u = w0(), l = this._storage, c = []; function f(g, m, y, _) { return L5e(n, u, l, i, s, c, g, m, y, _); } p(a.root ? [a.root] : [], o && o.root ? [o.root] : [], t, a === o || !o, 0); var h = d(l); return this._oldTree = a, this._storage = u, { lastsForAnimation: s, willDeleteEls: h, renderFinally: v }; function p(g, m, y, _, w) { _ ? (m = g, M(g, function(S, b) { !S.isRemoved() && C(b, b); })) : new sf(m, g, x, x).add(C).update(C).remove(ut(C, null)).execute(); function x(S) { return S.getId(); } function C(S, b) { var E = S != null ? g[S] : null, T = b != null ? m[b] : null, P = f(E, T, y, w); P && p(E && E.viewChildren || [], T && T.viewChildren || [], P, _, w + 1); } } function d(g) { var m = w0(); return g && M(g, function(y, _) { var w = m[_]; M(y, function(x) { x && (w.push(x), VE(x).willDelete = !0); }); }), m; } function v() { M(h, function(g) { M(g, function(m) { m.parent && m.parent.remove(m); }); }), M(c, function(g) { g.invisible = !0, g.dirty(); }); } }, e.prototype._doAnimation = function(t, n, i, a) { var o = i.get("animationDurationUpdate"), s = i.get("animationEasing"), u = (ze(o) ? 0 : o) || 0, l = (ze(s) ? null : s) || "cubicOut", c = b5e(); M(n.willDeleteEls, function(f, h) { M(f, function(p, d) { if (!p.invisible) { var v = p.parent, g, m = VE(v); if (a && a.direction === "drillDown") g = v === a.rootNodeGroup ? { shape: { x: 0, y: 0, width: m.nodeWidth, height: m.nodeHeight }, style: { opacity: 0 } } : { style: { opacity: 0 } }; else { var y = 0, _ = 0; m.willDelete || (y = m.nodeWidth / 2, _ = m.nodeHeight / 2), g = h === "nodeGroup" ? { x: y, y: _, style: { opacity: 0 } } : { shape: { x: y, y: _, width: 0, height: 0 }, style: { opacity: 0 } }; } g && c.add(p, g, u, 0, l); } }); }), M(this._storage, function(f, h) { M(f, function(p, d) { var v = n.lastsForAnimation[h][d], g = {}; !v || (p instanceof rt ? v.oldX != null && (g.x = p.x, g.y = p.y, p.x = v.oldX, p.y = v.oldY) : (v.oldShape && (g.shape = oe({}, p.shape), p.setShape(v.oldShape)), v.fadein ? (p.setStyle("opacity", 0), g.style = { opacity: 1 }) : p.style.opacity !== 1 && (g.style = { opacity: 1 })), c.add(p, g, u, 0, l)); }); }, this), this._state = "animating", c.finished(Ae(function() { this._state = "ready", n.renderFinally(); }, this)).start(); }, e.prototype._resetController = function(t) { var n = this._controller; n || (n = this._controller = new Xw(t.getZr()), n.enable(this.seriesModel.get("roam")), n.on("pan", Ae(this._onPan, this)), n.on("zoom", Ae(this._onZoom, this))); var i = new gt(0, 0, t.getWidth(), t.getHeight()); n.setPointerChecker(function(a, o, s) { return i.contain(o, s); }); }, e.prototype._clearController = function() { var t = this._controller; t && (t.dispose(), t = null); }, e.prototype._onPan = function(t) { if (this._state !== "animating" && (Math.abs(t.dx) > r8 || Math.abs(t.dy) > r8)) { var n = this.seriesModel.getData().tree.root; if (!n) return; var i = n.getLayout(); if (!i) return; this.api.dispatchAction({ type: "treemapMove", from: this.uid, seriesId: this.seriesModel.id, rootRect: { x: i.x + t.dx, y: i.y + t.dy, width: i.width, height: i.height } }); } }, e.prototype._onZoom = function(t) { var n = t.originX, i = t.originY; if (this._state !== "animating") { var a = this.seriesModel.getData().tree.root; if (!a) return; var o = a.getLayout(); if (!o) return; var s = new gt(o.x, o.y, o.width, o.height), u = this.seriesModel.layoutInfo; n -= u.x, i -= u.y; var l = xs(); Jl(l, l, [-n, -i]), GN(l, l, [t.scale, t.scale]), Jl(l, l, [n, i]), s.applyTransform(l), this.api.dispatchAction({ type: "treemapRender", from: this.uid, seriesId: this.seriesModel.id, rootRect: { x: s.x, y: s.y, width: s.width, height: s.height } }); } }, e.prototype._initEvents = function(t) { var n = this; t.on("click", function(i) { if (n._state === "ready") { var a = n.seriesModel.get("nodeClick", !0); if (!!a) { var o = n.findTarget(i.offsetX, i.offsetY); if (!!o) { var s = o.node; if (s.getLayout().isLeafRoot) n._rootToNode(o); else if (a === "zoomToNode") n._zoomToNode(o); else if (a === "link") { var u = s.hostTree.data.getItemModel(s.dataIndex), l = u.get("link", !0), c = u.get("target", !0) || "blank"; l && wE(l, c); } } } } }, this); }, e.prototype._renderBreadcrumb = function(t, n, i) { var a = this; i || (i = t.get("leafDepth", !0) != null ? { node: t.getViewRoot() } : this.findTarget(n.getWidth() / 2, n.getHeight() / 2), i || (i = { node: t.getData().tree.root })), (this._breadcrumb || (this._breadcrumb = new S5e(this.group))).render(t, n, i.node, function(o) { a._state !== "animating" && (qF(t.getViewRoot(), o) ? a._rootToNode({ node: o }) : a._zoomToNode({ node: o })); }); }, e.prototype.remove = function() { this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = w0(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove(); }, e.prototype.dispose = function() { this._clearController(); }, e.prototype._zoomToNode = function(t) { this.api.dispatchAction({ type: "treemapZoomToNode", from: this.uid, seriesId: this.seriesModel.id, targetNode: t.node }); }, e.prototype._rootToNode = function(t) { this.api.dispatchAction({ type: "treemapRootToNode", from: this.uid, seriesId: this.seriesModel.id, targetNode: t.node }); }, e.prototype.findTarget = function(t, n) { var i, a = this.seriesModel.getViewRoot(); return a.eachNode({ attr: "viewChildren", order: "preorder" }, function(o) { var s = this._storage.background[o.getRawIndex()]; if (s) { var u = s.transformCoordToLocal(t, n), l = s.shape; if (l.x <= u[0] && u[0] <= l.x + l.width && l.y <= u[1] && u[1] <= l.y + l.height) i = { node: o, offsetX: u[0], offsetY: u[1] }; else return !1; } }, this), i; }, e.type = "treemap", e; }(an); function w0() { return { nodeGroup: [], background: [], content: [] }; } function L5e(r, e, t, n, i, a, o, s, u, l) { if (!o) return; var c = o.getLayout(), f = r.getData(), h = o.getModel(); if (f.setItemGraphicEl(o.dataIndex, null), !c || !c.isInView) return; var p = c.width, d = c.height, v = c.borderWidth, g = c.invisible, m = o.getRawIndex(), y = s && s.getRawIndex(), _ = o.viewChildren, w = c.upperHeight, x = _ && _.length, C = h.getModel("itemStyle"), S = h.getModel(["emphasis", "itemStyle"]), b = h.getModel(["blur", "itemStyle"]), E = h.getModel(["select", "itemStyle"]), T = C.get("borderRadius") || 0, P = j("nodeGroup", C2); if (!P) return; if (u.add(P), P.x = c.x || 0, P.y = c.y || 0, P.markRedraw(), VE(P).nodeWidth = p, VE(P).nodeHeight = d, c.isAboveViewRoot) return P; var I = j("background", t8, l, P5e); I && k(P, I, x && c.upperLabelHeight); var A = h.getModel("emphasis"), L = A.get("focus"), D = A.get("blurScope"), O = A.get("disabled"), N = L === "ancestor" ? o.getAncestorsIndices() : L === "descendant" ? o.getDescendantIndices() : L; if (x) Oh(P) && Up(P, !1), I && (Up(I, !O), f.setItemGraphicEl(o.dataIndex, I), zM(I, N, D)); else { var F = j("content", t8, l, I5e); F && G(P, F), I.disableMorphing = !0, I && Oh(I) && Up(I, !1), Up(P, !O), f.setItemGraphicEl(o.dataIndex, P), zM(P, N, D); } return P; function k($, V, q) { var ee = nt(V); if (ee.dataIndex = o.dataIndex, ee.seriesIndex = r.seriesIndex, V.setShape({ x: 0, y: 0, width: p, height: d, r: T }), g) U(V); else { V.invisible = !1; var Y = o.getVisual("style"), K = Y.stroke, fe = a8(C); fe.fill = K; var J = Dp(S); J.fill = S.get("borderColor"); var ue = Dp(b); ue.fill = b.get("borderColor"); var ne = Dp(E); if (ne.fill = E.get("borderColor"), q) { var ve = p - 2 * v; B( V, K, Y.opacity, { x: v, y: 0, width: ve, height: w } ); } else V.removeTextContent(); V.setStyle(fe), V.ensureState("emphasis").style = J, V.ensureState("blur").style = ue, V.ensureState("select").style = ne, $d(V); } $.add(V); } function G($, V) { var q = nt(V); q.dataIndex = o.dataIndex, q.seriesIndex = r.seriesIndex; var ee = Math.max(p - 2 * v, 0), Y = Math.max(d - 2 * v, 0); if (V.culling = !0, V.setShape({ x: v, y: v, width: ee, height: Y, r: T }), g) U(V); else { V.invisible = !1; var K = o.getVisual("style"), fe = K.fill, J = a8(C); J.fill = fe, J.decal = K.decal; var ue = Dp(S), ne = Dp(b), ve = Dp(E); B(V, fe, K.opacity, null), V.setStyle(J), V.ensureState("emphasis").style = ue, V.ensureState("blur").style = ne, V.ensureState("select").style = ve, $d(V); } $.add(V); } function U($) { !$.invisible && a.push($); } function B($, V, q, ee) { var Y = h.getModel(ee ? i8 : n8), K = Li(h.get("name"), null), fe = Y.getShallow("show"); no($, wa(h, ee ? i8 : n8), { defaultText: fe ? K : null, inheritColor: V, defaultOpacity: q, labelFetcher: r, labelDataIndex: o.dataIndex }); var J = $.getTextContent(); if (!!J) { var ue = J.style, ne = NN(ue.padding || 0); ee && ($.setTextConfig({ layoutRect: ee }), J.disableLabelLayout = !0), J.beforeUpdate = function() { var Pe = Math.max((ee ? ee.width : $.shape.width) - ne[1] - ne[3], 0), Be = Math.max((ee ? ee.height : $.shape.height) - ne[0] - ne[2], 0); (ue.width !== Pe || ue.height !== Be) && J.setStyle({ width: Pe, height: Be }); }, ue.truncateMinChar = 2, ue.lineOverflow = "truncate", X(ue, ee, c); var ve = J.getState("emphasis"); X(ve ? ve.style : null, ee, c); } } function X($, V, q) { var ee = $ ? $.text : null; if (!V && q.isLeafRoot && ee != null) { var Y = r.get("drillDownIcon", !0); $.text = Y ? Y + " " + ee : ee; } } function j($, V, q, ee) { var Y = y != null && t[$][y], K = i[$]; return Y ? (t[$][y] = null, ae(K, Y)) : g || (Y = new V(), Y instanceof vu && (Y.z2 = D5e(q, ee)), se(K, Y)), e[$][m] = Y; } function ae($, V) { var q = $[m] = {}; V instanceof C2 ? (q.oldX = V.x, q.oldY = V.y) : q.oldShape = oe({}, V.shape); } function se($, V) { var q = $[m] = {}, ee = o.parentNode, Y = V instanceof rt; if (ee && (!n || n.direction === "drillDown")) { var K = 0, fe = 0, J = i.background[ee.getRawIndex()]; !n && J && J.oldShape && (K = J.oldShape.width, fe = J.oldShape.height), Y ? (q.oldX = 0, q.oldY = fe) : q.oldShape = { x: K, y: fe, width: 0, height: 0 }; } q.fadein = !Y; } } function D5e(r, e) { return r * T5e + e; } const M5e = A5e; var A1 = M, O5e = Xe, GE = -1, ZF = function() { function r(e) { var t = e.mappingMethod, n = e.type, i = this.option = Qe(e); this.type = n, this.mappingMethod = t, this._normalizeData = F5e[t]; var a = r.visualHandlers[n]; this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._normalizedToVisual = a._normalizedToVisual[t], t === "piecewise" ? (YA(i), R5e(i)) : t === "category" ? i.categories ? N5e(i) : YA(i, !0) : (Ze(t !== "linear" || i.dataExtent), YA(i)); } return r.prototype.mapValueToVisual = function(e) { var t = this._normalizeData(e); return this._normalizedToVisual(t, e); }, r.prototype.getNormalizer = function() { return Ae(this._normalizeData, this); }, r.listVisualTypes = function() { return At(r.visualHandlers); }, r.isValidType = function(e) { return r.visualHandlers.hasOwnProperty(e); }, r.eachVisual = function(e, t, n) { Xe(e) ? M(e, t, n) : t.call(n, e); }, r.mapVisual = function(e, t, n) { var i, a = le(e) ? [] : Xe(e) ? {} : (i = !0, null); return r.eachVisual(e, function(o, s) { var u = t.call(n, o, s); i ? a = u : a[s] = u; }), a; }, r.retrieveVisuals = function(e) { var t = {}, n; return e && A1(r.visualHandlers, function(i, a) { e.hasOwnProperty(a) && (t[a] = e[a], n = !0); }), n ? t : null; }, r.prepareVisualTypes = function(e) { if (le(e)) e = e.slice(); else if (O5e(e)) { var t = []; A1(e, function(n, i) { t.push(i); }), e = t; } else return []; return e.sort(function(n, i) { return i === "color" && n !== "color" && n.indexOf("color") === 0 ? 1 : -1; }), e; }, r.dependsOn = function(e, t) { return t === "color" ? !!(e && e.indexOf(t) === 0) : e === t; }, r.findPieceIndex = function(e, t, n) { for (var i, a = 1 / 0, o = 0, s = t.length; o < s; o++) { var u = t[o].value; if (u != null) { if (u === e || Se(u) && u === e + "") return o; n && h(u, o); } } for (var o = 0, s = t.length; o < s; o++) { var l = t[o], c = l.interval, f = l.close; if (c) { if (c[0] === -1 / 0) { if (xC(f[1], e, c[1])) return o; } else if (c[1] === 1 / 0) { if (xC(f[0], c[0], e)) return o; } else if (xC(f[0], c[0], e) && xC(f[1], e, c[1])) return o; n && h(c[0], o), n && h(c[1], o); } } if (n) return e === 1 / 0 ? t.length - 1 : e === -1 / 0 ? 0 : i; function h(p, d) { var v = Math.abs(p - e); v < a && (a = v, i = d); } }, r.visualHandlers = { color: { applyVisual: x0("color"), getColorMapper: function() { var e = this.option; return Ae(e.mappingMethod === "category" ? function(t, n) { return !n && (t = this._normalizeData(t)), Q0.call(this, t); } : function(t, n, i) { var a = !!i; return !n && (t = this._normalizeData(t)), i = TI(t, e.parsedVisual, i), a ? i : Fc(i, "rgba"); }, this); }, _normalizedToVisual: { linear: function(e) { return Fc(TI(e, this.option.parsedVisual), "rgba"); }, category: Q0, piecewise: function(e, t) { var n = E2.call(this, t); return n == null && (n = Fc(TI(e, this.option.parsedVisual), "rgba")), n; }, fixed: Mp } }, colorHue: wC(function(e, t) { return d_(e, t); }), colorSaturation: wC(function(e, t) { return d_(e, null, t); }), colorLightness: wC(function(e, t) { return d_(e, null, null, t); }), colorAlpha: wC(function(e, t) { return sE(e, t); }), decal: { applyVisual: x0("decal"), _normalizedToVisual: { linear: null, category: Q0, piecewise: null, fixed: null } }, opacity: { applyVisual: x0("opacity"), _normalizedToVisual: S2([0, 1]) }, liftZ: { applyVisual: x0("liftZ"), _normalizedToVisual: { linear: Mp, category: Mp, piecewise: Mp, fixed: Mp } }, symbol: { applyVisual: function(e, t, n) { var i = this.mapValueToVisual(e); n("symbol", i); }, _normalizedToVisual: { linear: o8, category: Q0, piecewise: function(e, t) { var n = E2.call(this, t); return n == null && (n = o8.call(this, e)), n; }, fixed: Mp } }, symbolSize: { applyVisual: x0("symbolSize"), _normalizedToVisual: S2([0, 1]) } }, r; }(); function R5e(r) { var e = r.pieceList; r.hasSpecialVisual = !1, M(e, function(t, n) { t.originIndex = n, t.visual != null && (r.hasSpecialVisual = !0); }); } function N5e(r) { var e = r.categories, t = r.categoryMap = {}, n = r.visual; if (A1(e, function(o, s) { t[o] = s; }), !le(n)) { var i = []; Xe(n) ? A1(n, function(o, s) { var u = t[s]; i[u != null ? u : GE] = o; }) : i[GE] = n, n = BQ(r, i); } for (var a = e.length - 1; a >= 0; a--) n[a] == null && (delete t[e[a]], e.pop()); } function YA(r, e) { var t = r.visual, n = []; Xe(t) ? A1(t, function(a) { n.push(a); }) : t != null && n.push(t); var i = { color: 1, symbol: 1 }; !e && n.length === 1 && !i.hasOwnProperty(r.type) && (n[1] = n[0]), BQ(r, n); } function wC(r) { return { applyVisual: function(e, t, n) { var i = this.mapValueToVisual(e); n("color", r(t("color"), i)); }, _normalizedToVisual: S2([0, 1]) }; } function o8(r) { var e = this.option.visual; return e[Math.round(Fr(r, [0, 1], [0, e.length - 1], !0))] || {}; } function x0(r) { return function(e, t, n) { n(r, this.mapValueToVisual(e)); }; } function Q0(r) { var e = this.option.visual; return e[this.option.loop && r !== GE ? r % e.length : r]; } function Mp() { return this.option.visual[0]; } function S2(r) { return { linear: function(e) { return Fr(e, r, this.option.visual, !0); }, category: Q0, piecewise: function(e, t) { var n = E2.call(this, t); return n == null && (n = Fr(e, r, this.option.visual, !0)), n; }, fixed: Mp }; } function E2(r) { var e = this.option, t = e.pieceList; if (e.hasSpecialVisual) { var n = ZF.findPieceIndex(r, t), i = t[n]; if (i && i.visual) return i.visual[this.type]; } } function BQ(r, e) { return r.visual = e, r.type === "color" && (r.parsedVisual = ce(e, function(t) { var n = hs(t); return !n && process.env.NODE_ENV !== "production" && to("'" + t + "' is an illegal color, fallback to '#000000'", !0), n || [0, 0, 0, 1]; })), e; } var F5e = { linear: function(r) { return Fr(r, this.option.dataExtent, [0, 1], !0); }, piecewise: function(r) { var e = this.option.pieceList, t = ZF.findPieceIndex(r, e, !0); if (t != null) return Fr(t, [0, e.length - 1], [0, 1], !0); }, category: function(r) { var e = this.option.categories ? this.option.categoryMap[r] : r; return e == null ? GE : e; }, fixed: ci }; function xC(r, e, t) { return r ? e <= t : e < t; } const Aa = ZF; var B5e = "itemStyle", kQ = Ut(); const k5e = { seriesType: "treemap", reset: function(r) { var e = r.getData().tree, t = e.root; t.isRemoved() || VQ( t, {}, r.getViewRoot().getAncestors(), r ); } }; function VQ(r, e, t, n) { var i = r.getModel(), a = r.getLayout(), o = r.hostTree.data; if (!(!a || a.invisible || !a.isInView)) { var s = i.getModel(B5e), u = V5e(s, e, n), l = o.ensureUniqueItemVisual(r.dataIndex, "style"), c = s.get("borderColor"), f = s.get("borderColorSaturation"), h; f != null && (h = s8(u), c = G5e(f, h)), l.stroke = c; var p = r.viewChildren; if (!p || !p.length) h = s8(u), l.fill = h; else { var d = z5e(r, i, a, s, u, p); M(p, function(v, g) { if (v.depth >= t.length || v === t[v.depth]) { var m = $5e(i, u, v, g, d, n); VQ(v, m, t, n); } }); } } } function V5e(r, e, t) { var n = oe({}, e), i = t.designatedVisualItemStyle; return M(["color", "colorAlpha", "colorSaturation"], function(a) { i[a] = e[a]; var o = r.get(a); i[a] = null, o != null && (n[a] = o); }), n; } function s8(r) { var e = XA(r, "color"); if (e) { var t = XA(r, "colorAlpha"), n = XA(r, "colorSaturation"); return n && (e = d_(e, null, null, n)), t && (e = sE(e, t)), e; } } function G5e(r, e) { return e != null ? d_(e, null, null, r) : null; } function XA(r, e) { var t = r[e]; if (t != null && t !== "none") return t; } function z5e(r, e, t, n, i, a) { if (!(!a || !a.length)) { var o = qA(e, "color") || i.color != null && i.color !== "none" && (qA(e, "colorAlpha") || qA(e, "colorSaturation")); if (!!o) { var s = e.get("visualMin"), u = e.get("visualMax"), l = t.dataExtent.slice(); s != null && s < l[0] && (l[0] = s), u != null && u > l[1] && (l[1] = u); var c = e.get("colorMappingBy"), f = { type: o.name, dataExtent: l, visual: o.range }; f.type === "color" && (c === "index" || c === "id") ? (f.mappingMethod = "category", f.loop = !0) : f.mappingMethod = "linear"; var h = new Aa(f); return kQ(h).drColorMappingBy = c, h; } } } function qA(r, e) { var t = r.get(e); return le(t) && t.length ? { name: e, range: t } : null; } function $5e(r, e, t, n, i, a) { var o = oe({}, e); if (i) { var s = i.type, u = s === "color" && kQ(i).drColorMappingBy, l = u === "index" ? n : u === "id" ? a.mapIdToIndex(t.getId()) : t.getValue(r.get("visualDimension")); o[s] = i.mapValueToVisual(l); } return o; } var L1 = Math.max, zE = Math.min, u8 = si, KF = M, GQ = ["itemStyle", "borderWidth"], H5e = ["itemStyle", "gapWidth"], U5e = ["upperLabel", "show"], W5e = ["upperLabel", "height"]; const j5e = { seriesType: "treemap", reset: function(r, e, t, n) { var i = t.getWidth(), a = t.getHeight(), o = r.option, s = Bi(r.getBoxLayoutParams(), { width: t.getWidth(), height: t.getHeight() }), u = o.size || [], l = ye(u8(s.width, u[0]), i), c = ye(u8(s.height, u[1]), a), f = n && n.type, h = ["treemapZoomToNode", "treemapRootToNode"], p = I1(n, h, r), d = f === "treemapRender" || f === "treemapMove" ? n.rootRect : null, v = r.getViewRoot(), g = RQ(v); if (f !== "treemapMove") { var m = f === "treemapZoomToNode" ? J5e(r, p, v, l, c) : d ? [d.width, d.height] : [l, c], y = o.sort; y && y !== "asc" && y !== "desc" && (y = "desc"); var _ = { squareRatio: o.squareRatio, sort: y, leafDepth: o.leafDepth }; v.hostTree.clearLayouts(); var w = { x: 0, y: 0, width: m[0], height: m[1], area: m[0] * m[1] }; v.setLayout(w), zQ(v, _, !1, 0), w = v.getLayout(), KF(g, function(C, S) { var b = (g[S + 1] || v).getValue(); C.setLayout(oe({ dataExtent: [b, b], borderWidth: 0, upperHeight: 0 }, w)); }); } var x = r.getData().tree.root; x.setLayout(Q5e(s, d, p), !0), r.setLayoutInfo(s), $Q( x, new gt(-s.x, -s.y, i, a), g, v, 0 ); } }; function zQ(r, e, t, n) { var i, a; if (!r.isRemoved()) { var o = r.getLayout(); i = o.width, a = o.height; var s = r.getModel(), u = s.get(GQ), l = s.get(H5e) / 2, c = HQ(s), f = Math.max(u, c), h = u - l, p = f - l; r.setLayout({ borderWidth: u, upperHeight: f, upperLabelHeight: c }, !0), i = L1(i - 2 * h, 0), a = L1(a - h - p, 0); var d = i * a, v = Y5e(r, s, d, e, t, n); if (!!v.length) { var g = { x: h, y: p, width: i, height: a }, m = zE(i, a), y = 1 / 0, _ = []; _.area = 0; for (var w = 0, x = v.length; w < x; ) { var C = v[w]; _.push(C), _.area += C.getLayout().area; var S = K5e(_, m, e.squareRatio); S <= y ? (w++, y = S) : (_.area -= _.pop().getLayout().area, l8(_, m, g, l, !1), m = zE(g.width, g.height), _.length = _.area = 0, y = 1 / 0); } if (_.length && l8(_, m, g, l, !0), !t) { var b = s.get("childrenVisibleMin"); b != null && d < b && (t = !0); } for (var w = 0, x = v.length; w < x; w++) zQ(v[w], e, t, n + 1); } } } function Y5e(r, e, t, n, i, a) { var o = r.children || [], s = n.sort; s !== "asc" && s !== "desc" && (s = null); var u = n.leafDepth != null && n.leafDepth <= a; if (i && !u) return r.viewChildren = []; o = Wr(o, function(p) { return !p.isRemoved(); }), q5e(o, s); var l = Z5e(e, o, s); if (l.sum === 0) return r.viewChildren = []; if (l.sum = X5e(e, t, l.sum, s, o), l.sum === 0) return r.viewChildren = []; for (var c = 0, f = o.length; c < f; c++) { var h = o[c].getValue() / l.sum * t; o[c].setLayout({ area: h }); } return u && (o.length && r.setLayout({ isLeafRoot: !0 }, !0), o.length = 0), r.viewChildren = o, r.setLayout({ dataExtent: l.dataExtent }, !0), o; } function X5e(r, e, t, n, i) { if (!n) return t; for (var a = r.get("visibleMin"), o = i.length, s = o, u = o - 1; u >= 0; u--) { var l = i[n === "asc" ? o - u - 1 : u].getValue(); l / t * e < a && (s = u, t -= l); } return n === "asc" ? i.splice(0, o - s) : i.splice(s, o - s), t; } function q5e(r, e) { return e && r.sort(function(t, n) { var i = e === "asc" ? t.getValue() - n.getValue() : n.getValue() - t.getValue(); return i === 0 ? e === "asc" ? t.dataIndex - n.dataIndex : n.dataIndex - t.dataIndex : i; }), r; } function Z5e(r, e, t) { for (var n = 0, i = 0, a = e.length; i < a; i++) n += e[i].getValue(); var o = r.get("visualDimension"), s; return !e || !e.length ? s = [NaN, NaN] : o === "value" && t ? (s = [e[e.length - 1].getValue(), e[0].getValue()], t === "asc" && s.reverse()) : (s = [1 / 0, -1 / 0], KF(e, function(u) { var l = u.getValue(o); l < s[0] && (s[0] = l), l > s[1] && (s[1] = l); })), { sum: n, dataExtent: s }; } function K5e(r, e, t) { for (var n = 0, i = 1 / 0, a = 0, o = void 0, s = r.length; a < s; a++) o = r[a].getLayout().area, o && (o < i && (i = o), o > n && (n = o)); var u = r.area * r.area, l = e * e * t; return u ? L1(l * n / u, u / (l * i)) : 1 / 0; } function l8(r, e, t, n, i) { var a = e === t.width ? 0 : 1, o = 1 - a, s = ["x", "y"], u = ["width", "height"], l = t[s[a]], c = e ? r.area / e : 0; (i || c > t[u[o]]) && (c = t[u[o]]); for (var f = 0, h = r.length; f < h; f++) { var p = r[f], d = {}, v = c ? p.getLayout().area / c : 0, g = d[u[o]] = L1(c - 2 * n, 0), m = t[s[a]] + t[u[a]] - l, y = f === h - 1 || m < v ? m : v, _ = d[u[a]] = L1(y - 2 * n, 0); d[s[o]] = t[s[o]] + zE(n, g / 2), d[s[a]] = l + zE(n, _ / 2), l += y, p.setLayout(d, !0); } t[s[o]] += c, t[u[o]] -= c; } function J5e(r, e, t, n, i) { var a = (e || {}).node, o = [n, i]; if (!a || a === t) return o; for (var s, u = n * i, l = u * r.option.zoomToNodeRatio; s = a.parentNode; ) { for (var c = 0, f = s.children, h = 0, p = f.length; h < p; h++) c += f[h].getValue(); var d = a.getValue(); if (d === 0) return o; l *= c / d; var v = s.getModel(), g = v.get(GQ), m = Math.max(g, HQ(v)); l += 4 * g * g + (3 * g + m) * Math.pow(l, 0.5), l > m6 && (l = m6), a = s; } l < u && (l = u); var y = Math.pow(l / u, 0.5); return [n * y, i * y]; } function Q5e(r, e, t) { if (e) return { x: e.x, y: e.y }; var n = { x: 0, y: 0 }; if (!t) return n; var i = t.node, a = i.getLayout(); if (!a) return n; for (var o = [a.width / 2, a.height / 2], s = i; s; ) { var u = s.getLayout(); o[0] += u.x, o[1] += u.y, s = s.parentNode; } return { x: r.width / 2 - o[0], y: r.height / 2 - o[1] }; } function $Q(r, e, t, n, i) { var a = r.getLayout(), o = t[i], s = o && o === r; if (!(o && !s || i === t.length && r !== n)) { r.setLayout({ isInView: !0, invisible: !s && !e.intersect(a), isAboveViewRoot: s }, !0); var u = new gt(e.x - a.x, e.y - a.y, e.width, e.height); KF(r.viewChildren || [], function(l) { $Q(l, u, t, n, i + 1); }); } } function HQ(r) { return r.get(U5e) ? r.get(W5e) : 0; } function e3e(r) { r.registerSeriesModel(y5e), r.registerChartView(M5e), r.registerVisual(k5e), r.registerLayout(j5e), v5e(r); } function t3e(r) { var e = r.findComponents({ mainType: "legend" }); !e || !e.length || r.eachSeriesByType("graph", function(t) { var n = t.getCategoriesData(), i = t.getGraph(), a = i.data, o = n.mapArray(n.getName); a.filterSelf(function(s) { var u = a.getItemModel(s), l = u.getShallow("category"); if (l != null) { $t(l) && (l = o[l]); for (var c = 0; c < e.length; c++) if (!e[c].isSelected(l)) return !1; } return !0; }); }); } function r3e(r) { var e = {}; r.eachSeriesByType("graph", function(t) { var n = t.getCategoriesData(), i = t.getData(), a = {}; n.each(function(o) { var s = n.getName(o); a["ec-" + s] = o; var u = n.getItemModel(o), l = u.getModel("itemStyle").getItemStyle(); l.fill || (l.fill = t.getColorFromPalette(s, e)), n.setItemVisual(o, "style", l); for (var c = ["symbol", "symbolSize", "symbolKeepAspect"], f = 0; f < c.length; f++) { var h = u.getShallow(c[f], !0); h != null && n.setItemVisual(o, c[f], h); } }), n.count() && i.each(function(o) { var s = i.getItemModel(o), u = s.getShallow("category"); if (u != null) { Se(u) && (u = a["ec-" + u]); var l = n.getItemVisual(u, "style"), c = i.ensureUniqueItemVisual(o, "style"); oe(c, l); for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], h = 0; h < f.length; h++) i.setItemVisual(o, f[h], n.getItemVisual(u, f[h])); } }); }); } function CC(r) { return r instanceof Array || (r = [r, r]), r; } function n3e(r) { r.eachSeriesByType("graph", function(e) { var t = e.getGraph(), n = e.getEdgeData(), i = CC(e.get("edgeSymbol")), a = CC(e.get("edgeSymbolSize")); n.setVisual("fromSymbol", i && i[0]), n.setVisual("toSymbol", i && i[1]), n.setVisual("fromSymbolSize", a && a[0]), n.setVisual("toSymbolSize", a && a[1]), n.setVisual("style", e.getModel("lineStyle").getLineStyle()), n.each(function(o) { var s = n.getItemModel(o), u = t.getEdgeByIndex(o), l = CC(s.getShallow("symbol", !0)), c = CC(s.getShallow("symbolSize", !0)), f = s.getModel("lineStyle").getLineStyle(), h = n.ensureUniqueItemVisual(o, "style"); switch (oe(h, f), h.stroke) { case "source": { var p = u.node1.getVisual("style"); h.stroke = p && p.fill; break; } case "target": { var p = u.node2.getVisual("style"); h.stroke = p && p.fill; break; } } l[0] && u.setVisual("fromSymbol", l[0]), l[1] && u.setVisual("toSymbol", l[1]), c[0] && u.setVisual("fromSymbolSize", c[0]), c[1] && u.setVisual("toSymbolSize", c[1]); }); }); } var b2 = "-->", pP = function(r) { return r.get("autoCurveness") || null; }, UQ = function(r, e) { var t = pP(r), n = 20, i = []; if ($t(t)) n = t; else if (le(t)) { r.__curvenessList = t; return; } e > n && (n = e); var a = n % 2 ? n + 2 : n + 3; i = []; for (var o = 0; o < a; o++) i.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1)); r.__curvenessList = i; }, D1 = function(r, e, t) { var n = [r.id, r.dataIndex].join("."), i = [e.id, e.dataIndex].join("."); return [t.uid, n, i].join(b2); }, WQ = function(r) { var e = r.split(b2); return [e[0], e[2], e[1]].join(b2); }, i3e = function(r, e) { var t = D1(r.node1, r.node2, e); return e.__edgeMap[t]; }, a3e = function(r, e) { var t = T2(D1(r.node1, r.node2, e), e), n = T2(D1(r.node2, r.node1, e), e); return t + n; }, T2 = function(r, e) { var t = e.__edgeMap; return t[r] ? t[r].length : 0; }; function o3e(r) { !pP(r) || (r.__curvenessList = [], r.__edgeMap = {}, UQ(r)); } function s3e(r, e, t, n) { if (!!pP(t)) { var i = D1(r, e, t), a = t.__edgeMap, o = a[WQ(i)]; a[i] && !o ? a[i].isForward = !0 : o && a[i] && (o.isForward = !0, a[i].isForward = !1), a[i] = a[i] || [], a[i].push(n); } } function JF(r, e, t, n) { var i = pP(e), a = le(i); if (!i) return null; var o = i3e(r, e); if (!o) return null; for (var s = -1, u = 0; u < o.length; u++) if (o[u] === t) { s = u; break; } var l = a3e(r, e); UQ(e, l), r.lineStyle = r.lineStyle || {}; var c = D1(r.node1, r.node2, e), f = e.__curvenessList, h = a || l % 2 ? 0 : 1; if (o.isForward) return f[h + s]; var p = WQ(c), d = T2(p, e), v = f[s + d + h]; return n ? a ? i && i[0] === 0 ? (d + h) % 2 ? v : -v : ((d % 2 ? 0 : 1) + h) % 2 ? v : -v : (d + h) % 2 ? v : -v : f[s + d + h]; } function jQ(r) { var e = r.coordinateSystem; if (!(e && e.type !== "view")) { var t = r.getGraph(); t.eachNode(function(n) { var i = n.getModel(); n.setLayout([+i.get("x"), +i.get("y")]); }), YQ(t, r); } } function YQ(r, e) { r.eachEdge(function(t, n) { var i = $u(t.getModel().get(["lineStyle", "curveness"]), -JF(t, e, n, !0), 0), a = Nc(t.node1.getLayout()), o = Nc(t.node2.getLayout()), s = [a, o]; +i && s.push([(a[0] + o[0]) / 2 - (a[1] - o[1]) * i, (a[1] + o[1]) / 2 - (o[0] - a[0]) * i]), t.setLayout(s); }); } function u3e(r, e) { r.eachSeriesByType("graph", function(t) { var n = t.get("layout"), i = t.coordinateSystem; if (i && i.type !== "view") { var a = t.getData(), o = []; M(i.dimensions, function(h) { o = o.concat(a.mapDimensionsAll(h)); }); for (var s = 0; s < a.count(); s++) { for (var u = [], l = !1, c = 0; c < o.length; c++) { var f = a.get(o[c], s); isNaN(f) || (l = !0), u.push(f); } l ? a.setItemLayout(s, i.dataToPoint(u)) : a.setItemLayout(s, [NaN, NaN]); } YQ(a.graph, t); } else (!n || n === "none") && jQ(t); }); } function e_(r) { var e = r.coordinateSystem; if (e.type !== "view") return 1; var t = r.option.nodeScaleRatio, n = e.scaleX, i = e.getZoom(), a = (i - 1) * t + 1; return a / n; } function t_(r) { var e = r.getVisual("symbolSize"); return e instanceof Array && (e = (e[0] + e[1]) / 2), +e; } var c8 = Math.PI, ZA = []; function XQ(r, e) { var t = r.coordinateSystem; if (!(t && t.type !== "view")) { var n = t.getBoundingRect(), i = r.getData(), a = i.graph, o = n.width / 2 + n.x, s = n.height / 2 + n.y, u = Math.min(n.width, n.height) / 2, l = i.count(); i.setLayout({ cx: o, cy: s }), l && (l3e[e](r, a, i, u, o, s, l), a.eachEdge(function(c, f) { var h = $u(c.getModel().get(["lineStyle", "curveness"]), JF(c, r, f), 0), p = Nc(c.node1.getLayout()), d = Nc(c.node2.getLayout()), v, g = (p[0] + d[0]) / 2, m = (p[1] + d[1]) / 2; +h && (h *= 3, v = [o * h + g * (1 - h), s * h + m * (1 - h)]), c.setLayout([p, d, v]); })); } } var l3e = { value: function(r, e, t, n, i, a, o) { var s = 0, u = t.getSum("value"), l = Math.PI * 2 / (u || o); e.eachNode(function(c) { var f = c.getValue("value"), h = l * (u ? f : 1) / 2; s += h, c.setLayout([n * Math.cos(s) + i, n * Math.sin(s) + a]), s += h; }); }, symbolSize: function(r, e, t, n, i, a, o) { var s = 0; ZA.length = o; var u = e_(r); e.eachNode(function(f) { var h = t_(f); isNaN(h) && (h = 2), h < 0 && (h = 0), h *= u; var p = Math.asin(h / 2 / n); isNaN(p) && (p = c8 / 2), ZA[f.dataIndex] = p, s += p * 2; }); var l = (2 * c8 - s) / o / 2, c = 0; e.eachNode(function(f) { var h = l + ZA[f.dataIndex]; c += h, f.setLayout([n * Math.cos(c) + i, n * Math.sin(c) + a]), c += h; }); } }; function c3e(r) { r.eachSeriesByType("graph", function(e) { e.get("layout") === "circular" && XQ(e, "symbolSize"); }); } var qv = hM; function f3e(r, e, t) { for (var n = r, i = e, a = t.rect, o = a.width, s = a.height, u = [a.x + o / 2, a.y + s / 2], l = t.gravity == null ? 0.1 : t.gravity, c = 0; c < n.length; c++) { var f = n[c]; f.p || (f.p = pv(o * (Math.random() - 0.5) + u[0], s * (Math.random() - 0.5) + u[1])), f.pp = Nc(f.p), f.edges = null; } var h = t.friction == null ? 0.6 : t.friction, p = h, d, v; return { warmUp: function() { p = h * 0.8; }, setFixed: function(g) { n[g].fixed = !0; }, setUnfixed: function(g) { n[g].fixed = !1; }, beforeStep: function(g) { d = g; }, afterStep: function(g) { v = g; }, step: function(g) { d && d(n, i); for (var m = [], y = n.length, _ = 0; _ < i.length; _++) { var w = i[_]; if (!w.ignoreForceLayout) { var x = w.n1, C = w.n2; $p(m, C.p, x.p); var S = pM(m) - w.d, b = C.w / (x.w + C.w); isNaN(b) && (b = 0), Lw(m, m), !x.fixed && qv(x.p, x.p, m, b * S * p), !C.fixed && qv(C.p, C.p, m, -(1 - b) * S * p); } } for (var _ = 0; _ < y; _++) { var E = n[_]; E.fixed || ($p(m, u, E.p), qv(E.p, E.p, m, l * p)); } for (var _ = 0; _ < y; _++) for (var x = n[_], T = _ + 1; T < y; T++) { var C = n[T]; $p(m, C.p, x.p); var S = pM(m); S === 0 && (gbe(m, Math.random() - 0.5, Math.random() - 0.5), S = 1); var P = (x.rep + C.rep) / S / S; !x.fixed && qv(x.pp, x.pp, m, P), !C.fixed && qv(C.pp, C.pp, m, -P); } for (var I = [], _ = 0; _ < y; _++) { var E = n[_]; E.fixed || ($p(I, E.p, E.pp), qv(E.p, E.p, I, p), oo(E.pp, E.p)); } p = p * 0.992; var A = p < 0.01; v && v(n, i, A), g && g(A); } }; } function h3e(r) { r.eachSeriesByType("graph", function(e) { var t = e.coordinateSystem; if (!(t && t.type !== "view")) if (e.get("layout") === "force") { var n = e.preservedPoints || {}, i = e.getGraph(), a = i.data, o = i.edgeData, s = e.getModel("force"), u = s.get("initLayout"); e.preservedPoints ? a.each(function(_) { var w = a.getId(_); a.setItemLayout(_, n[w] || [NaN, NaN]); }) : !u || u === "none" ? jQ(e) : u === "circular" && XQ(e, "value"); var l = a.getDataExtent("value"), c = o.getDataExtent("value"), f = s.get("repulsion"), h = s.get("edgeLength"), p = le(f) ? f : [f, f], d = le(h) ? h : [h, h]; d = [d[1], d[0]]; var v = a.mapArray("value", function(_, w) { var x = a.getItemLayout(w), C = Fr(_, l, p); return isNaN(C) && (C = (p[0] + p[1]) / 2), { w: C, rep: C, fixed: a.getItemModel(w).get("fixed"), p: !x || isNaN(x[0]) || isNaN(x[1]) ? null : x }; }), g = o.mapArray("value", function(_, w) { var x = i.getEdgeByIndex(w), C = Fr(_, c, d); isNaN(C) && (C = (d[0] + d[1]) / 2); var S = x.getModel(), b = $u(x.getModel().get(["lineStyle", "curveness"]), -JF(x, e, w, !0), 0); return { n1: v[x.node1.dataIndex], n2: v[x.node2.dataIndex], d: C, curveness: b, ignoreForceLayout: S.get("ignoreForceLayout") }; }), m = t.getBoundingRect(), y = f3e(v, g, { rect: m, gravity: s.get("gravity"), friction: s.get("friction") }); y.beforeStep(function(_, w) { for (var x = 0, C = _.length; x < C; x++) _[x].fixed && oo(_[x].p, i.getNodeByIndex(x).getLayout()); }), y.afterStep(function(_, w, x) { for (var C = 0, S = _.length; C < S; C++) _[C].fixed || i.getNodeByIndex(C).setLayout(_[C].p), n[a.getId(C)] = _[C].p; for (var C = 0, S = w.length; C < S; C++) { var b = w[C], E = i.getEdgeByIndex(C), T = b.n1.p, P = b.n2.p, I = E.getLayout(); I = I ? I.slice() : [], I[0] = I[0] || [], I[1] = I[1] || [], oo(I[0], T), oo(I[1], P), +b.curveness && (I[2] = [(T[0] + P[0]) / 2 - (T[1] - P[1]) * b.curveness, (T[1] + P[1]) / 2 - (P[0] - T[0]) * b.curveness]), E.setLayout(I); } }), e.forceLayout = y, e.preservedPoints = n, y.step(); } else e.forceLayout = null; }); } function p3e(r, e, t) { var n = oe(r.getBoxLayoutParams(), { aspect: t }); return Bi(n, { width: e.getWidth(), height: e.getHeight() }); } function d3e(r, e) { var t = []; return r.eachSeriesByType("graph", function(n) { var i = n.get("coordinateSystem"); if (!i || i === "view") { var a = n.getData(), o = a.mapArray(function(g) { var m = a.getItemModel(g); return [+m.get("x"), +m.get("y")]; }), s = [], u = []; GT(o, s, u), u[0] - s[0] === 0 && (u[0] += 1, s[0] -= 1), u[1] - s[1] === 0 && (u[1] += 1, s[1] -= 1); var l = (u[0] - s[0]) / (u[1] - s[1]), c = p3e(n, e, l); isNaN(l) && (s = [c.x, c.y], u = [c.x + c.width, c.y + c.height]); var f = u[0] - s[0], h = u[1] - s[1], p = c.width, d = c.height, v = n.coordinateSystem = new qw(); v.zoomLimit = n.get("scaleLimit"), v.setBoundingRect(s[0], s[1], f, h), v.setViewRect(c.x, c.y, p, d), v.setCenter(n.get("center"), e), v.setZoom(n.get("zoom")), t.push(v); } }), t; } var f8 = fa.prototype, KA = UT.prototype, qQ = function() { function r() { this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1; } return r; }(); (function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e; })(qQ); function JA(r) { return isNaN(+r.cpx1) || isNaN(+r.cpy1); } var v3e = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "ec-line", n; } return e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new qQ(); }, e.prototype.buildPath = function(t, n) { JA(n) ? f8.buildPath.call(this, t, n) : KA.buildPath.call(this, t, n); }, e.prototype.pointAt = function(t) { return JA(this.shape) ? f8.pointAt.call(this, t) : KA.pointAt.call(this, t); }, e.prototype.tangentAt = function(t) { var n = this.shape, i = JA(n) ? [n.x2 - n.x1, n.y2 - n.y1] : KA.tangentAt.call(this, t); return Lw(i, i); }, e; }(Tt); const g3e = v3e; var QA = ["fromSymbol", "toSymbol"]; function h8(r) { return "_" + r + "Type"; } function p8(r, e, t) { var n = e.getItemVisual(t, r); if (!(!n || n === "none")) { var i = e.getItemVisual(t, r + "Size"), a = e.getItemVisual(t, r + "Rotate"), o = e.getItemVisual(t, r + "Offset"), s = e.getItemVisual(t, r + "KeepAspect"), u = Vw(i), l = Oy(o || 0, u), c = vi(n, -u[0] / 2 + l[0], -u[1] / 2 + l[1], u[0], u[1], null, s); return c.__specifiedRotation = a == null || isNaN(a) ? void 0 : +a * Math.PI / 180 || 0, c.name = r, c; } } function m3e(r) { var e = new g3e({ name: "line", subPixelOptimize: !0 }); return P2(e.shape, r), e; } function P2(r, e) { r.x1 = e[0][0], r.y1 = e[0][1], r.x2 = e[1][0], r.y2 = e[1][1], r.percent = 1; var t = e[2]; t ? (r.cpx1 = t[0], r.cpy1 = t[1]) : (r.cpx1 = NaN, r.cpy1 = NaN); } var y3e = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this) || this; return a._createLine(t, n, i), a; } return e.prototype._createLine = function(t, n, i) { var a = t.hostModel, o = t.getItemLayout(n), s = m3e(o); s.shape.percent = 0, Cn(s, { shape: { percent: 1 } }, a, n), this.add(s), M(QA, function(u) { var l = p8(u, t, n); this.add(l), this[h8(u)] = t.getItemVisual(n, u); }, this), this._updateCommonStl(t, n, i); }, e.prototype.updateData = function(t, n, i) { var a = t.hostModel, o = this.childOfName("line"), s = t.getItemLayout(n), u = { shape: {} }; P2(u.shape, s), Ht(o, u, a, n), M(QA, function(l) { var c = t.getItemVisual(n, l), f = h8(l); if (this[f] !== c) { this.remove(this.childOfName(l)); var h = p8(l, t, n); this.add(h); } this[f] = c; }, this), this._updateCommonStl(t, n, i); }, e.prototype.getLinePath = function() { return this.childAt(0); }, e.prototype._updateCommonStl = function(t, n, i) { var a = t.hostModel, o = this.childOfName("line"), s = i && i.emphasisLineStyle, u = i && i.blurLineStyle, l = i && i.selectLineStyle, c = i && i.labelStatesModels, f = i && i.emphasisDisabled, h = i && i.focus, p = i && i.blurScope; if (!i || t.hasItemOption) { var d = t.getItemModel(n), v = d.getModel("emphasis"); s = v.getModel("lineStyle").getLineStyle(), u = d.getModel(["blur", "lineStyle"]).getLineStyle(), l = d.getModel(["select", "lineStyle"]).getLineStyle(), f = v.get("disabled"), h = v.get("focus"), p = v.get("blurScope"), c = wa(d); } var g = t.getItemVisual(n, "style"), m = g.stroke; o.useStyle(g), o.style.fill = null, o.style.strokeNoScale = !0, o.ensureState("emphasis").style = s, o.ensureState("blur").style = u, o.ensureState("select").style = l, M(QA, function(C) { var S = this.childOfName(C); if (S) { S.setColor(m), S.style.opacity = g.opacity; for (var b = 0; b < Co.length; b++) { var E = Co[b], T = o.getState(E); if (T) { var P = T.style || {}, I = S.ensureState(E), A = I.style || (I.style = {}); P.stroke != null && (A[S.__isEmptyBrush ? "stroke" : "fill"] = P.stroke), P.opacity != null && (A.opacity = P.opacity); } } S.markRedraw(); } }, this); var y = a.getRawValue(n); no(this, c, { labelDataIndex: n, labelFetcher: { getFormattedLabel: function(C, S) { return a.getFormattedLabel(C, S, t.dataType); } }, inheritColor: m || "#000", defaultOpacity: g.opacity, defaultText: (y == null ? t.getName(n) : isFinite(y) ? Xn(y) : y) + "" }); var _ = this.getTextContent(); if (_) { var w = c.normal; _.__align = _.style.align, _.__verticalAlign = _.style.verticalAlign, _.__position = w.get("position") || "middle"; var x = w.get("distance"); le(x) || (x = [x, x]), _.__labelDistance = x; } this.setTextConfig({ position: null, local: !0, inside: !1 }), Zn(this, h, p, f); }, e.prototype.highlight = function() { af(this); }, e.prototype.downplay = function() { of(this); }, e.prototype.updateLayout = function(t, n) { this.setLinePoints(t.getItemLayout(n)); }, e.prototype.setLinePoints = function(t) { var n = this.childOfName("line"); P2(n.shape, t), n.dirty(); }, e.prototype.beforeUpdate = function() { var t = this, n = t.childOfName("fromSymbol"), i = t.childOfName("toSymbol"), a = t.getTextContent(); if (!n && !i && (!a || a.ignore)) return; for (var o = 1, s = this.parent; s; ) s.scaleX && (o /= s.scaleX), s = s.parent; var u = t.childOfName("line"); if (!this.__dirty && !u.__dirty) return; var l = u.shape.percent, c = u.pointAt(0), f = u.pointAt(l), h = $p([], f, c); Lw(h, h); function p(T, P) { var I = T.__specifiedRotation; if (I == null) { var A = u.tangentAt(P); T.attr("rotation", (P === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(A[1], A[0])); } else T.attr("rotation", I); } if (n && (n.setPosition(c), p(n, 0), n.scaleX = n.scaleY = o * l, n.markRedraw()), i && (i.setPosition(f), p(i, 1), i.scaleX = i.scaleY = o * l, i.markRedraw()), a && !a.ignore) { a.x = a.y = 0, a.originX = a.originY = 0; var d = void 0, v = void 0, g = a.__labelDistance, m = g[0] * o, y = g[1] * o, _ = l / 2, w = u.tangentAt(_), x = [w[1], -w[0]], C = u.pointAt(_); x[1] > 0 && (x[0] = -x[0], x[1] = -x[1]); var S = w[0] < 0 ? -1 : 1; if (a.__position !== "start" && a.__position !== "end") { var b = -Math.atan2(w[1], w[0]); f[0] < c[0] && (b = Math.PI + b), a.rotation = b; } var E = void 0; switch (a.__position) { case "insideStartTop": case "insideMiddleTop": case "insideEndTop": case "middle": E = -y, v = "bottom"; break; case "insideStartBottom": case "insideMiddleBottom": case "insideEndBottom": E = y, v = "top"; break; default: E = 0, v = "middle"; } switch (a.__position) { case "end": a.x = h[0] * m + f[0], a.y = h[1] * y + f[1], d = h[0] > 0.8 ? "left" : h[0] < -0.8 ? "right" : "center", v = h[1] > 0.8 ? "top" : h[1] < -0.8 ? "bottom" : "middle"; break; case "start": a.x = -h[0] * m + c[0], a.y = -h[1] * y + c[1], d = h[0] > 0.8 ? "right" : h[0] < -0.8 ? "left" : "center", v = h[1] > 0.8 ? "bottom" : h[1] < -0.8 ? "top" : "middle"; break; case "insideStartTop": case "insideStart": case "insideStartBottom": a.x = m * S + c[0], a.y = c[1] + E, d = w[0] < 0 ? "right" : "left", a.originX = -m * S, a.originY = -E; break; case "insideMiddleTop": case "insideMiddle": case "insideMiddleBottom": case "middle": a.x = C[0], a.y = C[1] + E, d = "center", a.originY = -E; break; case "insideEndTop": case "insideEnd": case "insideEndBottom": a.x = -m * S + f[0], a.y = f[1] + E, d = w[0] >= 0 ? "right" : "left", a.originX = m * S, a.originY = -E; break; } a.scaleX = a.scaleY = o, a.setStyle({ verticalAlign: a.__verticalAlign || v, align: a.__align || d }); } }, e; }(rt); const QF = y3e; var _3e = function() { function r(e) { this.group = new rt(), this._LineCtor = e || QF; } return r.prototype.updateData = function(e) { var t = this; this._progressiveEls = null; var n = this, i = n.group, a = n._lineData; n._lineData = e, a || i.removeAll(); var o = d8(e); e.diff(a).add(function(s) { t._doAdd(e, s, o); }).update(function(s, u) { t._doUpdate(a, e, u, s, o); }).remove(function(s) { i.remove(a.getItemGraphicEl(s)); }).execute(); }, r.prototype.updateLayout = function() { var e = this._lineData; !e || e.eachItemGraphicEl(function(t, n) { t.updateLayout(e, n); }, this); }, r.prototype.incrementalPrepareUpdate = function(e) { this._seriesScope = d8(e), this._lineData = null, this.group.removeAll(); }, r.prototype.incrementalUpdate = function(e, t) { this._progressiveEls = []; function n(s) { !s.isGroup && !w3e(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0); } for (var i = e.start; i < e.end; i++) { var a = t.getItemLayout(i); if (eL(a)) { var o = new this._LineCtor(t, i, this._seriesScope); o.traverse(n), this.group.add(o), t.setItemGraphicEl(i, o), this._progressiveEls.push(o); } } }, r.prototype.remove = function() { this.group.removeAll(); }, r.prototype.eachRendered = function(e) { Xh(this._progressiveEls || this.group, e); }, r.prototype._doAdd = function(e, t, n) { var i = e.getItemLayout(t); if (!!eL(i)) { var a = new this._LineCtor(e, t, n); e.setItemGraphicEl(t, a), this.group.add(a); } }, r.prototype._doUpdate = function(e, t, n, i, a) { var o = e.getItemGraphicEl(n); if (!eL(t.getItemLayout(i))) { this.group.remove(o); return; } o ? o.updateData(t, i, a) : o = new this._LineCtor(t, i, a), t.setItemGraphicEl(i, o), this.group.add(o); }, r; }(); function w3e(r) { return r.animators && r.animators.length > 0; } function d8(r) { var e = r.hostModel, t = e.getModel("emphasis"); return { lineStyle: e.getModel("lineStyle").getLineStyle(), emphasisLineStyle: t.getModel(["lineStyle"]).getLineStyle(), blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(), selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(), emphasisDisabled: t.get("disabled"), blurScope: t.get("blurScope"), focus: t.get("focus"), labelStatesModels: wa(e) }; } function v8(r) { return isNaN(r[0]) || isNaN(r[1]); } function eL(r) { return r && !v8(r[0]) && !v8(r[1]); } const e5 = _3e; var tL = [], rL = [], nL = [], Zv = ia, iL = Qp, g8 = Math.abs; function m8(r, e, t) { for (var n = r[0], i = r[1], a = r[2], o = 1 / 0, s, u = t * t, l = 0.1, c = 0.1; c <= 0.9; c += 0.1) { tL[0] = Zv(n[0], i[0], a[0], c), tL[1] = Zv(n[1], i[1], a[1], c); var f = g8(iL(tL, e) - u); f < o && (o = f, s = c); } for (var h = 0; h < 32; h++) { var p = s + l; rL[0] = Zv(n[0], i[0], a[0], s), rL[1] = Zv(n[1], i[1], a[1], s), nL[0] = Zv(n[0], i[0], a[0], p), nL[1] = Zv(n[1], i[1], a[1], p); var f = iL(rL, e) - u; if (g8(f) < 0.01) break; var d = iL(nL, e) - u; l /= 2, f < 0 ? d >= 0 ? s = s + l : s = s - l : d >= 0 ? s = s - l : s = s + l; } return s; } function aL(r, e) { var t = [], n = h1, i = [[], [], []], a = [[], []], o = []; e /= 2, r.eachEdge(function(s, u) { var l = s.getLayout(), c = s.getVisual("fromSymbol"), f = s.getVisual("toSymbol"); l.__original || (l.__original = [Nc(l[0]), Nc(l[1])], l[2] && l.__original.push(Nc(l[2]))); var h = l.__original; if (l[2] != null) { if (oo(i[0], h[0]), oo(i[1], h[2]), oo(i[2], h[1]), c && c !== "none") { var p = t_(s.node1), d = m8(i, h[0], p * e); n(i[0][0], i[1][0], i[2][0], d, t), i[0][0] = t[3], i[1][0] = t[4], n(i[0][1], i[1][1], i[2][1], d, t), i[0][1] = t[3], i[1][1] = t[4]; } if (f && f !== "none") { var p = t_(s.node2), d = m8(i, h[1], p * e); n(i[0][0], i[1][0], i[2][0], d, t), i[1][0] = t[1], i[2][0] = t[2], n(i[0][1], i[1][1], i[2][1], d, t), i[1][1] = t[1], i[2][1] = t[2]; } oo(l[0], i[0]), oo(l[1], i[2]), oo(l[2], i[1]); } else { if (oo(a[0], h[0]), oo(a[1], h[1]), $p(o, a[1], a[0]), Lw(o, o), c && c !== "none") { var p = t_(s.node1); hM(a[0], a[0], o, p * e); } if (f && f !== "none") { var p = t_(s.node2); hM(a[1], a[1], o, -p * e); } oo(l[0], a[0]), oo(l[1], a[1]); } }); } function y8(r) { return r.type === "view"; } var x3e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t, n) { var i = new Uw(), a = new e5(), o = this.group; this._controller = new Xw(n.getZr()), this._controllerHost = { target: o }, o.add(i.group), o.add(a.group), this._symbolDraw = i, this._lineDraw = a, this._firstRender = !0; }, e.prototype.render = function(t, n, i) { var a = this, o = t.coordinateSystem; this._model = t; var s = this._symbolDraw, u = this._lineDraw, l = this.group; if (y8(o)) { var c = { x: o.x, y: o.y, scaleX: o.scaleX, scaleY: o.scaleY }; this._firstRender ? l.attr(c) : Ht(l, c, t); } aL(t.getGraph(), e_(t)); var f = t.getData(); s.updateData(f); var h = t.getEdgeData(); u.updateData(h), this._updateNodeAndLinkScale(), this._updateController(t, n, i), clearTimeout(this._layoutTimeout); var p = t.forceLayout, d = t.get(["force", "layoutAnimation"]); p && this._startForceLayoutIteration(p, d), f.graph.eachNode(function(y) { var _ = y.dataIndex, w = y.getGraphicEl(), x = y.getModel(); if (!!w) { w.off("drag").off("dragend"); var C = x.get("draggable"); C && w.on("drag", function() { p && (p.warmUp(), !a._layouting && a._startForceLayoutIteration(p, d), p.setFixed(_), f.setItemLayout(_, [w.x, w.y])); }).on("dragend", function() { p && p.setUnfixed(_); }), w.setDraggable(C && !!p, !!x.get("cursor")); var S = x.get(["emphasis", "focus"]); S === "adjacency" && (nt(w).focus = y.getAdjacentDataIndices()); } }), f.graph.eachEdge(function(y) { var _ = y.getGraphicEl(), w = y.getModel().get(["emphasis", "focus"]); !_ || w === "adjacency" && (nt(_).focus = { edge: [y.dataIndex], node: [y.node1.dataIndex, y.node2.dataIndex] }); }); var v = t.get("layout") === "circular" && t.get(["circular", "rotateLabel"]), g = f.getLayout("cx"), m = f.getLayout("cy"); f.eachItemGraphicEl(function(y, _) { var w = f.getItemModel(_), x = w.get(["label", "rotate"]) || 0, C = y.getSymbolPath(); if (v) { var S = f.getItemLayout(_), b = Math.atan2(S[1] - m, S[0] - g); b < 0 && (b = Math.PI * 2 + b); var E = S[0] < g; E && (b = b - Math.PI); var T = E ? "left" : "right"; C.setTextConfig({ rotation: -b, position: T, origin: "center" }); var P = C.ensureState("emphasis"); oe(P.textConfig || (P.textConfig = {}), { position: T }); } else C.setTextConfig({ rotation: x *= Math.PI / 180 }); }), this._firstRender = !1; }, e.prototype.dispose = function() { this._controller && this._controller.dispose(), this._controllerHost = null; }, e.prototype._startForceLayoutIteration = function(t, n) { var i = this; (function a() { t.step(function(o) { i.updateLayout(i._model), (i._layouting = !o) && (n ? i._layoutTimeout = setTimeout(a, 16) : a()); }); })(); }, e.prototype._updateController = function(t, n, i) { var a = this, o = this._controller, s = this._controllerHost, u = this.group; if (o.setPointerChecker(function(l, c, f) { var h = u.getBoundingRect(); return h.applyTransform(u.transform), h.contain(c, f) && !cP(l, i, t); }), !y8(t.coordinateSystem)) { o.disable(); return; } o.enable(t.get("roam")), s.zoomLimit = t.get("scaleLimit"), s.zoom = t.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(l) { HF(s, l.dx, l.dy), i.dispatchAction({ seriesId: t.id, type: "graphRoam", dx: l.dx, dy: l.dy }); }).on("zoom", function(l) { UF(s, l.scale, l.originX, l.originY), i.dispatchAction({ seriesId: t.id, type: "graphRoam", zoom: l.scale, originX: l.originX, originY: l.originY }), a._updateNodeAndLinkScale(), aL(t.getGraph(), e_(t)), a._lineDraw.updateLayout(), i.updateLabelLayout(); }); }, e.prototype._updateNodeAndLinkScale = function() { var t = this._model, n = t.getData(), i = e_(t); n.eachItemGraphicEl(function(a, o) { a && a.setSymbolScale(i); }); }, e.prototype.updateLayout = function(t) { aL(t.getGraph(), e_(t)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout(); }, e.prototype.remove = function(t, n) { this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove(); }, e.type = "graph", e; }(an); const C3e = x3e; function Kv(r) { return "_EC_" + r; } var S3e = function() { function r(e) { this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1; } return r.prototype.isDirected = function() { return this._directed; }, r.prototype.addNode = function(e, t) { e = e == null ? "" + t : "" + e; var n = this._nodesMap; if (n[Kv(e)]) { process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id"); return; } var i = new Op(e, t); return i.hostGraph = this, this.nodes.push(i), n[Kv(e)] = i, i; }, r.prototype.getNodeByIndex = function(e) { var t = this.data.getRawIndex(e); return this.nodes[t]; }, r.prototype.getNodeById = function(e) { return this._nodesMap[Kv(e)]; }, r.prototype.addEdge = function(e, t, n) { var i = this._nodesMap, a = this._edgesMap; if ($t(e) && (e = this.nodes[e]), $t(t) && (t = this.nodes[t]), e instanceof Op || (e = i[Kv(e)]), t instanceof Op || (t = i[Kv(t)]), !(!e || !t)) { var o = e.id + "-" + t.id, s = new ZQ(e, t, n); return s.hostGraph = this, this._directed && (e.outEdges.push(s), t.inEdges.push(s)), e.edges.push(s), e !== t && t.edges.push(s), this.edges.push(s), a[o] = s, s; } }, r.prototype.getEdgeByIndex = function(e) { var t = this.edgeData.getRawIndex(e); return this.edges[t]; }, r.prototype.getEdge = function(e, t) { e instanceof Op && (e = e.id), t instanceof Op && (t = t.id); var n = this._edgesMap; return this._directed ? n[e + "-" + t] : n[e + "-" + t] || n[t + "-" + e]; }, r.prototype.eachNode = function(e, t) { for (var n = this.nodes, i = n.length, a = 0; a < i; a++) n[a].dataIndex >= 0 && e.call(t, n[a], a); }, r.prototype.eachEdge = function(e, t) { for (var n = this.edges, i = n.length, a = 0; a < i; a++) n[a].dataIndex >= 0 && n[a].node1.dataIndex >= 0 && n[a].node2.dataIndex >= 0 && e.call(t, n[a], a); }, r.prototype.breadthFirstTraverse = function(e, t, n, i) { if (t instanceof Op || (t = this._nodesMap[Kv(t)]), !!t) { for (var a = n === "out" ? "outEdges" : n === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++) this.nodes[o].__visited = !1; if (!e.call(i, t, null)) for (var s = [t]; s.length; ) for (var u = s.shift(), l = u[a], o = 0; o < l.length; o++) { var c = l[o], f = c.node1 === u ? c.node2 : c.node1; if (!f.__visited) { if (e.call(i, f, u)) return; s.push(f), f.__visited = !0; } } } }, r.prototype.update = function() { for (var e = this.data, t = this.edgeData, n = this.nodes, i = this.edges, a = 0, o = n.length; a < o; a++) n[a].dataIndex = -1; for (var a = 0, o = e.count(); a < o; a++) n[e.getRawIndex(a)].dataIndex = a; t.filterSelf(function(s) { var u = i[t.getRawIndex(s)]; return u.node1.dataIndex >= 0 && u.node2.dataIndex >= 0; }); for (var a = 0, o = i.length; a < o; a++) i[a].dataIndex = -1; for (var a = 0, o = t.count(); a < o; a++) i[t.getRawIndex(a)].dataIndex = a; }, r.prototype.clone = function() { for (var e = new r(this._directed), t = this.nodes, n = this.edges, i = 0; i < t.length; i++) e.addNode(t[i].id, t[i].dataIndex); for (var i = 0; i < n.length; i++) { var a = n[i]; e.addEdge(a.node1.id, a.node2.id, a.dataIndex); } return e; }, r; }(), Op = function() { function r(e, t) { this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e == null ? "" : e, this.dataIndex = t == null ? -1 : t; } return r.prototype.degree = function() { return this.edges.length; }, r.prototype.inDegree = function() { return this.inEdges.length; }, r.prototype.outDegree = function() { return this.outEdges.length; }, r.prototype.getModel = function(e) { if (!(this.dataIndex < 0)) { var t = this.hostGraph, n = t.data.getItemModel(this.dataIndex); return n.getModel(e); } }, r.prototype.getAdjacentDataIndices = function() { for (var e = { edge: [], node: [] }, t = 0; t < this.edges.length; t++) { var n = this.edges[t]; n.dataIndex < 0 || (e.edge.push(n.dataIndex), e.node.push(n.node1.dataIndex, n.node2.dataIndex)); } return e; }, r; }(), ZQ = function() { function r(e, t, n) { this.dataIndex = -1, this.node1 = e, this.node2 = t, this.dataIndex = n == null ? -1 : n; } return r.prototype.getModel = function(e) { if (!(this.dataIndex < 0)) { var t = this.hostGraph, n = t.edgeData.getItemModel(this.dataIndex); return n.getModel(e); } }, r.prototype.getAdjacentDataIndices = function() { return { edge: [this.dataIndex], node: [this.node1.dataIndex, this.node2.dataIndex] }; }, r; }(); function KQ(r, e) { return { getValue: function(t) { var n = this[r][e]; return n.getStore().get(n.getDimensionIndex(t || "value"), this.dataIndex); }, setVisual: function(t, n) { this.dataIndex >= 0 && this[r][e].setItemVisual(this.dataIndex, t, n); }, getVisual: function(t) { return this[r][e].getItemVisual(this.dataIndex, t); }, setLayout: function(t, n) { this.dataIndex >= 0 && this[r][e].setItemLayout(this.dataIndex, t, n); }, getLayout: function() { return this[r][e].getItemLayout(this.dataIndex); }, getGraphicEl: function() { return this[r][e].getItemGraphicEl(this.dataIndex); }, getRawIndex: function() { return this[r][e].getRawIndex(this.dataIndex); } }; } gi(Op, KQ("hostGraph", "data")); gi(ZQ, KQ("hostGraph", "edgeData")); const E3e = S3e; function JQ(r, e, t, n, i) { for (var a = new E3e(n), o = 0; o < r.length; o++) a.addNode(si( r[o].id, r[o].name, o ), o); for (var s = [], u = [], l = 0, o = 0; o < e.length; o++) { var c = e[o], f = c.source, h = c.target; a.addEdge(f, h, l) && (u.push(c), s.push(si(Li(c.id, null), f + " > " + h)), l++); } var p = t.get("coordinateSystem"), d; if (p === "cartesian2d" || p === "polar") d = _f(r, t); else { var v = Ly.get(p), g = v ? v.dimensions || [] : []; _t(g, "value") < 0 && g.concat(["value"]); var m = Gw(r, { coordDimensions: g, encodeDefine: t.getEncode() }).dimensions; d = new ho(m, t), d.initData(r); } var y = new ho(["value"], t); return y.initData(u, s), i && i(d, y), MQ({ mainData: d, struct: a, structAttr: "graph", datas: { node: d, edge: y }, datasAttr: { node: "data", edge: "edgeData" } }), a.update(), a; } var b3e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.hasSymbolVisual = !0, t; } return e.prototype.init = function(t) { r.prototype.init.apply(this, arguments); var n = this; function i() { return n._categoriesData; } this.legendVisualProvider = new Yw(i, i), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData(); }, e.prototype.mergeOption = function(t) { r.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData(); }, e.prototype.mergeDefaultAndTheme = function(t) { r.prototype.mergeDefaultAndTheme.apply(this, arguments), Vd(t, "edgeLabel", ["show"]); }, e.prototype.getInitialData = function(t, n) { var i = t.edges || t.links || [], a = t.data || t.nodes || [], o = this; if (a && i) { o3e(this); var s = JQ(a, i, this, !0, u); return M(s.edges, function(l) { s3e(l.node1, l.node2, this, l.dataIndex); }, this), s.data; } function u(l, c) { l.wrapMethod("getItemModel", function(d) { var v = o._categoriesModels, g = d.getShallow("category"), m = v[g]; return m && (m.parentModel = d.parentModel, d.parentModel = m), d; }); var f = rn.prototype.getModel; function h(d, v) { var g = f.call(this, d, v); return g.resolveParentPath = p, g; } c.wrapMethod("getItemModel", function(d) { return d.resolveParentPath = p, d.getModel = h, d; }); function p(d) { if (d && (d[0] === "label" || d[1] === "label")) { var v = d.slice(); return d[0] === "label" ? v[0] = "edgeLabel" : d[1] === "label" && (v[1] = "edgeLabel"), v; } return d; } } }, e.prototype.getGraph = function() { return this.getData().graph; }, e.prototype.getEdgeData = function() { return this.getGraph().edgeData; }, e.prototype.getCategoriesData = function() { return this._categoriesData; }, e.prototype.formatTooltip = function(t, n, i) { if (i === "edge") { var a = this.getData(), o = this.getDataParams(t, i), s = a.graph.getEdgeByIndex(t), u = a.getName(s.node1.dataIndex), l = a.getName(s.node2.dataIndex), c = []; return u != null && c.push(u), l != null && c.push(l), Ji("nameValue", { name: c.join(" > "), value: o.value, noValue: o.value == null }); } var f = _K({ series: this, dataIndex: t, multipleSeries: n }); return f; }, e.prototype._updateCategoriesData = function() { var t = ce(this.option.categories || [], function(i) { return i.value != null ? i : oe({ value: 0 }, i); }), n = new ho(["value"], this); n.initData(t), this._categoriesData = n, this._categoriesModels = n.mapArray(function(i) { return n.getItemModel(i); }); }, e.prototype.setZoom = function(t) { this.option.zoom = t; }, e.prototype.setCenter = function(t) { this.option.center = t; }, e.prototype.isAnimationEnabled = function() { return r.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"])); }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = { z: 2, coordinateSystem: "view", legendHoverLink: !0, layout: null, circular: { rotateLabel: !1 }, force: { initLayout: null, repulsion: [0, 50], gravity: 0.1, friction: 0.6, edgeLength: 30, layoutAnimation: !0 }, left: "center", top: "center", symbol: "circle", symbolSize: 10, edgeSymbol: ["none", "none"], edgeSymbolSize: 10, edgeLabel: { position: "middle", distance: 5 }, draggable: !1, roam: !1, center: null, zoom: 1, nodeScaleRatio: 0.6, label: { show: !1, formatter: "{b}" }, itemStyle: {}, lineStyle: { color: "#aaa", width: 1, opacity: 0.5 }, emphasis: { scale: !0, label: { show: !0 } }, select: { itemStyle: { borderColor: "#212121" } } }, e; }(bn); const T3e = b3e; var P3e = { type: "graphRoam", event: "graphRoam", update: "none" }; function I3e(r) { r.registerChartView(C3e), r.registerSeriesModel(T3e), r.registerProcessor(t3e), r.registerVisual(r3e), r.registerVisual(n3e), r.registerLayout(u3e), r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT, c3e), r.registerLayout(h3e), r.registerCoordinateSystem("graphView", { dimensions: qw.dimensions, create: d3e }), r.registerAction({ type: "focusNodeAdjacency", event: "focusNodeAdjacency", update: "series:focusNodeAdjacency" }, ci), r.registerAction({ type: "unfocusNodeAdjacency", event: "unfocusNodeAdjacency", update: "series:unfocusNodeAdjacency" }, ci), r.registerAction(P3e, function(e, t, n) { t.eachComponent({ mainType: "series", query: e }, function(i) { var a = i.coordinateSystem, o = jF(a, e, void 0, n); i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom); }); }); } var A3e = function() { function r() { this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0; } return r; }(), L3e = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "pointer", n; } return e.prototype.getDefaultShape = function() { return new A3e(); }, e.prototype.buildPath = function(t, n) { var i = Math.cos, a = Math.sin, o = n.r, s = n.width, u = n.angle, l = n.x - i(u) * s * (s >= o / 3 ? 1 : 2), c = n.y - a(u) * s * (s >= o / 3 ? 1 : 2); u = n.angle - Math.PI / 2, t.moveTo(l, c), t.lineTo(n.x + i(u) * s, n.y + a(u) * s), t.lineTo(n.x + i(n.angle) * o, n.y + a(n.angle) * o), t.lineTo(n.x - i(u) * s, n.y - a(u) * s), t.lineTo(l, c); }, e; }(Tt); const D3e = L3e; function M3e(r, e) { var t = r.get("center"), n = e.getWidth(), i = e.getHeight(), a = Math.min(n, i), o = ye(t[0], e.getWidth()), s = ye(t[1], e.getHeight()), u = ye(r.get("radius"), a / 2); return { cx: o, cy: s, r: u }; } function SC(r, e) { var t = r == null ? "" : r + ""; return e && (Se(e) ? t = e.replace("{value}", t) : ze(e) && (t = e(r))), t; } var O3e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { this.group.removeAll(); var a = t.get(["axisLine", "lineStyle", "color"]), o = M3e(t, i); this._renderMain(t, n, i, a, o), this._data = t.getData(); }, e.prototype.dispose = function() { }, e.prototype._renderMain = function(t, n, i, a, o) { var s = this.group, u = t.get("clockwise"), l = -t.get("startAngle") / 180 * Math.PI, c = -t.get("endAngle") / 180 * Math.PI, f = t.getModel("axisLine"), h = f.get("roundCap"), p = h ? FE : $o, d = f.get("show"), v = f.getModel("lineStyle"), g = v.get("width"), m = [l, c]; Lq(m, !u), l = m[0], c = m[1]; for (var y = c - l, _ = l, w = 0; d && w < a.length; w++) { var x = Math.min(Math.max(a[w][0], 0), 1); c = l + y * x; var C = new p({ shape: { startAngle: _, endAngle: c, cx: o.cx, cy: o.cy, clockwise: u, r0: o.r - g, r: o.r }, silent: !0 }); C.setStyle({ fill: a[w][1] }), C.setStyle(v.getLineStyle( ["color", "width"] )), s.add(C), _ = c; } var S = function(b) { if (b <= 0) return a[0][1]; var E; for (E = 0; E < a.length; E++) if (a[E][0] >= b && (E === 0 ? 0 : a[E - 1][0]) < b) return a[E][1]; return a[E - 1][1]; }; this._renderTicks(t, n, i, S, o, l, c, u, g), this._renderTitleAndDetail(t, n, i, S, o), this._renderAnchor(t, o), this._renderPointer(t, n, i, S, o, l, c, u, g); }, e.prototype._renderTicks = function(t, n, i, a, o, s, u, l, c) { for (var f = this.group, h = o.cx, p = o.cy, d = o.r, v = +t.get("min"), g = +t.get("max"), m = t.getModel("splitLine"), y = t.getModel("axisTick"), _ = t.getModel("axisLabel"), w = t.get("splitNumber"), x = y.get("splitNumber"), C = ye(m.get("length"), d), S = ye(y.get("length"), d), b = s, E = (u - s) / w, T = E / x, P = m.getModel("lineStyle").getLineStyle(), I = y.getModel("lineStyle").getLineStyle(), A = m.get("distance"), L, D, O = 0; O <= w; O++) { if (L = Math.cos(b), D = Math.sin(b), m.get("show")) { var N = A ? A + c : c, F = new fa({ shape: { x1: L * (d - N) + h, y1: D * (d - N) + p, x2: L * (d - C - N) + h, y2: D * (d - C - N) + p }, style: P, silent: !0 }); P.stroke === "auto" && F.setStyle({ stroke: a(O / w) }), f.add(F); } if (_.get("show")) { var N = _.get("distance") + A, k = SC(Xn(O / w * (g - v) + v), _.get("formatter")), G = a(O / w); f.add(new Yt({ style: Sn(_, { text: k, x: L * (d - C - N) + h, y: D * (d - C - N) + p, verticalAlign: D < -0.8 ? "top" : D > 0.8 ? "bottom" : "middle", align: L < -0.4 ? "left" : L > 0.4 ? "right" : "center" }, { inheritColor: G }), silent: !0 })); } if (y.get("show") && O !== w) { var N = y.get("distance"); N = N ? N + c : c; for (var U = 0; U <= x; U++) { L = Math.cos(b), D = Math.sin(b); var B = new fa({ shape: { x1: L * (d - N) + h, y1: D * (d - N) + p, x2: L * (d - S - N) + h, y2: D * (d - S - N) + p }, silent: !0, style: I }); I.stroke === "auto" && B.setStyle({ stroke: a((O + U / x) / w) }), f.add(B), b += T; } b -= T; } else b += E; } }, e.prototype._renderPointer = function(t, n, i, a, o, s, u, l, c) { var f = this.group, h = this._data, p = this._progressEls, d = [], v = t.get(["pointer", "show"]), g = t.getModel("progress"), m = g.get("show"), y = t.getData(), _ = y.mapDimension("value"), w = +t.get("min"), x = +t.get("max"), C = [w, x], S = [s, u]; function b(T, P) { var I = y.getItemModel(T), A = I.getModel("pointer"), L = ye(A.get("width"), o.r), D = ye(A.get("length"), o.r), O = t.get(["pointer", "icon"]), N = A.get("offsetCenter"), F = ye(N[0], o.r), k = ye(N[1], o.r), G = A.get("keepAspect"), U; return O ? U = vi(O, F - L / 2, k - D, L, D, null, G) : U = new D3e({ shape: { angle: -Math.PI / 2, width: L, r: D, x: F, y: k } }), U.rotation = -(P + Math.PI / 2), U.x = o.cx, U.y = o.cy, U; } function E(T, P) { var I = g.get("roundCap"), A = I ? FE : $o, L = g.get("overlap"), D = L ? g.get("width") : c / y.count(), O = L ? o.r - D : o.r - (T + 1) * D, N = L ? o.r : o.r - T * D, F = new A({ shape: { startAngle: s, endAngle: P, cx: o.cx, cy: o.cy, clockwise: l, r0: O, r: N } }); return L && (F.z2 = x - y.get(_, T) % x), F; } (m || v) && (y.diff(h).add(function(T) { var P = y.get(_, T); if (v) { var I = b(T, s); Cn(I, { rotation: -((isNaN(+P) ? S[0] : Fr(P, C, S, !0)) + Math.PI / 2) }, t), f.add(I), y.setItemGraphicEl(T, I); } if (m) { var A = E(T, s), L = g.get("clip"); Cn(A, { shape: { endAngle: Fr(P, C, S, L) } }, t), f.add(A), kM(t.seriesIndex, y.dataType, T, A), d[T] = A; } }).update(function(T, P) { var I = y.get(_, T); if (v) { var A = h.getItemGraphicEl(P), L = A ? A.rotation : s, D = b(T, L); D.rotation = L, Ht(D, { rotation: -((isNaN(+I) ? S[0] : Fr(I, C, S, !0)) + Math.PI / 2) }, t), f.add(D), y.setItemGraphicEl(T, D); } if (m) { var O = p[P], N = O ? O.shape.endAngle : s, F = E(T, N), k = g.get("clip"); Ht(F, { shape: { endAngle: Fr(I, C, S, k) } }, t), f.add(F), kM(t.seriesIndex, y.dataType, T, F), d[T] = F; } }).execute(), y.each(function(T) { var P = y.getItemModel(T), I = P.getModel("emphasis"), A = I.get("focus"), L = I.get("blurScope"), D = I.get("disabled"); if (v) { var O = y.getItemGraphicEl(T), N = y.getItemVisual(T, "style"), F = N.fill; if (O instanceof Ba) { var k = O.style; O.useStyle(oe({ image: k.image, x: k.x, y: k.y, width: k.width, height: k.height }, N)); } else O.useStyle(N), O.type !== "pointer" && O.setColor(F); O.setStyle(P.getModel(["pointer", "itemStyle"]).getItemStyle()), O.style.fill === "auto" && O.setStyle("fill", a(Fr(y.get(_, T), C, [0, 1], !0))), O.z2EmphasisLift = 0, Ra(O, P), Zn(O, A, L, D); } if (m) { var G = d[T]; G.useStyle(y.getItemVisual(T, "style")), G.setStyle(P.getModel(["progress", "itemStyle"]).getItemStyle()), G.z2EmphasisLift = 0, Ra(G, P), Zn(G, A, L, D); } }), this._progressEls = d); }, e.prototype._renderAnchor = function(t, n) { var i = t.getModel("anchor"), a = i.get("show"); if (a) { var o = i.get("size"), s = i.get("icon"), u = i.get("offsetCenter"), l = i.get("keepAspect"), c = vi(s, n.cx - o / 2 + ye(u[0], n.r), n.cy - o / 2 + ye(u[1], n.r), o, o, null, l); c.z2 = i.get("showAbove") ? 1 : 0, c.setStyle(i.getModel("itemStyle").getItemStyle()), this.group.add(c); } }, e.prototype._renderTitleAndDetail = function(t, n, i, a, o) { var s = this, u = t.getData(), l = u.mapDimension("value"), c = +t.get("min"), f = +t.get("max"), h = new rt(), p = [], d = [], v = t.isAnimationEnabled(), g = t.get(["pointer", "showAbove"]); u.diff(this._data).add(function(m) { p[m] = new Yt({ silent: !0 }), d[m] = new Yt({ silent: !0 }); }).update(function(m, y) { p[m] = s._titleEls[y], d[m] = s._detailEls[y]; }).execute(), u.each(function(m) { var y = u.getItemModel(m), _ = u.get(l, m), w = new rt(), x = a(Fr(_, [c, f], [0, 1], !0)), C = y.getModel("title"); if (C.get("show")) { var S = C.get("offsetCenter"), b = o.cx + ye(S[0], o.r), E = o.cy + ye(S[1], o.r), T = p[m]; T.attr({ z2: g ? 0 : 2, style: Sn(C, { x: b, y: E, text: u.getName(m), align: "center", verticalAlign: "middle" }, { inheritColor: x }) }), w.add(T); } var P = y.getModel("detail"); if (P.get("show")) { var I = P.get("offsetCenter"), A = o.cx + ye(I[0], o.r), L = o.cy + ye(I[1], o.r), D = ye(P.get("width"), o.r), O = ye(P.get("height"), o.r), N = t.get(["progress", "show"]) ? u.getItemVisual(m, "style").fill : x, T = d[m], F = P.get("formatter"); T.attr({ z2: g ? 0 : 2, style: Sn(P, { x: A, y: L, text: SC(_, F), width: isNaN(D) ? null : D, height: isNaN(O) ? null : O, align: "center", verticalAlign: "middle" }, { inheritColor: N }) }), CZ(T, { normal: P }, _, function(G) { return SC(G, F); }), v && SZ(T, m, u, t, { getFormattedLabel: function(G, U, B, X, j, ae) { return SC(ae ? ae.interpolatedValue : _, F); } }), w.add(T); } h.add(w); }), this.group.add(h), this._titleEls = p, this._detailEls = d; }, e.type = "gauge", e; }(an); const R3e = O3e; var N3e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.visualStyleAccessPath = "itemStyle", t; } return e.prototype.getInitialData = function(t, n) { return Ry(this, ["value"]); }, e.type = "series.gauge", e.defaultOption = { z: 2, colorBy: "data", center: ["50%", "50%"], legendHoverLink: !0, radius: "75%", startAngle: 225, endAngle: -45, clockwise: !0, min: 0, max: 100, splitNumber: 10, axisLine: { show: !0, roundCap: !1, lineStyle: { color: [[1, "#E6EBF8"]], width: 10 } }, progress: { show: !1, overlap: !0, width: 10, roundCap: !1, clip: !0 }, splitLine: { show: !0, length: 10, distance: 10, lineStyle: { color: "#63677A", width: 3, type: "solid" } }, axisTick: { show: !0, splitNumber: 5, length: 6, distance: 10, lineStyle: { color: "#63677A", width: 1, type: "solid" } }, axisLabel: { show: !0, distance: 15, color: "#464646", fontSize: 12 }, pointer: { icon: null, offsetCenter: [0, 0], show: !0, showAbove: !0, length: "60%", width: 6, keepAspect: !1 }, anchor: { show: !1, showAbove: !1, size: 6, icon: "circle", offsetCenter: [0, 0], keepAspect: !1, itemStyle: { color: "#fff", borderWidth: 0, borderColor: "#5470c6" } }, title: { show: !0, offsetCenter: [0, "20%"], color: "#464646", fontSize: 16, valueAnimation: !1 }, detail: { show: !0, backgroundColor: "rgba(0,0,0,0)", borderWidth: 0, borderColor: "#ccc", width: 100, height: null, padding: [5, 10], offsetCenter: [0, "40%"], color: "#464646", fontSize: 30, fontWeight: "bold", lineHeight: 30, valueAnimation: !1 } }, e; }(bn); const F3e = N3e; function B3e(r) { r.registerChartView(R3e), r.registerSeriesModel(F3e); } var k3e = ["itemStyle", "opacity"], V3e = function(r) { W(e, r); function e(t, n) { var i = r.call(this) || this, a = i, o = new jo(), s = new Yt(); return a.setTextContent(s), i.setTextGuideLine(o), i.updateData(t, n, !0), i; } return e.prototype.updateData = function(t, n, i) { var a = this, o = t.hostModel, s = t.getItemModel(n), u = t.getItemLayout(n), l = s.getModel("emphasis"), c = s.get(k3e); c = c == null ? 1 : c, i || nl(a), a.useStyle(t.getItemVisual(n, "style")), a.style.lineJoin = "round", i ? (a.setShape({ points: u.points }), a.style.opacity = 0, Cn(a, { style: { opacity: c } }, o, n)) : Ht(a, { style: { opacity: c }, shape: { points: u.points } }, o, n), Ra(a, s), this._updateLabel(t, n), Zn(this, l.get("focus"), l.get("blurScope"), l.get("disabled")); }, e.prototype._updateLabel = function(t, n) { var i = this, a = this.getTextGuideLine(), o = i.getTextContent(), s = t.hostModel, u = t.getItemModel(n), l = t.getItemLayout(n), c = l.label, f = t.getItemVisual(n, "style"), h = f.fill; no( o, wa(u), { labelFetcher: t.hostModel, labelDataIndex: n, defaultOpacity: f.opacity, defaultText: t.getName(n) }, { normal: { align: c.textAlign, verticalAlign: c.verticalAlign } } ), i.setTextConfig({ local: !0, inside: !!c.inside, insideStroke: h, outsideFill: h }); var p = c.linePoints; a.setShape({ points: p }), i.textGuideLineConfig = { anchor: p ? new ft(p[0][0], p[0][1]) : null }, Ht(o, { style: { x: c.x, y: c.y } }, s, n), o.attr({ rotation: c.rotation, originX: c.x, originY: c.y, z2: 10 }), RF(i, NF(u), { stroke: h }); }, e; }(Ho), G3e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.ignoreLabelLineUpdate = !0, t; } return e.prototype.render = function(t, n, i) { var a = t.getData(), o = this._data, s = this.group; a.diff(o).add(function(u) { var l = new V3e(a, u); a.setItemGraphicEl(u, l), s.add(l); }).update(function(u, l) { var c = o.getItemGraphicEl(l); c.updateData(a, u), s.add(c), a.setItemGraphicEl(u, c); }).remove(function(u) { var l = o.getItemGraphicEl(u); g1(l, t, u); }).execute(), this._data = a; }, e.prototype.remove = function() { this.group.removeAll(), this._data = null; }, e.prototype.dispose = function() { }, e.type = "funnel", e; }(an); const z3e = G3e; var $3e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t) { r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Yw(Ae(this.getData, this), Ae(this.getRawData, this)), this._defaultLabelLine(t); }, e.prototype.getInitialData = function(t, n) { return Ry(this, { coordDimensions: ["value"], encodeDefaulter: ut(cF, this) }); }, e.prototype._defaultLabelLine = function(t) { Vd(t, "labelLine", ["show"]); var n = t.labelLine, i = t.emphasis.labelLine; n.show = n.show && t.label.show, i.show = i.show && t.emphasis.label.show; }, e.prototype.getDataParams = function(t) { var n = this.getData(), i = r.prototype.getDataParams.call(this, t), a = n.mapDimension("value"), o = n.getSum(a); return i.percent = o ? +(n.get(a, t) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i; }, e.type = "series.funnel", e.defaultOption = { z: 2, legendHoverLink: !0, colorBy: "data", left: 80, top: 60, right: 80, bottom: 60, minSize: "0%", maxSize: "100%", sort: "descending", orient: "vertical", gap: 0, funnelAlign: "center", label: { show: !0, position: "outer" }, labelLine: { show: !0, length: 20, lineStyle: { width: 1 } }, itemStyle: { borderColor: "#fff", borderWidth: 1 }, emphasis: { label: { show: !0 } }, select: { itemStyle: { borderColor: "#212121" } } }, e; }(bn); const H3e = $3e; function U3e(r, e) { return Bi(r.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }); } function W3e(r, e) { for (var t = r.mapDimension("value"), n = r.mapArray(t, function(u) { return u; }), i = [], a = e === "ascending", o = 0, s = r.count(); o < s; o++) i[o] = o; return ze(e) ? i.sort(e) : e !== "none" && i.sort(function(u, l) { return a ? n[u] - n[l] : n[l] - n[u]; }), i; } function j3e(r) { var e = r.hostModel, t = e.get("orient"); r.each(function(n) { var i = r.getItemModel(n), a = i.getModel("label"), o = a.get("position"), s = i.getModel("labelLine"), u = r.getItemLayout(n), l = u.points, c = o === "inner" || o === "inside" || o === "center" || o === "insideLeft" || o === "insideRight", f, h, p, d; if (c) o === "insideLeft" ? (h = (l[0][0] + l[3][0]) / 2 + 5, p = (l[0][1] + l[3][1]) / 2, f = "left") : o === "insideRight" ? (h = (l[1][0] + l[2][0]) / 2 - 5, p = (l[1][1] + l[2][1]) / 2, f = "right") : (h = (l[0][0] + l[1][0] + l[2][0] + l[3][0]) / 4, p = (l[0][1] + l[1][1] + l[2][1] + l[3][1]) / 4, f = "center"), d = [[h, p], [h, p]]; else { var v = void 0, g = void 0, m = void 0, y = void 0, _ = s.get("length"); process.env.NODE_ENV !== "production" && (t === "vertical" && ["top", "bottom"].indexOf(o) > -1 && (o = "left", console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")), t === "horizontal" && ["left", "right"].indexOf(o) > -1 && (o = "bottom", console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))), o === "left" ? (v = (l[3][0] + l[0][0]) / 2, g = (l[3][1] + l[0][1]) / 2, m = v - _, h = m - 5, f = "right") : o === "right" ? (v = (l[1][0] + l[2][0]) / 2, g = (l[1][1] + l[2][1]) / 2, m = v + _, h = m + 5, f = "left") : o === "top" ? (v = (l[3][0] + l[0][0]) / 2, g = (l[3][1] + l[0][1]) / 2, y = g - _, p = y - 5, f = "center") : o === "bottom" ? (v = (l[1][0] + l[2][0]) / 2, g = (l[1][1] + l[2][1]) / 2, y = g + _, p = y + 5, f = "center") : o === "rightTop" ? (v = t === "horizontal" ? l[3][0] : l[1][0], g = t === "horizontal" ? l[3][1] : l[1][1], t === "horizontal" ? (y = g - _, p = y - 5, f = "center") : (m = v + _, h = m + 5, f = "top")) : o === "rightBottom" ? (v = l[2][0], g = l[2][1], t === "horizontal" ? (y = g + _, p = y + 5, f = "center") : (m = v + _, h = m + 5, f = "bottom")) : o === "leftTop" ? (v = l[0][0], g = t === "horizontal" ? l[0][1] : l[1][1], t === "horizontal" ? (y = g - _, p = y - 5, f = "center") : (m = v - _, h = m - 5, f = "right")) : o === "leftBottom" ? (v = t === "horizontal" ? l[1][0] : l[3][0], g = t === "horizontal" ? l[1][1] : l[2][1], t === "horizontal" ? (y = g + _, p = y + 5, f = "center") : (m = v - _, h = m - 5, f = "right")) : (v = (l[1][0] + l[2][0]) / 2, g = (l[1][1] + l[2][1]) / 2, t === "horizontal" ? (y = g + _, p = y + 5, f = "center") : (m = v + _, h = m + 5, f = "left")), t === "horizontal" ? (m = v, h = m) : (y = g, p = y), d = [[v, g], [m, y]]; } u.label = { linePoints: d, x: h, y: p, verticalAlign: "middle", textAlign: f, inside: c }; }); } function Y3e(r, e) { r.eachSeriesByType("funnel", function(t) { var n = t.getData(), i = n.mapDimension("value"), a = t.get("sort"), o = U3e(t, e), s = t.get("orient"), u = o.width, l = o.height, c = W3e(n, a), f = o.x, h = o.y, p = s === "horizontal" ? [ye(t.get("minSize"), l), ye(t.get("maxSize"), l)] : [ye(t.get("minSize"), u), ye(t.get("maxSize"), u)], d = n.getDataExtent(i), v = t.get("min"), g = t.get("max"); v == null && (v = Math.min(d[0], 0)), g == null && (g = d[1]); var m = t.get("funnelAlign"), y = t.get("gap"), _ = s === "horizontal" ? u : l, w = (_ - y * (n.count() - 1)) / n.count(), x = function(L, D) { if (s === "horizontal") { var O = n.get(i, L) || 0, N = Fr(O, [v, g], p, !0), F = void 0; switch (m) { case "top": F = h; break; case "center": F = h + (l - N) / 2; break; case "bottom": F = h + (l - N); break; } return [[D, F], [D, F + N]]; } var k = n.get(i, L) || 0, G = Fr(k, [v, g], p, !0), U; switch (m) { case "left": U = f; break; case "center": U = f + (u - G) / 2; break; case "right": U = f + u - G; break; } return [[U, D], [U + G, D]]; }; a === "ascending" && (w = -w, y = -y, s === "horizontal" ? f += u : h += l, c = c.reverse()); for (var C = 0; C < c.length; C++) { var S = c[C], b = c[C + 1], E = n.getItemModel(S); if (s === "horizontal") { var T = E.get(["itemStyle", "width"]); T == null ? T = w : (T = ye(T, u), a === "ascending" && (T = -T)); var P = x(S, f), I = x(b, f + T); f += T + y, n.setItemLayout(S, { points: P.concat(I.slice().reverse()) }); } else { var A = E.get(["itemStyle", "height"]); A == null ? A = w : (A = ye(A, l), a === "ascending" && (A = -A)); var P = x(S, h), I = x(b, h + A); h += A + y, n.setItemLayout(S, { points: P.concat(I.slice().reverse()) }); } } j3e(n); }); } function X3e(r) { r.registerChartView(z3e), r.registerSeriesModel(H3e), r.registerLayout(Y3e), r.registerProcessor(jw("funnel")); } var q3e = 0.3, Z3e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._dataGroup = new rt(), t._initialized = !1, t; } return e.prototype.init = function() { this.group.add(this._dataGroup); }, e.prototype.render = function(t, n, i, a) { this._progressiveEls = null; var o = this._dataGroup, s = t.getData(), u = this._data, l = t.coordinateSystem, c = l.dimensions, f = w8(t); s.diff(u).add(h).update(p).remove(d).execute(); function h(g) { var m = _8(s, o, g, c, l); oL(m, s, g, f); } function p(g, m) { var y = u.getItemGraphicEl(m), _ = QQ(s, g, c, l); s.setItemGraphicEl(g, y), Ht(y, { shape: { points: _ } }, t, g), nl(y), oL(y, s, g, f); } function d(g) { var m = u.getItemGraphicEl(g); o.remove(m); } if (!this._initialized) { this._initialized = !0; var v = K3e(l, t, function() { setTimeout(function() { o.removeClipPath(); }); }); o.setClipPath(v); } this._data = s; }, e.prototype.incrementalPrepareRender = function(t, n, i) { this._initialized = !0, this._data = null, this._dataGroup.removeAll(); }, e.prototype.incrementalRender = function(t, n, i) { for (var a = n.getData(), o = n.coordinateSystem, s = o.dimensions, u = w8(n), l = this._progressiveEls = [], c = t.start; c < t.end; c++) { var f = _8(a, this._dataGroup, c, s, o); f.incremental = !0, oL(f, a, c, u), l.push(f); } }, e.prototype.remove = function() { this._dataGroup && this._dataGroup.removeAll(), this._data = null; }, e.type = "parallel", e; }(an); function K3e(r, e, t) { var n = r.model, i = r.getRect(), a = new Vt({ shape: { x: i.x, y: i.y, width: i.width, height: i.height } }), o = n.get("layout") === "horizontal" ? "width" : "height"; return a.setShape(o, 0), Cn(a, { shape: { width: i.width, height: i.height } }, e, t), a; } function QQ(r, e, t, n) { for (var i = [], a = 0; a < t.length; a++) { var o = t[a], s = r.get(r.mapDimension(o), e); J3e(s, n.getAxis(o).type) || i.push(n.dataToPoint(s, o)); } return i; } function _8(r, e, t, n, i) { var a = QQ(r, t, n, i), o = new jo({ shape: { points: a }, z2: 10 }); return e.add(o), r.setItemGraphicEl(t, o), o; } function w8(r) { var e = r.get("smooth", !0); return e === !0 && (e = q3e), e = nf(e), kd(e) && (e = 0), { smooth: e }; } function oL(r, e, t, n) { r.useStyle(e.getItemVisual(t, "style")), r.style.fill = null, r.setShape("smooth", n.smooth); var i = e.getItemModel(t), a = i.getModel("emphasis"); Ra(r, i, "lineStyle"), Zn(r, a.get("focus"), a.get("blurScope"), a.get("disabled")); } function J3e(r, e) { return e === "category" ? r == null : r == null || isNaN(r); } const Q3e = Z3e; var eBe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.visualStyleAccessPath = "lineStyle", t.visualDrawType = "stroke", t; } return e.prototype.getInitialData = function(t, n) { return _f(null, this, { useEncodeDefaulter: Ae(tBe, null, this) }); }, e.prototype.getRawIndicesByActiveState = function(t) { var n = this.coordinateSystem, i = this.getData(), a = []; return n.eachActiveState(i, function(o, s) { t === o && a.push(i.getRawIndex(s)); }), a; }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = { z: 2, coordinateSystem: "parallel", parallelIndex: 0, label: { show: !1 }, inactiveOpacity: 0.05, activeOpacity: 1, lineStyle: { width: 1, opacity: 0.45, type: "solid" }, emphasis: { label: { show: !1 } }, progressive: 500, smooth: !1, animationEasing: "linear" }, e; }(bn); function tBe(r) { var e = r.ecModel.getComponent("parallel", r.get("parallelIndex")); if (!!e) { var t = {}; return M(e.dimensions, function(n) { var i = rBe(n); t[n] = i; }), t; } } function rBe(r) { return +r.replace("dim", ""); } const nBe = eBe; var iBe = ["lineStyle", "opacity"], aBe = { seriesType: "parallel", reset: function(r, e) { var t = r.coordinateSystem, n = { normal: r.get(["lineStyle", "opacity"]), active: r.get("activeOpacity"), inactive: r.get("inactiveOpacity") }; return { progress: function(i, a) { t.eachActiveState(a, function(o, s) { var u = n[o]; if (o === "normal" && a.hasItemOption) { var l = a.getItemModel(s).get(iBe, !0); l != null && (u = l); } var c = a.ensureUniqueItemVisual(s, "style"); c.opacity = u; }, i.start, i.end); } }; } }; const oBe = aBe; function sBe(r) { uBe(r), lBe(r); } function uBe(r) { if (!r.parallel) { var e = !1; M(r.series, function(t) { t && t.type === "parallel" && (e = !0); }), e && (r.parallel = [{}]); } } function lBe(r) { var e = jr(r.parallelAxis); M(e, function(t) { if (!!Xe(t)) { var n = t.parallelIndex || 0, i = jr(r.parallel)[n]; i && i.parallelAxisDefault && dt(t, i.parallelAxisDefault, !1); } }); } var cBe = 5, fBe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { this._model = t, this._api = i, this._handlers || (this._handlers = {}, M(hBe, function(a, o) { i.getZr().on(o, this._handlers[o] = Ae(a, this)); }, this)), My(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate"); }, e.prototype.dispose = function(t, n) { x1(this, "_throttledDispatchExpand"), M(this._handlers, function(i, a) { n.getZr().off(a, i); }), this._handlers = null; }, e.prototype._throttledDispatchExpand = function(t) { this._dispatchExpand(t); }, e.prototype._dispatchExpand = function(t) { t && this._api.dispatchAction(oe({ type: "parallelAxisExpand" }, t)); }, e.type = "parallel", e; }(Gn), hBe = { mousedown: function(r) { sL(this, "click") && (this._mouseDownPoint = [r.offsetX, r.offsetY]); }, mouseup: function(r) { var e = this._mouseDownPoint; if (sL(this, "click") && e) { var t = [r.offsetX, r.offsetY], n = Math.pow(e[0] - t[0], 2) + Math.pow(e[1] - t[1], 2); if (n > cBe) return; var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX, r.offsetY]); i.behavior !== "none" && this._dispatchExpand({ axisExpandWindow: i.axisExpandWindow }); } this._mouseDownPoint = null; }, mousemove: function(r) { if (!(this._mouseDownPoint || !sL(this, "mousemove"))) { var e = this._model, t = e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX, r.offsetY]), n = t.behavior; n === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(n === "none" ? null : { axisExpandWindow: t.axisExpandWindow, animation: n === "jump" ? null : { duration: 0 } }); } } }; function sL(r, e) { var t = r._model; return t.get("axisExpandable") && t.get("axisExpandTriggerOn") === e; } const pBe = fBe; var dBe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function() { r.prototype.init.apply(this, arguments), this.mergeOption({}); }, e.prototype.mergeOption = function(t) { var n = this.option; t && dt(n, t, !0), this._initDimensions(); }, e.prototype.contains = function(t, n) { var i = t.get("parallelIndex"); return i != null && n.getComponent("parallel", i) === this; }, e.prototype.setAxisExpand = function(t) { M(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(n) { t.hasOwnProperty(n) && (this.option[n] = t[n]); }, this); }, e.prototype._initDimensions = function() { var t = this.dimensions = [], n = this.parallelAxisIndex = [], i = Wr(this.ecModel.queryComponents({ mainType: "parallelAxis" }), function(a) { return (a.get("parallelIndex") || 0) === this.componentIndex; }, this); M(i, function(a) { t.push("dim" + a.get("dim")), n.push(a.componentIndex); }); }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = { z: 0, left: 80, top: 60, right: 80, bottom: 60, layout: "horizontal", axisExpandable: !1, axisExpandCenter: null, axisExpandCount: 0, axisExpandWidth: 50, axisExpandRate: 17, axisExpandDebounce: 50, axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4], axisExpandTriggerOn: "click", parallelAxisDefault: null }, e; }(Rt); const vBe = dBe; var gBe = function(r) { W(e, r); function e(t, n, i, a, o) { var s = r.call(this, t, n, i) || this; return s.type = a || "value", s.axisIndex = o, s; } return e.prototype.isHorizontal = function() { return this.coordinateSystem.getModel().get("layout") !== "horizontal"; }, e; }(pl); const mBe = gBe; function _v(r, e, t, n, i, a) { r = r || 0; var o = t[1] - t[0]; if (i != null && (i = Jv(i, [0, o])), a != null && (a = Math.max(a, i != null ? i : 0)), n === "all") { var s = Math.abs(e[1] - e[0]); s = Jv(s, [0, o]), i = a = Jv(s, [i, a]), n = 0; } e[0] = Jv(e[0], t), e[1] = Jv(e[1], t); var u = uL(e, n); e[n] += r; var l = i || 0, c = t.slice(); u.sign < 0 ? c[0] += l : c[1] -= l, e[n] = Jv(e[n], c); var f; return f = uL(e, n), i != null && (f.sign !== u.sign || f.span < i) && (e[1 - n] = e[n] + u.sign * i), f = uL(e, n), a != null && f.span > a && (e[1 - n] = e[n] + f.sign * a), e; } function uL(r, e) { var t = r[e] - r[1 - e]; return { span: Math.abs(t), sign: t > 0 ? -1 : t < 0 ? 1 : e ? -1 : 1 }; } function Jv(r, e) { return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, r)); } var lL = M, eee = Math.min, tee = Math.max, x8 = Math.floor, yBe = Math.ceil, C8 = Xn, _Be = Math.PI, wBe = function() { function r(e, t, n) { this.type = "parallel", this._axesMap = $e(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, t, n); } return r.prototype._init = function(e, t, n) { var i = e.dimensions, a = e.parallelAxisIndex; lL(i, function(o, s) { var u = a[s], l = t.getComponent("parallelAxis", u), c = this._axesMap.set(o, new mBe(o, sP(l), [0, 0], l.get("type"), u)), f = c.type === "category"; c.onBand = f && l.get("boundaryGap"), c.inverse = l.get("inverse"), l.axis = c, c.model = l, c.coordinateSystem = l.coordinateSystem = this; }, this); }, r.prototype.update = function(e, t) { this._updateAxesFromSeries(this._model, e); }, r.prototype.containPoint = function(e) { var t = this._makeLayoutInfo(), n = t.axisBase, i = t.layoutBase, a = t.pixelDimIndex, o = e[1 - a], s = e[a]; return o >= n && o <= n + t.axisLength && s >= i && s <= i + t.layoutLength; }, r.prototype.getModel = function() { return this._model; }, r.prototype._updateAxesFromSeries = function(e, t) { t.eachSeries(function(n) { if (!!e.contains(n, t)) { var i = n.getData(); lL(this.dimensions, function(a) { var o = this._axesMap.get(a); o.scale.unionExtentFromData(i, i.mapDimension(a)), Fm(o.scale, o.model); }, this); } }, this); }, r.prototype.resize = function(e, t) { this._rect = Bi(e.getBoxLayoutParams(), { width: t.getWidth(), height: t.getHeight() }), this._layoutAxes(); }, r.prototype.getRect = function() { return this._rect; }, r.prototype._makeLayoutInfo = function() { var e = this._model, t = this._rect, n = ["x", "y"], i = ["width", "height"], a = e.get("layout"), o = a === "horizontal" ? 0 : 1, s = t[i[o]], u = [0, s], l = this.dimensions.length, c = EC(e.get("axisExpandWidth"), u), f = EC(e.get("axisExpandCount") || 0, [0, l]), h = e.get("axisExpandable") && l > 3 && l > f && f > 1 && c > 0 && s > 0, p = e.get("axisExpandWindow"), d; if (p) d = EC(p[1] - p[0], u), p[1] = p[0] + d; else { d = EC(c * (f - 1), u); var v = e.get("axisExpandCenter") || x8(l / 2); p = [c * v - d / 2], p[1] = p[0] + d; } var g = (s - d) / (l - f); g < 3 && (g = 0); var m = [x8(C8(p[0] / c, 1)) + 1, yBe(C8(p[1] / c, 1)) - 1], y = g / c * p[0]; return { layout: a, pixelDimIndex: o, layoutBase: t[n[o]], layoutLength: s, axisBase: t[n[1 - o]], axisLength: t[i[1 - o]], axisExpandable: h, axisExpandWidth: c, axisCollapseWidth: g, axisExpandWindow: p, axisCount: l, winInnerIndices: m, axisExpandWindow0Pos: y }; }, r.prototype._layoutAxes = function() { var e = this._rect, t = this._axesMap, n = this.dimensions, i = this._makeLayoutInfo(), a = i.layout; t.each(function(o) { var s = [0, i.axisLength], u = o.inverse ? 1 : 0; o.setExtent(s[u], s[1 - u]); }), lL(n, function(o, s) { var u = (i.axisExpandable ? CBe : xBe)(s, i), l = { horizontal: { x: u.position, y: i.axisLength }, vertical: { x: 0, y: u.position } }, c = { horizontal: _Be / 2, vertical: 0 }, f = [l[a].x + e.x, l[a].y + e.y], h = c[a], p = xs(); dv(p, p, h), Jl(p, p, f), this._axesLayout[o] = { position: f, rotation: h, transform: p, axisNameAvailableWidth: u.axisNameAvailableWidth, axisLabelShow: u.axisLabelShow, nameTruncateMaxWidth: u.nameTruncateMaxWidth, tickDirection: 1, labelDirection: 1 }; }, this); }, r.prototype.getAxis = function(e) { return this._axesMap.get(e); }, r.prototype.dataToPoint = function(e, t) { return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e), t); }, r.prototype.eachActiveState = function(e, t, n, i) { n == null && (n = 0), i == null && (i = e.count()); var a = this._axesMap, o = this.dimensions, s = [], u = []; M(o, function(g) { s.push(e.mapDimension(g)), u.push(a.get(g).model); }); for (var l = this.hasAxisBrushed(), c = n; c < i; c++) { var f = void 0; if (!l) f = "normal"; else { f = "active"; for (var h = e.getValues(s, c), p = 0, d = o.length; p < d; p++) { var v = u[p].getActiveState(h[p]); if (v === "inactive") { f = "inactive"; break; } } } t(f, c); } }, r.prototype.hasAxisBrushed = function() { for (var e = this.dimensions, t = this._axesMap, n = !1, i = 0, a = e.length; i < a; i++) t.get(e[i]).model.getActiveState() !== "normal" && (n = !0); return n; }, r.prototype.axisCoordToPoint = function(e, t) { var n = this._axesLayout[t]; return Uu([e, 0], n.transform); }, r.prototype.getAxisLayout = function(e) { return Qe(this._axesLayout[e]); }, r.prototype.getSlidedAxisExpandWindow = function(e) { var t = this._makeLayoutInfo(), n = t.pixelDimIndex, i = t.axisExpandWindow.slice(), a = i[1] - i[0], o = [0, t.axisExpandWidth * (t.axisCount - 1)]; if (!this.containPoint(e)) return { behavior: "none", axisExpandWindow: i }; var s = e[n] - t.layoutBase - t.axisExpandWindow0Pos, u, l = "slide", c = t.axisCollapseWidth, f = this._model.get("axisExpandSlideTriggerArea"), h = f[0] != null; if (c) h && c && s < a * f[0] ? (l = "jump", u = s - a * f[2]) : h && c && s > a * (1 - f[0]) ? (l = "jump", u = s - a * (1 - f[2])) : (u = s - a * f[1]) >= 0 && (u = s - a * (1 - f[1])) <= 0 && (u = 0), u *= t.axisExpandWidth / c, u ? _v(u, i, o, "all") : l = "none"; else { var p = i[1] - i[0], d = o[1] * s / p; i = [tee(0, d - p / 2)], i[1] = eee(o[1], i[0] + p), i[0] = i[1] - p; } return { axisExpandWindow: i, behavior: l }; }, r; }(); function EC(r, e) { return eee(tee(r, e[0]), e[1]); } function xBe(r, e) { var t = e.layoutLength / (e.axisCount - 1); return { position: t * r, axisNameAvailableWidth: t, axisLabelShow: !0 }; } function CBe(r, e) { var t = e.layoutLength, n = e.axisExpandWidth, i = e.axisCount, a = e.axisCollapseWidth, o = e.winInnerIndices, s, u = a, l = !1, c; return r < o[0] ? (s = r * a, c = a) : r <= o[1] ? (s = e.axisExpandWindow0Pos + r * n - e.axisExpandWindow[0], u = n, l = !0) : (s = t - (i - 1 - r) * a, c = a), { position: s, axisNameAvailableWidth: u, axisLabelShow: l, nameTruncateMaxWidth: c }; } const SBe = wBe; function EBe(r, e) { var t = []; return r.eachComponent("parallel", function(n, i) { var a = new SBe(n, r, e); a.name = "parallel_" + i, a.resize(n, e), n.coordinateSystem = a, a.model = n, t.push(a); }), r.eachSeries(function(n) { if (n.get("coordinateSystem") === "parallel") { var i = n.getReferringComponents("parallel", ui).models[0]; n.coordinateSystem = i.coordinateSystem; } }), t; } var bBe = { create: EBe }; const TBe = bBe; var ree = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.activeIntervals = [], t; } return e.prototype.getAreaSelectStyle = function() { return zd([ ["fill", "color"], ["lineWidth", "borderWidth"], ["stroke", "borderColor"], ["width", "width"], ["opacity", "opacity"] ])(this.getModel("areaSelectStyle")); }, e.prototype.setActiveIntervals = function(t) { var n = this.activeIntervals = Qe(t); if (n) for (var i = n.length - 1; i >= 0; i--) Js(n[i]); }, e.prototype.getActiveState = function(t) { var n = this.activeIntervals; if (!n.length) return "normal"; if (t == null || isNaN(+t)) return "inactive"; if (n.length === 1) { var i = n[0]; if (i[0] <= t && t <= i[1]) return "active"; } else for (var a = 0, o = n.length; a < o; a++) if (n[a][0] <= t && t <= n[a][1]) return "active"; return "inactive"; }, e; }(Rt); gi(ree, $w); const S8 = ree; var Ud = !0, M1 = Math.min, Vm = Math.max, PBe = Math.pow, IBe = 1e4, ABe = 6, LBe = 6, E8 = "globalPan", DBe = { w: [0, 0], e: [0, 1], n: [1, 0], s: [1, 1] }, MBe = { w: "ew", e: "ew", n: "ns", s: "ns", ne: "nesw", sw: "nesw", nw: "nwse", se: "nwse" }, b8 = { brushStyle: { lineWidth: 2, stroke: "rgba(210,219,238,0.3)", fill: "#D2DBEE" }, transformable: !0, brushMode: "single", removeOnClick: !1 }, OBe = 0, RBe = function(r) { W(e, r); function e(t) { var n = r.call(this) || this; return n._track = [], n._covers = [], n._handlers = {}, process.env.NODE_ENV !== "production" && Ze(t), n._zr = t, n.group = new rt(), n._uid = "brushController_" + OBe++, M(zBe, function(i, a) { this._handlers[a] = Ae(i, this); }, n), n; } return e.prototype.enableBrush = function(t) { return process.env.NODE_ENV !== "production" && Ze(this._mounted), this._brushType && this._doDisableBrush(), t.brushType && this._doEnableBrush(t), this; }, e.prototype._doEnableBrush = function(t) { var n = this._zr; this._enableGlobalPan || UNe(n, E8, this._uid), M(this._handlers, function(i, a) { n.on(a, i); }), this._brushType = t.brushType, this._brushOption = dt(Qe(b8), t, !0); }, e.prototype._doDisableBrush = function() { var t = this._zr; WNe(t, E8, this._uid), M(this._handlers, function(n, i) { t.off(i, n); }), this._brushType = this._brushOption = null; }, e.prototype.setPanels = function(t) { if (t && t.length) { var n = this._panels = {}; M(t, function(i) { n[i.panelId] = Qe(i); }); } else this._panels = null; return this; }, e.prototype.mount = function(t) { t = t || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = t.enableGlobalPan; var n = this.group; return this._zr.add(n), n.attr({ x: t.x || 0, y: t.y || 0, rotation: t.rotation || 0, scaleX: t.scaleX || 1, scaleY: t.scaleY || 1 }), this._transform = n.getLocalTransform(), this; }, e.prototype.updateCovers = function(t) { process.env.NODE_ENV !== "production" && Ze(this._mounted), t = ce(t, function(h) { return dt(Qe(b8), h, !0); }); var n = "\0-brush-index-", i = this._covers, a = this._covers = [], o = this, s = this._creatingCover; return new sf(i, t, l, u).add(c).update(c).remove(f).execute(), this; function u(h, p) { return (h.id != null ? h.id : n + p) + "-" + h.brushType; } function l(h, p) { return u(h.__brushOption, p); } function c(h, p) { var d = t[h]; if (p != null && i[p] === s) a[h] = i[p]; else { var v = a[h] = p != null ? (i[p].__brushOption = d, i[p]) : iee(o, nee(o, d)); t5(o, v); } } function f(h) { i[h] !== s && o.group.remove(i[h]); } }, e.prototype.unmount = function() { if (!(process.env.NODE_ENV !== "production" && !this._mounted)) return this.enableBrush(!1), I2(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this; }, e.prototype.dispose = function() { this.unmount(), this.off(); }, e; }(Cu); function nee(r, e) { var t = dP[e.brushType].createCover(r, e); return t.__brushOption = e, oee(t, e), r.group.add(t), t; } function iee(r, e) { var t = r5(e); return t.endCreating && (t.endCreating(r, e), oee(e, e.__brushOption)), e; } function aee(r, e) { var t = e.__brushOption; r5(e).updateCoverShape(r, e, t.range, t); } function oee(r, e) { var t = e.z; t == null && (t = IBe), r.traverse(function(n) { n.z = t, n.z2 = t; }); } function t5(r, e) { r5(e).updateCommon(r, e), aee(r, e); } function r5(r) { return dP[r.__brushOption.brushType]; } function n5(r, e, t) { var n = r._panels; if (!n) return Ud; var i, a = r._transform; return M(n, function(o) { o.isTargetByCursor(e, t, a) && (i = o); }), i; } function see(r, e) { var t = r._panels; if (!t) return Ud; var n = e.__brushOption.panelId; return n != null ? t[n] : Ud; } function I2(r) { var e = r._covers, t = e.length; return M(e, function(n) { r.group.remove(n); }, r), e.length = 0, !!t; } function Wd(r, e) { var t = ce(r._covers, function(n) { var i = n.__brushOption, a = Qe(i.range); return { brushType: i.brushType, panelId: i.panelId, range: a }; }); r.trigger("brush", { areas: t, isEnd: !!e.isEnd, removeOnClick: !!e.removeOnClick }); } function NBe(r) { var e = r._track; if (!e.length) return !1; var t = e[e.length - 1], n = e[0], i = t[0] - n[0], a = t[1] - n[1], o = PBe(i * i + a * a, 0.5); return o > ABe; } function uee(r) { var e = r.length - 1; return e < 0 && (e = 0), [r[0], r[e]]; } function lee(r, e, t, n) { var i = new rt(); return i.add(new Vt({ name: "main", style: i5(t), silent: !0, draggable: !0, cursor: "move", drift: ut(T8, r, e, i, ["n", "s", "w", "e"]), ondragend: ut(Wd, e, { isEnd: !0 }) })), M(n, function(a) { i.add(new Vt({ name: a.join(""), style: { opacity: 0 }, draggable: !0, silent: !0, invisible: !0, drift: ut(T8, r, e, i, a), ondragend: ut(Wd, e, { isEnd: !0 }) })); }), i; } function cee(r, e, t, n) { var i = n.brushStyle.lineWidth || 0, a = Vm(i, LBe), o = t[0][0], s = t[1][0], u = o - i / 2, l = s - i / 2, c = t[0][1], f = t[1][1], h = c - a + i / 2, p = f - a + i / 2, d = c - o, v = f - s, g = d + i, m = v + i; pc(r, e, "main", o, s, d, v), n.transformable && (pc(r, e, "w", u, l, a, m), pc(r, e, "e", h, l, a, m), pc(r, e, "n", u, l, g, a), pc(r, e, "s", u, p, g, a), pc(r, e, "nw", u, l, a, a), pc(r, e, "ne", h, l, a, a), pc(r, e, "sw", u, p, a, a), pc(r, e, "se", h, p, a, a)); } function A2(r, e) { var t = e.__brushOption, n = t.transformable, i = e.childAt(0); i.useStyle(i5(t)), i.attr({ silent: !n, cursor: n ? "move" : "default" }), M([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(a) { var o = e.childOfName(a.join("")), s = a.length === 1 ? L2(r, a[0]) : BBe(r, a); o && o.attr({ silent: !n, invisible: !n, cursor: n ? MBe[s] + "-resize" : null }); }); } function pc(r, e, t, n, i, a, o) { var s = e.childOfName(t); s && s.setShape(VBe(a5(r, e, [[n, i], [n + a, i + o]]))); } function i5(r) { return qe({ strokeNoScale: !0 }, r.brushStyle); } function fee(r, e, t, n) { var i = [M1(r, t), M1(e, n)], a = [Vm(r, t), Vm(e, n)]; return [ [i[0], a[0]], [i[1], a[1]] ]; } function FBe(r) { return nd(r.group); } function L2(r, e) { var t = { w: "left", e: "right", n: "top", s: "bottom" }, n = { left: "w", right: "e", top: "n", bottom: "s" }, i = jT(t[e], FBe(r)); return n[i]; } function BBe(r, e) { var t = [L2(r, e[0]), L2(r, e[1])]; return (t[0] === "e" || t[0] === "w") && t.reverse(), t.join(""); } function T8(r, e, t, n, i, a) { var o = t.__brushOption, s = r.toRectRange(o.range), u = hee(e, i, a); M(n, function(l) { var c = DBe[l]; s[c[0]][c[1]] += u[c[0]]; }), o.range = r.fromRectRange(fee(s[0][0], s[1][0], s[0][1], s[1][1])), t5(e, t), Wd(e, { isEnd: !1 }); } function kBe(r, e, t, n) { var i = e.__brushOption.range, a = hee(r, t, n); M(i, function(o) { o[0] += a[0], o[1] += a[1]; }), t5(r, e), Wd(r, { isEnd: !1 }); } function hee(r, e, t) { var n = r.group, i = n.transformCoordToLocal(e, t), a = n.transformCoordToLocal(0, 0); return [i[0] - a[0], i[1] - a[1]]; } function a5(r, e, t) { var n = see(r, e); return n && n !== Ud ? n.clipPath(t, r._transform) : Qe(t); } function VBe(r) { var e = M1(r[0][0], r[1][0]), t = M1(r[0][1], r[1][1]), n = Vm(r[0][0], r[1][0]), i = Vm(r[0][1], r[1][1]); return { x: e, y: t, width: n - e, height: i - t }; } function GBe(r, e, t) { if (!(!r._brushType || $Be(r, e.offsetX, e.offsetY))) { var n = r._zr, i = r._covers, a = n5(r, e, t); if (!r._dragging) for (var o = 0; o < i.length; o++) { var s = i[o].__brushOption; if (a && (a === Ud || s.panelId === a.panelId) && dP[s.brushType].contain(i[o], t[0], t[1])) return; } a && n.setCursorStyle("crosshair"); } } function D2(r) { var e = r.event; e.preventDefault && e.preventDefault(); } function M2(r, e, t) { return r.childOfName("main").contain(e, t); } function pee(r, e, t, n) { var i = r._creatingCover, a = r._creatingPanel, o = r._brushOption, s; if (r._track.push(t.slice()), NBe(r) || i) { if (a && !i) { o.brushMode === "single" && I2(r); var u = Qe(o); u.brushType = P8(u.brushType, a), u.panelId = a === Ud ? null : a.panelId, i = r._creatingCover = nee(r, u), r._covers.push(i); } if (i) { var l = dP[P8(r._brushType, a)], c = i.__brushOption; c.range = l.getCreatingRange(a5(r, i, r._track)), n && (iee(r, i), l.updateCommon(r, i)), aee(r, i), s = { isEnd: n }; } } else n && o.brushMode === "single" && o.removeOnClick && n5(r, e, t) && I2(r) && (s = { isEnd: n, removeOnClick: !0 }); return s; } function P8(r, e) { return r === "auto" ? (process.env.NODE_ENV !== "production" && Ze(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : r; } var zBe = { mousedown: function(r) { if (this._dragging) I8(this, r); else if (!r.target || !r.target.draggable) { D2(r); var e = this.group.transformCoordToLocal(r.offsetX, r.offsetY); this._creatingCover = null; var t = this._creatingPanel = n5(this, r, e); t && (this._dragging = !0, this._track = [e.slice()]); } }, mousemove: function(r) { var e = r.offsetX, t = r.offsetY, n = this.group.transformCoordToLocal(e, t); if (GBe(this, r, n), this._dragging) { D2(r); var i = pee(this, r, n, !1); i && Wd(this, i); } }, mouseup: function(r) { I8(this, r); } }; function I8(r, e) { if (r._dragging) { D2(e); var t = e.offsetX, n = e.offsetY, i = r.group.transformCoordToLocal(t, n), a = pee(r, e, i, !0); r._dragging = !1, r._track = [], r._creatingCover = null, a && Wd(r, a); } } function $Be(r, e, t) { var n = r._zr; return e < 0 || e > n.getWidth() || t < 0 || t > n.getHeight(); } var dP = { lineX: A8(0), lineY: A8(1), rect: { createCover: function(r, e) { function t(n) { return n; } return lee({ toRectRange: t, fromRectRange: t }, r, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]); }, getCreatingRange: function(r) { var e = uee(r); return fee(e[1][0], e[1][1], e[0][0], e[0][1]); }, updateCoverShape: function(r, e, t, n) { cee(r, e, t, n); }, updateCommon: A2, contain: M2 }, polygon: { createCover: function(r, e) { var t = new rt(); return t.add(new jo({ name: "main", style: i5(e), silent: !0 })), t; }, getCreatingRange: function(r) { return r; }, endCreating: function(r, e) { e.remove(e.childAt(0)), e.add(new Ho({ name: "main", draggable: !0, drift: ut(kBe, r, e), ondragend: ut(Wd, r, { isEnd: !0 }) })); }, updateCoverShape: function(r, e, t, n) { e.childAt(0).setShape({ points: a5(r, e, t) }); }, updateCommon: A2, contain: M2 } }; function A8(r) { return { createCover: function(e, t) { return lee({ toRectRange: function(n) { var i = [n, [0, 100]]; return r && i.reverse(), i; }, fromRectRange: function(n) { return n[r]; } }, e, t, [[["w"], ["e"]], [["n"], ["s"]]][r]); }, getCreatingRange: function(e) { var t = uee(e), n = M1(t[0][r], t[1][r]), i = Vm(t[0][r], t[1][r]); return [n, i]; }, updateCoverShape: function(e, t, n, i) { var a, o = see(e, t); if (o !== Ud && o.getLinearBrushOtherExtent) a = o.getLinearBrushOtherExtent(r); else { var s = e._zr; a = [0, [s.getWidth(), s.getHeight()][1 - r]]; } var u = [n, a]; r && u.reverse(), cee(e, t, u, i); }, updateCommon: A2, contain: M2 }; } const o5 = RBe; function dee(r) { return r = s5(r), function(e) { return yZ(e, r); }; } function vee(r, e) { return r = s5(r), function(t) { var n = e != null ? e : t, i = n ? r.width : r.height, a = n ? r.x : r.y; return [a, a + (i || 0)]; }; } function gee(r, e, t) { var n = s5(r); return function(i, a) { return n.contain(a[0], a[1]) && !cP(i, e, t); }; } function s5(r) { return gt.create(r); } var HBe = ["axisLine", "axisTickLabel", "axisName"], UBe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t, n) { r.prototype.init.apply(this, arguments), (this._brushController = new o5(n.getZr())).on("brush", Ae(this._onBrush, this)); }, e.prototype.render = function(t, n, i, a) { if (!WBe(t, n, a)) { this.axisModel = t, this.api = i, this.group.removeAll(); var o = this._axisGroup; if (this._axisGroup = new rt(), this.group.add(this._axisGroup), !!t.get("show")) { var s = YBe(t, n), u = s.coordinateSystem, l = t.getAreaSelectStyle(), c = l.width, f = t.axis.dim, h = u.getAxisLayout(f), p = oe({ strokeContainThreshold: c }, h), d = new uf(t, p); M(HBe, d.add, d), this._axisGroup.add(d.getGroup()), this._refreshBrushController(p, l, t, s, c, i), Nw(o, this._axisGroup, t); } } }, e.prototype._refreshBrushController = function(t, n, i, a, o, s) { var u = i.axis.getExtent(), l = u[1] - u[0], c = Math.min(30, Math.abs(l) * 0.1), f = gt.create({ x: u[0], y: -o / 2, width: l, height: o }); f.x -= c, f.width += 2 * c, this._brushController.mount({ enableGlobalPan: !0, rotation: t.rotation, x: t.position[0], y: t.position[1] }).setPanels([{ panelId: "pl", clipPath: dee(f), isTargetByCursor: gee(f, s, a), getLinearBrushOtherExtent: vee(f, 0) }]).enableBrush({ brushType: "lineX", brushStyle: n, removeOnClick: !0 }).updateCovers(jBe(i)); }, e.prototype._onBrush = function(t) { var n = t.areas, i = this.axisModel, a = i.axis, o = ce(n, function(s) { return [a.coordToData(s.range[0], !0), a.coordToData(s.range[1], !0)]; }); (!i.option.realtime === t.isEnd || t.removeOnClick) && this.api.dispatchAction({ type: "axisAreaSelect", parallelAxisId: i.id, intervals: o }); }, e.prototype.dispose = function() { this._brushController.dispose(); }, e.type = "parallelAxis", e; }(Gn); function WBe(r, e, t) { return t && t.type === "axisAreaSelect" && e.findComponents({ mainType: "parallelAxis", query: t })[0] === r; } function jBe(r) { var e = r.axis; return ce(r.activeIntervals, function(t) { return { brushType: "lineX", panelId: "pl", range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)] }; }); } function YBe(r, e) { return e.getComponent("parallel", r.get("parallelIndex")); } const XBe = UBe; var qBe = { type: "axisAreaSelect", event: "axisAreaSelected" }; function ZBe(r) { r.registerAction(qBe, function(e, t) { t.eachComponent({ mainType: "parallelAxis", query: e }, function(n) { n.axis.model.setActiveIntervals(e.intervals); }); }), r.registerAction("parallelAxisExpand", function(e, t) { t.eachComponent({ mainType: "parallel", query: e }, function(n) { n.setAxisExpand(e); }); }); } var KBe = { type: "value", areaSelectStyle: { width: 20, borderWidth: 1, borderColor: "rgba(160,197,232)", color: "rgba(160,197,232)", opacity: 0.3 }, realtime: !0, z: 10 }; function mee(r) { r.registerComponentView(pBe), r.registerComponentModel(vBe), r.registerCoordinateSystem("parallel", TBe), r.registerPreprocessor(sBe), r.registerComponentModel(S8), r.registerComponentView(XBe), km(r, "parallel", S8, KBe), ZBe(r); } function JBe(r) { bt(mee), r.registerChartView(Q3e), r.registerSeriesModel(nBe), r.registerVisual(r.PRIORITY.VISUAL.BRUSH, oBe); } var QBe = function() { function r() { this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.cpx2 = 0, this.cpy2 = 0, this.extent = 0; } return r; }(), eke = function(r) { W(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.getDefaultShape = function() { return new QBe(); }, e.prototype.buildPath = function(t, n) { var i = n.extent; t.moveTo(n.x1, n.y1), t.bezierCurveTo(n.cpx1, n.cpy1, n.cpx2, n.cpy2, n.x2, n.y2), n.orient === "vertical" ? (t.lineTo(n.x2 + i, n.y2), t.bezierCurveTo(n.cpx2 + i, n.cpy2, n.cpx1 + i, n.cpy1, n.x1 + i, n.y1)) : (t.lineTo(n.x2, n.y2 + i), t.bezierCurveTo(n.cpx2, n.cpy2 + i, n.cpx1, n.cpy1 + i, n.x1, n.y1 + i)), t.closePath(); }, e.prototype.highlight = function() { af(this); }, e.prototype.downplay = function() { of(this); }, e; }(Tt), tke = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._focusAdjacencyDisabled = !1, t; } return e.prototype.render = function(t, n, i) { var a = this, o = t.getGraph(), s = this.group, u = t.layoutInfo, l = u.width, c = u.height, f = t.getData(), h = t.getData("edge"), p = t.get("orient"); this._model = t, s.removeAll(), s.x = u.x, s.y = u.y, o.eachEdge(function(d) { var v = new eke(), g = nt(v); g.dataIndex = d.dataIndex, g.seriesIndex = t.seriesIndex, g.dataType = "edge"; var m = d.getModel(), y = m.getModel("lineStyle"), _ = y.get("curveness"), w = d.node1.getLayout(), x = d.node1.getModel(), C = x.get("localX"), S = x.get("localY"), b = d.node2.getLayout(), E = d.node2.getModel(), T = E.get("localX"), P = E.get("localY"), I = d.getLayout(), A, L, D, O, N, F, k, G; switch (v.shape.extent = Math.max(1, I.dy), v.shape.orient = p, p === "vertical" ? (A = (C != null ? C * l : w.x) + I.sy, L = (S != null ? S * c : w.y) + w.dy, D = (T != null ? T * l : b.x) + I.ty, O = P != null ? P * c : b.y, N = A, F = L * (1 - _) + O * _, k = D, G = L * _ + O * (1 - _)) : (A = (C != null ? C * l : w.x) + w.dx, L = (S != null ? S * c : w.y) + I.sy, D = T != null ? T * l : b.x, O = (P != null ? P * c : b.y) + I.ty, N = A * (1 - _) + D * _, F = L, k = A * _ + D * (1 - _), G = O), v.setShape({ x1: A, y1: L, x2: D, y2: O, cpx1: N, cpy1: F, cpx2: k, cpy2: G }), v.useStyle(y.getItemStyle()), v.style.fill) { case "source": v.style.fill = d.node1.getVisual("color"), v.style.decal = d.node1.getVisual("style").decal; break; case "target": v.style.fill = d.node2.getVisual("color"), v.style.decal = d.node2.getVisual("style").decal; break; case "gradient": var U = d.node1.getVisual("color"), B = d.node2.getVisual("color"); Se(U) && Se(B) && (v.style.fill = new xy(0, 0, +(p === "horizontal"), +(p === "vertical"), [{ color: U, offset: 0 }, { color: B, offset: 1 }])); } var X = m.getModel("emphasis"); Ra(v, m, "lineStyle", function(ae) { return ae.getItemStyle(); }), s.add(v), h.setItemGraphicEl(d.dataIndex, v); var j = X.get("focus"); Zn(v, j === "adjacency" ? d.getAdjacentDataIndices() : j, X.get("blurScope"), X.get("disabled")), nt(v).dataType = "edge"; }), o.eachNode(function(d) { var v = d.getLayout(), g = d.getModel(), m = g.get("localX"), y = g.get("localY"), _ = g.getModel("emphasis"), w = new Vt({ shape: { x: m != null ? m * l : v.x, y: y != null ? y * c : v.y, width: v.dx, height: v.dy }, style: g.getModel("itemStyle").getItemStyle(), z2: 10 }); no(w, wa(g), { labelFetcher: t, labelDataIndex: d.dataIndex, defaultText: d.id }), w.disableLabelAnimation = !0, w.setStyle("fill", d.getVisual("color")), w.setStyle("decal", d.getVisual("style").decal), Ra(w, g), s.add(w), f.setItemGraphicEl(d.dataIndex, w), nt(w).dataType = "node"; var x = _.get("focus"); Zn(w, x === "adjacency" ? d.getAdjacentDataIndices() : x, _.get("blurScope"), _.get("disabled")); }), f.eachItemGraphicEl(function(d, v) { var g = f.getItemModel(v); g.get("draggable") && (d.drift = function(m, y) { a._focusAdjacencyDisabled = !0, this.shape.x += m, this.shape.y += y, this.dirty(), i.dispatchAction({ type: "dragNode", seriesId: t.id, dataIndex: f.getRawIndex(v), localX: this.shape.x / l, localY: this.shape.y / c }); }, d.ondragend = function() { a._focusAdjacencyDisabled = !1; }, d.draggable = !0, d.cursor = "move"); }), !this._data && t.isAnimationEnabled() && s.setClipPath(rke(s.getBoundingRect(), t, function() { s.removeClipPath(); })), this._data = t.getData(); }, e.prototype.dispose = function() { }, e.type = "sankey", e; }(an); function rke(r, e, t) { var n = new Vt({ shape: { x: r.x - 10, y: r.y - 10, width: 0, height: r.height + 20 } }); return Cn(n, { shape: { width: r.width + 20 } }, e, t), n; } const nke = tke; var ike = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.getInitialData = function(t, n) { var i = t.edges || t.links, a = t.data || t.nodes, o = t.levels; this.levelModels = []; for (var s = this.levelModels, u = 0; u < o.length; u++) if (o[u].depth != null && o[u].depth >= 0) s[o[u].depth] = new rn(o[u], this, n); else if (process.env.NODE_ENV !== "production") throw new Error("levels[i].depth is mandatory and should be natural number"); if (a && i) { var l = JQ(a, i, this, !0, c); return l.data; } function c(f, h) { f.wrapMethod("getItemModel", function(p, d) { var v = p.parentModel, g = v.getData().getItemLayout(d); if (g) { var m = g.depth, y = v.levelModels[m]; y && (p.parentModel = y); } return p; }), h.wrapMethod("getItemModel", function(p, d) { var v = p.parentModel, g = v.getGraph().getEdgeByIndex(d), m = g.node1.getLayout(); if (m) { var y = m.depth, _ = v.levelModels[y]; _ && (p.parentModel = _); } return p; }); } }, e.prototype.setNodePosition = function(t, n) { var i = this.option.data || this.option.nodes, a = i[t]; a.localX = n[0], a.localY = n[1]; }, e.prototype.getGraph = function() { return this.getData().graph; }, e.prototype.getEdgeData = function() { return this.getGraph().edgeData; }, e.prototype.formatTooltip = function(t, n, i) { function a(p) { return isNaN(p) || p == null; } if (i === "edge") { var o = this.getDataParams(t, i), s = o.data, u = o.value, l = s.source + " -- " + s.target; return Ji("nameValue", { name: l, value: u, noValue: a(u) }); } else { var c = this.getGraph().getNodeByIndex(t), f = c.getLayout().value, h = this.getDataParams(t, i).data.name; return Ji("nameValue", { name: h != null ? h + "" : null, value: f, noValue: a(f) }); } }, e.prototype.optionUpdated = function() { }, e.prototype.getDataParams = function(t, n) { var i = r.prototype.getDataParams.call(this, t, n); if (i.value == null && n === "node") { var a = this.getGraph().getNodeByIndex(t), o = a.getLayout().value; i.value = o; } return i; }, e.type = "series.sankey", e.defaultOption = { z: 2, coordinateSystem: "view", left: "5%", top: "5%", right: "20%", bottom: "5%", orient: "horizontal", nodeWidth: 20, nodeGap: 8, draggable: !0, layoutIterations: 32, label: { show: !0, position: "right", fontSize: 12 }, levels: [], nodeAlign: "justify", lineStyle: { color: "#314656", opacity: 0.2, curveness: 0.5 }, emphasis: { label: { show: !0 }, lineStyle: { opacity: 0.5 } }, select: { itemStyle: { borderColor: "#212121" } }, animationEasing: "linear", animationDuration: 1e3 }, e; }(bn); const ake = ike; function oke(r, e) { r.eachSeriesByType("sankey", function(t) { var n = t.get("nodeWidth"), i = t.get("nodeGap"), a = ske(t, e); t.layoutInfo = a; var o = a.width, s = a.height, u = t.getGraph(), l = u.nodes, c = u.edges; lke(l); var f = Wr(l, function(v) { return v.getLayout().value === 0; }), h = f.length !== 0 ? 0 : t.get("layoutIterations"), p = t.get("orient"), d = t.get("nodeAlign"); uke(l, c, n, i, o, s, h, p, d); }); } function ske(r, e) { return Bi(r.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }); } function uke(r, e, t, n, i, a, o, s, u) { cke(r, e, t, i, a, s, u), dke(r, e, a, i, n, o, s), Ske(r, s); } function lke(r) { M(r, function(e) { var t = vh(e.outEdges, $E), n = vh(e.inEdges, $E), i = e.getValue() || 0, a = Math.max(t, n, i); e.setLayout({ value: a }, !0); }); } function cke(r, e, t, n, i, a, o) { for (var s = [], u = [], l = [], c = [], f = 0, h = 0; h < e.length; h++) s[h] = 1; for (var h = 0; h < r.length; h++) u[h] = r[h].inEdges.length, u[h] === 0 && l.push(r[h]); for (var p = -1; l.length; ) { for (var d = 0; d < l.length; d++) { var v = l[d], g = v.hostGraph.data.getRawDataItem(v.dataIndex), m = g.depth != null && g.depth >= 0; m && g.depth > p && (p = g.depth), v.setLayout({ depth: m ? g.depth : f }, !0), a === "vertical" ? v.setLayout({ dy: t }, !0) : v.setLayout({ dx: t }, !0); for (var y = 0; y < v.outEdges.length; y++) { var _ = v.outEdges[y], w = e.indexOf(_); s[w] = 0; var x = _.node2, C = r.indexOf(x); --u[C] === 0 && c.indexOf(x) < 0 && c.push(x); } } ++f, l = c, c = []; } for (var h = 0; h < s.length; h++) if (s[h] === 1) throw new Error("Sankey is a DAG, the original data has cycle!"); var S = p > f - 1 ? p : f - 1; o && o !== "left" && fke(r, o, a, S); var b = a === "vertical" ? (i - t) / S : (n - t) / S; pke(r, b, a); } function yee(r) { var e = r.hostGraph.data.getRawDataItem(r.dataIndex); return e.depth != null && e.depth >= 0; } function fke(r, e, t, n) { if (e === "right") { for (var i = [], a = r, o = 0; a.length; ) { for (var s = 0; s < a.length; s++) { var u = a[s]; u.setLayout({ skNodeHeight: o }, !0); for (var l = 0; l < u.inEdges.length; l++) { var c = u.inEdges[l]; i.indexOf(c.node1) < 0 && i.push(c.node1); } } a = i, i = [], ++o; } M(r, function(f) { yee(f) || f.setLayout({ depth: Math.max(0, n - f.getLayout().skNodeHeight) }, !0); }); } else e === "justify" && hke(r, n); } function hke(r, e) { M(r, function(t) { !yee(t) && !t.outEdges.length && t.setLayout({ depth: e }, !0); }); } function pke(r, e, t) { M(r, function(n) { var i = n.getLayout().depth * e; t === "vertical" ? n.setLayout({ y: i }, !0) : n.setLayout({ x: i }, !0); }); } function dke(r, e, t, n, i, a, o) { var s = vke(r, o); gke(s, e, t, n, i, o), cL(s, i, t, n, o); for (var u = 1; a > 0; a--) u *= 0.99, mke(s, u, o), cL(s, i, t, n, o), Cke(s, u, o), cL(s, i, t, n, o); } function vke(r, e) { var t = [], n = e === "vertical" ? "y" : "x", i = RM(r, function(a) { return a.getLayout()[n]; }); return i.keys.sort(function(a, o) { return a - o; }), M(i.keys, function(a) { t.push(i.buckets.get(a)); }), t; } function gke(r, e, t, n, i, a) { var o = 1 / 0; M(r, function(s) { var u = s.length, l = 0; M(s, function(f) { l += f.getLayout().value; }); var c = a === "vertical" ? (n - (u - 1) * i) / l : (t - (u - 1) * i) / l; c < o && (o = c); }), M(r, function(s) { M(s, function(u, l) { var c = u.getLayout().value * o; a === "vertical" ? (u.setLayout({ x: l }, !0), u.setLayout({ dx: c }, !0)) : (u.setLayout({ y: l }, !0), u.setLayout({ dy: c }, !0)); }); }), M(e, function(s) { var u = +s.getValue() * o; s.setLayout({ dy: u }, !0); }); } function cL(r, e, t, n, i) { var a = i === "vertical" ? "x" : "y"; M(r, function(o) { o.sort(function(v, g) { return v.getLayout()[a] - g.getLayout()[a]; }); for (var s, u, l, c = 0, f = o.length, h = i === "vertical" ? "dx" : "dy", p = 0; p < f; p++) u = o[p], l = c - u.getLayout()[a], l > 0 && (s = u.getLayout()[a] + l, i === "vertical" ? u.setLayout({ x: s }, !0) : u.setLayout({ y: s }, !0)), c = u.getLayout()[a] + u.getLayout()[h] + e; var d = i === "vertical" ? n : t; if (l = c - e - d, l > 0) { s = u.getLayout()[a] - l, i === "vertical" ? u.setLayout({ x: s }, !0) : u.setLayout({ y: s }, !0), c = s; for (var p = f - 2; p >= 0; --p) u = o[p], l = u.getLayout()[a] + u.getLayout()[h] + e - c, l > 0 && (s = u.getLayout()[a] - l, i === "vertical" ? u.setLayout({ x: s }, !0) : u.setLayout({ y: s }, !0)), c = u.getLayout()[a]; } }); } function mke(r, e, t) { M(r.slice().reverse(), function(n) { M(n, function(i) { if (i.outEdges.length) { var a = vh(i.outEdges, yke, t) / vh(i.outEdges, $E); if (isNaN(a)) { var o = i.outEdges.length; a = o ? vh(i.outEdges, _ke, t) / o : 0; } if (t === "vertical") { var s = i.getLayout().x + (a - kh(i, t)) * e; i.setLayout({ x: s }, !0); } else { var u = i.getLayout().y + (a - kh(i, t)) * e; i.setLayout({ y: u }, !0); } } }); }); } function yke(r, e) { return kh(r.node2, e) * r.getValue(); } function _ke(r, e) { return kh(r.node2, e); } function wke(r, e) { return kh(r.node1, e) * r.getValue(); } function xke(r, e) { return kh(r.node1, e); } function kh(r, e) { return e === "vertical" ? r.getLayout().x + r.getLayout().dx / 2 : r.getLayout().y + r.getLayout().dy / 2; } function $E(r) { return r.getValue(); } function vh(r, e, t) { for (var n = 0, i = r.length, a = -1; ++a < i; ) { var o = +e(r[a], t); isNaN(o) || (n += o); } return n; } function Cke(r, e, t) { M(r, function(n) { M(n, function(i) { if (i.inEdges.length) { var a = vh(i.inEdges, wke, t) / vh(i.inEdges, $E); if (isNaN(a)) { var o = i.inEdges.length; a = o ? vh(i.inEdges, xke, t) / o : 0; } if (t === "vertical") { var s = i.getLayout().x + (a - kh(i, t)) * e; i.setLayout({ x: s }, !0); } else { var u = i.getLayout().y + (a - kh(i, t)) * e; i.setLayout({ y: u }, !0); } } }); }); } function Ske(r, e) { var t = e === "vertical" ? "x" : "y"; M(r, function(n) { n.outEdges.sort(function(i, a) { return i.node2.getLayout()[t] - a.node2.getLayout()[t]; }), n.inEdges.sort(function(i, a) { return i.node1.getLayout()[t] - a.node1.getLayout()[t]; }); }), M(r, function(n) { var i = 0, a = 0; M(n.outEdges, function(o) { o.setLayout({ sy: i }, !0), i += o.getLayout().dy; }), M(n.inEdges, function(o) { o.setLayout({ ty: a }, !0), a += o.getLayout().dy; }); }); } function Eke(r) { r.eachSeriesByType("sankey", function(e) { var t = e.getGraph(), n = t.nodes; if (n.length) { var i = 1 / 0, a = -1 / 0; M(n, function(o) { var s = o.getLayout().value; s < i && (i = s), s > a && (a = s); }), M(n, function(o) { var s = new Aa({ type: "color", mappingMethod: "linear", dataExtent: [i, a], visual: e.get("color") }), u = s.mapValueToVisual(o.getLayout().value), l = o.getModel().get(["itemStyle", "color"]); l != null ? (o.setVisual("color", l), o.setVisual("style", { fill: l })) : (o.setVisual("color", u), o.setVisual("style", { fill: u })); }); } }); } function bke(r) { r.registerChartView(nke), r.registerSeriesModel(ake), r.registerLayout(oke), r.registerVisual(Eke), r.registerAction({ type: "dragNode", event: "dragnode", update: "update" }, function(e, t) { t.eachComponent({ mainType: "series", subType: "sankey", query: e }, function(n) { n.setNodePosition(e.dataIndex, [e.localX, e.localY]); }); }); } var _ee = function() { function r() { } return r.prototype.getInitialData = function(e, t) { var n, i = t.getComponent("xAxis", this.get("xAxisIndex")), a = t.getComponent("yAxis", this.get("yAxisIndex")), o = i.get("type"), s = a.get("type"), u; o === "category" ? (e.layout = "horizontal", n = i.getOrdinalMeta(), u = !0) : s === "category" ? (e.layout = "vertical", n = a.getOrdinalMeta(), u = !0) : e.layout = e.layout || "horizontal"; var l = ["x", "y"], c = e.layout === "horizontal" ? 0 : 1, f = this._baseAxisDim = l[c], h = l[1 - c], p = [i, a], d = p[c].get("type"), v = p[1 - c].get("type"), g = e.data; if (g && u) { var m = []; M(g, function(w, x) { var C; le(w) ? (C = w.slice(), w.unshift(x)) : le(w.value) ? (C = oe({}, w), C.value = C.value.slice(), w.value.unshift(x)) : C = w, m.push(C); }), e.data = m; } var y = this.defaultValueDimensions, _ = [{ name: f, type: LE(d), ordinalMeta: n, otherDims: { tooltip: !1, itemName: 0 }, dimsDef: ["base"] }, { name: h, type: LE(v), dimsDef: y.slice() }]; return Ry(this, { coordDimensions: _, dimensionsCount: y.length + 1, encodeDefaulter: ut(UZ, _, this) }); }, r.prototype.getBaseAxis = function() { var e = this._baseAxisDim; return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis; }, r; }(), wee = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.defaultValueDimensions = [{ name: "min", defaultTooltip: !0 }, { name: "Q1", defaultTooltip: !0 }, { name: "median", defaultTooltip: !0 }, { name: "Q3", defaultTooltip: !0 }, { name: "max", defaultTooltip: !0 }], t.visualDrawType = "stroke", t; } return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = { z: 2, coordinateSystem: "cartesian2d", legendHoverLink: !0, layout: null, boxWidth: [7, 50], itemStyle: { color: "#fff", borderWidth: 1 }, emphasis: { scale: !0, itemStyle: { borderWidth: 2, shadowBlur: 5, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: "rgba(0,0,0,0.2)" } }, animationDuration: 800 }, e; }(bn); gi(wee, _ee, !0); const Tke = wee; var Pke = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = t.getData(), o = this.group, s = this._data; this._data || o.removeAll(); var u = t.get("layout") === "horizontal" ? 1 : 0; a.diff(s).add(function(l) { if (a.hasValue(l)) { var c = a.getItemLayout(l), f = L8(c, a, l, u, !0); a.setItemGraphicEl(l, f), o.add(f); } }).update(function(l, c) { var f = s.getItemGraphicEl(c); if (!a.hasValue(l)) { o.remove(f); return; } var h = a.getItemLayout(l); f ? (nl(f), xee(h, f, a, l)) : f = L8(h, a, l, u), o.add(f), a.setItemGraphicEl(l, f); }).remove(function(l) { var c = s.getItemGraphicEl(l); c && o.remove(c); }).execute(), this._data = a; }, e.prototype.remove = function(t) { var n = this.group, i = this._data; this._data = null, i && i.eachItemGraphicEl(function(a) { a && n.remove(a); }); }, e.type = "boxplot", e; }(an), Ike = function() { function r() { } return r; }(), Ake = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "boxplotBoxPath", n; } return e.prototype.getDefaultShape = function() { return new Ike(); }, e.prototype.buildPath = function(t, n) { var i = n.points, a = 0; for (t.moveTo(i[a][0], i[a][1]), a++; a < 4; a++) t.lineTo(i[a][0], i[a][1]); for (t.closePath(); a < i.length; a++) t.moveTo(i[a][0], i[a][1]), a++, t.lineTo(i[a][0], i[a][1]); }, e; }(Tt); function L8(r, e, t, n, i) { var a = r.ends, o = new Ake({ shape: { points: i ? Lke(a, n, r) : a } }); return xee(r, o, e, t, i), o; } function xee(r, e, t, n, i) { var a = t.hostModel, o = Bw[i ? "initProps" : "updateProps"]; o(e, { shape: { points: r.ends } }, a, n), e.useStyle(t.getItemVisual(n, "style")), e.style.strokeNoScale = !0, e.z2 = 100; var s = t.getItemModel(n), u = s.getModel("emphasis"); Ra(e, s), Zn(e, u.get("focus"), u.get("blurScope"), u.get("disabled")); } function Lke(r, e, t) { return ce(r, function(n) { return n = n.slice(), n[e] = t.initBaseline, n; }); } const Dke = Pke; function Mke(r, e) { } var P_ = M; function Oke(r) { var e = Rke(r); P_(e, function(t) { var n = t.seriesModels; !n.length || (Nke(t), P_(n, function(i, a) { Fke(i, t.boxOffsetList[a], t.boxWidthList[a]); })); }); } function Rke(r) { var e = [], t = []; return r.eachSeriesByType("boxplot", function(n) { var i = n.getBaseAxis(), a = _t(t, i); a < 0 && (a = t.length, t[a] = i, e[a] = { axis: i, seriesModels: [] }), e[a].seriesModels.push(n); }), e; } function Nke(r) { var e = r.axis, t = r.seriesModels, n = t.length, i = r.boxWidthList = [], a = r.boxOffsetList = [], o = [], s; if (e.type === "category") s = e.getBandWidth(); else { var u = 0; P_(t, function(d) { u = Math.max(u, d.getData().count()); }); var l = e.getExtent(); s = Math.abs(l[1] - l[0]) / u; } P_(t, function(d) { var v = d.get("boxWidth"); le(v) || (v = [v, v]), o.push([ye(v[0], s) || 0, ye(v[1], s) || 0]); }); var c = s * 0.8 - 2, f = c / n * 0.3, h = (c - f * (n - 1)) / n, p = h / 2 - c / 2; P_(t, function(d, v) { a.push(p), p += f + h, i.push(Math.min(Math.max(h, o[v][0]), o[v][1])); }); } function Fke(r, e, t) { var n = r.coordinateSystem, i = r.getData(), a = t / 2, o = r.get("layout") === "horizontal" ? 0 : 1, s = 1 - o, u = ["x", "y"], l = i.mapDimension(u[o]), c = i.mapDimensionsAll(u[s]); if (l == null || c.length < 5) return; for (var f = 0; f < i.count(); f++) { var h = i.get(l, f), p = _(h, c[2], f), d = _(h, c[0], f), v = _(h, c[1], f), g = _(h, c[3], f), m = _(h, c[4], f), y = []; w(y, v, !1), w(y, g, !0), y.push(d, v, m, g), x(y, d), x(y, m), x(y, p), i.setItemLayout(f, { initBaseline: p[s], ends: y }); } function _(C, S, b) { var E = i.get(S, b), T = []; T[o] = C, T[s] = E; var P; return isNaN(C) || isNaN(E) ? P = [NaN, NaN] : (P = n.dataToPoint(T), P[o] += e), P; } function w(C, S, b) { var E = S.slice(), T = S.slice(); E[o] += a, T[o] -= a, b ? C.push(E, T) : C.push(T, E); } function x(C, S) { var b = S.slice(), E = S.slice(); b[o] -= a, E[o] += a, C.push(b, E); } } function Bke(r, e) { e = e || {}; for (var t = [], n = [], i = e.boundIQR, a = i === "none" || i === 0, o = 0; o < r.length; o++) { var s = Js(r[o].slice()), u = kI(s, 0.25), l = kI(s, 0.5), c = kI(s, 0.75), f = s[0], h = s[s.length - 1], p = (i == null ? 1.5 : i) * (c - u), d = a ? f : Math.max(f, u - p), v = a ? h : Math.min(h, c + p), g = e.itemNameFormatter, m = ze(g) ? g({ value: o }) : Se(g) ? g.replace("{value}", o + "") : o + ""; t.push([m, d, u, l, c, v]); for (var y = 0; y < s.length; y++) { var _ = s[y]; if (_ < d || _ > v) { var w = [m, _]; n.push(w); } } } return { boxData: t, outliers: n }; } var kke = { type: "echarts:boxplot", transform: function(e) { var t = e.upstream; if (t.sourceFormat !== ro) { var n = ""; process.env.NODE_ENV !== "production" && (n = xo("source data is not applicable for this boxplot transform. Expect number[][].")), Ar(n); } var i = Bke(t.getRawData(), e.config); return [{ dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"], data: i.boxData }, { data: i.outliers }]; } }; function Vke(r) { r.registerSeriesModel(Tke), r.registerChartView(Dke), r.registerVisual(Mke), r.registerLayout(Oke), r.registerTransform(kke); } var Gke = ["color", "borderColor"], zke = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t); }, e.prototype.incrementalPrepareRender = function(t, n, i) { this._clear(), this._updateDrawMode(t); }, e.prototype.incrementalRender = function(t, n, i, a) { this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(t, n) : this._incrementalRenderNormal(t, n); }, e.prototype.eachRendered = function(t) { Xh(this._progressiveEls || this.group, t); }, e.prototype._updateDrawMode = function(t) { var n = t.pipelineContext.large; (this._isLargeDraw == null || n !== this._isLargeDraw) && (this._isLargeDraw = n, this._clear()); }, e.prototype._renderNormal = function(t) { var n = t.getData(), i = this._data, a = this.group, o = n.getLayout("isSimpleBox"), s = t.get("clip", !0), u = t.coordinateSystem, l = u.getArea && u.getArea(); this._data || a.removeAll(), n.diff(i).add(function(c) { if (n.hasValue(c)) { var f = n.getItemLayout(c); if (s && D8(l, f)) return; var h = fL(f, c, !0); Cn(h, { shape: { points: f.ends } }, t, c), hL(h, n, c, o), a.add(h), n.setItemGraphicEl(c, h); } }).update(function(c, f) { var h = i.getItemGraphicEl(f); if (!n.hasValue(c)) { a.remove(h); return; } var p = n.getItemLayout(c); if (s && D8(l, p)) { a.remove(h); return; } h ? (Ht(h, { shape: { points: p.ends } }, t, c), nl(h)) : h = fL(p), hL(h, n, c, o), a.add(h), n.setItemGraphicEl(c, h); }).remove(function(c) { var f = i.getItemGraphicEl(c); f && a.remove(f); }).execute(), this._data = n; }, e.prototype._renderLarge = function(t) { this._clear(), O8(t, this.group); var n = t.get("clip", !0) ? lP(t.coordinateSystem, !1, t) : null; n ? this.group.setClipPath(n) : this.group.removeClipPath(); }, e.prototype._incrementalRenderNormal = function(t, n) { for (var i = n.getData(), a = i.getLayout("isSimpleBox"), o; (o = t.next()) != null; ) { var s = i.getItemLayout(o), u = fL(s); hL(u, i, o, a), u.incremental = !0, this.group.add(u), this._progressiveEls.push(u); } }, e.prototype._incrementalRenderLarge = function(t, n) { O8(n, this.group, this._progressiveEls, !0); }, e.prototype.remove = function(t) { this._clear(); }, e.prototype._clear = function() { this.group.removeAll(), this._data = null; }, e.type = "candlestick", e; }(an), $ke = function() { function r() { } return r; }(), Hke = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "normalCandlestickBox", n; } return e.prototype.getDefaultShape = function() { return new $ke(); }, e.prototype.buildPath = function(t, n) { var i = n.points; this.__simpleBox ? (t.moveTo(i[4][0], i[4][1]), t.lineTo(i[6][0], i[6][1])) : (t.moveTo(i[0][0], i[0][1]), t.lineTo(i[1][0], i[1][1]), t.lineTo(i[2][0], i[2][1]), t.lineTo(i[3][0], i[3][1]), t.closePath(), t.moveTo(i[4][0], i[4][1]), t.lineTo(i[5][0], i[5][1]), t.moveTo(i[6][0], i[6][1]), t.lineTo(i[7][0], i[7][1])); }, e; }(Tt); function fL(r, e, t) { var n = r.ends; return new Hke({ shape: { points: t ? Uke(n, r) : n }, z2: 100 }); } function D8(r, e) { for (var t = !0, n = 0; n < e.ends.length; n++) if (r.contain(e.ends[n][0], e.ends[n][1])) { t = !1; break; } return t; } function hL(r, e, t, n) { var i = e.getItemModel(t); r.useStyle(e.getItemVisual(t, "style")), r.style.strokeNoScale = !0, r.__simpleBox = n, Ra(r, i); } function Uke(r, e) { return ce(r, function(t) { return t = t.slice(), t[1] = e.initBaseline, t; }); } var Wke = function() { function r() { } return r; }(), M8 = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n.type = "largeCandlestickBox", n; } return e.prototype.getDefaultShape = function() { return new Wke(); }, e.prototype.buildPath = function(t, n) { for (var i = n.points, a = 0; a < i.length; ) if (this.__sign === i[a++]) { var o = i[a++]; t.moveTo(o, i[a++]), t.lineTo(o, i[a++]); } else a += 3; }, e; }(Tt); function O8(r, e, t, n) { var i = r.getData(), a = i.getLayout("largePoints"), o = new M8({ shape: { points: a }, __sign: 1 }); e.add(o); var s = new M8({ shape: { points: a }, __sign: -1 }); e.add(s), R8(1, o, r), R8(-1, s, r), n && (o.incremental = !0, s.incremental = !0), t && t.push(o, s); } function R8(r, e, t, n) { var i = t.get(["itemStyle", r > 0 ? "borderColor" : "borderColor0"]) || t.get(["itemStyle", r > 0 ? "color" : "color0"]), a = t.getModel("itemStyle").getItemStyle(Gke); e.useStyle(a), e.style.fill = null, e.style.stroke = i; } const jke = zke; var Cee = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.defaultValueDimensions = [{ name: "open", defaultTooltip: !0 }, { name: "close", defaultTooltip: !0 }, { name: "lowest", defaultTooltip: !0 }, { name: "highest", defaultTooltip: !0 }], t; } return e.prototype.getShadowDim = function() { return "open"; }, e.prototype.brushSelector = function(t, n, i) { var a = n.getItemLayout(t); return a && i.rect(a.brushRect); }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = { z: 2, coordinateSystem: "cartesian2d", legendHoverLink: !0, layout: null, clip: !0, itemStyle: { color: "#eb5454", color0: "#47b262", borderColor: "#eb5454", borderColor0: "#47b262", borderWidth: 1 }, emphasis: { scale: !0, itemStyle: { borderWidth: 2 } }, barMaxWidth: null, barMinWidth: null, barWidth: null, large: !0, largeThreshold: 600, progressive: 3e3, progressiveThreshold: 1e4, progressiveChunkMode: "mod", animationEasing: "linear", animationDuration: 300 }, e; }(bn); gi(Cee, _ee, !0); const Yke = Cee; function Xke(r) { !r || !le(r.series) || M(r.series, function(e) { Xe(e) && e.type === "k" && (e.type = "candlestick"); }); } var qke = ["itemStyle", "borderColor"], Zke = ["itemStyle", "borderColor0"], Kke = ["itemStyle", "color"], Jke = ["itemStyle", "color0"], Qke = { seriesType: "candlestick", plan: Dy(), performRawSeries: !0, reset: function(r, e) { function t(a, o) { return o.get(a > 0 ? Kke : Jke); } function n(a, o) { return o.get(a > 0 ? qke : Zke); } if (!e.isSeriesFiltered(r)) { var i = r.pipelineContext.large; return !i && { progress: function(a, o) { for (var s; (s = a.next()) != null; ) { var u = o.getItemModel(s), l = o.getItemLayout(s).sign, c = u.getItemStyle(); c.fill = t(l, u), c.stroke = n(l, u) || c.fill; var f = o.ensureUniqueItemVisual(s, "style"); oe(f, c); } } }; } } }; const eVe = Qke; var tVe = { seriesType: "candlestick", plan: Dy(), reset: function(r) { var e = r.coordinateSystem, t = r.getData(), n = rVe(r, t), i = 0, a = 1, o = ["x", "y"], s = t.getDimensionIndex(t.mapDimension(o[i])), u = ce(t.mapDimensionsAll(o[a]), t.getDimensionIndex, t), l = u[0], c = u[1], f = u[2], h = u[3]; if (t.setLayout({ candleWidth: n, isSimpleBox: n <= 1.3 }), s < 0 || u.length < 4) return; return { progress: r.pipelineContext.large ? d : p }; function p(v, g) { for (var m, y = g.getStore(); (m = v.next()) != null; ) { var _ = y.get(s, m), w = y.get(l, m), x = y.get(c, m), C = y.get(f, m), S = y.get(h, m), b = Math.min(w, x), E = Math.max(w, x), T = D(b, _), P = D(E, _), I = D(C, _), A = D(S, _), L = []; O(L, P, 0), O(L, T, 1), L.push(F(A), F(P), F(I), F(T)), g.setItemLayout(m, { sign: N8(y, m, w, x, c), initBaseline: w > x ? P[a] : T[a], ends: L, brushRect: N(C, S, _) }); } function D(k, G) { var U = []; return U[i] = G, U[a] = k, isNaN(G) || isNaN(k) ? [NaN, NaN] : e.dataToPoint(U); } function O(k, G, U) { var B = G.slice(), X = G.slice(); B[i] = fS(B[i] + n / 2, 1, !1), X[i] = fS(X[i] - n / 2, 1, !0), U ? k.push(B, X) : k.push(X, B); } function N(k, G, U) { var B = D(k, U), X = D(G, U); return B[i] -= n / 2, X[i] -= n / 2, { x: B[0], y: B[1], width: n, height: X[1] - B[1] }; } function F(k) { return k[i] = fS(k[i], 1), k; } } function d(v, g) { for (var m = Fl(v.count * 4), y = 0, _, w = [], x = [], C, S = g.getStore(); (C = v.next()) != null; ) { var b = S.get(s, C), E = S.get(l, C), T = S.get(c, C), P = S.get(f, C), I = S.get(h, C); if (isNaN(b) || isNaN(P) || isNaN(I)) { m[y++] = NaN, y += 3; continue; } m[y++] = N8(S, C, E, T, c), w[i] = b, w[a] = P, _ = e.dataToPoint(w, null, x), m[y++] = _ ? _[0] : NaN, m[y++] = _ ? _[1] : NaN, w[a] = I, _ = e.dataToPoint(w, null, x), m[y++] = _ ? _[1] : NaN; } g.setLayout("largePoints", m); } } }; function N8(r, e, t, n, i) { var a; return t > n ? a = -1 : t < n ? a = 1 : a = e > 0 ? r.get(i, e - 1) <= n ? 1 : -1 : 1, a; } function rVe(r, e) { var t = r.getBaseAxis(), n, i = t.type === "category" ? t.getBandWidth() : (n = t.getExtent(), Math.abs(n[1] - n[0]) / e.count()), a = ye(wt(r.get("barMaxWidth"), i), i), o = ye(wt(r.get("barMinWidth"), 1), i), s = r.get("barWidth"); return s != null ? ye(s, i) : Math.max(Math.min(i / 2, a), o); } const nVe = tVe; function iVe(r) { r.registerChartView(jke), r.registerSeriesModel(Yke), r.registerPreprocessor(Xke), r.registerVisual(eVe), r.registerLayout(nVe); } function F8(r, e) { var t = e.rippleEffectColor || e.color; r.eachChild(function(n) { n.attr({ z: e.z, zlevel: e.zlevel, style: { stroke: e.brushType === "stroke" ? t : null, fill: e.brushType === "fill" ? t : null } }); }); } var aVe = function(r) { W(e, r); function e(t, n) { var i = r.call(this) || this, a = new Hw(t, n), o = new rt(); return i.add(a), i.add(o), i.updateData(t, n), i; } return e.prototype.stopEffectAnimation = function() { this.childAt(1).removeAll(); }, e.prototype.startEffectAnimation = function(t) { for (var n = t.symbolType, i = t.color, a = t.rippleNumber, o = this.childAt(1), s = 0; s < a; s++) { var u = vi(n, -1, -1, 2, 2, i); u.attr({ style: { strokeNoScale: !0 }, z2: 99, silent: !0, scaleX: 0.5, scaleY: 0.5 }); var l = -s / a * t.period + t.effectOffset; u.animate("", !0).when(t.period, { scaleX: t.rippleScale / 2, scaleY: t.rippleScale / 2 }).delay(l).start(), u.animateStyle(!0).when(t.period, { opacity: 0 }).delay(l).start(), o.add(u); } F8(o, t); }, e.prototype.updateEffectAnimation = function(t) { for (var n = this._effectCfg, i = this.childAt(1), a = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < a.length; o++) { var s = a[o]; if (n[s] !== t[s]) { this.stopEffectAnimation(), this.startEffectAnimation(t); return; } } F8(i, t); }, e.prototype.highlight = function() { af(this); }, e.prototype.downplay = function() { of(this); }, e.prototype.getSymbolType = function() { var t = this.childAt(0); return t && t.getSymbolType(); }, e.prototype.updateData = function(t, n) { var i = this, a = t.hostModel; this.childAt(0).updateData(t, n); var o = this.childAt(1), s = t.getItemModel(n), u = t.getItemVisual(n, "symbol"), l = Vw(t.getItemVisual(n, "symbolSize")), c = t.getItemVisual(n, "style"), f = c && c.fill, h = s.getModel("emphasis"); o.setScale(l), o.traverse(function(g) { g.setStyle("fill", f); }); var p = Oy(t.getItemVisual(n, "symbolOffset"), l); p && (o.x = p[0], o.y = p[1]); var d = t.getItemVisual(n, "symbolRotate"); o.rotation = (d || 0) * Math.PI / 180 || 0; var v = {}; v.showEffectOn = a.get("showEffectOn"), v.rippleScale = s.get(["rippleEffect", "scale"]), v.brushType = s.get(["rippleEffect", "brushType"]), v.period = s.get(["rippleEffect", "period"]) * 1e3, v.effectOffset = n / t.count(), v.z = a.getShallow("z") || 0, v.zlevel = a.getShallow("zlevel") || 0, v.symbolType = u, v.color = f, v.rippleEffectColor = s.get(["rippleEffect", "color"]), v.rippleNumber = s.get(["rippleEffect", "number"]), v.showEffectOn === "render" ? (this._effectCfg ? this.updateEffectAnimation(v) : this.startEffectAnimation(v), this._effectCfg = v) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function(g) { g === "emphasis" ? v.showEffectOn !== "render" && i.startEffectAnimation(v) : g === "normal" && v.showEffectOn !== "render" && i.stopEffectAnimation(); }), this._effectCfg = v, Zn(this, h.get("focus"), h.get("blurScope"), h.get("disabled")); }, e.prototype.fadeOut = function(t) { t && t(); }, e; }(rt); const oVe = aVe; var sVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function() { this._symbolDraw = new Uw(oVe); }, e.prototype.render = function(t, n, i) { var a = t.getData(), o = this._symbolDraw; o.updateData(a, { clipShape: this._getClipShape(t) }), this.group.add(o.group); }, e.prototype._getClipShape = function(t) { var n = t.coordinateSystem, i = n && n.getArea && n.getArea(); return t.get("clip", !0) ? i : null; }, e.prototype.updateTransform = function(t, n, i) { var a = t.getData(); this.group.dirty(); var o = Ww("").reset(t, n, i); o.progress && o.progress({ start: 0, end: a.count(), count: a.count() }, a), this._symbolDraw.updateLayout(); }, e.prototype._updateGroupTransform = function(t) { var n = t.coordinateSystem; n && n.getRoamTransform && (this.group.transform = bTe(n.getRoamTransform()), this.group.decomposeTransform()); }, e.prototype.remove = function(t, n) { this._symbolDraw && this._symbolDraw.remove(!0); }, e.type = "effectScatter", e; }(an); const uVe = sVe; var lVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.hasSymbolVisual = !0, t; } return e.prototype.getInitialData = function(t, n) { return _f(null, this, { useEncodeDefaulter: !0 }); }, e.prototype.brushSelector = function(t, n, i) { return i.point(n.getItemLayout(t)); }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = { coordinateSystem: "cartesian2d", z: 2, legendHoverLink: !0, effectType: "ripple", progressive: 0, showEffectOn: "render", clip: !0, rippleEffect: { period: 4, scale: 2.5, brushType: "fill", number: 3 }, universalTransition: { divideShape: "clone" }, symbolSize: 10 }, e; }(bn); const cVe = lVe; function fVe(r) { r.registerChartView(uVe), r.registerSeriesModel(cVe), r.registerLayout(Ww("effectScatter")); } var hVe = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this) || this; return a.add(a.createLine(t, n, i)), a._updateEffectSymbol(t, n), a; } return e.prototype.createLine = function(t, n, i) { return new QF(t, n, i); }, e.prototype._updateEffectSymbol = function(t, n) { var i = t.getItemModel(n), a = i.getModel("effect"), o = a.get("symbolSize"), s = a.get("symbol"); le(o) || (o = [o, o]); var u = t.getItemVisual(n, "style"), l = a.get("color") || u && u.stroke, c = this.childAt(1); this._symbolType !== s && (this.remove(c), c = vi(s, -0.5, -0.5, 1, 1, l), c.z2 = 100, c.culling = !0, this.add(c)), c && (c.setStyle("shadowColor", l), c.setStyle(a.getItemStyle(["color"])), c.scaleX = o[0], c.scaleY = o[1], c.setColor(l), this._symbolType = s, this._symbolScale = o, this._updateEffectAnimation(t, a, n)); }, e.prototype._updateEffectAnimation = function(t, n, i) { var a = this.childAt(1); if (!!a) { var o = t.getItemLayout(i), s = n.get("period") * 1e3, u = n.get("loop"), l = n.get("constantSpeed"), c = si(n.get("delay"), function(h) { return h / t.count() * s / 3; }); if (a.ignore = !0, this._updateAnimationPoints(a, o), l > 0 && (s = this._getLineLength(a) / l * 1e3), s !== this._period || u !== this._loop) { a.stopAnimation(); var f = void 0; ze(c) ? f = c(i) : f = c, a.__t > 0 && (f = -s * a.__t), this._animateSymbol(a, s, f, u); } this._period = s, this._loop = u; } }, e.prototype._animateSymbol = function(t, n, i, a) { if (n > 0) { t.__t = 0; var o = this, s = t.animate("", a).when(n, { __t: 1 }).delay(i).during(function() { o._updateSymbolPosition(t); }); a || s.done(function() { o.remove(t); }), s.start(); } }, e.prototype._getLineLength = function(t) { return qf(t.__p1, t.__cp1) + qf(t.__cp1, t.__p2); }, e.prototype._updateAnimationPoints = function(t, n) { t.__p1 = n[0], t.__p2 = n[1], t.__cp1 = n[2] || [(n[0][0] + n[1][0]) / 2, (n[0][1] + n[1][1]) / 2]; }, e.prototype.updateData = function(t, n, i) { this.childAt(0).updateData(t, n, i), this._updateEffectSymbol(t, n); }, e.prototype._updateSymbolPosition = function(t) { var n = t.__p1, i = t.__p2, a = t.__cp1, o = t.__t, s = [t.x, t.y], u = s.slice(), l = ia, c = wM; s[0] = l(n[0], a[0], i[0], o), s[1] = l(n[1], a[1], i[1], o); var f = c(n[0], a[0], i[0], o), h = c(n[1], a[1], i[1], o); t.rotation = -Math.atan2(h, f) - Math.PI / 2, (this._symbolType === "line" || this._symbolType === "rect" || this._symbolType === "roundRect") && (t.__lastT !== void 0 && t.__lastT < t.__t ? (t.scaleY = qf(u, s) * 1.05, o === 1 && (s[0] = u[0] + (s[0] - u[0]) / 2, s[1] = u[1] + (s[1] - u[1]) / 2)) : t.__lastT === 1 ? t.scaleY = 2 * qf(n, s) : t.scaleY = this._symbolScale[1]), t.__lastT = t.__t, t.ignore = !1, t.x = s[0], t.y = s[1]; }, e.prototype.updateLayout = function(t, n) { this.childAt(0).updateLayout(t, n); var i = t.getItemModel(n).getModel("effect"); this._updateEffectAnimation(t, i, n); }, e; }(rt); const See = hVe; var pVe = function(r) { W(e, r); function e(t, n, i) { var a = r.call(this) || this; return a._createPolyline(t, n, i), a; } return e.prototype._createPolyline = function(t, n, i) { var a = t.getItemLayout(n), o = new jo({ shape: { points: a } }); this.add(o), this._updateCommonStl(t, n, i); }, e.prototype.updateData = function(t, n, i) { var a = t.hostModel, o = this.childAt(0), s = { shape: { points: t.getItemLayout(n) } }; Ht(o, s, a, n), this._updateCommonStl(t, n, i); }, e.prototype._updateCommonStl = function(t, n, i) { var a = this.childAt(0), o = t.getItemModel(n), s = i && i.emphasisLineStyle, u = i && i.focus, l = i && i.blurScope, c = i && i.emphasisDisabled; if (!i || t.hasItemOption) { var f = o.getModel("emphasis"); s = f.getModel("lineStyle").getLineStyle(), c = f.get("disabled"), u = f.get("focus"), l = f.get("blurScope"); } a.useStyle(t.getItemVisual(n, "style")), a.style.fill = null, a.style.strokeNoScale = !0; var h = a.ensureState("emphasis"); h.style = s, Zn(this, u, l, c); }, e.prototype.updateLayout = function(t, n) { var i = this.childAt(0); i.setShape("points", t.getItemLayout(n)); }, e; }(rt); const Eee = pVe; var dVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t._lastFrame = 0, t._lastFramePercent = 0, t; } return e.prototype.createLine = function(t, n, i) { return new Eee(t, n, i); }, e.prototype._updateAnimationPoints = function(t, n) { this._points = n; for (var i = [0], a = 0, o = 1; o < n.length; o++) { var s = n[o - 1], u = n[o]; a += qf(s, u), i.push(a); } if (a === 0) { this._length = 0; return; } for (var o = 0; o < i.length; o++) i[o] /= a; this._offsets = i, this._length = a; }, e.prototype._getLineLength = function() { return this._length; }, e.prototype._updateSymbolPosition = function(t) { var n = t.__t, i = this._points, a = this._offsets, o = i.length; if (!!a) { var s = this._lastFrame, u; if (n < this._lastFramePercent) { var l = Math.min(s + 1, o - 1); for (u = l; u >= 0 && !(a[u] <= n); u--) ; u = Math.min(u, o - 2); } else { for (u = s; u < o && !(a[u] > n); u++) ; u = Math.min(u - 1, o - 2); } var c = (n - a[u]) / (a[u + 1] - a[u]), f = i[u], h = i[u + 1]; t.x = f[0] * (1 - c) + c * h[0], t.y = f[1] * (1 - c) + c * h[1]; var p = h[0] - f[0], d = h[1] - f[1]; t.rotation = -Math.atan2(d, p) - Math.PI / 2, this._lastFrame = u, this._lastFramePercent = n, t.ignore = !1; } }, e; }(See); const vVe = dVe; var gVe = function() { function r() { this.polyline = !1, this.curveness = 0, this.segs = []; } return r; }(), mVe = function(r) { W(e, r); function e(t) { var n = r.call(this, t) || this; return n._off = 0, n.hoverDataIdx = -1, n; } return e.prototype.reset = function() { this.notClear = !1, this._off = 0; }, e.prototype.getDefaultStyle = function() { return { stroke: "#000", fill: null }; }, e.prototype.getDefaultShape = function() { return new gVe(); }, e.prototype.buildPath = function(t, n) { var i = n.segs, a = n.curveness, o; if (n.polyline) for (o = this._off; o < i.length; ) { var s = i[o++]; if (s > 0) { t.moveTo(i[o++], i[o++]); for (var u = 1; u < s; u++) t.lineTo(i[o++], i[o++]); } } else for (o = this._off; o < i.length; ) { var l = i[o++], c = i[o++], f = i[o++], h = i[o++]; if (t.moveTo(l, c), a > 0) { var p = (l + f) / 2 - (c - h) * a, d = (c + h) / 2 - (f - l) * a; t.quadraticCurveTo(p, d, f, h); } else t.lineTo(f, h); } this.incremental && (this._off = o, this.notClear = !0); }, e.prototype.findDataIndex = function(t, n) { var i = this.shape, a = i.segs, o = i.curveness, s = this.style.lineWidth; if (i.polyline) for (var u = 0, l = 0; l < a.length; ) { var c = a[l++]; if (c > 0) for (var f = a[l++], h = a[l++], p = 1; p < c; p++) { var d = a[l++], v = a[l++]; if ($f(f, h, d, v, s, t, n)) return u; } u++; } else for (var u = 0, l = 0; l < a.length; ) { var f = a[l++], h = a[l++], d = a[l++], v = a[l++]; if (o > 0) { var g = (f + d) / 2 - (h - v) * o, m = (h + v) / 2 - (d - f) * o; if (Dq(f, h, g, m, d, v, s, t, n)) return u; } else if ($f(f, h, d, v, s, t, n)) return u; u++; } return -1; }, e.prototype.contain = function(t, n) { var i = this.transformCoordToLocal(t, n), a = this.getBoundingRect(); if (t = i[0], n = i[1], a.contain(t, n)) { var o = this.hoverDataIdx = this.findDataIndex(t, n); return o >= 0; } return this.hoverDataIdx = -1, !1; }, e.prototype.getBoundingRect = function() { var t = this._rect; if (!t) { for (var n = this.shape, i = n.segs, a = 1 / 0, o = 1 / 0, s = -1 / 0, u = -1 / 0, l = 0; l < i.length; ) { var c = i[l++], f = i[l++]; a = Math.min(c, a), s = Math.max(c, s), o = Math.min(f, o), u = Math.max(f, u); } t = this._rect = new gt(a, o, s, u); } return t; }, e; }(Tt), yVe = function() { function r() { this.group = new rt(); } return r.prototype.updateData = function(e) { this._clear(); var t = this._create(); t.setShape({ segs: e.getLayout("linesPoints") }), this._setCommon(t, e); }, r.prototype.incrementalPrepareUpdate = function(e) { this.group.removeAll(), this._clear(); }, r.prototype.incrementalUpdate = function(e, t) { var n = this._newAdded[0], i = t.getLayout("linesPoints"), a = n && n.shape.segs; if (a && a.length < 2e4) { var o = a.length, s = new Float32Array(o + i.length); s.set(a), s.set(i, o), n.setShape({ segs: s }); } else { this._newAdded = []; var u = this._create(); u.incremental = !0, u.setShape({ segs: i }), this._setCommon(u, t), u.__startIndex = e.start; } }, r.prototype.remove = function() { this._clear(); }, r.prototype.eachRendered = function(e) { this._newAdded[0] && e(this._newAdded[0]); }, r.prototype._create = function() { var e = new mVe({ cursor: "default" }); return this._newAdded.push(e), this.group.add(e), e; }, r.prototype._setCommon = function(e, t, n) { var i = t.hostModel; e.setShape({ polyline: i.get("polyline"), curveness: i.get(["lineStyle", "curveness"]) }), e.useStyle(i.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0; var a = t.getVisual("style"); a && a.stroke && e.setStyle("stroke", a.stroke), e.setStyle("fill", null); var o = nt(e); o.seriesIndex = i.seriesIndex, e.on("mousemove", function(s) { o.dataIndex = null; var u = e.hoverDataIdx; u > 0 && (o.dataIndex = u + e.__startIndex); }); }, r.prototype._clear = function() { this._newAdded = [], this.group.removeAll(); }, r; }(); const _Ve = yVe; var wVe = { seriesType: "lines", plan: Dy(), reset: function(r) { var e = r.coordinateSystem; if (!e) { process.env.NODE_ENV !== "production" && Oa("The lines series must have a coordinate system."); return; } var t = r.get("polyline"), n = r.pipelineContext.large; return { progress: function(i, a) { var o = []; if (n) { var s = void 0, u = i.end - i.start; if (t) { for (var l = 0, c = i.start; c < i.end; c++) l += r.getLineCoordsCount(c); s = new Float32Array(u + l * 2); } else s = new Float32Array(u * 4); for (var f = 0, h = [], c = i.start; c < i.end; c++) { var p = r.getLineCoords(c, o); t && (s[f++] = p); for (var d = 0; d < p; d++) h = e.dataToPoint(o[d], !1, h), s[f++] = h[0], s[f++] = h[1]; } a.setLayout("linesPoints", s); } else for (var c = i.start; c < i.end; c++) { var v = a.getItemModel(c), p = r.getLineCoords(c, o), g = []; if (t) for (var m = 0; m < p; m++) g.push(e.dataToPoint(o[m])); else { g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]); var y = v.get(["lineStyle", "curveness"]); +y && (g[2] = [(g[0][0] + g[1][0]) / 2 - (g[0][1] - g[1][1]) * y, (g[0][1] + g[1][1]) / 2 - (g[1][0] - g[0][0]) * y]); } a.setItemLayout(c, g); } } }; } }; const bee = wVe; var xVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = t.getData(), o = this._updateLineDraw(a, t), s = t.get("zlevel"), u = t.get(["effect", "trailLength"]), l = i.getZr(), c = l.painter.getType() === "svg"; c || l.painter.getLayer(s).clear(!0), this._lastZlevel != null && !c && l.configLayer(this._lastZlevel, { motionBlur: !1 }), this._showEffect(t) && u > 0 && (c ? process.env.NODE_ENV !== "production" && console.warn("SVG render mode doesn't support lines with trail effect") : l.configLayer(s, { motionBlur: !0, lastFrameAlpha: Math.max(Math.min(u / 10 + 0.9, 1), 0) })), o.updateData(a); var f = t.get("clip", !0) && lP(t.coordinateSystem, !1, t); f ? this.group.setClipPath(f) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0; }, e.prototype.incrementalPrepareRender = function(t, n, i) { var a = t.getData(), o = this._updateLineDraw(a, t); o.incrementalPrepareUpdate(a), this._clearLayer(i), this._finished = !1; }, e.prototype.incrementalRender = function(t, n, i) { this._lineDraw.incrementalUpdate(t, n.getData()), this._finished = t.end === n.getData().count(); }, e.prototype.eachRendered = function(t) { this._lineDraw && this._lineDraw.eachRendered(t); }, e.prototype.updateTransform = function(t, n, i) { var a = t.getData(), o = t.pipelineContext; if (!this._finished || o.large || o.progressiveRender) return { update: !0 }; var s = bee.reset(t, n, i); s.progress && s.progress({ start: 0, end: a.count(), count: a.count() }, a), this._lineDraw.updateLayout(), this._clearLayer(i); }, e.prototype._updateLineDraw = function(t, n) { var i = this._lineDraw, a = this._showEffect(n), o = !!n.get("polyline"), s = n.pipelineContext, u = s.large; return process.env.NODE_ENV !== "production" && a && u && console.warn("Large lines not support effect"), (!i || a !== this._hasEffet || o !== this._isPolyline || u !== this._isLargeDraw) && (i && i.remove(), i = this._lineDraw = u ? new _Ve() : new e5(o ? a ? vVe : Eee : a ? See : QF), this._hasEffet = a, this._isPolyline = o, this._isLargeDraw = u), this.group.add(i.group), i; }, e.prototype._showEffect = function(t) { return !!t.get(["effect", "show"]); }, e.prototype._clearLayer = function(t) { var n = t.getZr(), i = n.painter.getType() === "svg"; !i && this._lastZlevel != null && n.painter.getLayer(this._lastZlevel).clear(!0); }, e.prototype.remove = function(t, n) { this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(n); }, e.prototype.dispose = function(t, n) { this.remove(t, n); }, e.type = "lines", e; }(an); const CVe = xVe; var SVe = typeof Uint32Array > "u" ? Array : Uint32Array, EVe = typeof Float64Array > "u" ? Array : Float64Array; function B8(r) { var e = r.data; e && e[0] && e[0][0] && e[0][0].coord && (process.env.NODE_ENV !== "production" && console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"), r.data = ce(e, function(t) { var n = [t[0].coord, t[1].coord], i = { coords: n }; return t[0].name && (i.fromName = t[0].name), t[1].name && (i.toName = t[1].name), ON([i, t[0], t[1]]); })); } var bVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.visualStyleAccessPath = "lineStyle", t.visualDrawType = "stroke", t; } return e.prototype.init = function(t) { t.data = t.data || [], B8(t); var n = this._processFlatCoordsArray(t.data); this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (t.data = new Float32Array(n.count)), r.prototype.init.apply(this, arguments); }, e.prototype.mergeOption = function(t) { if (B8(t), t.data) { var n = this._processFlatCoordsArray(t.data); this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (t.data = new Float32Array(n.count)); } r.prototype.mergeOption.apply(this, arguments); }, e.prototype.appendData = function(t) { var n = this._processFlatCoordsArray(t.data); n.flatCoords && (this._flatCoords ? (this._flatCoords = iE(this._flatCoords, n.flatCoords), this._flatCoordsOffset = iE(this._flatCoordsOffset, n.flatCoordsOffset)) : (this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset), t.data = new Float32Array(n.count)), this.getRawData().appendData(t.data); }, e.prototype._getCoordsFromItemModel = function(t) { var n = this.getData().getItemModel(t), i = n.option instanceof Array ? n.option : n.getShallow("coords"); if (process.env.NODE_ENV !== "production" && !(i instanceof Array && i.length > 0 && i[0] instanceof Array)) throw new Error("Invalid coords " + JSON.stringify(i) + ". Lines must have 2d coords array in data item."); return i; }, e.prototype.getLineCoordsCount = function(t) { return this._flatCoordsOffset ? this._flatCoordsOffset[t * 2 + 1] : this._getCoordsFromItemModel(t).length; }, e.prototype.getLineCoords = function(t, n) { if (this._flatCoordsOffset) { for (var i = this._flatCoordsOffset[t * 2], a = this._flatCoordsOffset[t * 2 + 1], o = 0; o < a; o++) n[o] = n[o] || [], n[o][0] = this._flatCoords[i + o * 2], n[o][1] = this._flatCoords[i + o * 2 + 1]; return a; } else { for (var s = this._getCoordsFromItemModel(t), o = 0; o < s.length; o++) n[o] = n[o] || [], n[o][0] = s[o][0], n[o][1] = s[o][1]; return s.length; } }, e.prototype._processFlatCoordsArray = function(t) { var n = 0; if (this._flatCoords && (n = this._flatCoords.length), $t(t[0])) { for (var i = t.length, a = new SVe(i), o = new EVe(i), s = 0, u = 0, l = 0, c = 0; c < i; ) { l++; var f = t[c++]; a[u++] = s + n, a[u++] = f; for (var h = 0; h < f; h++) { var p = t[c++], d = t[c++]; if (o[s++] = p, o[s++] = d, c > i && process.env.NODE_ENV !== "production") throw new Error("Invalid data format."); } } return { flatCoordsOffset: new Uint32Array(a.buffer, 0, u), flatCoords: o, count: l }; } return { flatCoordsOffset: null, flatCoords: null, count: t.length }; }, e.prototype.getInitialData = function(t, n) { if (process.env.NODE_ENV !== "production") { var i = Ly.get(t.coordinateSystem); if (!i) throw new Error("Unkown coordinate system " + t.coordinateSystem); } var a = new ho(["value"], this); return a.hasItemOption = !1, a.initData(t.data, [], function(o, s, u, l) { if (o instanceof Array) return NaN; a.hasItemOption = !0; var c = o.value; if (c != null) return c instanceof Array ? c[l] : c; }), a; }, e.prototype.formatTooltip = function(t, n, i) { var a = this.getData(), o = a.getItemModel(t), s = o.get("name"); if (s) return s; var u = o.get("fromName"), l = o.get("toName"), c = []; return u != null && c.push(u), l != null && c.push(l), Ji("nameValue", { name: c.join(" > ") }); }, e.prototype.preventIncremental = function() { return !!this.get(["effect", "show"]); }, e.prototype.getProgressive = function() { var t = this.option.progressive; return t == null ? this.option.large ? 1e4 : this.get("progressive") : t; }, e.prototype.getProgressiveThreshold = function() { var t = this.option.progressiveThreshold; return t == null ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t; }, e.prototype.getZLevelKey = function() { var t = this.getModel("effect"), n = t.get("trailLength"); return this.getData().count() > this.getProgressiveThreshold() ? this.id : t.get("show") && n > 0 ? n + "" : ""; }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = { coordinateSystem: "geo", z: 2, legendHoverLink: !0, xAxisIndex: 0, yAxisIndex: 0, symbol: ["none", "none"], symbolSize: [10, 10], geoIndex: 0, effect: { show: !1, period: 4, constantSpeed: 0, symbol: "circle", symbolSize: 3, loop: !0, trailLength: 0.2 }, large: !1, largeThreshold: 2e3, polyline: !1, clip: !0, label: { show: !1, position: "end" }, lineStyle: { opacity: 0.5 } }, e; }(bn); const TVe = bVe; function bC(r) { return r instanceof Array || (r = [r, r]), r; } var PVe = { seriesType: "lines", reset: function(r) { var e = bC(r.get("symbol")), t = bC(r.get("symbolSize")), n = r.getData(); n.setVisual("fromSymbol", e && e[0]), n.setVisual("toSymbol", e && e[1]), n.setVisual("fromSymbolSize", t && t[0]), n.setVisual("toSymbolSize", t && t[1]); function i(a, o) { var s = a.getItemModel(o), u = bC(s.getShallow("symbol", !0)), l = bC(s.getShallow("symbolSize", !0)); u[0] && a.setItemVisual(o, "fromSymbol", u[0]), u[1] && a.setItemVisual(o, "toSymbol", u[1]), l[0] && a.setItemVisual(o, "fromSymbolSize", l[0]), l[1] && a.setItemVisual(o, "toSymbolSize", l[1]); } return { dataEach: n.hasItemOption ? i : null }; } }; const IVe = PVe; function AVe(r) { r.registerChartView(CVe), r.registerSeriesModel(TVe), r.registerLayout(bee), r.registerVisual(IVe); } var LVe = 256, DVe = function() { function r() { this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = { inRange: null, outOfRange: null }; var e = tf.createCanvas(); this.canvas = e; } return r.prototype.update = function(e, t, n, i, a, o) { var s = this._getBrush(), u = this._getGradient(a, "inRange"), l = this._getGradient(a, "outOfRange"), c = this.pointSize + this.blurSize, f = this.canvas, h = f.getContext("2d"), p = e.length; f.width = t, f.height = n; for (var d = 0; d < p; ++d) { var v = e[d], g = v[0], m = v[1], y = v[2], _ = i(y); h.globalAlpha = _, h.drawImage(s, g - c, m - c); } if (!f.width || !f.height) return f; for (var w = h.getImageData(0, 0, f.width, f.height), x = w.data, C = 0, S = x.length, b = this.minOpacity, E = this.maxOpacity, T = E - b; C < S; ) { var _ = x[C + 3] / 256, P = Math.floor(_ * (LVe - 1)) * 4; if (_ > 0) { var I = o(_) ? u : l; _ > 0 && (_ = _ * T + b), x[C++] = I[P], x[C++] = I[P + 1], x[C++] = I[P + 2], x[C++] = I[P + 3] * _ * 256; } else C += 4; } return h.putImageData(w, 0, 0), f; }, r.prototype._getBrush = function() { var e = this._brushCanvas || (this._brushCanvas = tf.createCanvas()), t = this.pointSize + this.blurSize, n = t * 2; e.width = n, e.height = n; var i = e.getContext("2d"); return i.clearRect(0, 0, n, n), i.shadowOffsetX = n, i.shadowBlur = this.blurSize, i.shadowColor = "#000", i.beginPath(), i.arc(-t, t, this.pointSize, 0, Math.PI * 2, !0), i.closePath(), i.fill(), e; }, r.prototype._getGradient = function(e, t) { for (var n = this._gradientPixels, i = n[t] || (n[t] = new Uint8ClampedArray(256 * 4)), a = [0, 0, 0, 0], o = 0, s = 0; s < 256; s++) e[t](s / 255, !0, a), i[o++] = a[0], i[o++] = a[1], i[o++] = a[2], i[o++] = a[3]; return i; }, r; }(); const MVe = DVe; function OVe(r, e, t) { var n = r[1] - r[0]; e = ce(e, function(o) { return { interval: [(o.interval[0] - r[0]) / n, (o.interval[1] - r[0]) / n] }; }); var i = e.length, a = 0; return function(o) { var s; for (s = a; s < i; s++) { var u = e[s].interval; if (u[0] <= o && o <= u[1]) { a = s; break; } } if (s === i) for (s = a - 1; s >= 0; s--) { var u = e[s].interval; if (u[0] <= o && o <= u[1]) { a = s; break; } } return s >= 0 && s < i && t[s]; }; } function RVe(r, e) { var t = r[1] - r[0]; return e = [(e[0] - r[0]) / t, (e[1] - r[0]) / t], function(n) { return n >= e[0] && n <= e[1]; }; } function k8(r) { var e = r.dimensions; return e[0] === "lng" && e[1] === "lat"; } var NVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a; if (n.eachComponent("visualMap", function(s) { s.eachTargetSeries(function(u) { u === t && (a = s); }); }), process.env.NODE_ENV !== "production" && !a) throw new Error("Heatmap must use with visualMap"); this._progressiveEls = null, this.group.removeAll(); var o = t.coordinateSystem; o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(t, i, 0, t.getData().count()) : k8(o) && this._renderOnGeo(o, t, a, i); }, e.prototype.incrementalPrepareRender = function(t, n, i) { this.group.removeAll(); }, e.prototype.incrementalRender = function(t, n, i, a) { var o = n.coordinateSystem; o && (k8(o) ? this.render(n, i, a) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(n, a, t.start, t.end, !0))); }, e.prototype.eachRendered = function(t) { Xh(this._progressiveEls || this.group, t); }, e.prototype._renderOnCartesianAndCalendar = function(t, n, i, a, o) { var s = t.coordinateSystem, u = mv(s, "cartesian2d"), l, c, f, h; if (u) { var p = s.getAxis("x"), d = s.getAxis("y"); if (process.env.NODE_ENV !== "production") { if (!(p.type === "category" && d.type === "category")) throw new Error("Heatmap on cartesian must have two category axes"); if (!(p.onBand && d.onBand)) throw new Error("Heatmap on cartesian must have two axes with boundaryGap true"); } l = p.getBandWidth() + 0.5, c = d.getBandWidth() + 0.5, f = p.scale.getExtent(), h = d.scale.getExtent(); } for (var v = this.group, g = t.getData(), m = t.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = t.getModel(["blur", "itemStyle"]).getItemStyle(), _ = t.getModel(["select", "itemStyle"]).getItemStyle(), w = t.get(["itemStyle", "borderRadius"]), x = wa(t), C = t.getModel("emphasis"), S = C.get("focus"), b = C.get("blurScope"), E = C.get("disabled"), T = u ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], P = i; P < a; P++) { var I = void 0, A = g.getItemVisual(P, "style"); if (u) { var L = g.get(T[0], P), D = g.get(T[1], P); if (isNaN(g.get(T[2], P)) || L < f[0] || L > f[1] || D < h[0] || D > h[1]) continue; var O = s.dataToPoint([L, D]); I = new Vt({ shape: { x: O[0] - l / 2, y: O[1] - c / 2, width: l, height: c }, style: A }); } else { if (isNaN(g.get(T[1], P))) continue; I = new Vt({ z2: 1, shape: s.dataToRect([g.get(T[0], P)]).contentShape, style: A }); } if (g.hasItemOption) { var N = g.getItemModel(P), F = N.getModel("emphasis"); m = F.getModel("itemStyle").getItemStyle(), y = N.getModel(["blur", "itemStyle"]).getItemStyle(), _ = N.getModel(["select", "itemStyle"]).getItemStyle(), w = N.get(["itemStyle", "borderRadius"]), S = F.get("focus"), b = F.get("blurScope"), E = F.get("disabled"), x = wa(N); } I.shape.r = w; var k = t.getRawValue(P), G = "-"; k && k[2] != null && (G = k[2] + ""), no(I, x, { labelFetcher: t, labelDataIndex: P, defaultOpacity: A.opacity, defaultText: G }), I.ensureState("emphasis").style = m, I.ensureState("blur").style = y, I.ensureState("select").style = _, Zn(I, S, b, E), I.incremental = o, o && (I.states.emphasis.hoverLayer = !0), v.add(I), g.setItemGraphicEl(P, I), this._progressiveEls && this._progressiveEls.push(I); } }, e.prototype._renderOnGeo = function(t, n, i, a) { var o = i.targetVisuals.inRange, s = i.targetVisuals.outOfRange, u = n.getData(), l = this._hmLayer || this._hmLayer || new MVe(); l.blurSize = n.get("blurSize"), l.pointSize = n.get("pointSize"), l.minOpacity = n.get("minOpacity"), l.maxOpacity = n.get("maxOpacity"); var c = t.getViewRect().clone(), f = t.getRoamTransform(); c.applyTransform(f); var h = Math.max(c.x, 0), p = Math.max(c.y, 0), d = Math.min(c.width + c.x, a.getWidth()), v = Math.min(c.height + c.y, a.getHeight()), g = d - h, m = v - p, y = [u.mapDimension("lng"), u.mapDimension("lat"), u.mapDimension("value")], _ = u.mapArray(y, function(S, b, E) { var T = t.dataToPoint([S, b]); return T[0] -= h, T[1] -= p, T.push(E), T; }), w = i.getExtent(), x = i.type === "visualMap.continuous" ? RVe(w, i.option.range) : OVe(w, i.getPieceList(), i.option.selected); l.update(_, g, m, o.color.getNormalizer(), { inRange: o.color.getColorMapper(), outOfRange: s.color.getColorMapper() }, x); var C = new Ba({ style: { width: g, height: m, x: h, y: p, image: l.canvas }, silent: !0 }); this.group.add(C); }, e.type = "heatmap", e; }(an); const FVe = NVe; var BVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.getInitialData = function(t, n) { return _f(null, this, { generateCoord: "value" }); }, e.prototype.preventIncremental = function() { var t = Ly.get(this.get("coordinateSystem")); if (t && t.dimensions) return t.dimensions[0] === "lng" && t.dimensions[1] === "lat"; }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = { coordinateSystem: "cartesian2d", z: 2, geoIndex: 0, blurSize: 30, pointSize: 20, maxOpacity: 1, minOpacity: 0, select: { itemStyle: { borderColor: "#212121" } } }, e; }(bn); const kVe = BVe; function VVe(r) { r.registerChartView(FVe), r.registerSeriesModel(kVe); } var GVe = ["itemStyle", "borderWidth"], V8 = [{ xy: "x", wh: "width", index: 0, posDesc: ["left", "right"] }, { xy: "y", wh: "height", index: 1, posDesc: ["top", "bottom"] }], pL = new rc(), zVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = this.group, o = t.getData(), s = this._data, u = t.coordinateSystem, l = u.getBaseAxis(), c = l.isHorizontal(), f = u.master.getRect(), h = { ecSize: { width: i.getWidth(), height: i.getHeight() }, seriesModel: t, coordSys: u, coordSysExtent: [[f.x, f.x + f.width], [f.y, f.y + f.height]], isHorizontal: c, valueDim: V8[+c], categoryDim: V8[1 - +c] }; return o.diff(s).add(function(p) { if (!!o.hasValue(p)) { var d = z8(o, p), v = G8(o, p, d, h), g = $8(o, h, v); o.setItemGraphicEl(p, g), a.add(g), U8(g, h, v); } }).update(function(p, d) { var v = s.getItemGraphicEl(d); if (!o.hasValue(p)) { a.remove(v); return; } var g = z8(o, p), m = G8(o, p, g, h), y = Dee(o, m); v && y !== v.__pictorialShapeStr && (a.remove(v), o.setItemGraphicEl(p, null), v = null), v ? XVe(v, h, m) : v = $8(o, h, m, !0), o.setItemGraphicEl(p, v), v.__pictorialSymbolMeta = m, a.add(v), U8(v, h, m); }).remove(function(p) { var d = s.getItemGraphicEl(p); d && H8(s, p, d.__pictorialSymbolMeta.animationModel, d); }).execute(), this._data = o, this.group; }, e.prototype.remove = function(t, n) { var i = this.group, a = this._data; t.get("animation") ? a && a.eachItemGraphicEl(function(o) { H8(a, nt(o).dataIndex, t, o); }) : i.removeAll(); }, e.type = "pictorialBar", e; }(an); function G8(r, e, t, n) { var i = r.getItemLayout(e), a = t.get("symbolRepeat"), o = t.get("symbolClip"), s = t.get("symbolPosition") || "start", u = t.get("symbolRotate"), l = (u || 0) * Math.PI / 180 || 0, c = t.get("symbolPatternSize") || 2, f = t.isAnimationEnabled(), h = { dataIndex: e, layout: i, itemModel: t, symbolType: r.getItemVisual(e, "symbol") || "circle", style: r.getItemVisual(e, "style"), symbolClip: o, symbolRepeat: a, symbolRepeatDirection: t.get("symbolRepeatDirection"), symbolPatternSize: c, rotation: l, animationModel: f ? t : null, hoverScale: f && t.get(["emphasis", "scale"]), z2: t.getShallow("z", !0) || 0 }; $Ve(t, a, i, n, h), HVe(r, e, i, a, o, h.boundingLength, h.pxSign, c, n, h), UVe(t, h.symbolScale, l, n, h); var p = h.symbolSize, d = Oy(t.get("symbolOffset"), p); return WVe(t, p, i, a, o, d, s, h.valueLineWidth, h.boundingLength, h.repeatCutLength, n, h), h; } function $Ve(r, e, t, n, i) { var a = n.valueDim, o = r.get("symbolBoundingData"), s = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), u = s.toGlobalCoord(s.dataToCoord(0)), l = 1 - +(t[a.wh] <= 0), c; if (le(o)) { var f = [dL(s, o[0]) - u, dL(s, o[1]) - u]; f[1] < f[0] && f.reverse(), c = f[l]; } else o != null ? c = dL(s, o) - u : e ? c = n.coordSysExtent[a.index][l] - u : c = t[a.wh]; i.boundingLength = c, e && (i.repeatCutLength = t[a.wh]), i.pxSign = c > 0 ? 1 : -1; } function dL(r, e) { return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e))); } function HVe(r, e, t, n, i, a, o, s, u, l) { var c = u.valueDim, f = u.categoryDim, h = Math.abs(t[f.wh]), p = r.getItemVisual(e, "symbolSize"), d; le(p) ? d = p.slice() : p == null ? d = ["100%", "100%"] : d = [p, p], d[f.index] = ye(d[f.index], h), d[c.index] = ye(d[c.index], n ? h : Math.abs(a)), l.symbolSize = d; var v = l.symbolScale = [d[0] / s, d[1] / s]; v[c.index] *= (u.isHorizontal ? -1 : 1) * o; } function UVe(r, e, t, n, i) { var a = r.get(GVe) || 0; a && (pL.attr({ scaleX: e[0], scaleY: e[1], rotation: t }), pL.updateTransform(), a /= pL.getLineScale(), a *= e[n.valueDim.index]), i.valueLineWidth = a || 0; } function WVe(r, e, t, n, i, a, o, s, u, l, c, f) { var h = c.categoryDim, p = c.valueDim, d = f.pxSign, v = Math.max(e[p.index] + s, 0), g = v; if (n) { var m = Math.abs(u), y = si(r.get("symbolMargin"), "15%") + "", _ = !1; y.lastIndexOf("!") === y.length - 1 && (_ = !0, y = y.slice(0, y.length - 1)); var w = ye(y, e[p.index]), x = Math.max(v + w * 2, 0), C = _ ? 0 : w * 2, S = $N(n), b = S ? n : W8((m + C) / x), E = m - b * v; w = E / 2 / (_ ? b : Math.max(b - 1, 1)), x = v + w * 2, C = _ ? 0 : w * 2, !S && n !== "fixed" && (b = l ? W8((Math.abs(l) + C) / x) : 0), g = b * x - C, f.repeatTimes = b, f.symbolMargin = w; } var T = d * (g / 2), P = f.pathPosition = []; P[h.index] = t[h.wh] / 2, P[p.index] = o === "start" ? T : o === "end" ? u - T : u / 2, a && (P[0] += a[0], P[1] += a[1]); var I = f.bundlePosition = []; I[h.index] = t[h.xy], I[p.index] = t[p.xy]; var A = f.barRectShape = oe({}, t); A[p.wh] = d * Math.max(Math.abs(t[p.wh]), Math.abs(P[p.index] + T)), A[h.wh] = t[h.wh]; var L = f.clipShape = {}; L[h.xy] = -t[h.xy], L[h.wh] = c.ecSize[h.wh], L[p.xy] = 0, L[p.wh] = t[p.wh]; } function Tee(r) { var e = r.symbolPatternSize, t = vi( r.symbolType, -e / 2, -e / 2, e, e ); return t.attr({ culling: !0 }), t.type !== "image" && t.setStyle({ strokeNoScale: !0 }), t; } function Pee(r, e, t, n) { var i = r.__pictorialBundle, a = t.symbolSize, o = t.valueLineWidth, s = t.pathPosition, u = e.valueDim, l = t.repeatTimes || 0, c = 0, f = a[e.valueDim.index] + o + t.symbolMargin * 2; for (u5(r, function(v) { v.__pictorialAnimationIndex = c, v.__pictorialRepeatTimes = l, c < l ? Kg(v, null, d(c), t, n) : Kg(v, null, { scaleX: 0, scaleY: 0 }, t, n, function() { i.remove(v); }), c++; }); c < l; c++) { var h = Tee(t); h.__pictorialAnimationIndex = c, h.__pictorialRepeatTimes = l, i.add(h); var p = d(c); Kg(h, { x: p.x, y: p.y, scaleX: 0, scaleY: 0 }, { scaleX: p.scaleX, scaleY: p.scaleY, rotation: p.rotation }, t, n); } function d(v) { var g = s.slice(), m = t.pxSign, y = v; return (t.symbolRepeatDirection === "start" ? m > 0 : m < 0) && (y = l - 1 - v), g[u.index] = f * (y - l / 2 + 0.5) + s[u.index], { x: g[0], y: g[1], scaleX: t.symbolScale[0], scaleY: t.symbolScale[1], rotation: t.rotation }; } } function Iee(r, e, t, n) { var i = r.__pictorialBundle, a = r.__pictorialMainPath; a ? Kg(a, null, { x: t.pathPosition[0], y: t.pathPosition[1], scaleX: t.symbolScale[0], scaleY: t.symbolScale[1], rotation: t.rotation }, t, n) : (a = r.__pictorialMainPath = Tee(t), i.add(a), Kg(a, { x: t.pathPosition[0], y: t.pathPosition[1], scaleX: 0, scaleY: 0, rotation: t.rotation }, { scaleX: t.symbolScale[0], scaleY: t.symbolScale[1] }, t, n)); } function Aee(r, e, t) { var n = oe({}, e.barRectShape), i = r.__pictorialBarRect; i ? Kg(i, null, { shape: n }, e, t) : (i = r.__pictorialBarRect = new Vt({ z2: 2, shape: n, silent: !0, style: { stroke: "transparent", fill: "transparent", lineWidth: 0 } }), i.disableMorphing = !0, r.add(i)); } function Lee(r, e, t, n) { if (t.symbolClip) { var i = r.__pictorialClipPath, a = oe({}, t.clipShape), o = e.valueDim, s = t.animationModel, u = t.dataIndex; if (i) Ht(i, { shape: a }, s, u); else { a[o.wh] = 0, i = new Vt({ shape: a }), r.__pictorialBundle.setClipPath(i), r.__pictorialClipPath = i; var l = {}; l[o.wh] = t.clipShape[o.wh], Bw[n ? "updateProps" : "initProps"](i, { shape: l }, s, u); } } } function z8(r, e) { var t = r.getItemModel(e); return t.getAnimationDelayParams = jVe, t.isAnimationEnabled = YVe, t; } function jVe(r) { return { index: r.__pictorialAnimationIndex, count: r.__pictorialRepeatTimes }; } function YVe() { return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation"); } function $8(r, e, t, n) { var i = new rt(), a = new rt(); return i.add(a), i.__pictorialBundle = a, a.x = t.bundlePosition[0], a.y = t.bundlePosition[1], t.symbolRepeat ? Pee(i, e, t) : Iee(i, e, t), Aee(i, t, n), Lee(i, e, t, n), i.__pictorialShapeStr = Dee(r, t), i.__pictorialSymbolMeta = t, i; } function XVe(r, e, t) { var n = t.animationModel, i = t.dataIndex, a = r.__pictorialBundle; Ht(a, { x: t.bundlePosition[0], y: t.bundlePosition[1] }, n, i), t.symbolRepeat ? Pee(r, e, t, !0) : Iee(r, e, t, !0), Aee(r, t, !0), Lee(r, e, t, !0); } function H8(r, e, t, n) { var i = n.__pictorialBarRect; i && i.removeTextContent(); var a = []; u5(n, function(o) { a.push(o); }), n.__pictorialMainPath && a.push(n.__pictorialMainPath), n.__pictorialClipPath && (t = null), M(a, function(o) { Rh(o, { scaleX: 0, scaleY: 0 }, t, e, function() { n.parent && n.parent.remove(n); }); }), r.setItemGraphicEl(e, null); } function Dee(r, e) { return [r.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":"); } function u5(r, e, t) { M(r.__pictorialBundle.children(), function(n) { n !== r.__pictorialBarRect && e.call(t, n); }); } function Kg(r, e, t, n, i, a) { e && r.attr(e), n.symbolClip && !i ? t && r.attr(t) : t && Bw[i ? "updateProps" : "initProps"](r, t, n.animationModel, n.dataIndex, a); } function U8(r, e, t) { var n = t.dataIndex, i = t.itemModel, a = i.getModel("emphasis"), o = a.getModel("itemStyle").getItemStyle(), s = i.getModel(["blur", "itemStyle"]).getItemStyle(), u = i.getModel(["select", "itemStyle"]).getItemStyle(), l = i.getShallow("cursor"), c = a.get("focus"), f = a.get("blurScope"), h = a.get("scale"); u5(r, function(v) { if (v instanceof Ba) { var g = v.style; v.useStyle(oe({ image: g.image, x: g.x, y: g.y, width: g.width, height: g.height }, t.style)); } else v.useStyle(t.style); var m = v.ensureState("emphasis"); m.style = o, h && (m.scaleX = v.scaleX * 1.1, m.scaleY = v.scaleY * 1.1), v.ensureState("blur").style = s, v.ensureState("select").style = u, l && (v.cursor = l), v.z2 = t.z2; }); var p = e.valueDim.posDesc[+(t.boundingLength > 0)], d = r.__pictorialBarRect; no(d, wa(i), { labelFetcher: e.seriesModel, labelDataIndex: n, defaultText: Bm(e.seriesModel.getData(), n), inheritColor: t.style.fill, defaultOpacity: t.style.opacity, defaultOutsidePosition: p }), Zn(r, c, f, a.get("disabled")); } function W8(r) { var e = Math.round(r); return Math.abs(r - e) < 1e-4 ? e : Math.ceil(r); } const qVe = zVe; var ZVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.hasSymbolVisual = !0, t.defaultSymbol = "roundRect", t; } return e.prototype.getInitialData = function(t) { return t.stack = null, r.prototype.getInitialData.apply(this, arguments); }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = qh(NE.defaultOption, { symbol: "circle", symbolSize: null, symbolRotate: null, symbolPosition: null, symbolOffset: null, symbolMargin: null, symbolRepeat: !1, symbolRepeatDirection: "end", symbolClip: !1, symbolBoundingData: null, symbolPatternSize: 400, barGap: "-100%", progressive: 0, emphasis: { scale: !1 }, select: { itemStyle: { borderColor: "#212121" } } }), e; }(NE); const KVe = ZVe; function JVe(r) { r.registerChartView(qVe), r.registerSeriesModel(KVe), r.registerLayout(r.PRIORITY.VISUAL.LAYOUT, ut(pJ, "pictorialBar")), r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, dJ("pictorialBar")); } var QVe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._layers = [], t; } return e.prototype.render = function(t, n, i) { var a = t.getData(), o = this, s = this.group, u = t.getLayerSeries(), l = a.getLayout("layoutInfo"), c = l.rect, f = l.boundaryGap; s.x = 0, s.y = c.y + f[0]; function h(g) { return g.name; } var p = new sf(this._layersSeries || [], u, h, h), d = []; p.add(Ae(v, this, "add")).update(Ae(v, this, "update")).remove(Ae(v, this, "remove")).execute(); function v(g, m, y) { var _ = o._layers; if (g === "remove") { s.remove(_[m]); return; } for (var w = [], x = [], C, S = u[m].indices, b = 0; b < S.length; b++) { var E = a.getItemLayout(S[b]), T = E.x, P = E.y0, I = E.y; w.push(T, P), x.push(T, P + I), C = a.getItemVisual(S[b], "style"); } var A, L = a.getItemLayout(S[0]), D = t.getModel("label"), O = D.get("margin"), N = t.getModel("emphasis"); if (g === "add") { var F = d[m] = new rt(); A = new eQ({ shape: { points: w, stackedOnPoints: x, smooth: 0.4, stackedOnSmooth: 0.4, smoothConstraint: !1 }, z2: 0 }), F.add(A), s.add(F), t.isAnimationEnabled() && A.setClipPath(e6e(A.getBoundingRect(), t, function() { A.removeClipPath(); })); } else { var F = _[y]; A = F.childAt(0), s.add(F), d[m] = F, Ht(A, { shape: { points: w, stackedOnPoints: x } }, t), nl(A); } no(A, wa(t), { labelDataIndex: S[b - 1], defaultText: a.getName(S[b - 1]), inheritColor: C.fill }, { normal: { verticalAlign: "middle" } }), A.setTextConfig({ position: null, local: !0 }); var k = A.getTextContent(); k && (k.x = L.x - O, k.y = L.y0 + L.y / 2), A.useStyle(C), a.setItemGraphicEl(m, A), Ra(A, t), Zn(A, N.get("focus"), N.get("blurScope"), N.get("disabled")); } this._layersSeries = u, this._layers = d; }, e.type = "themeRiver", e; }(an); function e6e(r, e, t) { var n = new Vt({ shape: { x: r.x - 10, y: r.y - 10, width: 0, height: r.height + 20 } }); return Cn(n, { shape: { x: r.x - 50, width: r.width + 100, height: r.height + 20 } }, e, t), n; } const t6e = QVe; var vL = 2, r6e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t) { r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Yw(Ae(this.getData, this), Ae(this.getRawData, this)); }, e.prototype.fixData = function(t) { var n = t.length, i = {}, a = RM(t, function(h) { return i.hasOwnProperty(h[0] + "") || (i[h[0] + ""] = -1), h[2]; }), o = []; a.buckets.each(function(h, p) { o.push({ name: p, dataList: h }); }); for (var s = o.length, u = 0; u < s; ++u) { for (var l = o[u].name, c = 0; c < o[u].dataList.length; ++c) { var f = o[u].dataList[c][0] + ""; i[f] = u; } for (var f in i) i.hasOwnProperty(f) && i[f] !== u && (i[f] = u, t[n] = [f, 0, l], n++); } return t; }, e.prototype.getInitialData = function(t, n) { for (var i = this.getReferringComponents("singleAxis", ui).models[0], a = i.get("type"), o = Wr(t.data, function(d) { return d[2] !== void 0; }), s = this.fixData(o || []), u = [], l = this.nameMap = $e(), c = 0, f = 0; f < s.length; ++f) u.push(s[f][vL]), l.get(s[f][vL]) || (l.set(s[f][vL], c), c++); var h = Gw(s, { coordDimensions: ["single"], dimensionsDefine: [{ name: "time", type: LE(a) }, { name: "value", type: "float" }, { name: "name", type: "ordinal" }], encodeDefine: { single: 0, value: 1, itemName: 2 } }).dimensions, p = new ho(h, this); return p.initData(s), p; }, e.prototype.getLayerSeries = function() { for (var t = this.getData(), n = t.count(), i = [], a = 0; a < n; ++a) i[a] = a; var o = t.mapDimension("single"), s = RM(i, function(l) { return t.get("name", l); }), u = []; return s.buckets.each(function(l, c) { l.sort(function(f, h) { return t.get(o, f) - t.get(o, h); }), u.push({ name: c, indices: l }); }), u; }, e.prototype.getAxisTooltipData = function(t, n, i) { le(t) || (t = t ? [t] : []); for (var a = this.getData(), o = this.getLayerSeries(), s = [], u = o.length, l, c = 0; c < u; ++c) { for (var f = Number.MAX_VALUE, h = -1, p = o[c].indices.length, d = 0; d < p; ++d) { var v = a.get(t[0], o[c].indices[d]), g = Math.abs(v - n); g <= f && (l = v, f = g, h = o[c].indices[d]); } s.push(h); } return { dataIndices: s, nestestValue: l }; }, e.prototype.formatTooltip = function(t, n, i) { var a = this.getData(), o = a.getName(t), s = a.get(a.mapDimension("value"), t); return Ji("nameValue", { name: o, value: s }); }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = { z: 2, colorBy: "data", coordinateSystem: "singleAxis", boundaryGap: ["10%", "10%"], singleAxisIndex: 0, animationEasing: "linear", label: { margin: 4, show: !0, position: "left", fontSize: 11 }, emphasis: { label: { show: !0 } } }, e; }(bn); const n6e = r6e; function i6e(r, e) { r.eachSeriesByType("themeRiver", function(t) { var n = t.getData(), i = t.coordinateSystem, a = {}, o = i.getRect(); a.rect = o; var s = t.get("boundaryGap"), u = i.getAxis(); if (a.boundaryGap = s, u.orient === "horizontal") { s[0] = ye(s[0], o.height), s[1] = ye(s[1], o.height); var l = o.height - s[0] - s[1]; j8(n, t, l); } else { s[0] = ye(s[0], o.width), s[1] = ye(s[1], o.width); var c = o.width - s[0] - s[1]; j8(n, t, c); } n.setLayout("layoutInfo", a); }); } function j8(r, e, t) { if (!!r.count()) for (var n = e.coordinateSystem, i = e.getLayerSeries(), a = r.mapDimension("single"), o = r.mapDimension("value"), s = ce(i, function(g) { return ce(g.indices, function(m) { var y = n.dataToPoint(r.get(a, m)); return y[1] = r.get(o, m), y; }); }), u = a6e(s), l = u.y0, c = t / u.max, f = i.length, h = i[0].indices.length, p, d = 0; d < h; ++d) { p = l[d] * c, r.setItemLayout(i[0].indices[d], { layerIndex: 0, x: s[0][d][0], y0: p, y: s[0][d][1] * c }); for (var v = 1; v < f; ++v) p += s[v - 1][d][1] * c, r.setItemLayout(i[v].indices[d], { layerIndex: v, x: s[v][d][0], y0: p, y: s[v][d][1] * c }); } } function a6e(r) { for (var e = r.length, t = r[0].length, n = [], i = [], a = 0, o = 0; o < t; ++o) { for (var s = 0, u = 0; u < e; ++u) s += r[u][o][1]; s > a && (a = s), n.push(s); } for (var l = 0; l < t; ++l) i[l] = (a - n[l]) / 2; a = 0; for (var c = 0; c < t; ++c) { var f = n[c] + i[c]; f > a && (a = f); } return { y0: i, max: a }; } function o6e(r) { r.registerChartView(t6e), r.registerSeriesModel(n6e), r.registerLayout(i6e), r.registerProcessor(jw("themeRiver")); } var s6e = 2, u6e = 4, l6e = function(r) { W(e, r); function e(t, n, i, a) { var o = r.call(this) || this; o.z2 = s6e, o.textConfig = { inside: !0 }, nt(o).seriesIndex = n.seriesIndex; var s = new Yt({ z2: u6e, silent: t.getModel().get(["label", "silent"]) }); return o.setTextContent(s), o.updateData(!0, t, n, i, a), o; } return e.prototype.updateData = function(t, n, i, a, o) { this.node = n, n.piece = this, i = i || this._seriesModel, a = a || this._ecModel; var s = this; nt(s).dataIndex = n.dataIndex; var u = n.getModel(), l = u.getModel("emphasis"), c = n.getLayout(), f = oe({}, c); f.label = null; var h = n.getVisual("style"); h.lineJoin = "bevel"; var p = n.getVisual("decal"); p && (h.decal = Nm(p, o)); var d = Ng(u.getModel("itemStyle"), f, !0); oe(f, d), M(Co, function(y) { var _ = s.ensureState(y), w = u.getModel([y, "itemStyle"]); _.style = w.getItemStyle(); var x = Ng(w, f); x && (_.shape = x); }), t ? (s.setShape(f), s.shape.r = c.r0, Ht(s, { shape: { r: c.r } }, i, n.dataIndex)) : (Ht(s, { shape: f }, i), nl(s)), s.useStyle(h), this._updateLabel(i); var v = u.getShallow("cursor"); v && s.attr("cursor", v), this._seriesModel = i || this._seriesModel, this._ecModel = a || this._ecModel; var g = l.get("focus"), m = g === "ancestor" ? n.getAncestorsIndices() : g === "descendant" ? n.getDescendantIndices() : g; Zn(this, m, l.get("blurScope"), l.get("disabled")); }, e.prototype._updateLabel = function(t) { var n = this, i = this.node.getModel(), a = i.getModel("label"), o = this.node.getLayout(), s = o.endAngle - o.startAngle, u = (o.startAngle + o.endAngle) / 2, l = Math.cos(u), c = Math.sin(u), f = this, h = f.getTextContent(), p = this.node.dataIndex, d = a.get("minAngle") / 180 * Math.PI, v = a.get("show") && !(d != null && Math.abs(s) < d); h.ignore = !v, M(v1, function(m) { var y = m === "normal" ? i.getModel("label") : i.getModel([m, "label"]), _ = m === "normal", w = _ ? h : h.ensureState(m), x = t.getFormattedLabel(p, m); _ && (x = x || n.node.name), w.style = Sn(y, {}, null, m !== "normal", !0), x && (w.style.text = x); var C = y.get("show"); C != null && !_ && (w.ignore = !C); var S = g(y, "position"), b = _ ? f : f.states[m], E = b.style.fill; b.textConfig = { outsideFill: y.get("color") === "inherit" ? E : null, inside: S !== "outside" }; var T, P = g(y, "distance") || 0, I = g(y, "align"); S === "outside" ? (T = o.r + P, I = u > Math.PI / 2 ? "right" : "left") : !I || I === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? T = 0 : T = (o.r + o.r0) / 2, I = "center") : I === "left" ? (T = o.r0 + P, u > Math.PI / 2 && (I = "right")) : I === "right" && (T = o.r - P, u > Math.PI / 2 && (I = "left")), w.style.align = I, w.style.verticalAlign = g(y, "verticalAlign") || "middle", w.x = T * l + o.cx, w.y = T * c + o.cy; var A = g(y, "rotate"), L = 0; A === "radial" ? (L = -u, L < -Math.PI / 2 && (L += Math.PI)) : A === "tangential" ? (L = Math.PI / 2 - u, L > Math.PI / 2 ? L -= Math.PI : L < -Math.PI / 2 && (L += Math.PI)) : $t(A) && (L = A * Math.PI / 180), w.rotation = L; }); function g(m, y) { var _ = m.get(y); return _ == null ? a.get(y) : _; } h.dirtyStyle(); }, e; }($o); const Y8 = l6e; var O2 = "sunburstRootToNode", X8 = "sunburstHighlight", c6e = "sunburstUnhighlight"; function f6e(r) { r.registerAction({ type: O2, update: "updateView" }, function(e, t) { t.eachComponent({ mainType: "series", subType: "sunburst", query: e }, n); function n(i, a) { var o = I1(e, [O2], i); if (o) { var s = i.getViewRoot(); s && (e.direction = qF(s, o.node) ? "rollUp" : "drillDown"), i.resetViewRoot(o.node); } } }), r.registerAction({ type: X8, update: "none" }, function(e, t, n) { e = oe({}, e), t.eachComponent({ mainType: "series", subType: "sunburst", query: e }, i); function i(a) { var o = I1(e, [X8], a); o && (e.dataIndex = o.node.dataIndex); } process.env.NODE_ENV !== "production" && ii("highlight", "sunburstHighlight"), n.dispatchAction(oe(e, { type: "highlight" })); }), r.registerAction({ type: c6e, update: "updateView" }, function(e, t, n) { e = oe({}, e), process.env.NODE_ENV !== "production" && ii("downplay", "sunburstUnhighlight"), n.dispatchAction(oe(e, { type: "downplay" })); }); } var h6e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i, a) { var o = this; this.seriesModel = t, this.api = i, this.ecModel = n; var s = t.getData(), u = s.tree.root, l = t.getViewRoot(), c = this.group, f = t.get("renderLabelForZeroData"), h = []; l.eachNode(function(y) { h.push(y); }); var p = this._oldChildren || []; d(h, p), m(u, l), this._initEvents(), this._oldChildren = h; function d(y, _) { if (y.length === 0 && _.length === 0) return; new sf(_, y, w, w).add(x).update(x).remove(ut(x, null)).execute(); function w(C) { return C.getId(); } function x(C, S) { var b = C == null ? null : y[C], E = S == null ? null : _[S]; v(b, E); } } function v(y, _) { if (!f && y && !y.getValue() && (y = null), y !== u && _ !== u) { if (_ && _.piece) y ? (_.piece.updateData(!1, y, t, n, i), s.setItemGraphicEl(y.dataIndex, _.piece)) : g(_); else if (y) { var w = new Y8(y, t, n, i); c.add(w), s.setItemGraphicEl(y.dataIndex, w); } } } function g(y) { !y || y.piece && (c.remove(y.piece), y.piece = null); } function m(y, _) { _.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, y, t, n, i) : (o.virtualPiece = new Y8(y, t, n, i), c.add(o.virtualPiece)), _.piece.off("click"), o.virtualPiece.on("click", function(w) { o._rootToNode(_.parentNode); })) : o.virtualPiece && (c.remove(o.virtualPiece), o.virtualPiece = null); } }, e.prototype._initEvents = function() { var t = this; this.group.off("click"), this.group.on("click", function(n) { var i = !1, a = t.seriesModel.getViewRoot(); a.eachNode(function(o) { if (!i && o.piece && o.piece === n.target) { var s = o.getModel().get("nodeClick"); if (s === "rootToNode") t._rootToNode(o); else if (s === "link") { var u = o.getModel(), l = u.get("link"); if (l) { var c = u.get("target", !0) || "_blank"; wE(l, c); } } i = !0; } }); }); }, e.prototype._rootToNode = function(t) { t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({ type: O2, from: this.uid, seriesId: this.seriesModel.id, targetNode: t }); }, e.prototype.containPoint = function(t, n) { var i = n.getData(), a = i.getItemLayout(0); if (a) { var o = t[0] - a.cx, s = t[1] - a.cy, u = Math.sqrt(o * o + s * s); return u <= a.r && u >= a.r0; } }, e.type = "sunburst", e; }(an); const p6e = h6e; var d6e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.ignoreStyleOnData = !0, t; } return e.prototype.getInitialData = function(t, n) { var i = { name: t.name, children: t.data }; Mee(i); var a = this._levelModels = ce(t.levels || [], function(u) { return new rn(u, this, n); }, this), o = XF.createTree(i, this, s); function s(u) { u.wrapMethod("getItemModel", function(l, c) { var f = o.getNodeByDataIndex(c), h = a[f.depth]; return h && (l.parentModel = h), l; }); } return o.data; }, e.prototype.optionUpdated = function() { this.resetViewRoot(); }, e.prototype.getDataParams = function(t) { var n = r.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(t); return n.treePathInfo = hP(i, this), n; }, e.prototype.getLevelModel = function(t) { return this._levelModels && this._levelModels[t.depth]; }, e.prototype.getViewRoot = function() { return this._viewRoot; }, e.prototype.resetViewRoot = function(t) { t ? this._viewRoot = t : t = this._viewRoot; var n = this.getRawData().tree.root; (!t || t !== n && !n.contains(t)) && (this._viewRoot = n); }, e.prototype.enableAriaDecal = function() { NQ(this); }, e.type = "series.sunburst", e.defaultOption = { z: 2, center: ["50%", "50%"], radius: [0, "75%"], clockwise: !0, startAngle: 90, minAngle: 0, stillShowZeroSum: !0, nodeClick: "rootToNode", renderLabelForZeroData: !1, label: { rotate: "radial", show: !0, opacity: 1, align: "center", position: "inside", distance: 5, silent: !0 }, itemStyle: { borderWidth: 1, borderColor: "white", borderType: "solid", shadowBlur: 0, shadowColor: "rgba(0, 0, 0, 0.2)", shadowOffsetX: 0, shadowOffsetY: 0, opacity: 1 }, emphasis: { focus: "descendant" }, blur: { itemStyle: { opacity: 0.2 }, label: { opacity: 0.1 } }, animationType: "expansion", animationDuration: 1e3, animationDurationUpdate: 500, data: [], sort: "desc" }, e; }(bn); function Mee(r) { var e = 0; M(r.children, function(n) { Mee(n); var i = n.value; le(i) && (i = i[0]), e += i; }); var t = r.value; le(t) && (t = t[0]), (t == null || isNaN(t)) && (t = e), t < 0 && (t = 0), le(r.value) ? r.value[0] = t : r.value = t; } const v6e = d6e; var q8 = Math.PI / 180; function g6e(r, e, t) { e.eachSeriesByType(r, function(n) { var i = n.get("center"), a = n.get("radius"); le(a) || (a = [0, a]), le(i) || (i = [i, i]); var o = t.getWidth(), s = t.getHeight(), u = Math.min(o, s), l = ye(i[0], o), c = ye(i[1], s), f = ye(a[0], u / 2), h = ye(a[1], u / 2), p = -n.get("startAngle") * q8, d = n.get("minAngle") * q8, v = n.getData().tree.root, g = n.getViewRoot(), m = g.depth, y = n.get("sort"); y != null && Oee(g, y); var _ = 0; M(g.children, function(O) { !isNaN(O.getValue()) && _++; }); var w = g.getValue(), x = Math.PI / (w || _) * 2, C = g.depth > 0, S = g.height - (C ? -1 : 1), b = (h - f) / (S || 1), E = n.get("clockwise"), T = n.get("stillShowZeroSum"), P = E ? 1 : -1, I = function(O, N) { if (!!O) { var F = N; if (O !== v) { var k = O.getValue(), G = w === 0 && T ? x : k * x; G < d && (G = d), F = N + P * G; var U = O.depth - m - (C ? -1 : 1), B = f + b * U, X = f + b * (U + 1), j = n.getLevelModel(O); if (j) { var ae = j.get("r0", !0), se = j.get("r", !0), $ = j.get("radius", !0); $ != null && (ae = $[0], se = $[1]), ae != null && (B = ye(ae, u / 2)), se != null && (X = ye(se, u / 2)); } O.setLayout({ angle: G, startAngle: N, endAngle: F, clockwise: E, cx: l, cy: c, r0: B, r: X }); } if (O.children && O.children.length) { var V = 0; M(O.children, function(q) { V += I(q, N + V); }); } return F - N; } }; if (C) { var A = f, L = f + b, D = Math.PI * 2; v.setLayout({ angle: D, startAngle: p, endAngle: p + D, clockwise: E, cx: l, cy: c, r0: A, r: L }); } I(g, p); }); } function Oee(r, e) { var t = r.children || []; r.children = m6e(t, e), t.length && M(r.children, function(n) { Oee(n, e); }); } function m6e(r, e) { if (ze(e)) { var t = ce(r, function(i, a) { var o = i.getValue(); return { params: { depth: i.depth, height: i.height, dataIndex: i.dataIndex, getValue: function() { return o; } }, index: a }; }); return t.sort(function(i, a) { return e(i.params, a.params); }), ce(t, function(i) { return r[i.index]; }); } else { var n = e === "asc"; return r.sort(function(i, a) { var o = (i.getValue() - a.getValue()) * (n ? 1 : -1); return o === 0 ? (i.dataIndex - a.dataIndex) * (n ? -1 : 1) : o; }); } } function y6e(r) { var e = {}; function t(n, i, a) { for (var o = n; o && o.depth > 1; ) o = o.parentNode; var s = i.getColorFromPalette(o.name || o.dataIndex + "", e); return n.depth > 1 && Se(s) && (s = SM(s, (n.depth - 1) / (a - 1) * 0.5)), s; } r.eachSeriesByType("sunburst", function(n) { var i = n.getData(), a = i.tree; a.eachNode(function(o) { var s = o.getModel(), u = s.getModel("itemStyle").getItemStyle(); u.fill || (u.fill = t(o, n, a.root.height)); var l = i.ensureUniqueItemVisual(o.dataIndex, "style"); oe(l, u); }); }); } function _6e(r) { r.registerChartView(p6e), r.registerSeriesModel(v6e), r.registerLayout(ut(g6e, "sunburst")), r.registerProcessor(ut(jw, "sunburst")), r.registerVisual(y6e), f6e(r); } var Z8 = { color: "fill", borderColor: "stroke" }, w6e = { symbol: 1, symbolSize: 1, symbolKeepAspect: 1, legendIcon: 1, visualMeta: 1, liftZ: 1, decal: 1 }, Vc = Ut(), x6e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.optionUpdated = function() { this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0); }, e.prototype.getInitialData = function(t, n) { return _f(null, this); }, e.prototype.getDataParams = function(t, n, i) { var a = r.prototype.getDataParams.call(this, t, n); return i && (a.info = Vc(i).info), a; }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = { coordinateSystem: "cartesian2d", z: 2, legendHoverLink: !0, clip: !1 }, e; }(bn); const C6e = x6e; function S6e(r, e) { return e = e || [0, 0], ce(["x", "y"], function(t, n) { var i = this.getAxis(t), a = e[n], o = r[n] / 2; return i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(a - o) - i.dataToCoord(a + o)); }, this); } function E6e(r) { var e = r.master.getRect(); return { coordSys: { type: "cartesian2d", x: e.x, y: e.y, width: e.width, height: e.height }, api: { coord: function(t) { return r.dataToPoint(t); }, size: Ae(S6e, r) } }; } function b6e(r, e) { return e = e || [0, 0], ce([0, 1], function(t) { var n = e[t], i = r[t] / 2, a = [], o = []; return a[t] = n - i, o[t] = n + i, a[1 - t] = o[1 - t] = e[1 - t], Math.abs(this.dataToPoint(a)[t] - this.dataToPoint(o)[t]); }, this); } function T6e(r) { var e = r.getBoundingRect(); return { coordSys: { type: "geo", x: e.x, y: e.y, width: e.width, height: e.height, zoom: r.getZoom() }, api: { coord: function(t) { return r.dataToPoint(t); }, size: Ae(b6e, r) } }; } function P6e(r, e) { var t = this.getAxis(), n = e instanceof Array ? e[0] : e, i = (r instanceof Array ? r[0] : r) / 2; return t.type === "category" ? t.getBandWidth() : Math.abs(t.dataToCoord(n - i) - t.dataToCoord(n + i)); } function I6e(r) { var e = r.getRect(); return { coordSys: { type: "singleAxis", x: e.x, y: e.y, width: e.width, height: e.height }, api: { coord: function(t) { return r.dataToPoint(t); }, size: Ae(P6e, r) } }; } function A6e(r, e) { return e = e || [0, 0], ce(["Radius", "Angle"], function(t, n) { var i = "get" + t + "Axis", a = this[i](), o = e[n], s = r[n] / 2, u = a.type === "category" ? a.getBandWidth() : Math.abs(a.dataToCoord(o - s) - a.dataToCoord(o + s)); return t === "Angle" && (u = u * Math.PI / 180), u; }, this); } function L6e(r) { var e = r.getRadiusAxis(), t = r.getAngleAxis(), n = e.getExtent(); return n[0] > n[1] && n.reverse(), { coordSys: { type: "polar", cx: r.cx, cy: r.cy, r: n[1], r0: n[0] }, api: { coord: function(i) { var a = e.dataToRadius(i[0]), o = t.dataToAngle(i[1]), s = r.coordToPoint([a, o]); return s.push(a, o * Math.PI / 180), s; }, size: Ae(A6e, r) } }; } function D6e(r) { var e = r.getRect(), t = r.getRangeInfo(); return { coordSys: { type: "calendar", x: e.x, y: e.y, width: e.width, height: e.height, cellWidth: r.getCellWidth(), cellHeight: r.getCellHeight(), rangeInfo: { start: t.start, end: t.end, weeks: t.weeks, dayCount: t.allDay } }, api: { coord: function(n, i) { return r.dataToPoint(n, i); } } }; } var K8 = {}; function Ree(r, e, t, n) { return r && (r.legacy || r.legacy !== !1 && !t && !n && e !== "tspan" && (e === "text" || Te(r, "text"))); } function Nee(r, e, t) { var n = r, i, a, o; if (e === "text") o = n; else { o = {}, Te(n, "text") && (o.text = n.text), Te(n, "rich") && (o.rich = n.rich), Te(n, "textFill") && (o.fill = n.textFill), Te(n, "textStroke") && (o.stroke = n.textStroke), Te(n, "fontFamily") && (o.fontFamily = n.fontFamily), Te(n, "fontSize") && (o.fontSize = n.fontSize), Te(n, "fontStyle") && (o.fontStyle = n.fontStyle), Te(n, "fontWeight") && (o.fontWeight = n.fontWeight), a = { type: "text", style: o, silent: !0 }, i = {}; var s = Te(n, "textPosition"); t ? i.position = s ? n.textPosition : "inside" : s && (i.position = n.textPosition), Te(n, "textPosition") && (i.position = n.textPosition), Te(n, "textOffset") && (i.offset = n.textOffset), Te(n, "textRotation") && (i.rotation = n.textRotation), Te(n, "textDistance") && (i.distance = n.textDistance); } return J8(o, r), M(o.rich, function(u) { J8(u, u); }), { textConfig: i, textContent: a }; } function J8(r, e) { !e || (e.font = e.textFont || e.font, Te(e, "textStrokeWidth") && (r.lineWidth = e.textStrokeWidth), Te(e, "textAlign") && (r.align = e.textAlign), Te(e, "textVerticalAlign") && (r.verticalAlign = e.textVerticalAlign), Te(e, "textLineHeight") && (r.lineHeight = e.textLineHeight), Te(e, "textWidth") && (r.width = e.textWidth), Te(e, "textHeight") && (r.height = e.textHeight), Te(e, "textBackgroundColor") && (r.backgroundColor = e.textBackgroundColor), Te(e, "textPadding") && (r.padding = e.textPadding), Te(e, "textBorderColor") && (r.borderColor = e.textBorderColor), Te(e, "textBorderWidth") && (r.borderWidth = e.textBorderWidth), Te(e, "textBorderRadius") && (r.borderRadius = e.textBorderRadius), Te(e, "textBoxShadowColor") && (r.shadowColor = e.textBoxShadowColor), Te(e, "textBoxShadowBlur") && (r.shadowBlur = e.textBoxShadowBlur), Te(e, "textBoxShadowOffsetX") && (r.shadowOffsetX = e.textBoxShadowOffsetX), Te(e, "textBoxShadowOffsetY") && (r.shadowOffsetY = e.textBoxShadowOffsetY)); } function Q8(r, e, t) { var n = r; n.textPosition = n.textPosition || t.position || "inside", t.offset != null && (n.textOffset = t.offset), t.rotation != null && (n.textRotation = t.rotation), t.distance != null && (n.textDistance = t.distance); var i = n.textPosition.indexOf("inside") >= 0, a = r.fill || "#000"; e9(n, e); var o = n.textFill == null; return i ? o && (n.textFill = t.insideFill || "#fff", !n.textStroke && t.insideStroke && (n.textStroke = t.insideStroke), !n.textStroke && (n.textStroke = a), n.textStrokeWidth == null && (n.textStrokeWidth = 2)) : (o && (n.textFill = r.fill || t.outsideFill || "#000"), !n.textStroke && t.outsideStroke && (n.textStroke = t.outsideStroke)), n.text = e.text, n.rich = e.rich, M(e.rich, function(s) { e9(s, s); }), n; } function e9(r, e) { !e || (Te(e, "fill") && (r.textFill = e.fill), Te(e, "stroke") && (r.textStroke = e.fill), Te(e, "lineWidth") && (r.textStrokeWidth = e.lineWidth), Te(e, "font") && (r.font = e.font), Te(e, "fontStyle") && (r.fontStyle = e.fontStyle), Te(e, "fontWeight") && (r.fontWeight = e.fontWeight), Te(e, "fontSize") && (r.fontSize = e.fontSize), Te(e, "fontFamily") && (r.fontFamily = e.fontFamily), Te(e, "align") && (r.textAlign = e.align), Te(e, "verticalAlign") && (r.textVerticalAlign = e.verticalAlign), Te(e, "lineHeight") && (r.textLineHeight = e.lineHeight), Te(e, "width") && (r.textWidth = e.width), Te(e, "height") && (r.textHeight = e.height), Te(e, "backgroundColor") && (r.textBackgroundColor = e.backgroundColor), Te(e, "padding") && (r.textPadding = e.padding), Te(e, "borderColor") && (r.textBorderColor = e.borderColor), Te(e, "borderWidth") && (r.textBorderWidth = e.borderWidth), Te(e, "borderRadius") && (r.textBorderRadius = e.borderRadius), Te(e, "shadowColor") && (r.textBoxShadowColor = e.shadowColor), Te(e, "shadowBlur") && (r.textBoxShadowBlur = e.shadowBlur), Te(e, "shadowOffsetX") && (r.textBoxShadowOffsetX = e.shadowOffsetX), Te(e, "shadowOffsetY") && (r.textBoxShadowOffsetY = e.shadowOffsetY), Te(e, "textShadowColor") && (r.textShadowColor = e.textShadowColor), Te(e, "textShadowBlur") && (r.textShadowBlur = e.textShadowBlur), Te(e, "textShadowOffsetX") && (r.textShadowOffsetX = e.textShadowOffsetX), Te(e, "textShadowOffsetY") && (r.textShadowOffsetY = e.textShadowOffsetY)); } function t9(r, e) { if (process.env.NODE_ENV !== "production") { var t = r + "^_^" + e; K8[t] || (console.warn('[ECharts] DEPRECATED: "' + r + '" has been deprecated. ' + e), K8[t] = !0); } } var Fee = { position: ["x", "y"], scale: ["scaleX", "scaleY"], origin: ["originX", "originY"] }, r9 = At(Fee), HE = Kl(Ql, function(r, e) { return r[e] = 1, r; }, {}), n9 = Ql.join(", "), UE = ["", "style", "shape", "extra"], Gm = Ut(); function l5(r, e, t, n, i) { var a = r + "Animation", o = Cy(r, n, i) || {}, s = Gm(e).userDuring; return o.duration > 0 && (o.during = s ? Ae(F6e, { el: e, userDuring: s }) : null, o.setToFinal = !0, o.scope = r), oe(o, t[a]), o; } function mS(r, e, t, n) { n = n || {}; var i = n.dataIndex, a = n.isInit, o = n.clearStyle, s = t.isAnimationEnabled(), u = Gm(r), l = e.style; u.userDuring = e.during; var c = {}, f = {}; if (k6e(r, e, f), a9("shape", e, f), a9("extra", e, f), !a && s && (B6e(r, e, c), i9("shape", r, e, c), i9("extra", r, e, c), V6e(r, e, l, c)), f.style = l, M6e(r, f, o), R6e(r, e), s) if (a) { var h = {}; M(UE, function(d) { var v = d ? e[d] : e; v && v.enterFrom && (d && (h[d] = h[d] || {}), oe(d ? h[d] : h, v.enterFrom)); }); var p = l5("enter", r, e, t, i); p.duration > 0 && r.animateFrom(h, p); } else O6e(r, e, i || 0, t, c); Bee(r, e), l ? r.dirty() : r.markRedraw(); } function Bee(r, e) { for (var t = Gm(r).leaveToProps, n = 0; n < UE.length; n++) { var i = UE[n], a = i ? e[i] : e; a && a.leaveTo && (t || (t = Gm(r).leaveToProps = {}), i && (t[i] = t[i] || {}), oe(i ? t[i] : t, a.leaveTo)); } } function vP(r, e, t, n) { if (r) { var i = r.parent, a = Gm(r).leaveToProps; if (a) { var o = l5("update", r, e, t, 0); o.done = function() { i.remove(r), n && n(); }, r.animateTo(a, o); } else i.remove(r), n && n(); } } function sd(r) { return r === "all"; } function M6e(r, e, t) { var n = e.style; if (!r.isGroup && n) { if (t) { r.useStyle({}); for (var i = r.animators, a = 0; a < i.length; a++) { var o = i[a]; o.targetName === "style" && o.changeTarget(r.style); } } r.setStyle(n); } e && (e.style = null, e && r.attr(e), e.style = n); } function O6e(r, e, t, n, i) { if (i) { var a = l5("update", r, e, n, t); a.duration > 0 && r.animateFrom(i, a); } } function R6e(r, e) { Te(e, "silent") && (r.silent = e.silent), Te(e, "ignore") && (r.ignore = e.ignore), r instanceof vu && Te(e, "invisible") && (r.invisible = e.invisible), r instanceof Tt && Te(e, "autoBatch") && (r.autoBatch = e.autoBatch); } var El = {}, N6e = { setTransform: function(r, e) { return process.env.NODE_ENV !== "production" && Ze(Te(HE, r), "Only " + n9 + " available in `setTransform`."), El.el[r] = e, this; }, getTransform: function(r) { return process.env.NODE_ENV !== "production" && Ze(Te(HE, r), "Only " + n9 + " available in `getTransform`."), El.el[r]; }, setShape: function(r, e) { process.env.NODE_ENV !== "production" && Qv(r); var t = El.el, n = t.shape || (t.shape = {}); return n[r] = e, t.dirtyShape && t.dirtyShape(), this; }, getShape: function(r) { process.env.NODE_ENV !== "production" && Qv(r); var e = El.el.shape; if (e) return e[r]; }, setStyle: function(r, e) { process.env.NODE_ENV !== "production" && Qv(r); var t = El.el, n = t.style; return n && (process.env.NODE_ENV !== "production" && kd(e) && to("style." + r + " must not be assigned with NaN."), n[r] = e, t.dirtyStyle && t.dirtyStyle()), this; }, getStyle: function(r) { process.env.NODE_ENV !== "production" && Qv(r); var e = El.el.style; if (e) return e[r]; }, setExtra: function(r, e) { process.env.NODE_ENV !== "production" && Qv(r); var t = El.el.extra || (El.el.extra = {}); return t[r] = e, this; }, getExtra: function(r) { process.env.NODE_ENV !== "production" && Qv(r); var e = El.el.extra; if (e) return e[r]; } }; function Qv(r) { if (process.env.NODE_ENV !== "production" && (r === "transition" || r === "enterFrom" || r === "leaveTo")) throw new Error('key must not be "' + r + '"'); } function F6e() { var r = this, e = r.el; if (!!e) { var t = Gm(e).userDuring, n = r.userDuring; if (t !== n) { r.el = r.userDuring = null; return; } El.el = e, n(N6e); } } function i9(r, e, t, n) { var i = t[r]; if (!!i) { var a = e[r], o; if (a) { var s = t.transition, u = i.transition; if (u) if (!o && (o = n[r] = {}), sd(u)) oe(o, a); else for (var l = jr(u), c = 0; c < l.length; c++) { var f = l[c], h = a[f]; o[f] = h; } else if (sd(s) || _t(s, r) >= 0) { !o && (o = n[r] = {}); for (var p = At(a), c = 0; c < p.length; c++) { var f = p[c], h = a[f]; G6e(i[f], h) && (o[f] = h); } } } } } function a9(r, e, t) { var n = e[r]; if (!!n) for (var i = t[r] = {}, a = At(n), o = 0; o < a.length; o++) { var s = a[o]; i[s] = v_(n[s]); } } function B6e(r, e, t) { for (var n = e.transition, i = sd(n) ? Ql : jr(n || []), a = 0; a < i.length; a++) { var o = i[a]; if (!(o === "style" || o === "shape" || o === "extra")) { var s = r[o]; process.env.NODE_ENV !== "production" && kee(o, "el.transition"), t[o] = s; } } } function k6e(r, e, t) { for (var n = 0; n < r9.length; n++) { var i = r9[n], a = Fee[i], o = e[i]; o && (t[a[0]] = o[0], t[a[1]] = o[1]); } for (var n = 0; n < Ql.length; n++) { var s = Ql[n]; e[s] != null && (t[s] = e[s]); } } function V6e(r, e, t, n) { if (!!t) { var i = r.style, a; if (i) { var o = t.transition, s = e.transition; if (o && !sd(o)) { var u = jr(o); !a && (a = n.style = {}); for (var l = 0; l < u.length; l++) { var c = u[l], f = i[c]; a[c] = f; } } else if (r.getAnimationStyleProps && (sd(s) || sd(o) || _t(s, "style") >= 0)) { var h = r.getAnimationStyleProps(), p = h ? h.style : null; if (p) { !a && (a = n.style = {}); for (var d = At(t), l = 0; l < d.length; l++) { var c = d[l]; if (p[c]) { var f = i[c]; a[c] = f; } } } } } } } function G6e(r, e) { return eo(r) ? r !== e : r != null && isFinite(r); } var kee; process.env.NODE_ENV !== "production" && (kee = function(r, e) { Te(HE, r) || to("Prop `" + r + "` is not a permitted in `" + e + "`. Only `" + At(HE).join("`, `") + "` are permitted."); }); var Vee = Ut(), z6e = ["percent", "easing", "shape", "style", "extra"]; function Gee(r) { r.stopAnimation("keyframe"), r.attr(Vee(r)); } function WE(r, e, t) { if (!(!t.isAnimationEnabled() || !e)) { if (le(e)) { M(e, function(s) { WE(r, s, t); }); return; } var n = e.keyframes, i = e.duration; if (t && i == null) { var a = Cy("enter", t, 0); i = a && a.duration; } if (!(!n || !i)) { var o = Vee(r); M(UE, function(s) { if (!(s && !r[s])) { var u, l = !1; n.sort(function(c, f) { return c.percent - f.percent; }), M(n, function(c) { var f = r.animators, h = s ? c[s] : c; if (process.env.NODE_ENV !== "production" && c.percent >= 1 && (l = !0), !!h) { var p = At(h); if (s || (p = Wr(p, function(g) { return _t(z6e, g) < 0; })), !!p.length) { u || (u = r.animate(s, e.loop, !0), u.scope = "keyframe"); for (var d = 0; d < f.length; d++) f[d] !== u && f[d].targetName === u.targetName && f[d].stopTracks(p); s && (o[s] = o[s] || {}); var v = s ? o[s] : o; M(p, function(g) { v[g] = ((s ? r[s] : r) || {})[g]; }), u.whenWithKeys(i * c.percent, h, p, c.easing); } } }), u && (process.env.NODE_ENV !== "production" && (l || to("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), u.delay(e.delay || 0).duration(i).start(e.easing)); } }); } } } var Gc = "emphasis", nh = "normal", c5 = "blur", f5 = "select", Vh = [nh, Gc, c5, f5], gL = { normal: ["itemStyle"], emphasis: [Gc, "itemStyle"], blur: [c5, "itemStyle"], select: [f5, "itemStyle"] }, mL = { normal: ["label"], emphasis: [Gc, "label"], blur: [c5, "label"], select: [f5, "label"] }, $6e = ["x", "y"], H6e = "e\0\0", Ns = { normal: {}, emphasis: {}, blur: {}, select: {} }, o9 = { cartesian2d: E6e, geo: T6e, single: I6e, polar: L6e, calendar: D6e }; function jE(r) { return r instanceof Tt; } function R2(r) { return r instanceof vu; } function U6e(r, e) { e.copyTransform(r), R2(e) && R2(r) && (e.setStyle(r.style), e.z = r.z, e.z2 = r.z2, e.zlevel = r.zlevel, e.invisible = r.invisible, e.ignore = r.ignore, jE(e) && jE(r) && e.setShape(r.shape)); } var W6e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i, a) { this._progressiveEls = null; var o = this._data, s = t.getData(), u = this.group, l = s9(t, s, n, i); o || u.removeAll(), s.diff(o).add(function(f) { yL(i, null, f, l(f, a), t, u, s); }).remove(function(f) { var h = o.getItemGraphicEl(f); vP(h, Vc(h).option, t); }).update(function(f, h) { var p = o.getItemGraphicEl(h); yL(i, p, f, l(f, a), t, u, s); }).execute(); var c = t.get("clip", !0) ? lP(t.coordinateSystem, !1, t) : null; c ? u.setClipPath(c) : u.removeClipPath(), this._data = s; }, e.prototype.incrementalPrepareRender = function(t, n, i) { this.group.removeAll(), this._data = null; }, e.prototype.incrementalRender = function(t, n, i, a, o) { var s = n.getData(), u = s9(n, s, i, a), l = this._progressiveEls = []; function c(p) { p.isGroup || (p.incremental = !0, p.ensureState("emphasis").hoverLayer = !0); } for (var f = t.start; f < t.end; f++) { var h = yL(null, null, f, u(f, o), n, this.group, s); h && (h.traverse(c), l.push(h)); } }, e.prototype.eachRendered = function(t) { Xh(this._progressiveEls || this.group, t); }, e.prototype.filterForExposedEvent = function(t, n, i, a) { var o = n.element; if (o == null || i.name === o) return !0; for (; (i = i.__hostTarget || i.parent) && i !== this.group; ) if (i.name === o) return !0; return !1; }, e.type = "custom", e; }(an); const j6e = W6e; function h5(r) { var e = r.type, t; if (e === "path") { var n = r.shape, i = n.width != null && n.height != null ? { x: n.x || 0, y: n.y || 0, width: n.width, height: n.height } : null, a = Hee(n); t = WT(a, null, i, n.layout || "center"), Vc(t).customPathData = a; } else if (e === "image") t = new Ba({}), Vc(t).customImagePath = r.style.image; else if (e === "text") t = new Yt({}); else if (e === "group") t = new rt(); else { if (e === "compoundPath") throw new Error('"compoundPath" is not supported yet.'); var o = nF(e); if (!o) { var s = ""; process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), Ar(s); } t = new o(); } return Vc(t).customGraphicType = e, t.name = r.name, t.z2EmphasisLift = 1, t.z2SelectLift = 1, t; } function p5(r, e, t, n, i, a, o) { Gee(e); var s = i && i.normal.cfg; s && e.setTextConfig(s), n && n.transition == null && (n.transition = $6e); var u = n && n.style; if (u) { if (e.type === "text") { var l = u; Te(l, "textFill") && (l.fill = l.textFill), Te(l, "textStroke") && (l.stroke = l.textStroke); } var c = void 0, f = jE(e) ? u.decal : null; r && f && (f.dirty = !0, c = Nm(f, r)), u.__decalPattern = c; } if (R2(e) && u) { var c = u.__decalPattern; c && (u.decal = c); } mS(e, n, a, { dataIndex: t, isInit: o, clearStyle: !0 }), WE(e, n.keyframeAnimation, a); } function zee(r, e, t, n, i) { var a = e.isGroup ? null : e, o = i && i[r].cfg; if (a) { var s = a.ensureState(r); if (n === !1) { var u = a.getState(r); u && (u.style = null); } else s.style = n || null; o && (s.textConfig = o), $d(a); } } function Y6e(r, e, t) { if (!r.isGroup) { var n = r, i = t.currentZ, a = t.currentZLevel; n.z = i, n.zlevel = a; var o = e.z2; o != null && (n.z2 = o || 0); for (var s = 0; s < Vh.length; s++) X6e(n, e, Vh[s]); } } function X6e(r, e, t) { var n = t === nh, i = n ? e : YE(e, t), a = i ? i.z2 : null, o; a != null && (o = n ? r : r.ensureState(t), o.z2 = a || 0); } function s9(r, e, t, n) { var i = r.get("renderItem"), a = r.coordinateSystem, o = {}; a && (process.env.NODE_ENV !== "production" && (Ze(i, "series.render is required."), Ze(a.prepareCustoms || o9[a.type], "This coordSys does not support custom series.")), o = a.prepareCustoms ? a.prepareCustoms(a) : o9[a.type](a)); for (var s = qe({ getWidth: n.getWidth, getHeight: n.getHeight, getZr: n.getZr, getDevicePixelRatio: n.getDevicePixelRatio, value: w, style: C, ordinalRawValue: x, styleEmphasis: S, visual: T, barLayout: P, currentSeriesIndices: I, font: A }, o.api || {}), u = { context: {}, seriesId: r.id, seriesName: r.name, seriesIndex: r.seriesIndex, coordSys: o.coordSys, dataInsideLength: e.count(), encode: q6e(r.getData()) }, l, c, f = {}, h = {}, p = {}, d = {}, v = 0; v < Vh.length; v++) { var g = Vh[v]; p[g] = r.getModel(gL[g]), d[g] = r.getModel(mL[g]); } function m(L) { return L === l ? c || (c = e.getItemModel(L)) : e.getItemModel(L); } function y(L, D) { return e.hasItemOption ? L === l ? f[D] || (f[D] = m(L).getModel(gL[D])) : m(L).getModel(gL[D]) : p[D]; } function _(L, D) { return e.hasItemOption ? L === l ? h[D] || (h[D] = m(L).getModel(mL[D])) : m(L).getModel(mL[D]) : d[D]; } return function(L, D) { return l = L, c = null, f = {}, h = {}, i && i(qe({ dataIndexInside: L, dataIndex: e.getRawIndex(L), actionType: D ? D.type : null }, u), s); }; function w(L, D) { return D == null && (D = l), e.getStore().get(e.getDimensionIndex(L || 0), D); } function x(L, D) { D == null && (D = l), L = L || 0; var O = e.getDimensionInfo(L); if (!O) { var N = e.getDimensionIndex(L); return N >= 0 ? e.getStore().get(N, D) : void 0; } var F = e.get(O.name, D), k = O && O.ordinalMeta; return k ? k.categories[F] : F; } function C(L, D) { process.env.NODE_ENV !== "production" && t9("api.style", "Please write literal style directly instead."), D == null && (D = l); var O = e.getItemVisual(D, "style"), N = O && O.fill, F = O && O.opacity, k = y(D, nh).getItemStyle(); N != null && (k.fill = N), F != null && (k.opacity = F); var G = { inheritColor: Se(N) ? N : "#000" }, U = _(D, nh), B = Sn(U, null, G, !1, !0); B.text = U.getShallow("show") ? wt(r.getFormattedLabel(D, nh), Bm(e, D)) : null; var X = yE(U, G, !1); return E(L, k), k = Q8(k, B, X), L && b(k, L), k.legacy = !0, k; } function S(L, D) { process.env.NODE_ENV !== "production" && t9("api.styleEmphasis", "Please write literal style directly instead."), D == null && (D = l); var O = y(D, Gc).getItemStyle(), N = _(D, Gc), F = Sn(N, null, null, !0, !0); F.text = N.getShallow("show") ? $u(r.getFormattedLabel(D, Gc), r.getFormattedLabel(D, nh), Bm(e, D)) : null; var k = yE(N, null, !0); return E(L, O), O = Q8(O, F, k), L && b(O, L), O.legacy = !0, O; } function b(L, D) { for (var O in D) Te(D, O) && (L[O] = D[O]); } function E(L, D) { L && (L.textFill && (D.textFill = L.textFill), L.textPosition && (D.textPosition = L.textPosition)); } function T(L, D) { if (D == null && (D = l), Te(Z8, L)) { var O = e.getItemVisual(D, "style"); return O ? O[Z8[L]] : null; } if (Te(w6e, L)) return e.getItemVisual(D, L); } function P(L) { if (a.type === "cartesian2d") { var D = a.getBaseAxis(); return JMe(qe({ axis: D }, L)); } } function I() { return t.getCurrentSeriesIndices(); } function A(L) { return xZ(L, t); } } function q6e(r) { var e = {}; return M(r.dimensions, function(t) { var n = r.getDimensionInfo(t); if (!n.isExtraCoord) { var i = n.coordDim, a = e[i] = e[i] || []; a[n.coordDimIndex] = r.getDimensionIndex(t); } }), e; } function yL(r, e, t, n, i, a, o) { if (!n) { a.remove(e); return; } var s = d5(r, e, t, n, i, a); return s && o.setItemGraphicEl(t, s), s && Zn(s, n.focus, n.blurScope, n.emphasisDisabled), s; } function d5(r, e, t, n, i, a) { process.env.NODE_ENV !== "production" && Ze(n, "should not have an null/undefined element setting"); var o = -1, s = e; e && $ee(e, n, i) && (o = _t(a.childrenRef(), e), e = null); var u = !e, l = e; l ? l.clearStates() : (l = h5(n), s && U6e(s, l)), n.morph === !1 ? l.disableMorphing = !0 : l.disableMorphing && (l.disableMorphing = !1), Ns.normal.cfg = Ns.normal.conOpt = Ns.emphasis.cfg = Ns.emphasis.conOpt = Ns.blur.cfg = Ns.blur.conOpt = Ns.select.cfg = Ns.select.conOpt = null, Ns.isLegacy = !1, K6e(l, t, n, i, u, Ns), Z6e(l, t, n, i, u), p5(r, l, t, n, Ns, i, u), Te(n, "info") && (Vc(l).info = n.info); for (var c = 0; c < Vh.length; c++) { var f = Vh[c]; if (f !== nh) { var h = YE(n, f), p = v5(n, h, f); zee(f, l, h, p, Ns); } } return Y6e(l, n, i), n.type === "group" && J6e(r, l, t, n, i), o >= 0 ? a.replaceAt(l, o) : a.add(l), l; } function $ee(r, e, t) { var n = Vc(r), i = e.type, a = e.shape, o = e.style; return t.isUniversalTransitionEnabled() || i != null && i !== n.customGraphicType || i === "path" && tGe(a) && Hee(a) !== n.customPathData || i === "image" && Te(o, "image") && o.image !== n.customImagePath; } function Z6e(r, e, t, n, i) { var a = t.clipPath; if (a === !1) r && r.getClipPath() && r.removeClipPath(); else if (a) { var o = r.getClipPath(); o && $ee(o, a, n) && (o = null), o || (o = h5(a), process.env.NODE_ENV !== "production" && Ze(jE(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), r.setClipPath(o)), p5(null, o, e, a, null, n, i); } } function K6e(r, e, t, n, i, a) { if (!r.isGroup) { u9(t, null, a), u9(t, Gc, a); var o = a.normal.conOpt, s = a.emphasis.conOpt, u = a.blur.conOpt, l = a.select.conOpt; if (o != null || s != null || l != null || u != null) { var c = r.getTextContent(); if (o === !1) c && r.removeTextContent(); else { o = a.normal.conOpt = o || { type: "text" }, c ? c.clearStates() : (c = h5(o), r.setTextContent(c)), p5(null, c, e, o, null, n, i); for (var f = o && o.style, h = 0; h < Vh.length; h++) { var p = Vh[h]; if (p !== nh) { var d = a[p].conOpt; zee(p, c, d, v5(o, d, p), null); } } f ? c.dirty() : c.markRedraw(); } } } } function u9(r, e, t) { var n = e ? YE(r, e) : r, i = e ? v5(r, n, Gc) : r.style, a = r.type, o = n ? n.textConfig : null, s = r.textContent, u = s ? e ? YE(s, e) : s : null; if (i && (t.isLegacy || Ree(i, a, !!o, !!u))) { t.isLegacy = !0; var l = Nee(i, a, !e); !o && l.textConfig && (o = l.textConfig), !u && l.textContent && (u = l.textContent); } if (!e && u) { var c = u; !c.type && (c.type = "text"), process.env.NODE_ENV !== "production" && Ze(c.type === "text", 'textContent.type must be "text"'); } var f = e ? t[e] : t.normal; f.cfg = o, f.conOpt = u; } function YE(r, e) { return e ? r ? r[e] : null : r; } function v5(r, e, t) { var n = e && e.style; return n == null && t === Gc && r && (n = r.styleEmphasis), n; } function J6e(r, e, t, n, i) { var a = n.children, o = a ? a.length : 0, s = n.$mergeChildren, u = s === "byName" || n.diffChildrenByName, l = s === !1; if (!(!o && !u && !l)) { if (u) { Q6e({ api: r, oldChildren: e.children() || [], newChildren: a || [], dataIndex: t, seriesModel: i, group: e }); return; } l && e.removeAll(); for (var c = 0; c < o; c++) a[c] && d5(r, e.childAt(c), t, a[c], i, e); for (var f = e.childCount() - 1; f >= c; f--) { var h = e.childAt(f); vP(h, Vc(e).option, i); } } } function Q6e(r) { new sf(r.oldChildren, r.newChildren, l9, l9, r).add(c9).update(c9).remove(eGe).execute(); } function l9(r, e) { var t = r && r.name; return t != null ? t : H6e + e; } function c9(r, e) { var t = this.context, n = r != null ? t.newChildren[r] : null, i = e != null ? t.oldChildren[e] : null; d5(t.api, i, t.dataIndex, n, t.seriesModel, t.group); } function eGe(r) { var e = this.context, t = e.oldChildren[r]; vP(t, Vc(t).option, e.seriesModel); } function Hee(r) { return r && (r.pathData || r.d); } function tGe(r) { return r && (Te(r, "pathData") || Te(r, "d")); } function rGe(r) { r.registerChartView(j6e), r.registerSeriesModel(C6e); } var Vp = Ut(), f9 = Qe, _L = Ae, nGe = function() { function r() { this._dragging = !1, this.animationThreshold = 15; } return r.prototype.render = function(e, t, n, i) { var a = t.get("value"), o = t.get("status"); if (this._axisModel = e, this._axisPointerModel = t, this._api = n, !(!i && this._lastValue === a && this._lastStatus === o)) { this._lastValue = a, this._lastStatus = o; var s = this._group, u = this._handle; if (!o || o === "hide") { s && s.hide(), u && u.hide(); return; } s && s.show(), u && u.show(); var l = {}; this.makeElOption(l, a, e, t, n); var c = l.graphicKey; c !== this._lastGraphicKey && this.clear(n), this._lastGraphicKey = c; var f = this._moveAnimation = this.determineAnimation(e, t); if (!s) s = this._group = new rt(), this.createPointerEl(s, l, e, t), this.createLabelEl(s, l, e, t), n.getZr().add(s); else { var h = ut(h9, t, f); this.updatePointerEl(s, l, h), this.updateLabelEl(s, l, h, t); } d9(s, t, !0), this._renderHandle(a); } }, r.prototype.remove = function(e) { this.clear(e); }, r.prototype.dispose = function(e) { this.clear(e); }, r.prototype.determineAnimation = function(e, t) { var n = t.get("animation"), i = e.axis, a = i.type === "category", o = t.get("snap"); if (!o && !a) return !1; if (n === "auto" || n == null) { var s = this.animationThreshold; if (a && i.getBandWidth() > s) return !0; if (o) { var u = zF(e).seriesDataCount, l = i.getExtent(); return Math.abs(l[0] - l[1]) / u > s; } return !1; } return n === !0; }, r.prototype.makeElOption = function(e, t, n, i, a) { }, r.prototype.createPointerEl = function(e, t, n, i) { var a = t.pointer; if (a) { var o = Vp(e).pointerEl = new Bw[a.type](f9(t.pointer)); e.add(o); } }, r.prototype.createLabelEl = function(e, t, n, i) { if (t.label) { var a = Vp(e).labelEl = new Yt(f9(t.label)); e.add(a), p9(a, i); } }, r.prototype.updatePointerEl = function(e, t, n) { var i = Vp(e).pointerEl; i && t.pointer && (i.setStyle(t.pointer.style), n(i, { shape: t.pointer.shape })); }, r.prototype.updateLabelEl = function(e, t, n, i) { var a = Vp(e).labelEl; a && (a.setStyle(t.label.style), n(a, { x: t.label.x, y: t.label.y }), p9(a, i)); }, r.prototype._renderHandle = function(e) { if (!(this._dragging || !this.updateHandleTransform)) { var t = this._axisPointerModel, n = this._api.getZr(), i = this._handle, a = t.getModel("handle"), o = t.get("status"); if (!a.get("show") || !o || o === "hide") { i && n.remove(i), this._handle = null; return; } var s; this._handle || (s = !0, i = this._handle = Fw(a.get("icon"), { cursor: "move", draggable: !0, onmousemove: function(l) { rf(l.event); }, onmousedown: _L(this._onHandleDragMove, this, 0, 0), drift: _L(this._onHandleDragMove, this), ondragend: _L(this._onHandleDragEnd, this) }), n.add(i)), d9(i, t, !1), i.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"])); var u = a.get("size"); le(u) || (u = [u, u]), i.scaleX = u[0] / 2, i.scaleY = u[1] / 2, My(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s); } }, r.prototype._moveHandleToValue = function(e, t) { h9(this._axisPointerModel, !t && this._moveAnimation, this._handle, wL(this.getHandleTransform(e, this._axisModel, this._axisPointerModel))); }, r.prototype._onHandleDragMove = function(e, t) { var n = this._handle; if (!!n) { this._dragging = !0; var i = this.updateHandleTransform(wL(n), [e, t], this._axisModel, this._axisPointerModel); this._payloadInfo = i, n.stopAnimation(), n.attr(wL(i)), Vp(n).lastProp = null, this._doDispatchAxisPointer(); } }, r.prototype._doDispatchAxisPointer = function() { var e = this._handle; if (!!e) { var t = this._payloadInfo, n = this._axisModel; this._api.dispatchAction({ type: "updateAxisPointer", x: t.cursorPoint[0], y: t.cursorPoint[1], tooltipOption: t.tooltipOption, axesInfo: [{ axisDim: n.axis.dim, axisIndex: n.componentIndex }] }); } }, r.prototype._onHandleDragEnd = function() { this._dragging = !1; var e = this._handle; if (!!e) { var t = this._axisPointerModel.get("value"); this._moveHandleToValue(t), this._api.dispatchAction({ type: "hideTip" }); } }, r.prototype.clear = function(e) { this._lastValue = null, this._lastStatus = null; var t = e.getZr(), n = this._group, i = this._handle; t && n && (this._lastGraphicKey = null, n && t.remove(n), i && t.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), x1(this, "_doDispatchAxisPointer"); }, r.prototype.doClear = function() { }, r.prototype.buildLabel = function(e, t, n) { return n = n || 0, { x: e[n], y: e[1 - n], width: t[n], height: t[1 - n] }; }, r; }(); function h9(r, e, t, n) { Uee(Vp(t).lastProp, n) || (Vp(t).lastProp = n, e ? Ht(t, n, r) : (t.stopAnimation(), t.attr(n))); } function Uee(r, e) { if (Xe(r) && Xe(e)) { var t = !0; return M(e, function(n, i) { t = t && Uee(r[i], n); }), !!t; } else return r === e; } function p9(r, e) { r[e.get(["label", "show"]) ? "show" : "hide"](); } function wL(r) { return { x: r.x || 0, y: r.y || 0, rotation: r.rotation || 0 }; } function d9(r, e, t) { var n = e.get("z"), i = e.get("zlevel"); r && r.traverse(function(a) { a.type !== "group" && (n != null && (a.z = n), i != null && (a.zlevel = i), a.silent = t); }); } const g5 = nGe; function m5(r) { var e = r.get("type"), t = r.getModel(e + "Style"), n; return e === "line" ? (n = t.getLineStyle(), n.fill = null) : e === "shadow" && (n = t.getAreaStyle(), n.stroke = null), n; } function Wee(r, e, t, n, i) { var a = t.get("value"), o = jee(a, e.axis, e.ecModel, t.get("seriesDataIndices"), { precision: t.get(["label", "precision"]), formatter: t.get(["label", "formatter"]) }), s = t.getModel("label"), u = Ty(s.get("padding") || 0), l = s.getFont(), c = Mw(o, l), f = i.position, h = c.width + u[1] + u[3], p = c.height + u[0] + u[2], d = i.align; d === "right" && (f[0] -= h), d === "center" && (f[0] -= h / 2); var v = i.verticalAlign; v === "bottom" && (f[1] -= p), v === "middle" && (f[1] -= p / 2), iGe(f, h, p, n); var g = s.get("backgroundColor"); (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), r.label = { x: f[0], y: f[1], style: Sn(s, { text: o, font: l, fill: s.getTextColor(), padding: u, backgroundColor: g }), z2: 10 }; } function iGe(r, e, t, n) { var i = n.getWidth(), a = n.getHeight(); r[0] = Math.min(r[0] + e, i) - e, r[1] = Math.min(r[1] + t, a) - t, r[0] = Math.max(r[0], 0), r[1] = Math.max(r[1], 0); } function jee(r, e, t, n, i) { r = e.scale.parse(r); var a = e.scale.getLabel({ value: r }, { precision: i.precision }), o = i.formatter; if (o) { var s = { value: MF(e, { value: r }), axisDimension: e.dim, axisIndex: e.index, seriesData: [] }; M(n, function(u) { var l = t.getSeriesByIndex(u.seriesIndex), c = u.dataIndexInside, f = l && l.getDataParams(c); f && s.seriesData.push(f); }), Se(o) ? a = o.replace("{value}", a) : ze(o) && (a = o(s)); } return a; } function y5(r, e, t) { var n = xs(); return dv(n, n, t.rotation), Jl(n, n, t.position), Uu([r.dataToCoord(e), (t.labelOffset || 0) + (t.labelDirection || 1) * (t.labelMargin || 0)], n); } function Yee(r, e, t, n, i, a) { var o = uf.innerTextLayout(t.rotation, 0, t.labelDirection); t.labelMargin = i.get(["label", "margin"]), Wee(e, n, i, a, { position: y5(n.axis, r, t), align: o.textAlign, verticalAlign: o.textVerticalAlign }); } function _5(r, e, t) { return t = t || 0, { x1: r[t], y1: r[1 - t], x2: e[t], y2: e[1 - t] }; } function Xee(r, e, t) { return t = t || 0, { x: r[t], y: r[1 - t], width: e[t], height: e[1 - t] }; } function v9(r, e, t, n, i, a) { return { cx: r, cy: e, r0: t, r: n, startAngle: i, endAngle: a, clockwise: !0 }; } var aGe = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.makeElOption = function(t, n, i, a, o) { var s = i.axis, u = s.grid, l = a.get("type"), c = g9(u, s).getOtherAxis(s).getGlobalExtent(), f = s.toGlobalCoord(s.dataToCoord(n, !0)); if (l && l !== "none") { var h = m5(a), p = oGe[l](s, f, c); p.style = h, t.graphicKey = p.type, t.pointer = p; } var d = m2(u.model, i); Yee( n, t, d, i, a, o ); }, e.prototype.getHandleTransform = function(t, n, i) { var a = m2(n.axis.grid.model, n, { labelInside: !1 }); a.labelMargin = i.get(["handle", "margin"]); var o = y5(n.axis, t, a); return { x: o[0], y: o[1], rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0) }; }, e.prototype.updateHandleTransform = function(t, n, i, a) { var o = i.axis, s = o.grid, u = o.getGlobalExtent(!0), l = g9(s, o).getOtherAxis(o).getGlobalExtent(), c = o.dim === "x" ? 0 : 1, f = [t.x, t.y]; f[c] += n[c], f[c] = Math.min(u[1], f[c]), f[c] = Math.max(u[0], f[c]); var h = (l[1] + l[0]) / 2, p = [h, h]; p[c] = f[c]; var d = [{ verticalAlign: "middle" }, { align: "center" }]; return { x: f[0], y: f[1], rotation: t.rotation, cursorPoint: p, tooltipOption: d[c] }; }, e; }(g5); function g9(r, e) { var t = {}; return t[e.dim + "AxisIndex"] = e.index, r.getCartesian(t); } var oGe = { line: function(r, e, t) { var n = _5([e, t[0]], [e, t[1]], m9(r)); return { type: "Line", subPixelOptimize: !0, shape: n }; }, shadow: function(r, e, t) { var n = Math.max(1, r.getBandWidth()), i = t[1] - t[0]; return { type: "Rect", shape: Xee([e - n / 2, t[0]], [n, i], m9(r)) }; } }; function m9(r) { return r.dim === "x" ? 0 : 1; } const sGe = aGe; var uGe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "axisPointer", e.defaultOption = { show: "auto", z: 50, type: "line", snap: !1, triggerTooltip: !0, value: null, status: null, link: [], animation: null, animationDurationUpdate: 200, lineStyle: { color: "#B9BEC9", width: 1, type: "dashed" }, shadowStyle: { color: "rgba(210,219,238,0.2)" }, label: { show: !0, formatter: null, precision: "auto", margin: 3, color: "#fff", padding: [5, 7, 5, 7], backgroundColor: "auto", borderColor: null, borderWidth: 0, borderRadius: 3 }, handle: { show: !1, icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z", size: 45, margin: 50, color: "#333", shadowBlur: 3, shadowColor: "#aaa", shadowOffsetX: 0, shadowOffsetY: 2, throttle: 40 } }, e; }(Rt); const lGe = uGe; var Ac = Ut(), cGe = M; function qee(r, e, t) { if (!wr.node) { var n = e.getZr(); Ac(n).records || (Ac(n).records = {}), fGe(n, e); var i = Ac(n).records[r] || (Ac(n).records[r] = {}); i.handler = t; } } function fGe(r, e) { if (Ac(r).initialized) return; Ac(r).initialized = !0, t("click", ut(y9, "click")), t("mousemove", ut(y9, "mousemove")), t("globalout", pGe); function t(n, i) { r.on(n, function(a) { var o = dGe(e); cGe(Ac(r).records, function(s) { s && i(s, a, o.dispatchAction); }), hGe(o.pendings, e); }); } } function hGe(r, e) { var t = r.showTip.length, n = r.hideTip.length, i; t ? i = r.showTip[t - 1] : n && (i = r.hideTip[n - 1]), i && (i.dispatchAction = null, e.dispatchAction(i)); } function pGe(r, e, t) { r.handler("leave", null, t); } function y9(r, e, t, n) { e.handler(r, t, n); } function dGe(r) { var e = { showTip: [], hideTip: [] }, t = function(n) { var i = e[n.type]; i ? i.push(n) : (n.dispatchAction = t, r.dispatchAction(n)); }; return { dispatchAction: t, pendings: e }; } function N2(r, e) { if (!wr.node) { var t = e.getZr(), n = (Ac(t).records || {})[r]; n && (Ac(t).records[r] = null); } } var vGe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = n.getComponent("tooltip"), o = t.get("triggerOn") || a && a.get("triggerOn") || "mousemove|click"; qee("axisPointer", i, function(s, u, l) { o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && l({ type: "updateAxisPointer", currTrigger: s, x: u && u.offsetX, y: u && u.offsetY }); }); }, e.prototype.remove = function(t, n) { N2("axisPointer", n); }, e.prototype.dispose = function(t, n) { N2("axisPointer", n); }, e.type = "axisPointer", e; }(Gn); const gGe = vGe; function Zee(r, e) { var t = [], n = r.seriesIndex, i; if (n == null || !(i = e.getSeriesByIndex(n))) return { point: [] }; var a = i.getData(), o = Gd(a, r); if (o == null || o < 0 || le(o)) return { point: [] }; var s = a.getItemGraphicEl(o), u = i.coordinateSystem; if (i.getTooltipPosition) t = i.getTooltipPosition(o) || []; else if (u && u.dataToPoint) if (r.isStacked) { var l = u.getBaseAxis(), c = u.getOtherAxis(l), f = c.dim, h = l.dim, p = f === "x" || f === "radius" ? 1 : 0, d = a.mapDimension(h), v = []; v[p] = a.get(d, o), v[1 - p] = a.get(a.getCalculationInfo("stackResultDimension"), o), t = u.dataToPoint(v) || []; } else t = u.dataToPoint(a.getValues(ce(u.dimensions, function(m) { return a.mapDimension(m); }), o)) || []; else if (s) { var g = s.getBoundingRect().clone(); g.applyTransform(s.transform), t = [g.x + g.width / 2, g.y + g.height / 2]; } return { point: t, el: s }; } var _9 = Ut(); function mGe(r, e, t) { var n = r.currTrigger, i = [r.x, r.y], a = r, o = r.dispatchAction || Ae(t.dispatchAction, t), s = e.getComponent("axisPointer").coordSysAxesInfo; if (!!s) { yS(i) && (i = Zee({ seriesIndex: a.seriesIndex, dataIndex: a.dataIndex }, e).point); var u = yS(i), l = a.axesInfo, c = s.axesInfo, f = n === "leave" || yS(i), h = {}, p = {}, d = { list: [], map: {} }, v = { showPointer: ut(_Ge, p), showTooltip: ut(wGe, d) }; M(s.coordSysMap, function(m, y) { var _ = u || m.containPoint(i); M(s.coordSysAxesInfo[y], function(w, x) { var C = w.axis, S = EGe(l, w); if (!f && _ && (!l || S)) { var b = S && S.value; b == null && !u && (b = C.pointToData(i)), b != null && w9(w, b, v, !1, h); } }); }); var g = {}; return M(c, function(m, y) { var _ = m.linkGroup; _ && !p[y] && M(_.axesInfo, function(w, x) { var C = p[x]; if (w !== m && C) { var S = C.value; _.mapper && (S = m.axis.scale.parse(_.mapper(S, x9(w), x9(m)))), g[m.key] = S; } }); }), M(g, function(m, y) { w9(c[y], m, v, !0, h); }), xGe(p, c, h), CGe(d, i, r, o), SGe(c, o, t), h; } } function w9(r, e, t, n, i) { var a = r.axis; if (!(a.scale.isBlank() || !a.containData(e))) { if (!r.involveSeries) { t.showPointer(r, e); return; } var o = yGe(e, r), s = o.payloadBatch, u = o.snapToValue; s[0] && i.seriesIndex == null && oe(i, s[0]), !n && r.snap && a.containData(u) && u != null && (e = u), t.showPointer(r, e, s), t.showTooltip(r, o, u); } } function yGe(r, e) { var t = e.axis, n = t.dim, i = r, a = [], o = Number.MAX_VALUE, s = -1; return M(e.seriesModels, function(u, l) { var c = u.getData().mapDimensionsAll(n), f, h; if (u.getAxisTooltipData) { var p = u.getAxisTooltipData(c, r, t); h = p.dataIndices, f = p.nestestValue; } else { if (h = u.getData().indicesOfNearest( c[0], r, t.type === "category" ? 0.5 : null ), !h.length) return; f = u.getData().get(c[0], h[0]); } if (!(f == null || !isFinite(f))) { var d = r - f, v = Math.abs(d); v <= o && ((v < o || d >= 0 && s < 0) && (o = v, s = d, i = f, a.length = 0), M(h, function(g) { a.push({ seriesIndex: u.seriesIndex, dataIndexInside: g, dataIndex: u.getData().getRawIndex(g) }); })); } }), { payloadBatch: a, snapToValue: i }; } function _Ge(r, e, t, n) { r[e.key] = { value: t, payloadBatch: n }; } function wGe(r, e, t, n) { var i = t.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel; if (!(!e.triggerTooltip || !i.length)) { var u = e.coordSys.model, l = P1(u), c = r.map[l]; c || (c = r.map[l] = { coordSysId: u.id, coordSysIndex: u.componentIndex, coordSysType: u.type, coordSysMainType: u.mainType, dataByAxis: [] }, r.list.push(c)), c.dataByAxis.push({ axisDim: a.dim, axisIndex: o.componentIndex, axisType: o.type, axisId: o.id, value: n, valueLabelOpt: { precision: s.get(["label", "precision"]), formatter: s.get(["label", "formatter"]) }, seriesDataIndices: i.slice() }); } } function xGe(r, e, t) { var n = t.axesInfo = []; M(e, function(i, a) { var o = i.axisPointerModel.option, s = r[a]; s ? (!i.useHandle && (o.status = "show"), o.value = s.value, o.seriesDataIndices = (s.payloadBatch || []).slice()) : !i.useHandle && (o.status = "hide"), o.status === "show" && n.push({ axisDim: i.axis.dim, axisIndex: i.axis.model.componentIndex, value: o.value }); }); } function CGe(r, e, t, n) { if (yS(e) || !r.list.length) { n({ type: "hideTip" }); return; } var i = ((r.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {}; n({ type: "showTip", escapeConnect: !0, x: e[0], y: e[1], tooltipOption: t.tooltipOption, position: t.position, dataIndexInside: i.dataIndexInside, dataIndex: i.dataIndex, seriesIndex: i.seriesIndex, dataByCoordSys: r.list }); } function SGe(r, e, t) { var n = t.getZr(), i = "axisPointerLastHighlights", a = _9(n)[i] || {}, o = _9(n)[i] = {}; M(r, function(l, c) { var f = l.axisPointerModel.option; f.status === "show" && M(f.seriesDataIndices, function(h) { var p = h.seriesIndex + " | " + h.dataIndex; o[p] = h; }); }); var s = [], u = []; M(a, function(l, c) { !o[c] && u.push(l); }), M(o, function(l, c) { !a[c] && s.push(l); }), u.length && t.dispatchAction({ type: "downplay", escapeConnect: !0, notBlur: !0, batch: u }), s.length && t.dispatchAction({ type: "highlight", escapeConnect: !0, notBlur: !0, batch: s }); } function EGe(r, e) { for (var t = 0; t < (r || []).length; t++) { var n = r[t]; if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex) return n; } } function x9(r) { var e = r.axis.model, t = {}, n = t.axisDim = r.axis.dim; return t.axisIndex = t[n + "AxisIndex"] = e.componentIndex, t.axisName = t[n + "AxisName"] = e.name, t.axisId = t[n + "AxisId"] = e.id, t; } function yS(r) { return !r || r[0] == null || isNaN(r[0]) || r[1] == null || isNaN(r[1]); } function Zw(r) { yv.registerAxisPointerClass("CartesianAxisPointer", sGe), r.registerComponentModel(lGe), r.registerComponentView(gGe), r.registerPreprocessor(function(e) { if (e) { (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {}); var t = e.axisPointer.link; t && !le(t) && (e.axisPointer.link = [t]); } }), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, function(e, t) { e.getComponent("axisPointer").coordSysAxesInfo = pNe(e, t); }), r.registerAction({ type: "updateAxisPointer", event: "updateAxisPointer", update: ":updateAxisPointer" }, mGe); } function bGe(r) { bt(wQ), bt(Zw); } var TGe = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.makeElOption = function(t, n, i, a, o) { var s = i.axis; s.dim === "angle" && (this.animationThreshold = Math.PI / 18); var u = s.polar, l = u.getOtherAxis(s), c = l.getExtent(), f = s.dataToCoord(n), h = a.get("type"); if (h && h !== "none") { var p = m5(a), d = IGe[h](s, u, f, c); d.style = p, t.graphicKey = d.type, t.pointer = d; } var v = a.get(["label", "margin"]), g = PGe(n, i, a, u, v); Wee(t, i, a, o, g); }, e; }(g5); function PGe(r, e, t, n, i) { var a = e.axis, o = a.dataToCoord(r), s = n.getAngleAxis().getExtent()[0]; s = s / 180 * Math.PI; var u = n.getRadiusAxis().getExtent(), l, c, f; if (a.dim === "radius") { var h = xs(); dv(h, h, s), Jl(h, h, [n.cx, n.cy]), l = Uu([o, -i], h); var p = e.getModel("axisLabel").get("rotate") || 0, d = uf.innerTextLayout(s, p * Math.PI / 180, -1); c = d.textAlign, f = d.textVerticalAlign; } else { var v = u[1]; l = n.coordToPoint([v + i, o]); var g = n.cx, m = n.cy; c = Math.abs(l[0] - g) / v < 0.3 ? "center" : l[0] > g ? "left" : "right", f = Math.abs(l[1] - m) / v < 0.3 ? "middle" : l[1] > m ? "top" : "bottom"; } return { position: l, align: c, verticalAlign: f }; } var IGe = { line: function(r, e, t, n) { return r.dim === "angle" ? { type: "Line", shape: _5(e.coordToPoint([n[0], t]), e.coordToPoint([n[1], t])) } : { type: "Circle", shape: { cx: e.cx, cy: e.cy, r: t } }; }, shadow: function(r, e, t, n) { var i = Math.max(1, r.getBandWidth()), a = Math.PI / 180; return r.dim === "angle" ? { type: "Sector", shape: v9( e.cx, e.cy, n[0], n[1], (-t - i / 2) * a, (-t + i / 2) * a ) } : { type: "Sector", shape: v9(e.cx, e.cy, t - i / 2, t + i / 2, 0, Math.PI * 2) }; } }; const AGe = TGe; var LGe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.findAxisModel = function(t) { var n, i = this.ecModel; return i.eachComponent(t, function(a) { a.getCoordSysModel() === this && (n = a); }, this), n; }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = { z: 0, center: ["50%", "50%"], radius: "80%" }, e; }(Rt); const DGe = LGe; var w5 = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.getCoordSysModel = function() { return this.getReferringComponents("polar", ui).models[0]; }, e.type = "polarAxis", e; }(Rt); gi(w5, $w); var MGe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "angleAxis", e; }(w5), OGe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "radiusAxis", e; }(w5), x5 = function(r) { W(e, r); function e(t, n) { return r.call(this, "radius", t, n) || this; } return e.prototype.pointToData = function(t, n) { return this.polar.pointToData(t, n)[this.dim === "radius" ? 0 : 1]; }, e; }(pl); x5.prototype.dataToRadius = pl.prototype.dataToCoord; x5.prototype.radiusToData = pl.prototype.coordToData; const RGe = x5; var NGe = Ut(), C5 = function(r) { W(e, r); function e(t, n) { return r.call(this, "angle", t, n || [0, 360]) || this; } return e.prototype.pointToData = function(t, n) { return this.polar.pointToData(t, n)[this.dim === "radius" ? 0 : 1]; }, e.prototype.calculateCategoryInterval = function() { var t = this, n = t.getLabelModel(), i = t.scale, a = i.getExtent(), o = i.count(); if (a[1] - a[0] < 1) return 0; var s = a[0], u = t.dataToCoord(s + 1) - t.dataToCoord(s), l = Math.abs(u), c = Mw(s == null ? "" : s + "", n.getFont(), "center", "top"), f = Math.max(c.height, 7), h = f / l; isNaN(h) && (h = 1 / 0); var p = Math.max(0, Math.floor(h)), d = NGe(t.model), v = d.lastAutoInterval, g = d.lastTickCount; return v != null && g != null && Math.abs(v - p) <= 1 && Math.abs(g - o) <= 1 && v > p ? p = v : (d.lastTickCount = o, d.lastAutoInterval = p), p; }, e; }(pl); C5.prototype.dataToAngle = pl.prototype.dataToCoord; C5.prototype.angleToData = pl.prototype.coordToData; const FGe = C5; var Kee = ["radius", "angle"], BGe = function() { function r(e) { this.dimensions = Kee, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new RGe(), this._angleAxis = new FGe(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this; } return r.prototype.containPoint = function(e) { var t = this.pointToCoord(e); return this._radiusAxis.contain(t[0]) && this._angleAxis.contain(t[1]); }, r.prototype.containData = function(e) { return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]); }, r.prototype.getAxis = function(e) { var t = "_" + e + "Axis"; return this[t]; }, r.prototype.getAxes = function() { return [this._radiusAxis, this._angleAxis]; }, r.prototype.getAxesByScale = function(e) { var t = [], n = this._angleAxis, i = this._radiusAxis; return n.scale.type === e && t.push(n), i.scale.type === e && t.push(i), t; }, r.prototype.getAngleAxis = function() { return this._angleAxis; }, r.prototype.getRadiusAxis = function() { return this._radiusAxis; }, r.prototype.getOtherAxis = function(e) { var t = this._angleAxis; return e === t ? this._radiusAxis : t; }, r.prototype.getBaseAxis = function() { return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis(); }, r.prototype.getTooltipAxes = function(e) { var t = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis(); return { baseAxes: [t], otherAxes: [this.getOtherAxis(t)] }; }, r.prototype.dataToPoint = function(e, t) { return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], t), this._angleAxis.dataToAngle(e[1], t)]); }, r.prototype.pointToData = function(e, t) { var n = this.pointToCoord(e); return [this._radiusAxis.radiusToData(n[0], t), this._angleAxis.angleToData(n[1], t)]; }, r.prototype.pointToCoord = function(e) { var t = e[0] - this.cx, n = e[1] - this.cy, i = this.getAngleAxis(), a = i.getExtent(), o = Math.min(a[0], a[1]), s = Math.max(a[0], a[1]); i.inverse ? o = s - 360 : s = o + 360; var u = Math.sqrt(t * t + n * n); t /= u, n /= u; for (var l = Math.atan2(-n, t) / Math.PI * 180, c = l < o ? 1 : -1; l < o || l > s; ) l += c * 360; return [u, l]; }, r.prototype.coordToPoint = function(e) { var t = e[0], n = e[1] / 180 * Math.PI, i = Math.cos(n) * t + this.cx, a = -Math.sin(n) * t + this.cy; return [i, a]; }, r.prototype.getArea = function() { var e = this.getAngleAxis(), t = this.getRadiusAxis(), n = t.getExtent().slice(); n[0] > n[1] && n.reverse(); var i = e.getExtent(), a = Math.PI / 180; return { cx: this.cx, cy: this.cy, r0: n[0], r: n[1], startAngle: -i[0] * a, endAngle: -i[1] * a, clockwise: e.inverse, contain: function(o, s) { var u = o - this.cx, l = s - this.cy, c = u * u + l * l - 1e-4, f = this.r, h = this.r0; return c <= f * f && c >= h * h; } }; }, r.prototype.convertToPixel = function(e, t, n) { var i = C9(t); return i === this ? this.dataToPoint(n) : null; }, r.prototype.convertFromPixel = function(e, t, n) { var i = C9(t); return i === this ? this.pointToData(n) : null; }, r; }(); function C9(r) { var e = r.seriesModel, t = r.polarModel; return t && t.coordinateSystem || e && e.coordinateSystem; } const kGe = BGe; function VGe(r, e, t) { var n = e.get("center"), i = t.getWidth(), a = t.getHeight(); r.cx = ye(n[0], i), r.cy = ye(n[1], a); var o = r.getRadiusAxis(), s = Math.min(i, a) / 2, u = e.get("radius"); u == null ? u = [0, "100%"] : le(u) || (u = [0, u]); var l = [ye(u[0], s), ye(u[1], s)]; o.inverse ? o.setExtent(l[1], l[0]) : o.setExtent(l[0], l[1]); } function GGe(r, e) { var t = this, n = t.getAngleAxis(), i = t.getRadiusAxis(); if (n.scale.setExtent(1 / 0, -1 / 0), i.scale.setExtent(1 / 0, -1 / 0), r.eachSeries(function(s) { if (s.coordinateSystem === t) { var u = s.getData(); M(DE(u, "radius"), function(l) { i.scale.unionExtentFromData(u, l); }), M(DE(u, "angle"), function(l) { n.scale.unionExtentFromData(u, l); }); } }), Fm(n.scale, n.model), Fm(i.scale, i.model), n.type === "category" && !n.onBand) { var a = n.getExtent(), o = 360 / n.scale.count(); n.inverse ? a[1] += o : a[1] -= o, n.setExtent(a[0], a[1]); } } function zGe(r) { return r.mainType === "angleAxis"; } function S9(r, e) { if (r.type = e.get("type"), r.scale = sP(e), r.onBand = e.get("boundaryGap") && r.type === "category", r.inverse = e.get("inverse"), zGe(e)) { r.inverse = r.inverse !== e.get("clockwise"); var t = e.get("startAngle"); r.setExtent(t, t + (r.inverse ? -360 : 360)); } e.axis = r, r.model = e; } var $Ge = { dimensions: Kee, create: function(r, e) { var t = []; return r.eachComponent("polar", function(n, i) { var a = new kGe(i + ""); a.update = GGe; var o = a.getRadiusAxis(), s = a.getAngleAxis(), u = n.findAxisModel("radiusAxis"), l = n.findAxisModel("angleAxis"); S9(o, u), S9(s, l), VGe(a, n, e), t.push(a), n.coordinateSystem = a, a.model = n; }), r.eachSeries(function(n) { if (n.get("coordinateSystem") === "polar") { var i = n.getReferringComponents("polar", ui).models[0]; if (process.env.NODE_ENV !== "production" && !i) throw new Error('Polar "' + si(n.get("polarIndex"), n.get("polarId"), 0) + '" not found'); n.coordinateSystem = i.coordinateSystem; } }), t; } }; const HGe = $Ge; var UGe = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"]; function TC(r, e, t) { e[1] > e[0] && (e = e.slice().reverse()); var n = r.coordToPoint([e[0], t]), i = r.coordToPoint([e[1], t]); return { x1: n[0], y1: n[1], x2: i[0], y2: i[1] }; } function PC(r) { var e = r.getRadiusAxis(); return e.inverse ? 0 : 1; } function E9(r) { var e = r[0], t = r[r.length - 1]; e && t && Math.abs(Math.abs(e.coord - t.coord) - 360) < 1e-4 && r.pop(); } var WGe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.axisPointerClass = "PolarAxisPointer", t; } return e.prototype.render = function(t, n) { if (this.group.removeAll(), !!t.get("show")) { var i = t.axis, a = i.polar, o = a.getRadiusAxis().getExtent(), s = i.getTicksCoords(), u = i.getMinorTicksCoords(), l = ce(i.getViewLabels(), function(c) { c = Qe(c); var f = i.scale, h = f.type === "ordinal" ? f.getRawOrdinalNumber(c.tickValue) : c.tickValue; return c.coord = i.dataToCoord(h), c; }); E9(l), E9(s), M(UGe, function(c) { t.get([c, "show"]) && (!i.scale.isBlank() || c === "axisLine") && jGe[c](this.group, t, a, s, u, o, l); }, this); } }, e.type = "angleAxis", e; }(yv), jGe = { axisLine: function(r, e, t, n, i, a) { var o = e.getModel(["axisLine", "lineStyle"]), s = PC(t), u = s ? 0 : 1, l; a[u] === 0 ? l = new rc({ shape: { cx: t.cx, cy: t.cy, r: a[s] }, style: o.getLineStyle(), z2: 1, silent: !0 }) : l = new HT({ shape: { cx: t.cx, cy: t.cy, r: a[s], r0: a[u] }, style: o.getLineStyle(), z2: 1, silent: !0 }), l.style.fill = null, r.add(l); }, axisTick: function(r, e, t, n, i, a) { var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), u = a[PC(t)], l = ce(n, function(c) { return new fa({ shape: TC(t, [u, u + s], c.coord) }); }); r.add(qs(l, { style: qe(o.getModel("lineStyle").getLineStyle(), { stroke: e.get(["axisLine", "lineStyle", "color"]) }) })); }, minorTick: function(r, e, t, n, i, a) { if (!!i.length) { for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), u = (o.get("inside") ? -1 : 1) * s.get("length"), l = a[PC(t)], c = [], f = 0; f < i.length; f++) for (var h = 0; h < i[f].length; h++) c.push(new fa({ shape: TC(t, [l, l + u], i[f][h].coord) })); r.add(qs(c, { style: qe(s.getModel("lineStyle").getLineStyle(), qe(o.getLineStyle(), { stroke: e.get(["axisLine", "lineStyle", "color"]) })) })); } }, axisLabel: function(r, e, t, n, i, a, o) { var s = e.getCategories(!0), u = e.getModel("axisLabel"), l = u.get("margin"), c = e.get("triggerEvent"); M(o, function(f, h) { var p = u, d = f.tickValue, v = a[PC(t)], g = t.coordToPoint([v + l, f.coord]), m = t.cx, y = t.cy, _ = Math.abs(g[0] - m) / v < 0.3 ? "center" : g[0] > m ? "left" : "right", w = Math.abs(g[1] - y) / v < 0.3 ? "middle" : g[1] > y ? "top" : "bottom"; if (s && s[d]) { var x = s[d]; Xe(x) && x.textStyle && (p = new rn(x.textStyle, u, u.ecModel)); } var C = new Yt({ silent: uf.isLabelSilent(e), style: Sn(p, { x: g[0], y: g[1], fill: p.getTextColor() || e.get(["axisLine", "lineStyle", "color"]), text: f.formattedLabel, align: _, verticalAlign: w }) }); if (r.add(C), c) { var S = uf.makeAxisEventDataBase(e); S.targetType = "axisLabel", S.value = f.rawLabel, nt(C).eventData = S; } }, this); }, splitLine: function(r, e, t, n, i, a) { var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), u = s.get("color"), l = 0; u = u instanceof Array ? u : [u]; for (var c = [], f = 0; f < n.length; f++) { var h = l++ % u.length; c[h] = c[h] || [], c[h].push(new fa({ shape: TC(t, a, n[f].coord) })); } for (var f = 0; f < c.length; f++) r.add(qs(c[f], { style: qe({ stroke: u[f % u.length] }, s.getLineStyle()), silent: !0, z: e.get("z") })); }, minorSplitLine: function(r, e, t, n, i, a) { if (!!i.length) { for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), u = [], l = 0; l < i.length; l++) for (var c = 0; c < i[l].length; c++) u.push(new fa({ shape: TC(t, a, i[l][c].coord) })); r.add(qs(u, { style: s.getLineStyle(), silent: !0, z: e.get("z") })); } }, splitArea: function(r, e, t, n, i, a) { if (!!n.length) { var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), u = s.get("color"), l = 0; u = u instanceof Array ? u : [u]; for (var c = [], f = Math.PI / 180, h = -n[0].coord * f, p = Math.min(a[0], a[1]), d = Math.max(a[0], a[1]), v = e.get("clockwise"), g = 1, m = n.length; g <= m; g++) { var y = g === m ? n[0].coord : n[g].coord, _ = l++ % u.length; c[_] = c[_] || [], c[_].push(new $o({ shape: { cx: t.cx, cy: t.cy, r0: p, r: d, startAngle: h, endAngle: -y * f, clockwise: v }, silent: !0 })), h = -y * f; } for (var g = 0; g < c.length; g++) r.add(qs(c[g], { style: qe({ fill: u[g % u.length] }, s.getAreaStyle()), silent: !0 })); } } }; const YGe = WGe; var XGe = ["axisLine", "axisTickLabel", "axisName"], qGe = ["splitLine", "splitArea", "minorSplitLine"], ZGe = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.axisPointerClass = "PolarAxisPointer", t; } return e.prototype.render = function(t, n) { if (this.group.removeAll(), !!t.get("show")) { var i = this._axisGroup, a = this._axisGroup = new rt(); this.group.add(a); var o = t.axis, s = o.polar, u = s.getAngleAxis(), l = o.getTicksCoords(), c = o.getMinorTicksCoords(), f = u.getExtent()[0], h = o.getExtent(), p = JGe(s, t, f), d = new uf(t, p); M(XGe, d.add, d), a.add(d.getGroup()), Nw(i, a, t), M(qGe, function(v) { t.get([v, "show"]) && !o.scale.isBlank() && KGe[v](this.group, t, s, f, h, l, c); }, this); } }, e.type = "radiusAxis", e; }(yv), KGe = { splitLine: function(r, e, t, n, i, a) { var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), u = s.get("color"), l = 0; u = u instanceof Array ? u : [u]; for (var c = [], f = 0; f < a.length; f++) { var h = l++ % u.length; c[h] = c[h] || [], c[h].push(new rc({ shape: { cx: t.cx, cy: t.cy, r: Math.max(a[f].coord, 0) } })); } for (var f = 0; f < c.length; f++) r.add(qs(c[f], { style: qe({ stroke: u[f % u.length], fill: null }, s.getLineStyle()), silent: !0 })); }, minorSplitLine: function(r, e, t, n, i, a, o) { if (!!o.length) { for (var s = e.getModel("minorSplitLine"), u = s.getModel("lineStyle"), l = [], c = 0; c < o.length; c++) for (var f = 0; f < o[c].length; f++) l.push(new rc({ shape: { cx: t.cx, cy: t.cy, r: o[c][f].coord } })); r.add(qs(l, { style: qe({ fill: null }, u.getLineStyle()), silent: !0 })); } }, splitArea: function(r, e, t, n, i, a) { if (!!a.length) { var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), u = s.get("color"), l = 0; u = u instanceof Array ? u : [u]; for (var c = [], f = a[0].coord, h = 1; h < a.length; h++) { var p = l++ % u.length; c[p] = c[p] || [], c[p].push(new $o({ shape: { cx: t.cx, cy: t.cy, r0: f, r: a[h].coord, startAngle: 0, endAngle: Math.PI * 2 }, silent: !0 })), f = a[h].coord; } for (var h = 0; h < c.length; h++) r.add(qs(c[h], { style: qe({ fill: u[h % u.length] }, s.getAreaStyle()), silent: !0 })); } } }; function JGe(r, e, t) { return { position: [r.cx, r.cy], rotation: t / 180 * Math.PI, labelDirection: -1, tickDirection: -1, nameDirection: 1, labelRotate: e.getModel("axisLabel").get("rotate"), z2: 1 }; } const QGe = ZGe; function Jee(r) { return r.get("stack") || "__ec_stack_" + r.seriesIndex; } function Qee(r, e) { return e.dim + r.model.componentIndex; } function e4e(r, e, t) { var n = {}, i = t4e(Wr(e.getSeriesByType(r), function(a) { return !e.isSeriesFiltered(a) && a.coordinateSystem && a.coordinateSystem.type === "polar"; })); e.eachSeriesByType(r, function(a) { if (a.coordinateSystem.type === "polar") { var o = a.getData(), s = a.coordinateSystem, u = s.getBaseAxis(), l = Qee(s, u), c = Jee(a), f = i[l][c], h = f.offset, p = f.width, d = s.getOtherAxis(u), v = a.coordinateSystem.cx, g = a.coordinateSystem.cy, m = a.get("barMinHeight") || 0, y = a.get("barMinAngle") || 0; n[c] = n[c] || []; for (var _ = o.mapDimension(d.dim), w = o.mapDimension(u.dim), x = Fh( o, _ ), C = u.dim !== "radius" || !a.get("roundCap", !0), S = d.dataToCoord(0), b = 0, E = o.count(); b < E; b++) { var T = o.get(_, b), P = o.get(w, b), I = T >= 0 ? "p" : "n", A = S; x && (n[c][P] || (n[c][P] = { p: S, n: S }), A = n[c][P][I]); var L = void 0, D = void 0, O = void 0, N = void 0; if (d.dim === "radius") { var F = d.dataToCoord(T) - S, k = u.dataToCoord(P); Math.abs(F) < m && (F = (F < 0 ? -1 : 1) * m), L = A, D = A + F, O = k - h, N = O - p, x && (n[c][P][I] = D); } else { var G = d.dataToCoord(T, C) - S, U = u.dataToCoord(P); Math.abs(G) < y && (G = (G < 0 ? -1 : 1) * y), L = U + h, D = L + p, O = A, N = A + G, x && (n[c][P][I] = N); } o.setItemLayout(b, { cx: v, cy: g, r0: L, r: D, startAngle: -O * Math.PI / 180, endAngle: -N * Math.PI / 180, clockwise: O >= N }); } } }); } function t4e(r) { var e = {}; M(r, function(n, i) { var a = n.getData(), o = n.coordinateSystem, s = o.getBaseAxis(), u = Qee(o, s), l = s.getExtent(), c = s.type === "category" ? s.getBandWidth() : Math.abs(l[1] - l[0]) / a.count(), f = e[u] || { bandWidth: c, remainedWidth: c, autoWidthCount: 0, categoryGap: "20%", gap: "30%", stacks: {} }, h = f.stacks; e[u] = f; var p = Jee(n); h[p] || f.autoWidthCount++, h[p] = h[p] || { width: 0, maxWidth: 0 }; var d = ye(n.get("barWidth"), c), v = ye(n.get("barMaxWidth"), c), g = n.get("barGap"), m = n.get("barCategoryGap"); d && !h[p].width && (d = Math.min(f.remainedWidth, d), h[p].width = d, f.remainedWidth -= d), v && (h[p].maxWidth = v), g != null && (f.gap = g), m != null && (f.categoryGap = m); }); var t = {}; return M(e, function(n, i) { t[i] = {}; var a = n.stacks, o = n.bandWidth, s = ye(n.categoryGap, o), u = ye(n.gap, 1), l = n.remainedWidth, c = n.autoWidthCount, f = (l - s) / (c + (c - 1) * u); f = Math.max(f, 0), M(a, function(v, g) { var m = v.maxWidth; m && m < f && (m = Math.min(m, l), v.width && (m = Math.min(m, v.width)), l -= m, v.width = m, c--); }), f = (l - s) / (c + (c - 1) * u), f = Math.max(f, 0); var h = 0, p; M(a, function(v, g) { v.width || (v.width = f), p = v, h += v.width * (1 + u); }), p && (h -= p.width * u); var d = -h / 2; M(a, function(v, g) { t[i][g] = t[i][g] || { offset: d, width: v.width }, d += v.width * (1 + u); }); }), t; } var r4e = { startAngle: 90, clockwise: !0, splitNumber: 12, axisLabel: { rotate: 0 } }, n4e = { splitNumber: 5 }, i4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "polar", e; }(Gn); function a4e(r) { bt(Zw), yv.registerAxisPointerClass("PolarAxisPointer", AGe), r.registerCoordinateSystem("polar", HGe), r.registerComponentModel(DGe), r.registerComponentView(i4e), km(r, "angle", MGe, r4e), km(r, "radius", OGe, n4e), r.registerComponentView(YGe), r.registerComponentView(QGe), r.registerLayout(ut(e4e, "bar")); } function F2(r, e) { e = e || {}; var t = r.coordinateSystem, n = r.axis, i = {}, a = n.position, o = n.orient, s = t.getRect(), u = [s.x, s.x + s.width, s.y, s.y + s.height], l = { horizontal: { top: u[2], bottom: u[3] }, vertical: { left: u[0], right: u[1] } }; i.position = [o === "vertical" ? l.vertical[a] : u[0], o === "horizontal" ? l.horizontal[a] : u[3]]; var c = { horizontal: 0, vertical: 1 }; i.rotation = Math.PI / 2 * c[o]; var f = { top: -1, bottom: 1, right: 1, left: -1 }; i.labelDirection = i.tickDirection = i.nameDirection = f[a], r.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), si(e.labelInside, r.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection); var h = e.rotate; return h == null && (h = r.get(["axisLabel", "rotate"])), i.labelRotation = a === "top" ? -h : h, i.z2 = 1, i; } var o4e = ["axisLine", "axisTickLabel", "axisName"], s4e = ["splitArea", "splitLine"], u4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.axisPointerClass = "SingleAxisPointer", t; } return e.prototype.render = function(t, n, i, a) { var o = this.group; o.removeAll(); var s = this._axisGroup; this._axisGroup = new rt(); var u = F2(t), l = new uf(t, u); M(o4e, l.add, l), o.add(this._axisGroup), o.add(l.getGroup()), M(s4e, function(c) { t.get([c, "show"]) && l4e[c](this, this.group, this._axisGroup, t); }, this), Nw(s, this._axisGroup, t), r.prototype.render.call(this, t, n, i, a); }, e.prototype.remove = function() { mQ(this); }, e.type = "singleAxis", e; }(yv), l4e = { splitLine: function(r, e, t, n) { var i = n.axis; if (!i.scale.isBlank()) { var a = n.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color"); s = s instanceof Array ? s : [s]; for (var u = n.coordinateSystem.getRect(), l = i.isHorizontal(), c = [], f = 0, h = i.getTicksCoords({ tickModel: a }), p = [], d = [], v = 0; v < h.length; ++v) { var g = i.toGlobalCoord(h[v].coord); l ? (p[0] = g, p[1] = u.y, d[0] = g, d[1] = u.y + u.height) : (p[0] = u.x, p[1] = g, d[0] = u.x + u.width, d[1] = g); var m = f++ % s.length; c[m] = c[m] || [], c[m].push(new fa({ subPixelOptimize: !0, shape: { x1: p[0], y1: p[1], x2: d[0], y2: d[1] }, silent: !0 })); } for (var y = o.getLineStyle(["color"]), v = 0; v < c.length; ++v) e.add(qs(c[v], { style: qe({ stroke: s[v % s.length] }, y), silent: !0 })); } }, splitArea: function(r, e, t, n) { gQ(r, t, n, n); } }; const c4e = u4e; var ete = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.getCoordSysModel = function() { return this; }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = { left: "5%", top: "5%", right: "5%", bottom: "5%", type: "value", position: "bottom", orient: "horizontal", axisLine: { show: !0, lineStyle: { width: 1, type: "solid" } }, tooltip: { show: !0 }, axisTick: { show: !0, length: 6, lineStyle: { width: 1 } }, axisLabel: { show: !0, interval: "auto" }, splitLine: { show: !0, lineStyle: { type: "dashed", opacity: 0.2 } } }, e; }(Rt); gi(ete, $w.prototype); const xL = ete; var f4e = function(r) { W(e, r); function e(t, n, i, a, o) { var s = r.call(this, t, n, i) || this; return s.type = a || "value", s.position = o || "bottom", s; } return e.prototype.isHorizontal = function() { var t = this.position; return t === "top" || t === "bottom"; }, e.prototype.pointToData = function(t, n) { return this.coordinateSystem.pointToData(t)[0]; }, e; }(pl); const h4e = f4e; var tte = ["single"], p4e = function() { function r(e, t, n) { this.type = "single", this.dimension = "single", this.dimensions = tte, this.axisPointerEnabled = !0, this.model = e, this._init(e, t, n); } return r.prototype._init = function(e, t, n) { var i = this.dimension, a = new h4e(i, sP(e), [0, 0], e.get("type"), e.get("position")), o = a.type === "category"; a.onBand = o && e.get("boundaryGap"), a.inverse = e.get("inverse"), a.orient = e.get("orient"), e.axis = a, a.model = e, a.coordinateSystem = this, this._axis = a; }, r.prototype.update = function(e, t) { e.eachSeries(function(n) { if (n.coordinateSystem === this) { var i = n.getData(); M(i.mapDimensionsAll(this.dimension), function(a) { this._axis.scale.unionExtentFromData(i, a); }, this), Fm(this._axis.scale, this._axis.model); } }, this); }, r.prototype.resize = function(e, t) { this._rect = Bi({ left: e.get("left"), top: e.get("top"), right: e.get("right"), bottom: e.get("bottom"), width: e.get("width"), height: e.get("height") }, { width: t.getWidth(), height: t.getHeight() }), this._adjustAxis(); }, r.prototype.getRect = function() { return this._rect; }, r.prototype._adjustAxis = function() { var e = this._rect, t = this._axis, n = t.isHorizontal(), i = n ? [0, e.width] : [0, e.height], a = t.reverse ? 1 : 0; t.setExtent(i[a], i[1 - a]), this._updateAxisTransform(t, n ? e.x : e.y); }, r.prototype._updateAxisTransform = function(e, t) { var n = e.getExtent(), i = n[0] + n[1], a = e.isHorizontal(); e.toGlobalCoord = a ? function(o) { return o + t; } : function(o) { return i - o + t; }, e.toLocalCoord = a ? function(o) { return o - t; } : function(o) { return i - o + t; }; }, r.prototype.getAxis = function() { return this._axis; }, r.prototype.getBaseAxis = function() { return this._axis; }, r.prototype.getAxes = function() { return [this._axis]; }, r.prototype.getTooltipAxes = function() { return { baseAxes: [this.getAxis()], otherAxes: [] }; }, r.prototype.containPoint = function(e) { var t = this.getRect(), n = this.getAxis(), i = n.orient; return i === "horizontal" ? n.contain(n.toLocalCoord(e[0])) && e[1] >= t.y && e[1] <= t.y + t.height : n.contain(n.toLocalCoord(e[1])) && e[0] >= t.y && e[0] <= t.y + t.height; }, r.prototype.pointToData = function(e) { var t = this.getAxis(); return [t.coordToData(t.toLocalCoord(e[t.orient === "horizontal" ? 0 : 1]))]; }, r.prototype.dataToPoint = function(e) { var t = this.getAxis(), n = this.getRect(), i = [], a = t.orient === "horizontal" ? 0 : 1; return e instanceof Array && (e = e[0]), i[a] = t.toGlobalCoord(t.dataToCoord(+e)), i[1 - a] = a === 0 ? n.y + n.height / 2 : n.x + n.width / 2, i; }, r.prototype.convertToPixel = function(e, t, n) { var i = b9(t); return i === this ? this.dataToPoint(n) : null; }, r.prototype.convertFromPixel = function(e, t, n) { var i = b9(t); return i === this ? this.pointToData(n) : null; }, r; }(); function b9(r) { var e = r.seriesModel, t = r.singleAxisModel; return t && t.coordinateSystem || e && e.coordinateSystem; } function d4e(r, e) { var t = []; return r.eachComponent("singleAxis", function(n, i) { var a = new p4e(n, r, e); a.name = "single_" + i, a.resize(n, e), n.coordinateSystem = a, t.push(a); }), r.eachSeries(function(n) { if (n.get("coordinateSystem") === "singleAxis") { var i = n.getReferringComponents("singleAxis", ui).models[0]; n.coordinateSystem = i && i.coordinateSystem; } }), t; } var v4e = { create: d4e, dimensions: tte }; const g4e = v4e; var T9 = ["x", "y"], m4e = ["width", "height"], y4e = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.makeElOption = function(t, n, i, a, o) { var s = i.axis, u = s.coordinateSystem, l = CL(u, 1 - XE(s)), c = u.dataToPoint(n)[0], f = a.get("type"); if (f && f !== "none") { var h = m5(a), p = _4e[f](s, c, l); p.style = h, t.graphicKey = p.type, t.pointer = p; } var d = F2(i); Yee( n, t, d, i, a, o ); }, e.prototype.getHandleTransform = function(t, n, i) { var a = F2(n, { labelInside: !1 }); a.labelMargin = i.get(["handle", "margin"]); var o = y5(n.axis, t, a); return { x: o[0], y: o[1], rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0) }; }, e.prototype.updateHandleTransform = function(t, n, i, a) { var o = i.axis, s = o.coordinateSystem, u = XE(o), l = CL(s, u), c = [t.x, t.y]; c[u] += n[u], c[u] = Math.min(l[1], c[u]), c[u] = Math.max(l[0], c[u]); var f = CL(s, 1 - u), h = (f[1] + f[0]) / 2, p = [h, h]; return p[u] = c[u], { x: c[0], y: c[1], rotation: t.rotation, cursorPoint: p, tooltipOption: { verticalAlign: "middle" } }; }, e; }(g5), _4e = { line: function(r, e, t) { var n = _5([e, t[0]], [e, t[1]], XE(r)); return { type: "Line", subPixelOptimize: !0, shape: n }; }, shadow: function(r, e, t) { var n = r.getBandWidth(), i = t[1] - t[0]; return { type: "Rect", shape: Xee([e - n / 2, t[0]], [n, i], XE(r)) }; } }; function XE(r) { return r.isHorizontal() ? 0 : 1; } function CL(r, e) { var t = r.getRect(); return [t[T9[e]], t[T9[e]] + t[m4e[e]]]; } const w4e = y4e; var x4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "single", e; }(Gn); function C4e(r) { bt(Zw), yv.registerAxisPointerClass("SingleAxisPointer", w4e), r.registerComponentView(x4e), r.registerComponentView(c4e), r.registerComponentModel(xL), km(r, "single", xL, xL.defaultOption), r.registerCoordinateSystem("single", g4e); } var S4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t, n, i) { var a = Py(t); r.prototype.init.apply(this, arguments), P9(t, a); }, e.prototype.mergeOption = function(t) { r.prototype.mergeOption.apply(this, arguments), P9(this.option, t); }, e.prototype.getCellSize = function() { return this.option.cellSize; }, e.type = "calendar", e.defaultOption = { z: 2, left: 80, top: 60, cellSize: 20, orient: "horizontal", splitLine: { show: !0, lineStyle: { color: "#000", width: 1, type: "solid" } }, itemStyle: { color: "#fff", borderWidth: 1, borderColor: "#ccc" }, dayLabel: { show: !0, firstDay: 0, position: "start", margin: "50%", color: "#000" }, monthLabel: { show: !0, position: "start", margin: 5, align: "center", formatter: null, color: "#000" }, yearLabel: { show: !0, position: null, margin: 30, formatter: null, color: "#ccc", fontFamily: "sans-serif", fontWeight: "bolder", fontSize: 20 } }, e; }(Rt); function P9(r, e) { var t = r.cellSize, n; le(t) ? n = t : n = r.cellSize = [t, t], n.length === 1 && (n[1] = n[0]); var i = ce([0, 1], function(a) { return DAe(e, a) && (n[a] = "auto"), n[a] != null && n[a] !== "auto"; }); Nh(r, e, { type: "box", ignoreSize: i }); } const E4e = S4e; var b4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { var a = this.group; a.removeAll(); var o = t.coordinateSystem, s = o.getRangeInfo(), u = o.getOrient(), l = n.getLocaleModel(); this._renderDayRect(t, s, a), this._renderLines(t, s, u, a), this._renderYearText(t, s, u, a), this._renderMonthText(t, l, u, a), this._renderWeekText(t, l, s, u, a); }, e.prototype._renderDayRect = function(t, n, i) { for (var a = t.coordinateSystem, o = t.getModel("itemStyle").getItemStyle(), s = a.getCellWidth(), u = a.getCellHeight(), l = n.start.time; l <= n.end.time; l = a.getNextNDay(l, 1).time) { var c = a.dataToRect([l], !1).tl, f = new Vt({ shape: { x: c[0], y: c[1], width: s, height: u }, cursor: "default", style: o }); i.add(f); } }, e.prototype._renderLines = function(t, n, i, a) { var o = this, s = t.coordinateSystem, u = t.getModel(["splitLine", "lineStyle"]).getLineStyle(), l = t.get(["splitLine", "show"]), c = u.lineWidth; this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = []; for (var f = n.start, h = 0; f.time <= n.end.time; h++) { d(f.formatedDate), h === 0 && (f = s.getDateInfo(n.start.y + "-" + n.start.m)); var p = f.date; p.setMonth(p.getMonth() + 1), f = s.getDateInfo(p); } d(s.getNextNDay(n.end.time, 1).formatedDate); function d(v) { o._firstDayOfMonth.push(s.getDateInfo(v)), o._firstDayPoints.push(s.dataToRect([v], !1).tl); var g = o._getLinePointsOfOneWeek(t, v, i); o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), l && o._drawSplitline(g, u, a); } l && this._drawSplitline(o._getEdgesPoints(o._tlpoints, c, i), u, a), l && this._drawSplitline(o._getEdgesPoints(o._blpoints, c, i), u, a); }, e.prototype._getEdgesPoints = function(t, n, i) { var a = [t[0].slice(), t[t.length - 1].slice()], o = i === "horizontal" ? 0 : 1; return a[0][o] = a[0][o] - n / 2, a[1][o] = a[1][o] + n / 2, a; }, e.prototype._drawSplitline = function(t, n, i) { var a = new jo({ z2: 20, shape: { points: t }, style: n }); i.add(a); }, e.prototype._getLinePointsOfOneWeek = function(t, n, i) { for (var a = t.coordinateSystem, o = a.getDateInfo(n), s = [], u = 0; u < 7; u++) { var l = a.getNextNDay(o.time, u), c = a.dataToRect([l.time], !1); s[2 * l.day] = c.tl, s[2 * l.day + 1] = c[i === "horizontal" ? "bl" : "tr"]; } return s; }, e.prototype._formatterLabel = function(t, n) { return Se(t) && t ? IAe(t, n) : ze(t) ? t(n) : n.nameMap; }, e.prototype._yearTextPositionControl = function(t, n, i, a, o) { var s = n[0], u = n[1], l = ["center", "bottom"]; a === "bottom" ? (u += o, l = ["center", "top"]) : a === "left" ? s -= o : a === "right" ? (s += o, l = ["center", "top"]) : u -= o; var c = 0; return (a === "left" || a === "right") && (c = Math.PI / 2), { rotation: c, x: s, y: u, style: { align: l[0], verticalAlign: l[1] } }; }, e.prototype._renderYearText = function(t, n, i, a) { var o = t.getModel("yearLabel"); if (!!o.get("show")) { var s = o.get("margin"), u = o.get("position"); u || (u = i !== "horizontal" ? "top" : "left"); var l = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], c = (l[0][0] + l[1][0]) / 2, f = (l[0][1] + l[1][1]) / 2, h = i === "horizontal" ? 0 : 1, p = { top: [c, l[h][1]], bottom: [c, l[1 - h][1]], left: [l[1 - h][0], f], right: [l[h][0], f] }, d = n.start.y; +n.end.y > +n.start.y && (d = d + "-" + n.end.y); var v = o.get("formatter"), g = { start: n.start.y, end: n.end.y, nameMap: d }, m = this._formatterLabel(v, g), y = new Yt({ z2: 30, style: Sn(o, { text: m }) }); y.attr(this._yearTextPositionControl(y, p[u], i, u, s)), a.add(y); } }, e.prototype._monthTextPositionControl = function(t, n, i, a, o) { var s = "left", u = "top", l = t[0], c = t[1]; return i === "horizontal" ? (c = c + o, n && (s = "center"), a === "start" && (u = "bottom")) : (l = l + o, n && (u = "middle"), a === "start" && (s = "right")), { x: l, y: c, align: s, verticalAlign: u }; }, e.prototype._renderMonthText = function(t, n, i, a) { var o = t.getModel("monthLabel"); if (!!o.get("show")) { var s = o.get("nameMap"), u = o.get("margin"), l = o.get("position"), c = o.get("align"), f = [this._tlpoints, this._blpoints]; (!s || Se(s)) && (s && (n = jM(s) || n), s = n.get(["time", "monthAbbr"]) || []); var h = l === "start" ? 0 : 1, p = i === "horizontal" ? 0 : 1; u = l === "start" ? -u : u; for (var d = c === "center", v = 0; v < f[h].length - 1; v++) { var g = f[h][v].slice(), m = this._firstDayOfMonth[v]; if (d) { var y = this._firstDayPoints[v]; g[p] = (y[p] + f[0][v + 1][p]) / 2; } var _ = o.get("formatter"), w = s[+m.m - 1], x = { yyyy: m.y, yy: (m.y + "").slice(2), MM: m.m, M: +m.m, nameMap: w }, C = this._formatterLabel(_, x), S = new Yt({ z2: 30, style: oe(Sn(o, { text: C }), this._monthTextPositionControl(g, d, i, l, u)) }); a.add(S); } } }, e.prototype._weekTextPositionControl = function(t, n, i, a, o) { var s = "center", u = "middle", l = t[0], c = t[1], f = i === "start"; return n === "horizontal" ? (l = l + a + (f ? 1 : -1) * o[0] / 2, s = f ? "right" : "left") : (c = c + a + (f ? 1 : -1) * o[1] / 2, u = f ? "bottom" : "top"), { x: l, y: c, align: s, verticalAlign: u }; }, e.prototype._renderWeekText = function(t, n, i, a, o) { var s = t.getModel("dayLabel"); if (!!s.get("show")) { var u = t.coordinateSystem, l = s.get("position"), c = s.get("nameMap"), f = s.get("margin"), h = u.getFirstDayOfWeek(); if (!c || Se(c)) { c && (n = jM(c) || n); var p = n.get(["time", "dayOfWeekShort"]); c = p || ce(n.get(["time", "dayOfWeekAbbr"]), function(x) { return x[0]; }); } var d = u.getNextNDay(i.end.time, 7 - i.lweek).time, v = [u.getCellWidth(), u.getCellHeight()]; f = ye(f, Math.min(v[1], v[0])), l === "start" && (d = u.getNextNDay(i.start.time, -(7 + i.fweek)).time, f = -f); for (var g = 0; g < 7; g++) { var m = u.getNextNDay(d, g), y = u.dataToRect([m.time], !1).center, _ = g; _ = Math.abs((g + h) % 7); var w = new Yt({ z2: 30, style: oe(Sn(s, { text: c[_] }), this._weekTextPositionControl(y, a, l, f, v)) }); o.add(w); } } }, e.type = "calendar", e; }(Gn); const T4e = b4e; var SL = 864e5, P4e = function() { function r(e, t, n) { this.type = "calendar", this.dimensions = r.dimensions, this.getDimensionsInfo = r.getDimensionsInfo, this._model = e; } return r.getDimensionsInfo = function() { return [{ name: "time", type: "time" }, "value"]; }, r.prototype.getRangeInfo = function() { return this._rangeInfo; }, r.prototype.getModel = function() { return this._model; }, r.prototype.getRect = function() { return this._rect; }, r.prototype.getCellWidth = function() { return this._sw; }, r.prototype.getCellHeight = function() { return this._sh; }, r.prototype.getOrient = function() { return this._orient; }, r.prototype.getFirstDayOfWeek = function() { return this._firstDayOfWeek; }, r.prototype.getDateInfo = function(e) { e = ec(e); var t = e.getFullYear(), n = e.getMonth() + 1, i = n < 10 ? "0" + n : "" + n, a = e.getDate(), o = a < 10 ? "0" + a : "" + a, s = e.getDay(); return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), { y: t + "", m: i, d: o, day: s, time: e.getTime(), formatedDate: t + "-" + i + "-" + o, date: e }; }, r.prototype.getNextNDay = function(e, t) { return t = t || 0, t === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + t), this.getDateInfo(e)); }, r.prototype.update = function(e, t) { this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption()); var n = this._rangeInfo.weeks || 1, i = ["width", "height"], a = this._model.getCellSize().slice(), o = this._model.getBoxLayoutParams(), s = this._orient === "horizontal" ? [n, 7] : [7, n]; M([0, 1], function(f) { c(a, f) && (o[i[f]] = a[f] * s[f]); }); var u = { width: t.getWidth(), height: t.getHeight() }, l = this._rect = Bi(o, u); M([0, 1], function(f) { c(a, f) || (a[f] = l[i[f]] / s[f]); }); function c(f, h) { return f[h] != null && f[h] !== "auto"; } this._sw = a[0], this._sh = a[1]; }, r.prototype.dataToPoint = function(e, t) { le(e) && (e = e[0]), t == null && (t = !0); var n = this.getDateInfo(e), i = this._rangeInfo, a = n.formatedDate; if (t && !(n.time >= i.start.time && n.time < i.end.time + SL)) return [NaN, NaN]; var o = n.day, s = this._getRangeInfo([i.start.time, a]).nthWeek; return this._orient === "vertical" ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + s * this._sh + this._sh / 2] : [this._rect.x + s * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2]; }, r.prototype.pointToData = function(e) { var t = this.pointToDate(e); return t && t.time; }, r.prototype.dataToRect = function(e, t) { var n = this.dataToPoint(e, t); return { contentShape: { x: n[0] - (this._sw - this._lineWidth) / 2, y: n[1] - (this._sh - this._lineWidth) / 2, width: this._sw - this._lineWidth, height: this._sh - this._lineWidth }, center: n, tl: [n[0] - this._sw / 2, n[1] - this._sh / 2], tr: [n[0] + this._sw / 2, n[1] - this._sh / 2], br: [n[0] + this._sw / 2, n[1] + this._sh / 2], bl: [n[0] - this._sw / 2, n[1] + this._sh / 2] }; }, r.prototype.pointToDate = function(e) { var t = Math.floor((e[0] - this._rect.x) / this._sw) + 1, n = Math.floor((e[1] - this._rect.y) / this._sh) + 1, i = this._rangeInfo.range; return this._orient === "vertical" ? this._getDateByWeeksAndDay(n, t - 1, i) : this._getDateByWeeksAndDay(t, n - 1, i); }, r.prototype.convertToPixel = function(e, t, n) { var i = I9(t); return i === this ? i.dataToPoint(n) : null; }, r.prototype.convertFromPixel = function(e, t, n) { var i = I9(t); return i === this ? i.pointToData(n) : null; }, r.prototype.containPoint = function(e) { return console.warn("Not implemented."), !1; }, r.prototype._initRangeOption = function() { var e = this._model.get("range"), t; if (le(e) && e.length === 1 && (e = e[0]), le(e)) t = e; else { var n = e.toString(); if (/^\d{4}$/.test(n) && (t = [n + "-01-01", n + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(n)) { var i = this.getDateInfo(n), a = i.date; a.setMonth(a.getMonth() + 1); var o = this.getNextNDay(a, -1); t = [i.formatedDate, o.formatedDate]; } /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n) && (t = [n, n]); } if (!t) return process.env.NODE_ENV !== "production" && zu("Invalid date range."), e; var s = this._getRangeInfo(t); return s.start.time > s.end.time && t.reverse(), t; }, r.prototype._getRangeInfo = function(e) { var t = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], n; t[0].time > t[1].time && (n = !0, t.reverse()); var i = Math.floor(t[1].time / SL) - Math.floor(t[0].time / SL) + 1, a = new Date(t[0].time), o = a.getDate(), s = t[1].date.getDate(); a.setDate(o + i - 1); var u = a.getDate(); if (u !== s) for (var l = a.getTime() - t[1].time > 0 ? 1 : -1; (u = a.getDate()) !== s && (a.getTime() - t[1].time) * l > 0; ) i -= l, a.setDate(u - l); var c = Math.floor((i + t[0].day + 6) / 7), f = n ? -c + 1 : c - 1; return n && t.reverse(), { range: [t[0].formatedDate, t[1].formatedDate], start: t[0], end: t[1], allDay: i, weeks: c, nthWeek: f, fweek: t[0].day, lweek: t[1].day }; }, r.prototype._getDateByWeeksAndDay = function(e, t, n) { var i = this._getRangeInfo(n); if (e > i.weeks || e === 0 && t < i.fweek || e === i.weeks && t > i.lweek) return null; var a = (e - 1) * 7 - i.fweek + t, o = new Date(i.start.time); return o.setDate(+i.start.d + a), this.getDateInfo(o); }, r.create = function(e, t) { var n = []; return e.eachComponent("calendar", function(i) { var a = new r(i); n.push(a), i.coordinateSystem = a; }), e.eachSeries(function(i) { i.get("coordinateSystem") === "calendar" && (i.coordinateSystem = n[i.get("calendarIndex") || 0]); }), n; }, r.dimensions = ["time", "value"], r; }(); function I9(r) { var e = r.calendarModel, t = r.seriesModel, n = e ? e.coordinateSystem : t ? t.coordinateSystem : null; return n; } const I4e = P4e; function A4e(r) { r.registerComponentModel(E4e), r.registerComponentView(T4e), r.registerCoordinateSystem("calendar", I4e); } function L4e(r, e) { var t = r.existing; if (e.id = r.keyInfo.id, !e.type && t && (e.type = t.type), e.parentId == null) { var n = e.parentOption; n ? e.parentId = n.id : t && (e.parentId = t.parentId); } e.parentOption = null; } function A9(r, e) { var t; return M(e, function(n) { r[n] != null && r[n] !== "auto" && (t = !0); }), t; } function D4e(r, e, t) { var n = oe({}, t), i = r[e], a = t.$action || "merge"; if (a === "merge") if (i) { if (process.env.NODE_ENV !== "production") { var o = t.type; Ze(!o || i.type === o, 'Please set $action: "replace" to change `type`'); } dt(i, n, !0), Nh(i, n, { ignoreSize: !0 }), GZ(t, i), IC(t, i), IC(t, i, "shape"), IC(t, i, "style"), IC(t, i, "extra"), t.clipPath = i.clipPath; } else r[e] = n; else a === "replace" ? r[e] = n : a === "remove" && i && (r[e] = null); } var rte = ["transition", "enterFrom", "leaveTo"], M4e = rte.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]); function IC(r, e, t) { if (t && (!r[t] && e[t] && (r[t] = {}), r = r[t], e = e[t]), !(!r || !e)) for (var n = t ? rte : M4e, i = 0; i < n.length; i++) { var a = n[i]; r[a] == null && e[a] != null && (r[a] = e[a]); } } function O4e(r, e) { if (!!r && (r.hv = e.hv = [ A9(e, ["left", "right"]), A9(e, ["top", "bottom"]) ], r.type === "group")) { var t = r, n = e; t.width == null && (t.width = n.width = 0), t.height == null && (t.height = n.height = 0); } } var R4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.preventAutoZ = !0, t; } return e.prototype.mergeOption = function(t, n) { var i = this.option.elements; this.option.elements = null, r.prototype.mergeOption.call(this, t, n), this.option.elements = i; }, e.prototype.optionUpdated = function(t, n) { var i = this.option, a = (n ? i : t).elements, o = i.elements = n ? [] : i.elements, s = []; this._flatten(a, s, null); var u = xq(o, s, "normalMerge"), l = this._elOptionsToUpdate = []; M(u, function(c, f) { var h = c.newOption; process.env.NODE_ENV !== "production" && Ze(Xe(h) || c.existing, "Empty graphic option definition"), h && (l.push(h), L4e(c, h), D4e(o, f, h), O4e(o[f], h)); }, this), i.elements = Wr(o, function(c) { return c && delete c.$action, c != null; }); }, e.prototype._flatten = function(t, n, i) { M(t, function(a) { if (!!a) { i && (a.parentOption = i), n.push(a); var o = a.children; o && o.length && this._flatten(o, n, a), delete a.children; } }, this); }, e.prototype.useElOptionsToUpdate = function() { var t = this._elOptionsToUpdate; return this._elOptionsToUpdate = null, t; }, e.type = "graphic", e.defaultOption = { elements: [] }, e; }(Rt), L9 = { path: null, compoundPath: null, group: rt, image: Ba, text: Yt }, Ws = Ut(), N4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function() { this._elMap = $e(); }, e.prototype.render = function(t, n, i) { t !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = t, this._updateElements(t), this._relocate(t, i); }, e.prototype._updateElements = function(t) { var n = t.useElOptionsToUpdate(); if (!!n) { var i = this._elMap, a = this.group, o = t.get("z"), s = t.get("zlevel"); M(n, function(u) { var l = Li(u.id, null), c = l != null ? i.get(l) : null, f = Li(u.parentId, null), h = f != null ? i.get(f) : a, p = u.type, d = u.style; p === "text" && d && u.hv && u.hv[1] && (d.textVerticalAlign = d.textBaseline = d.verticalAlign = d.align = null); var v = u.textContent, g = u.textConfig; if (d && Ree(d, p, !!g, !!v)) { var m = Nee(d, p, !0); !g && m.textConfig && (g = u.textConfig = m.textConfig), !v && m.textContent && (v = m.textContent); } var y = F4e(u); process.env.NODE_ENV !== "production" && c && Ze(h === c.parent, "Changing parent is not supported."); var _ = u.$action || "merge", w = _ === "merge", x = _ === "replace"; if (w) { var C = !c, S = c; C ? S = D9(l, h, u.type, i) : (S && (Ws(S).isNew = !1), Gee(S)), S && (mS(S, y, t, { isInit: C }), M9(S, u, o, s)); } else if (x) { _S(c, u, i, t); var b = D9(l, h, u.type, i); b && (mS(b, y, t, { isInit: !0 }), M9(b, u, o, s)); } else _ === "remove" && (Bee(c, u), _S(c, u, i, t)); var E = i.get(l); if (E && v) if (w) { var T = E.getTextContent(); T ? T.attr(v) : E.setTextContent(new Yt(v)); } else x && E.setTextContent(new Yt(v)); if (E) { var P = u.clipPath; if (P) { var I = P.type, A = void 0, C = !1; if (w) { var L = E.getClipPath(); C = !L || Ws(L).type !== I, A = C ? B2(I) : L; } else x && (C = !0, A = B2(I)); E.setClipPath(A), mS(A, P, t, { isInit: C }), WE(A, P.keyframeAnimation, t); } var D = Ws(E); E.setTextConfig(g), D.option = u, B4e(E, t, u), Sy({ el: E, componentModel: t, itemName: E.name, itemTooltipOption: u.tooltip }), WE(E, u.keyframeAnimation, t); } }); } }, e.prototype._relocate = function(t, n) { for (var i = t.option.elements, a = this.group, o = this._elMap, s = n.getWidth(), u = n.getHeight(), l = ["x", "y"], c = 0; c < i.length; c++) { var f = i[c], h = Li(f.id, null), p = h != null ? o.get(h) : null; if (!(!p || !p.isGroup)) { var d = p.parent, v = d === a, g = Ws(p), m = Ws(d); g.width = ye(g.option.width, v ? s : m.width) || 0, g.height = ye(g.option.height, v ? u : m.height) || 0; } } for (var c = i.length - 1; c >= 0; c--) { var f = i[c], h = Li(f.id, null), p = h != null ? o.get(h) : null; if (!!p) { var d = p.parent, m = Ws(d), y = d === a ? { width: s, height: u } : { width: m.width, height: m.height }, _ = {}, w = QT(p, f, y, null, { hv: f.hv, boundingMode: f.bounding }, _); if (!Ws(p).isNew && w) { for (var x = f.transition, C = {}, S = 0; S < l.length; S++) { var b = l[S], E = _[b]; x && (sd(x) || _t(x, b) >= 0) ? C[b] = E : p[b] = E; } Ht(p, C, t, 0); } else p.attr(_); } } }, e.prototype._clear = function() { var t = this, n = this._elMap; n.each(function(i) { _S(i, Ws(i).option, n, t._lastGraphicModel); }), this._elMap = $e(); }, e.prototype.dispose = function() { this._clear(); }, e.type = "graphic", e; }(Gn); function B2(r) { process.env.NODE_ENV !== "production" && Ze(r, "graphic type MUST be set"); var e = Te(L9, r) ? L9[r] : nF(r); process.env.NODE_ENV !== "production" && Ze(e, "graphic type " + r + " can not be found"); var t = new e({}); return Ws(t).type = r, t; } function D9(r, e, t, n) { var i = B2(t); return e.add(i), n.set(r, i), Ws(i).id = r, Ws(i).isNew = !0, i; } function _S(r, e, t, n) { var i = r && r.parent; i && (r.type === "group" && r.traverse(function(a) { _S(a, e, t, n); }), vP(r, e, n), t.removeKey(Ws(r).id)); } function M9(r, e, t, n) { r.isGroup || M([ ["cursor", vu.prototype.cursor], ["zlevel", n || 0], ["z", t || 0], ["z2", 0] ], function(i) { var a = i[0]; Te(e, a) ? r[a] = wt(e[a], i[1]) : r[a] == null && (r[a] = i[1]); }), M(At(e), function(i) { if (i.indexOf("on") === 0) { var a = e[i]; r[i] = ze(a) ? a : null; } }), Te(e, "draggable") && (r.draggable = e.draggable), e.name != null && (r.name = e.name), e.id != null && (r.id = e.id); } function F4e(r) { return r = oe({}, r), M(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(VZ), function(e) { delete r[e]; }), r; } function B4e(r, e, t) { var n = nt(r).eventData; !r.silent && !r.ignore && !n && (n = nt(r).eventData = { componentType: "graphic", componentIndex: e.componentIndex, name: r.name }), n && (n.info = t.info); } function k4e(r) { r.registerComponentModel(R4e), r.registerComponentView(N4e), r.registerPreprocessor(function(e) { var t = e.graphic; le(t) ? !t[0] || !t[0].elements ? e.graphic = [{ elements: t }] : e.graphic = [e.graphic[0]] : t && !t.elements && (e.graphic = [{ elements: [t] }]); }); } var O9 = ["x", "y", "radius", "angle", "single"], V4e = ["cartesian2d", "polar", "singleAxis"]; function G4e(r) { var e = r.get("coordinateSystem"); return _t(V4e, e) >= 0; } function ih(r) { return process.env.NODE_ENV !== "production" && Ze(r), r + "Axis"; } function z4e(r, e) { var t = $e(), n = [], i = $e(); r.eachComponent({ mainType: "dataZoom", query: e }, function(c) { i.get(c.uid) || s(c); }); var a; do a = !1, r.eachComponent("dataZoom", o); while (a); function o(c) { !i.get(c.uid) && u(c) && (s(c), a = !0); } function s(c) { i.set(c.uid, !0), n.push(c), l(c); } function u(c) { var f = !1; return c.eachTargetAxis(function(h, p) { var d = t.get(h); d && d[p] && (f = !0); }), f; } function l(c) { c.eachTargetAxis(function(f, h) { (t.get(f) || t.set(f, []))[h] = !0; }); } return n; } function nte(r) { var e = r.ecModel, t = { infoList: [], infoMap: $e() }; return r.eachTargetAxis(function(n, i) { var a = e.getComponent(ih(n), i); if (!!a) { var o = a.getCoordSysModel(); if (!!o) { var s = o.uid, u = t.infoMap.get(s); u || (u = { model: o, axisModels: [] }, t.infoList.push(u), t.infoMap.set(s, u)), u.axisModels.push(a); } } }), t; } var EL = function() { function r() { this.indexList = [], this.indexMap = []; } return r.prototype.add = function(e) { this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0); }, r; }(), $4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._autoThrottle = !0, t._noTarget = !0, t._rangePropMode = ["percent", "percent"], t; } return e.prototype.init = function(t, n, i) { var a = R9(t); this.settledOption = a, this.mergeDefaultAndTheme(t, i), this._doInit(a); }, e.prototype.mergeOption = function(t) { var n = R9(t); dt(this.option, t, !0), dt(this.settledOption, n, !0), this._doInit(n); }, e.prototype._doInit = function(t) { var n = this.option; this._setDefaultThrottle(t), this._updateRangeUse(t); var i = this.settledOption; M([["start", "startValue"], ["end", "endValue"]], function(a, o) { this._rangePropMode[o] === "value" && (n[a[0]] = i[a[0]] = null); }, this), this._resetTarget(); }, e.prototype._resetTarget = function() { var t = this.get("orient", !0), n = this._targetAxisInfoMap = $e(), i = this._fillSpecifiedTargetAxis(n); i ? this._orient = t || this._makeAutoOrientByTargetAxis() : (this._orient = t || "horizontal", this._fillAutoTargetAxisByOrient(n, this._orient)), this._noTarget = !0, n.each(function(a) { a.indexList.length && (this._noTarget = !1); }, this); }, e.prototype._fillSpecifiedTargetAxis = function(t) { var n = !1; return M(O9, function(i) { var a = this.getReferringComponents(ih(i), aPe); if (!!a.specified) { n = !0; var o = new EL(); M(a.models, function(s) { o.add(s.componentIndex); }), t.set(i, o); } }, this), n; }, e.prototype._fillAutoTargetAxisByOrient = function(t, n) { var i = this.ecModel, a = !0; if (a) { var o = n === "vertical" ? "y" : "x", s = i.findComponents({ mainType: o + "Axis" }); u(s, o); } if (a) { var s = i.findComponents({ mainType: "singleAxis", filter: function(c) { return c.get("orient", !0) === n; } }); u(s, "single"); } function u(l, c) { var f = l[0]; if (!!f) { var h = new EL(); if (h.add(f.componentIndex), t.set(c, h), a = !1, c === "x" || c === "y") { var p = f.getReferringComponents("grid", ui).models[0]; p && M(l, function(d) { f.componentIndex !== d.componentIndex && p === d.getReferringComponents("grid", ui).models[0] && h.add(d.componentIndex); }); } } } a && M(O9, function(l) { if (!!a) { var c = i.findComponents({ mainType: ih(l), filter: function(h) { return h.get("type", !0) === "category"; } }); if (c[0]) { var f = new EL(); f.add(c[0].componentIndex), t.set(l, f), a = !1; } } }, this); }, e.prototype._makeAutoOrientByTargetAxis = function() { var t; return this.eachTargetAxis(function(n) { !t && (t = n); }, this), t === "y" ? "vertical" : "horizontal"; }, e.prototype._setDefaultThrottle = function(t) { if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) { var n = this.ecModel.option; this.option.throttle = n.animation && n.animationDurationUpdate > 0 ? 100 : 20; } }, e.prototype._updateRangeUse = function(t) { var n = this._rangePropMode, i = this.get("rangeMode"); M([["start", "startValue"], ["end", "endValue"]], function(a, o) { var s = t[a[0]] != null, u = t[a[1]] != null; s && !u ? n[o] = "percent" : !s && u ? n[o] = "value" : i ? n[o] = i[o] : s && (n[o] = "percent"); }); }, e.prototype.noTarget = function() { return this._noTarget; }, e.prototype.getFirstTargetAxisModel = function() { var t; return this.eachTargetAxis(function(n, i) { t == null && (t = this.ecModel.getComponent(ih(n), i)); }, this), t; }, e.prototype.eachTargetAxis = function(t, n) { this._targetAxisInfoMap.each(function(i, a) { M(i.indexList, function(o) { t.call(n, a, o); }); }); }, e.prototype.getAxisProxy = function(t, n) { var i = this.getAxisModel(t, n); if (i) return i.__dzAxisProxy; }, e.prototype.getAxisModel = function(t, n) { process.env.NODE_ENV !== "production" && Ze(t && n != null); var i = this._targetAxisInfoMap.get(t); if (i && i.indexMap[n]) return this.ecModel.getComponent(ih(t), n); }, e.prototype.setRawRange = function(t) { var n = this.option, i = this.settledOption; M([["start", "startValue"], ["end", "endValue"]], function(a) { (t[a[0]] != null || t[a[1]] != null) && (n[a[0]] = i[a[0]] = t[a[0]], n[a[1]] = i[a[1]] = t[a[1]]); }, this), this._updateRangeUse(t); }, e.prototype.setCalculatedRange = function(t) { var n = this.option; M(["start", "startValue", "end", "endValue"], function(i) { n[i] = t[i]; }); }, e.prototype.getPercentRange = function() { var t = this.findRepresentativeAxisProxy(); if (t) return t.getDataPercentWindow(); }, e.prototype.getValueRange = function(t, n) { if (t == null && n == null) { var i = this.findRepresentativeAxisProxy(); if (i) return i.getDataValueWindow(); } else return this.getAxisProxy(t, n).getDataValueWindow(); }, e.prototype.findRepresentativeAxisProxy = function(t) { if (t) return t.__dzAxisProxy; for (var n, i = this._targetAxisInfoMap.keys(), a = 0; a < i.length; a++) for (var o = i[a], s = this._targetAxisInfoMap.get(o), u = 0; u < s.indexList.length; u++) { var l = this.getAxisProxy(o, s.indexList[u]); if (l.hostedBy(this)) return l; n || (n = l); } return n; }, e.prototype.getRangePropMode = function() { return this._rangePropMode.slice(); }, e.prototype.getOrient = function() { return process.env.NODE_ENV !== "production" && Ze(this._orient), this._orient; }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = { z: 4, filterMode: "filter", start: 0, end: 100 }, e; }(Rt); function R9(r) { var e = {}; return M(["start", "end", "startValue", "endValue", "throttle"], function(t) { r.hasOwnProperty(t) && (e[t] = r[t]); }), e; } const O1 = $4e; var H4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "dataZoom.select", e; }(O1); const U4e = H4e; var W4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i, a) { this.dataZoomModel = t, this.ecModel = n, this.api = i; }, e.type = "dataZoom", e; }(Gn); const S5 = W4e; var j4e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "dataZoom.select", e; }(S5); const Y4e = j4e; var yg = M, N9 = Js, X4e = function() { function r(e, t, n, i) { this._dimName = e, this._axisIndex = t, this.ecModel = i, this._dataZoomModel = n; } return r.prototype.hostedBy = function(e) { return this._dataZoomModel === e; }, r.prototype.getDataValueWindow = function() { return this._valueWindow.slice(); }, r.prototype.getDataPercentWindow = function() { return this._percentWindow.slice(); }, r.prototype.getTargetSeriesModels = function() { var e = []; return this.ecModel.eachSeries(function(t) { if (G4e(t)) { var n = ih(this._dimName), i = t.getReferringComponents(n, ui).models[0]; i && this._axisIndex === i.componentIndex && e.push(t); } }, this), e; }, r.prototype.getAxisModel = function() { return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex); }, r.prototype.getMinMaxSpan = function() { return Qe(this._minMaxSpan); }, r.prototype.calculateDataWindow = function(e) { var t = this._dataExtent, n = this.getAxisModel(), i = n.axis.scale, a = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], u = [], l; yg(["start", "end"], function(h, p) { var d = e[h], v = e[h + "Value"]; a[p] === "percent" ? (d == null && (d = o[p]), v = i.parse(Fr(d, o, t))) : (l = !0, v = v == null ? t[p] : i.parse(v), d = Fr(v, t, o)), u[p] = v, s[p] = d; }), N9(u), N9(s); var c = this._minMaxSpan; l ? f(u, s, t, o, !1) : f(s, u, o, t, !0); function f(h, p, d, v, g) { var m = g ? "Span" : "ValueSpan"; _v(0, h, d, "all", c["min" + m], c["max" + m]); for (var y = 0; y < 2; y++) p[y] = Fr(h[y], d, v, !0), g && (p[y] = i.parse(p[y])); } return { valueWindow: u, percentWindow: s }; }, r.prototype.reset = function(e) { if (e === this._dataZoomModel) { var t = this.getTargetSeriesModels(); this._dataExtent = q4e(this, this._dimName, t), this._updateMinMaxSpan(); var n = this.calculateDataWindow(e.settledOption); this._valueWindow = n.valueWindow, this._percentWindow = n.percentWindow, this._setAxisModel(); } }, r.prototype.filterData = function(e, t) { if (e !== this._dataZoomModel) return; var n = this._dimName, i = this.getTargetSeriesModels(), a = e.get("filterMode"), o = this._valueWindow; if (a === "none") return; yg(i, function(u) { var l = u.getData(), c = l.mapDimensionsAll(n); if (!!c.length) { if (a === "weakFilter") { var f = l.getStore(), h = ce(c, function(p) { return l.getDimensionIndex(p); }, l); l.filterSelf(function(p) { for (var d, v, g, m = 0; m < c.length; m++) { var y = f.get(h[m], p), _ = !isNaN(y), w = y < o[0], x = y > o[1]; if (_ && !w && !x) return !0; _ && (g = !0), w && (d = !0), x && (v = !0); } return g && d && v; }); } else yg(c, function(p) { if (a === "empty") u.setData(l = l.map(p, function(v) { return s(v) ? v : NaN; })); else { var d = {}; d[p] = o, l.selectRange(d); } }); yg(c, function(p) { l.setApproximateExtent(o, p); }); } }); function s(u) { return u >= o[0] && u <= o[1]; } }, r.prototype._updateMinMaxSpan = function() { var e = this._minMaxSpan = {}, t = this._dataZoomModel, n = this._dataExtent; yg(["min", "max"], function(i) { var a = t.get(i + "Span"), o = t.get(i + "ValueSpan"); o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? a = Fr(n[0] + o, n, [0, 100], !0) : a != null && (o = Fr(a, [0, 100], n, !0) - n[0]), e[i + "Span"] = a, e[i + "ValueSpan"] = o; }, this); }, r.prototype._setAxisModel = function() { var e = this.getAxisModel(), t = this._percentWindow, n = this._valueWindow; if (!!t) { var i = dq(n, [0, 500]); i = Math.min(i, 20); var a = e.axis.scale.rawExtentInfo; t[0] !== 0 && a.setDeterminedMinMax("min", +n[0].toFixed(i)), t[1] !== 100 && a.setDeterminedMinMax("max", +n[1].toFixed(i)), a.freeze(); } }, r; }(); function q4e(r, e, t) { var n = [1 / 0, -1 / 0]; yg(t, function(o) { x2e(n, o.getData(), e); }); var i = r.getAxisModel(), a = wJ(i.axis.scale, i, n).calculate(); return [a.min, a.max]; } const Z4e = X4e; var K4e = { getTargetSeries: function(r) { function e(i) { r.eachComponent("dataZoom", function(a) { a.eachTargetAxis(function(o, s) { var u = r.getComponent(ih(o), s); i(o, s, u, a); }); }); } e(function(i, a, o, s) { o.__dzAxisProxy = null; }); var t = []; e(function(i, a, o, s) { o.__dzAxisProxy || (o.__dzAxisProxy = new Z4e(i, a, s, r), t.push(o.__dzAxisProxy)); }); var n = $e(); return M(t, function(i) { M(i.getTargetSeriesModels(), function(a) { n.set(a.uid, a); }); }), n; }, overallReset: function(r, e) { r.eachComponent("dataZoom", function(t) { t.eachTargetAxis(function(n, i) { t.getAxisProxy(n, i).reset(t); }), t.eachTargetAxis(function(n, i) { t.getAxisProxy(n, i).filterData(t, e); }); }), r.eachComponent("dataZoom", function(t) { var n = t.findRepresentativeAxisProxy(); if (n) { var i = n.getDataPercentWindow(), a = n.getDataValueWindow(); t.setCalculatedRange({ start: i[0], end: i[1], startValue: a[0], endValue: a[1] }); } }); } }; const J4e = K4e; function Q4e(r) { r.registerAction("dataZoom", function(e, t) { var n = z4e(t, e); M(n, function(i) { i.setRawRange({ start: e.start, end: e.end, startValue: e.startValue, endValue: e.endValue }); }); }); } var F9 = !1; function E5(r) { F9 || (F9 = !0, r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER, J4e), Q4e(r), r.registerSubTypeDefaulter("dataZoom", function() { return "slider"; })); } function eze(r) { r.registerComponentModel(U4e), r.registerComponentView(Y4e), E5(r); } var Xs = function() { function r() { } return r; }(), ite = {}; function _g(r, e) { ite[r] = e; } function ate(r) { return ite[r]; } var tze = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.optionUpdated = function() { r.prototype.optionUpdated.apply(this, arguments); var t = this.ecModel; M(this.option.feature, function(n, i) { var a = ate(i); a && (a.getDefaultOption && (a.defaultOption = a.getDefaultOption(t)), dt(n, a.defaultOption)); }); }, e.type = "toolbox", e.layoutMode = { type: "box", ignoreSize: !0 }, e.defaultOption = { show: !0, z: 6, orient: "horizontal", left: "right", top: "top", backgroundColor: "transparent", borderColor: "#ccc", borderRadius: 0, borderWidth: 0, padding: 5, itemSize: 15, itemGap: 8, showTitle: !0, iconStyle: { borderColor: "#666", color: "none" }, emphasis: { iconStyle: { borderColor: "#3E98C5" } }, tooltip: { show: !1, position: "bottom" } }, e; }(Rt); const rze = tze; function nze(r, e, t) { var n = e.getBoxLayoutParams(), i = e.get("padding"), a = { width: t.getWidth(), height: t.getHeight() }, o = Bi(n, a, i); id(e.get("orient"), r, e.get("itemGap"), o.width, o.height), QT(r, n, a, i); } function ote(r, e) { var t = Ty(e.get("padding")), n = e.getItemStyle(["color", "opacity"]); return n.fill = e.get("backgroundColor"), r = new Vt({ shape: { x: r.x - t[3], y: r.y - t[0], width: r.width + t[1] + t[3], height: r.height + t[0] + t[2], r: e.get("borderRadius") }, style: n, silent: !0, z2: -1 }), r; } var ize = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.render = function(t, n, i, a) { var o = this.group; if (o.removeAll(), !t.get("show")) return; var s = +t.get("itemSize"), u = t.get("orient") === "vertical", l = t.get("feature") || {}, c = this._features || (this._features = {}), f = []; M(l, function(d, v) { f.push(v); }), new sf(this._featureNames || [], f).add(h).update(h).remove(ut(h, null)).execute(), this._featureNames = f; function h(d, v) { var g = f[d], m = f[v], y = l[g], _ = new rn(y, t, t.ecModel), w; if (a && a.newTitle != null && a.featureName === g && (y.title = a.newTitle), g && !m) { if (aze(g)) w = { onclick: _.option.onclick, featureName: g }; else { var x = ate(g); if (!x) return; w = new x(); } c[g] = w; } else if (w = c[m], !w) return; w.uid = by("toolbox-feature"), w.model = _, w.ecModel = n, w.api = i; var C = w instanceof Xs; if (!g && m) { C && w.dispose && w.dispose(n, i); return; } if (!_.get("show") || C && w.unusable) { C && w.remove && w.remove(n, i); return; } p(_, w, g), _.setIconStatus = function(S, b) { var E = this.option, T = this.iconPaths; E.iconStatus = E.iconStatus || {}, E.iconStatus[S] = b, T[S] && (b === "emphasis" ? af : of)(T[S]); }, w instanceof Xs && w.render && w.render(_, n, i, a); } function p(d, v, g) { var m = d.getModel("iconStyle"), y = d.getModel(["emphasis", "iconStyle"]), _ = v instanceof Xs && v.getIcons ? v.getIcons() : d.get("icon"), w = d.get("title") || {}, x, C; Se(_) ? (x = {}, x[g] = _) : x = _, Se(w) ? (C = {}, C[g] = w) : C = w; var S = d.iconPaths = {}; M(x, function(b, E) { var T = Fw(b, {}, { x: -s / 2, y: -s / 2, width: s, height: s }); T.setStyle(m.getItemStyle()); var P = T.ensureState("emphasis"); P.style = y.getItemStyle(); var I = new Yt({ style: { text: C[E], align: y.get("textAlign"), borderRadius: y.get("textBorderRadius"), padding: y.get("textPadding"), fill: null }, ignore: !0 }); T.setTextContent(I), Sy({ el: T, componentModel: t, itemName: E, formatterParamsExtra: { title: C[E] } }), T.__title = C[E], T.on("mouseover", function() { var A = y.getItemStyle(), L = u ? t.get("right") == null && t.get("left") !== "right" ? "right" : "left" : t.get("bottom") == null && t.get("top") !== "bottom" ? "bottom" : "top"; I.setStyle({ fill: y.get("textFill") || A.fill || A.stroke || "#000", backgroundColor: y.get("textBackgroundColor") }), T.setTextConfig({ position: y.get("textPosition") || L }), I.ignore = !t.get("showTitle"), i.enterEmphasis(this); }).on("mouseout", function() { d.get(["iconStatus", E]) !== "emphasis" && i.leaveEmphasis(this), I.hide(); }), (d.get(["iconStatus", E]) === "emphasis" ? af : of)(T), o.add(T), T.on("click", Ae(v.onclick, v, n, i, E)), S[E] = T; }); } nze(o, t, i), o.add(ote(o.getBoundingRect(), t)), u || o.eachChild(function(d) { var v = d.__title, g = d.ensureState("emphasis"), m = g.textConfig || (g.textConfig = {}), y = d.getTextContent(), _ = y && y.ensureState("emphasis"); if (_ && !ze(_) && v) { var w = _.style || (_.style = {}), x = Mw(v, Yt.makeFont(w)), C = d.x + o.x, S = d.y + o.y + s, b = !1; S + x.height > i.getHeight() && (m.position = "top", b = !0); var E = b ? -5 - x.height : s + 10; C + x.width / 2 > i.getWidth() ? (m.position = ["100%", E], w.align = "right") : C - x.width / 2 < 0 && (m.position = [0, E], w.align = "left"); } }); }, e.prototype.updateView = function(t, n, i, a) { M(this._features, function(o) { o instanceof Xs && o.updateView && o.updateView(o.model, n, i, a); }); }, e.prototype.remove = function(t, n) { M(this._features, function(i) { i instanceof Xs && i.remove && i.remove(t, n); }), this.group.removeAll(); }, e.prototype.dispose = function(t, n) { M(this._features, function(i) { i instanceof Xs && i.dispose && i.dispose(t, n); }); }, e.type = "toolbox", e; }(Gn); function aze(r) { return r.indexOf("my") === 0; } const oze = ize; var sze = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.onclick = function(t, n) { var i = this.model, a = i.get("name") || t.get("title.0.text") || "echarts", o = n.getZr().painter.getType() === "svg", s = o ? "svg" : i.get("type", !0) || "png", u = n.getConnectedDataURL({ type: s, backgroundColor: i.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff", connectedBackgroundColor: i.get("connectedBackgroundColor"), excludeComponents: i.get("excludeComponents"), pixelRatio: i.get("pixelRatio") }), l = wr.browser; if (ze(MouseEvent) && (l.newEdge || !l.ie && !l.edge)) { var c = document.createElement("a"); c.download = a + "." + s, c.target = "_blank", c.href = u; var f = new MouseEvent("click", { view: document.defaultView, bubbles: !0, cancelable: !1 }); c.dispatchEvent(f); } else if (window.navigator.msSaveOrOpenBlob || o) { var h = u.split(","), p = h[0].indexOf("base64") > -1, d = o ? decodeURIComponent(h[1]) : h[1]; p && (d = window.atob(d)); var v = a + "." + s; if (window.navigator.msSaveOrOpenBlob) { for (var g = d.length, m = new Uint8Array(g); g--; ) m[g] = d.charCodeAt(g); var y = new Blob([m]); window.navigator.msSaveOrOpenBlob(y, v); } else { var _ = document.createElement("iframe"); document.body.appendChild(_); var w = _.contentWindow, x = w.document; x.open("image/svg+xml", "replace"), x.write(d), x.close(), w.focus(), x.execCommand("SaveAs", !0, v), document.body.removeChild(_); } } else { var C = i.get("lang"), S = '', b = window.open(); b.document.write(S), b.document.title = a; } }, e.getDefaultOption = function(t) { var n = { show: !0, icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0", title: t.getLocaleModel().get(["toolbox", "saveAsImage", "title"]), type: "png", connectedBackgroundColor: "#fff", name: "", excludeComponents: ["toolbox"], lang: t.getLocaleModel().get(["toolbox", "saveAsImage", "lang"]) }; return n; }, e; }(Xs); const uze = sze; var B9 = "__ec_magicType_stack__", lze = [["line", "bar"], ["stack"]], cze = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.getIcons = function() { var t = this.model, n = t.get("icon"), i = {}; return M(t.get("type"), function(a) { n[a] && (i[a] = n[a]); }), i; }, e.getDefaultOption = function(t) { var n = { show: !0, type: [], icon: { line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4", bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7", stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z" }, title: t.getLocaleModel().get(["toolbox", "magicType", "title"]), option: {}, seriesIndex: {} }; return n; }, e.prototype.onclick = function(t, n, i) { var a = this.model, o = a.get(["seriesIndex", i]); if (!!k9[i]) { var s = { series: [] }, u = function(f) { var h = f.subType, p = f.id, d = k9[i](h, p, f, a); d && (qe(d, f.option), s.series.push(d)); var v = f.coordinateSystem; if (v && v.type === "cartesian2d" && (i === "line" || i === "bar")) { var g = v.getAxesByScale("ordinal")[0]; if (g) { var m = g.dim, y = m + "Axis", _ = f.getReferringComponents(y, ui).models[0], w = _.componentIndex; s[y] = s[y] || []; for (var x = 0; x <= w; x++) s[y][w] = s[y][w] || {}; s[y][w].boundaryGap = i === "bar"; } } }; M(lze, function(f) { _t(f, i) >= 0 && M(f, function(h) { a.setIconStatus(h, "normal"); }); }), a.setIconStatus(i, "emphasis"), t.eachComponent({ mainType: "series", query: o == null ? null : { seriesIndex: o } }, u); var l, c = i; i === "stack" && (l = dt({ stack: a.option.title.tiled, tiled: a.option.title.stack }, a.option.title), a.get(["iconStatus", i]) !== "emphasis" && (c = "tiled")), n.dispatchAction({ type: "changeMagicType", currentType: c, newOption: s, newTitle: l, featureName: "magicType" }); } }, e; }(Xs), k9 = { line: function(r, e, t, n) { if (r === "bar") return dt({ id: e, type: "line", data: t.get("data"), stack: t.get("stack"), markPoint: t.get("markPoint"), markLine: t.get("markLine") }, n.get(["option", "line"]) || {}, !0); }, bar: function(r, e, t, n) { if (r === "line") return dt({ id: e, type: "bar", data: t.get("data"), stack: t.get("stack"), markPoint: t.get("markPoint"), markLine: t.get("markLine") }, n.get(["option", "bar"]) || {}, !0); }, stack: function(r, e, t, n) { var i = t.get("stack") === B9; if (r === "line" || r === "bar") return n.setIconStatus("stack", i ? "normal" : "emphasis"), dt({ id: e, stack: i ? "" : B9 }, n.get(["option", "stack"]) || {}, !0); } }; cc({ type: "changeMagicType", event: "magicTypeChanged", update: "prepareAndUpdate" }, function(r, e) { e.mergeOption(r.newOption); }); const fze = cze; var gP = new Array(60).join("-"), zm = " "; function hze(r) { var e = {}, t = [], n = []; return r.eachRawSeries(function(i) { var a = i.coordinateSystem; if (a && (a.type === "cartesian2d" || a.type === "polar")) { var o = a.getBaseAxis(); if (o.type === "category") { var s = o.dim + "_" + o.index; e[s] || (e[s] = { categoryAxis: o, valueAxis: a.getOtherAxis(o), series: [] }, n.push({ axisDim: o.dim, axisIndex: o.index })), e[s].series.push(i); } else t.push(i); } else t.push(i); }), { seriesGroupByCategoryAxis: e, other: t, meta: n }; } function pze(r) { var e = []; return M(r, function(t, n) { var i = t.categoryAxis, a = t.valueAxis, o = a.dim, s = [" "].concat(ce(t.series, function(p) { return p.name; })), u = [i.model.getCategories()]; M(t.series, function(p) { var d = p.getRawData(); u.push(p.getRawData().mapArray(d.mapDimension(o), function(v) { return v; })); }); for (var l = [s.join(zm)], c = 0; c < u[0].length; c++) { for (var f = [], h = 0; h < u.length; h++) f.push(u[h][c]); l.push(f.join(zm)); } e.push(l.join(` `)); }), e.join(` ` + gP + ` `); } function dze(r) { return ce(r, function(e) { var t = e.getRawData(), n = [e.name], i = []; return t.each(t.dimensions, function() { for (var a = arguments.length, o = arguments[a - 1], s = t.getName(o), u = 0; u < a - 1; u++) i[u] = arguments[u]; n.push((s ? s + zm : "") + i.join(zm)); }), n.join(` `); }).join(` ` + gP + ` `); } function vze(r) { var e = hze(r); return { value: Wr([pze(e.seriesGroupByCategoryAxis), dze(e.other)], function(t) { return !!t.replace(/[\n\t\s]/g, ""); }).join(` ` + gP + ` `), meta: e.meta }; } function qE(r) { return r.replace(/^\s\s*/, "").replace(/\s\s*$/, ""); } function gze(r) { var e = r.slice(0, r.indexOf(` `)); if (e.indexOf(zm) >= 0) return !0; } var k2 = new RegExp("[" + zm + "]+", "g"); function mze(r) { for (var e = r.split(/\n+/g), t = qE(e.shift()).split(k2), n = [], i = ce(t, function(u) { return { name: u, data: [] }; }), a = 0; a < e.length; a++) { var o = qE(e[a]).split(k2); n.push(o.shift()); for (var s = 0; s < o.length; s++) i[s] && (i[s].data[a] = o[s]); } return { series: i, categories: n }; } function yze(r) { for (var e = r.split(/\n+/g), t = qE(e.shift()), n = [], i = 0; i < e.length; i++) { var a = qE(e[i]); if (!!a) { var o = a.split(k2), s = "", u = void 0, l = !1; isNaN(o[0]) ? (l = !0, s = o[0], o = o.slice(1), n[i] = { name: s, value: [] }, u = n[i].value) : u = n[i] = []; for (var c = 0; c < o.length; c++) u.push(+o[c]); u.length === 1 && (l ? n[i].value = u[0] : n[i] = u[0]); } } return { name: t, data: n }; } function _ze(r, e) { var t = r.split(new RegExp(` *` + gP + ` *`, "g")), n = { series: [] }; return M(t, function(i, a) { if (gze(i)) { var o = mze(i), s = e[a], u = s.axisDim + "Axis"; s && (n[u] = n[u] || [], n[u][s.axisIndex] = { data: o.categories }, n.series = n.series.concat(o.series)); } else { var o = yze(i); n.series.push(o); } }), n; } var wze = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.onclick = function(t, n) { setTimeout(function() { n.dispatchAction({ type: "hideTip" }); }); var i = n.getDom(), a = this.model; this._dom && i.removeChild(this._dom); var o = document.createElement("div"); o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = a.get("backgroundColor") || "#fff"; var s = document.createElement("h4"), u = a.get("lang") || []; s.innerHTML = u[0] || a.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = a.get("textColor"); var l = document.createElement("div"), c = document.createElement("textarea"); l.style.cssText = "overflow:auto"; var f = a.get("optionToContent"), h = a.get("contentToOption"), p = vze(t); if (ze(f)) { var d = f(n.getOption()); Se(d) ? l.innerHTML = d : Lm(d) && l.appendChild(d); } else { c.readOnly = a.get("readOnly"); var v = c.style; v.cssText = "display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none", v.color = a.get("textColor"), v.borderColor = a.get("textareaBorderColor"), v.backgroundColor = a.get("textareaColor"), c.value = p.value, l.appendChild(c); } var g = p.meta, m = document.createElement("div"); m.style.cssText = "position:absolute;bottom:5px;left:0;right:0"; var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", _ = document.createElement("div"), w = document.createElement("div"); y += ";background-color:" + a.get("buttonColor"), y += ";color:" + a.get("buttonTextColor"); var x = this; function C() { i.removeChild(o), x._dom = null; } yM(_, "click", C), yM(w, "click", function() { if (h == null && f != null || h != null && f == null) { process.env.NODE_ENV !== "production" && to("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), C(); return; } var S; try { ze(h) ? S = h(l, n.getOption()) : S = _ze(c.value, g); } catch (b) { throw C(), new Error("Data view format error " + b); } S && n.dispatchAction({ type: "changeDataView", newOption: S }), C(); }), _.innerHTML = u[1], w.innerHTML = u[2], w.style.cssText = _.style.cssText = y, !a.get("readOnly") && m.appendChild(w), m.appendChild(_), o.appendChild(s), o.appendChild(l), o.appendChild(m), l.style.height = i.clientHeight - 80 + "px", i.appendChild(o), this._dom = o; }, e.prototype.remove = function(t, n) { this._dom && n.getDom().removeChild(this._dom); }, e.prototype.dispose = function(t, n) { this.remove(t, n); }, e.getDefaultOption = function(t) { var n = { show: !0, readOnly: !1, optionToContent: null, contentToOption: null, icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28", title: t.getLocaleModel().get(["toolbox", "dataView", "title"]), lang: t.getLocaleModel().get(["toolbox", "dataView", "lang"]), backgroundColor: "#fff", textColor: "#000", textareaColor: "#fff", textareaBorderColor: "#333", buttonColor: "#c23531", buttonTextColor: "#fff" }; return n; }, e; }(Xs); function xze(r, e) { return ce(r, function(t, n) { var i = e && e[n]; if (Xe(i) && !le(i)) { var a = Xe(t) && !le(t); a || (t = { value: t }); var o = i.name != null && t.name == null; return t = qe(t, i), o && delete t.name, t; } else return t; }); } cc({ type: "changeDataView", event: "dataViewChanged", update: "prepareAndUpdate" }, function(r, e) { var t = []; M(r.newOption.series, function(n) { var i = e.getSeriesByName(n.name)[0]; if (!i) t.push(oe({ type: "scatter" }, n)); else { var a = i.get("data"); t.push({ name: n.name, data: xze(n.data, a) }); } }), e.mergeOption(qe({ series: t }, r.newOption)); }); const Cze = wze; var ste = M, ute = Ut(); function Sze(r, e) { var t = b5(r); ste(e, function(n, i) { for (var a = t.length - 1; a >= 0; a--) { var o = t[a]; if (o[i]) break; } if (a < 0) { var s = r.queryComponents({ mainType: "dataZoom", subType: "select", id: i })[0]; if (s) { var u = s.getPercentRange(); t[0][i] = { dataZoomId: i, start: u[0], end: u[1] }; } } }), t.push(e); } function Eze(r) { var e = b5(r), t = e[e.length - 1]; e.length > 1 && e.pop(); var n = {}; return ste(t, function(i, a) { for (var o = e.length - 1; o >= 0; o--) if (i = e[o][a], i) { n[a] = i; break; } }), n; } function bze(r) { ute(r).snapshots = null; } function Tze(r) { return b5(r).length; } function b5(r) { var e = ute(r); return e.snapshots || (e.snapshots = [{}]), e.snapshots; } var Pze = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.onclick = function(t, n) { bze(t), n.dispatchAction({ type: "restore", from: this.uid }); }, e.getDefaultOption = function(t) { var n = { show: !0, icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5", title: t.getLocaleModel().get(["toolbox", "restore", "title"]) }; return n; }, e; }(Xs); cc({ type: "restore", event: "restore", update: "prepareAndUpdate" }, function(r, e) { e.resetOption("recreate"); }); const Ize = Pze; var Aze = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], Lze = function() { function r(e, t, n) { var i = this; this._targetInfoList = []; var a = V9(t, e); M(Dze, function(o, s) { (!n || !n.include || _t(n.include, s) >= 0) && o(a, i._targetInfoList); }); } return r.prototype.setOutputRanges = function(e, t) { return this.matchOutputRanges(e, t, function(n, i, a) { if ((n.coordRanges || (n.coordRanges = [])).push(i), !n.coordRange) { n.coordRange = i; var o = bL[n.brushType](0, a, i); n.__rangeOffset = { offset: H9[n.brushType](o.values, n.range, [1, 1]), xyMinMax: o.xyMinMax }; } }), e; }, r.prototype.matchOutputRanges = function(e, t, n) { M(e, function(i) { var a = this.findTargetInfo(i, t); a && a !== !0 && M(a.coordSyses, function(o) { var s = bL[i.brushType](1, o, i.range, !0); n(i, s.values, o, t); }); }, this); }, r.prototype.setInputRanges = function(e, t) { M(e, function(n) { var i = this.findTargetInfo(n, t); if (process.env.NODE_ENV !== "production" && (Ze(!i || i === !0 || n.coordRange, "coordRange must be specified when coord index specified."), Ze(!i || i !== !0 || n.range, "range must be specified in global brush.")), n.range = n.range || [], i && i !== !0) { n.panelId = i.panelId; var a = bL[n.brushType](0, i.coordSys, n.coordRange), o = n.__rangeOffset; n.range = o ? H9[n.brushType](a.values, o.offset, Mze(a.xyMinMax, o.xyMinMax)) : a.values; } }, this); }, r.prototype.makePanelOpts = function(e, t) { return ce(this._targetInfoList, function(n) { var i = n.getPanelRect(); return { panelId: n.panelId, defaultBrushType: t ? t(n) : null, clipPath: dee(i), isTargetByCursor: gee(i, e, n.coordSysModel), getLinearBrushOtherExtent: vee(i) }; }); }, r.prototype.controlSeries = function(e, t, n) { var i = this.findTargetInfo(e, n); return i === !0 || i && _t(i.coordSyses, t.coordinateSystem) >= 0; }, r.prototype.findTargetInfo = function(e, t) { for (var n = this._targetInfoList, i = V9(t, e), a = 0; a < n.length; a++) { var o = n[a], s = e.panelId; if (s) { if (o.panelId === s) return o; } else for (var u = 0; u < G9.length; u++) if (G9[u](i, o)) return o; } return !0; }, r; }(); function V2(r) { return r[0] > r[1] && r.reverse(), r; } function V9(r, e) { return m_(r, e, { includeMainTypes: Aze }); } var Dze = { grid: function(r, e) { var t = r.xAxisModels, n = r.yAxisModels, i = r.gridModels, a = $e(), o = {}, s = {}; !t && !n && !i || (M(t, function(u) { var l = u.axis.grid.model; a.set(l.id, l), o[l.id] = !0; }), M(n, function(u) { var l = u.axis.grid.model; a.set(l.id, l), s[l.id] = !0; }), M(i, function(u) { a.set(u.id, u), o[u.id] = !0, s[u.id] = !0; }), a.each(function(u) { var l = u.coordinateSystem, c = []; M(l.getCartesians(), function(f, h) { (_t(t, f.getAxis("x").model) >= 0 || _t(n, f.getAxis("y").model) >= 0) && c.push(f); }), e.push({ panelId: "grid--" + u.id, gridModel: u, coordSysModel: u, coordSys: c[0], coordSyses: c, getPanelRect: z9.grid, xAxisDeclared: o[u.id], yAxisDeclared: s[u.id] }); })); }, geo: function(r, e) { M(r.geoModels, function(t) { var n = t.coordinateSystem; e.push({ panelId: "geo--" + t.id, geoModel: t, coordSysModel: t, coordSys: n, coordSyses: [n], getPanelRect: z9.geo }); }); } }, G9 = [ function(r, e) { var t = r.xAxisModel, n = r.yAxisModel, i = r.gridModel; return !i && t && (i = t.axis.grid.model), !i && n && (i = n.axis.grid.model), i && i === e.gridModel; }, function(r, e) { var t = r.geoModel; return t && t === e.geoModel; } ], z9 = { grid: function() { return this.coordSys.master.getRect().clone(); }, geo: function() { var r = this.coordSys, e = r.getBoundingRect().clone(); return e.applyTransform(nd(r)), e; } }, bL = { lineX: ut($9, 0), lineY: ut($9, 1), rect: function(r, e, t, n) { var i = r ? e.pointToData([t[0][0], t[1][0]], n) : e.dataToPoint([t[0][0], t[1][0]], n), a = r ? e.pointToData([t[0][1], t[1][1]], n) : e.dataToPoint([t[0][1], t[1][1]], n), o = [V2([i[0], a[0]]), V2([i[1], a[1]])]; return { values: o, xyMinMax: o }; }, polygon: function(r, e, t, n) { var i = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], a = ce(t, function(o) { var s = r ? e.pointToData(o, n) : e.dataToPoint(o, n); return i[0][0] = Math.min(i[0][0], s[0]), i[1][0] = Math.min(i[1][0], s[1]), i[0][1] = Math.max(i[0][1], s[0]), i[1][1] = Math.max(i[1][1], s[1]), s; }); return { values: a, xyMinMax: i }; } }; function $9(r, e, t, n) { process.env.NODE_ENV !== "production" && Ze(t.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d."); var i = t.getAxis(["x", "y"][r]), a = V2(ce([0, 1], function(s) { return e ? i.coordToData(i.toLocalCoord(n[s]), !0) : i.toGlobalCoord(i.dataToCoord(n[s])); })), o = []; return o[r] = a, o[1 - r] = [NaN, NaN], { values: a, xyMinMax: o }; } var H9 = { lineX: ut(U9, 0), lineY: ut(U9, 1), rect: function(r, e, t) { return [[r[0][0] - t[0] * e[0][0], r[0][1] - t[0] * e[0][1]], [r[1][0] - t[1] * e[1][0], r[1][1] - t[1] * e[1][1]]]; }, polygon: function(r, e, t) { return ce(r, function(n, i) { return [n[0] - t[0] * e[i][0], n[1] - t[1] * e[i][1]]; }); } }; function U9(r, e, t, n) { return [e[0] - n[r] * t[0], e[1] - n[r] * t[1]]; } function Mze(r, e) { var t = W9(r), n = W9(e), i = [t[0] / n[0], t[1] / n[1]]; return isNaN(i[0]) && (i[0] = 1), isNaN(i[1]) && (i[1] = 1), i; } function W9(r) { return r ? [r[0][1] - r[0][0], r[1][1] - r[1][0]] : [NaN, NaN]; } const T5 = Lze; var G2 = M, Oze = ePe("toolbox-dataZoom_"), Rze = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.render = function(t, n, i, a) { this._brushController || (this._brushController = new o5(i.getZr()), this._brushController.on("brush", Ae(this._onBrush, this)).mount()), Bze(t, n, this, a, i), Fze(t, n); }, e.prototype.onclick = function(t, n, i) { Nze[i].call(this); }, e.prototype.remove = function(t, n) { this._brushController && this._brushController.unmount(); }, e.prototype.dispose = function(t, n) { this._brushController && this._brushController.dispose(); }, e.prototype._onBrush = function(t) { var n = t.areas; if (!t.isEnd || !n.length) return; var i = {}, a = this.ecModel; this._brushController.updateCovers([]); var o = new T5(P5(this.model), a, { include: ["grid"] }); o.matchOutputRanges(n, a, function(l, c, f) { if (f.type === "cartesian2d") { var h = l.brushType; h === "rect" ? (s("x", f, c[0]), s("y", f, c[1])) : s({ lineX: "x", lineY: "y" }[h], f, c); } }), Sze(a, i), this._dispatchZoomAction(i); function s(l, c, f) { var h = c.getAxis(l), p = h.model, d = u(l, p, a), v = d.findRepresentativeAxisProxy(p).getMinMaxSpan(); (v.minValueSpan != null || v.maxValueSpan != null) && (f = _v(0, f.slice(), h.scale.getExtent(), 0, v.minValueSpan, v.maxValueSpan)), d && (i[d.id] = { dataZoomId: d.id, startValue: f[0], endValue: f[1] }); } function u(l, c, f) { var h; return f.eachComponent({ mainType: "dataZoom", subType: "select" }, function(p) { var d = p.getAxisModel(l, c.componentIndex); d && (h = p); }), h; } }, e.prototype._dispatchZoomAction = function(t) { var n = []; G2(t, function(i, a) { n.push(Qe(i)); }), n.length && this.api.dispatchAction({ type: "dataZoom", from: this.uid, batch: n }); }, e.getDefaultOption = function(t) { var n = { show: !0, filterMode: "filter", icon: { zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1", back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26" }, title: t.getLocaleModel().get(["toolbox", "dataZoom", "title"]), brushStyle: { borderWidth: 0, color: "rgba(210,219,238,0.2)" } }; return n; }, e; }(Xs), Nze = { zoom: function() { var r = !this._isZoomActive; this.api.dispatchAction({ type: "takeGlobalCursor", key: "dataZoomSelect", dataZoomSelectActive: r }); }, back: function() { this._dispatchZoomAction(Eze(this.ecModel)); } }; function P5(r) { var e = { xAxisIndex: r.get("xAxisIndex", !0), yAxisIndex: r.get("yAxisIndex", !0), xAxisId: r.get("xAxisId", !0), yAxisId: r.get("yAxisId", !0) }; return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e; } function Fze(r, e) { r.setIconStatus("back", Tze(e) > 1 ? "emphasis" : "normal"); } function Bze(r, e, t, n, i) { var a = t._isZoomActive; n && n.type === "takeGlobalCursor" && (a = n.key === "dataZoomSelect" ? n.dataZoomSelectActive : !1), t._isZoomActive = a, r.setIconStatus("zoom", a ? "emphasis" : "normal"); var o = new T5(P5(r), e, { include: ["grid"] }), s = o.makePanelOpts(i, function(u) { return u.xAxisDeclared && !u.yAxisDeclared ? "lineX" : !u.xAxisDeclared && u.yAxisDeclared ? "lineY" : "rect"; }); t._brushController.setPanels(s).enableBrush(a && s.length ? { brushType: "auto", brushStyle: r.getModel("brushStyle").getItemStyle() } : !1); } BAe("dataZoom", function(r) { var e = r.getComponent("toolbox", 0), t = ["feature", "dataZoom"]; if (!e || e.get(t) == null) return; var n = e.getModel(t), i = [], a = P5(n), o = m_(r, a); G2(o.xAxisModels, function(u) { return s(u, "xAxis", "xAxisIndex"); }), G2(o.yAxisModels, function(u) { return s(u, "yAxis", "yAxisIndex"); }); function s(u, l, c) { var f = u.componentIndex, h = { type: "select", $fromToolbox: !0, filterMode: n.get("filterMode", !0) || "filter", id: Oze + l + f }; h[c] = f, i.push(h); } return i; }); const kze = Rze; function Vze(r) { r.registerComponentModel(rze), r.registerComponentView(oze), _g("saveAsImage", uze), _g("magicType", fze), _g("dataView", Cze), _g("dataZoom", kze), _g("restore", Ize), bt(eze); } var Gze = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = { z: 60, show: !0, showContent: !0, trigger: "item", triggerOn: "mousemove|click", alwaysShowContent: !1, displayMode: "single", renderMode: "auto", confine: null, showDelay: 0, hideDelay: 100, transitionDuration: 0.4, enterable: !1, backgroundColor: "#fff", shadowBlur: 10, shadowColor: "rgba(0, 0, 0, .2)", shadowOffsetX: 1, shadowOffsetY: 2, borderRadius: 4, borderWidth: 1, padding: null, extraCssText: "", axisPointer: { type: "line", axis: "auto", animation: "auto", animationDurationUpdate: 200, animationEasingUpdate: "exponentialOut", crossStyle: { color: "#999", width: 1, type: "dashed", textStyle: {} } }, textStyle: { color: "#666", fontSize: 14 } }, e; }(Rt); const zze = Gze; function lte(r) { var e = r.get("confine"); return e != null ? !!e : r.get("renderMode") === "richText"; } function cte(r) { if (!!wr.domSupported) { for (var e = document.documentElement.style, t = 0, n = r.length; t < n; t++) if (r[t] in e) return r[t]; } } var fte = cte(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), $ze = cte(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]); function hte(r, e) { if (!r) return e; e = BZ(e, !0); var t = r.indexOf(e); return r = t === -1 ? e : "-" + r.slice(0, t) + "-" + e, r.toLowerCase(); } function Hze(r, e) { var t = r.currentStyle || document.defaultView && document.defaultView.getComputedStyle(r); return t ? e ? t[e] : t : null; } var Uze = hte($ze, "transition"), I5 = hte(fte, "transform"), Wze = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (wr.transform3dSupported ? "will-change:transform;" : ""); function jze(r) { return r = r === "left" ? "right" : r === "right" ? "left" : r === "top" ? "bottom" : "top", r; } function Yze(r, e, t) { if (!Se(t) || t === "inside") return ""; var n = r.get("backgroundColor"), i = r.get("borderWidth"); e = Hd(e); var a = jze(t), o = Math.max(Math.round(i) * 1.5, 6), s = "", u = I5 + ":", l; _t(["left", "right"], a) > -1 ? (s += "top:50%", u += "translateY(-50%) rotate(" + (l = a === "left" ? -225 : -45) + "deg)") : (s += "left:50%", u += "translateX(-50%) rotate(" + (l = a === "top" ? 225 : 45) + "deg)"); var c = l * Math.PI / 180, f = o + i, h = f * Math.abs(Math.cos(c)) + f * Math.abs(Math.sin(c)), p = Math.round(((h - Math.SQRT2 * i) / 2 + Math.SQRT2 * i - (h - f) / 2) * 100) / 100; s += ";" + a + ":-" + p + "px"; var d = e + " solid " + i + "px;", v = ["position:absolute;width:" + o + "px;height:" + o + "px;", s + ";" + u + ";", "border-bottom:" + d, "border-right:" + d, "background-color:" + n + ";"]; return '
'; } function Xze(r, e) { var t = "cubic-bezier(0.23,1,0.32,1)", n = " " + r / 2 + "s " + t, i = "opacity" + n + ",visibility" + n; return e || (n = " " + r + "s " + t, i += wr.transformSupported ? "," + I5 + n : ",left" + n + ",top" + n), Uze + ":" + i; } function j9(r, e, t) { var n = r.toFixed(0) + "px", i = e.toFixed(0) + "px"; if (!wr.transformSupported) return t ? "top:" + i + ";left:" + n + ";" : [["top", i], ["left", n]]; var a = wr.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + n + "," + i + (a ? ",0" : "") + ")"; return t ? "top:0;left:0;" + I5 + ":" + o + ";" : [["top", 0], ["left", 0], [fte, o]]; } function qze(r) { var e = [], t = r.get("fontSize"), n = r.getTextColor(); n && e.push("color:" + n), e.push("font:" + r.getFont()), t && e.push("line-height:" + Math.round(t * 3 / 2) + "px"); var i = r.get("textShadowColor"), a = r.get("textShadowBlur") || 0, o = r.get("textShadowOffsetX") || 0, s = r.get("textShadowOffsetY") || 0; return i && a && e.push("text-shadow:" + o + "px " + s + "px " + a + "px " + i), M(["decoration", "align"], function(u) { var l = r.get(u); l && e.push("text-" + u + ":" + l); }), e.join(";"); } function Zze(r, e, t) { var n = [], i = r.get("transitionDuration"), a = r.get("backgroundColor"), o = r.get("shadowBlur"), s = r.get("shadowColor"), u = r.get("shadowOffsetX"), l = r.get("shadowOffsetY"), c = r.getModel("textStyle"), f = yK(r, "html"), h = u + "px " + l + "px " + o + "px " + s; return n.push("box-shadow:" + h), e && i && n.push(Xze(i, t)), a && n.push("background-color:" + a), M(["width", "color", "radius"], function(p) { var d = "border-" + p, v = BZ(d), g = r.get(v); g != null && n.push(d + ":" + g + (p === "color" ? "" : "px")); }), n.push(qze(c)), f != null && n.push("padding:" + Ty(f).join("px ") + "px"), n.join(";") + ";"; } function Y9(r, e, t, n, i) { var a = e && e.painter; if (t) { var o = a && a.getViewportRoot(); o && Sbe(r, o, document.body, n, i); } else { r[0] = n, r[1] = i; var s = a && a.getViewportRootOffset(); s && (r[0] += s.offsetLeft, r[1] += s.offsetTop); } r[2] = r[0] / e.getWidth(), r[3] = r[1] / e.getHeight(); } var Kze = function() { function r(e, t, n) { if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._firstShow = !0, this._longHide = !0, wr.wxa) return null; var i = document.createElement("div"); i.domBelongToZr = !0, this.el = i; var a = this._zr = t.getZr(), o = this._appendToBody = n && n.appendToBody; Y9(this._styleCoord, a, o, t.getWidth() / 2, t.getHeight() / 2), o ? document.body.appendChild(i) : e.appendChild(i), this._container = e; var s = this; i.onmouseenter = function() { s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0; }, i.onmousemove = function(u) { if (u = u || window.event, !s._enterable) { var l = a.handler, c = a.painter.getViewportRoot(); zs(c, u, !0), l.dispatch("mousemove", u); } }, i.onmouseleave = function() { s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay); }; } return r.prototype.update = function(e) { var t = this._container, n = Hze(t, "position"), i = t.style; i.position !== "absolute" && n !== "absolute" && (i.position = "relative"); var a = e.get("alwaysShowContent"); a && this._moveIfResized(), this.el.className = e.get("className") || ""; }, r.prototype.show = function(e, t) { clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout); var n = this.el, i = n.style, a = this._styleCoord; n.innerHTML ? i.cssText = Wze + Zze(e, !this._firstShow, this._longHide) + j9(a[0], a[1], !0) + ("border-color:" + Hd(t) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1; }, r.prototype.setContent = function(e, t, n, i, a) { var o = this.el; if (e == null) { o.innerHTML = ""; return; } var s = ""; if (Se(a) && n.get("trigger") === "item" && !lte(n) && (s = Yze(n, i, a)), Se(e)) o.innerHTML = e + s; else if (e) { o.innerHTML = "", le(e) || (e = [e]); for (var u = 0; u < e.length; u++) Lm(e[u]) && e[u].parentNode !== o && o.appendChild(e[u]); if (s && o.childNodes.length) { var l = document.createElement("div"); l.innerHTML = s, o.appendChild(l); } } }, r.prototype.setEnterable = function(e) { this._enterable = e; }, r.prototype.getSize = function() { var e = this.el; return [e.offsetWidth, e.offsetHeight]; }, r.prototype.moveTo = function(e, t) { var n = this._styleCoord; if (Y9(n, this._zr, this._appendToBody, e, t), n[0] != null && n[1] != null) { var i = this.el.style, a = j9(n[0], n[1]); M(a, function(o) { i[o[0]] = o[1]; }); } }, r.prototype._moveIfResized = function() { var e = this._styleCoord[2], t = this._styleCoord[3]; this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight()); }, r.prototype.hide = function() { var e = this, t = this.el.style; t.visibility = "hidden", t.opacity = "0", wr.transform3dSupported && (t.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() { return e._longHide = !0; }, 500); }, r.prototype.hideLater = function(e) { this._show && !(this._inContent && this._enterable) && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(Ae(this.hide, this), e)) : this.hide()); }, r.prototype.isShow = function() { return this._show; }, r.prototype.dispose = function() { this.el.parentNode.removeChild(this.el); }, r; }(); const Jze = Kze; var Qze = function() { function r(e) { this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._zr = e.getZr(), q9(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2); } return r.prototype.update = function(e) { var t = e.get("alwaysShowContent"); t && this._moveIfResized(); }, r.prototype.show = function() { this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0; }, r.prototype.setContent = function(e, t, n, i, a) { var o = this; Xe(e) && Ar(process.env.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el); var s = n.getModel("textStyle"); this.el = new Yt({ style: { rich: t.richTextStyles, text: e, lineHeight: 22, borderWidth: 1, borderColor: i, textShadowColor: s.get("textShadowColor"), fill: n.get(["textStyle", "color"]), padding: yK(n, "richText"), verticalAlign: "top", align: "left" }, z: n.get("z") }), M(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(l) { o.el.style[l] = n.get(l); }), M(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(l) { o.el.style[l] = s.get(l) || 0; }), this._zr.add(this.el); var u = this; this.el.on("mouseover", function() { u._enterable && (clearTimeout(u._hideTimeout), u._show = !0), u._inContent = !0; }), this.el.on("mouseout", function() { u._enterable && u._show && u.hideLater(u._hideDelay), u._inContent = !1; }); }, r.prototype.setEnterable = function(e) { this._enterable = e; }, r.prototype.getSize = function() { var e = this.el, t = this.el.getBoundingRect(), n = X9(e.style); return [t.width + n.left + n.right, t.height + n.top + n.bottom]; }, r.prototype.moveTo = function(e, t) { var n = this.el; if (n) { var i = this._styleCoord; q9(i, this._zr, e, t), e = i[0], t = i[1]; var a = n.style, o = Gf(a.borderWidth || 0), s = X9(a); n.x = e + o + s.left, n.y = t + o + s.top, n.markRedraw(); } }, r.prototype._moveIfResized = function() { var e = this._styleCoord[2], t = this._styleCoord[3]; this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight()); }, r.prototype.hide = function() { this.el && this.el.hide(), this._show = !1; }, r.prototype.hideLater = function(e) { this._show && !(this._inContent && this._enterable) && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(Ae(this.hide, this), e)) : this.hide()); }, r.prototype.isShow = function() { return this._show; }, r.prototype.dispose = function() { this._zr.remove(this.el); }, r; }(); function Gf(r) { return Math.max(0, r); } function X9(r) { var e = Gf(r.shadowBlur || 0), t = Gf(r.shadowOffsetX || 0), n = Gf(r.shadowOffsetY || 0); return { left: Gf(e - t), right: Gf(e + t), top: Gf(e - n), bottom: Gf(e + n) }; } function q9(r, e, t, n) { r[0] = t, r[1] = n, r[2] = r[0] / e.getWidth(), r[3] = r[1] / e.getHeight(); } const e8e = Qze; var t8e = new Vt({ shape: { x: -1, y: -1, width: 2, height: 2 } }), r8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t, n) { if (!(wr.node || !n.getDom())) { var i = t.getComponent("tooltip"), a = this._renderMode = sPe(i.get("renderMode")); this._tooltipContent = a === "richText" ? new e8e(n) : new Jze(n.getDom(), n, { appendToBody: i.get("appendToBody", !0) }); } }, e.prototype.render = function(t, n, i) { if (!(wr.node || !i.getDom())) { this.group.removeAll(), this._tooltipModel = t, this._ecModel = n, this._api = i, this._alwaysShowContent = t.get("alwaysShowContent"); var a = this._tooltipContent; a.update(t), a.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && t.get("transitionDuration") ? My(this, "_updatePosition", 50, "fixRate") : x1(this, "_updatePosition"); } }, e.prototype._initGlobalListener = function() { var t = this._tooltipModel, n = t.get("triggerOn"); qee("itemTooltip", this._api, Ae(function(i, a, o) { n !== "none" && (n.indexOf(i) >= 0 ? this._tryShow(a, o) : i === "leave" && this._hide(o)); }, this)); }, e.prototype._keepShow = function() { var t = this._tooltipModel, n = this._ecModel, i = this._api, a = t.get("triggerOn"); if (this._lastX != null && this._lastY != null && a !== "none" && a !== "click") { var o = this; clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() { !i.isDisposed() && o.manuallyShowTip(t, n, i, { x: o._lastX, y: o._lastY, dataByCoordSys: o._lastDataByCoordSys }); }); } }, e.prototype.manuallyShowTip = function(t, n, i, a) { if (!(a.from === this.uid || wr.node || !i.getDom())) { var o = Z9(a, i); this._ticket = ""; var s = a.dataByCoordSys, u = o8e(a, n, i); if (u) { var l = u.el.getBoundingRect().clone(); l.applyTransform(u.el.transform), this._tryShow({ offsetX: l.x + l.width / 2, offsetY: l.y + l.height / 2, target: u.el, position: a.position, positionDefault: "bottom" }, o); } else if (a.tooltip && a.x != null && a.y != null) { var c = t8e; c.x = a.x, c.y = a.y, c.update(), nt(c).tooltipConfig = { name: null, option: a.tooltip }, this._tryShow({ offsetX: a.x, offsetY: a.y, target: c }, o); } else if (s) this._tryShow({ offsetX: a.x, offsetY: a.y, position: a.position, dataByCoordSys: s, tooltipOption: a.tooltipOption }, o); else if (a.seriesIndex != null) { if (this._manuallyAxisShowTip(t, n, i, a)) return; var f = Zee(a, n), h = f.point[0], p = f.point[1]; h != null && p != null && this._tryShow({ offsetX: h, offsetY: p, target: f.el, position: a.position, positionDefault: "bottom" }, o); } else a.x != null && a.y != null && (i.dispatchAction({ type: "updateAxisPointer", x: a.x, y: a.y }), this._tryShow({ offsetX: a.x, offsetY: a.y, position: a.position, target: i.getZr().findHover(a.x, a.y).target }, o)); } }, e.prototype.manuallyHideTip = function(t, n, i, a) { var o = this._tooltipContent; !this._alwaysShowContent && this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, a.from !== this.uid && this._hide(Z9(a, i)); }, e.prototype._manuallyAxisShowTip = function(t, n, i, a) { var o = a.seriesIndex, s = a.dataIndex, u = n.getComponent("axisPointer").coordSysAxesInfo; if (!(o == null || s == null || u == null)) { var l = n.getSeriesByIndex(o); if (!!l) { var c = l.getData(), f = C0([c.getItemModel(s), l, (l.coordinateSystem || {}).model], this._tooltipModel); if (f.get("trigger") === "axis") return i.dispatchAction({ type: "updateAxisPointer", seriesIndex: o, dataIndex: s, position: a.position }), !0; } } }, e.prototype._tryShow = function(t, n) { var i = t.target, a = this._tooltipModel; if (!!a) { this._lastX = t.offsetX, this._lastY = t.offsetY; var o = t.dataByCoordSys; if (o && o.length) this._showAxisTooltip(o, t); else if (i) { this._lastDataByCoordSys = null; var s, u; Og(i, function(l) { if (nt(l).dataIndex != null) return s = l, !0; if (nt(l).tooltipConfig != null) return u = l, !0; }, !0), s ? this._showSeriesItemTooltip(t, s, n) : u ? this._showComponentItemTooltip(t, u, n) : this._hide(n); } else this._lastDataByCoordSys = null, this._hide(n); } }, e.prototype._showOrMove = function(t, n) { var i = t.get("showDelay"); n = Ae(n, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(n, i) : n(); }, e.prototype._showAxisTooltip = function(t, n) { var i = this._ecModel, a = this._tooltipModel, o = [n.offsetX, n.offsetY], s = C0([n.tooltipOption], a), u = this._renderMode, l = [], c = Ji("section", { blocks: [], noHeader: !0 }), f = [], h = new fA(); M(t, function(y) { M(y.dataByAxis, function(_) { var w = i.getComponent(_.axisDim + "Axis", _.axisIndex), x = _.value; if (!(!w || x == null)) { var C = jee(x, w.axis, i, _.seriesDataIndices, _.valueLabelOpt), S = Ji("section", { header: C, noHeader: !Bu(C), sortBlocks: !0, blocks: [] }); c.blocks.push(S), M(_.seriesDataIndices, function(b) { var E = i.getSeriesByIndex(b.seriesIndex), T = b.dataIndexInside, P = E.getDataParams(T); if (!(P.dataIndex < 0)) { P.axisDim = _.axisDim, P.axisIndex = _.axisIndex, P.axisType = _.axisType, P.axisId = _.axisId, P.axisValue = MF(w.axis, { value: x }), P.axisValueLabel = C, P.marker = h.makeTooltipMarker("item", Hd(P.color), u); var I = DG(E.formatTooltip(T, !0, null)), A = I.frag; if (A) { var L = C0([E], a).get("valueFormatter"); S.blocks.push(L ? oe({ valueFormatter: L }, A) : A); } I.text && f.push(I.text), l.push(P); } }); } }); }), c.blocks.reverse(), f.reverse(); var p = n.position, d = s.get("order"), v = BG(c, h, u, d, i.get("useUTC"), s.get("textStyle")); v && f.unshift(v); var g = u === "richText" ? ` ` : "
", m = f.join(g); this._showOrMove(s, function() { this._updateContentNotChangedOnAxis(t, l) ? this._updatePosition(s, p, o[0], o[1], this._tooltipContent, l) : this._showTooltipContent(s, m, l, Math.random() + "", o[0], o[1], p, null, h); }); }, e.prototype._showSeriesItemTooltip = function(t, n, i) { var a = this._ecModel, o = nt(n), s = o.seriesIndex, u = a.getSeriesByIndex(s), l = o.dataModel || u, c = o.dataIndex, f = o.dataType, h = l.getData(f), p = this._renderMode, d = t.positionDefault, v = C0([h.getItemModel(c), l, u && (u.coordinateSystem || {}).model], this._tooltipModel, d ? { position: d } : null), g = v.get("trigger"); if (!(g != null && g !== "item")) { var m = l.getDataParams(c, f), y = new fA(); m.marker = y.makeTooltipMarker("item", Hd(m.color), p); var _ = DG(l.formatTooltip(c, !1, f)), w = v.get("order"), x = v.get("valueFormatter"), C = _.frag, S = C ? BG(x ? oe({ valueFormatter: x }, C) : C, y, p, w, a.get("useUTC"), v.get("textStyle")) : _.text, b = "item_" + l.name + "_" + c; this._showOrMove(v, function() { this._showTooltipContent(v, S, m, b, t.offsetX, t.offsetY, t.position, t.target, y); }), i({ type: "showTip", dataIndexInside: c, dataIndex: h.getRawIndex(c), seriesIndex: s, from: this.uid }); } }, e.prototype._showComponentItemTooltip = function(t, n, i) { var a = nt(n), o = a.tooltipConfig, s = o.option || {}; if (Se(s)) { var u = s; s = { content: u, formatter: u }; } var l = [s], c = this._ecModel.getComponent(a.componentMainType, a.componentIndex); c && l.push(c), l.push({ formatter: s.content }); var f = t.positionDefault, h = C0(l, this._tooltipModel, f ? { position: f } : null), p = h.get("content"), d = Math.random() + "", v = new fA(); this._showOrMove(h, function() { var g = Qe(h.get("formatterParams") || {}); this._showTooltipContent(h, p, g, d, t.offsetX, t.offsetY, t.position, n, v); }), i({ type: "showTip", from: this.uid }); }, e.prototype._showTooltipContent = function(t, n, i, a, o, s, u, l, c) { if (this._ticket = "", !(!t.get("showContent") || !t.get("show"))) { var f = this._tooltipContent; f.setEnterable(t.get("enterable")); var h = t.get("formatter"); u = u || t.get("position"); var p = n, d = this._getNearestPoint([o, s], i, t.get("trigger"), t.get("borderColor")), v = d.color; if (h) if (Se(h)) { var g = t.ecModel.get("useUTC"), m = le(i) ? i[0] : i, y = m && m.axisType && m.axisType.indexOf("time") >= 0; p = h, y && (p = XT(m.axisValue, p, g)), p = kZ(p, i, !0); } else if (ze(h)) { var _ = Ae(function(w, x) { w === this._ticket && (f.setContent(x, c, t, v, u), this._updatePosition(t, u, o, s, f, i, l)); }, this); this._ticket = a, p = h(i, a, _); } else p = h; f.setContent(p, c, t, v, u), f.show(t, v), this._updatePosition(t, u, o, s, f, i, l); } }, e.prototype._getNearestPoint = function(t, n, i, a) { if (i === "axis" || le(n)) return { color: a || (this._renderMode === "html" ? "#fff" : "none") }; if (!le(n)) return { color: a || n.color || n.borderColor }; }, e.prototype._updatePosition = function(t, n, i, a, o, s, u) { var l = this._api.getWidth(), c = this._api.getHeight(); n = n || t.get("position"); var f = o.getSize(), h = t.get("align"), p = t.get("verticalAlign"), d = u && u.getBoundingRect().clone(); if (u && d.applyTransform(u.transform), ze(n) && (n = n([i, a], s, o.el, d, { viewSize: [l, c], contentSize: f.slice() })), le(n)) i = ye(n[0], l), a = ye(n[1], c); else if (Xe(n)) { var v = n; v.width = f[0], v.height = f[1]; var g = Bi(v, { width: l, height: c }); i = g.x, a = g.y, h = null, p = null; } else if (Se(n) && u) { var m = a8e(n, d, f, t.get("borderWidth")); i = m[0], a = m[1]; } else { var m = n8e(i, a, o, l, c, h ? null : 20, p ? null : 20); i = m[0], a = m[1]; } if (h && (i -= K9(h) ? f[0] / 2 : h === "right" ? f[0] : 0), p && (a -= K9(p) ? f[1] / 2 : p === "bottom" ? f[1] : 0), lte(t)) { var m = i8e(i, a, o, l, c); i = m[0], a = m[1]; } o.moveTo(i, a); }, e.prototype._updateContentNotChangedOnAxis = function(t, n) { var i = this._lastDataByCoordSys, a = this._cbParamsList, o = !!i && i.length === t.length; return o && M(i, function(s, u) { var l = s.dataByAxis || [], c = t[u] || {}, f = c.dataByAxis || []; o = o && l.length === f.length, o && M(l, function(h, p) { var d = f[p] || {}, v = h.seriesDataIndices || [], g = d.seriesDataIndices || []; o = o && h.value === d.value && h.axisType === d.axisType && h.axisId === d.axisId && v.length === g.length, o && M(v, function(m, y) { var _ = g[y]; o = o && m.seriesIndex === _.seriesIndex && m.dataIndex === _.dataIndex; }), a && M(h.seriesDataIndices, function(m) { var y = m.seriesIndex, _ = n[y], w = a[y]; _ && w && w.data !== _.data && (o = !1); }); }); }), this._lastDataByCoordSys = t, this._cbParamsList = n, !!o; }, e.prototype._hide = function(t) { this._lastDataByCoordSys = null, t({ type: "hideTip", from: this.uid }); }, e.prototype.dispose = function(t, n) { wr.node || !n.getDom() || (x1(this, "_updatePosition"), this._tooltipContent.dispose(), N2("itemTooltip", n)); }, e.type = "tooltip", e; }(Gn); function C0(r, e, t) { var n = e.ecModel, i; t ? (i = new rn(t, n, n), i = new rn(e.option, i, n)) : i = e; for (var a = r.length - 1; a >= 0; a--) { var o = r[a]; o && (o instanceof rn && (o = o.get("tooltip", !0)), Se(o) && (o = { formatter: o }), o && (i = new rn(o, i, n))); } return i; } function Z9(r, e) { return r.dispatchAction || Ae(e.dispatchAction, e); } function n8e(r, e, t, n, i, a, o) { var s = t.getSize(), u = s[0], l = s[1]; return a != null && (r + u + a + 2 > n ? r -= u + a : r += a), o != null && (e + l + o > i ? e -= l + o : e += o), [r, e]; } function i8e(r, e, t, n, i) { var a = t.getSize(), o = a[0], s = a[1]; return r = Math.min(r + o, n) - o, e = Math.min(e + s, i) - s, r = Math.max(r, 0), e = Math.max(e, 0), [r, e]; } function a8e(r, e, t, n) { var i = t[0], a = t[1], o = Math.ceil(Math.SQRT2 * n) + 8, s = 0, u = 0, l = e.width, c = e.height; switch (r) { case "inside": s = e.x + l / 2 - i / 2, u = e.y + c / 2 - a / 2; break; case "top": s = e.x + l / 2 - i / 2, u = e.y - a - o; break; case "bottom": s = e.x + l / 2 - i / 2, u = e.y + c + o; break; case "left": s = e.x - i - o, u = e.y + c / 2 - a / 2; break; case "right": s = e.x + l + o, u = e.y + c / 2 - a / 2; } return [s, u]; } function K9(r) { return r === "center" || r === "middle"; } function o8e(r, e, t) { var n = UN(r).queryOptionMap, i = n.keys()[0]; if (!(!i || i === "series")) { var a = Ow(e, i, n.get(i), { useDefault: !1, enableAll: !1, enableNone: !1 }), o = a.models[0]; if (!!o) { var s = t.getViewOfComponentModel(o), u; if (s.group.traverse(function(l) { var c = nt(l).tooltipConfig; if (c && c.name === r.name) return u = l, !0; }), u) return { componentMainType: i, componentIndex: o.componentIndex, el: u }; } } } const s8e = r8e; function u8e(r) { bt(Zw), r.registerComponentModel(zze), r.registerComponentView(s8e), r.registerAction({ type: "showTip", event: "showTip", update: "tooltip:manuallyShowTip" }, ci), r.registerAction({ type: "hideTip", event: "hideTip", update: "tooltip:manuallyHideTip" }, ci); } var l8e = ["rect", "polygon", "keep", "clear"]; function c8e(r, e) { var t = jr(r ? r.brush : []); if (!!t.length) { var n = []; M(t, function(u) { var l = u.hasOwnProperty("toolbox") ? u.toolbox : []; l instanceof Array && (n = n.concat(l)); }); var i = r && r.toolbox; le(i) && (i = i[0]), i || (i = { feature: {} }, r.toolbox = [i]); var a = i.feature || (i.feature = {}), o = a.brush || (a.brush = {}), s = o.type || (o.type = []); s.push.apply(s, n), f8e(s), e && !s.length && s.push.apply(s, l8e); } } function f8e(r) { var e = {}; M(r, function(t) { e[t] = 1; }), r.length = 0, M(e, function(t, n) { r.push(n); }); } var J9 = M; function Q9(r) { if (r) { for (var e in r) if (r.hasOwnProperty(e)) return !0; } } function z2(r, e, t) { var n = {}; return J9(e, function(a) { var o = n[a] = i(); J9(r[a], function(s, u) { if (!!Aa.isValidType(u)) { var l = { type: u, visual: s }; t && t(l, a), o[u] = new Aa(l), u === "opacity" && (l = Qe(l), l.type = "colorAlpha", o.__hidden.__alphaForOpacity = new Aa(l)); } }); }), n; function i() { var a = function() { }; a.prototype.__hidden = a.prototype; var o = new a(); return o; } } function pte(r, e, t) { var n; M(t, function(i) { e.hasOwnProperty(i) && Q9(e[i]) && (n = !0); }), n && M(t, function(i) { e.hasOwnProperty(i) && Q9(e[i]) ? r[i] = Qe(e[i]) : delete r[i]; }); } function h8e(r, e, t, n, i, a) { var o = {}; M(r, function(f) { var h = Aa.prepareVisualTypes(e[f]); o[f] = h; }); var s; function u(f) { return xF(t, s, f); } function l(f, h) { IK(t, s, f, h); } a == null ? t.each(c) : t.each([a], c); function c(f, h) { s = a == null ? f : h; var p = t.getRawDataItem(s); if (!(p && p.visualMap === !1)) for (var d = n.call(i, f), v = e[d], g = o[d], m = 0, y = g.length; m < y; m++) { var _ = g[m]; v[_] && v[_].applyVisual(f, u, l); } } } function p8e(r, e, t, n) { var i = {}; return M(r, function(a) { var o = Aa.prepareVisualTypes(e[a]); i[a] = o; }), { progress: function(o, s) { var u; n != null && (u = s.getDimensionIndex(n)); function l(x) { return xF(s, f, x); } function c(x, C) { IK(s, f, x, C); } for (var f, h = s.getStore(); (f = o.next()) != null; ) { var p = s.getRawDataItem(f); if (!(p && p.visualMap === !1)) for (var d = n != null ? h.get(u, f) : f, v = t(d), g = e[v], m = i[v], y = 0, _ = m.length; y < _; y++) { var w = m[y]; g[w] && g[w].applyVisual(d, l, c); } } } }; } function d8e(r) { var e = r.brushType, t = { point: function(n) { return e7[e].point(n, t, r); }, rect: function(n) { return e7[e].rect(n, t, r); } }; return t; } var e7 = { lineX: t7(0), lineY: t7(1), rect: { point: function(r, e, t) { return r && t.boundingRect.contain(r[0], r[1]); }, rect: function(r, e, t) { return r && t.boundingRect.intersect(r); } }, polygon: { point: function(r, e, t) { return r && t.boundingRect.contain(r[0], r[1]) && Bp(t.range, r[0], r[1]); }, rect: function(r, e, t) { var n = t.range; if (!r || n.length <= 1) return !1; var i = r.x, a = r.y, o = r.width, s = r.height, u = n[0]; if (Bp(n, i, a) || Bp(n, i + o, a) || Bp(n, i, a + s) || Bp(n, i + o, a + s) || gt.create(r).contain(u[0], u[1]) || X0(i, a, i + o, a, n) || X0(i, a, i, a + s, n) || X0(i + o, a, i + o, a + s, n) || X0(i, a + s, i + o, a + s, n)) return !0; } } }; function t7(r) { var e = ["x", "y"], t = ["width", "height"]; return { point: function(n, i, a) { if (n) { var o = a.range, s = n[r]; return S0(s, o); } }, rect: function(n, i, a) { if (n) { var o = a.range, s = [n[e[r]], n[e[r]] + n[t[r]]]; return s[1] < s[0] && s.reverse(), S0(s[0], o) || S0(s[1], o) || S0(o[0], s) || S0(o[1], s); } } }; } function S0(r, e) { return e[0] <= r && r <= e[1]; } var r7 = ["inBrush", "outOfBrush"], TL = "__ecBrushSelect", $2 = "__ecInBrushSelectEvent"; function dte(r) { r.eachComponent({ mainType: "brush" }, function(e) { var t = e.brushTargetManager = new T5(e.option, r); t.setInputRanges(e.areas, r); }); } function v8e(r, e, t) { var n = [], i, a; r.eachComponent({ mainType: "brush" }, function(o) { t && t.type === "takeGlobalCursor" && o.setBrushOption(t.key === "brush" ? t.brushOption : { brushType: !1 }); }), dte(r), r.eachComponent({ mainType: "brush" }, function(o, s) { var u = { brushId: o.id, brushIndex: s, brushName: o.name, areas: Qe(o.areas), selected: [] }; n.push(u); var l = o.option, c = l.brushLink, f = [], h = [], p = [], d = !1; s || (i = l.throttleType, a = l.throttleDelay); var v = ce(o.areas, function(x) { var C = _8e[x.brushType], S = qe({ boundingRect: C ? C(x) : void 0 }, x); return S.selectors = d8e(S), S; }), g = z2(o.option, r7, function(x) { x.mappingMethod = "fixed"; }); le(c) && M(c, function(x) { f[x] = 1; }); function m(x) { return c === "all" || !!f[x]; } function y(x) { return !!x.length; } r.eachSeries(function(x, C) { var S = p[C] = []; x.subType === "parallel" ? _(x, C) : w(x, C, S); }); function _(x, C) { var S = x.coordinateSystem; d = d || S.hasAxisBrushed(), m(C) && S.eachActiveState(x.getData(), function(b, E) { b === "active" && (h[E] = 1); }); } function w(x, C, S) { if (!(!x.brushSelector || y8e(o, C)) && (M(v, function(E) { o.brushTargetManager.controlSeries(E, x, r) && S.push(E), d = d || y(S); }), m(C) && y(S))) { var b = x.getData(); b.each(function(E) { n7(x, S, b, E) && (h[E] = 1); }); } } r.eachSeries(function(x, C) { var S = { seriesId: x.id, seriesIndex: C, seriesName: x.name, dataIndex: [] }; u.selected.push(S); var b = p[C], E = x.getData(), T = m(C) ? function(P) { return h[P] ? (S.dataIndex.push(E.getRawIndex(P)), "inBrush") : "outOfBrush"; } : function(P) { return n7(x, b, E, P) ? (S.dataIndex.push(E.getRawIndex(P)), "inBrush") : "outOfBrush"; }; (m(C) ? d : y(b)) && h8e(r7, g, E, T); }); }), g8e(e, i, a, n, t); } function g8e(r, e, t, n, i) { if (!!i) { var a = r.getZr(); if (!a[$2]) { a[TL] || (a[TL] = m8e); var o = My(a, TL, t, e); o(r, n); } } } function m8e(r, e) { if (!r.isDisposed()) { var t = r.getZr(); t[$2] = !0, r.dispatchAction({ type: "brushSelect", batch: e }), t[$2] = !1; } } function n7(r, e, t, n) { for (var i = 0, a = e.length; i < a; i++) { var o = e[i]; if (r.brushSelector(n, t, o.selectors, o)) return !0; } } function y8e(r, e) { var t = r.option.seriesIndex; return t != null && t !== "all" && (le(t) ? _t(t, e) < 0 : e !== t); } var _8e = { rect: function(r) { return i7(r.range); }, polygon: function(r) { for (var e, t = r.range, n = 0, i = t.length; n < i; n++) { e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]]; var a = t[n]; a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] > e[1][1] && (e[1][1] = a[1]); } return e && i7(e); } }; function i7(r) { return new gt(r[0][0], r[1][0], r[0][1] - r[0][0], r[1][1] - r[1][0]); } var w8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t, n) { this.ecModel = t, this.api = n, this.model, (this._brushController = new o5(n.getZr())).on("brush", Ae(this._onBrush, this)).mount(); }, e.prototype.render = function(t, n, i, a) { this.model = t, this._updateController(t, n, i, a); }, e.prototype.updateTransform = function(t, n, i, a) { dte(n), this._updateController(t, n, i, a); }, e.prototype.updateVisual = function(t, n, i, a) { this.updateTransform(t, n, i, a); }, e.prototype.updateView = function(t, n, i, a) { this._updateController(t, n, i, a); }, e.prototype._updateController = function(t, n, i, a) { (!a || a.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice()); }, e.prototype.dispose = function() { this._brushController.dispose(); }, e.prototype._onBrush = function(t) { var n = this.model.id, i = this.model.brushTargetManager.setOutputRanges(t.areas, this.ecModel); (!t.isEnd || t.removeOnClick) && this.api.dispatchAction({ type: "brush", brushId: n, areas: Qe(i), $from: n }), t.isEnd && this.api.dispatchAction({ type: "brushEnd", brushId: n, areas: Qe(i), $from: n }); }, e.type = "brush", e; }(Gn); const x8e = w8e; var C8e = "#ddd", S8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.areas = [], t.brushOption = {}, t; } return e.prototype.optionUpdated = function(t, n) { var i = this.option; !n && pte(i, t, ["inBrush", "outOfBrush"]); var a = i.inBrush = i.inBrush || {}; i.outOfBrush = i.outOfBrush || { color: C8e }, a.hasOwnProperty("liftZ") || (a.liftZ = 5); }, e.prototype.setAreas = function(t) { process.env.NODE_ENV !== "production" && (Ze(le(t)), M(t, function(n) { Ze(n.brushType, "Illegal areas"); })), t && (this.areas = ce(t, function(n) { return a7(this.option, n); }, this)); }, e.prototype.setBrushOption = function(t) { this.brushOption = a7(this.option, t), this.brushType = this.brushOption.brushType; }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = { seriesIndex: "all", brushType: "rect", brushMode: "single", transformable: !0, brushStyle: { borderWidth: 1, color: "rgba(210,219,238,0.3)", borderColor: "#D2DBEE" }, throttleType: "fixRate", throttleDelay: 0, removeOnClick: !0, z: 1e4 }, e; }(Rt); function a7(r, e) { return dt({ brushType: r.brushType, brushMode: r.brushMode, transformable: r.transformable, brushStyle: new rn(r.brushStyle).getItemStyle(), removeOnClick: r.removeOnClick, z: r.z }, e, !0); } const E8e = S8e; var b8e = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], T8e = function(r) { W(e, r); function e() { return r !== null && r.apply(this, arguments) || this; } return e.prototype.render = function(t, n, i) { var a, o, s; n.eachComponent({ mainType: "brush" }, function(u) { a = u.brushType, o = u.brushOption.brushMode || "single", s = s || !!u.areas.length; }), this._brushType = a, this._brushMode = o, M(t.get("type", !0), function(u) { t.setIconStatus(u, (u === "keep" ? o === "multiple" : u === "clear" ? s : u === a) ? "emphasis" : "normal"); }); }, e.prototype.updateView = function(t, n, i) { this.render(t, n, i); }, e.prototype.getIcons = function() { var t = this.model, n = t.get("icon", !0), i = {}; return M(t.get("type", !0), function(a) { n[a] && (i[a] = n[a]); }), i; }, e.prototype.onclick = function(t, n, i) { var a = this._brushType, o = this._brushMode; i === "clear" ? (n.dispatchAction({ type: "axisAreaSelect", intervals: [] }), n.dispatchAction({ type: "brush", command: "clear", areas: [] })) : n.dispatchAction({ type: "takeGlobalCursor", key: "brush", brushOption: { brushType: i === "keep" ? a : a === i ? !1 : i, brushMode: i === "keep" ? o === "multiple" ? "single" : "multiple" : o } }); }, e.getDefaultOption = function(t) { var n = { show: !0, type: b8e.slice(), icon: { rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13", polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2", lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4", lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4", keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z", clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2" }, title: t.getLocaleModel().get(["toolbox", "brush", "title"]) }; return n; }, e; }(Xs); const P8e = T8e; function I8e(r) { r.registerComponentView(x8e), r.registerComponentModel(E8e), r.registerPreprocessor(c8e), r.registerVisual(r.PRIORITY.VISUAL.BRUSH, v8e), r.registerAction({ type: "brush", event: "brush", update: "updateVisual" }, function(e, t) { t.eachComponent({ mainType: "brush", query: e }, function(n) { n.setAreas(e.areas); }); }), r.registerAction({ type: "brushSelect", event: "brushSelected", update: "none" }, ci), r.registerAction({ type: "brushEnd", event: "brushEnd", update: "none" }, ci), _g("brush", P8e); } var A8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.layoutMode = { type: "box", ignoreSize: !0 }, t; } return e.type = "title", e.defaultOption = { z: 6, show: !0, text: "", target: "blank", subtext: "", subtarget: "blank", left: 0, top: 0, backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", borderWidth: 0, padding: 5, itemGap: 10, textStyle: { fontSize: 18, fontWeight: "bold", color: "#464646" }, subtextStyle: { fontSize: 12, color: "#6E7079" } }, e; }(Rt), L8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.render = function(t, n, i) { if (this.group.removeAll(), !!t.get("show")) { var a = this.group, o = t.getModel("textStyle"), s = t.getModel("subtextStyle"), u = t.get("textAlign"), l = wt(t.get("textBaseline"), t.get("textVerticalAlign")), c = new Yt({ style: Sn(o, { text: t.get("text"), fill: o.getTextColor() }, { disableBox: !0 }), z2: 10 }), f = c.getBoundingRect(), h = t.get("subtext"), p = new Yt({ style: Sn(s, { text: h, fill: s.getTextColor(), y: f.height + t.get("itemGap"), verticalAlign: "top" }, { disableBox: !0 }), z2: 10 }), d = t.get("link"), v = t.get("sublink"), g = t.get("triggerEvent", !0); c.silent = !d && !g, p.silent = !v && !g, d && c.on("click", function() { wE(d, "_" + t.get("target")); }), v && p.on("click", function() { wE(v, "_" + t.get("subtarget")); }), nt(c).eventData = nt(p).eventData = g ? { componentType: "title", componentIndex: t.componentIndex } : null, a.add(c), h && a.add(p); var m = a.getBoundingRect(), y = t.getBoxLayoutParams(); y.width = m.width, y.height = m.height; var _ = Bi(y, { width: i.getWidth(), height: i.getHeight() }, t.get("padding")); u || (u = t.get("left") || t.get("right"), u === "middle" && (u = "center"), u === "right" ? _.x += _.width : u === "center" && (_.x += _.width / 2)), l || (l = t.get("top") || t.get("bottom"), l === "center" && (l = "middle"), l === "bottom" ? _.y += _.height : l === "middle" && (_.y += _.height / 2), l = l || "top"), a.x = _.x, a.y = _.y, a.markRedraw(); var w = { align: u, verticalAlign: l }; c.setStyle(w), p.setStyle(w), m = a.getBoundingRect(); var x = _.margin, C = t.getItemStyle(["color", "opacity"]); C.fill = t.get("backgroundColor"); var S = new Vt({ shape: { x: m.x - x[3], y: m.y - x[0], width: m.width + x[1] + x[3], height: m.height + x[0] + x[2], r: t.get("borderRadius") }, style: C, subPixelOptimize: !0, silent: !0 }); a.add(S); } }, e.type = "title", e; }(Gn); function D8e(r) { r.registerComponentModel(A8e), r.registerComponentView(L8e); } var M8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.layoutMode = "box", t; } return e.prototype.init = function(t, n, i) { this.mergeDefaultAndTheme(t, i), this._initData(); }, e.prototype.mergeOption = function(t) { r.prototype.mergeOption.apply(this, arguments), this._initData(); }, e.prototype.setCurrentIndex = function(t) { t == null && (t = this.option.currentIndex); var n = this._data.count(); this.option.loop ? t = (t % n + n) % n : (t >= n && (t = n - 1), t < 0 && (t = 0)), this.option.currentIndex = t; }, e.prototype.getCurrentIndex = function() { return this.option.currentIndex; }, e.prototype.isIndexMax = function() { return this.getCurrentIndex() >= this._data.count() - 1; }, e.prototype.setPlayState = function(t) { this.option.autoPlay = !!t; }, e.prototype.getPlayState = function() { return !!this.option.autoPlay; }, e.prototype._initData = function() { var t = this.option, n = t.data || [], i = t.axisType, a = this._names = [], o; i === "category" ? (o = [], M(n, function(l, c) { var f = Li(_y(l), ""), h; Xe(l) ? (h = Qe(l), h.value = c) : h = c, o.push(h), a.push(f); })) : o = n; var s = { category: "ordinal", time: "time", value: "number" }[i] || "number", u = this._data = new ho([{ name: "value", type: s }], this); u.initData(o, a); }, e.prototype.getData = function() { return this._data; }, e.prototype.getCategories = function() { if (this.get("axisType") === "category") return this._names.slice(); }, e.type = "timeline", e.defaultOption = { z: 4, show: !0, axisType: "time", realtime: !0, left: "20%", top: null, right: "20%", bottom: 0, width: null, height: 40, padding: 5, controlPosition: "left", autoPlay: !1, rewind: !1, loop: !0, playInterval: 2e3, currentIndex: 0, itemStyle: {}, label: { color: "#000" }, data: [] }, e; }(Rt); const o7 = M8e; var vte = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "timeline.slider", e.defaultOption = qh(o7.defaultOption, { backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", borderWidth: 0, orient: "horizontal", inverse: !1, tooltip: { trigger: "item" }, symbol: "circle", symbolSize: 12, lineStyle: { show: !0, width: 2, color: "#DAE1F5" }, label: { position: "auto", show: !0, interval: "auto", rotate: 0, color: "#A4B1D7" }, itemStyle: { color: "#A4B1D7", borderWidth: 1 }, checkpointStyle: { symbol: "circle", symbolSize: 15, color: "#316bf3", borderColor: "#fff", borderWidth: 2, shadowBlur: 2, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: "rgba(0, 0, 0, 0.3)", animation: !0, animationDuration: 300, animationEasing: "quinticInOut" }, controlStyle: { show: !0, showPlayBtn: !0, showPrevBtn: !0, showNextBtn: !0, itemSize: 24, itemGap: 12, position: "left", playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z", stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z", nextIcon: "M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z", prevIcon: "M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z", prevBtnSize: 18, nextBtnSize: 18, color: "#A4B1D7", borderColor: "#A4B1D7", borderWidth: 1 }, emphasis: { label: { show: !0, color: "#6f778d" }, itemStyle: { color: "#316BF3" }, controlStyle: { color: "#316BF3", borderColor: "#316BF3", borderWidth: 2 } }, progress: { lineStyle: { color: "#316BF3" }, itemStyle: { color: "#316BF3" }, label: { color: "#6f778d" } }, data: [] }), e; }(o7); gi(vte, gF.prototype); const O8e = vte; var R8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "timeline", e; }(Gn); const N8e = R8e; var F8e = function(r) { W(e, r); function e(t, n, i, a) { var o = r.call(this, t, n, i) || this; return o.type = a || "value", o; } return e.prototype.getLabelModel = function() { return this.model.getModel("label"); }, e.prototype.isHorizontal = function() { return this.model.get("orient") === "horizontal"; }, e; }(pl); const B8e = F8e; var PL = Math.PI, s7 = Ut(), k8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function(t, n) { this.api = n; }, e.prototype.render = function(t, n, i) { if (this.model = t, this.api = i, this.ecModel = n, this.group.removeAll(), t.get("show", !0)) { var a = this._layout(t, i), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), u = this._axis = this._createAxis(a, t); t.formatTooltip = function(l) { var c = u.scale.getLabel({ value: l }); return Ji("nameValue", { noName: !0, value: c }); }, M(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(l) { this["_render" + l](a, o, u, t); }, this), this._renderAxisLabel(a, s, u, t), this._position(a, t); } this._doPlayStop(), this._updateTicksStatus(); }, e.prototype.remove = function() { this._clearTimer(), this.group.removeAll(); }, e.prototype.dispose = function() { this._clearTimer(); }, e.prototype._layout = function(t, n) { var i = t.get(["label", "position"]), a = t.get("orient"), o = G8e(t, n), s; i == null || i === "auto" ? s = a === "horizontal" ? o.y + o.height / 2 < n.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < n.getWidth() / 2 ? "+" : "-" : Se(i) ? s = { horizontal: { top: "-", bottom: "+" }, vertical: { left: "-", right: "+" } }[a][i] : s = i; var u = { horizontal: "center", vertical: s >= 0 || s === "+" ? "left" : "right" }, l = { horizontal: s >= 0 || s === "+" ? "top" : "bottom", vertical: "middle" }, c = { horizontal: 0, vertical: PL / 2 }, f = a === "vertical" ? o.height : o.width, h = t.getModel("controlStyle"), p = h.get("show", !0), d = p ? h.get("itemSize") : 0, v = p ? h.get("itemGap") : 0, g = d + v, m = t.get(["label", "rotate"]) || 0; m = m * PL / 180; var y, _, w, x = h.get("position", !0), C = p && h.get("showPlayBtn", !0), S = p && h.get("showPrevBtn", !0), b = p && h.get("showNextBtn", !0), E = 0, T = f; x === "left" || x === "bottom" ? (C && (y = [0, 0], E += g), S && (_ = [E, 0], E += g), b && (w = [T - d, 0], T -= g)) : (C && (y = [T - d, 0], T -= g), S && (_ = [0, 0], E += g), b && (w = [T - d, 0], T -= g)); var P = [E, T]; return t.get("inverse") && P.reverse(), { viewRect: o, mainLength: f, orient: a, rotation: c[a], labelRotation: m, labelPosOpt: s, labelAlign: t.get(["label", "align"]) || u[a], labelBaseline: t.get(["label", "verticalAlign"]) || t.get(["label", "baseline"]) || l[a], playPosition: y, prevBtnPosition: _, nextBtnPosition: w, axisExtent: P, controlSize: d, controlGap: v }; }, e.prototype._position = function(t, n) { var i = this._mainGroup, a = this._labelGroup, o = t.viewRect; if (t.orient === "vertical") { var s = xs(), u = o.x, l = o.y + o.height; Jl(s, s, [-u, -l]), dv(s, s, -PL / 2), Jl(s, s, [u, l]), o = o.clone(), o.applyTransform(s); } var c = y(o), f = y(i.getBoundingRect()), h = y(a.getBoundingRect()), p = [i.x, i.y], d = [a.x, a.y]; d[0] = p[0] = c[0][0]; var v = t.labelPosOpt; if (v == null || Se(v)) { var g = v === "+" ? 0 : 1; _(p, f, c, 1, g), _(d, h, c, 1, 1 - g); } else { var g = v >= 0 ? 0 : 1; _(p, f, c, 1, g), d[1] = p[1] + v; } i.setPosition(p), a.setPosition(d), i.rotation = a.rotation = t.rotation, m(i), m(a); function m(w) { w.originX = c[0][0] - w.x, w.originY = c[1][0] - w.y; } function y(w) { return [[w.x, w.x + w.width], [w.y, w.y + w.height]]; } function _(w, x, C, S, b) { w[S] += C[S][b] - x[S][b]; } }, e.prototype._createAxis = function(t, n) { var i = n.getData(), a = n.get("axisType"), o = V8e(n, a); o.getTicks = function() { return i.mapArray(["value"], function(l) { return { value: l }; }); }; var s = i.getDataExtent("value"); o.setExtent(s[0], s[1]), o.calcNiceTicks(); var u = new B8e("value", o, t.axisExtent, a); return u.model = n, u; }, e.prototype._createGroup = function(t) { var n = this[t] = new rt(); return this.group.add(n), n; }, e.prototype._renderAxisLine = function(t, n, i, a) { var o = i.getExtent(); if (!!a.get(["lineStyle", "show"])) { var s = new fa({ shape: { x1: o[0], y1: 0, x2: o[1], y2: 0 }, style: oe({ lineCap: "round" }, a.getModel("lineStyle").getLineStyle()), silent: !0, z2: 1 }); n.add(s); var u = this._progressLine = new fa({ shape: { x1: o[0], x2: this._currentPointer ? this._currentPointer.x : o[0], y1: 0, y2: 0 }, style: qe({ lineCap: "round", lineWidth: s.style.lineWidth }, a.getModel(["progress", "lineStyle"]).getLineStyle()), silent: !0, z2: 1 }); n.add(u); } }, e.prototype._renderAxisTick = function(t, n, i, a) { var o = this, s = a.getData(), u = i.scale.getTicks(); this._tickSymbols = [], M(u, function(l) { var c = i.dataToCoord(l.value), f = s.getItemModel(l.value), h = f.getModel("itemStyle"), p = f.getModel(["emphasis", "itemStyle"]), d = f.getModel(["progress", "itemStyle"]), v = { x: c, y: 0, onclick: Ae(o._changeTimeline, o, l.value) }, g = u7(f, h, n, v); g.ensureState("emphasis").style = p.getItemStyle(), g.ensureState("progress").style = d.getItemStyle(), rd(g); var m = nt(g); f.get("tooltip") ? (m.dataIndex = l.value, m.dataModel = a) : m.dataIndex = m.dataModel = null, o._tickSymbols.push(g); }); }, e.prototype._renderAxisLabel = function(t, n, i, a) { var o = this, s = i.getLabelModel(); if (!!s.get("show")) { var u = a.getData(), l = i.getViewLabels(); this._tickLabels = [], M(l, function(c) { var f = c.tickValue, h = u.getItemModel(f), p = h.getModel("label"), d = h.getModel(["emphasis", "label"]), v = h.getModel(["progress", "label"]), g = i.dataToCoord(c.tickValue), m = new Yt({ x: g, y: 0, rotation: t.labelRotation - t.rotation, onclick: Ae(o._changeTimeline, o, f), silent: !1, style: Sn(p, { text: c.formattedLabel, align: t.labelAlign, verticalAlign: t.labelBaseline }) }); m.ensureState("emphasis").style = Sn(d), m.ensureState("progress").style = Sn(v), n.add(m), rd(m), s7(m).dataIndex = f, o._tickLabels.push(m); }); } }, e.prototype._renderControl = function(t, n, i, a) { var o = t.controlSize, s = t.rotation, u = a.getModel("controlStyle").getItemStyle(), l = a.getModel(["emphasis", "controlStyle"]).getItemStyle(), c = a.getPlayState(), f = a.get("inverse", !0); h(t.nextBtnPosition, "next", Ae(this._changeTimeline, this, f ? "-" : "+")), h(t.prevBtnPosition, "prev", Ae(this._changeTimeline, this, f ? "+" : "-")), h(t.playPosition, c ? "stop" : "play", Ae(this._handlePlayClick, this, !c), !0); function h(p, d, v, g) { if (!!p) { var m = tl(wt(a.get(["controlStyle", d + "BtnSize"]), o), o), y = [0, -m / 2, m, m], _ = z8e(a, d + "Icon", y, { x: p[0], y: p[1], originX: o / 2, originY: 0, rotation: g ? -s : 0, rectHover: !0, style: u, onclick: v }); _.ensureState("emphasis").style = l, n.add(_), rd(_); } } }, e.prototype._renderCurrentPointer = function(t, n, i, a) { var o = a.getData(), s = a.getCurrentIndex(), u = o.getItemModel(s).getModel("checkpointStyle"), l = this, c = { onCreate: function(f) { f.draggable = !0, f.drift = Ae(l._handlePointerDrag, l), f.ondragend = Ae(l._handlePointerDragend, l), l7(f, l._progressLine, s, i, a, !0); }, onUpdate: function(f) { l7(f, l._progressLine, s, i, a); } }; this._currentPointer = u7(u, u, this._mainGroup, {}, this._currentPointer, c); }, e.prototype._handlePlayClick = function(t) { this._clearTimer(), this.api.dispatchAction({ type: "timelinePlayChange", playState: t, from: this.uid }); }, e.prototype._handlePointerDrag = function(t, n, i) { this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY]); }, e.prototype._handlePointerDragend = function(t) { this._pointerChangeTimeline([t.offsetX, t.offsetY], !0); }, e.prototype._pointerChangeTimeline = function(t, n) { var i = this._toAxisCoord(t)[0], a = this._axis, o = Js(a.getExtent().slice()); i > o[1] && (i = o[1]), i < o[0] && (i = o[0]), this._currentPointer.x = i, this._currentPointer.markRedraw(), this._progressLine.shape.x2 = i, this._progressLine.dirty(); var s = this._findNearestTick(i), u = this.model; (n || s !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(s); }, e.prototype._doPlayStop = function() { var t = this; this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() { var n = t.model; t._changeTimeline(n.getCurrentIndex() + (n.get("rewind", !0) ? -1 : 1)); }, this.model.get("playInterval"))); }, e.prototype._toAxisCoord = function(t) { var n = this._mainGroup.getLocalTransform(); return Uu(t, n, !0); }, e.prototype._findNearestTick = function(t) { var n = this.model.getData(), i = 1 / 0, a, o = this._axis; return n.each(["value"], function(s, u) { var l = o.dataToCoord(s), c = Math.abs(l - t); c < i && (i = c, a = u); }), a; }, e.prototype._clearTimer = function() { this._timer && (clearTimeout(this._timer), this._timer = null); }, e.prototype._changeTimeline = function(t) { var n = this.model.getCurrentIndex(); t === "+" ? t = n + 1 : t === "-" && (t = n - 1), this.api.dispatchAction({ type: "timelineChange", currentIndex: t, from: this.uid }); }, e.prototype._updateTicksStatus = function() { var t = this.model.getCurrentIndex(), n = this._tickSymbols, i = this._tickLabels; if (n) for (var a = 0; a < n.length; a++) n && n[a] && n[a].toggleState("progress", a < t); if (i) for (var a = 0; a < i.length; a++) i && i[a] && i[a].toggleState("progress", s7(i[a]).dataIndex <= t); }, e.type = "timeline.slider", e; }(N8e); function V8e(r, e) { if (e = e || r.get("type"), e) switch (e) { case "category": return new IF({ ordinalMeta: r.getCategories(), extent: [1 / 0, -1 / 0] }); case "time": return new yJ({ locale: r.ecModel.getLocaleModel(), useUTC: r.ecModel.get("useUTC") }); default: return new Bh(); } } function G8e(r, e) { return Bi(r.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }, r.get("padding")); } function z8e(r, e, t, n) { var i = n.style, a = Fw(r.get(["controlStyle", e]), n || {}, new gt(t[0], t[1], t[2], t[3])); return i && a.setStyle(i), a; } function u7(r, e, t, n, i, a) { var o = e.get("color"); if (i) i.setColor(o), t.add(i), a && a.onUpdate(i); else { var s = r.get("symbol"); i = vi(s, -1, -1, 2, 2, o), i.setStyle("strokeNoScale", !0), t.add(i), a && a.onCreate(i); } var u = e.getItemStyle(["color"]); i.setStyle(u), n = dt({ rectHover: !0, z2: 100 }, n, !0); var l = Vw(r.get("symbolSize")); n.scaleX = l[0] / 2, n.scaleY = l[1] / 2; var c = Oy(r.get("symbolOffset"), l); c && (n.x = (n.x || 0) + c[0], n.y = (n.y || 0) + c[1]); var f = r.get("symbolRotate"); return n.rotation = (f || 0) * Math.PI / 180 || 0, i.attr(n), i.updateTransform(), i; } function l7(r, e, t, n, i, a) { if (!r.dragging) { var o = i.getModel("checkpointStyle"), s = n.dataToCoord(i.getData().get("value", t)); if (a || !o.get("animation", !0)) r.attr({ x: s, y: 0 }), e && e.attr({ shape: { x2: s } }); else { var u = { duration: o.get("animationDuration", !0), easing: o.get("animationEasing", !0) }; r.stopAnimation(null, !0), r.animateTo({ x: s, y: 0 }, u), e && e.animateTo({ shape: { x2: s } }, u); } } } const $8e = k8e; function H8e(r) { r.registerAction({ type: "timelineChange", event: "timelineChanged", update: "prepareAndUpdate" }, function(e, t, n) { var i = t.getComponent("timeline"); return i && e.currentIndex != null && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), n.dispatchAction({ type: "timelinePlayChange", playState: !1, from: e.from }))), t.resetOption("timeline", { replaceMerge: i.get("replaceMerge", !0) }), qe({ currentIndex: i.option.currentIndex }, e); }), r.registerAction({ type: "timelinePlayChange", event: "timelinePlayChanged", update: "update" }, function(e, t) { var n = t.getComponent("timeline"); n && e.playState != null && n.setPlayState(e.playState); }); } function U8e(r) { var e = r && r.timeline; le(e) || (e = e ? [e] : []), M(e, function(t) { !t || W8e(t); }); } function W8e(r) { var e = r.type, t = { number: "value", time: "time" }; if (t[e] && (r.axisType = t[e], delete r.type), c7(r), Gp(r, "controlPosition")) { var n = r.controlStyle || (r.controlStyle = {}); Gp(n, "position") || (n.position = r.controlPosition), n.position === "none" && !Gp(n, "show") && (n.show = !1, delete n.position), delete r.controlPosition; } M(r.data || [], function(i) { Xe(i) && !le(i) && (!Gp(i, "value") && Gp(i, "name") && (i.value = i.name), c7(i)); }); } function c7(r) { var e = r.itemStyle || (r.itemStyle = {}), t = e.emphasis || (e.emphasis = {}), n = r.label || r.label || {}, i = n.normal || (n.normal = {}), a = { normal: 1, emphasis: 1 }; M(n, function(o, s) { !a[s] && !Gp(i, s) && (i[s] = o); }), t.label && !Gp(n, "emphasis") && (n.emphasis = t.label, delete t.label); } function Gp(r, e) { return r.hasOwnProperty(e); } function j8e(r) { r.registerComponentModel(O8e), r.registerComponentView($8e), r.registerSubTypeDefaulter("timeline", function() { return "slider"; }), H8e(r), r.registerPreprocessor(U8e); } function A5(r, e) { if (!r) return !1; for (var t = le(r) ? r : [r], n = 0; n < t.length; n++) if (t[n] && t[n][e]) return !0; return !1; } function AC(r) { Vd(r, "label", ["show"]); } var LC = Ut(), gte = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.createdBySelf = !1, t; } return e.prototype.init = function(t, n, i) { if (process.env.NODE_ENV !== "production" && this.type === "marker") throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead."); this.mergeDefaultAndTheme(t, i), this._mergeOption(t, i, !1, !0); }, e.prototype.isAnimationEnabled = function() { if (wr.node) return !1; var t = this.__hostSeries; return this.getShallow("animation") && t && t.isAnimationEnabled(); }, e.prototype.mergeOption = function(t, n) { this._mergeOption(t, n, !1, !1); }, e.prototype._mergeOption = function(t, n, i, a) { var o = this.mainType; i || n.eachSeries(function(s) { var u = s.get(this.mainType, !0), l = LC(s)[o]; if (!u || !u.data) { LC(s)[o] = null; return; } l ? l._mergeOption(u, n, !0) : (a && AC(u), M(u.data, function(c) { c instanceof Array ? (AC(c[0]), AC(c[1])) : AC(c); }), l = this.createMarkerModelFromSeries(u, this, n), oe(l, { mainType: this.mainType, seriesIndex: s.seriesIndex, name: s.name, createdBySelf: !0 }), l.__hostSeries = s), LC(s)[o] = l; }, this); }, e.prototype.formatTooltip = function(t, n, i) { var a = this.getData(), o = this.getRawValue(t), s = a.getName(t); return Ji("section", { header: this.name, blocks: [Ji("nameValue", { name: s, value: o, noName: !s, noValue: o == null })] }); }, e.prototype.getData = function() { return this._data; }, e.prototype.setData = function(t) { this._data = t; }, e.getMarkerModelFromSeries = function(t, n) { return LC(t)[n]; }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e; }(Rt); gi(gte, gF.prototype); const Gh = gte; var Y8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.createMarkerModelFromSeries = function(t, n, i) { return new e(t, n, i); }, e.type = "markPoint", e.defaultOption = { z: 5, symbol: "pin", symbolSize: 50, tooltip: { trigger: "item" }, label: { show: !0, position: "inside" }, itemStyle: { borderWidth: 2 }, emphasis: { label: { show: !0 } } }, e; }(Gh); const X8e = Y8e; function H2(r) { return !(isNaN(parseFloat(r.x)) && isNaN(parseFloat(r.y))); } function q8e(r) { return !isNaN(parseFloat(r.x)) && !isNaN(parseFloat(r.y)); } function DC(r, e, t, n, i, a) { var o = [], s = Fh( e, n ), u = s ? e.getCalculationInfo("stackResultDimension") : n, l = L5(e, u, r), c = e.indicesOfNearest(u, l)[0]; o[i] = e.get(t, c), o[a] = e.get(u, c); var f = e.get(n, c), h = Rl(e.get(n, c)); return h = Math.min(h, 20), h >= 0 && (o[a] = +o[a].toFixed(h)), [o, f]; } var IL = { min: ut(DC, "min"), max: ut(DC, "max"), average: ut(DC, "average"), median: ut(DC, "median") }; function R1(r, e) { var t = r.getData(), n = r.coordinateSystem; if (e && !q8e(e) && !le(e.coord) && n) { var i = n.dimensions, a = mte(e, t, n, r); if (e = Qe(e), e.type && IL[e.type] && a.baseAxis && a.valueAxis) { var o = _t(i, a.baseAxis.dim), s = _t(i, a.valueAxis.dim), u = IL[e.type](t, a.baseDataDim, a.valueDataDim, o, s); e.coord = u[0], e.value = u[1]; } else { for (var l = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis], c = 0; c < 2; c++) IL[l[c]] && (l[c] = L5(t, t.mapDimension(i[c]), l[c])); e.coord = l; } } return e; } function mte(r, e, t, n) { var i = {}; return r.valueIndex != null || r.valueDim != null ? (i.valueDataDim = r.valueIndex != null ? e.getDimension(r.valueIndex) : r.valueDim, i.valueAxis = t.getAxis(Z8e(n, i.valueDataDim)), i.baseAxis = t.getOtherAxis(i.valueAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim)) : (i.baseAxis = n.getBaseAxis(), i.valueAxis = t.getOtherAxis(i.baseAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim), i.valueDataDim = e.mapDimension(i.valueAxis.dim)), i; } function Z8e(r, e) { var t = r.getData().getDimensionInfo(e); return t && t.coordDim; } function N1(r, e) { return r && r.containData && e.coord && !H2(e) ? r.containData(e.coord) : !0; } function K8e(r, e, t) { return r && r.containZone && e.coord && t.coord && !H2(e) && !H2(t) ? r.containZone(e.coord, t.coord) : !0; } function yte(r, e) { return r ? function(t, n, i, a) { var o = a < 2 ? t.coord && t.coord[a] : t.value; return dh(o, e[a]); } : function(t, n, i, a) { return dh(t.value, e[a]); }; } function L5(r, e, t) { if (t === "average") { var n = 0, i = 0; return r.each(e, function(a, o) { isNaN(a) || (n += a, i++); }), n / i; } else return t === "median" ? r.getMedian(e) : r.getDataExtent(e)[t === "max" ? 1 : 0]; } var AL = Ut(), J8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.init = function() { this.markerGroupMap = $e(); }, e.prototype.render = function(t, n, i) { var a = this, o = this.markerGroupMap; o.each(function(s) { AL(s).keep = !1; }), n.eachSeries(function(s) { var u = Gh.getMarkerModelFromSeries(s, a.type); u && a.renderSeries(s, u, n, i); }), o.each(function(s) { !AL(s).keep && a.group.remove(s.group); }); }, e.prototype.markKeep = function(t) { AL(t).keep = !0; }, e.prototype.toggleBlurSeries = function(t, n) { var i = this; M(t, function(a) { var o = Gh.getMarkerModelFromSeries(a, i.type); if (o) { var s = o.getData(); s.eachItemGraphicEl(function(u) { u && (n ? Wq(u) : ZN(u)); }); } }); }, e.type = "marker", e; }(Gn); const D5 = J8e; function f7(r, e, t) { var n = e.coordinateSystem; r.each(function(i) { var a = r.getItemModel(i), o, s = ye(a.get("x"), t.getWidth()), u = ye(a.get("y"), t.getHeight()); if (!isNaN(s) && !isNaN(u)) o = [s, u]; else if (e.getMarkerPosition) o = e.getMarkerPosition(r.getValues(r.dimensions, i)); else if (n) { var l = r.get(n.dimensions[0], i), c = r.get(n.dimensions[1], i); o = n.dataToPoint([l, c]); } isNaN(s) || (o[0] = s), isNaN(u) || (o[1] = u), r.setItemLayout(i, o); }); } var Q8e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.updateTransform = function(t, n, i) { n.eachSeries(function(a) { var o = Gh.getMarkerModelFromSeries(a, "markPoint"); o && (f7(o.getData(), a, i), this.markerGroupMap.get(a.id).updateLayout()); }, this); }, e.prototype.renderSeries = function(t, n, i, a) { var o = t.coordinateSystem, s = t.id, u = t.getData(), l = this.markerGroupMap, c = l.get(s) || l.set(s, new Uw()), f = e9e(o, t, n); n.setData(f), f7(n.getData(), t, a), f.each(function(h) { var p = f.getItemModel(h), d = p.getShallow("symbol"), v = p.getShallow("symbolSize"), g = p.getShallow("symbolRotate"), m = p.getShallow("symbolOffset"), y = p.getShallow("symbolKeepAspect"); if (ze(d) || ze(v) || ze(g) || ze(m)) { var _ = n.getRawValue(h), w = n.getDataParams(h); ze(d) && (d = d(_, w)), ze(v) && (v = v(_, w)), ze(g) && (g = g(_, w)), ze(m) && (m = m(_, w)); } var x = p.getModel("itemStyle").getItemStyle(), C = kw(u, "color"); x.fill || (x.fill = C), f.setItemVisual(h, { symbol: d, symbolSize: v, symbolRotate: g, symbolOffset: m, symbolKeepAspect: y, style: x }); }), c.updateData(f), this.group.add(c.group), f.eachItemGraphicEl(function(h) { h.traverse(function(p) { nt(p).dataModel = n; }); }), this.markKeep(c), c.group.silent = n.get("silent") || t.get("silent"); }, e.type = "markPoint", e; }(D5); function e9e(r, e, t) { var n; r ? n = ce(r && r.dimensions, function(s) { var u = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {}; return oe(oe({}, u), { name: s, ordinalMeta: null }); }) : n = [{ name: "value", type: "float" }]; var i = new ho(n, t), a = ce(t.get("data"), ut(R1, e)); r && (a = Wr(a, ut(N1, r))); var o = yte(!!r, n); return i.initData(a, null, o), i; } const t9e = Q8e; function r9e(r) { r.registerComponentModel(X8e), r.registerComponentView(t9e), r.registerPreprocessor(function(e) { A5(e.series, "markPoint") && (e.markPoint = e.markPoint || {}); }); } var n9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.createMarkerModelFromSeries = function(t, n, i) { return new e(t, n, i); }, e.type = "markLine", e.defaultOption = { z: 5, symbol: ["circle", "arrow"], symbolSize: [8, 16], symbolOffset: 0, precision: 2, tooltip: { trigger: "item" }, label: { show: !0, position: "end", distance: 5 }, lineStyle: { type: "dashed" }, emphasis: { label: { show: !0 }, lineStyle: { width: 3 } }, animationEasing: "linear" }, e; }(Gh); const i9e = n9e; var MC = Ut(), a9e = function(r, e, t, n) { var i = r.getData(), a; if (le(n)) a = n; else { var o = n.type; if (o === "min" || o === "max" || o === "average" || o === "median" || n.xAxis != null || n.yAxis != null) { var s = void 0, u = void 0; if (n.yAxis != null || n.xAxis != null) s = e.getAxis(n.yAxis != null ? "y" : "x"), u = si(n.yAxis, n.xAxis); else { var l = mte(n, i, e, r); s = l.valueAxis; var c = iJ(i, l.valueDataDim); u = L5(i, c, o); } var f = s.dim === "x" ? 0 : 1, h = 1 - f, p = Qe(n), d = { coord: [] }; p.type = null, p.coord = [], p.coord[h] = -1 / 0, d.coord[h] = 1 / 0; var v = t.get("precision"); v >= 0 && $t(u) && (u = +u.toFixed(Math.min(v, 20))), p.coord[f] = d.coord[f] = u, a = [p, d, { type: o, valueIndex: n.valueIndex, value: u }]; } else process.env.NODE_ENV !== "production" && zu("Invalid markLine data."), a = []; } var g = [R1(r, a[0]), R1(r, a[1]), oe({}, a[2])]; return g[2].type = g[2].type || null, dt(g[2], g[0]), dt(g[2], g[1]), g; }; function ZE(r) { return !isNaN(r) && !isFinite(r); } function h7(r, e, t, n) { var i = 1 - r, a = n.dimensions[r]; return ZE(e[i]) && ZE(t[i]) && e[r] === t[r] && n.getAxis(a).containData(e[r]); } function o9e(r, e) { if (r.type === "cartesian2d") { var t = e[0].coord, n = e[1].coord; if (t && n && (h7(1, t, n, r) || h7(0, t, n, r))) return !0; } return N1(r, e[0]) && N1(r, e[1]); } function LL(r, e, t, n, i) { var a = n.coordinateSystem, o = r.getItemModel(e), s, u = ye(o.get("x"), i.getWidth()), l = ye(o.get("y"), i.getHeight()); if (!isNaN(u) && !isNaN(l)) s = [u, l]; else { if (n.getMarkerPosition) s = n.getMarkerPosition(r.getValues(r.dimensions, e)); else { var c = a.dimensions, f = r.get(c[0], e), h = r.get(c[1], e); s = a.dataToPoint([f, h]); } if (mv(a, "cartesian2d")) { var p = a.getAxis("x"), d = a.getAxis("y"), c = a.dimensions; ZE(r.get(c[0], e)) ? s[0] = p.toGlobalCoord(p.getExtent()[t ? 0 : 1]) : ZE(r.get(c[1], e)) && (s[1] = d.toGlobalCoord(d.getExtent()[t ? 0 : 1])); } isNaN(u) || (s[0] = u), isNaN(l) || (s[1] = l); } r.setItemLayout(e, s); } var s9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.updateTransform = function(t, n, i) { n.eachSeries(function(a) { var o = Gh.getMarkerModelFromSeries(a, "markLine"); if (o) { var s = o.getData(), u = MC(o).from, l = MC(o).to; u.each(function(c) { LL(u, c, !0, a, i), LL(l, c, !1, a, i); }), s.each(function(c) { s.setItemLayout(c, [u.getItemLayout(c), l.getItemLayout(c)]); }), this.markerGroupMap.get(a.id).updateLayout(); } }, this); }, e.prototype.renderSeries = function(t, n, i, a) { var o = t.coordinateSystem, s = t.id, u = t.getData(), l = this.markerGroupMap, c = l.get(s) || l.set(s, new e5()); this.group.add(c.group); var f = u9e(o, t, n), h = f.from, p = f.to, d = f.line; MC(n).from = h, MC(n).to = p, n.setData(d); var v = n.get("symbol"), g = n.get("symbolSize"), m = n.get("symbolRotate"), y = n.get("symbolOffset"); le(v) || (v = [v, v]), le(g) || (g = [g, g]), le(m) || (m = [m, m]), le(y) || (y = [y, y]), f.from.each(function(w) { _(h, w, !0), _(p, w, !1); }), d.each(function(w) { var x = d.getItemModel(w).getModel("lineStyle").getLineStyle(); d.setItemLayout(w, [h.getItemLayout(w), p.getItemLayout(w)]), x.stroke == null && (x.stroke = h.getItemVisual(w, "style").fill), d.setItemVisual(w, { fromSymbolKeepAspect: h.getItemVisual(w, "symbolKeepAspect"), fromSymbolOffset: h.getItemVisual(w, "symbolOffset"), fromSymbolRotate: h.getItemVisual(w, "symbolRotate"), fromSymbolSize: h.getItemVisual(w, "symbolSize"), fromSymbol: h.getItemVisual(w, "symbol"), toSymbolKeepAspect: p.getItemVisual(w, "symbolKeepAspect"), toSymbolOffset: p.getItemVisual(w, "symbolOffset"), toSymbolRotate: p.getItemVisual(w, "symbolRotate"), toSymbolSize: p.getItemVisual(w, "symbolSize"), toSymbol: p.getItemVisual(w, "symbol"), style: x }); }), c.updateData(d), f.line.eachItemGraphicEl(function(w) { nt(w).dataModel = n, w.traverse(function(x) { nt(x).dataModel = n; }); }); function _(w, x, C) { var S = w.getItemModel(x); LL(w, x, C, t, a); var b = S.getModel("itemStyle").getItemStyle(); b.fill == null && (b.fill = kw(u, "color")), w.setItemVisual(x, { symbolKeepAspect: S.get("symbolKeepAspect"), symbolOffset: wt(S.get("symbolOffset", !0), y[C ? 0 : 1]), symbolRotate: wt(S.get("symbolRotate", !0), m[C ? 0 : 1]), symbolSize: wt(S.get("symbolSize"), g[C ? 0 : 1]), symbol: wt(S.get("symbol", !0), v[C ? 0 : 1]), style: b }); } this.markKeep(c), c.group.silent = n.get("silent") || t.get("silent"); }, e.type = "markLine", e; }(D5); function u9e(r, e, t) { var n; r ? n = ce(r && r.dimensions, function(l) { var c = e.getData().getDimensionInfo(e.getData().mapDimension(l)) || {}; return oe(oe({}, c), { name: l, ordinalMeta: null }); }) : n = [{ name: "value", type: "float" }]; var i = new ho(n, t), a = new ho(n, t), o = new ho([], t), s = ce(t.get("data"), ut(a9e, e, r, t)); r && (s = Wr(s, ut(o9e, r))); var u = yte(!!r, n); return i.initData(ce(s, function(l) { return l[0]; }), null, u), a.initData(ce(s, function(l) { return l[1]; }), null, u), o.initData(ce(s, function(l) { return l[2]; })), o.hasItemOption = !0, { from: i, to: a, line: o }; } const l9e = s9e; function c9e(r) { r.registerComponentModel(i9e), r.registerComponentView(l9e), r.registerPreprocessor(function(e) { A5(e.series, "markLine") && (e.markLine = e.markLine || {}); }); } var f9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.createMarkerModelFromSeries = function(t, n, i) { return new e(t, n, i); }, e.type = "markArea", e.defaultOption = { z: 1, tooltip: { trigger: "item" }, animation: !1, label: { show: !0, position: "top" }, itemStyle: { borderWidth: 0 }, emphasis: { label: { show: !0, position: "top" } } }, e; }(Gh); const h9e = f9e; var OC = Ut(), p9e = function(r, e, t, n) { var i = R1(r, n[0]), a = R1(r, n[1]), o = i.coord, s = a.coord; o[0] = si(o[0], -1 / 0), o[1] = si(o[1], -1 / 0), s[0] = si(s[0], 1 / 0), s[1] = si(s[1], 1 / 0); var u = ON([{}, i, a]); return u.coord = [i.coord, a.coord], u.x0 = i.x, u.y0 = i.y, u.x1 = a.x, u.y1 = a.y, u; }; function KE(r) { return !isNaN(r) && !isFinite(r); } function p7(r, e, t, n) { var i = 1 - r; return KE(e[i]) && KE(t[i]); } function d9e(r, e) { var t = e.coord[0], n = e.coord[1], i = { coord: t, x: e.x0, y: e.y0 }, a = { coord: n, x: e.x1, y: e.y1 }; return mv(r, "cartesian2d") ? t && n && (p7(1, t, n) || p7(0, t, n)) ? !0 : K8e(r, i, a) : N1(r, i) || N1(r, a); } function d7(r, e, t, n, i) { var a = n.coordinateSystem, o = r.getItemModel(e), s, u = ye(o.get(t[0]), i.getWidth()), l = ye(o.get(t[1]), i.getHeight()); if (!isNaN(u) && !isNaN(l)) s = [u, l]; else { if (n.getMarkerPosition) s = n.getMarkerPosition(r.getValues(t, e)); else { var c = r.get(t[0], e), f = r.get(t[1], e), h = [c, f]; a.clampData && a.clampData(h, h), s = a.dataToPoint(h, !0); } if (mv(a, "cartesian2d")) { var p = a.getAxis("x"), d = a.getAxis("y"), c = r.get(t[0], e), f = r.get(t[1], e); KE(c) ? s[0] = p.toGlobalCoord(p.getExtent()[t[0] === "x0" ? 0 : 1]) : KE(f) && (s[1] = d.toGlobalCoord(d.getExtent()[t[1] === "y0" ? 0 : 1])); } isNaN(u) || (s[0] = u), isNaN(l) || (s[1] = l); } return s; } var v7 = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], v9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.updateTransform = function(t, n, i) { n.eachSeries(function(a) { var o = Gh.getMarkerModelFromSeries(a, "markArea"); if (o) { var s = o.getData(); s.each(function(u) { var l = ce(v7, function(f) { return d7(s, u, f, a, i); }); s.setItemLayout(u, l); var c = s.getItemGraphicEl(u); c.setShape("points", l); }); } }, this); }, e.prototype.renderSeries = function(t, n, i, a) { var o = t.coordinateSystem, s = t.id, u = t.getData(), l = this.markerGroupMap, c = l.get(s) || l.set(s, { group: new rt() }); this.group.add(c.group), this.markKeep(c); var f = g9e(o, t, n); n.setData(f), f.each(function(h) { var p = ce(v7, function(b) { return d7(f, h, b, t, a); }), d = o.getAxis("x").scale, v = o.getAxis("y").scale, g = d.getExtent(), m = v.getExtent(), y = [d.parse(f.get("x0", h)), d.parse(f.get("x1", h))], _ = [v.parse(f.get("y0", h)), v.parse(f.get("y1", h))]; Js(y), Js(_); var w = !(g[0] > y[1] || g[1] < y[0] || m[0] > _[1] || m[1] < _[0]), x = !w; f.setItemLayout(h, { points: p, allClipped: x }); var C = f.getItemModel(h).getModel("itemStyle").getItemStyle(), S = kw(u, "color"); C.fill || (C.fill = S, Se(C.fill) && (C.fill = sE(C.fill, 0.4))), C.stroke || (C.stroke = S), f.setItemVisual(h, "style", C); }), f.diff(OC(c).data).add(function(h) { var p = f.getItemLayout(h); if (!p.allClipped) { var d = new Ho({ shape: { points: p.points } }); f.setItemGraphicEl(h, d), c.group.add(d); } }).update(function(h, p) { var d = OC(c).data.getItemGraphicEl(p), v = f.getItemLayout(h); v.allClipped ? d && c.group.remove(d) : (d ? Ht(d, { shape: { points: v.points } }, n, h) : d = new Ho({ shape: { points: v.points } }), f.setItemGraphicEl(h, d), c.group.add(d)); }).remove(function(h) { var p = OC(c).data.getItemGraphicEl(h); c.group.remove(p); }).execute(), f.eachItemGraphicEl(function(h, p) { var d = f.getItemModel(p), v = f.getItemVisual(p, "style"); h.useStyle(f.getItemVisual(p, "style")), no(h, wa(d), { labelFetcher: n, labelDataIndex: p, defaultText: f.getName(p) || "", inheritColor: Se(v.fill) ? sE(v.fill, 1) : "#000" }), Ra(h, d), Zn(h, null, null, d.get(["emphasis", "disabled"])), nt(h).dataModel = n; }), OC(c).data = f, c.group.silent = n.get("silent") || t.get("silent"); }, e.type = "markArea", e; }(D5); function g9e(r, e, t) { var n, i, a = ["x0", "y0", "x1", "y1"]; if (r) { var o = ce(r && r.dimensions, function(l) { var c = e.getData(), f = c.getDimensionInfo(c.mapDimension(l)) || {}; return oe(oe({}, f), { name: l, ordinalMeta: null }); }); i = ce(a, function(l, c) { return { name: l, type: o[c % 2].type }; }), n = new ho(i, t); } else i = [{ name: "value", type: "float" }], n = new ho(i, t); var s = ce(t.get("data"), ut(p9e, e, r, t)); r && (s = Wr(s, ut(d9e, r))); var u = r ? function(l, c, f, h) { var p = l.coord[Math.floor(h / 2)][h % 2]; return dh(p, i[h]); } : function(l, c, f, h) { return dh(l.value, i[h]); }; return n.initData(s, null, u), n.hasItemOption = !0, n; } const m9e = v9e; function y9e(r) { r.registerComponentModel(h9e), r.registerComponentView(m9e), r.registerPreprocessor(function(e) { A5(e.series, "markArea") && (e.markArea = e.markArea || {}); }); } var _9e = function(r, e) { if (e === "all") return { type: "all", title: r.getLocaleModel().get(["legend", "selector", "all"]) }; if (e === "inverse") return { type: "inverse", title: r.getLocaleModel().get(["legend", "selector", "inverse"]) }; }, w9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.layoutMode = { type: "box", ignoreSize: !0 }, t; } return e.prototype.init = function(t, n, i) { this.mergeDefaultAndTheme(t, i), t.selected = t.selected || {}, this._updateSelector(t); }, e.prototype.mergeOption = function(t, n) { r.prototype.mergeOption.call(this, t, n), this._updateSelector(t); }, e.prototype._updateSelector = function(t) { var n = t.selector, i = this.ecModel; n === !0 && (n = t.selector = ["all", "inverse"]), le(n) && M(n, function(a, o) { Se(a) && (a = { type: a }), n[o] = dt(a, _9e(i, a.type)); }); }, e.prototype.optionUpdated = function() { this._updateData(this.ecModel); var t = this._data; if (t[0] && this.get("selectedMode") === "single") { for (var n = !1, i = 0; i < t.length; i++) { var a = t[i].get("name"); if (this.isSelected(a)) { this.select(a), n = !0; break; } } !n && this.select(t[0].get("name")); } }, e.prototype._updateData = function(t) { var n = [], i = []; t.eachRawSeries(function(s) { var u = s.name; i.push(u); var l; if (s.legendVisualProvider) { var c = s.legendVisualProvider, f = c.getAllNames(); t.isSeriesFiltered(s) || (i = i.concat(f)), f.length ? n = n.concat(f) : l = !0; } else l = !0; l && HN(s) && n.push(s.name); }), this._availableNames = i; var a = this.get("data") || n, o = ce(a, function(s) { return (Se(s) || $t(s)) && (s = { name: s }), new rn(s, this, this.ecModel); }, this); this._data = o; }, e.prototype.getData = function() { return this._data; }, e.prototype.select = function(t) { var n = this.option.selected, i = this.get("selectedMode"); if (i === "single") { var a = this._data; M(a, function(o) { n[o.get("name")] = !1; }); } n[t] = !0; }, e.prototype.unSelect = function(t) { this.get("selectedMode") !== "single" && (this.option.selected[t] = !1); }, e.prototype.toggleSelected = function(t) { var n = this.option.selected; n.hasOwnProperty(t) || (n[t] = !0), this[n[t] ? "unSelect" : "select"](t); }, e.prototype.allSelect = function() { var t = this._data, n = this.option.selected; M(t, function(i) { n[i.get("name", !0)] = !0; }); }, e.prototype.inverseSelect = function() { var t = this._data, n = this.option.selected; M(t, function(i) { var a = i.get("name", !0); n.hasOwnProperty(a) || (n[a] = !0), n[a] = !n[a]; }); }, e.prototype.isSelected = function(t) { var n = this.option.selected; return !(n.hasOwnProperty(t) && !n[t]) && _t(this._availableNames, t) >= 0; }, e.prototype.getOrient = function() { return this.get("orient") === "vertical" ? { index: 1, name: "vertical" } : { index: 0, name: "horizontal" }; }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = { z: 4, show: !0, orient: "horizontal", left: "center", top: 0, align: "auto", backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", borderRadius: 0, borderWidth: 0, padding: 5, itemGap: 10, itemWidth: 25, itemHeight: 14, symbolRotate: "inherit", symbolKeepAspect: !0, inactiveColor: "#ccc", inactiveBorderColor: "#ccc", inactiveBorderWidth: "auto", itemStyle: { color: "inherit", opacity: "inherit", borderColor: "inherit", borderWidth: "auto", borderCap: "inherit", borderJoin: "inherit", borderDashOffset: "inherit", borderMiterLimit: "inherit" }, lineStyle: { width: "auto", color: "inherit", inactiveColor: "#ccc", inactiveWidth: 2, opacity: "inherit", type: "inherit", cap: "inherit", join: "inherit", dashOffset: "inherit", miterLimit: "inherit" }, textStyle: { color: "#333" }, selectedMode: !0, selector: !1, selectorLabel: { show: !0, borderRadius: 10, padding: [3, 5, 3, 5], fontSize: 12, fontFamily: "sans-serif", color: "#666", borderWidth: 1, borderColor: "#666" }, emphasis: { selectorLabel: { show: !0, color: "#eee", backgroundColor: "#666" } }, selectorPosition: "auto", selectorItemGap: 7, selectorButtonGap: 10, tooltip: { show: !1 } }, e; }(Rt); const U2 = w9e; var eg = ut, W2 = M, RC = rt, x9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.newlineDisabled = !1, t; } return e.prototype.init = function() { this.group.add(this._contentGroup = new RC()), this.group.add(this._selectorGroup = new RC()), this._isFirstRender = !0; }, e.prototype.getContentGroup = function() { return this._contentGroup; }, e.prototype.getSelectorGroup = function() { return this._selectorGroup; }, e.prototype.render = function(t, n, i) { var a = this._isFirstRender; if (this._isFirstRender = !1, this.resetInner(), !!t.get("show", !0)) { var o = t.get("align"), s = t.get("orient"); (!o || o === "auto") && (o = t.get("left") === "right" && s === "vertical" ? "right" : "left"); var u = t.get("selector", !0), l = t.get("selectorPosition", !0); u && (!l || l === "auto") && (l = s === "horizontal" ? "end" : "start"), this.renderInner(o, t, n, i, u, s, l); var c = t.getBoxLayoutParams(), f = { width: i.getWidth(), height: i.getHeight() }, h = t.get("padding"), p = Bi(c, f, h), d = this.layoutInner(t, o, p, a, u, l), v = Bi(qe({ width: d.width, height: d.height }, c), f, h); this.group.x = v.x - d.x, this.group.y = v.y - d.y, this.group.markRedraw(), this.group.add(this._backgroundEl = ote(d, t)); } }, e.prototype.resetInner = function() { this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll(); }, e.prototype.renderInner = function(t, n, i, a, o, s, u) { var l = this.getContentGroup(), c = $e(), f = n.get("selectedMode"), h = []; i.eachRawSeries(function(p) { !p.get("legendHoverLink") && h.push(p.id); }), W2(n.getData(), function(p, d) { var v = p.get("name"); if (!this.newlineDisabled && (v === "" || v === ` `)) { var g = new RC(); g.newline = !0, l.add(g); return; } var m = i.getSeriesByName(v)[0]; if (!c.get(v)) { if (m) { var y = m.getData(), _ = y.getVisual("legendLineStyle") || {}, w = y.getVisual("legendIcon"), x = y.getVisual("style"), C = this._createItem(m, v, d, p, n, t, _, x, w, f, a); C.on("click", eg(g7, v, null, a, h)).on("mouseover", eg(j2, m.name, null, a, h)).on("mouseout", eg(Y2, m.name, null, a, h)), c.set(v, !0); } else i.eachRawSeries(function(S) { if (!c.get(v) && S.legendVisualProvider) { var b = S.legendVisualProvider; if (!b.containName(v)) return; var E = b.indexOfName(v), T = b.getItemVisual(E, "style"), P = b.getItemVisual(E, "legendIcon"), I = hs(T.fill); I && I[3] === 0 && (I[3] = 0.2, T = oe(oe({}, T), { fill: Fc(I, "rgba") })); var A = this._createItem(S, v, d, p, n, t, {}, T, P, f, a); A.on("click", eg(g7, null, v, a, h)).on("mouseover", eg(j2, null, v, a, h)).on("mouseout", eg(Y2, null, v, a, h)), c.set(v, !0); } }, this); process.env.NODE_ENV !== "production" && (c.get(v) || console.warn(v + " series not exists. Legend data should be same with series name or data name.")); } }, this), o && this._createSelector(o, n, a, s, u); }, e.prototype._createSelector = function(t, n, i, a, o) { var s = this.getSelectorGroup(); W2(t, function(l) { var c = l.type, f = new Yt({ style: { x: 0, y: 0, align: "center", verticalAlign: "middle" }, onclick: function() { i.dispatchAction({ type: c === "all" ? "legendAllSelect" : "legendInverseSelect" }); } }); s.add(f); var h = n.getModel("selectorLabel"), p = n.getModel(["emphasis", "selectorLabel"]); no(f, { normal: h, emphasis: p }, { defaultText: l.title }), rd(f); }); }, e.prototype._createItem = function(t, n, i, a, o, s, u, l, c, f, h) { var p = t.visualDrawType, d = o.get("itemWidth"), v = o.get("itemHeight"), g = o.isSelected(n), m = a.get("symbolRotate"), y = a.get("symbolKeepAspect"), _ = a.get("icon"); c = _ || c || "roundRect"; var w = C9e(c, a, u, l, p, g, h), x = new RC(), C = a.getModel("textStyle"); if (ze(t.getLegendIcon) && (!_ || _ === "inherit")) x.add(t.getLegendIcon({ itemWidth: d, itemHeight: v, icon: c, iconRotate: m, itemStyle: w.itemStyle, lineStyle: w.lineStyle, symbolKeepAspect: y })); else { var S = _ === "inherit" && t.getData().getVisual("symbol") ? m === "inherit" ? t.getData().getVisual("symbolRotate") : m : 0; x.add(S9e({ itemWidth: d, itemHeight: v, icon: c, iconRotate: S, itemStyle: w.itemStyle, lineStyle: w.lineStyle, symbolKeepAspect: y })); } var b = s === "left" ? d + 5 : -5, E = s, T = o.get("formatter"), P = n; Se(T) && T ? P = T.replace("{name}", n != null ? n : "") : ze(T) && (P = T(n)); var I = a.get("inactiveColor"); x.add(new Yt({ style: Sn(C, { text: P, x: b, y: v / 2, fill: g ? C.getTextColor() : I, align: E, verticalAlign: "middle" }) })); var A = new Vt({ shape: x.getBoundingRect(), invisible: !0 }), L = a.getModel("tooltip"); return L.get("show") && Sy({ el: A, componentModel: o, itemName: n, itemTooltipOption: L.option }), x.add(A), x.eachChild(function(D) { D.silent = !0; }), A.silent = !f, this.getContentGroup().add(x), rd(x), x.__legendDataIndex = i, x; }, e.prototype.layoutInner = function(t, n, i, a, o, s) { var u = this.getContentGroup(), l = this.getSelectorGroup(); id(t.get("orient"), u, t.get("itemGap"), i.width, i.height); var c = u.getBoundingRect(), f = [-c.x, -c.y]; if (l.markRedraw(), u.markRedraw(), o) { id( "horizontal", l, t.get("selectorItemGap", !0) ); var h = l.getBoundingRect(), p = [-h.x, -h.y], d = t.get("selectorButtonGap", !0), v = t.getOrient().index, g = v === 0 ? "width" : "height", m = v === 0 ? "height" : "width", y = v === 0 ? "y" : "x"; s === "end" ? p[v] += c[g] + d : f[v] += h[g] + d, p[1 - v] += c[m] / 2 - h[m] / 2, l.x = p[0], l.y = p[1], u.x = f[0], u.y = f[1]; var _ = { x: 0, y: 0 }; return _[g] = c[g] + d + h[g], _[m] = Math.max(c[m], h[m]), _[y] = Math.min(0, h[y] + p[1 - v]), _; } else return u.x = f[0], u.y = f[1], this.group.getBoundingRect(); }, e.prototype.remove = function() { this.getContentGroup().removeAll(), this._isFirstRender = !0; }, e.type = "legend.plain", e; }(Gn); function C9e(r, e, t, n, i, a, o) { function s(g, m) { g.lineWidth === "auto" && (g.lineWidth = m.lineWidth > 0 ? 2 : 0), W2(g, function(y, _) { g[_] === "inherit" && (g[_] = m[_]); }); } var u = e.getModel("itemStyle"), l = u.getItemStyle(), c = r.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", f = u.getShallow("decal"); l.decal = !f || f === "inherit" ? n.decal : Nm(f, o), l.fill === "inherit" && (l.fill = n[i]), l.stroke === "inherit" && (l.stroke = n[c]), l.opacity === "inherit" && (l.opacity = (i === "fill" ? n : t).opacity), s(l, n); var h = e.getModel("lineStyle"), p = h.getLineStyle(); if (s(p, t), l.fill === "auto" && (l.fill = n.fill), l.stroke === "auto" && (l.stroke = n.fill), p.stroke === "auto" && (p.stroke = n.fill), !a) { var d = e.get("inactiveBorderWidth"), v = l[c]; l.lineWidth = d === "auto" ? n.lineWidth > 0 && v ? 2 : 0 : l.lineWidth, l.fill = e.get("inactiveColor"), l.stroke = e.get("inactiveBorderColor"), p.stroke = h.get("inactiveColor"), p.lineWidth = h.get("inactiveWidth"); } return { itemStyle: l, lineStyle: p }; } function S9e(r) { var e = r.icon || "roundRect", t = vi(e, 0, 0, r.itemWidth, r.itemHeight, r.itemStyle.fill, r.symbolKeepAspect); return t.setStyle(r.itemStyle), t.rotation = (r.iconRotate || 0) * Math.PI / 180, t.setOrigin([r.itemWidth / 2, r.itemHeight / 2]), e.indexOf("empty") > -1 && (t.style.stroke = t.style.fill, t.style.fill = "#fff", t.style.lineWidth = 2), t; } function g7(r, e, t, n) { Y2(r, e, t, n), t.dispatchAction({ type: "legendToggleSelect", name: r != null ? r : e }), j2(r, e, t, n); } function _te(r) { for (var e = r.getZr().storage.getDisplayList(), t, n = 0, i = e.length; n < i && !(t = e[n].states.emphasis); ) n++; return t && t.hoverLayer; } function j2(r, e, t, n) { _te(t) || t.dispatchAction({ type: "highlight", seriesName: r, name: e, excludeSeriesId: n }); } function Y2(r, e, t, n) { _te(t) || t.dispatchAction({ type: "downplay", seriesName: r, name: e, excludeSeriesId: n }); } const wte = x9e; function E9e(r) { var e = r.findComponents({ mainType: "legend" }); e && e.length && r.filterSeries(function(t) { for (var n = 0; n < e.length; n++) if (!e[n].isSelected(t.name)) return !1; return !0; }); } function E0(r, e, t) { var n = {}, i = r === "toggleSelected", a; return t.eachComponent("legend", function(o) { i && a != null ? o[a ? "select" : "unSelect"](e.name) : r === "allSelect" || r === "inverseSelect" ? o[r]() : (o[r](e.name), a = o.isSelected(e.name)); var s = o.getData(); M(s, function(u) { var l = u.get("name"); if (!(l === ` ` || l === "")) { var c = o.isSelected(l); n.hasOwnProperty(l) ? n[l] = n[l] && c : n[l] = c; } }); }), r === "allSelect" || r === "inverseSelect" ? { selected: n } : { name: e.name, selected: n }; } function b9e(r) { r.registerAction("legendToggleSelect", "legendselectchanged", ut(E0, "toggleSelected")), r.registerAction("legendAllSelect", "legendselectall", ut(E0, "allSelect")), r.registerAction("legendInverseSelect", "legendinverseselect", ut(E0, "inverseSelect")), r.registerAction("legendSelect", "legendselected", ut(E0, "select")), r.registerAction("legendUnSelect", "legendunselected", ut(E0, "unSelect")); } function xte(r) { r.registerComponentModel(U2), r.registerComponentView(wte), r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER, E9e), r.registerSubTypeDefaulter("legend", function() { return "plain"; }), b9e(r); } var T9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.setScrollDataIndex = function(t) { this.option.scrollDataIndex = t; }, e.prototype.init = function(t, n, i) { var a = Py(t); r.prototype.init.call(this, t, n, i), m7(this, t, a); }, e.prototype.mergeOption = function(t, n) { r.prototype.mergeOption.call(this, t, n), m7(this, this.option, t); }, e.type = "legend.scroll", e.defaultOption = qh(U2.defaultOption, { scrollDataIndex: 0, pageButtonItemGap: 5, pageButtonGap: null, pageButtonPosition: "end", pageFormatter: "{current}/{total}", pageIcons: { horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"], vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"] }, pageIconColor: "#2f4554", pageIconInactiveColor: "#aaa", pageIconSize: 15, pageTextStyle: { color: "#333" }, animationDurationUpdate: 800 }), e; }(U2); function m7(r, e, t) { var n = r.getOrient(), i = [1, 1]; i[n.index] = 0, Nh(e, t, { type: "box", ignoreSize: !!i }); } const P9e = T9e; var y7 = rt, DL = ["width", "height"], ML = ["x", "y"], I9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.newlineDisabled = !0, t._currentIndex = 0, t; } return e.prototype.init = function() { r.prototype.init.call(this), this.group.add(this._containerGroup = new y7()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new y7()); }, e.prototype.resetInner = function() { r.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null; }, e.prototype.renderInner = function(t, n, i, a, o, s, u) { var l = this; r.prototype.renderInner.call(this, t, n, i, a, o, s, u); var c = this._controllerGroup, f = n.get("pageIconSize", !0), h = le(f) ? f : [f, f]; d("pagePrev", 0); var p = n.getModel("pageTextStyle"); c.add(new Yt({ name: "pageText", style: { text: "xx/xx", fill: p.getTextColor(), font: p.getFont(), verticalAlign: "middle", align: "center" }, silent: !0 })), d("pageNext", 1); function d(v, g) { var m = v + "DataIndex", y = Fw(n.get("pageIcons", !0)[n.getOrient().name][g], { onclick: Ae(l._pageGo, l, m, n, a) }, { x: -h[0] / 2, y: -h[1] / 2, width: h[0], height: h[1] }); y.name = v, c.add(y); } }, e.prototype.layoutInner = function(t, n, i, a, o, s) { var u = this.getSelectorGroup(), l = t.getOrient().index, c = DL[l], f = ML[l], h = DL[1 - l], p = ML[1 - l]; o && id( "horizontal", u, t.get("selectorItemGap", !0) ); var d = t.get("selectorButtonGap", !0), v = u.getBoundingRect(), g = [-v.x, -v.y], m = Qe(i); o && (m[c] = i[c] - v[c] - d); var y = this._layoutContentAndController(t, a, m, l, c, h, p, f); if (o) { if (s === "end") g[l] += y[c] + d; else { var _ = v[c] + d; g[l] -= _, y[f] -= _; } y[c] += v[c] + d, g[1 - l] += y[p] + y[h] / 2 - v[h] / 2, y[h] = Math.max(y[h], v[h]), y[p] = Math.min(y[p], v[p] + g[1 - l]), u.x = g[0], u.y = g[1], u.markRedraw(); } return y; }, e.prototype._layoutContentAndController = function(t, n, i, a, o, s, u, l) { var c = this.getContentGroup(), f = this._containerGroup, h = this._controllerGroup; id(t.get("orient"), c, t.get("itemGap"), a ? i.width : null, a ? null : i.height), id( "horizontal", h, t.get("pageButtonItemGap", !0) ); var p = c.getBoundingRect(), d = h.getBoundingRect(), v = this._showController = p[o] > i[o], g = [-p.x, -p.y]; n || (g[a] = c[l]); var m = [0, 0], y = [-d.x, -d.y], _ = wt(t.get("pageButtonGap", !0), t.get("itemGap", !0)); if (v) { var w = t.get("pageButtonPosition", !0); w === "end" ? y[a] += i[o] - d[o] : m[a] += d[o] + _; } y[1 - a] += p[s] / 2 - d[s] / 2, c.setPosition(g), f.setPosition(m), h.setPosition(y); var x = { x: 0, y: 0 }; if (x[o] = v ? i[o] : p[o], x[s] = Math.max(p[s], d[s]), x[u] = Math.min(0, d[u] + y[1 - a]), f.__rectSize = i[o], v) { var C = { x: 0, y: 0 }; C[o] = Math.max(i[o] - d[o] - _, 0), C[s] = x[s], f.setClipPath(new Vt({ shape: C })), f.__rectSize = C[o]; } else h.eachChild(function(b) { b.attr({ invisible: !0, silent: !0 }); }); var S = this._getPageInfo(t); return S.pageIndex != null && Ht( c, { x: S.contentPosition[0], y: S.contentPosition[1] }, v ? t : null ), this._updatePageInfoView(t, S), x; }, e.prototype._pageGo = function(t, n, i) { var a = this._getPageInfo(n)[t]; a != null && i.dispatchAction({ type: "legendScroll", scrollDataIndex: a, legendId: n.id }); }, e.prototype._updatePageInfoView = function(t, n) { var i = this._controllerGroup; M(["pagePrev", "pageNext"], function(c) { var f = c + "DataIndex", h = n[f] != null, p = i.childOfName(c); p && (p.setStyle("fill", h ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), p.cursor = h ? "pointer" : "default"); }); var a = i.childOfName("pageText"), o = t.get("pageFormatter"), s = n.pageIndex, u = s != null ? s + 1 : 0, l = n.pageCount; a && o && a.setStyle("text", Se(o) ? o.replace("{current}", u == null ? "" : u + "").replace("{total}", l == null ? "" : l + "") : o({ current: u, total: l })); }, e.prototype._getPageInfo = function(t) { var n = t.get("scrollDataIndex", !0), i = this.getContentGroup(), a = this._containerGroup.__rectSize, o = t.getOrient().index, s = DL[o], u = ML[o], l = this._findTargetItemIndex(n), c = i.children(), f = c[l], h = c.length, p = h ? 1 : 0, d = { contentPosition: [i.x, i.y], pageCount: p, pageIndex: p - 1, pagePrevDataIndex: null, pageNextDataIndex: null }; if (!f) return d; var v = w(f); d.contentPosition[o] = -v.s; for (var g = l + 1, m = v, y = v, _ = null; g <= h; ++g) _ = w(c[g]), (!_ && y.e > m.s + a || _ && !x(_, m.s)) && (y.i > m.i ? m = y : m = _, m && (d.pageNextDataIndex == null && (d.pageNextDataIndex = m.i), ++d.pageCount)), y = _; for (var g = l - 1, m = v, y = v, _ = null; g >= -1; --g) _ = w(c[g]), (!_ || !x(y, _.s)) && m.i < y.i && (y = m, d.pagePrevDataIndex == null && (d.pagePrevDataIndex = m.i), ++d.pageCount, ++d.pageIndex), m = _; return d; function w(C) { if (C) { var S = C.getBoundingRect(), b = S[u] + C[u]; return { s: b, e: b + S[s], i: C.__legendDataIndex }; } } function x(C, S) { return C.e >= S && C.s <= S + a; } }, e.prototype._findTargetItemIndex = function(t) { if (!this._showController) return 0; var n, i = this.getContentGroup(), a; return i.eachChild(function(o, s) { var u = o.__legendDataIndex; a == null && u != null && (a = s), u === t && (n = s); }), n != null ? n : a; }, e.type = "legend.scroll", e; }(wte); const A9e = I9e; function L9e(r) { r.registerAction("legendScroll", "legendscroll", function(e, t) { var n = e.scrollDataIndex; n != null && t.eachComponent({ mainType: "legend", subType: "scroll", query: e }, function(i) { i.setScrollDataIndex(n); }); }); } function D9e(r) { bt(xte), r.registerComponentModel(P9e), r.registerComponentView(A9e), L9e(r); } function M9e(r) { bt(xte), bt(D9e); } var O9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "dataZoom.inside", e.defaultOption = qh(O1.defaultOption, { disabled: !1, zoomLock: !1, zoomOnMouseWheel: !0, moveOnMouseMove: !0, moveOnMouseWheel: !1, preventDefaultMouseMove: !0 }), e; }(O1); const R9e = O9e; var M5 = Ut(); function N9e(r, e, t) { M5(r).coordSysRecordMap.each(function(n) { var i = n.dataZoomInfoMap.get(e.uid); i && (i.getRange = t); }); } function F9e(r, e) { for (var t = M5(r).coordSysRecordMap, n = t.keys(), i = 0; i < n.length; i++) { var a = n[i], o = t.get(a), s = o.dataZoomInfoMap; if (s) { var u = e.uid, l = s.get(u); l && (s.removeKey(u), s.keys().length || Cte(t, o)); } } } function Cte(r, e) { if (e) { r.removeKey(e.model.uid); var t = e.controller; t && t.dispose(); } } function B9e(r, e) { var t = { model: e, containsPoint: ut(V9e, e), dispatchAction: ut(k9e, r), dataZoomInfoMap: null, controller: null }, n = t.controller = new Xw(r.getZr()); return M(["pan", "zoom", "scrollMove"], function(i) { n.on(i, function(a) { var o = []; t.dataZoomInfoMap.each(function(s) { if (!!a.isAvailableBehavior(s.model.option)) { var u = (s.getRange || {})[i], l = u && u(s.dzReferCoordSysInfo, t.model.mainType, t.controller, a); !s.model.get("disabled", !0) && l && o.push({ dataZoomId: s.model.id, start: l[0], end: l[1] }); } }), o.length && t.dispatchAction(o); }); }), t; } function k9e(r, e) { r.isDisposed() || r.dispatchAction({ type: "dataZoom", animation: { easing: "cubicOut", duration: 100 }, batch: e }); } function V9e(r, e, t, n) { return r.coordinateSystem.containPoint([t, n]); } function G9e(r) { var e, t = "type_", n = { type_true: 2, type_move: 1, type_false: 0, type_undefined: -1 }, i = !0; return r.each(function(a) { var o = a.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0; n[t + s] > n[t + e] && (e = s), i = i && o.get("preventDefaultMouseMove", !0); }), { controlType: e, opt: { zoomOnMouseWheel: !0, moveOnMouseMove: !0, moveOnMouseWheel: !0, preventDefaultMouseMove: !!i } }; } function z9e(r) { r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER, function(e, t) { var n = M5(t), i = n.coordSysRecordMap || (n.coordSysRecordMap = $e()); i.each(function(a) { a.dataZoomInfoMap = null; }), e.eachComponent({ mainType: "dataZoom", subType: "inside" }, function(a) { var o = nte(a); M(o.infoList, function(s) { var u = s.model.uid, l = i.get(u) || i.set(u, B9e(t, s.model)), c = l.dataZoomInfoMap || (l.dataZoomInfoMap = $e()); c.set(a.uid, { dzReferCoordSysInfo: s, model: a, getRange: null }); }); }), i.each(function(a) { var o = a.controller, s, u = a.dataZoomInfoMap; if (u) { var l = u.keys()[0]; l != null && (s = u.get(l)); } if (!s) { Cte(i, a); return; } var c = G9e(u); o.enable(c.controlType, c.opt), o.setPointerChecker(a.containsPoint), My(a, "dispatchAction", s.model.get("throttle", !0), "fixRate"); }); }); } var $9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "dataZoom.inside", t; } return e.prototype.render = function(t, n, i) { if (r.prototype.render.apply(this, arguments), t.noTarget()) { this._clear(); return; } this.range = t.getPercentRange(), N9e(i, t, { pan: Ae(OL.pan, this), zoom: Ae(OL.zoom, this), scrollMove: Ae(OL.scrollMove, this) }); }, e.prototype.dispose = function() { this._clear(), r.prototype.dispose.apply(this, arguments); }, e.prototype._clear = function() { F9e(this.api, this.dataZoomModel), this.range = null; }, e.type = "dataZoom.inside", e; }(S5), OL = { zoom: function(r, e, t, n) { var i = this.range, a = i.slice(), o = r.axisModels[0]; if (!!o) { var s = RL[e](null, [n.originX, n.originY], o, t, r), u = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (a[1] - a[0]) + a[0], l = Math.max(1 / n.scale, 0); a[0] = (a[0] - u) * l + u, a[1] = (a[1] - u) * l + u; var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); if (_v(0, a, [0, 100], 0, c.minSpan, c.maxSpan), this.range = a, i[0] !== a[0] || i[1] !== a[1]) return a; } }, pan: _7(function(r, e, t, n, i, a) { var o = RL[n]([a.oldX, a.oldY], [a.newX, a.newY], e, i, t); return o.signal * (r[1] - r[0]) * o.pixel / o.pixelLength; }), scrollMove: _7(function(r, e, t, n, i, a) { var o = RL[n]([0, 0], [a.scrollDelta, a.scrollDelta], e, i, t); return o.signal * (r[1] - r[0]) * a.scrollDelta; }) }; function _7(r) { return function(e, t, n, i) { var a = this.range, o = a.slice(), s = e.axisModels[0]; if (!!s) { var u = r(o, s, e, t, n, i); if (_v(u, o, [0, 100], "all"), this.range = o, a[0] !== o[0] || a[1] !== o[1]) return o; } }; } var RL = { grid: function(r, e, t, n, i) { var a = t.axis, o = {}, s = i.model.coordinateSystem.getRect(); return r = r || [0, 0], a.dim === "x" ? (o.pixel = e[0] - r[0], o.pixelLength = s.width, o.pixelStart = s.x, o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - r[1], o.pixelLength = s.height, o.pixelStart = s.y, o.signal = a.inverse ? -1 : 1), o; }, polar: function(r, e, t, n, i) { var a = t.axis, o = {}, s = i.model.coordinateSystem, u = s.getRadiusAxis().getExtent(), l = s.getAngleAxis().getExtent(); return r = r ? s.pointToCoord(r) : [0, 0], e = s.pointToCoord(e), t.mainType === "radiusAxis" ? (o.pixel = e[0] - r[0], o.pixelLength = u[1] - u[0], o.pixelStart = u[0], o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - r[1], o.pixelLength = l[1] - l[0], o.pixelStart = l[0], o.signal = a.inverse ? -1 : 1), o; }, singleAxis: function(r, e, t, n, i) { var a = t.axis, o = i.model.coordinateSystem.getRect(), s = {}; return r = r || [0, 0], a.orient === "horizontal" ? (s.pixel = e[0] - r[0], s.pixelLength = o.width, s.pixelStart = o.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - r[1], s.pixelLength = o.height, s.pixelStart = o.y, s.signal = a.inverse ? -1 : 1), s; } }; const H9e = $9e; function Ste(r) { E5(r), r.registerComponentModel(R9e), r.registerComponentView(H9e), z9e(r); } var U9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = qh(O1.defaultOption, { show: !0, right: "ph", top: "ph", width: "ph", height: "ph", left: null, bottom: null, borderColor: "#d2dbee", borderRadius: 3, backgroundColor: "rgba(47,69,84,0)", dataBackground: { lineStyle: { color: "#d2dbee", width: 0.5 }, areaStyle: { color: "#d2dbee", opacity: 0.2 } }, selectedDataBackground: { lineStyle: { color: "#8fb0f7", width: 0.5 }, areaStyle: { color: "#8fb0f7", opacity: 0.2 } }, fillerColor: "rgba(135,175,274,0.2)", handleIcon: "path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z", handleSize: "100%", handleStyle: { color: "#fff", borderColor: "#ACB8D1" }, moveHandleSize: 7, moveHandleIcon: "path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z", moveHandleStyle: { color: "#D2DBEE", opacity: 0.7 }, showDetail: !0, showDataShadow: "auto", realtime: !0, zoomLock: !1, textStyle: { color: "#6E7079" }, brushSelect: !0, brushStyle: { color: "rgba(135,175,274,0.15)" }, emphasis: { handleStyle: { borderColor: "#8FB0F7" }, moveHandleStyle: { color: "#8FB0F7" } } }), e; }(O1); const W9e = U9e; var b0 = Vt, w7 = 7, j9e = 1, NL = 30, Y9e = 7, T0 = "horizontal", x7 = "vertical", X9e = 5, q9e = ["line", "bar", "candlestick", "scatter"], Z9e = { easing: "cubicOut", duration: 100, delay: 0 }, K9e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._displayables = {}, t; } return e.prototype.init = function(t, n) { this.api = n, this._onBrush = Ae(this._onBrush, this), this._onBrushEnd = Ae(this._onBrushEnd, this); }, e.prototype.render = function(t, n, i, a) { if (r.prototype.render.apply(this, arguments), My(this, "_dispatchZoomAction", t.get("throttle"), "fixRate"), this._orient = t.getOrient(), t.get("show") === !1) { this.group.removeAll(); return; } if (t.noTarget()) { this._clear(), this.group.removeAll(); return; } (!a || a.type !== "dataZoom" || a.from !== this.uid) && this._buildView(), this._updateView(); }, e.prototype.dispose = function() { this._clear(), r.prototype.dispose.apply(this, arguments); }, e.prototype._clear = function() { x1(this, "_dispatchZoomAction"); var t = this.api.getZr(); t.off("mousemove", this._onBrush), t.off("mouseup", this._onBrushEnd); }, e.prototype._buildView = function() { var t = this.group; t.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval(); var n = this._displayables.sliderGroup = new rt(); this._renderBackground(), this._renderHandle(), this._renderDataShadow(), t.add(n), this._positionGroup(); }, e.prototype._resetLocation = function() { var t = this.dataZoomModel, n = this.api, i = t.get("brushSelect"), a = i ? Y9e : 0, o = this._findCoordRect(), s = { width: n.getWidth(), height: n.getHeight() }, u = this._orient === T0 ? { right: s.width - o.x - o.width, top: s.height - NL - w7 - a, width: o.width, height: NL } : { right: w7, top: o.y, width: NL, height: o.height }, l = Py(t.option); M(["right", "top", "width", "height"], function(f) { l[f] === "ph" && (l[f] = u[f]); }); var c = Bi(l, s); this._location = { x: c.x, y: c.y }, this._size = [c.width, c.height], this._orient === x7 && this._size.reverse(); }, e.prototype._positionGroup = function() { var t = this.group, n = this._location, i = this._orient, a = this.dataZoomModel.getFirstTargetAxisModel(), o = a && a.get("inverse"), s = this._displayables.sliderGroup, u = (this._dataShadowInfo || {}).otherAxisInverse; s.attr(i === T0 && !o ? { scaleY: u ? 1 : -1, scaleX: 1 } : i === T0 && o ? { scaleY: u ? 1 : -1, scaleX: -1 } : i === x7 && !o ? { scaleY: u ? -1 : 1, scaleX: 1, rotation: Math.PI / 2 } : { scaleY: u ? -1 : 1, scaleX: -1, rotation: Math.PI / 2 }); var l = t.getBoundingRect([s]); t.x = n.x - l.x, t.y = n.y - l.y, t.markRedraw(); }, e.prototype._getViewExtent = function() { return [0, this._size[0]]; }, e.prototype._renderBackground = function() { var t = this.dataZoomModel, n = this._size, i = this._displayables.sliderGroup, a = t.get("brushSelect"); i.add(new b0({ silent: !0, shape: { x: 0, y: 0, width: n[0], height: n[1] }, style: { fill: t.get("backgroundColor") }, z2: -40 })); var o = new b0({ shape: { x: 0, y: 0, width: n[0], height: n[1] }, style: { fill: "transparent" }, z2: 0, onclick: Ae(this._onClickPanel, this) }), s = this.api.getZr(); a ? (o.on("mousedown", this._onBrushStart, this), o.cursor = "crosshair", s.on("mousemove", this._onBrush), s.on("mouseup", this._onBrushEnd)) : (s.off("mousemove", this._onBrush), s.off("mouseup", this._onBrushEnd)), i.add(o); }, e.prototype._renderDataShadow = function() { var t = this._dataShadowInfo = this._prepareDataShadowInfo(); if (this._displayables.dataShadowSegs = [], !t) return; var n = this._size, i = this._shadowSize || [], a = t.series, o = a.getRawData(), s = a.getShadowDim ? a.getShadowDim() : t.otherDim; if (s == null) return; var u = this._shadowPolygonPts, l = this._shadowPolylinePts; if (o !== this._shadowData || s !== this._shadowDim || n[0] !== i[0] || n[1] !== i[1]) { var c = o.getDataExtent(s), f = (c[1] - c[0]) * 0.3; c = [c[0] - f, c[1] + f]; var h = [0, n[1]], p = [0, n[0]], d = [[n[0], 0], [0, 0]], v = [], g = p[1] / (o.count() - 1), m = 0, y = Math.round(o.count() / n[0]), _; o.each([s], function(b, E) { if (y > 0 && E % y) { m += g; return; } var T = b == null || isNaN(b) || b === "", P = T ? 0 : Fr(b, c, h, !0); T && !_ && E ? (d.push([d[d.length - 1][0], 0]), v.push([v[v.length - 1][0], 0])) : !T && _ && (d.push([m, 0]), v.push([m, 0])), d.push([m, P]), v.push([m, P]), m += g, _ = T; }), u = this._shadowPolygonPts = d, l = this._shadowPolylinePts = v; } this._shadowData = o, this._shadowDim = s, this._shadowSize = [n[0], n[1]]; var w = this.dataZoomModel; function x(b) { var E = w.getModel(b ? "selectedDataBackground" : "dataBackground"), T = new rt(), P = new Ho({ shape: { points: u }, segmentIgnoreThreshold: 1, style: E.getModel("areaStyle").getAreaStyle(), silent: !0, z2: -20 }), I = new jo({ shape: { points: l }, segmentIgnoreThreshold: 1, style: E.getModel("lineStyle").getLineStyle(), silent: !0, z2: -19 }); return T.add(P), T.add(I), T; } for (var C = 0; C < 3; C++) { var S = x(C === 1); this._displayables.sliderGroup.add(S), this._displayables.dataShadowSegs.push(S); } }, e.prototype._prepareDataShadowInfo = function() { var t = this.dataZoomModel, n = t.get("showDataShadow"); if (n !== !1) { var i, a = this.ecModel; return t.eachTargetAxis(function(o, s) { var u = t.getAxisProxy(o, s).getTargetSeriesModels(); M(u, function(l) { if (!i && !(n !== !0 && _t(q9e, l.get("type")) < 0)) { var c = a.getComponent(ih(o), s).axis, f = J9e(o), h, p = l.coordinateSystem; f != null && p.getOtherAxis && (h = p.getOtherAxis(c).inverse), f = l.getData().mapDimension(f), i = { thisAxis: c, series: l, thisDim: o, otherDim: f, otherAxisInverse: h }; } }, this); }, this), i; } }, e.prototype._renderHandle = function() { var t = this.group, n = this._displayables, i = n.handles = [null, null], a = n.handleLabels = [null, null], o = this._displayables.sliderGroup, s = this._size, u = this.dataZoomModel, l = this.api, c = u.get("borderRadius") || 0, f = u.get("brushSelect"), h = n.filler = new b0({ silent: f, style: { fill: u.get("fillerColor") }, textConfig: { position: "inside" } }); o.add(h), o.add(new b0({ silent: !0, subPixelOptimize: !0, shape: { x: 0, y: 0, width: s[0], height: s[1], r: c }, style: { stroke: u.get("dataBackgroundColor") || u.get("borderColor"), lineWidth: j9e, fill: "rgba(0,0,0,0)" } })), M([0, 1], function(_) { var w = u.get("handleIcon"); !EE[w] && w.indexOf("path://") < 0 && w.indexOf("image://") < 0 && (w = "path://" + w, process.env.NODE_ENV !== "production" && rl("handleIcon now needs 'path://' prefix when using a path string")); var x = vi(w, -1, 0, 2, 2, null, !0); x.attr({ cursor: C7(this._orient), draggable: !0, drift: Ae(this._onDragMove, this, _), ondragend: Ae(this._onDragEnd, this), onmouseover: Ae(this._showDataInfo, this, !0), onmouseout: Ae(this._showDataInfo, this, !1), z2: 5 }); var C = x.getBoundingRect(), S = u.get("handleSize"); this._handleHeight = ye(S, this._size[1]), this._handleWidth = C.width / C.height * this._handleHeight, x.setStyle(u.getModel("handleStyle").getItemStyle()), x.style.strokeNoScale = !0, x.rectHover = !0, x.ensureState("emphasis").style = u.getModel(["emphasis", "handleStyle"]).getItemStyle(), rd(x); var b = u.get("handleColor"); b != null && (x.style.fill = b), o.add(i[_] = x); var E = u.getModel("textStyle"); t.add(a[_] = new Yt({ silent: !0, invisible: !0, style: Sn(E, { x: 0, y: 0, text: "", verticalAlign: "middle", align: "center", fill: E.getTextColor(), font: E.getFont() }), z2: 10 })); }, this); var p = h; if (f) { var d = ye(u.get("moveHandleSize"), s[1]), v = n.moveHandle = new Vt({ style: u.getModel("moveHandleStyle").getItemStyle(), silent: !0, shape: { r: [0, 0, 2, 2], y: s[1] - 0.5, height: d } }), g = d * 0.8, m = n.moveHandleIcon = vi(u.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0); m.silent = !0, m.y = s[1] + d / 2 - 0.5, v.ensureState("emphasis").style = u.getModel(["emphasis", "moveHandleStyle"]).getItemStyle(); var y = Math.min(s[1] / 2, Math.max(d, 10)); p = n.moveZone = new Vt({ invisible: !0, shape: { y: s[1] - y, height: d + y } }), p.on("mouseover", function() { l.enterEmphasis(v); }).on("mouseout", function() { l.leaveEmphasis(v); }), o.add(v), o.add(m), o.add(p); } p.attr({ draggable: !0, cursor: C7(this._orient), drift: Ae(this._onDragMove, this, "all"), ondragstart: Ae(this._showDataInfo, this, !0), ondragend: Ae(this._onDragEnd, this), onmouseover: Ae(this._showDataInfo, this, !0), onmouseout: Ae(this._showDataInfo, this, !1) }); }, e.prototype._resetInterval = function() { var t = this._range = this.dataZoomModel.getPercentRange(), n = this._getViewExtent(); this._handleEnds = [Fr(t[0], [0, 100], n, !0), Fr(t[1], [0, 100], n, !0)]; }, e.prototype._updateInterval = function(t, n) { var i = this.dataZoomModel, a = this._handleEnds, o = this._getViewExtent(), s = i.findRepresentativeAxisProxy().getMinMaxSpan(), u = [0, 100]; _v(n, a, o, i.get("zoomLock") ? "all" : t, s.minSpan != null ? Fr(s.minSpan, u, o, !0) : null, s.maxSpan != null ? Fr(s.maxSpan, u, o, !0) : null); var l = this._range, c = this._range = Js([Fr(a[0], o, u, !0), Fr(a[1], o, u, !0)]); return !l || l[0] !== c[0] || l[1] !== c[1]; }, e.prototype._updateView = function(t) { var n = this._displayables, i = this._handleEnds, a = Js(i.slice()), o = this._size; M([0, 1], function(p) { var d = n.handles[p], v = this._handleHeight; d.attr({ scaleX: v / 2, scaleY: v / 2, x: i[p] + (p ? -1 : 1), y: o[1] / 2 - v / 2 }); }, this), n.filler.setShape({ x: a[0], y: 0, width: a[1] - a[0], height: o[1] }); var s = { x: a[0], width: a[1] - a[0] }; n.moveHandle && (n.moveHandle.setShape(s), n.moveZone.setShape(s), n.moveZone.getBoundingRect(), n.moveHandleIcon && n.moveHandleIcon.attr("x", s.x + s.width / 2)); for (var u = n.dataShadowSegs, l = [0, a[0], a[1], o[0]], c = 0; c < u.length; c++) { var f = u[c], h = f.getClipPath(); h || (h = new Vt(), f.setClipPath(h)), h.setShape({ x: l[c], y: 0, width: l[c + 1] - l[c], height: o[1] }); } this._updateDataInfo(t); }, e.prototype._updateDataInfo = function(t) { var n = this.dataZoomModel, i = this._displayables, a = i.handleLabels, o = this._orient, s = ["", ""]; if (n.get("showDetail")) { var u = n.findRepresentativeAxisProxy(); if (u) { var l = u.getAxisModel().axis, c = this._range, f = t ? u.calculateDataWindow({ start: c[0], end: c[1] }).valueWindow : u.getDataValueWindow(); s = [this._formatLabel(f[0], l), this._formatLabel(f[1], l)]; } } var h = Js(this._handleEnds.slice()); p.call(this, 0), p.call(this, 1); function p(d) { var v = nd(i.handles[d].parent, this.group), g = jT(d === 0 ? "right" : "left", v), m = this._handleWidth / 2 + X9e, y = Uu([h[d] + (d === 0 ? -m : m), this._size[1] / 2], v); a[d].setStyle({ x: y[0], y: y[1], verticalAlign: o === T0 ? "middle" : g, align: o === T0 ? g : "center", text: s[d] }); } }, e.prototype._formatLabel = function(t, n) { var i = this.dataZoomModel, a = i.get("labelFormatter"), o = i.get("labelPrecision"); (o == null || o === "auto") && (o = n.getPixelPrecision()); var s = t == null || isNaN(t) ? "" : n.type === "category" || n.type === "time" ? n.scale.getLabel({ value: Math.round(t) }) : t.toFixed(Math.min(o, 20)); return ze(a) ? a(t, s) : Se(a) ? a.replace("{value}", s) : s; }, e.prototype._showDataInfo = function(t) { t = this._dragging || t; var n = this._displayables, i = n.handleLabels; i[0].attr("invisible", !t), i[1].attr("invisible", !t), n.moveHandle && this.api[t ? "enterEmphasis" : "leaveEmphasis"](n.moveHandle, 1); }, e.prototype._onDragMove = function(t, n, i, a) { this._dragging = !0, rf(a.event); var o = this._displayables.sliderGroup.getLocalTransform(), s = Uu([n, i], o, !0), u = this._updateInterval(t, s[0]), l = this.dataZoomModel.get("realtime"); this._updateView(!l), u && l && this._dispatchZoomAction(!0); }, e.prototype._onDragEnd = function() { this._dragging = !1, this._showDataInfo(!1); var t = this.dataZoomModel.get("realtime"); !t && this._dispatchZoomAction(!1); }, e.prototype._onClickPanel = function(t) { var n = this._size, i = this._displayables.sliderGroup.transformCoordToLocal(t.offsetX, t.offsetY); if (!(i[0] < 0 || i[0] > n[0] || i[1] < 0 || i[1] > n[1])) { var a = this._handleEnds, o = (a[0] + a[1]) / 2, s = this._updateInterval("all", i[0] - o); this._updateView(), s && this._dispatchZoomAction(!1); } }, e.prototype._onBrushStart = function(t) { var n = t.offsetX, i = t.offsetY; this._brushStart = new ft(n, i), this._brushing = !0, this._brushStartTime = +new Date(); }, e.prototype._onBrushEnd = function(t) { if (!!this._brushing) { var n = this._displayables.brushRect; if (this._brushing = !1, !!n) { n.attr("ignore", !0); var i = n.shape, a = +new Date(); if (!(a - this._brushStartTime < 200 && Math.abs(i.width) < 5)) { var o = this._getViewExtent(), s = [0, 100]; this._range = Js([Fr(i.x, o, s, !0), Fr(i.x + i.width, o, s, !0)]), this._handleEnds = [i.x, i.x + i.width], this._updateView(), this._dispatchZoomAction(!1); } } } }, e.prototype._onBrush = function(t) { this._brushing && (rf(t.event), this._updateBrushRect(t.offsetX, t.offsetY)); }, e.prototype._updateBrushRect = function(t, n) { var i = this._displayables, a = this.dataZoomModel, o = i.brushRect; o || (o = i.brushRect = new b0({ silent: !0, style: a.getModel("brushStyle").getItemStyle() }), i.sliderGroup.add(o)), o.attr("ignore", !1); var s = this._brushStart, u = this._displayables.sliderGroup, l = u.transformCoordToLocal(t, n), c = u.transformCoordToLocal(s.x, s.y), f = this._size; l[0] = Math.max(Math.min(f[0], l[0]), 0), o.setShape({ x: c[0], y: 0, width: l[0] - c[0], height: f[1] }); }, e.prototype._dispatchZoomAction = function(t) { var n = this._range; this.api.dispatchAction({ type: "dataZoom", from: this.uid, dataZoomId: this.dataZoomModel.id, animation: t ? Z9e : null, start: n[0], end: n[1] }); }, e.prototype._findCoordRect = function() { var t, n = nte(this.dataZoomModel).infoList; if (!t && n.length) { var i = n[0].model.coordinateSystem; t = i.getRect && i.getRect(); } if (!t) { var a = this.api.getWidth(), o = this.api.getHeight(); t = { x: a * 0.2, y: o * 0.2, width: a * 0.6, height: o * 0.6 }; } return t; }, e.type = "dataZoom.slider", e; }(S5); function J9e(r) { var e = { x: "y", y: "x", radius: "angle", angle: "radius" }; return e[r]; } function C7(r) { return r === "vertical" ? "ns-resize" : "ew-resize"; } const Q9e = K9e; function Ete(r) { r.registerComponentModel(W9e), r.registerComponentView(Q9e), E5(r); } function e7e(r) { bt(Ste), bt(Ete); } var t7e = { get: function(r, e, t) { var n = Qe((r7e[r] || {})[e]); return t && le(n) ? n[n.length - 1] : n; } }, r7e = { color: { active: ["#006edd", "#e0ffff"], inactive: ["rgba(0,0,0,0)"] }, colorHue: { active: [0, 360], inactive: [0, 0] }, colorSaturation: { active: [0.3, 1], inactive: [0, 0] }, colorLightness: { active: [0.9, 0.5], inactive: [0, 0] }, colorAlpha: { active: [0.3, 1], inactive: [0, 0] }, opacity: { active: [0.3, 1], inactive: [0, 0] }, symbol: { active: ["circle", "roundRect", "diamond"], inactive: ["none"] }, symbolSize: { active: [10, 50], inactive: [0, 0] } }; const bte = t7e; var S7 = Aa.mapVisual, n7e = Aa.eachVisual, i7e = le, E7 = M, a7e = Js, o7e = Fr, s7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.stateList = ["inRange", "outOfRange"], t.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], t.layoutMode = { type: "box", ignoreSize: !0 }, t.dataBound = [-1 / 0, 1 / 0], t.targetVisuals = {}, t.controllerVisuals = {}, t; } return e.prototype.init = function(t, n, i) { this.mergeDefaultAndTheme(t, i); }, e.prototype.optionUpdated = function(t, n) { var i = this.option; !n && pte(i, t, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption(); }, e.prototype.resetVisual = function(t) { var n = this.stateList; t = Ae(t, this), this.controllerVisuals = z2(this.option.controller, n, t), this.targetVisuals = z2(this.option.target, n, t); }, e.prototype.getItemSymbol = function() { return null; }, e.prototype.getTargetSeriesIndices = function() { var t = this.option.seriesIndex, n = []; return t == null || t === "all" ? this.ecModel.eachSeries(function(i, a) { n.push(a); }) : n = jr(t), n; }, e.prototype.eachTargetSeries = function(t, n) { M(this.getTargetSeriesIndices(), function(i) { var a = this.ecModel.getSeriesByIndex(i); a && t.call(n, a); }, this); }, e.prototype.isTargetSeries = function(t) { var n = !1; return this.eachTargetSeries(function(i) { i === t && (n = !0); }), n; }, e.prototype.formatValueText = function(t, n, i) { var a = this.option, o = a.precision, s = this.dataBound, u = a.formatter, l; i = i || ["<", ">"], le(t) && (t = t.slice(), l = !0); var c = n ? t : l ? [f(t[0]), f(t[1])] : f(t); if (Se(u)) return u.replace("{value}", l ? c[0] : c).replace("{value2}", l ? c[1] : c); if (ze(u)) return l ? u(t[0], t[1]) : u(t); if (l) return t[0] === s[0] ? i[0] + " " + c[1] : t[1] === s[1] ? i[1] + " " + c[0] : c[0] + " - " + c[1]; return c; function f(h) { return h === s[0] ? "min" : h === s[1] ? "max" : (+h).toFixed(Math.min(o, 20)); } }, e.prototype.resetExtent = function() { var t = this.option, n = a7e([t.min, t.max]); this._dataExtent = n; }, e.prototype.getDataDimensionIndex = function(t) { var n = this.option.dimension; if (n != null) return t.getDimensionIndex(n); for (var i = t.dimensions, a = i.length - 1; a >= 0; a--) { var o = i[a], s = t.getDimensionInfo(o); if (!s.isCalculationCoord) return s.storeDimIndex; } }, e.prototype.getExtent = function() { return this._dataExtent.slice(); }, e.prototype.completeVisualOption = function() { var t = this.ecModel, n = this.option, i = { inRange: n.inRange, outOfRange: n.outOfRange }, a = n.target || (n.target = {}), o = n.controller || (n.controller = {}); dt(a, i), dt(o, i); var s = this.isCategory(); u.call(this, a), u.call(this, o), l.call(this, a, "inRange", "outOfRange"), c.call(this, o); function u(f) { i7e(n.color) && !f.inRange && (f.inRange = { color: n.color.slice().reverse() }), f.inRange = f.inRange || { color: t.get("gradientColor") }; } function l(f, h, p) { var d = f[h], v = f[p]; d && !v && (v = f[p] = {}, E7(d, function(g, m) { if (!!Aa.isValidType(m)) { var y = bte.get(m, "inactive", s); y != null && (v[m] = y, m === "color" && !v.hasOwnProperty("opacity") && !v.hasOwnProperty("colorAlpha") && (v.opacity = [0, 0])); } })); } function c(f) { var h = (f.inRange || {}).symbol || (f.outOfRange || {}).symbol, p = (f.inRange || {}).symbolSize || (f.outOfRange || {}).symbolSize, d = this.get("inactiveColor"), v = this.getItemSymbol(), g = v || "roundRect"; E7(this.stateList, function(m) { var y = this.itemSize, _ = f[m]; _ || (_ = f[m] = { color: s ? d : [d] }), _.symbol == null && (_.symbol = h && Qe(h) || (s ? g : [g])), _.symbolSize == null && (_.symbolSize = p && Qe(p) || (s ? y[0] : [y[0], y[0]])), _.symbol = S7(_.symbol, function(C) { return C === "none" ? g : C; }); var w = _.symbolSize; if (w != null) { var x = -1 / 0; n7e(w, function(C) { C > x && (x = C); }), _.symbolSize = S7(w, function(C) { return o7e(C, [0, x], [0, y[0]], !0); }); } }, this); } }, e.prototype.resetItemSize = function() { this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))]; }, e.prototype.isCategory = function() { return !!this.option.categories; }, e.prototype.setSelected = function(t) { }, e.prototype.getSelected = function() { return null; }, e.prototype.getValueState = function(t) { return null; }, e.prototype.getVisualMeta = function(t) { return null; }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = { show: !0, z: 4, seriesIndex: "all", min: 0, max: 200, left: 0, right: null, top: null, bottom: 0, itemWidth: null, itemHeight: null, inverse: !1, orient: "vertical", backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", contentColor: "#5793f3", inactiveColor: "#aaa", borderWidth: 0, padding: 5, textGap: 10, precision: 0, textStyle: { color: "#333" } }, e; }(Rt); const JE = s7e; var b7 = [20, 140], u7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.optionUpdated = function(t, n) { r.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(i) { i.mappingMethod = "linear", i.dataExtent = this.getExtent(); }), this._resetRange(); }, e.prototype.resetItemSize = function() { r.prototype.resetItemSize.apply(this, arguments); var t = this.itemSize; (t[0] == null || isNaN(t[0])) && (t[0] = b7[0]), (t[1] == null || isNaN(t[1])) && (t[1] = b7[1]); }, e.prototype._resetRange = function() { var t = this.getExtent(), n = this.option.range; !n || n.auto ? (t.auto = 1, this.option.range = t) : le(n) && (n[0] > n[1] && n.reverse(), n[0] = Math.max(n[0], t[0]), n[1] = Math.min(n[1], t[1])); }, e.prototype.completeVisualOption = function() { r.prototype.completeVisualOption.apply(this, arguments), M(this.stateList, function(t) { var n = this.option.controller[t].symbolSize; n && n[0] !== n[1] && (n[0] = n[1] / 3); }, this); }, e.prototype.setSelected = function(t) { this.option.range = t.slice(), this._resetRange(); }, e.prototype.getSelected = function() { var t = this.getExtent(), n = Js((this.get("range") || []).slice()); return n[0] > t[1] && (n[0] = t[1]), n[1] > t[1] && (n[1] = t[1]), n[0] < t[0] && (n[0] = t[0]), n[1] < t[0] && (n[1] = t[0]), n; }, e.prototype.getValueState = function(t) { var n = this.option.range, i = this.getExtent(); return (n[0] <= i[0] || n[0] <= t) && (n[1] >= i[1] || t <= n[1]) ? "inRange" : "outOfRange"; }, e.prototype.findTargetDataIndices = function(t) { var n = []; return this.eachTargetSeries(function(i) { var a = [], o = i.getData(); o.each(this.getDataDimensionIndex(o), function(s, u) { t[0] <= s && s <= t[1] && a.push(u); }, this), n.push({ seriesId: i.id, dataIndex: a }); }, this), n; }, e.prototype.getVisualMeta = function(t) { var n = T7(this, "outOfRange", this.getExtent()), i = T7(this, "inRange", this.option.range.slice()), a = []; function o(p, d) { a.push({ value: p, color: t(p, d) }); } for (var s = 0, u = 0, l = i.length, c = n.length; u < c && (!i.length || n[u] <= i[0]); u++) n[u] < i[s] && o(n[u], "outOfRange"); for (var f = 1; s < l; s++, f = 0) f && a.length && o(i[s], "outOfRange"), o(i[s], "inRange"); for (var f = 1; u < c; u++) (!i.length || i[i.length - 1] < n[u]) && (f && (a.length && o(a[a.length - 1].value, "outOfRange"), f = 0), o(n[u], "outOfRange")); var h = a.length; return { stops: a, outerColors: [h ? a[0].color : "transparent", h ? a[h - 1].color : "transparent"] }; }, e.type = "visualMap.continuous", e.defaultOption = qh(JE.defaultOption, { align: "auto", calculable: !1, hoverLink: !0, realtime: !0, handleIcon: "path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z", handleSize: "120%", handleStyle: { borderColor: "#fff", borderWidth: 1 }, indicatorIcon: "circle", indicatorSize: "50%", indicatorStyle: { borderColor: "#fff", borderWidth: 2, shadowBlur: 2, shadowOffsetX: 1, shadowOffsetY: 1, shadowColor: "rgba(0,0,0,0.2)" } }), e; }(JE); function T7(r, e, t) { if (t[0] === t[1]) return t.slice(); for (var n = 200, i = (t[1] - t[0]) / n, a = t[0], o = [], s = 0; s <= n && a < t[1]; s++) o.push(a), a += i; return o.push(t[1]), o; } const l7e = u7e; var c7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t.autoPositionValues = { left: 1, right: 1, top: 1, bottom: 1 }, t; } return e.prototype.init = function(t, n) { this.ecModel = t, this.api = n; }, e.prototype.render = function(t, n, i, a) { if (this.visualMapModel = t, t.get("show") === !1) { this.group.removeAll(); return; } this.doRender(t, n, i, a); }, e.prototype.renderBackground = function(t) { var n = this.visualMapModel, i = Ty(n.get("padding") || 0), a = t.getBoundingRect(); t.add(new Vt({ z2: -1, silent: !0, shape: { x: a.x - i[3], y: a.y - i[0], width: a.width + i[3] + i[1], height: a.height + i[0] + i[2] }, style: { fill: n.get("backgroundColor"), stroke: n.get("borderColor"), lineWidth: n.get("borderWidth") } })); }, e.prototype.getControllerVisual = function(t, n, i) { i = i || {}; var a = i.forceState, o = this.visualMapModel, s = {}; if (n === "color") { var u = o.get("contentColor"); s.color = u; } function l(p) { return s[p]; } function c(p, d) { s[p] = d; } var f = o.controllerVisuals[a || o.getValueState(t)], h = Aa.prepareVisualTypes(f); return M(h, function(p) { var d = f[p]; i.convertOpacityToAlpha && p === "opacity" && (p = "colorAlpha", d = f.__alphaForOpacity), Aa.dependsOn(p, n) && d && d.applyVisual(t, l, c); }), s[n]; }, e.prototype.positionGroup = function(t) { var n = this.visualMapModel, i = this.api; QT(t, n.getBoxLayoutParams(), { width: i.getWidth(), height: i.getHeight() }); }, e.prototype.doRender = function(t, n, i, a) { }, e.type = "visualMap", e; }(Gn); const Tte = c7e; var P7 = [["left", "right", "width"], ["top", "bottom", "height"]]; function Pte(r, e, t) { var n = r.option, i = n.align; if (i != null && i !== "auto") return i; for (var a = { width: e.getWidth(), height: e.getHeight() }, o = n.orient === "horizontal" ? 1 : 0, s = P7[o], u = [0, null, 10], l = {}, c = 0; c < 3; c++) l[P7[1 - o][c]] = u[c], l[s[c]] = c === 2 ? t[0] : n[s[c]]; var f = [["x", "width", 3], ["y", "height", 0]][o], h = Bi(l, a, n.padding); return s[(h.margin[f[2]] || 0) + h[f[0]] + h[f[1]] * 0.5 < a[f[1]] * 0.5 ? 0 : 1]; } function wS(r, e) { return M(r || [], function(t) { t.dataIndex != null && (t.dataIndexInside = t.dataIndex, t.dataIndex = null), t.highlightKey = "visualMap" + (e ? e.componentIndex : ""); }), r; } var bl = Fr, f7e = M, I7 = Math.min, FL = Math.max, h7e = 12, p7e = 6, d7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._shapes = {}, t._dataInterval = [], t._handleEnds = [], t._hoverLinkDataIndices = [], t; } return e.prototype.doRender = function(t, n, i, a) { this._api = i, (!a || a.type !== "selectDataRange" || a.from !== this.uid) && this._buildView(); }, e.prototype._buildView = function() { this.group.removeAll(); var t = this.visualMapModel, n = this.group; this._orient = t.get("orient"), this._useHandle = t.get("calculable"), this._resetInterval(), this._renderBar(n); var i = t.get("text"); this._renderEndsText(n, i, 0), this._renderEndsText(n, i, 1), this._updateView(!0), this.renderBackground(n), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(n); }, e.prototype._renderEndsText = function(t, n, i) { if (!!n) { var a = n[1 - i]; a = a != null ? a + "" : ""; var o = this.visualMapModel, s = o.get("textGap"), u = o.itemSize, l = this._shapes.mainGroup, c = this._applyTransform([u[0] / 2, i === 0 ? -s : u[1] + s], l), f = this._applyTransform(i === 0 ? "bottom" : "top", l), h = this._orient, p = this.visualMapModel.textStyleModel; this.group.add(new Yt({ style: Sn(p, { x: c[0], y: c[1], verticalAlign: h === "horizontal" ? "middle" : f, align: h === "horizontal" ? f : "center", text: a }) })); } }, e.prototype._renderBar = function(t) { var n = this.visualMapModel, i = this._shapes, a = n.itemSize, o = this._orient, s = this._useHandle, u = Pte(n, this.api, a), l = i.mainGroup = this._createBarGroup(u), c = new rt(); l.add(c), c.add(i.outOfRange = A7()), c.add(i.inRange = A7(null, s ? D7(this._orient) : null, Ae(this._dragHandle, this, "all", !1), Ae(this._dragHandle, this, "all", !0))), c.setClipPath(new Vt({ shape: { x: 0, y: 0, width: a[0], height: a[1], r: 3 } })); var f = n.textStyleModel.getTextRect("\u56FD"), h = FL(f.width, f.height); s && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(n, l, 0, a, h, o), this._createHandle(n, l, 1, a, h, o)), this._createIndicator(n, l, a, h, o), t.add(l); }, e.prototype._createHandle = function(t, n, i, a, o, s) { var u = Ae(this._dragHandle, this, i, !1), l = Ae(this._dragHandle, this, i, !0), c = tl(t.get("handleSize"), a[0]), f = vi(t.get("handleIcon"), -c / 2, -c / 2, c, c, null, !0), h = D7(this._orient); f.attr({ cursor: h, draggable: !0, drift: u, ondragend: l, onmousemove: function(m) { rf(m.event); } }), f.x = a[0] / 2, f.useStyle(t.getModel("handleStyle").getItemStyle()), f.setStyle({ strokeNoScale: !0, strokeFirst: !0 }), f.style.lineWidth *= 2, f.ensureState("emphasis").style = t.getModel(["emphasis", "handleStyle"]).getItemStyle(), Up(f, !0), n.add(f); var p = this.visualMapModel.textStyleModel, d = new Yt({ cursor: h, draggable: !0, drift: u, onmousemove: function(m) { rf(m.event); }, ondragend: l, style: Sn(p, { x: 0, y: 0, text: "" }) }); d.ensureState("blur").style = { opacity: 0.1 }, d.stateTransition = { duration: 200 }, this.group.add(d); var v = [c, 0], g = this._shapes; g.handleThumbs[i] = f, g.handleLabelPoints[i] = v, g.handleLabels[i] = d; }, e.prototype._createIndicator = function(t, n, i, a, o) { var s = tl(t.get("indicatorSize"), i[0]), u = vi(t.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0); u.attr({ cursor: "move", invisible: !0, silent: !0, x: i[0] / 2 }); var l = t.getModel("indicatorStyle").getItemStyle(); if (u instanceof Ba) { var c = u.style; u.useStyle(oe({ image: c.image, x: c.x, y: c.y, width: c.width, height: c.height }, l)); } else u.useStyle(l); n.add(u); var f = this.visualMapModel.textStyleModel, h = new Yt({ silent: !0, invisible: !0, style: Sn(f, { x: 0, y: 0, text: "" }) }); this.group.add(h); var p = [(o === "horizontal" ? a / 2 : p7e) + i[0] / 2, 0], d = this._shapes; d.indicator = u, d.indicatorLabel = h, d.indicatorLabelPoint = p, this._firstShowIndicator = !0; }, e.prototype._dragHandle = function(t, n, i, a) { if (!!this._useHandle) { if (this._dragging = !n, !n) { var o = this._applyTransform([i, a], this._shapes.mainGroup, !0); this._updateInterval(t, o[1]), this._hideIndicator(), this._updateView(); } n === !this.visualMapModel.get("realtime") && this.api.dispatchAction({ type: "selectDataRange", from: this.uid, visualMapId: this.visualMapModel.id, selected: this._dataInterval.slice() }), n ? !this._hovering && this._clearHoverLinkToSeries() : L7(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1); } }, e.prototype._resetInterval = function() { var t = this.visualMapModel, n = this._dataInterval = t.getSelected(), i = t.getExtent(), a = [0, t.itemSize[1]]; this._handleEnds = [bl(n[0], i, a, !0), bl(n[1], i, a, !0)]; }, e.prototype._updateInterval = function(t, n) { n = n || 0; var i = this.visualMapModel, a = this._handleEnds, o = [0, i.itemSize[1]]; _v( n, a, o, t, 0 ); var s = i.getExtent(); this._dataInterval = [bl(a[0], o, s, !0), bl(a[1], o, s, !0)]; }, e.prototype._updateView = function(t) { var n = this.visualMapModel, i = n.getExtent(), a = this._shapes, o = [0, n.itemSize[1]], s = t ? o : this._handleEnds, u = this._createBarVisual(this._dataInterval, i, s, "inRange"), l = this._createBarVisual(i, i, o, "outOfRange"); a.inRange.setStyle({ fill: u.barColor }).setShape("points", u.barPoints), a.outOfRange.setStyle({ fill: l.barColor }).setShape("points", l.barPoints), this._updateHandle(s, u); }, e.prototype._createBarVisual = function(t, n, i, a) { var o = { forceState: a, convertOpacityToAlpha: !0 }, s = this._makeColorGradient(t, o), u = [this.getControllerVisual(t[0], "symbolSize", o), this.getControllerVisual(t[1], "symbolSize", o)], l = this._createBarPoints(i, u); return { barColor: new xy(0, 0, 0, 1, s), barPoints: l, handlesColor: [s[0].color, s[s.length - 1].color] }; }, e.prototype._makeColorGradient = function(t, n) { var i = 100, a = [], o = (t[1] - t[0]) / i; a.push({ color: this.getControllerVisual(t[0], "color", n), offset: 0 }); for (var s = 1; s < i; s++) { var u = t[0] + o * s; if (u > t[1]) break; a.push({ color: this.getControllerVisual(u, "color", n), offset: s / i }); } return a.push({ color: this.getControllerVisual(t[1], "color", n), offset: 1 }), a; }, e.prototype._createBarPoints = function(t, n) { var i = this.visualMapModel.itemSize; return [[i[0] - n[0], t[0]], [i[0], t[0]], [i[0], t[1]], [i[0] - n[1], t[1]]]; }, e.prototype._createBarGroup = function(t) { var n = this._orient, i = this.visualMapModel.get("inverse"); return new rt(n === "horizontal" && !i ? { scaleX: t === "bottom" ? 1 : -1, rotation: Math.PI / 2 } : n === "horizontal" && i ? { scaleX: t === "bottom" ? -1 : 1, rotation: -Math.PI / 2 } : n === "vertical" && !i ? { scaleX: t === "left" ? 1 : -1, scaleY: -1 } : { scaleX: t === "left" ? 1 : -1 }); }, e.prototype._updateHandle = function(t, n) { if (!!this._useHandle) { var i = this._shapes, a = this.visualMapModel, o = i.handleThumbs, s = i.handleLabels, u = a.itemSize, l = a.getExtent(); f7e([0, 1], function(c) { var f = o[c]; f.setStyle("fill", n.handlesColor[c]), f.y = t[c]; var h = bl(t[c], [0, u[1]], l, !0), p = this.getControllerVisual(h, "symbolSize"); f.scaleX = f.scaleY = p / u[0], f.x = u[0] - p / 2; var d = Uu(i.handleLabelPoints[c], nd(f, this.group)); s[c].setStyle({ x: d[0], y: d[1], text: a.formatValueText(this._dataInterval[c]), verticalAlign: "middle", align: this._orient === "vertical" ? this._applyTransform("left", i.mainGroup) : "center" }); }, this); } }, e.prototype._showIndicator = function(t, n, i, a) { var o = this.visualMapModel, s = o.getExtent(), u = o.itemSize, l = [0, u[1]], c = this._shapes, f = c.indicator; if (!!f) { f.attr("invisible", !1); var h = { convertOpacityToAlpha: !0 }, p = this.getControllerVisual(t, "color", h), d = this.getControllerVisual(t, "symbolSize"), v = bl(t, s, l, !0), g = u[0] - d / 2, m = { x: f.x, y: f.y }; f.y = v, f.x = g; var y = Uu(c.indicatorLabelPoint, nd(f, this.group)), _ = c.indicatorLabel; _.attr("invisible", !1); var w = this._applyTransform("left", c.mainGroup), x = this._orient, C = x === "horizontal"; _.setStyle({ text: (i || "") + o.formatValueText(n), verticalAlign: C ? w : "middle", align: C ? "center" : w }); var S = { x: g, y: v, style: { fill: p } }, b = { style: { x: y[0], y: y[1] } }; if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) { var E = { duration: 100, easing: "cubicInOut", additive: !0 }; f.x = m.x, f.y = m.y, f.animateTo(S, E), _.animateTo(b, E); } else f.attr(S), _.attr(b); this._firstShowIndicator = !1; var T = this._shapes.handleLabels; if (T) for (var P = 0; P < T.length; P++) this._api.enterBlur(T[P]); } }, e.prototype._enableHoverLinkToSeries = function() { var t = this; this._shapes.mainGroup.on("mousemove", function(n) { if (t._hovering = !0, !t._dragging) { var i = t.visualMapModel.itemSize, a = t._applyTransform([n.offsetX, n.offsetY], t._shapes.mainGroup, !0, !0); a[1] = I7(FL(0, a[1]), i[1]), t._doHoverLinkToSeries(a[1], 0 <= a[0] && a[0] <= i[0]); } }).on("mouseout", function() { t._hovering = !1, !t._dragging && t._clearHoverLinkToSeries(); }); }, e.prototype._enableHoverLinkFromSeries = function() { var t = this.api.getZr(); this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries(); }, e.prototype._doHoverLinkToSeries = function(t, n) { var i = this.visualMapModel, a = i.itemSize; if (!!i.option.hoverLink) { var o = [0, a[1]], s = i.getExtent(); t = I7(FL(o[0], t), o[1]); var u = v7e(i, s, o), l = [t - u, t + u], c = bl(t, o, s, !0), f = [bl(l[0], o, s, !0), bl(l[1], o, s, !0)]; l[0] < o[0] && (f[0] = -1 / 0), l[1] > o[1] && (f[1] = 1 / 0), n && (f[0] === -1 / 0 ? this._showIndicator(c, f[1], "< ", u) : f[1] === 1 / 0 ? this._showIndicator(c, f[0], "> ", u) : this._showIndicator(c, c, "\u2248 ", u)); var h = this._hoverLinkDataIndices, p = []; (n || L7(i)) && (p = this._hoverLinkDataIndices = i.findTargetDataIndices(f)); var d = nPe(h, p); this._dispatchHighDown("downplay", wS(d[0], i)), this._dispatchHighDown("highlight", wS(d[1], i)); } }, e.prototype._hoverLinkFromSeriesMouseOver = function(t) { var n = t.target, i = this.visualMapModel; if (!(!n || nt(n).dataIndex == null)) { var a = nt(n), o = this.ecModel.getSeriesByIndex(a.seriesIndex); if (!!i.isTargetSeries(o)) { var s = o.getData(a.dataType), u = s.getStore().get(i.getDataDimensionIndex(s), a.dataIndex); isNaN(u) || this._showIndicator(u, u); } } }, e.prototype._hideIndicator = function() { var t = this._shapes; t.indicator && t.indicator.attr("invisible", !0), t.indicatorLabel && t.indicatorLabel.attr("invisible", !0); var n = this._shapes.handleLabels; if (n) for (var i = 0; i < n.length; i++) this._api.leaveBlur(n[i]); }, e.prototype._clearHoverLinkToSeries = function() { this._hideIndicator(); var t = this._hoverLinkDataIndices; this._dispatchHighDown("downplay", wS(t, this.visualMapModel)), t.length = 0; }, e.prototype._clearHoverLinkFromSeries = function() { this._hideIndicator(); var t = this.api.getZr(); t.off("mouseover", this._hoverLinkFromSeriesMouseOver), t.off("mouseout", this._hideIndicator); }, e.prototype._applyTransform = function(t, n, i, a) { var o = nd(n, a ? null : this.group); return le(t) ? Uu(t, o, i) : jT(t, o, i); }, e.prototype._dispatchHighDown = function(t, n) { n && n.length && this.api.dispatchAction({ type: t, batch: n }); }, e.prototype.dispose = function() { this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries(); }, e.prototype.remove = function() { this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries(); }, e.type = "visualMap.continuous", e; }(Tte); function A7(r, e, t, n) { return new Ho({ shape: { points: r }, draggable: !!t, cursor: e, drift: t, onmousemove: function(i) { rf(i.event); }, ondragend: n }); } function v7e(r, e, t) { var n = h7e / 2, i = r.get("hoverLinkDataSize"); return i && (n = bl(i, e, t, !0) / 2), n; } function L7(r) { var e = r.get("hoverLinkOnHandle"); return !!(e == null ? r.get("realtime") : e); } function D7(r) { return r === "vertical" ? "ns-resize" : "ew-resize"; } const g7e = d7e; var m7e = { type: "selectDataRange", event: "dataRangeSelected", update: "update" }, y7e = function(r, e) { e.eachComponent({ mainType: "visualMap", query: r }, function(t) { t.setSelected(r.selected); }); }, _7e = [ { createOnAllSeries: !0, reset: function(r, e) { var t = []; return e.eachComponent("visualMap", function(n) { var i = r.pipelineContext; !n.isTargetSeries(r) || i && i.large || t.push(p8e(n.stateList, n.targetVisuals, Ae(n.getValueState, n), n.getDataDimensionIndex(r.getData()))); }), t; } }, { createOnAllSeries: !0, reset: function(r, e) { var t = r.getData(), n = []; e.eachComponent("visualMap", function(i) { if (i.isTargetSeries(r)) { var a = i.getVisualMeta(Ae(w7e, null, r, i)) || { stops: [], outerColors: [] }, o = i.getDataDimensionIndex(t); o >= 0 && (a.dimension = o, n.push(a)); } }), r.getData().setVisual("visualMeta", n); } } ]; function w7e(r, e, t, n) { for (var i = e.targetVisuals[n], a = Aa.prepareVisualTypes(i), o = { color: kw(r.getData(), "color") }, s = 0, u = a.length; s < u; s++) { var l = a[s], c = i[l === "opacity" ? "__alphaForOpacity" : l]; c && c.applyVisual(t, f, h); } return o.color; function f(p) { return o[p]; } function h(p, d) { o[p] = d; } } var M7 = M; function x7e(r) { var e = r && r.visualMap; le(e) || (e = e ? [e] : []), M7(e, function(t) { if (!!t) { tg(t, "splitList") && !tg(t, "pieces") && (t.pieces = t.splitList, delete t.splitList); var n = t.pieces; n && le(n) && M7(n, function(i) { Xe(i) && (tg(i, "start") && !tg(i, "min") && (i.min = i.start), tg(i, "end") && !tg(i, "max") && (i.max = i.end)); }); } }); } function tg(r, e) { return r && r.hasOwnProperty && r.hasOwnProperty(e); } var O7 = !1; function Ite(r) { O7 || (O7 = !0, r.registerSubTypeDefaulter("visualMap", function(e) { return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise"; }), r.registerAction(m7e, y7e), M(_7e, function(e) { r.registerVisual(r.PRIORITY.VISUAL.COMPONENT, e); }), r.registerPreprocessor(x7e)); } function Ate(r) { r.registerComponentModel(l7e), r.registerComponentView(g7e), Ite(r); } var C7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t._pieceList = [], t; } return e.prototype.optionUpdated = function(t, n) { r.prototype.optionUpdated.apply(this, arguments), this.resetExtent(); var i = this._mode = this._determineMode(); this._pieceList = [], S7e[this._mode].call(this, this._pieceList), this._resetSelected(t, n); var a = this.option.categories; this.resetVisual(function(o, s) { i === "categories" ? (o.mappingMethod = "category", o.categories = Qe(a)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = ce(this._pieceList, function(u) { return u = Qe(u), s !== "inRange" && (u.visual = null), u; })); }); }, e.prototype.completeVisualOption = function() { var t = this.option, n = {}, i = Aa.listVisualTypes(), a = this.isCategory(); M(t.pieces, function(s) { M(i, function(u) { s.hasOwnProperty(u) && (n[u] = 1); }); }), M(n, function(s, u) { var l = !1; M(this.stateList, function(c) { l = l || o(t, c, u) || o(t.target, c, u); }, this), !l && M(this.stateList, function(c) { (t[c] || (t[c] = {}))[u] = bte.get(u, c === "inRange" ? "active" : "inactive", a); }); }, this); function o(s, u, l) { return s && s[u] && s[u].hasOwnProperty(l); } r.prototype.completeVisualOption.apply(this, arguments); }, e.prototype._resetSelected = function(t, n) { var i = this.option, a = this._pieceList, o = (n ? i : t).selected || {}; if (i.selected = o, M(a, function(u, l) { var c = this.getSelectedMapKey(u); o.hasOwnProperty(c) || (o[c] = !0); }, this), i.selectedMode === "single") { var s = !1; M(a, function(u, l) { var c = this.getSelectedMapKey(u); o[c] && (s ? o[c] = !1 : s = !0); }, this); } }, e.prototype.getItemSymbol = function() { return this.get("itemSymbol"); }, e.prototype.getSelectedMapKey = function(t) { return this._mode === "categories" ? t.value + "" : t.index + ""; }, e.prototype.getPieceList = function() { return this._pieceList; }, e.prototype._determineMode = function() { var t = this.option; return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber"; }, e.prototype.setSelected = function(t) { this.option.selected = Qe(t); }, e.prototype.getValueState = function(t) { var n = Aa.findPieceIndex(t, this._pieceList); return n != null && this.option.selected[this.getSelectedMapKey(this._pieceList[n])] ? "inRange" : "outOfRange"; }, e.prototype.findTargetDataIndices = function(t) { var n = [], i = this._pieceList; return this.eachTargetSeries(function(a) { var o = [], s = a.getData(); s.each(this.getDataDimensionIndex(s), function(u, l) { var c = Aa.findPieceIndex(u, i); c === t && o.push(l); }, this), n.push({ seriesId: a.id, dataIndex: o }); }, this), n; }, e.prototype.getRepresentValue = function(t) { var n; if (this.isCategory()) n = t.value; else if (t.value != null) n = t.value; else { var i = t.interval || []; n = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2; } return n; }, e.prototype.getVisualMeta = function(t) { if (this.isCategory()) return; var n = [], i = ["", ""], a = this; function o(c, f) { var h = a.getRepresentValue({ interval: c }); f || (f = a.getValueState(h)); var p = t(h, f); c[0] === -1 / 0 ? i[0] = p : c[1] === 1 / 0 ? i[1] = p : n.push({ value: c[0], color: p }, { value: c[1], color: p }); } var s = this._pieceList.slice(); if (!s.length) s.push({ interval: [-1 / 0, 1 / 0] }); else { var u = s[0].interval[0]; u !== -1 / 0 && s.unshift({ interval: [-1 / 0, u] }), u = s[s.length - 1].interval[1], u !== 1 / 0 && s.push({ interval: [u, 1 / 0] }); } var l = -1 / 0; return M(s, function(c) { var f = c.interval; f && (f[0] > l && o([l, f[0]], "outOfRange"), o(f.slice()), l = f[1]); }, this), { stops: n, outerColors: i }; }, e.type = "visualMap.piecewise", e.defaultOption = qh(JE.defaultOption, { selected: null, minOpen: !1, maxOpen: !1, align: "auto", itemWidth: 20, itemHeight: 14, itemSymbol: "roundRect", pieces: null, categories: null, splitNumber: 5, selectedMode: "multiple", itemGap: 10, hoverLink: !0 }), e; }(JE), S7e = { splitNumber: function(r) { var e = this.option, t = Math.min(e.precision, 20), n = this.getExtent(), i = e.splitNumber; i = Math.max(parseInt(i, 10), 1), e.splitNumber = i; for (var a = (n[1] - n[0]) / i; +a.toFixed(t) !== a && t < 5; ) t++; e.precision = t, a = +a.toFixed(t), e.minOpen && r.push({ interval: [-1 / 0, n[0]], close: [0, 0] }); for (var o = 0, s = n[0]; o < i; s += a, o++) { var u = o === i - 1 ? n[1] : s + a; r.push({ interval: [s, u], close: [1, 1] }); } e.maxOpen && r.push({ interval: [n[1], 1 / 0], close: [0, 0] }), y6(r), M(r, function(l, c) { l.index = c, l.text = this.formatValueText(l.interval); }, this); }, categories: function(r) { var e = this.option; M(e.categories, function(t) { r.push({ text: this.formatValueText(t, !0), value: t }); }, this), R7(e, r); }, pieces: function(r) { var e = this.option; M(e.pieces, function(t, n) { Xe(t) || (t = { value: t }); var i = { text: "", index: n }; if (t.label != null && (i.text = t.label), t.hasOwnProperty("value")) { var a = i.value = t.value; i.interval = [a, a], i.close = [1, 1]; } else { for (var o = i.interval = [], s = i.close = [0, 0], u = [1, 0, 1], l = [-1 / 0, 1 / 0], c = [], f = 0; f < 2; f++) { for (var h = [["gte", "gt", "min"], ["lte", "lt", "max"]][f], p = 0; p < 3 && o[f] == null; p++) o[f] = t[h[p]], s[f] = u[p], c[f] = p === 2; o[f] == null && (o[f] = l[f]); } c[0] && o[1] === 1 / 0 && (s[0] = 0), c[1] && o[0] === -1 / 0 && (s[1] = 0), process.env.NODE_ENV !== "production" && o[0] > o[1] && console.warn("Piece " + n + "is illegal: " + o + " lower bound should not greater then uppper bound."), o[0] === o[1] && s[0] && s[1] && (i.value = o[0]); } i.visual = Aa.retrieveVisuals(t), r.push(i); }, this), R7(e, r), y6(r), M(r, function(t) { var n = t.close, i = [["<", "\u2264"][n[1]], [">", "\u2265"][n[0]]]; t.text = t.text || this.formatValueText(t.value != null ? t.value : t.interval, !1, i); }, this); } }; function R7(r, e) { var t = r.inverse; (r.orient === "vertical" ? !t : t) && e.reverse(); } const E7e = C7e; var b7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = e.type, t; } return e.prototype.doRender = function() { var t = this.group; t.removeAll(); var n = this.visualMapModel, i = n.get("textGap"), a = n.textStyleModel, o = a.getFont(), s = a.getTextColor(), u = this._getItemAlign(), l = n.itemSize, c = this._getViewData(), f = c.endsText, h = si(n.get("showLabel", !0), !f); f && this._renderEndsText(t, f[0], l, h, u), M(c.viewPieceList, function(p) { var d = p.piece, v = new rt(); v.onclick = Ae(this._onItemClick, this, d), this._enableHoverLink(v, p.indexInModelPieceList); var g = n.getRepresentValue(d); if (this._createItemSymbol(v, g, [0, 0, l[0], l[1]]), h) { var m = this.visualMapModel.getValueState(g); v.add(new Yt({ style: { x: u === "right" ? -i : l[0] + i, y: l[1] / 2, text: d.text, verticalAlign: "middle", align: u, font: o, fill: s, opacity: m === "outOfRange" ? 0.5 : 1 } })); } t.add(v); }, this), f && this._renderEndsText(t, f[1], l, h, u), id(n.get("orient"), t, n.get("itemGap")), this.renderBackground(t), this.positionGroup(t); }, e.prototype._enableHoverLink = function(t, n) { var i = this; t.on("mouseover", function() { return a("highlight"); }).on("mouseout", function() { return a("downplay"); }); var a = function(o) { var s = i.visualMapModel; s.option.hoverLink && i.api.dispatchAction({ type: o, batch: wS(s.findTargetDataIndices(n), s) }); }; }, e.prototype._getItemAlign = function() { var t = this.visualMapModel, n = t.option; if (n.orient === "vertical") return Pte(t, this.api, t.itemSize); var i = n.align; return (!i || i === "auto") && (i = "left"), i; }, e.prototype._renderEndsText = function(t, n, i, a, o) { if (!!n) { var s = new rt(), u = this.visualMapModel.textStyleModel; s.add(new Yt({ style: Sn(u, { x: a ? o === "right" ? i[0] : 0 : i[0] / 2, y: i[1] / 2, verticalAlign: "middle", align: a ? o : "center", text: n }) })), t.add(s); } }, e.prototype._getViewData = function() { var t = this.visualMapModel, n = ce(t.getPieceList(), function(s, u) { return { piece: s, indexInModelPieceList: u }; }), i = t.get("text"), a = t.get("orient"), o = t.get("inverse"); return (a === "horizontal" ? o : !o) ? n.reverse() : i && (i = i.slice().reverse()), { viewPieceList: n, endsText: i }; }, e.prototype._createItemSymbol = function(t, n, i) { t.add(vi( this.getControllerVisual(n, "symbol"), i[0], i[1], i[2], i[3], this.getControllerVisual(n, "color") )); }, e.prototype._onItemClick = function(t) { var n = this.visualMapModel, i = n.option, a = i.selectedMode; if (!!a) { var o = Qe(i.selected), s = n.getSelectedMapKey(t); a === "single" || a === !0 ? (o[s] = !0, M(o, function(u, l) { o[l] = l === s; })) : o[s] = !o[s], this.api.dispatchAction({ type: "selectDataRange", from: this.uid, visualMapId: this.visualMapModel.id, selected: o }); } }, e.type = "visualMap.piecewise", e; }(Tte); const T7e = b7e; function Lte(r) { r.registerComponentModel(E7e), r.registerComponentView(T7e), Ite(r); } function P7e(r) { bt(Ate), bt(Lte); } var I7e = { label: { enabled: !0 }, decal: { show: !1 } }, N7 = Ut(), A7e = {}; function L7e(r, e) { var t = r.getModel("aria"); if (!t.get("enabled")) return; var n = Qe(I7e); dt(n.label, r.getLocaleModel().get("aria"), !1), dt(t.option, n, !1), i(), a(); function i() { var l = t.getModel("decal"), c = l.get("show"); if (c) { var f = $e(); r.eachSeries(function(h) { if (!h.isColorBySeries()) { var p = f.get(h.type); p || (p = {}, f.set(h.type, p)), N7(h).scope = p; } }), r.eachRawSeries(function(h) { if (r.isSeriesFiltered(h)) return; if (ze(h.enableAriaDecal)) { h.enableAriaDecal(); return; } var p = h.getData(); if (h.isColorBySeries()) { var y = ZM(h.ecModel, h.name, A7e, r.getSeriesCount()), _ = p.getVisual("decal"); p.setVisual("decal", w(_, y)); } else { var d = h.getRawData(), v = {}, g = N7(h).scope; p.each(function(x) { var C = p.getRawIndex(x); v[C] = x; }); var m = d.count(); d.each(function(x) { var C = v[x], S = d.getName(x) || x + "", b = ZM(h.ecModel, S, g, m), E = p.getItemVisual(C, "decal"); p.setItemVisual(C, "decal", w(E, b)); }); } function w(x, C) { var S = x ? oe(oe({}, C), x) : C; return S.dirty = !0, S; } }); } } function a() { var l = r.getLocaleModel().get("aria"), c = t.getModel("label"); if (c.option = qe(c.option, l), !!c.get("enabled")) { var f = e.getZr().dom; if (c.get("description")) { f.setAttribute("aria-label", c.get("description")); return; } var h = r.getSeriesCount(), p = c.get(["data", "maxCount"]) || 10, d = c.get(["series", "maxCount"]) || 10, v = Math.min(h, d), g; if (!(h < 1)) { var m = s(); if (m) { var y = c.get(["general", "withTitle"]); g = o(y, { title: m }); } else g = c.get(["general", "withoutTitle"]); var _ = [], w = h > 1 ? c.get(["series", "multiple", "prefix"]) : c.get(["series", "single", "prefix"]); g += o(w, { seriesCount: h }), r.eachSeries(function(b, E) { if (E < v) { var T = void 0, P = b.get("name"), I = P ? "withName" : "withoutName"; T = h > 1 ? c.get(["series", "multiple", I]) : c.get(["series", "single", I]), T = o(T, { seriesId: b.seriesIndex, seriesName: b.get("name"), seriesType: u(b.subType) }); var A = b.getData(); if (A.count() > p) { var L = c.get(["data", "partialData"]); T += o(L, { displayCnt: p }); } else T += c.get(["data", "allData"]); for (var D = c.get(["data", "separator", "middle"]), O = c.get(["data", "separator", "end"]), N = [], F = 0; F < A.count(); F++) if (F < p) { var k = A.getName(F), G = A.getValues(F), U = c.get(["data", k ? "withName" : "withoutName"]); N.push(o(U, { name: k, value: G.join(D) })); } T += N.join(D) + O, _.push(T); } }); var x = c.getModel(["series", "multiple", "separator"]), C = x.get("middle"), S = x.get("end"); g += _.join(C) + S, f.setAttribute("aria-label", g); } } } function o(l, c) { if (!Se(l)) return l; var f = l; return M(c, function(h, p) { f = f.replace(new RegExp("\\{\\s*" + p + "\\s*\\}", "g"), h); }), f; } function s() { var l = r.get("title"); return l && l.length && (l = l[0]), l && l.text; } function u(l) { return r.getLocaleModel().get(["series", "typeNames"])[l] || "\u81EA\u5B9A\u4E49\u56FE"; } } function D7e(r) { if (!(!r || !r.aria)) { var e = r.aria; e.show != null && (e.enabled = e.show), e.label = e.label || {}, M(["description", "general", "series", "data"], function(t) { e[t] != null && (e.label[t] = e[t]); }); } } function M7e(r) { r.registerPreprocessor(D7e), r.registerVisual(r.PRIORITY.VISUAL.ARIA, L7e); } var F7 = { value: "eq", "<": "lt", "<=": "lte", ">": "gt", ">=": "gte", "=": "eq", "!=": "ne", "<>": "ne" }, O7e = function() { function r(e) { var t = this._condVal = Se(e) ? new RegExp(e) : FX(e) ? e : null; if (t == null) { var n = ""; process.env.NODE_ENV !== "production" && (n = xo("Illegal regexp", e, "in")), Ar(n); } } return r.prototype.evaluate = function(e) { var t = typeof e; return Se(t) ? this._condVal.test(e) : $t(t) ? this._condVal.test(e + "") : !1; }, r; }(), R7e = function() { function r() { } return r.prototype.evaluate = function() { return this.value; }, r; }(), N7e = function() { function r() { } return r.prototype.evaluate = function() { for (var e = this.children, t = 0; t < e.length; t++) if (!e[t].evaluate()) return !1; return !0; }, r; }(), F7e = function() { function r() { } return r.prototype.evaluate = function() { for (var e = this.children, t = 0; t < e.length; t++) if (e[t].evaluate()) return !0; return !1; }, r; }(), B7e = function() { function r() { } return r.prototype.evaluate = function() { return !this.child.evaluate(); }, r; }(), k7e = function() { function r() { } return r.prototype.evaluate = function() { for (var e = !!this.valueParser, t = this.getValue, n = t(this.valueGetterParam), i = e ? this.valueParser(n) : null, a = 0; a < this.subCondList.length; a++) if (!this.subCondList[a].evaluate(e ? i : n)) return !1; return !0; }, r; }(); function O5(r, e) { if (r === !0 || r === !1) { var t = new R7e(); return t.value = r, t; } var n = ""; return Dte(r) || (process.env.NODE_ENV !== "production" && (n = xo("Illegal config. Expect a plain object but actually", r)), Ar(n)), r.and ? B7("and", r, e) : r.or ? B7("or", r, e) : r.not ? V7e(r, e) : G7e(r, e); } function B7(r, e, t) { var n = e[r], i = ""; process.env.NODE_ENV !== "production" && (i = xo('"and"/"or" condition should only be `' + r + ": [...]` and must not be empty array.", "Illegal condition:", e)), le(n) || Ar(i), n.length || Ar(i); var a = r === "and" ? new N7e() : new F7e(); return a.children = ce(n, function(o) { return O5(o, t); }), a.children.length || Ar(i), a; } function V7e(r, e) { var t = r.not, n = ""; process.env.NODE_ENV !== "production" && (n = xo('"not" condition should only be `not: {}`.', "Illegal condition:", r)), Dte(t) || Ar(n); var i = new B7e(); return i.child = O5(t, e), i.child || Ar(n), i; } function G7e(r, e) { for (var t = "", n = e.prepareGetValue(r), i = [], a = At(r), o = r.parser, s = o ? aK(o) : null, u = 0; u < a.length; u++) { var l = a[u]; if (!(l === "parser" || e.valueGetterAttrMap.get(l))) { var c = Te(F7, l) ? F7[l] : l, f = r[l], h = s ? s(f) : f, p = SLe(c, h) || c === "reg" && new O7e(h); p || (process.env.NODE_ENV !== "production" && (t = xo('Illegal relational operation: "' + l + '" in condition:', r)), Ar(t)), i.push(p); } } i.length || (process.env.NODE_ENV !== "production" && (t = xo("Relational condition must have at least one operator.", "Illegal condition:", r)), Ar(t)); var d = new k7e(); return d.valueGetterParam = n, d.valueParser = s, d.getValue = e.getValue, d.subCondList = i, d; } function Dte(r) { return Xe(r) && !eo(r); } var z7e = function() { function r(e, t) { this._cond = O5(e, t); } return r.prototype.evaluate = function() { return this._cond.evaluate(); }, r; }(); function $7e(r, e) { return new z7e(r, e); } var H7e = { type: "echarts:filter", transform: function(r) { for (var e = r.upstream, t, n = $7e(r.config, { valueGetterAttrMap: $e({ dimension: !0 }), prepareGetValue: function(s) { var u = "", l = s.dimension; Te(s, "dimension") || (process.env.NODE_ENV !== "production" && (u = xo('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), Ar(u)); var c = e.getDimensionInfo(l); return c || (process.env.NODE_ENV !== "production" && (u = xo("Can not find dimension info via: " + l + `. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `. `, "Illegal condition:", s, `. `)), Ar(u)), { dimIdx: c.index }; }, getValue: function(s) { return e.retrieveValueFromItem(t, s.dimIdx); } }), i = [], a = 0, o = e.count(); a < o; a++) t = e.getRawDataItem(a), n.evaluate() && i.push(t); return { data: i }; } }, X2 = ""; process.env.NODE_ENV !== "production" && (X2 = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" ")); var U7e = { type: "echarts:sort", transform: function(r) { var e = r.upstream, t = r.config, n = "", i = jr(t); i.length || (process.env.NODE_ENV !== "production" && (n = "Empty `config` in sort transform."), Ar(n)); var a = []; M(i, function(c) { var f = c.dimension, h = c.order, p = c.parser, d = c.incomparable; if (f == null && (process.env.NODE_ENV !== "production" && (n = 'Sort transform config must has "dimension" specified.' + X2), Ar(n)), h !== "asc" && h !== "desc" && (process.env.NODE_ENV !== "production" && (n = 'Sort transform config must has "order" specified.' + X2), Ar(n)), d && d !== "min" && d !== "max") { var v = ""; process.env.NODE_ENV !== "production" && (v = 'incomparable must be "min" or "max" rather than "' + d + '".'), Ar(v); } if (h !== "asc" && h !== "desc") { var g = ""; process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + h + '".'), Ar(g); } var m = e.getDimensionInfo(f); m || (process.env.NODE_ENV !== "production" && (n = xo("Can not find dimension info via: " + f + `. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `. `, "Illegal config:", c, `. `)), Ar(n)); var y = p ? aK(p) : null; p && !y && (process.env.NODE_ENV !== "production" && (n = xo("Invalid parser name " + p + `. `, "Illegal config:", c, `. `)), Ar(n)), a.push({ dimIdx: m.index, parser: y, comparator: new sK(h, d) }); }); var o = e.sourceFormat; o !== ro && o !== Eu && (process.env.NODE_ENV !== "production" && (n = 'sourceFormat "' + o + '" is not supported yet'), Ar(n)); for (var s = [], u = 0, l = e.count(); u < l; u++) s.push(e.getRawDataItem(u)); return s.sort(function(c, f) { for (var h = 0; h < a.length; h++) { var p = a[h], d = e.retrieveValueFromItem(c, p.dimIdx), v = e.retrieveValueFromItem(f, p.dimIdx); p.parser && (d = p.parser(d), v = p.parser(v)); var g = p.comparator.evaluate(d, v); if (g !== 0) return g; } return 0; }), { data: s }; } }; function W7e(r) { r.registerTransform(H7e), r.registerTransform(U7e); } var j7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "dataset", t; } return e.prototype.init = function(t, n, i) { r.prototype.init.call(this, t, n, i), this._sourceManager = new fK(this), NG(this); }, e.prototype.mergeOption = function(t, n) { r.prototype.mergeOption.call(this, t, n), NG(this); }, e.prototype.optionUpdated = function() { this._sourceManager.dirty(); }, e.prototype.getSourceManager = function() { return this._sourceManager; }, e.type = "dataset", e.defaultOption = { seriesLayoutBy: $l }, e; }(Rt), Y7e = function(r) { W(e, r); function e() { var t = r !== null && r.apply(this, arguments) || this; return t.type = "dataset", t; } return e.type = "dataset", e; }(Gn); function X7e(r) { r.registerComponentModel(j7e), r.registerComponentView(Y7e); } var Cl = tc.CMD; function Fg(r, e) { return Math.abs(r - e) < 1e-5; } function q2(r) { var e = r.data, t = r.len(), n = [], i, a = 0, o = 0, s = 0, u = 0; function l(A, L) { i && i.length > 2 && n.push(i), i = [A, L]; } function c(A, L, D, O) { Fg(A, D) && Fg(L, O) || i.push(A, L, D, O, D, O); } function f(A, L, D, O, N, F) { var k = Math.abs(L - A), G = Math.tan(k / 4) * 4 / 3, U = L < A ? -1 : 1, B = Math.cos(A), X = Math.sin(A), j = Math.cos(L), ae = Math.sin(L), se = B * N + D, $ = X * F + O, V = j * N + D, q = ae * F + O, ee = N * G * U, Y = F * G * U; i.push(se - ee * X, $ + Y * B, V + ee * ae, q - Y * j, V, q); } for (var h, p, d, v, g = 0; g < t; ) { var m = e[g++], y = g === 1; switch (y && (a = e[g], o = e[g + 1], s = a, u = o, (m === Cl.L || m === Cl.C || m === Cl.Q) && (i = [s, u])), m) { case Cl.M: a = s = e[g++], o = u = e[g++], l(s, u); break; case Cl.L: h = e[g++], p = e[g++], c(a, o, h, p), a = h, o = p; break; case Cl.C: i.push(e[g++], e[g++], e[g++], e[g++], a = e[g++], o = e[g++]); break; case Cl.Q: h = e[g++], p = e[g++], d = e[g++], v = e[g++], i.push(a + 2 / 3 * (h - a), o + 2 / 3 * (p - o), d + 2 / 3 * (h - d), v + 2 / 3 * (p - v), d, v), a = d, o = v; break; case Cl.A: var _ = e[g++], w = e[g++], x = e[g++], C = e[g++], S = e[g++], b = e[g++] + S; g += 1; var E = !e[g++]; h = Math.cos(S) * x + _, p = Math.sin(S) * C + w, y ? (s = h, u = p, l(s, u)) : c(a, o, h, p), a = Math.cos(b) * x + _, o = Math.sin(b) * C + w; for (var T = (E ? -1 : 1) * Math.PI / 2, P = S; E ? P > b : P < b; P += T) { var I = E ? Math.max(P + T, b) : Math.min(P + T, b); f(P, I, _, w, x, C); } break; case Cl.R: s = a = e[g++], u = o = e[g++], h = s + e[g++], p = u + e[g++], l(h, u), c(h, u, h, p), c(h, p, s, p), c(s, p, s, u), c(s, u, h, u); break; case Cl.Z: i && c(a, o, s, u), a = s, o = u; break; } } return i && i.length > 2 && n.push(i), n; } function Z2(r, e, t, n, i, a, o, s, u, l) { if (Fg(r, t) && Fg(e, n) && Fg(i, o) && Fg(a, s)) { u.push(o, s); return; } var c = 2 / l, f = c * c, h = o - r, p = s - e, d = Math.sqrt(h * h + p * p); h /= d, p /= d; var v = t - r, g = n - e, m = i - o, y = a - s, _ = v * v + g * g, w = m * m + y * y; if (_ < f && w < f) { u.push(o, s); return; } var x = h * v + p * g, C = -h * m - p * y, S = _ - x * x, b = w - C * C; if (S < f && x >= 0 && b < f && C >= 0) { u.push(o, s); return; } var E = [], T = []; Mh(r, t, i, o, 0.5, E), Mh(e, n, a, s, 0.5, T), Z2(E[0], T[0], E[1], T[1], E[2], T[2], E[3], T[3], u, l), Z2(E[4], T[4], E[5], T[5], E[6], T[6], E[7], T[7], u, l); } function q7e(r, e) { var t = q2(r), n = []; e = e || 1; for (var i = 0; i < t.length; i++) { var a = t[i], o = [], s = a[0], u = a[1]; o.push(s, u); for (var l = 2; l < a.length; ) { var c = a[l++], f = a[l++], h = a[l++], p = a[l++], d = a[l++], v = a[l++]; Z2(s, u, c, f, h, p, d, v, o, e), s = d, u = v; } n.push(o); } return n; } function Mte(r, e, t) { var n = r[e], i = r[1 - e], a = Math.abs(n / i), o = Math.ceil(Math.sqrt(a * t)), s = Math.floor(t / o); s === 0 && (s = 1, o = t); for (var u = [], l = 0; l < o; l++) u.push(s); var c = o * s, f = t - c; if (f > 0) for (var l = 0; l < f; l++) u[l % o] += 1; return u; } function k7(r, e, t) { for (var n = r.r0, i = r.r, a = r.startAngle, o = r.endAngle, s = Math.abs(o - a), u = s * i, l = i - n, c = u > Math.abs(l), f = Mte([u, l], c ? 0 : 1, e), h = (c ? s : l) / f.length, p = 0; p < f.length; p++) for (var d = (c ? l : s) / f[p], v = 0; v < f[p]; v++) { var g = {}; c ? (g.startAngle = a + h * p, g.endAngle = a + h * (p + 1), g.r0 = n + d * v, g.r = n + d * (v + 1)) : (g.startAngle = a + d * v, g.endAngle = a + d * (v + 1), g.r0 = n + h * p, g.r = n + h * (p + 1)), g.clockwise = r.clockwise, g.cx = r.cx, g.cy = r.cy, t.push(g); } } function Z7e(r, e, t) { for (var n = r.width, i = r.height, a = n > i, o = Mte([n, i], a ? 0 : 1, e), s = a ? "width" : "height", u = a ? "height" : "width", l = a ? "x" : "y", c = a ? "y" : "x", f = r[s] / o.length, h = 0; h < o.length; h++) for (var p = r[u] / o[h], d = 0; d < o[h]; d++) { var v = {}; v[l] = h * f, v[c] = d * p, v[s] = f, v[u] = p, v.x += r.x, v.y += r.y, t.push(v); } } function V7(r, e, t, n) { return r * n - t * e; } function K7e(r, e, t, n, i, a, o, s) { var u = t - r, l = n - e, c = o - i, f = s - a, h = V7(c, f, u, l); if (Math.abs(h) < 1e-6) return null; var p = r - i, d = e - a, v = V7(p, d, c, f) / h; return v < 0 || v > 1 ? null : new ft(v * u + r, v * l + e); } function J7e(r, e, t) { var n = new ft(); ft.sub(n, t, e), n.normalize(); var i = new ft(); ft.sub(i, r, e); var a = i.dot(n); return a; } function rg(r, e) { var t = r[r.length - 1]; t && t[0] === e[0] && t[1] === e[1] || r.push(e); } function Q7e(r, e, t) { for (var n = r.length, i = [], a = 0; a < n; a++) { var o = r[a], s = r[(a + 1) % n], u = K7e(o[0], o[1], s[0], s[1], e.x, e.y, t.x, t.y); u && i.push({ projPt: J7e(u, e, t), pt: u, idx: a }); } if (i.length < 2) return [{ points: r }, { points: r }]; i.sort(function(g, m) { return g.projPt - m.projPt; }); var l = i[0], c = i[i.length - 1]; if (c.idx < l.idx) { var f = l; l = c, c = f; } for (var h = [l.pt.x, l.pt.y], p = [c.pt.x, c.pt.y], d = [h], v = [p], a = l.idx + 1; a <= c.idx; a++) rg(d, r[a].slice()); rg(d, p), rg(d, h); for (var a = c.idx + 1; a <= l.idx + n; a++) rg(v, r[a % n].slice()); return rg(v, h), rg(v, p), [{ points: d }, { points: v }]; } function G7(r) { var e = r.points, t = [], n = []; GT(e, t, n); var i = new gt(t[0], t[1], n[0] - t[0], n[1] - t[1]), a = i.width, o = i.height, s = i.x, u = i.y, l = new ft(), c = new ft(); return a > o ? (l.x = c.x = s + a / 2, l.y = u, c.y = u + o) : (l.y = c.y = u + o / 2, l.x = s, c.x = s + a), Q7e(e, l, c); } function QE(r, e, t, n) { if (t === 1) n.push(e); else { var i = Math.floor(t / 2), a = r(e); QE(r, a[0], i, n), QE(r, a[1], t - i, n); } return n; } function e$e(r, e) { for (var t = [], n = 0; n < e; n++) t.push(JN(r)); return t; } function t$e(r, e) { e.setStyle(r.style), e.z = r.z, e.z2 = r.z2, e.zlevel = r.zlevel; } function r$e(r) { for (var e = [], t = 0; t < r.length; ) e.push([r[t++], r[t++]]); return e; } function n$e(r, e) { var t = [], n = r.shape, i; switch (r.type) { case "rect": Z7e(n, e, t), i = Vt; break; case "sector": k7(n, e, t), i = $o; break; case "circle": k7({ r0: 0, r: n.r, startAngle: 0, endAngle: Math.PI * 2, cx: n.cx, cy: n.cy }, e, t), i = $o; break; default: var a = r.getComputedTransform(), o = a ? Math.sqrt(Math.max(a[0] * a[0] + a[1] * a[1], a[2] * a[2] + a[3] * a[3])) : 1, s = ce(q7e(r.getUpdatedPathProxy(), o), function(m) { return r$e(m); }), u = s.length; if (u === 0) QE(G7, { points: s[0] }, e, t); else if (u === e) for (var l = 0; l < u; l++) t.push({ points: s[l] }); else { var c = 0, f = ce(s, function(m) { var y = [], _ = []; GT(m, y, _); var w = (_[1] - y[1]) * (_[0] - y[0]); return c += w, { poly: m, area: w }; }); f.sort(function(m, y) { return y.area - m.area; }); for (var h = e, l = 0; l < u; l++) { var p = f[l]; if (h <= 0) break; var d = l === u - 1 ? h : Math.ceil(p.area / c * e); d < 0 || (QE(G7, { points: p.poly }, d, t), h -= d); } } i = Ho; break; } if (!i) return e$e(r, e); for (var v = [], l = 0; l < t.length; l++) { var g = new i(); g.setShape(t[l]), t$e(r, g), v.push(g); } return v; } function i$e(r, e) { var t = r.length, n = e.length; if (t === n) return [r, e]; for (var i = [], a = [], o = t < n ? r : e, s = Math.min(t, n), u = Math.abs(n - t) / 6, l = (s - 2) / 6, c = Math.ceil(u / l) + 1, f = [o[0], o[1]], h = u, p = 2; p < s; ) { var d = o[p - 2], v = o[p - 1], g = o[p++], m = o[p++], y = o[p++], _ = o[p++], w = o[p++], x = o[p++]; if (h <= 0) { f.push(g, m, y, _, w, x); continue; } for (var C = Math.min(h, c - 1) + 1, S = 1; S <= C; S++) { var b = S / C; Mh(d, g, y, w, b, i), Mh(v, m, _, x, b, a), d = i[3], v = a[3], f.push(i[1], a[1], i[2], a[2], d, v), g = i[5], m = a[5], y = i[6], _ = a[6]; } h -= C - 1; } return o === r ? [f, e] : [r, f]; } function z7(r, e) { for (var t = r.length, n = r[t - 2], i = r[t - 1], a = [], o = 0; o < e.length; ) a[o++] = n, a[o++] = i; return a; } function a$e(r, e) { for (var t, n, i, a = [], o = [], s = 0; s < Math.max(r.length, e.length); s++) { var u = r[s], l = e[s], c = void 0, f = void 0; u ? l ? (t = i$e(u, l), c = t[0], f = t[1], n = c, i = f) : (f = z7(i || u, u), c = u) : (c = z7(n || l, l), f = l), a.push(c), o.push(f); } return [a, o]; } function $7(r) { for (var e = 0, t = 0, n = 0, i = r.length, a = 0, o = i - 2; a < i; o = a, a += 2) { var s = r[o], u = r[o + 1], l = r[a], c = r[a + 1], f = s * c - l * u; e += f, t += (s + l) * f, n += (u + c) * f; } return e === 0 ? [r[0] || 0, r[1] || 0] : [t / e / 3, n / e / 3, e]; } function o$e(r, e, t, n) { for (var i = (r.length - 2) / 6, a = 1 / 0, o = 0, s = r.length, u = s - 2, l = 0; l < i; l++) { for (var c = l * 6, f = 0, h = 0; h < s; h += 2) { var p = h === 0 ? c : (c + h - 2) % u + 2, d = r[p] - t[0], v = r[p + 1] - t[1], g = e[h] - n[0], m = e[h + 1] - n[1], y = g - d, _ = m - v; f += y * y + _ * _; } f < a && (a = f, o = l); } return o; } function s$e(r) { for (var e = [], t = r.length, n = 0; n < t; n += 2) e[n] = r[t - n - 2], e[n + 1] = r[t - n - 1]; return e; } function u$e(r, e, t, n) { for (var i = [], a, o = 0; o < r.length; o++) { var s = r[o], u = e[o], l = $7(s), c = $7(u); a == null && (a = l[2] < 0 != c[2] < 0); var f = [], h = [], p = 0, d = 1 / 0, v = [], g = s.length; a && (s = s$e(s)); for (var m = o$e(s, u, l, c) * 6, y = g - 2, _ = 0; _ < y; _ += 2) { var w = (m + _) % y + 2; f[_ + 2] = s[w] - l[0], f[_ + 3] = s[w + 1] - l[1]; } if (f[0] = s[m] - l[0], f[1] = s[m + 1] - l[1], t > 0) for (var x = n / t, C = -n / 2; C <= n / 2; C += x) { for (var S = Math.sin(C), b = Math.cos(C), E = 0, _ = 0; _ < s.length; _ += 2) { var T = f[_], P = f[_ + 1], I = u[_] - c[0], A = u[_ + 1] - c[1], L = I * b - A * S, D = I * S + A * b; v[_] = L, v[_ + 1] = D; var O = L - T, N = D - P; E += O * O + N * N; } if (E < d) { d = E, p = C; for (var F = 0; F < v.length; F++) h[F] = v[F]; } } else for (var k = 0; k < g; k += 2) h[k] = u[k] - c[0], h[k + 1] = u[k + 1] - c[1]; i.push({ from: f, to: h, fromCp: l, toCp: c, rotation: -p }); } return i; } function eb(r) { return r.__isCombineMorphing; } var Ote = "__mOriginal_"; function tb(r, e, t) { var n = Ote + e, i = r[n] || r[e]; r[n] || (r[n] = r[e]); var a = t.replace, o = t.after, s = t.before; r[e] = function() { var u = arguments, l; return s && s.apply(this, u), a ? l = a.apply(this, u) : l = i.apply(this, u), o && o.apply(this, u), l; }; } function I_(r, e) { var t = Ote + e; r[t] && (r[e] = r[t], r[t] = null); } function H7(r, e) { for (var t = 0; t < r.length; t++) for (var n = r[t], i = 0; i < n.length; ) { var a = n[i], o = n[i + 1]; n[i++] = e[0] * a + e[2] * o + e[4], n[i++] = e[1] * a + e[3] * o + e[5]; } } function Rte(r, e) { var t = r.getUpdatedPathProxy(), n = e.getUpdatedPathProxy(), i = a$e(q2(t), q2(n)), a = i[0], o = i[1], s = r.getComputedTransform(), u = e.getComputedTransform(); function l() { this.transform = null; } s && H7(a, s), u && H7(o, u), tb(e, "updateTransform", { replace: l }), e.transform = null; var c = u$e(a, o, 10, Math.PI), f = []; tb(e, "buildPath", { replace: function(h) { for (var p = e.__morphT, d = 1 - p, v = [], g = 0; g < c.length; g++) { var m = c[g], y = m.from, _ = m.to, w = m.rotation * p, x = m.fromCp, C = m.toCp, S = Math.sin(w), b = Math.cos(w); nS(v, x, C, p); for (var E = 0; E < y.length; E += 2) { var T = y[E], P = y[E + 1], I = _[E], A = _[E + 1], L = T * d + I * p, D = P * d + A * p; f[E] = L * b - D * S + v[0], f[E + 1] = L * S + D * b + v[1]; } var O = f[0], N = f[1]; h.moveTo(O, N); for (var E = 2; E < y.length; ) { var I = f[E++], A = f[E++], F = f[E++], k = f[E++], G = f[E++], U = f[E++]; O === I && N === A && F === G && k === U ? h.lineTo(G, U) : h.bezierCurveTo(I, A, F, k, G, U), O = G, N = U; } } } }); } function R5(r, e, t) { if (!r || !e) return e; var n = t.done, i = t.during; Rte(r, e), e.__morphT = 0; function a() { I_(e, "buildPath"), I_(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape(); } return e.animateTo({ __morphT: 1 }, qe({ during: function(o) { e.dirtyShape(), i && i(o); }, done: function() { a(), n && n(); } }, t)), e; } function l$e(r, e, t, n, i, a) { var o = 16; r = i === t ? 0 : Math.round(32767 * (r - t) / (i - t)), e = a === n ? 0 : Math.round(32767 * (e - n) / (a - n)); for (var s = 0, u, l = (1 << o) / 2; l > 0; l /= 2) { var c = 0, f = 0; (r & l) > 0 && (c = 1), (e & l) > 0 && (f = 1), s += l * l * (3 * c ^ f), f === 0 && (c === 1 && (r = l - 1 - r, e = l - 1 - e), u = r, r = e, e = u); } return s; } function rb(r) { var e = 1 / 0, t = 1 / 0, n = -1 / 0, i = -1 / 0, a = ce(r, function(s) { var u = s.getBoundingRect(), l = s.getComputedTransform(), c = u.x + u.width / 2 + (l ? l[4] : 0), f = u.y + u.height / 2 + (l ? l[5] : 0); return e = Math.min(c, e), t = Math.min(f, t), n = Math.max(c, n), i = Math.max(f, i), [c, f]; }), o = ce(a, function(s, u) { return { cp: s, z: l$e(s[0], s[1], e, t, n, i), path: r[u] }; }); return o.sort(function(s, u) { return s.z - u.z; }).map(function(s) { return s.path; }); } function Nte(r) { return n$e(r.path, r.count); } function K2() { return { fromIndividuals: [], toIndividuals: [], count: 0 }; } function c$e(r, e, t) { var n = []; function i(x) { for (var C = 0; C < x.length; C++) { var S = x[C]; eb(S) ? i(S.childrenRef()) : S instanceof Tt && n.push(S); } } i(r); var a = n.length; if (!a) return K2(); var o = t.dividePath || Nte, s = o({ path: e, count: a }); if (s.length !== a) return console.error("Invalid morphing: unmatched splitted path"), K2(); n = rb(n), s = rb(s); for (var u = t.done, l = t.during, c = t.individualDelay, f = new Ic(), h = 0; h < a; h++) { var p = n[h], d = s[h]; d.parent = e, d.copyTransform(f), c || Rte(p, d); } e.__isCombineMorphing = !0, e.childrenRef = function() { return s; }; function v(x) { for (var C = 0; C < s.length; C++) s[C].addSelfToZr(x); } tb(e, "addSelfToZr", { after: function(x) { v(x); } }), tb(e, "removeSelfFromZr", { after: function(x) { for (var C = 0; C < s.length; C++) s[C].removeSelfFromZr(x); } }); function g() { e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, I_(e, "addSelfToZr"), I_(e, "removeSelfFromZr"); } var m = s.length; if (c) for (var y = m, _ = function() { y--, y === 0 && (g(), u && u()); }, h = 0; h < m; h++) { var w = c ? qe({ delay: (t.delay || 0) + c(h, m, n[h], s[h]), done: _ }, t) : t; R5(n[h], s[h], w); } else e.__morphT = 0, e.animateTo({ __morphT: 1 }, qe({ during: function(x) { for (var C = 0; C < m; C++) { var S = s[C]; S.__morphT = e.__morphT, S.dirtyShape(); } l && l(x); }, done: function() { g(); for (var x = 0; x < r.length; x++) I_(r[x], "updateTransform"); u && u(); } }, t)); return e.__zr && v(e.__zr), { fromIndividuals: n, toIndividuals: s, count: m }; } function f$e(r, e, t) { var n = e.length, i = [], a = t.dividePath || Nte; function o(p) { for (var d = 0; d < p.length; d++) { var v = p[d]; eb(v) ? o(v.childrenRef()) : v instanceof Tt && i.push(v); } } if (eb(r)) { o(r.childrenRef()); var s = i.length; if (s < n) for (var u = 0, l = s; l < n; l++) i.push(JN(i[u++ % s])); i.length = n; } else { i = a({ path: r, count: n }); for (var c = r.getComputedTransform(), l = 0; l < i.length; l++) i[l].setLocalTransform(c); if (i.length !== n) return console.error("Invalid morphing: unmatched splitted path"), K2(); } i = rb(i), e = rb(e); for (var f = t.individualDelay, l = 0; l < n; l++) { var h = f ? qe({ delay: (t.delay || 0) + f(l, n, i[l], e[l]) }, t) : t; R5(i[l], e[l], h); } return { fromIndividuals: i, toIndividuals: e, count: e.length }; } function U7(r) { return le(r[0]); } function W7(r, e) { for (var t = [], n = r.length, i = 0; i < n; i++) t.push({ one: r[i], many: [] }); for (var i = 0; i < e.length; i++) { var a = e[i].length, o = void 0; for (o = 0; o < a; o++) t[o % n].many.push(e[i][o]); } for (var s = 0, i = n - 1; i >= 0; i--) if (!t[i].many.length) { var u = t[s].many; if (u.length <= 1) if (s) s = 0; else return t; var a = u.length, l = Math.ceil(a / 2); t[i].many = u.slice(l, a), t[s].many = u.slice(0, l), s++; } return t; } var h$e = { clone: function(r) { for (var e = [], t = 1 - Math.pow(1 - r.path.style.opacity, 1 / r.count), n = 0; n < r.count; n++) { var i = JN(r.path); i.setStyle("opacity", t), e.push(i); } return e; }, split: null }; function BL(r, e, t, n, i, a) { if (!r.length || !e.length) return; var o = Cy("update", n, i); if (!(o && o.duration > 0)) return; var s = n.getModel("universalTransition").get("delay"), u = Object.assign({ setToFinal: !0 }, o), l, c; U7(r) && (l = r, c = e), U7(e) && (l = e, c = r); function f(m, y, _, w, x) { var C = m.many, S = m.one; if (C.length === 1 && !x) { var b = y ? C[0] : S, E = y ? S : C[0]; if (eb(b)) f({ many: [b], one: E }, !0, _, w, !0); else { var T = s ? qe({ delay: s(_, w) }, u) : u; R5(b, E, T), a(b, E, b, E, T); } } else for (var P = qe({ dividePath: h$e[t], individualDelay: s && function(N, F, k, G) { return s(N + _, w); } }, u), I = y ? c$e(C, S, P) : f$e(S, C, P), A = I.fromIndividuals, L = I.toIndividuals, D = A.length, O = 0; O < D; O++) { var T = s ? qe({ delay: s(O, D) }, u) : u; a(A[O], L[O], y ? C[O] : m.one, y ? m.one : C[O], T); } } for (var h = l ? l === r : r.length > e.length, p = l ? W7(c, l) : W7(h ? e : r, [h ? r : e]), d = 0, v = 0; v < p.length; v++) d += p[v].many.length; for (var g = 0, v = 0; v < p.length; v++) f(p[v], h, g, d), g += p[v].many.length; } function Rp(r) { if (!r) return []; if (le(r)) { for (var e = [], t = 0; t < r.length; t++) e.push(Rp(r[t])); return e; } var n = []; return r.traverse(function(i) { i instanceof Tt && !i.disableMorphing && !i.invisible && !i.ignore && n.push(i); }), n; } var Fte = 1e4, p$e = Ut(); function d$e(r) { for (var e = r.dimensions, t = 0; t < e.length; t++) { var n = r.getDimensionInfo(e[t]); if (n && n.otherDims.itemGroupId === 0) return e[t]; } } function j7(r) { var e = []; return M(r, function(t) { var n = t.data; if (n.count() > Fte) { process.env.NODE_ENV !== "production" && to("Universal transition is disabled on large data > 10k."); return; } for (var i = n.getIndices(), a = d$e(n), o = 0; o < i.length; o++) e.push({ data: n, dim: t.dim || a, divide: t.divide, dataIndex: o }); }), e; } function kL(r, e, t) { r.traverse(function(n) { n instanceof Tt && Cn(n, { style: { opacity: 0 } }, e, { dataIndex: t, isFrom: !0 }); }); } function VL(r) { if (r.parent) { var e = r.getComputedTransform(); r.setLocalTransform(e), r.parent.remove(r); } } function ng(r) { r.stopAnimation(), r.isGroup && r.traverse(function(e) { e.stopAnimation(); }); } function v$e(r, e, t) { var n = Cy("update", t, e); n && r.traverse(function(i) { if (i instanceof vu) { var a = KIe(i); a && i.animateFrom({ style: a }, n); } }); } function g$e(r, e) { var t = r.length; if (t !== e.length) return !1; for (var n = 0; n < t; n++) { var i = r[n], a = e[n]; if (i.data.getId(i.dataIndex) !== a.data.getId(a.dataIndex)) return !1; } return !0; } function Bte(r, e, t) { var n = j7(r), i = j7(e); function a(m, y, _, w, x) { (_ || m) && y.animateFrom({ style: _ && _ !== m ? oe(oe({}, _.style), m.style) : m.style }, x); } function o(m) { for (var y = 0; y < m.length; y++) if (m[y].dim) return m[y].dim; } var s = o(n), u = o(i), l = !1; function c(m, y) { return function(_) { var w = _.data, x = _.dataIndex; if (y) return w.getId(x); var C = w.hostModel && w.hostModel.get("dataGroupId"), S = m ? s || u : u || s, b = S && w.getDimensionInfo(S), E = b && b.ordinalMeta; if (b) { var T = w.get(b.name, x); return E && E.categories[T] || T + ""; } var P = w.getRawDataItem(x); return P && P.groupId ? P.groupId + "" : C || w.getId(x); }; } var f = g$e(n, i), h = {}; if (!f) for (var p = 0; p < i.length; p++) { var d = i[p], v = d.data.getItemGraphicEl(d.dataIndex); v && (h[v.id] = !0); } function g(m, y) { var _ = n[y], w = i[m], x = w.data.hostModel, C = _.data.getItemGraphicEl(_.dataIndex), S = w.data.getItemGraphicEl(w.dataIndex); if (C === S) { S && v$e(S, w.dataIndex, x); return; } C && h[C.id] || S && (ng(S), C ? (ng(C), VL(C), l = !0, BL(Rp(C), Rp(S), w.divide, x, m, a)) : kL(S, x, m)); } new sf(n, i, c(!0, f), c(!1, f), null, "multiple").update(g).updateManyToOne(function(m, y) { var _ = i[m], w = _.data, x = w.hostModel, C = w.getItemGraphicEl(_.dataIndex), S = Wr(ce(y, function(b) { return n[b].data.getItemGraphicEl(n[b].dataIndex); }), function(b) { return b && b !== C && !h[b.id]; }); C && (ng(C), S.length ? (M(S, function(b) { ng(b), VL(b); }), l = !0, BL(Rp(S), Rp(C), _.divide, x, m, a)) : kL(C, x, _.dataIndex)); }).updateOneToMany(function(m, y) { var _ = n[y], w = _.data.getItemGraphicEl(_.dataIndex); if (!(w && h[w.id])) { var x = Wr(ce(m, function(S) { return i[S].data.getItemGraphicEl(i[S].dataIndex); }), function(S) { return S && S !== w; }), C = i[m[0]].data.hostModel; x.length && (M(x, function(S) { return ng(S); }), w ? (ng(w), VL(w), l = !0, BL( Rp(w), Rp(x), _.divide, C, m[0], a )) : M(x, function(S) { return kL(S, C, m[0]); })); } }).updateManyToMany(function(m, y) { new sf(y, m, function(_) { return n[_].data.getId(n[_].dataIndex); }, function(_) { return i[_].data.getId(i[_].dataIndex); }).update(function(_, w) { g(m[_], y[w]); }).execute(); }).execute(), l && M(e, function(m) { var y = m.data, _ = y.hostModel, w = _ && t.getViewOfSeriesModel(_), x = Cy("update", _, 0); w && _.isAnimationEnabled() && x && x.duration > 0 && w.group.traverse(function(C) { C instanceof Tt && !C.animators.length && C.animateFrom({ style: { opacity: 0 } }, x); }); }); } function Y7(r) { var e = r.getModel("universalTransition").get("seriesKey"); return e || r.id; } function X7(r) { return le(r) ? r.sort().join(",") : r; } function Hf(r) { if (r.hostModel) return r.hostModel.getModel("universalTransition").get("divideShape"); } function m$e(r, e) { var t = $e(), n = $e(), i = $e(); M(r.oldSeries, function(o, s) { var u = r.oldData[s], l = Y7(o), c = X7(l); n.set(c, u), le(l) && M(l, function(f) { i.set(f, { data: u, key: c }); }); }); function a(o) { t.get(o) && to("Duplicated seriesKey in universalTransition " + o); } return M(e.updatedSeries, function(o) { if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) { var s = o.getData(), u = Y7(o), l = X7(u), c = n.get(l); if (c) process.env.NODE_ENV !== "production" && a(l), t.set(l, { oldSeries: [{ divide: Hf(c), data: c }], newSeries: [{ divide: Hf(s), data: s }] }); else if (le(u)) { process.env.NODE_ENV !== "production" && a(l); var f = []; M(u, function(d) { var v = n.get(d); v && f.push({ divide: Hf(v), data: v }); }), f.length && t.set(l, { oldSeries: f, newSeries: [{ data: s, divide: Hf(s) }] }); } else { var h = i.get(u); if (h) { var p = t.get(h.key); p || (p = { oldSeries: [{ data: h.data, divide: Hf(h.data) }], newSeries: [] }, t.set(h.key, p)), p.newSeries.push({ data: s, divide: Hf(s) }); } } } }), t; } function q7(r, e) { for (var t = 0; t < r.length; t++) { var n = e.seriesIndex != null && e.seriesIndex === r[t].seriesIndex || e.seriesId != null && e.seriesId === r[t].id; if (n) return t; } } function y$e(r, e, t, n) { var i = [], a = []; M(jr(r.from), function(o) { var s = q7(e.oldSeries, o); s >= 0 && i.push({ data: e.oldData[s], divide: Hf(e.oldData[s]), dim: o.dimension }); }), M(jr(r.to), function(o) { var s = q7(t.updatedSeries, o); if (s >= 0) { var u = t.updatedSeries[s].getData(); a.push({ data: u, divide: Hf(u), dim: o.dimension }); } }), i.length > 0 && a.length > 0 && Bte(i, a, n); } function _$e(r) { r.registerUpdateLifecycle("series:beforeupdate", function(e, t, n) { M(jr(n.seriesTransition), function(i) { M(jr(i.to), function(a) { for (var o = n.updatedSeries, s = 0; s < o.length; s++) (a.seriesIndex != null && a.seriesIndex === o[s].seriesIndex || a.seriesId != null && a.seriesId === o[s].id) && (o[s][dS] = !0); }); }); }), r.registerUpdateLifecycle("series:transition", function(e, t, n) { var i = p$e(t); if (i.oldSeries && n.updatedSeries && n.optionChanged) { var a = n.seriesTransition; if (a) M(jr(a), function(h) { y$e(h, i, n, t); }); else { var o = m$e(i, n); M(o.keys(), function(h) { var p = o.get(h); Bte(p.oldSeries, p.newSeries, t); }); } M(n.updatedSeries, function(h) { h[dS] && (h[dS] = !1); }); } for (var s = e.getSeries(), u = i.oldSeries = [], l = i.oldData = [], c = 0; c < s.length; c++) { var f = s[c].getData(); f.count() < Fte && (u.push(s[c]), l.push(f)); } }); } bt([VOe]); bt([MOe]); bt([lRe, PRe, VRe, TNe, HNe, BFe, d5e, e3e, I3e, B3e, X3e, JBe, bke, Vke, iVe, fVe, AVe, VVe, JVe, o6e, _6e, rGe]); bt(bGe); bt(a4e); bt(LQ); bt(C4e); bt(mee); bt(A4e); bt(k4e); bt(Vze); bt(u8e); bt(Zw); bt(I8e); bt(D8e); bt(j8e); bt(r9e); bt(c9e); bt(y9e); bt(M9e); bt(e7e); bt(Ste); bt(Ete); bt(P7e); bt(Ate); bt(Lte); bt(M7e); bt(W7e); bt(X7e); bt(_$e); bt(K2e); const w$e = { options: { type: Object, required: !0 }, autoHidden: { type: Boolean, default: !0 }, customClass: String, coordinateSystem: { type: String, default: "cesium" } }; ({ ...Pt }); var x$e = de({ name: "VcOverlayEcharts", props: w$e, emits: ["beforeLoad", "ready", "destroyed", "mouseenter", "mouseleave", "click"], setup(r, e) { const t = We(); t.cesiumClass = "VcOverlayEcharts", t.cesiumEvents = []; const n = Fa(r, e, t); if (n === void 0) return; const { $services: i } = n, a = te(!1), o = te(null), s = _n({ left: "0px", top: "0px", pointerEvents: "none", position: "absolute" }); let u; const l = te(!0); let c = []; c.push(Ve(() => r.options, (y) => { n.reload(); })), t.createCesiumObject = async () => JS(o), t.mount = async () => { const { viewer: y } = i; return a.value = !0, oi(() => { KK(r.coordinateSystem, p(y)), u = YK(JS(o)), h(), y.scene.postRender.addEventListener(f); }), !0; }, t.unmount = async () => { const { viewer: y } = i; return y.scene.postRender.removeEventListener(f), a.value = !1, !0; }; const f = () => { if (l.value) { const { viewer: y } = i; u.resize({ width: y.canvas.width, height: y.canvas.height }); } }, h = () => { l.value && r.options && u.setOption(r.options); }, p = (y) => { const _ = function(x) { this.viewer = x, this._mapOffset = [0, 0]; }; return _.create = function(w) { return w.eachSeries(function(x) { x.get("coordinateSystem") === r.coordinateSystem && (x.coordinateSystem = new _(y)); }), []; }, _.getDimensionsInfo = function() { return ["x", "y"]; }, _.dimensions = ["x", "y"], _.prototype.dimensions = ["x", "y"], _.prototype.setMapOffset = function(x) { this._mapOffset = x; }, _.prototype.dataToPoint = function(w) { const x = [], C = Cesium.Cartesian3.fromDegrees(w[0], w[1]); if (!C) return x; if (r.autoHidden) { const b = Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(C, new Cesium.Cartesian3()), E = this.viewer.camera.direction; if (Cesium.Cartesian3.dot(b, E) >= 0) return x; } const S = this.viewer.scene.cartesianToCanvasCoordinates(C); return S ? [S.x - this._mapOffset[0], S.y - this._mapOffset[1]] : x; }, _.prototype.pointToData = function(w) { const x = this._mapOffset, C = y.scene.globe.ellipsoid, S = new Cesium.Cartesian3(w[1] + x[1], w[2] + x[2], 0), b = C.cartesianToCartographic(S); return b ? [b.longitude, b.latitude] : [0, 0]; }, _.prototype.getviewerRect = function() { const w = this.viewer.canvas; return new gt(0, 0, w.width, w.height); }, _.prototype.getRoamTransform = function() { return xs(); }, _; }, d = () => a.value ? H("div", { ref: o, class: `vc-echart-container${r.customClass ? " " + r.customClass : ""}`, style: s, onMouseenter: g, onMouseleave: m, onClick: v }, Qi(e.slots.default)) : xe("v-if"), v = (y) => { e.emit("click", y); }, g = (y) => { e.emit("mouseenter", y); }, m = (y) => { e.emit("mouseleave", y); }; return xa(() => { c.forEach((y) => y()), c = []; }), () => d(); } }); function Z7() { const r = Cesium.GeometryAttributes; return new Cesium.Geometry({ attributes: new r({ position: new Cesium.GeometryAttribute({ componentDatatype: Cesium.ComponentDatatype.FLOAT, componentsPerAttribute: 3, values: new Float32Array([ -1, -1, 0, 1, -1, 0, 1, 1, 0, -1, 1, 0 ]) }), st: new Cesium.GeometryAttribute({ componentDatatype: Cesium.ComponentDatatype.FLOAT, componentsPerAttribute: 2, values: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]) }) }), indices: new Uint32Array([3, 2, 0, 0, 2, 1]) }); } function ts(r, e) { if (Cesium.defined(e)) { const n = {}; n.arrayBufferView = e, r.source = n; } return new Cesium.Texture(r); } function GL(r, e, t) { return new Cesium.Framebuffer({ context: r, colorTextures: [e], depthTexture: t }); } function zL(r) { const n = { viewport: r.viewport, depthTest: r.depthTest, depthMask: r.depthMask, blending: r.blending }; return Cesium.Appearance.getDefaultRenderState(!0, !1, n); } function C$e(r) { const e = {}, t = Cesium.Math.mod(r.west, Cesium.Math.TWO_PI), n = Cesium.Math.mod(r.east, Cesium.Math.TWO_PI), i = r.width; let a, o; i > Cesium.Math.THREE_PI_OVER_TWO ? (a = 0, o = Cesium.Math.TWO_PI) : n - t < i ? (a = t, o = t + i) : (a = t, o = n), e.lon = { min: Cesium.Math.toDegrees(a), max: Cesium.Math.toDegrees(o) }; const s = r.south, u = r.north, l = r.height, c = l > Cesium.Math.PI / 12 ? l / 2 : 0; let f = Cesium.Math.clampToLatitudeRange(s - c), h = Cesium.Math.clampToLatitudeRange(u + c); return f < -Cesium.Math.PI_OVER_THREE && (f = -Cesium.Math.PI_OVER_TWO), h > Cesium.Math.PI_OVER_THREE && (h = Cesium.Math.PI_OVER_TWO), e.lat = { min: Cesium.Math.toDegrees(f), max: Cesium.Math.toDegrees(h) }, e; } var S$e = ` // the size of UV textures: width = lon, height = lat*lev uniform sampler2D U; // eastward wind uniform sampler2D V; // northward wind uniform sampler2D currentParticlesPosition; // (lon, lat, lev) uniform vec3 dimension; // (lon, lat, lev) uniform vec3 minimum; // minimum of each dimension uniform vec3 maximum; // maximum of each dimension uniform vec3 interval; // interval of each dimension // used to calculate the wind norm uniform vec2 uSpeedRange; // (min, max); uniform vec2 vSpeedRange; uniform float pixelSize; uniform float speedFactor; float speedScaleFactor = speedFactor * pixelSize; varying vec2 v_textureCoordinates; vec2 mapPositionToNormalizedIndex2D(vec3 lonLatLev) { // ensure the range of longitude and latitude lonLatLev.x = mod(lonLatLev.x, 360.0); lonLatLev.y = clamp(lonLatLev.y, -90.0, 90.0); vec3 index3D = vec3(0.0); index3D.x = (lonLatLev.x - minimum.x) / interval.x; index3D.y = (lonLatLev.y - minimum.y) / interval.y; index3D.z = (lonLatLev.z - minimum.z) / interval.z; // the st texture coordinate corresponding to (col, row) index // example // data array is [0, 1, 2, 3, 4, 5], width = 3, height = 2 // the content of texture will be // t 1.0 // | 3 4 5 // | // | 0 1 2 // 0.0------1.0 s vec2 index2D = vec2(index3D.x, index3D.z * dimension.y + index3D.y); vec2 normalizedIndex2D = vec2(index2D.x / dimension.x, index2D.y / (dimension.y * dimension.z)); return normalizedIndex2D; } float getWindComponent(sampler2D componentTexture, vec3 lonLatLev) { vec2 normalizedIndex2D = mapPositionToNormalizedIndex2D(lonLatLev); float result = texture2D(componentTexture, normalizedIndex2D).r; return result; } float interpolateTexture(sampler2D componentTexture, vec3 lonLatLev) { float lon = lonLatLev.x; float lat = lonLatLev.y; float lev = lonLatLev.z; float lon0 = floor(lon / interval.x) * interval.x; float lon1 = lon0 + 1.0 * interval.x; float lat0 = floor(lat / interval.y) * interval.y; float lat1 = lat0 + 1.0 * interval.y; float lon0_lat0 = getWindComponent(componentTexture, vec3(lon0, lat0, lev)); float lon1_lat0 = getWindComponent(componentTexture, vec3(lon1, lat0, lev)); float lon0_lat1 = getWindComponent(componentTexture, vec3(lon0, lat1, lev)); float lon1_lat1 = getWindComponent(componentTexture, vec3(lon1, lat1, lev)); float lon_lat0 = mix(lon0_lat0, lon1_lat0, lon - lon0); float lon_lat1 = mix(lon0_lat1, lon1_lat1, lon - lon0); float lon_lat = mix(lon_lat0, lon_lat1, lat - lat0); return lon_lat; } vec3 linearInterpolation(vec3 lonLatLev) { // https://en.wikipedia.org/wiki/Bilinear_interpolation float u = interpolateTexture(U, lonLatLev); float v = interpolateTexture(V, lonLatLev); float w = 0.0; return vec3(u, v, w); } vec2 lengthOfLonLat(vec3 lonLatLev) { // unit conversion: meters -> longitude latitude degrees // see https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree for detail // Calculate the length of a degree of latitude and longitude in meters float latitude = radians(lonLatLev.y); float term1 = 111132.92; float term2 = 559.82 * cos(2.0 * latitude); float term3 = 1.175 * cos(4.0 * latitude); float term4 = 0.0023 * cos(6.0 * latitude); float latLength = term1 - term2 + term3 - term4; float term5 = 111412.84 * cos(latitude); float term6 = 93.5 * cos(3.0 * latitude); float term7 = 0.118 * cos(5.0 * latitude); float longLength = term5 - term6 + term7; return vec2(longLength, latLength); } vec3 convertSpeedUnitToLonLat(vec3 lonLatLev, vec3 speed) { vec2 lonLatLength = lengthOfLonLat(lonLatLev); float u = speed.x / lonLatLength.x; float v = speed.y / lonLatLength.y; float w = 0.0; vec3 windVectorInLonLatLev = vec3(u, v, w); return windVectorInLonLatLev; } vec3 calculateSpeedByRungeKutta2(vec3 lonLatLev) { // see https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Second-order_methods_with_two_stages for detail const float h = 0.5; vec3 y_n = lonLatLev; vec3 f_n = linearInterpolation(lonLatLev); vec3 midpoint = y_n + 0.5 * h * convertSpeedUnitToLonLat(y_n, f_n) * speedScaleFactor; vec3 speed = h * linearInterpolation(midpoint) * speedScaleFactor; return speed; } float calculateWindNorm(vec3 speed) { vec3 percent = vec3(0.0); percent.x = (speed.x - uSpeedRange.x) / (uSpeedRange.y - uSpeedRange.x); percent.y = (speed.y - vSpeedRange.x) / (vSpeedRange.y - vSpeedRange.x); float norm = length(percent); return norm; } void main() { // texture coordinate must be normalized vec3 lonLatLev = texture2D(currentParticlesPosition, v_textureCoordinates).rgb; vec3 speed = calculateSpeedByRungeKutta2(lonLatLev); vec3 speedInLonLat = convertSpeedUnitToLonLat(lonLatLev, speed); vec4 particleSpeed = vec4(speedInLonLat, calculateWindNorm(speed / speedScaleFactor)); gl_FragColor = particleSpeed; } `; const E$e = ` uniform sampler2D currentParticlesPosition; // (lon, lat, lev) uniform sampler2D particlesSpeed; // (u, v, w, norm) Unit converted to degrees of longitude and latitude varying vec2 v_textureCoordinates; void main() { // texture coordinate must be normalized vec3 lonLatLev = texture2D(currentParticlesPosition, v_textureCoordinates).rgb; vec3 speed = texture2D(particlesSpeed, v_textureCoordinates).rgb; vec3 nextParticle = lonLatLev + speed; gl_FragColor = vec4(nextParticle, 0.0); } `, b$e = ` uniform sampler2D nextParticlesPosition; uniform sampler2D particlesSpeed; // (u, v, w, norm) // range (min, max) uniform vec2 lonRange; uniform vec2 latRange; uniform float randomCoefficient; // use to improve the pseudo-random generator uniform float dropRate; // drop rate is a chance a particle will restart at random position to avoid degeneration uniform float dropRateBump; varying vec2 v_textureCoordinates; // pseudo-random generator const vec3 randomConstants = vec3(12.9898, 78.233, 4375.85453); const vec2 normalRange = vec2(0.0, 1.0); float rand(vec2 seed, vec2 range) { vec2 randomSeed = randomCoefficient * seed; float temp = dot(randomConstants.xy, randomSeed); temp = fract(sin(temp) * (randomConstants.z + temp)); return temp * (range.y - range.x) + range.x; } vec3 generateRandomParticle(vec2 seed, float lev) { // ensure the longitude is in [0, 360] float randomLon = mod(rand(seed, lonRange), 360.0); float randomLat = rand(-seed, latRange); return vec3(randomLon, randomLat, lev); } bool particleOutbound(vec3 particle) { return particle.y < -90.0 || particle.y > 90.0; } void main() { vec3 nextParticle = texture2D(nextParticlesPosition, v_textureCoordinates).rgb; vec4 nextSpeed = texture2D(particlesSpeed, v_textureCoordinates); float speedNorm = nextSpeed.a; float particleDropRate = dropRate + dropRateBump * speedNorm; vec2 seed1 = nextParticle.xy + v_textureCoordinates; vec2 seed2 = nextSpeed.xy + v_textureCoordinates; vec3 randomParticle = generateRandomParticle(seed1, nextParticle.z); float randomNumber = rand(seed2, normalRange); if (randomNumber < particleDropRate || particleOutbound(nextParticle)) { gl_FragColor = vec4(randomParticle, 1.0); // 1.0 means this is a random particle } else { gl_FragColor = vec4(nextParticle, 0.0); } } `; class Jg { constructor(e) { this.commandType = e.commandType, this.geometry = e.geometry, this.attributeLocations = e.attributeLocations, this.primitiveType = e.primitiveType, this.uniformMap = e.uniformMap, this.vertexShaderSource = e.vertexShaderSource, this.fragmentShaderSource = e.fragmentShaderSource, this.rawRenderState = e.rawRenderState, this.framebuffer = e.framebuffer, this.outputTexture = e.outputTexture, this.autoClear = Cesium.defaultValue(e.autoClear, !1), this.preExecute = e.preExecute, this.show = !0, this.commandToExecute = void 0, this.clearCommand = void 0, this.autoClear && (this.clearCommand = new Cesium.ClearCommand({ color: new Cesium.Color(0, 0, 0, 0), depth: 1, framebuffer: this.framebuffer, pass: Cesium.Pass.OPAQUE })); } createCommand(e) { switch (this.commandType) { case "Draw": { const t = Cesium.VertexArray.fromGeometry({ context: e, geometry: this.geometry, attributeLocations: this.attributeLocations, bufferUsage: Cesium.BufferUsage.STATIC_DRAW }), n = Cesium.ShaderProgram.fromCache({ context: e, attributeLocations: this.attributeLocations, vertexShaderSource: this.vertexShaderSource, fragmentShaderSource: this.fragmentShaderSource }), i = Cesium.RenderState.fromCache(this.rawRenderState); return new Cesium.DrawCommand({ owner: this, vertexArray: t, primitiveType: this.primitiveType, uniformMap: this.uniformMap, modelMatrix: Cesium.Matrix4.IDENTITY, shaderProgram: n, framebuffer: this.framebuffer, renderState: i, pass: Cesium.Pass.OPAQUE }); } case "Compute": return new Cesium.ComputeCommand({ owner: this, fragmentShaderSource: this.fragmentShaderSource, uniformMap: this.uniformMap, outputTexture: this.outputTexture, persists: !0 }); } } setGeometry(e, t) { this.geometry = t; const n = Cesium.VertexArray.fromGeometry({ context: e, geometry: this.geometry, attributeLocations: this.attributeLocations, bufferUsage: Cesium.BufferUsage.STATIC_DRAW }); this.commandToExecute.vertexArray = n; } update(e) { !this.show || (Cesium.defined(this.commandToExecute) || (this.commandToExecute = this.createCommand(e.context)), Cesium.defined(this.preExecute) && this.preExecute(), Cesium.defined(this.clearCommand) && e.commandList.push(this.clearCommand), e.commandList.push(this.commandToExecute)); } isDestroyed() { return !1; } destroy() { return Cesium.defined(this.commandToExecute) && (this.commandToExecute.shaderProgram = this.commandToExecute.shaderProgram && this.commandToExecute.shaderProgram.destroy()), Cesium.destroyObject(this); } } class K7 { constructor(e, t, n, i) { this.data = t, this.createWindTextures(e, t), this.createParticlesTextures(e, n, i), this.createComputingPrimitives(t, n, i); } createWindTextures(e, t) { const n = { context: e, width: t.dimensions.lon, height: t.dimensions.lat * t.dimensions.lev, pixelFormat: Cesium.PixelFormat.LUMINANCE, pixelDatatype: Cesium.PixelDatatype.FLOAT, flipY: !1, sampler: new Cesium.Sampler({ minificationFilter: Cesium.TextureMinificationFilter.NEAREST, magnificationFilter: Cesium.TextureMagnificationFilter.NEAREST }) }; this.windTextures = { U: ts(n, t.U.array), V: ts(n, t.V.array) }; } createParticlesTextures(e, t, n) { const i = { context: e, width: t.particlesTextureSize, height: t.particlesTextureSize, pixelFormat: Cesium.PixelFormat.RGBA, pixelDatatype: Cesium.PixelDatatype.FLOAT, flipY: !1, sampler: new Cesium.Sampler({ minificationFilter: Cesium.TextureMinificationFilter.NEAREST, magnificationFilter: Cesium.TextureMagnificationFilter.NEAREST }) }, a = this.randomizeParticles(t.maxParticles, n), o = new Float32Array(4 * t.maxParticles).fill(0); this.particlesTextures = { previousParticlesPosition: ts(i, a), currentParticlesPosition: ts(i, a), nextParticlesPosition: ts(i, a), postProcessingPosition: ts(i, a), particlesSpeed: ts(i, o) }; } randomizeParticles(e, t) { const n = new Float32Array(4 * e); for (let i = 0; i < e; i++) n[4 * i] = Cesium.Math.randomBetween(t.lonRange.x, t.lonRange.y), n[4 * i + 1] = Cesium.Math.randomBetween(t.latRange.x, t.latRange.y), n[4 * i + 2] = Cesium.Math.randomBetween(this.data.lev.min, this.data.lev.max), n[4 * i + 3] = 0; return n; } destroyParticlesTextures() { Object.keys(this.particlesTextures).forEach((e) => { this.particlesTextures[e].destroy(); }); } createComputingPrimitives(e, t, n) { const i = new Cesium.Cartesian3(e.dimensions.lon, e.dimensions.lat, e.dimensions.lev), a = new Cesium.Cartesian3(e.lon.min, e.lat.min, e.lev.min), o = new Cesium.Cartesian3(e.lon.max, e.lat.max, e.lev.max), s = new Cesium.Cartesian3((o.x - a.x) / (i.x - 1), (o.y - a.y) / (i.y - 1), i.z > 1 ? (o.z - a.z) / (i.z - 1) : 1), u = new Cesium.Cartesian2(e.U.min, e.U.max), l = new Cesium.Cartesian2(e.V.min, e.V.max), c = this; this.primitives = { calculateSpeed: new Jg({ commandType: "Compute", uniformMap: { U: function() { return c.windTextures.U; }, V: function() { return c.windTextures.V; }, currentParticlesPosition: function() { return c.particlesTextures.currentParticlesPosition; }, dimension: function() { return i; }, minimum: function() { return a; }, maximum: function() { return o; }, interval: function() { return s; }, uSpeedRange: function() { return u; }, vSpeedRange: function() { return l; }, pixelSize: function() { return n.pixelSize; }, speedFactor: function() { return t.speedFactor; } }, fragmentShaderSource: new Cesium.ShaderSource({ sources: [S$e] }), outputTexture: this.particlesTextures.particlesSpeed, preExecute: function() { const f = c.particlesTextures.previousParticlesPosition; c.particlesTextures.previousParticlesPosition = c.particlesTextures.currentParticlesPosition, c.particlesTextures.currentParticlesPosition = c.particlesTextures.postProcessingPosition, c.particlesTextures.postProcessingPosition = f, c.primitives.calculateSpeed.commandToExecute.outputTexture = c.particlesTextures.particlesSpeed; } }), updatePosition: new Jg({ commandType: "Compute", uniformMap: { currentParticlesPosition: function() { return c.particlesTextures.currentParticlesPosition; }, particlesSpeed: function() { return c.particlesTextures.particlesSpeed; } }, fragmentShaderSource: new Cesium.ShaderSource({ sources: [E$e] }), outputTexture: this.particlesTextures.nextParticlesPosition, preExecute: function() { c.primitives.updatePosition.commandToExecute.outputTexture = c.particlesTextures.nextParticlesPosition; } }), postProcessingPosition: new Jg({ commandType: "Compute", uniformMap: { nextParticlesPosition: function() { return c.particlesTextures.nextParticlesPosition; }, particlesSpeed: function() { return c.particlesTextures.particlesSpeed; }, lonRange: function() { return n.lonRange; }, latRange: function() { return n.latRange; }, randomCoefficient: function() { return Math.random(); }, dropRate: function() { return t.dropRate; }, dropRateBump: function() { return t.dropRateBump; } }, fragmentShaderSource: new Cesium.ShaderSource({ sources: [b$e] }), outputTexture: this.particlesTextures.postProcessingPosition, preExecute: function() { c.primitives.postProcessingPosition.commandToExecute.outputTexture = c.particlesTextures.postProcessingPosition; } }) }; } } const T$e = ` attribute vec2 st; // it is not normal itself, but used to control lines drawing attribute vec3 normal; // (point to use, offset sign, not used component) uniform sampler2D previousParticlesPosition; uniform sampler2D currentParticlesPosition; uniform sampler2D postProcessingPosition; uniform float particleHeight; uniform float aspect; uniform float pixelSize; uniform float lineWidth; struct adjacentPoints { vec4 previous; vec4 current; vec4 next; }; vec3 convertCoordinate(vec3 lonLatLev) { // WGS84 (lon, lat, lev) -> ECEF (x, y, z) // read https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates for detail // WGS 84 geometric constants float a = 6378137.0; // Semi-major axis float b = 6356752.3142; // Semi-minor axis float e2 = 6.69437999014e-3; // First eccentricity squared float latitude = radians(lonLatLev.y); float longitude = radians(lonLatLev.x); float cosLat = cos(latitude); float sinLat = sin(latitude); float cosLon = cos(longitude); float sinLon = sin(longitude); float N_Phi = a / sqrt(1.0 - e2 * sinLat * sinLat); float h = particleHeight; // it should be high enough otherwise the particle may not pass the terrain depth test vec3 cartesian = vec3(0.0); cartesian.x = (N_Phi + h) * cosLat * cosLon; cartesian.y = (N_Phi + h) * cosLat * sinLon; cartesian.z = ((b * b) / (a * a) * N_Phi + h) * sinLat; return cartesian; } vec4 calculateProjectedCoordinate(vec3 lonLatLev) { // the range of longitude in Cesium is [-180, 180] but the range of longitude in the NetCDF file is [0, 360] // [0, 180] is corresponding to [0, 180] and [180, 360] is corresponding to [-180, 0] lonLatLev.x = mod(lonLatLev.x + 180.0, 360.0) - 180.0; vec3 particlePosition = convertCoordinate(lonLatLev); vec4 projectedCoordinate = czm_modelViewProjection * vec4(particlePosition, 1.0); return projectedCoordinate; } vec4 calculateOffsetOnNormalDirection(vec4 pointA, vec4 pointB, float offsetSign) { vec2 aspectVec2 = vec2(aspect, 1.0); vec2 pointA_XY = (pointA.xy / pointA.w) * aspectVec2; vec2 pointB_XY = (pointB.xy / pointB.w) * aspectVec2; float offsetLength = lineWidth / 2.0; vec2 direction = normalize(pointB_XY - pointA_XY); vec2 normalVector = vec2(-direction.y, direction.x); normalVector.x = normalVector.x / aspect; normalVector = offsetLength * normalVector; vec4 offset = vec4(offsetSign * normalVector, 0.0, 0.0); return offset; } vec4 calculateOffsetOnMiterDirection(adjacentPoints projectedCoordinates, float offsetSign) { vec2 aspectVec2 = vec2(aspect, 1.0); vec4 PointA = projectedCoordinates.previous; vec4 PointB = projectedCoordinates.current; vec4 PointC = projectedCoordinates.next; vec2 pointA_XY = (PointA.xy / PointA.w) * aspectVec2; vec2 pointB_XY = (PointB.xy / PointB.w) * aspectVec2; vec2 pointC_XY = (PointC.xy / PointC.w) * aspectVec2; vec2 AB = normalize(pointB_XY - pointA_XY); vec2 BC = normalize(pointC_XY - pointB_XY); vec2 normalA = vec2(-AB.y, AB.x); vec2 tangent = normalize(AB + BC); vec2 miter = vec2(-tangent.y, tangent.x); float offsetLength = lineWidth / 2.0; float projection = dot(miter, normalA); vec4 offset = vec4(0.0); // avoid to use values that are too small if (projection > 0.1) { float miterLength = offsetLength / projection; offset = vec4(offsetSign * miter * miterLength, 0.0, 0.0); offset.x = offset.x / aspect; } else { offset = calculateOffsetOnNormalDirection(PointB, PointC, offsetSign); } return offset; } void main() { vec2 particleIndex = st; vec3 previousPosition = texture2D(previousParticlesPosition, particleIndex).rgb; vec3 currentPosition = texture2D(currentParticlesPosition, particleIndex).rgb; vec3 nextPosition = texture2D(postProcessingPosition, particleIndex).rgb; float isAnyRandomPointUsed = texture2D(postProcessingPosition, particleIndex).a + texture2D(currentParticlesPosition, particleIndex).a + texture2D(previousParticlesPosition, particleIndex).a; adjacentPoints projectedCoordinates; if (isAnyRandomPointUsed > 0.0) { projectedCoordinates.previous = calculateProjectedCoordinate(previousPosition); projectedCoordinates.current = projectedCoordinates.previous; projectedCoordinates.next = projectedCoordinates.previous; } else { projectedCoordinates.previous = calculateProjectedCoordinate(previousPosition); projectedCoordinates.current = calculateProjectedCoordinate(currentPosition); projectedCoordinates.next = calculateProjectedCoordinate(nextPosition); } int pointToUse = int(normal.x); float offsetSign = normal.y; vec4 offset = vec4(0.0); // render lines with triangles and miter joint // read https://blog.scottlogic.com/2019/11/18/drawing-lines-with-webgl.html for detail if (pointToUse == -1) { offset = pixelSize * calculateOffsetOnNormalDirection(projectedCoordinates.previous, projectedCoordinates.current, offsetSign); gl_Position = projectedCoordinates.previous + offset; } else { if (pointToUse == 0) { offset = pixelSize * calculateOffsetOnMiterDirection(projectedCoordinates, offsetSign); gl_Position = projectedCoordinates.current + offset; } else { if (pointToUse == 1) { offset = pixelSize * calculateOffsetOnNormalDirection(projectedCoordinates.current, projectedCoordinates.next, offsetSign); gl_Position = projectedCoordinates.next + offset; } else { } } } } `, P$e = ` void main() { const vec4 white = vec4(1.0); gl_FragColor = white; } `, J7 = ` attribute vec3 position; attribute vec2 st; varying vec2 textureCoordinate; void main() { textureCoordinate = st; gl_Position = vec4(position, 1.0); } `, I$e = ` uniform sampler2D segmentsColorTexture; uniform sampler2D segmentsDepthTexture; uniform sampler2D currentTrailsColor; uniform sampler2D trailsDepthTexture; uniform float fadeOpacity; varying vec2 textureCoordinate; void main() { vec4 pointsColor = texture2D(segmentsColorTexture, textureCoordinate); vec4 trailsColor = texture2D(currentTrailsColor, textureCoordinate); trailsColor = floor(fadeOpacity * 255.0 * trailsColor) / 255.0; // make sure the trailsColor will be strictly decreased float pointsDepth = texture2D(segmentsDepthTexture, textureCoordinate).r; float trailsDepth = texture2D(trailsDepthTexture, textureCoordinate).r; float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, textureCoordinate)); gl_FragColor = vec4(0.0); if (pointsDepth < globeDepth) { gl_FragColor = gl_FragColor + pointsColor; } if (trailsDepth < globeDepth) { gl_FragColor = gl_FragColor + trailsColor; } gl_FragDepthEXT = min(pointsDepth, trailsDepth); } `, A$e = ` uniform sampler2D trailsColorTexture; uniform sampler2D trailsDepthTexture; varying vec2 textureCoordinate; void main() { vec4 trailsColor = texture2D(trailsColorTexture, textureCoordinate); float trailsDepth = texture2D(trailsDepthTexture, textureCoordinate).r; float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, textureCoordinate)); if (trailsDepth < globeDepth) { gl_FragColor = trailsColor; } else { gl_FragColor = vec4(0.0); } } `; class Q7 { constructor(e, t, n, i, a) { this.createRenderingTextures(e, t), this.createRenderingFramebuffers(e), this.createRenderingPrimitives(e, n, i, a); } createRenderingTextures(e, t) { const n = { context: e, width: e.drawingBufferWidth, height: e.drawingBufferHeight, pixelFormat: Cesium.PixelFormat.RGBA, pixelDatatype: Cesium.PixelDatatype.UNSIGNED_BYTE }, i = { context: e, width: e.drawingBufferWidth, height: e.drawingBufferHeight, pixelFormat: Cesium.PixelFormat.DEPTH_COMPONENT, pixelDatatype: Cesium.PixelDatatype.UNSIGNED_INT }; this.textures = { segmentsColor: ts(n), segmentsDepth: ts(i), currentTrailsColor: ts(n), currentTrailsDepth: ts(i), nextTrailsColor: ts(n), nextTrailsDepth: ts(i) }; } createRenderingFramebuffers(e) { this.framebuffers = { segments: GL(e, this.textures.segmentsColor, this.textures.segmentsDepth), currentTrails: GL(e, this.textures.currentTrailsColor, this.textures.currentTrailsDepth), nextTrails: GL(e, this.textures.nextTrailsColor, this.textures.nextTrailsDepth) }; } createSegmentsGeometry(e) { const n = []; for (let p = 0; p < e.particlesTextureSize; p++) for (let d = 0; d < e.particlesTextureSize; d++) for (let v = 0; v < 6; v++) n.push(p / e.particlesTextureSize), n.push(d / e.particlesTextureSize); const i = new Float32Array(n), a = [], o = [-1, 0, 1], s = [-1, 1]; for (let p = 0; p < e.maxParticles; p++) for (let d = 0; d < o.length; d++) for (let v = 0; v < s.length; v++) a.push(o[d]), a.push(s[v]), a.push(0); const u = new Float32Array(a), l = 12 * e.maxParticles, c = new Uint32Array(l); for (let p = 0, d = 0, v = 0; p < e.maxParticles; p++) c[d++] = v + 0, c[d++] = v + 1, c[d++] = v + 2, c[d++] = v + 2, c[d++] = v + 1, c[d++] = v + 3, c[d++] = v + 2, c[d++] = v + 4, c[d++] = v + 3, c[d++] = v + 4, c[d++] = v + 3, c[d++] = v + 5, v += 6; const f = Cesium.GeometryAttributes; return new Cesium.Geometry({ attributes: new f({ st: new Cesium.GeometryAttribute({ componentDatatype: Cesium.ComponentDatatype.FLOAT, componentsPerAttribute: 2, values: i }), normal: new Cesium.GeometryAttribute({ componentDatatype: Cesium.ComponentDatatype.FLOAT, componentsPerAttribute: 3, values: u }) }), indices: c }); } createRenderingPrimitives(e, t, n, i) { const a = this; this.primitives = { segments: new Jg({ commandType: "Draw", attributeLocations: { st: 0, normal: 1 }, geometry: this.createSegmentsGeometry(t), primitiveType: Cesium.PrimitiveType.TRIANGLES, uniformMap: { previousParticlesPosition: function() { return i.particlesTextures.previousParticlesPosition; }, currentParticlesPosition: function() { return i.particlesTextures.currentParticlesPosition; }, postProcessingPosition: function() { return i.particlesTextures.postProcessingPosition; }, aspect: function() { return e.drawingBufferWidth / e.drawingBufferHeight; }, pixelSize: function() { return n.pixelSize; }, lineWidth: function() { return t.lineWidth; }, particleHeight: function() { return t.particleHeight; } }, vertexShaderSource: new Cesium.ShaderSource({ sources: [T$e] }), fragmentShaderSource: new Cesium.ShaderSource({ sources: [P$e] }), rawRenderState: zL({ viewport: void 0, depthTest: { enabled: !0 }, depthMask: !0 }), framebuffer: this.framebuffers.segments, autoClear: !0 }), trails: new Jg({ commandType: "Draw", attributeLocations: { position: 0, st: 1 }, geometry: Z7(), primitiveType: Cesium.PrimitiveType.TRIANGLES, uniformMap: { segmentsColorTexture: function() { return a.textures.segmentsColor; }, segmentsDepthTexture: function() { return a.textures.segmentsDepth; }, currentTrailsColor: function() { return a.framebuffers.currentTrails.getColorTexture(0); }, trailsDepthTexture: function() { return a.framebuffers.currentTrails.depthTexture; }, fadeOpacity: function() { return t.fadeOpacity; } }, vertexShaderSource: new Cesium.ShaderSource({ defines: ["DISABLE_GL_POSITION_LOG_DEPTH"], sources: [J7] }), fragmentShaderSource: new Cesium.ShaderSource({ defines: ["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"], sources: [I$e] }), rawRenderState: zL({ viewport: void 0, depthTest: { enabled: !0, func: Cesium.DepthFunction.ALWAYS }, depthMask: !0 }), framebuffer: this.framebuffers.nextTrails, autoClear: !0, preExecute: function() { const o = a.framebuffers.currentTrails; a.framebuffers.currentTrails = a.framebuffers.nextTrails, a.framebuffers.nextTrails = o, a.primitives.trails.commandToExecute.framebuffer = a.framebuffers.nextTrails, a.primitives.trails.clearCommand.framebuffer = a.framebuffers.nextTrails; } }), screen: new Jg({ commandType: "Draw", attributeLocations: { position: 0, st: 1 }, geometry: Z7(), primitiveType: Cesium.PrimitiveType.TRIANGLES, uniformMap: { trailsColorTexture: function() { return a.framebuffers.nextTrails.getColorTexture(0); }, trailsDepthTexture: function() { return a.framebuffers.nextTrails.depthTexture; } }, vertexShaderSource: new Cesium.ShaderSource({ defines: ["DISABLE_GL_POSITION_LOG_DEPTH"], sources: [J7] }), fragmentShaderSource: new Cesium.ShaderSource({ defines: ["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"], sources: [A$e] }), rawRenderState: zL({ viewport: void 0, depthTest: { enabled: !1 }, depthMask: !0, blending: { enabled: !0 } }), framebuffer: void 0 }) }; } } class L$e { constructor(e, t, n, i) { this.context = e, this.data = t, this.particleSystemOptions = n, this.viewerParameters = i, this.particlesComputing = new K7(this.context, this.data, this.particleSystemOptions, this.viewerParameters), this.particlesRendering = new Q7(this.context, this.data, this.particleSystemOptions, this.viewerParameters, this.particlesComputing); } canvasResize(e) { this.particlesComputing.destroyParticlesTextures(), Object.keys(this.particlesComputing.windTextures).forEach((t) => { this.particlesComputing.windTextures[t].destroy(); }), Object.keys(this.particlesRendering.framebuffers).forEach((t) => { this.particlesRendering.framebuffers[t].destroy(); }), this.context = e, this.particlesComputing = new K7(this.context, this.data, this.particleSystemOptions, this.viewerParameters), this.particlesRendering = new Q7(this.context, this.data, this.particleSystemOptions, this.viewerParameters, this.particlesComputing); } clearFramebuffers() { const e = new Cesium.ClearCommand({ color: new Cesium.Color(0, 0, 0, 0), depth: 1, framebuffer: void 0, pass: Cesium.Pass.OPAQUE }); Object.keys(this.particlesRendering.framebuffers).forEach((t) => { e.framebuffer = this.particlesRendering.framebuffers[t], e.execute(this.context); }); } refreshParticles(e) { if (this.clearFramebuffers(), this.particlesComputing.destroyParticlesTextures(), this.particlesComputing.createParticlesTextures(this.context, this.particleSystemOptions, this.viewerParameters), e) { const t = this.particlesRendering.createSegmentsGeometry(this.particleSystemOptions); this.particlesRendering.primitives.segments.geometry = t; const n = Cesium.VertexArray.fromGeometry({ context: this.context, geometry: t, attributeLocations: this.particlesRendering.primitives.segments.attributeLocations, bufferUsage: Cesium.BufferUsage.STATIC_DRAW }); this.particlesRendering.primitives.segments.commandToExecute.vertexArray = n; } } applyParticleSystemOptions(e) { let t = !1; this.particleSystemOptions.maxParticles !== e.maxParticles && (t = !0), Object.keys(e).forEach((n) => { this.particleSystemOptions[n] = e[n]; }), this.refreshParticles(t); } applyViewerParameters(e) { Object.keys(e).forEach((t) => { this.viewerParameters[t] = e[t]; }), this.refreshParticles(!1); } } function e$(r, e) { const t = r - e * Math.floor(r / e); return t === e ? 0 : t; } function NC(r) { return typeof r == "string" && r.indexOf("/") >= 0 && (r = r.split("/")), Txe(r) && r.length === 2 ? r[0] / r[1] : +r; } function D$e(r, e) { const t = Math.floor(r.size), n = Math.floor(e.size), i = t * n, a = NC(r.delta), o = NC(e.delta), s = NC(r.start), u = NC(e.start), l = Math.floor(t * a) >= 360; function c() { return { width: t, height: n }; } function f() { return l; } function h(v, g) { for (let m = g || 0; m < i; m++) { const y = m % t, _ = Math.floor(m / t), w = s + y * a, x = u + _ * o; if (v(w, x, m)) return m + 1; } return NaN; } function p(v, g) { if (v === v && g === g) { const m = e$(v - s, 360) / a, y = (g - u) / o, _ = Math.round(m), w = Math.round(y); if (0 <= w && w < n && 0 <= _ && (_ < t || _ === t && l)) { const x = w * t + _; return _ === t ? x - t : x; } } return NaN; } function d(v, g) { if (v === v && g === g) { const m = e$(v - s, 360) / a, y = (g - u) / o, _ = Math.floor(m), w = Math.floor(y), x = _ + 1, C = w + 1, S = m - _, b = y - w; if (0 <= w && C < n && 0 <= _ && (x < t || x === t && l)) { const E = w * t + _; let T = E + 1; const P = E + t; let I = P + 1; return x === t && (T -= t, I -= t), [E, T, P, I, S, b]; } } return [NaN, NaN, NaN, NaN, NaN, NaN]; } return { dimensions: c, isCylindrical: f, forEach: h, closest: p, closest4: d }; } const M$e = { show: { type: Boolean, default: !0 }, data: { type: Object, required: !0 }, options: { type: Object, default: () => ({ maxParticles: 64 * 64, particleHeight: 100, fadeOpacity: 0.996, dropRate: 3e-3, dropRateBump: 0.01, speedFactor: 1, lineWidth: 4 }) }, viewerParameters: Object }; var O$e = de({ name: "VcOverlayWindmap", props: M$e, emits: Pt, setup(r, e) { const t = We(); t.cesiumClass = "VcOverlayHtml", t.cesiumEvents = []; const n = Fa(r, e, t); if (n === void 0) return; const { $services: i } = n; let a, o, s, u; const l = Ie(() => { const w = Math.ceil(Math.sqrt(r.options.maxParticles)), x = w * w; return { particlesTextureSize: w, maxParticles: x, particleHeight: r.options.particleHeight, fadeOpacity: r.options.fadeOpacity, dropRate: r.options.dropRate, dropRateBump: r.options.dropRateBump, speedFactor: r.options.speedFactor, lineWidth: r.options.lineWidth }; }); let c = []; c.push(Ve(() => r.show, (w) => { s.show = w; })), c.push(Ve(() => r.data, (w) => { t.proxy.reload(); })), c.push(Ve(() => l.value, (w) => { const x = t.cesiumObject; !x || x.applyParticleSystemOptions(w); }, { deep: !0 })), c.push(Ve(() => r.viewerParameters, (w) => { y(), t.cesiumObject.applyViewerParameters(a); }, { deep: !0 })), t.createCesiumObject = async () => { const { viewer: w } = i; s = new Cesium.PrimitiveCollection(), o = new Cesium.BoundingSphere(Cesium.Cartesian3.ZERO, 0.99 * 6378137), a = { lonRange: new Cesium.Cartesian2(), latRange: new Cesium.Cartesian2(), pixelSize: 0 }; const x = { start: r.data.lon.array[0], delta: r.data.lon.delta, size: r.data.lon.array.length }, C = { start: r.data.lat.array[0], delta: r.data.lat.delta, size: r.data.lat.array.length }; return u = D$e(x, C), y(), new L$e(w.scene.context, r.data, l.value, a); }, t.mount = async () => { const { viewer: w } = i; w.scene.primitives.add(s); const x = w.scene, C = x.camera; return f(), C.moveStart.addEventListener(p), C.moveEnd.addEventListener(d), window.addEventListener("resize", g), x.preRender.addEventListener(m), !0; }, t.unmount = async () => { h(); const { viewer: w } = i, x = w.scene, C = x.camera; return h(), w.scene.primitives.remove(s), C.moveStart.removeEventListener(p), C.moveEnd.removeEventListener(d), window.removeEventListener("resize", g), x.preRender.removeEventListener(m), !0; }; const f = () => { const w = t.cesiumObject; s.add(w.particlesComputing.primitives.calculateSpeed), s.add(w.particlesComputing.primitives.updatePosition), s.add(w.particlesComputing.primitives.postProcessingPosition), s.add(w.particlesRendering.primitives.segments), s.add(w.particlesRendering.primitives.trails), s.add(w.particlesRendering.primitives.screen); }, h = () => { const w = t.cesiumObject; s.remove(w.particlesComputing.primitives.calculateSpeed), s.remove(w.particlesComputing.primitives.updatePosition), s.remove(w.particlesComputing.primitives.postProcessingPosition), s.remove(w.particlesRendering.primitives.segments), s.remove(w.particlesRendering.primitives.trails), s.remove(w.particlesRendering.primitives.screen); }, p = () => { s.show = !1; }, d = () => { y(), t.cesiumObject.applyViewerParameters(a), s.show = !0; }; let v = !1; const g = () => { v = !0, s.show = !1, s.removeAll(); }, m = () => { if (v) { const { viewer: w } = i, x = w.scene; t.cesiumObject.canvasResize(x.context), v = !1, f(), s.show = !0; } }, y = () => { const { viewer: w } = i, x = w.scene, C = x.camera; if (Cesium.defined(r.viewerParameters) && Cesium.defined(r.viewerParameters.latRange) && Cesium.defined(r.viewerParameters.lonRange)) a.lonRange = bi(r.viewerParameters.lonRange), a.latRange = bi(r.viewerParameters.latRange); else { const b = C.computeViewRectangle(x.globe.ellipsoid), E = C$e(b); a.lonRange.x = E.lon.min, a.lonRange.y = E.lon.max, a.latRange.x = E.lat.min, a.latRange.y = E.lat.max; } const S = Cesium.defined(r.viewerParameters) && Cesium.defined(r.viewerParameters.pixelSize) ? r.viewerParameters.pixelSize : C.getPixelSize(o, x.drawingBufferWidth, x.drawingBufferHeight); S > 0 && (a.pixelSize = S); }, _ = (w, x) => { const C = u.closest(w, x); if (Cesium.defined(C)) return [r.data.U.array[C], r.data.V.array[C]]; }; return xa(() => { c.forEach((w) => w()), c = []; }), Object.assign(t.proxy, { getNearestUV: _ }), () => { var w; return xe(je(((w = t.proxy) == null ? void 0 : w.$options.name) || "v-if")); }; } }); const R$e = { ...Tn, name: { type: String, default: "__vc__overlay__dynamic__" }, startTime: { type: [Object, String, Date] }, stopTime: { type: [Object, String, Date] }, currentTime: { type: [Object, String, Date] }, clockRange: { type: Number, default: 0 }, clockStep: { type: Number, default: 1 }, shouldAnimate: { type: Boolean, default: !0 }, canAnimate: { type: Boolean, default: !0 }, multiplier: { type: Number, default: 1 }, dynamicOverlays: { type: Array, default: () => [] }, defaultInterval: { type: Number, default: 3 }, stopArrivedFlag: { type: String, default: "time" }, positionPrecision: { type: Number, default: 1e-7 }, timePrecision: { type: Number, default: 0.01 } }, N$e = { ...Pt, "update:currentTime": (r) => !0, "update:shouldAnimate": (r) => !0, "update:canAnimate": (r) => !0, "update:clockRange": (r) => !0, "update:clockStep": (r) => !0, "update:multiplier": (r) => !0, "update:startTime": (r) => !0, "update:stopTime": (r) => !0, onStop: (r) => !0, stopArrived: (r, e) => !0 }; var F$e = de({ name: "VcOverlayDynamic", props: R$e, emits: N$e, setup(r, e) { const t = We(); t.cesiumClass = "VcOverlayDynamic", t.cesiumEvents = []; const n = Fa(r, e, t); if (n === void 0) return; const { $services: i } = n, a = te([]), o = te({}), { emit: s } = e, u = te(null), l = te(null); let c = []; c.push(Ve(() => r.show, (y) => { const _ = t.cesiumObject; _ && (_.show = y); })), c.push(Ve(() => r.name, (y) => { const _ = t.cesiumObject; _ && (_.name = y); })), c.push(Ve(() => r.startTime, (y) => { const { viewer: _ } = i; Cesium.defined(_) && y && (_.clock.startTime = kf(y)); })), c.push(Ve(() => r.stopTime, (y) => { const { viewer: _ } = i; Cesium.defined(_) && y && (_.clock.stopTime = kf(y)); })), c.push(Ve(() => r.currentTime, (y) => { const { viewer: _ } = i; Cesium.defined(_) && y && (_.clock.currentTime = kf(y)); })), c.push(Ve(() => r.multiplier, (y) => { const { viewer: _ } = i; Cesium.defined(_) && (_.clock.multiplier = y); })), c.push(Ve(() => r.clockStep, (y) => { const { viewer: _ } = i; Cesium.defined(_) && (_.clock.clockStep = y); })), c.push(Ve(() => r.clockRange, (y) => { const { viewer: _ } = i; Cesium.defined(_) && (_.clock.clockRange = y); })), c.push(Ve(() => r.canAnimate, (y) => { const { viewer: _ } = i; Cesium.defined(_) && (_.clock.canAnimate = y); })), c.push(Ve(() => r.shouldAnimate, (y) => { const { viewer: _ } = i; Cesium.defined(_) && (_.clock.shouldAnimate = y); })), c.push(Ve(() => nv(r.dynamicOverlays), (y, _) => { if (!t.mounted) return; const w = t.cesiumObject; if (y.length === _.length) { const x = []; for (let C = 0; C < y.length; C++) { const S = y[C], b = _[C], E = (T, P) => { if (T !== "nodeTransformations" && T !== "_definitionChanged") return P; }; JSON.stringify(S, E) !== JSON.stringify(b, E) && x.push({ newOptions: S, oldOptions: b }); } x.forEach((C) => { const S = w.entities.getById(C.oldOptions.id); if (Cesium.defined(S)) { if (C.oldOptions.id === C.newOptions.id) S && Object.keys(C.newOptions).forEach((E) => { C.oldOptions[E] !== C.newOptions[E] && (S[E] = n.transformProp(E, C.newOptions[E])); }); else if (S) { w.entities.remove(S), pV(a.value, (T) => T.id === S.id); const E = C.newOptions; h(w, [E]); } const b = hV(a.value, (E) => E.id === S.id); if (Cesium.defined(b)) { const E = C.oldOptions.sampledPositions, T = C.newOptions.sampledPositions, P = Ya(T, E, "id"); Ya(E, T, "id").forEach((A) => { A.time && b._sampledPosition.removeSample(A.time); }), P.forEach((A) => { A.time ? b.addPosition(A.position, A.time) : A.interval && b.addPosition(A.position, A.interval || r.defaultInterval); }); } } }); } else { const x = Ya(y, _, "id"), C = Ya(_, y, "id"), S = []; for (let b = 0; b < C.length; b++) { const E = w.entities.getById(C[b].id); S.push(E); } S.forEach((b) => { w.entities.remove(b), pV(a.value, (E) => E.id === b.id); }), h(w, x); } }, { deep: !0 })), t.createCesiumObject = async () => new Cesium.CustomDataSource(r.name); const f = (y) => { let _ = xi(t, "update:currentTime"); r.currentTime !== y.currentTime && _ && s("update:currentTime", y.currentTime), _ = xi(t, "update:shouldAnimate"), r.shouldAnimate !== y.shouldAnimate && _ && s("update:shouldAnimate", y.shouldAnimate), _ = xi(t, "update:canAnimate"), r.canAnimate !== y.canAnimate && _ && s("update:canAnimate", y.canAnimate), _ = xi(t, "update:clockRange"), r.clockRange !== y.clockRange && _ && s("update:clockRange", y.clockRange), _ = xi(t, "update:clockStep"), r.clockStep !== y.clockStep && _ && s("update:clockStep", y.clockStep), _ = xi(t, "update:multiplier"), r.multiplier !== y.multiplier && _ && s("update:multiplier", y.multiplier), _ = xi(t, "update:startTime"), r.startTime !== y.startTime && _ && s("update:startTime", y.startTime), _ = xi(t, "update:stopTime"), r.stopTime !== y.stopTime && _ && s("update:stopTime", y.stopTime), p(y); const { JulianDate: w, Cartesian3: x } = Cesium; if (_ = xi(t, "stopArrived"), _ && r.shouldAnimate) for (let C = 0; C < a.value.length; C++) { const S = a.value[C], b = S._sampledPosition.getValue(y.currentTime), E = r.dynamicOverlays[C]; for (let T = 0; T < E.sampledPositions.length; T++) { const P = E.sampledPositions[T], I = ei(P.position), A = kf(P.time), L = x.equalsEpsilon(b, I, r.positionPrecision), D = w.equalsEpsilon(y.currentTime, A, r.timePrecision); let O = !1; switch (r.stopArrivedFlag) { case "time": O = D; break; case "position": O = L; break; case "both": O = D && L; break; case "or": O = D || L; break; } if (O) { s("stopArrived", S, P); break; } } } }, h = (y, _) => { for (let w = 0; w < _.length; w++) { const x = _[w], C = n.transformProps(x), S = new NV(C); a.value.push(S); const b = y.entities.add(S._entity); C.sampledPositions.forEach((E) => { E.time ? S.addPosition(E.position, E.time) : E.interval && (E.time = S.addPosition(E.position, E.interval || r.defaultInterval)); }), x.id !== b.id && (x.id = b.id), iv(b, C, ["id"]); } }; t.mount = async () => { const { viewer: y } = i, _ = t.cesiumObject; return _.show = r.show, h(_, r.dynamicOverlays), y.dataSources.add(_).then(() => { o.value.startTime = y.clock.startTime, o.value.stopTime = y.clock.stopTime, o.value.currentTime = y.clock.currentTime, o.value.multiplier = y.clock.multiplier, o.value.clockStep = y.clock.clockStep, o.value.clockRange = y.clock.clockRange, o.value.canAnimate = y.clock.canAnimate, o.value.shouldAnimate = y.clock.shouldAnimate, r.startTime && (y.clock.startTime = kf(r.startTime)), r.stopTime && (y.clock.stopTime = kf(r.stopTime)), r.currentTime && (y.clock.currentTime = kf(r.currentTime)), y.clock.multiplier = r.multiplier, y.clock.clockStep = r.clockStep, y.clock.clockRange = r.clockRange, y.clock.canAnimate = !1, y.clock.shouldAnimate = r.shouldAnimate, y.clock.onTick.addEventListener(f); const w = xi(t, "onStop"); return w && y.clock.onStop.addEventListener(w), !0; }); }, t.unmount = async () => { const { viewer: y } = i, _ = t.cesiumObject; y.dataSources.remove(_, !0), y.clock.startTime = o.value.startTime, y.clock.stopTime = o.value.stopTime, y.clock.multiplier = o.value.multiplier, y.clock.clockStep = o.value.clockStep, y.clock.clockRange = o.value.clockRange, y.clock.canAnimate = o.value.canAnimate, y.clock.shouldAnimate = o.value.shouldAnimate, a.value.length = 0, y.clock.onTick.removeEventListener(f); const w = xi(t, "onStop"); return w && y.clock.onStop.removeEventListener(w), u.value && (y.trackedEntity = void 0), !0; }; const p = (y) => { var _, w, x, C, S, b, E, T; if (l.value && u.value) { const { viewer: P } = i; if (Cesium.JulianDate.greaterThan(y.currentTime, y.stopTime)) { P.camera.lookAtTransform(Cesium.Matrix4.IDENTITY), u.value = null; return; } const I = u.value._sampledPosition.getValue(y.currentTime); let A = new Cesium.HeadingPitchRange(); switch (l.value.mode) { case "TP": A.heading = 0, A.pitch = ((w = (_ = l.value) == null ? void 0 : _.offset) == null ? void 0 : w.pitch) || Cesium.Math.toRadians(-90), A.range = ((C = (x = l.value) == null ? void 0 : x.offset) == null ? void 0 : C.range) || 1e3; break; case "FP": { const L = Cesium.JulianDate.addSeconds(y.currentTime, 0.016666666666666666, new Cesium.JulianDate()), D = u.value._sampledPosition.getValue(L) || I; A.heading = Cesium.Math.toRadians(wY(I, D)), A.pitch = (((b = (S = l.value) == null ? void 0 : S.offset) == null ? void 0 : b.pitch) || Cesium.Math.toRadians(-45)) + xY(I, D), A.range = ((T = (E = l.value) == null ? void 0 : E.offset) == null ? void 0 : T.range) || 500; break; } case "CUSTOM": A = vI(l.value.offset); } P.camera.lookAt(I, A); } }, d = (y, _) => { var w; const { viewer: x } = i; if (_ = _ || { mode: l.value === null ? "FP" : "FREE" }, _.mode === "FREE") { x.camera.lookAtTransform(Cesium.Matrix4.IDENTITY), u.value && (x.trackedEntity = void 0, u.value = null, l.value = null); return; } u.value = v(y), x.trackedEntity = sg(u.value._entity), _.mode === "TRACKED" ? ((w = _ == null ? void 0 : _.viewFrom) != null && w.length && (x.trackedEntity.viewFrom = new Cesium.Cartesian3(_.viewFrom[0], _.viewFrom[1], _.viewFrom[2])), l.value = null) : l.value = _; }, v = (y) => y instanceof NV ? y : typeof y == "string" ? hV(a.value, (_) => _.id === y) : typeof y == "number" ? a.value[y] : a.value[0], g = (y, _) => { const { viewer: w } = i; u.value && (w.trackedEntity = void 0, u.value = null); let x; if (Cesium.defined(y)) if (Array.isArray(y)) if (y.length) { const C = []; y.forEach((S) => { const b = sg(v(S)._entity); C.push(b); }), x = C; } else x = t.cesiumObject; else x = sg(v(y)._entity); else x = t.cesiumObject; return _ = _ || { duration: 3 }, Cesium.defined(_.offset) && (_.offset = vI(_.offset)), w.flyTo(x, _); }, m = (y, _) => { const { viewer: w } = i; u.value && (w.trackedEntity = void 0, u.value = null); let x; if (Cesium.defined(y)) if (Array.isArray(y)) if (y.length) { const C = []; y.forEach((S) => { const b = sg(v(S)._entity); C.push(b); }), x = C; } else x = t.cesiumObject; else x = sg(v(y)._entity); else x = t.cesiumObject; return w.zoomTo(x, Cesium.defined(_) ? vI(_) : void 0); }; return xa(() => { c.forEach((y) => y()), c = []; }), Object.assign(t.proxy, { getOverlays: () => a.value, getOverlay: v, trackOverlay: d, zoomToOverlay: m, flyToOverlay: g }), () => { var y; return xe(je(((y = t.proxy) == null ? void 0 : y.$options.name) || "")); }; } }); const B$e = [bX, JEe, x$e, O$e, F$e]; B$e.forEach((r) => { r.install = (e) => { e.component(r.name, r); }; }); const nb = bX, k$e = { ...bw, ...TT, ...Tn, ...Vi, ...uc, ...cl, billboards: { type: Array, default: () => [] } }; var V$e = de({ name: "VcCollectionBillboard", props: k$e, emits: fl, setup(r, e) { const t = We(); t.cesiumClass = "BillboardCollection"; const n = dy(r, e, t); let i = []; i.push(Ve(() => nv(r.billboards), (o, s) => { if (!t.mounted) return; const u = t.cesiumObject; if (o.length === s.length) { const l = []; for (let c = 0; c < o.length; c++) { const f = o[c], h = s[c]; JSON.stringify(f) !== JSON.stringify(h) && l.push({ newOptions: f, oldOptions: h }); } l.forEach((c) => { const f = u._billboards.find((h) => h.id === c.oldOptions.id); f && Object.keys(c.newOptions).forEach((h) => { c.oldOptions[h] !== c.newOptions[h] && (f[h] = n == null ? void 0 : n.transformProp(h, c.newOptions[h])); }); }); } else { const l = Ya(o, s, "id"), c = Ya(s, o, "id"), f = []; for (let h = 0; h < c.length; h++) { const p = u._billboards.find((d) => d.id === c[h].id); p && f.push(p); } f.forEach((h) => { u.remove(h); }), a(u, l); } }, { deep: !0 })), t.alreadyListening.push("billboards"); const a = (o, s) => { for (let u = 0; u < s.length; u++) { const l = s[u]; l.id = Cesium.defined(l.id) ? l.id : Cesium.createGuid(); const c = n == null ? void 0 : n.transformProps(l), f = o.add(c); iv(f, c); } }; return t.createCesiumObject = async () => { const o = n == null ? void 0 : n.transformProps(r), s = new Cesium.BillboardCollection(o); return a(s, r.billboards), s; }, xa(() => { i.forEach((o) => o()), i = []; }), () => { var o, s; return e.slots.default ? H("i", { class: je(((o = t.proxy) == null ? void 0 : o.$options.name) || ""), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(((s = t.proxy) == null ? void 0 : s.$options.name) || "")); }; } }); const G$e = { ...EY, ...oy, ...gT, ...sy, ...$R, ..._u, ...mT, ...HR, ...Yh, ...UR, ...yT, ...WR, ...av, ...uy, ..._T, ...wT, ...Tn, ...jR, ...xT, ...YR, ...ov, ...Vi }; var z$e = de({ name: "VcBillboard", props: G$e, emits: fl, setup(r, e) { const t = We(); return t.cesiumClass = "Billboard", py(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "")); }; } }); const $$e = { brightness: { type: Number, default: 1 }, ...oy, maximumSize: { type: Object, watcherOptions: { cesiumObjectBuilder: ei } }, ...av, scale: { type: Object, watcherOptions: { cesiumObjectBuilder: bi } }, ...Tn, slice: { type: Number, default: -1 } }; var J2 = de({ name: "VcCumulusCloud", props: $$e, emits: fl, setup(r, e) { const t = We(); return t.cesiumClass = "CumulusCloud", py(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "")); }; } }); const H$e = { ...Tn, noiseDetail: { type: Number, default: 16 }, noiseOffset: { type: Object }, debugBillboards: { type: Boolean, default: !1 }, debugEllipsoids: { type: Boolean, default: !1 }, clouds: { type: Array, default: () => [] } }; var U$e = de({ name: "VcCollectionCloud", props: H$e, emits: Pt, setup(r, e) { var t; const n = We(); n.cesiumClass = "CloudCollection"; const i = dy(r, e, n); if (i === void 0) return; n.alreadyListening.push("clouds"); let a = []; a.push(Ve(() => nv(r.clouds), (u, l) => { if (!n.mounted) return; const c = n.cesiumObject; if (u.length === l.length) { const f = []; for (let h = 0; h < u.length; h++) { const p = u[h], d = l[h]; JSON.stringify(p) !== JSON.stringify(d) && f.push({ newOptions: p, oldOptions: d }); } f.forEach((h) => { const p = c._clouds.find((d) => d.id === h.oldOptions.id); p && Object.keys(h.newOptions).forEach((d) => { h.oldOptions[d] !== h.newOptions[d] && (p[d] = i.transformProp(d, h.newOptions[d])); }); }); } else { const f = Ya(u, l, "id"), h = Ya(l, u, "id"), p = []; for (let d = 0; d < h.length; d++) { const v = c._clouds.find((g) => g.id === h[d].id); v && p.push(v); } p.forEach((d) => { c.remove(d); }), o(c, f); } }, { deep: !0 })); const o = (u, l) => { for (let c = 0; c < l.length; c++) { const f = l[c]; f.id = Cesium.defined(f.id) ? f.id : Cesium.createGuid(); const h = i.transformProps(f, J2.props), p = u.add(h); iv(p, h); } }; n.createCesiumObject = async () => { const u = i.transformProps(r, J2.props), l = new Cesium.CloudCollection(u); return o(l, r.clouds), l; }, xa(() => { a.forEach((u) => u()), a = []; }); const s = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => e.slots.default ? H("i", { class: je(s), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(s)); } }); const W$e = { ...uc, ...cl, ...bw, ...TT, ...Tn, ...Vi, labels: { type: Array, default: () => [] } }; var kte = de({ name: "VcCollectionLabel", props: W$e, emits: fl, setup(r, e) { var t; const n = We(); n.cesiumClass = "LabelCollection"; const i = dy(r, e, n); if (i === void 0) return; n.alreadyListening.push("labels"); let a = []; a.push(Ve(() => nv(r.labels), (u, l) => { if (!n.mounted) return; const c = n.cesiumObject; if (u.length === l.length) { const f = []; for (let h = 0; h < u.length; h++) { const p = u[h], d = l[h]; JSON.stringify(p) !== JSON.stringify(d) && f.push({ newOptions: p, oldOptions: d }); } f.forEach((h) => { const p = c._labels.find((d) => d.id === h.oldOptions.id); p && Object.keys(h.newOptions).forEach((d) => { h.oldOptions[d] !== h.newOptions[d] && (p[d] = i.transformProp(d, h.newOptions[d])); }); }); } else { const f = Ya(u, l, "id"), h = Ya(l, u, "id"), p = []; for (let d = 0; d < h.length; d++) { const v = c._labels.find((g) => g.id === h[d].id); v && p.push(v); } p.forEach((d) => { c.remove(d); }), o(c, f); } }, { deep: !0 })); const o = (u, l) => { for (let c = 0; c < l.length; c++) { const f = l[c]; f.id = Cesium.defined(f.id) ? f.id : Cesium.createGuid(); const h = i.transformProps(f), p = u.add(h); iv(p, h); } }; n.createCesiumObject = async () => { const u = i.transformProps(r), l = new Cesium.LabelCollection(u); return o(l, r.labels), l; }, xa(() => { a.forEach((u) => u()), a = []; }); const s = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => e.slots.default ? H("i", { class: je(s), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(s)); } }); const j$e = { ...LY, ...DY, ...gT, ...sy, ...$R, ...MY, ...PY, ...mT, ...HR, ...Yh, ...qR, ...ZR, ...yT, ...WR, ...av, ..._T, ...wT, ...Tn, ...AY, ...IY, ...TY, totalScale: { type: Number, default: 1 }, ...xT, ...YR, ...Vi }; var Y$e = de({ name: "VcLabel", props: j$e, emits: fl, setup(r, e) { const t = We(); return t.cesiumClass = "Label", py(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "")); }; } }); const X$e = { ...uc, ...cl, ...TT, ...Tn, ...Vi, points: { type: Array, default: () => [] } }; var Vte = de({ name: "VcCollectionPoint", props: X$e, emits: fl, setup(r, e) { const t = We(); t.cesiumClass = "PointPrimitiveCollection"; const n = dy(r, e, t); if (n === void 0) return; t.alreadyListening.push("points"); let i = []; i.push(Ve(() => nv(r.points), (o, s) => { if (!t.mounted) return; const u = t.cesiumObject; if (o.length === s.length) { const l = []; for (let c = 0; c < o.length; c++) { const f = o[c], h = s[c]; JSON.stringify(f) !== JSON.stringify(h) && l.push({ newOptions: f, oldOptions: h }); } l.forEach((c) => { const f = u._pointPrimitives.find((h) => h && h.id === c.oldOptions.id); f && Object.keys(c.newOptions).forEach((h) => { c.oldOptions[h] !== c.newOptions[h] && (f[h] = n.transformProp(h, c.newOptions[h])); }); }); } else { const l = Ya(o, s, "id"), c = Ya(s, o, "id"), f = []; for (let h = 0; h < c.length; h++) { const p = u._pointPrimitives.find((d) => d.id === c[h].id); p && f.push(p); } f.forEach((h) => { u.remove(h); }), a(u, l); } }, { deep: !0 })); const a = (o, s) => { for (let u = 0; u < s.length; u++) { const l = s[u]; l.id = Cesium.defined(l.id) ? l.id : Cesium.createGuid(); const c = n.transformProps(l), f = o.add(c); iv(f, c); } }; return t.createCesiumObject = async () => { const o = n.transformProps(r), s = new Cesium.PointPrimitiveCollection(o); return a(s, r.points), s; }, xa(() => { i.forEach((o) => o()), i = []; }), () => { var o, s; return e.slots.default ? H("i", { class: je(((o = t.proxy) == null ? void 0 : o.$options.name) || ""), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(((s = t.proxy) == null ? void 0 : s.$options.name) || "")); }; } }); const q$e = { ...oy, ...gT, ...sy, ...Yh, ...qR, ...ZR, ...$Y, ...av, ...wT, ...Tn, ...xT, ...Vi }; var Z$e = de({ name: "VcPoint", props: q$e, emits: fl, setup(r, e) { const t = We(); return t.cesiumClass = "PointPrimitive", py(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "")); }; } }); const K$e = { ...uc, ...cl, ...Tn, ...Vi, polylines: { type: Array, default: () => [] } }; var J$e = de({ name: "VcCollectionPolyline", props: K$e, emits: fl, setup(r, e) { var t; const n = We(); n.cesiumClass = "PolylineCollection"; const i = dy(r, e, n); if (i === void 0) return; n.alreadyListening.push("polylines"); let a = []; a.push(Ve(() => nv(r.polylines), (u, l) => { if (!n.mounted) return; const c = n.cesiumObject; if (u.length === l.length) { const f = []; for (let h = 0; h < u.length; h++) { const p = u[h], d = l[h]; JSON.stringify(p) !== JSON.stringify(d) && f.push({ newOptions: p, oldOptions: d }); } f.forEach((h) => { const p = c._polylines.find((d) => d.id === h.oldOptions.id); p && Object.keys(h.newOptions).forEach((d) => { h.oldOptions[d] !== h.newOptions[d] && (p[d] = i.transformProp(d, h.newOptions[d])); }); }); } else { const f = Ya(u, l, "id"), h = Ya(l, u, "id"), p = []; for (let d = 0; d < h.length; d++) { const v = c._polylines.find((g) => g.id === h[d].id); v && p.push(v); } p.forEach((d) => { c.remove(d); }), o(c, f); } }, { deep: !0 })); const o = (u, l) => { for (let c = 0; c < l.length; c++) { const f = l[c]; f.id = Cesium.defined(f.id) ? f.id : Cesium.createGuid(); const h = i.transformProps(f), p = u.add(h); iv(p, h); } }; n.createCesiumObject = async () => { const u = i.transformProps(r), l = new Cesium.PolylineCollection(u); return o(l, r.polylines), l; }, xa(() => { a.forEach((u) => u()), a = []; }); const s = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => e.slots.default ? H("i", { class: je(s), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(s)); } }); const Q$e = { ...sy, ...Yh, ...gN, ...bY, ...sc, ...Tn, ...ov, ...Vi }; var eHe = de({ name: "VcPolyline", props: Q$e, emits: fl, setup(r, e) { const t = We(); return t.cesiumClass = "Polyline", py(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "")); }; } }); const tHe = { ...Tn, destroyPrimitives: { type: Boolean, default: !0 }, ...Vi, polygons: { type: Array, default: () => [] } }; var Gte = de({ name: "VcCollectionPrimitive", props: tHe, emits: fl, setup(r, e) { var t; const n = We(); n.cesiumClass = "PrimitiveCollection"; const i = dy(r, e, n); if (i === void 0) return; n.alreadyListening.push("polygons"); let a = []; a.push(Ve(() => nv(r.polygons), (u, l) => { if (!n.mounted) return; const c = n.cesiumObject; if (u.length === l.length) { const f = []; for (let h = 0; h < u.length; h++) { const p = u[h], d = l[h]; JSON.stringify(p) !== JSON.stringify(d) && f.push({ newOptions: p, oldOptions: d }); } f.forEach((h) => { const p = c._primitives.find((d) => d._id === h.oldOptions.id); p && Object.keys(h.newOptions).forEach((d) => { h.oldOptions[d] !== h.newOptions[d] && (p[d] = i.transformProp(d, h.newOptions[d])); }); }); } else { const f = Ya(u, l, "id"), h = Ya(l, u, "id"), p = []; for (let d = 0; d < h.length; d++) { const v = c._primitives.find((g) => g.id === h[d].id); v && p.push(v); } p.forEach((d) => { c.remove(d); }), o(c, f); } }, { deep: !0 })); const o = (u, l) => { for (let c = 0; c < l.length; c++) { const f = l[c]; f.id = Cesium.defined(f.id) ? f.id : Cesium.createGuid(); const h = i.transformProps(f), p = new aX(h); p._vcParent = u, iv(p, h), u.add(p); } }; n.createCesiumObject = async () => { const u = i.transformProps(r), l = new Cesium.PrimitiveCollection(u); return o(l, r.polygons), l; }, xa(() => { a.forEach((u) => u()), a = []; }); const s = ((t = n.proxy) == null ? void 0 : t.$options.name) || ""; return () => e.slots.default ? H("i", { class: je(s), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(s)); } }); const rHe = { ...sc, ...cv, ...fy, ...vN, ...Tn, ...Yh, ...ly, ...WY, ...ki, ...uv, ...lv, ...Vi }; var zte = de({ name: "VcPolygon", props: rHe, emits: fl, setup(r, e) { const t = We(); t.cesiumClass = "PolygonPrimitive"; const n = py(r, e, t); if (n === void 0) return; let i = []; return i.push(Ve(() => r.clampToGround, (a) => { const o = t.cesiumObject; o && (o.clampToGround = a); })), i.push(Ve(() => r.positions, (a) => { const o = t.cesiumObject; o && (o.positions = ef(a)); })), i.push(Ve(() => r.polygonHierarchy, (a) => { const o = t.cesiumObject; o && (o.polygonHierarchy = kR(a)); })), i.push(Ve(() => r.appearance, (a) => { const o = t.cesiumObject; o && (o.appearance = QS.call(t, a)); })), i.push(Ve(() => r.depthFailAppearance, (a) => { const o = t.cesiumObject; o && (o.depthFailAppearance = QS.call(t, a)); })), i.push(Ve(() => r.show, (a) => { const o = t.cesiumObject; o && (o.show = a); })), i.push(Ve(() => r.classificationType, (a) => { const o = t.cesiumObject; o && (o.classificationType = a); })), t.createCesiumObject = async () => { const a = n.transformProps(r); return new aX(a); }, t.mount = async () => { const a = n.$services.primitives, o = t.cesiumObject; return o._vcParent = a, a && a.add(o); }, t.unmount = async () => { const a = n.$services.primitives, o = t.cesiumObject; return a && !a.isDestroyed() && a.remove(o); }, xa(() => { i.forEach((a) => a()), i = []; }), () => { var a; return xe(je(((a = t.proxy) == null ? void 0 : a.$options.name) || "")); }; } }); const nHe = [ V$e, U$e, kte, Vte, J$e, Gte, J2, z$e, Y$e, Z$e, eHe, zte ]; nHe.forEach((r) => { r.install = (e) => { e.component(r.name, r); }; }); const $te = kte, Hte = Vte, N5 = Gte, Ute = zte, iHe = { geometry: Object, ...uc, ...Yh, attributes: Object }, aHe = { ...Pt, "update:geometry": (r) => !0 }; var xS = de({ name: "VcGeometryInstance", props: iHe, emits: aHe, setup(r, e) { const t = We(); t.renderByParent = !0, t.cesiumClass = "GeometryInstance", t.cesiumEvents = []; const n = Fa(r, e, t); if (n === void 0) return; const { emit: i } = e, a = te(0); t.createCesiumObject = async () => { const u = n.transformProps(r); return u.geometry || (u.geometry = new Cesium.Geometry({ attributes: new Cesium.GeometryAttributes() })), new Cesium.GeometryInstance(u); }, t.mount = async () => { var u; const l = Fd(t).proxy; l.__childCount !== void 0 && (a.value = l.__childCount.value || 0, l.__childCount.value += 1); const c = t.cesiumObject; return (u = l.__updateGeometryInstances) == null || u.call(l, c, a.value), !0; }, t.unmount = async () => { var u; const l = t.cesiumObject, c = Fd(t).proxy; return (u = c.__removeGeometryInstances) == null || u.call(c, l), !0; }; const o = (u) => { if (xi(t, "update:geometry")) i("update:geometry", u); else { const c = t.cesiumObject; c.geometry = u; } return !0; }, s = () => gw(n.getServices(), { get geometryInstance() { return t.cesiumObject; } }); return $h(vw, s()), t.appContext.config.globalProperties.$VueCesium = s(), Object.assign(t.proxy, { __updateGeometry: o }), () => { var u, l; return e.slots.default ? H("i", { class: je(((u = t.proxy) == null ? void 0 : u.$options.name) || ""), style: { display: "none !important" } }, Qi(e.slots.default)) : xe(je(((l = t.proxy) == null ? void 0 : l.$options.name) || "v-if")); }; } }); xS.install = (r) => { r.component(xS.name, xS); }; const oHe = xS, Qg = oHe, sHe = { ...XR, ...Na }; var uHe = de({ name: "VcGeometryBox", props: sHe, emits: Pt, setup(r, e) { const t = We(); t.cesiumClass = "BoxGeometry"; const n = Zr(r, e, t); return t.createCesiumObject = async () => { const i = n == null ? void 0 : n.transformProps(r); return Cesium.BoxGeometry.fromDimensions(i); }, () => { var i; return xe(je(((i = t.proxy) == null ? void 0 : i.$options.name) || "")); }; } }); const lHe = { ...XR }; var cHe = de({ name: "VcGeometryBoxOutline", props: lHe, emits: Pt, setup(r, e) { const t = We(); t.cesiumClass = "BoxOutlineGeometry"; const n = Zr(r, e, t); return t.createCesiumObject = async () => { const i = n == null ? void 0 : n.transformProps(r); return Cesium.BoxOutlineGeometry.fromDimensions(i); }, () => { var i; return xe(je(((i = t.proxy) == null ? void 0 : i.$options.name) || "v-if")); }; } }); const fHe = { ...Tw, ...Pw, ...ki, ..._u, ...Ca, ...Na, ...ll, ...sv }; var hHe = de({ name: "VcGeometryCircle", props: fHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CircleGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const pHe = { ...Tw, ...Pw, ...ki, ..._u, ...Ca, ...ll, ...ST }; var dHe = de({ name: "VcGeometryCircleOutline", props: pHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CircleOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const vHe = { ...cv, ...ki, ...Na, ...sv }; var gHe = de({ name: "VcGeometryPolygonCoplanar", props: vHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CoplanarPolygonGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const mHe = { ...cv }; var yHe = de({ name: "VcGeometryPolygonCoplanarOutline", props: mHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CoplanarPolygonOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const _He = { ...sc, ...ov, ...ki, ...Ca, ..._u, ...ll, ...Na, ...mw }; var wHe = de({ name: "VcGeometryCorridor", props: _He, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CorridorGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const xHe = { ...sc, ...ov, ...ki, ...Ca, ..._u, ...ll, ...mw }; var CHe = de({ name: "VcGeometryCorridorOutline", props: xHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CorridorOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const SHe = { ...KR, ...JR, ...QR, ...eN, ...Na }; var EHe = de({ name: "VcGeometryCylinder", props: SHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CylinderGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const bHe = { ...KR, ...JR, ...QR, ...eN, ...ST }; var THe = de({ name: "VcGeometryCylinderOutline", props: bHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "CylinderOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const PHe = { ...Tw, ...tN, ...rN, ...ki, ..._u, ...ll, ...uy, ...sv, ...Ca, ...Na }; var IHe = de({ name: "VcGeometryEllipse", props: PHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "EllipseGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const AHe = { ...Tw, ...tN, ...rN, ...ki, ..._u, ...ll, ...uy, ...sv, ...Ca, ...ST }; var LHe = de({ name: "VcGeometryEllipseOutline", props: AHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "EllipseOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const DHe = { ...nN, ...iN, ...aN, ...oN, ...sN, ...uN, ...yw, ..._w, ...Na }; var MHe = de({ name: "VcGeometryEllipsoid", props: DHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "EllipsoidGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const OHe = { ...nN, ...iN, ...aN, ...oN, ...sN, ...uN, ...yw, ..._w, ...lN }; var RHe = de({ name: "VcGeometryEllipsoidOutline", props: OHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "EllipsoidOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const NHe = { ...yN, ..._N, ...zR, ...Na }; var FHe = de({ name: "VcGeometryFrustum", props: NHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "FrustumGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const BHe = { ...yN, ..._N, ...zR }; var kHe = de({ name: "VcGeometryFrustumOutline", props: BHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "FrustumOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const VHe = { ...sc, ...ov, ...Ca, ...gN, ...cy }; var Wte = de({ name: "VcGeometryGroundPolyline", props: VHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "GroundPolylineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const GHe = { ...Na }; var zHe = de({ name: "VcGeometryPlane", props: GHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "PlaneGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }), $He = de({ name: "VcGeometryPlaneOutline", emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "PlaneOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const HHe = { ...cv, ..._u, ...ll, ...Na, ...sv, ...ki, ...Ca, ...hN, ...HY, ...UY, ...cy }; var jte = de({ name: "VcGeometryPolygon", props: HHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "PolygonGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const UHe = { ...cv, ..._u, ...ll, ...Na, ...ki, ...Ca, ...hN, ...cy }; var WHe = de({ name: "VcGeometryPolygonOutline", props: UHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "PolygonOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const jHe = { ...sc, ...ov, ...TN, colorsPerVertex: { type: Boolean, default: !1 }, ...cy, ...Ca, ...Na, ...ki }; var Yte = de({ name: "VcGeometryPolyline", props: jHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "PolylineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const YHe = { ...xN, ...wN, ...ki, ...Ca, ...Na, ...mw }; var XHe = de({ name: "VcGeometryPolylineVolume", props: YHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "PolylineVolumeGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const qHe = { ...xN, ...wN, ...ki, ...Ca, ...mw }; var ZHe = de({ name: "VcGeometryPolylineVolumeOutline", props: qHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "PolylineVolumeOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const KHe = { ...ww, ...Na, ...ki, ...Ca, ..._u, ...uy, ...sv, ...ll }; var JHe = de({ name: "VcGeometryRectangle", props: KHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "RectangleGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const QHe = { ...ww, ...ki, ...Ca, ..._u, ...uy, ...ll }; var eUe = de({ name: "VcGeometryRectangleOutline", props: QHe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "RectangleOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const tUe = { ...sc, ...TN, colorsPerVertex: { type: Boolean, default: !1 }, ...cy, ...Ca, ...ki }; var rUe = de({ name: "VcGeometrySimplePolyline", props: tUe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "SimplePolylineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const nUe = { ...Pw, ...yw, ..._w, ...Na }; var iUe = de({ name: "VcGeometrySphere", props: nUe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "SphereGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const aUe = { ...Pw, ...yw, ..._w, ...lN }; var oUe = de({ name: "VcGeometrySphereOutline", props: aUe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "SphereOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const sUe = { ...sc, ...Ca, ...dN, ...pN, ...ki, ...Na }; var uUe = de({ name: "VcGeometryWall", props: sUe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "WallGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const lUe = { ...sc, ...Ca, ...dN, ...pN, ...ki }; var cUe = de({ name: "VcGeometryWallOutline", props: lUe, emits: Pt, setup(r, e) { const t = We(); return t.cesiumClass = "WallOutlineGeometry", Zr(r, e, t), () => { var n; return xe(je(((n = t.proxy) == null ? void 0 : n.$options.name) || "v-if")); }; } }); const fUe = [ uHe, cHe, hHe, dHe, gHe, yHe, wHe, CHe, EHe, THe, IHe, LHe, MHe, RHe, FHe, kHe, Wte, zHe, $He, jte, WHe, Yte, XHe, ZHe, JHe, eUe, rUe, iUe, oUe, uUe, cUe ]; fUe.forEach((r) => { r.install = (e) => { e.component(r.name, r); }; }); const Xte = Wte, hUe = jte, A_ = Yte; function qte(r, e, t, n, i) { t.cesiumClass = n, t.cesiumEvents = []; const { t: a } = hy(), { emit: o } = e, s = je(n).split("-"); n === "VcMeasurementDistance" && r.showComponentLines && (s[2] = "component-distance"), (n === "VcDrawingRegular" || n === "VcMeasurementRegular") && (r.edge === 4 && (s[2] = "rectangle"), r.edge === 360 && (s[2] = "circle")); let u = s[2]; s[3] && (u = `${s[2]}-${s[3]}`); const l = te(""), c = te({ drawingTipStart: r.drawtip.drawingTipStart || a(`${s[0]}.${s[1]}.${s[2]}.drawingTipStart`), drawingTipEnd: r.drawtip.drawingTipEnd || a(`${s[0]}.${s[1]}.${s[2]}.drawingTipEnd`), drawingTipEditing: r.drawtip.drawingTipEditing || a(`${s[0]}.${s[1]}.${s[2]}.drawingTipEditing`) }), f = te(xt.BeforeDraw), h = te(!1), p = te([0, 0, 0]), d = te(!1), v = te([0, 0, 0]), g = te(null), m = te(null), y = te(null), _ = te(""), { registerTimeout: w, removeTimeout: x } = dX(); return t.createCesiumObject = async () => y, { drawingType: u, drawTip: l, drawTipOpts: c, drawStatus: f, canShowDrawTip: h, drawTipPosition: p, showEditor: d, editorPosition: v, mouseoverPoint: g, editingPoint: m, primitiveCollectionRef: y, editorType: _, onMouseoverPoints: (L) => { var D, O; const { drawingHandlerActive: N, viewer: F } = i; r.editable && f.value !== xt.Drawing && N && (L.pickedFeature.primitive.pixelSize = ((D = r.pointOpts) == null ? void 0 : D.pixelSize) * 1.5, x(), w(() => { g.value = L.pickedFeature.primitive, v.value = L.pickedFeature.primitive.position, d.value = !0, h.value = !1, p.value = [0, 0, 0]; }, (O = r.editorOpts) == null ? void 0 : O.delay)), o("mouseEvt", { type: L.type, name: u, target: L }, F); }, onMouseoutPoints: (L) => { var D, O; const { viewer: N, selectedDrawingActionInstance: F } = i; r.editable && (L.pickedFeature.primitive.pixelSize = ((D = r.pointOpts) == null ? void 0 : D.pixelSize) * 1, x(), w(() => { v.value = [0, 0, 0], g.value = void 0, d.value = !1; }, (O = r.editorOpts) == null ? void 0 : O.hideDelay), F && (h.value = !0)), o("mouseEvt", { type: L.type, name: u, target: L }, N); }, onMouseenterEditor: (L) => { x(); }, onMouseleaveEditor: (L) => { var D; x(), w(() => { var O; v.value = [0, 0, 0], g.value.pixelSize = ((O = r.pointOpts) == null ? void 0 : O.pixelSize) * 1, g.value = void 0, d.value = !1; }, (D = r.editorOpts) == null ? void 0 : D.hideDelay); }, onPrimitiveCollectionReady: (L) => { L.cesiumObject._vcId = n; }, onVcCollectionPointReady: function(L) { const { cesiumObject: D } = L, O = D.update; D.update = function(N) { const F = N.commandList.length; O.call(this, N); const k = N.commandList.length; for (let G = F; G < k; ++G) N.commandList[G].pass = Cesium.Pass.TRANSLUCENT, N.commandList[G].renderState = Cesium.RenderState.fromCache({ depthTest: { enabled: !1 }, depthMask: !1 }); }; }, onVcPrimitiveReady: (L) => { if (r.disableDepthTest) return; const D = L.cesiumObject, O = D.update; D.update = function(N) { const F = N.commandList.length; O.call(this, N); const k = N.commandList.length; for (let G = F; G < k; ++G) N.commandList[G].pass === Cesium.Pass.TRANSLUCENT && (N.commandList[G].pass = Cesium.Pass.OPAQUE, N.commandList[G].renderState = Cesium.RenderState.fromCache({ depthTest: { enabled: !1 }, depthMask: !1, blending: Cesium.BlendingState.ALPHA_BLEND })); }; }, onVcCollectionLabelReady: (L) => { if (r.disableDepthTest) return; const D = L.cesiumObject, O = D.update; D.update = function(N) { const F = N.commandList.length; O.call(this, N); const k = N.commandList.length; for (let G = F; G < k; ++G) N.commandList[G].pass = Cesium.Pass.OVERLAY, N.commandList[G].renderState = Cesium.RenderState.fromCache({ depthTest: { enabled: !1 }, depthMask: !1, blending: Cesium.BlendingState.ALPHA_BLEND }); }; } }; } function Zte(r, e, t) { const n = We(), i = Fa(r, e, n); if (i === void 0) return; const { t: a } = hy(), o = i.$services, { emit: s } = e, { drawingType: u, drawTip: l, drawTipOpts: c, drawStatus: f, canShowDrawTip: h, drawTipPosition: p, showEditor: d, editorPosition: v, mouseoverPoint: g, editingPoint: m, primitiveCollectionRef: y, editorType: _, onMouseoverPoints: w, onMouseoutPoints: x, onMouseenterEditor: C, onMouseleaveEditor: S, onPrimitiveCollectionReady: b, onVcCollectionPointReady: E, onVcCollectionLabelReady: T, onVcPrimitiveReady: P } = qte(r, e, n, t, o), I = te([]); r.preRenderDatas && r.preRenderDatas.length && r.preRenderDatas.forEach(($) => { const V = { positions: ef($), show: !0, drawStatus: xt.AfterDraw, distance: 0, labels: [], pointOpts: {}, labelOpts: {}, labelsOpts: {}, polylineOpts: {}, primitiveOpts: {}, polygonOpts: {} }; t === "VcMeasurementVertical" && Object.assign(V, { draggingPlane: new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0), surfaceNormal: new Cesium.Cartesian3() }), I.value.push(V); }); let A; const L = Ie(() => { const $ = [], { Cartesian3: V, Cartographic: q, Rectangle: ee, createGuid: Y, defined: K, Math: fe, Ray: J } = Cesium, { viewer: ue } = o; return I.value.forEach((ne) => { var ve, Pe, Be, ke, Le, Ye, Oe, we, Je, z, pe, me, De, ot, Kn, On, Cr, Wt, ka; const ri = ne.positions[0], mi = ne.positions[1]; if (V.equals(ri, mi)) return; const ea = [], Xo = ((ve = r.polylineOpts) == null ? void 0 : ve.arcType) === 0 ? V.distance(ri, mi) : iM(ri, mi, o.viewer.scene.globe.ellipsoid), Va = V.midpoint(ri, mi, {}), vl = wY(ri, mi), ux = xY(ri, mi); ne.points = ne.positions.map((Pn) => ({ position: Pn })); const Kr = { ...ne, distance: Xo, heading: vl, pitch: ux }, Sv = Object.assign({}, r.labelOpts, Kr.labelOpts); if (t === "VcDrawingRectangle" || t === "VcMeasurementRectangle") { const Pn = q.fromCartesian(ri, ue.scene.globe.ellipsoid), _r = q.fromCartesian(mi, ue.scene.globe.ellipsoid), yi = Pn.height; !r.clampToGround && (_r.height = yi); const Sr = ee.fromCartesianArray(ne.positions, ue.scene.globe.ellipsoid), Gi = [ Sr.west, Sr.north, yi, Sr.east, Sr.north, yi, Sr.east, Sr.south, yi, Sr.west, Sr.south, yi, Sr.west, Sr.north, yi ], zi = V.fromRadiansArrayHeights(Gi, ue.scene.globe.ellipsoid); Object.assign(Kr, { polygonPositions: zi, height: yi }); } else if (t === "VcDrawingRegular" || t === "VcMeasurementRegular") { const Pn = ne.positions[0], _r = ne.positions[1], yi = Vxe(Pn, _r, ue.scene); if (!Qo(yi) && K(yi)) { const Sr = [], Gi = q.fromCartesian(Pn, ue.scene.globe.ellipsoid), zi = q.fromCartesian(_r, ue.scene.globe.ellipsoid); !r.clampToGround && (zi.height = Gi.height), Sr.push(q.toCartesian(zi, ue.scene.globe.ellipsoid)); for (let bu = 0; bu < (r.edge || 4) - 1; bu++) { const Uy = Gxe(Pn, yi[0] += Math.PI * 2 / (r.edge || 4), Xo, ue.scene.globe.ellipsoid); Sr.push(Uy); } Object.assign(Kr, { polygonPositions: Sr, height: Gi.height }); } } else if (t === "VcAnalysisViewshed") Object.assign(Kr.viewshedOpts, { startPosition: ri, endPosition: mi }); else if (t === "VcAnalysisSightline") if (r.sightlineType === "segment") { const Pn = []; Pn.push(ri); const _r = []; y.value.cesiumObject._primitives.forEach((zi) => { zi instanceof Cesium.PointPrimitiveCollection && _r.push(...zi._pointPrimitives), zi instanceof Cesium.Primitive && _r.push(zi); }); const Sr = CY(ri, mi, o.viewer, _r); K(Sr) && Pn.push(Sr), Pn.push(mi); let Gi = 0; for (let zi = 0; zi < Pn.length - 1; zi++) { const bu = V.distance(Pn[zi], Pn[zi + 1]); Gi = Gi + bu; } Object.assign(Kr, { positions: Pn, distance: Gi }); } else r.sightlineType; else ea.push({ position: Va, id: Y(), text: es.distanceToString(Xo, (Pe = r.measureUnits) == null ? void 0 : Pe.distanceUnits, r.locale, (Be = r.decimals) == null ? void 0 : Be.distance), ...Sv }); if (Kr.polygonPositions && Kr.polygonPositions.length) { const Pn = Object.assign({}, r.labelsOpts, Kr.labelsOpts), _r = Kr.polygonPositions.slice(); r.loop && _r.length > 2 && _r.push(_r[0]); for (let Sr = 0; Sr < _r.length - 1; Sr++) { let Gi = 0; if (((ke = r.polylineOpts) == null ? void 0 : ke.arcType) === 0 ? Gi = iM(_r[Sr], _r[Sr + 1], o.viewer.scene.globe.ellipsoid) : Gi = V.distance(_r[Sr], _r[Sr + 1]), Gi > 0 && _r.length > 2 && r.showDistanceLabel && ea.push({ text: es.distanceToString(Gi, (Le = r.measureUnits) == null ? void 0 : Le.distanceUnits, r.locale, (Ye = r.decimals) == null ? void 0 : Ye.distance), position: V.midpoint(_r[Sr], _r[Sr + 1], {}), id: Y(), ...Pn }), _r.length > 2 && r.showAngleLabel && (Sr > 0 || r.loop)) { const zi = _r[Sr === 0 ? _r.length - 2 : Sr - 1], bu = _r[Sr], Uy = _r[Sr + 1], lx = V.subtract(zi, bu, {}), Cf = V.subtract(Uy, bu, {}); let Sf = 0; V.ZERO.equals(lx) || V.ZERO.equals(Cf) || (Sf = V.angleBetween(lx, Cf)), ea.push({ text: es.angleToString(Sf, (Oe = r.measureUnits) == null ? void 0 : Oe.angleUnits, r.locale, (we = r.decimals) == null ? void 0 : we.angle), position: bu, id: Y(), ...Pn }); } } const yi = _Y(_r); r.showLabel && ea.push({ text: es.areaToString(yi, (Je = r.measureUnits) == null ? void 0 : Je.areaUnits, r.locale, (z = r.decimals) == null ? void 0 : z.area), position: ne.positions[0], id: Y(), ...Sv }); } r.showComponentLines && (Object.assign(Kr, { xyPolylinePositions: [new V(), new V(), new V()], xyBoxPositions: [new V(), new V(), new V()], xDistance: 0, yDistance: 0, xAngle: 0, yAngle: 0 }), O(Kr), ea.push({ position: Kr.xLabelPosition, id: Y(), text: es.distanceToString(Kr.xDistance || 0, (pe = r.measureUnits) == null ? void 0 : pe.distanceUnits, r.locale, (me = r.decimals) == null ? void 0 : me.distance), ...r.xLabelOpts }), ea.push({ position: Kr.yLabelPosition, id: Y(), text: es.distanceToString(Kr.yDistance || 0, (De = r.measureUnits) == null ? void 0 : De.distanceUnits, r.locale, (ot = r.decimals) == null ? void 0 : ot.distance), ...r.yLabelOpts }), ea.push({ position: Kr.xAnglePosition, id: Y(), text: es.angleToString(Kr.xAngle || 0, (Kn = r.measureUnits) == null ? void 0 : Kn.angleUnits, r.locale, (On = r.decimals) == null ? void 0 : On.angle), ...r.xAngleLabelOpts }), ea.push({ position: Kr.yAnglePosition, id: Y(), text: es.angleToString(Kr.yAngle || 0, (Cr = r.measureUnits) == null ? void 0 : Cr.angleUnits, r.locale, (Wt = r.decimals) == null ? void 0 : Wt.angle), ...r.yAngleLabelOpts })), Object.assign(Kr, { labels: ea }), Kr.positionsDegreesArray = Kr.positions.map((Pn) => { const _r = Cesium.Cartographic.fromCartesian(Pn, ue.scene.globe.ellipsoid); return [fe.toDegrees(_r.longitude), fe.toDegrees(_r.latitude), _r.height]; }), (ka = Kr == null ? void 0 : Kr.polygonPositions) != null && ka.length && (Kr.polygonPositionsDegreesArray = Kr.polygonPositions.map((Pn) => { const _r = Cesium.Cartographic.fromCartesian(Pn, ue.scene.globe.ellipsoid); return [fe.toDegrees(_r.longitude), fe.toDegrees(_r.latitude), _r.height]; })), $.push(Kr); }), $; }); n.createCesiumObject = async () => y, n.mount = async () => { const { viewer: $ } = o; return r.autoUpdateLabelPosition && (t === "VcMeasurementDistance" && $.scene.preRender.addEventListener(F), (t === "VcMeasurementRegular" || t === "VcMeasurementRectangle" || t === "VcDrawingRegular" || t === "VcDrawingRectangle") && $.scene.preRender.addEventListener(N)), !0; }, n.unmount = async () => { const { viewer: $ } = o; return r.autoUpdateLabelPosition && (t === "VcMeasurementDistance" && $.scene.preRender.removeEventListener(F), (t === "VcMeasurementRegular" || t === "VcMeasurementRectangle" || t === "VcDrawingRegular" || t === "VcDrawingRectangle") && $.scene.preRender.removeEventListener(N)), !0; }; const D = ($, V) => { const { defined: q, SceneMode: ee, Cartesian3: Y, IntersectionTests: K, Plane: fe, SceneTransforms: J, Ray: ue } = Cesium, { viewer: ne } = o, ve = ne.scene, Pe = ve.camera, Be = Pe.direction, ke = ve.frameState.mapProjection.ellipsoid, Le = $.positions, Ye = Le[0]; let Oe = Ye, we = Le[1], Je = $.draggingPlane, z = $.surfaceNormal, pe = z; if (ve.mode === ee.COLUMBUS_VIEW) { pe = Y.UNIT_X; const ot = ke.cartesianToCartographic(Ye, {}); Oe = ve.mapProjection.project(ot, {}), Y.fromElements(Oe.z, Oe.x, Oe.y, Oe); } let me = Y.cross(pe, Be, {}); me = Y.cross(pe, me, me), me = Y.normalize(me, me), Je = fe.fromPointNormal(Oe, me, Je); const De = Pe.getPickRay(V, new ue()); if (we = K.rayPlane(De, Je, {}), q(we)) { if (ve.mode === ee.COLUMBUS_VIEW) { we = Y.fromElements(we.y, we.z, we.x, we); const Kn = ve.mapProjection.unproject(we, {}); we = ke.cartographicToCartesian(Kn, we); } J.wgs84ToWindowCoordinates(ve, Le[0], {}).y < V.y && (z = Y.negate(z, {})); let ot = Y.subtract(we, Ye, {}); return ot = Y.projectVector(ot, z, ot), we = Y.add(Ye, ot, we), we; } }, O = ($) => { const { Cartesian3: V, Math: q, defined: ee } = Cesium, { viewer: Y } = o, K = Y.scene.frameState.mapProjection.ellipsoid, fe = $.positions[0], J = $.positions[1], ue = K.cartesianToCartographic(fe, {}); if (!ee(ue)) return; const ne = K.cartesianToCartographic(J, {}), ve = ue.height, Pe = ne.height; let Be, ke, Le, Ye; ve < Pe ? (Be = fe, ke = J, Ye = Pe, Le = ve) : (Be = J, ke = fe, Ye = ve, Le = Pe); const Oe = $.xyPolylinePositions; if (Oe === void 0) return; Oe[0] = Be, Oe[2] = ke; let we = K.geodeticSurfaceNormal(Be, {}); we = V.multiplyByScalar(we, Ye - Le, we); const Je = V.add(Be, we, Oe[1]); if (!(V.equalsEpsilon(Je, ke, q.EPSILON10) && V.equalsEpsilon(Je, Be, q.EPSILON10))) { let z = V.subtract(ke, Je, {}), pe = V.subtract(Be, Je, {}); const me = Math.min(V.magnitude(z), V.magnitude(pe)), De = 15 < me ? 0.15 * me : 0.25 * me; z = V.normalize(z, z), pe = V.normalize(pe, pe), z = V.multiplyByScalar(z, De, z), pe = V.multiplyByScalar(pe, De, pe); const ot = $.xyBoxPositions; if (ot === void 0) return; V.add(Je, z, ot[0]), V.add(ot[0], pe, ot[1]), V.add(Je, pe, ot[2]), $.xLabelPosition = V.midpoint(Je, ke, {}), $.yLabelPosition = V.midpoint(Be, Je, {}), $.xAnglePosition = ke, $.yAnglePosition = Be; const Kn = V.subtract(Je, ke, {}), On = V.subtract(Je, Be, {}); let Cr = V.subtract(ke, Be, {}); $.yAngle = V.angleBetween(On, Cr), Cr = V.negate(Cr, Cr), $.xAngle = V.angleBetween(Kn, Cr), $.xDistance = V.magnitude(Kn), $.yDistance = V.magnitude(On); } }, N = () => { L.value.forEach(($, V) => { var q; const ee = $.polygonPositions; if (!(ee.length < 2)) { const { defined: Y, SceneTransforms: K, Cartesian2: fe, HorizontalOrigin: J } = Cesium, { viewer: ue } = o, ne = ue.scene; let ve = $.positions[0]; const Pe = K.wgs84ToWindowCoordinates(ne, ve, {}); let Be = Y(Pe) ? fe.clone(Pe, {}) : fe.fromElements(Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY, {}), ke = Be.y; const Oe = ((q = y.value) == null ? void 0 : q.cesiumObject)._primitives.filter((Je) => Je instanceof Cesium.LabelCollection)[V]._labels, we = Oe[Oe.length - 1]; if (!we) return; for (let Je = 1; Je < ee.length; Je++) { const z = K.wgs84ToWindowCoordinates(ne, ee[Je], {}); if (Y(z)) { const pe = (Be.y - z.y) / (z.x - Be.x), me = Oe[Je - 1]; me && me !== we && (me.horizontalOrigin = 0 < pe ? J.LEFT : J.RIGHT), z.y < ke && (ke = z.y, ve = ee[Je]), Be = fe.clone(z, Be); } $.drawStatus === xt.AfterDraw && (we.position = ve); } } }); }, F = () => { L.value.forEach(($, V) => { var q, ee, Y; const { defined: K, SceneTransforms: fe, HorizontalOrigin: J } = Cesium, { viewer: ue } = o, ne = ue.scene, ve = (q = y.value) == null ? void 0 : q.cesiumObject, Pe = $.positions, Be = Pe[0], ke = Pe[1], Le = fe.wgs84ToWindowCoordinates(ne, Be, {}), Ye = fe.wgs84ToWindowCoordinates(ne, ke, {}); if (K(Le) && K(Ye)) { const Oe = ve._primitives.filter((we) => we instanceof Cesium.LabelCollection); if (Oe.length) { const we = Oe[V].get(0); let Je, z, pe, me; r.showComponentLines && (Je = Oe[V].get(2), z = Oe[V].get(3), pe = bi((ee = r.yLabelOpts) == null ? void 0 : ee.pixelOffset), me = bi((Y = r.xAngleLabelOpts) == null ? void 0 : Y.pixelOffset)), (Le.y - Ye.y) / (Ye.x - Le.x) > 0 ? (!Qo(Je) && !Qo(pe) && (pe.x = -9, Je.pixelOffset = pe, Je.horizontalOrigin = J.RIGHT), !Qo(z) && !Qo(me) && (me.x = 12, z.pixelOffset = me, z.horizontalOrigin = J.LEFT), we.horizontalOrigin = J.LEFT) : (!Qo(Je) && !Qo(pe) && (pe.x = 9, Je.pixelOffset = pe, Je.horizontalOrigin = J.LEFT), !Qo(z) && !Qo(me) && (me.x = -12, z.pixelOffset = me, z.horizontalOrigin = J.RIGHT), we.horizontalOrigin = J.RIGHT); } } }); }, k = ($, V) => { const { defined: q, defaultValue: ee, Cartesian3: Y } = Cesium, { viewer: K } = o, fe = K.scene, J = $.positions; J[0] = V; const ue = fe.frameState.mapProjection.ellipsoid, ne = ue.cartesianToCartographic(V, {}), ve = fe.globe; ne.height = q(ve) ? ee(ve.getHeight(ne), 0) : 0, J[1] = ue.cartographicToCartesian(ne, {}), $.distance = Y.distance(J[0], J[1]), $.labelPosition = Y.midpoint(J[0], J[1], {}); }, G = () => { const { Cartesian3: $, Plane: V } = Cesium, q = { positions: [new $(), new $()], show: !1, drawStatus: xt.BeforeDraw, distance: 0, labels: [], pointOpts: {}, labelOpts: {}, labelsOpts: {}, polylineOpts: {}, primitiveOpts: {}, polygonOpts: {} }; t === "VcMeasurementVertical" && Object.assign(q, { draggingPlane: new V($.UNIT_X, 0), surfaceNormal: new $() }), I.value.push(q), f.value = xt.BeforeDraw, h.value = !0, l.value = c.value.drawingTipStart; }, U = ($ = !0) => { $ && f.value === xt.Drawing && I.value.pop(); const V = m.value ? m.value._vcPolylineIndx : I.value.length - 1, q = I.value[V]; q && (q.drawStatus = xt.AfterDraw), f.value = xt.AfterDraw, h.value = !1, p.value = [0, 0, 0]; }, B = ($, V) => { var q; const { viewer: ee, drawingFabInstance: Y, selectedDrawingActionInstance: K, getWorldPosition: fe } = o, J = Y == null ? void 0 : Y.proxy; if (V.button === 2 && V.ctrl) { const Oe = J.getDrawingActionInstance(u); J.toggleAction(Oe), oi(() => { s("drawEvt", { name: u, finished: !0, windowPoistion: $, type: "cancel" }, ee); }); return; } f.value === xt.AfterDraw && G(); const ue = m.value ? m.value._vcPolylineIndx : I.value.length - 1, ne = I.value[ue], ve = ne.positions; if (V.button === 2 && m.value) { J.editingActionName = void 0, ne.positions[m.value._index] = A, f.value = xt.AfterDraw, ne.drawStatus = xt.AfterDraw, m.value = void 0, l.value = c.value.drawingTipStart, t === "VcMeasurementHeight" && k(ne, A), oi(() => { s("drawEvt", Object.assign({ name: u, index: ue, renderDatas: I, finished: !0, windowPoistion: $, type: "cancel" }, L.value[ue]), ee); }); return; } if (V.button !== 0) return; const { defined: Pe } = Cesium; let Be = "new", ke, Le = !1; const Ye = ee.scene; if (f.value === xt.BeforeDraw) { const Oe = fe(Ye, $, {}); if (!Pe(Oe)) return; if (ve[0] = Oe, ve[1] = Oe, ne.show = !0, f.value = xt.Drawing, ne.drawStatus = xt.Drawing, l.value = c.value.drawingTipEnd, ke = Oe, Le = !1, t === "VcMeasurementVertical") { const we = Ye.frameState.mapProjection.ellipsoid; ne.surfaceNormal = we.geodeticSurfaceNormal(Oe, ne.surfaceNormal); } t === "VcMeasurementHeight" && (k(ne, Oe), Le = !0, ne.drawStatus = xt.AfterDraw, f.value = xt.AfterDraw, l.value = c.value.drawingTipStart, r.mode === 1 && J.toggleAction(K)), t === "VcAnalysisViewshed" && (ne.viewshedOpts = { ...r.viewshedOpts }); } else { if (ne.drawStatus = xt.AfterDraw, f.value = xt.AfterDraw, m.value) { if (fs().hasTouch === !0) { const Oe = fe(Ye, $, {}); Pe(Oe) && (ne.positions.splice(m.value._index, 1, Oe), m.value.pixelSize = ((q = r.pointOpts) == null ? void 0 : q.pixelSize) * 1); } m.value = void 0, J.editingActionName = void 0, h.value = !1, p.value = [0, 0, 0], Be = _.value, K && (l.value = c.value.drawingTipStart, h.value = !0); } else { if (fs().hasTouch === !0) { const Oe = fe(Ye, $, {}); if (Pe(Oe)) { const we = ne.positions; we[1] = Oe; } } r.mode === 1 && J.toggleAction(K); } Le = !0, ke = ne.positions[1]; } oi(() => { s("drawEvt", Object.assign({ index: ue, renderDatas: I, name: u, finished: Le, position: ke, windowPoistion: $, type: Be }, L.value[ue]), ee); }); }, X = ($) => { const { viewer: V, getWorldPosition: q } = o, ee = V.scene, Y = q(ee, $, {}), { defined: K, Cartographic: fe } = Cesium; if (!K(Y) || (p.value = Y, f.value !== xt.Drawing) || t === "VcMeasurementVertical" && ee.mode === Cesium.SceneMode.SCENE2D) return; const J = m.value ? m.value._vcPolylineIndx : I.value.length - 1, ue = I.value[J]; if (t === "VcMeasurementVertical") { const ne = D(ue, $); if (!Qo(ne)) { const ve = ue.positions.slice(); ve[m.value ? m.value._index : 1] = ne, ue.positions = ve; } } else if (t === "VcMeasurementHeight") k(ue, Y); else if (t === "VcDrawingRectangle" || t === "VcDrawingRegular" || t === "VcMeasurementRegular" || t === "VcMeasurementRectangle") { const ne = ue.positions, ve = ne[0], Pe = fe.fromCartesian(ve, V.scene.globe.ellipsoid), Be = fe.fromCartesian(Y, V.scene.globe.ellipsoid); !r.clampToGround && (Be.height = Pe.height), ne[m.value ? m.value._index : 1] = fe.toCartesian(Be, V.scene.globe.ellipsoid); } else if (t === "VcAnalysisSightline") { const ne = ue.positions; if (m.value) { const ve = m.value._index > 0 ? 1 : 0; ne[ve] = Y; } else ne[1] = Y; } else { const ne = ue.positions.slice(); ne[m.value ? m.value._index : 1] = Y, ue.positions = ne; } oi(() => { s("drawEvt", Object.assign({ index: J, renderDatas: I, name: u, finished: !1, position: ue.positions[1], windowPoistion: $, type: m.value ? _ : "new" }, L.value[J]), V); }); }, j = ($) => { var V, q, ee; if (v.value = [0, 0, 0], d.value = !1, !r.editable) return; _.value = $; const { viewer: Y, drawingFabInstance: K } = o; if ($ === "move") { l.value = c.value.drawingTipEditing, f.value = xt.Drawing, m.value = g.value, A = I.value[m.value._vcPolylineIndx].positions[m.value._index], h.value = !0; const fe = K == null ? void 0 : K.proxy; fe.editingActionName = u; } else if ($ === "remove") { const fe = g.value._vcPolylineIndx; I.value[fe].positions.splice(g.value._index, 1); } else if ($ === "removeAll") { const fe = g.value._vcPolylineIndx; I.value.splice(fe, 1); } else { const fe = g.value._vcPolylineIndx, J = I.value[fe]; (ee = (q = (V = r.editorOpts) == null ? void 0 : V[$]) == null ? void 0 : q.callback) == null || ee.call(q, fe, J); } s("editorEvt", { type: $, renderDatas: I, name: u, index: g.value._vcPolylineIndx }, Y); }, se = { computedRenderDatas: L, renderDatas: I, startNew: G, stop: U, clear: () => { I.value = [], U(); }, handleMouseClick: B, handleMouseMove: X }; return Object.assign(n.proxy, se), () => { var $, V, q; const { createGuid: ee } = Cesium, Y = []; if (L.value.forEach((K, fe) => { var J; const ue = t === "VcDrawingRectangle" || t === "VcDrawingRegular" || t === "VcMeasurementRegular" || t === "VcMeasurementRectangle", ne = ue ? (J = K.polygonPositions) == null ? void 0 : J.slice() : K.positions; ue && (ne == null || ne.push(ne[0])); const ve = Object.assign({}, r.polylineOpts, K.polylineOpts); r.clampToGround && delete ve.arcType; const Pe = Object.assign({}, r.primitiveOpts, K.primitiveOpts); if ((ne == null ? void 0 : ne.length) && (ne == null ? void 0 : ne.length) > 1 && (Y.push(H(r.clampToGround ? DX : h_, { ...Pe, show: K.show && Pe.show || r.editable || K.drawStatus === xt.Drawing, onReady: (ke) => { var Le; (Le = Pe == null ? void 0 : Pe.onReady) == null || Le.call(Pe, ke), ke.cesiumObject._vcPolylineIndex = fe; } }, () => H(Qg, { id: ee() }, () => H(r.clampToGround ? Xte : A_, { positions: ne, ...ve })))), t === "VcAnalysisViewshed" && Y.push(H(ZEe, { ...K.viewshedOpts }))), K.polygonPositions && K.polygonPositions.length > 2) { const ke = Object.assign({}, r == null ? void 0 : r.polygonOpts, K == null ? void 0 : K.polygonOpts); ke.clampToGround = r.clampToGround, Y.push(H(Ute, { positions: ne, show: K.show && (ke == null ? void 0 : ke.show), ...ke, onReady: (Le) => { var Ye; P(Le), (Ye = ke == null ? void 0 : ke.onReady) == null || Ye.call(ke, Le), Le.cesiumObject._vcPolylineIndex = fe; } })); } K.xyPolylinePositions && K.xyPolylinePositions.length > 1 && Y.push(H(h_, { show: K.show && Pe || r.editable || K.drawStatus === xt.Drawing, ...Pe, onReady: (ke) => { var Le; (Le = Pe == null ? void 0 : Pe.onReady) == null || Le.call(Pe, ke), ke.cesiumObject._vcPolylineIndex = fe; } }, () => H(Qg, { id: ee() }, () => H(A_, { positions: K.xyPolylinePositions, ...ve })))), K.xyBoxPositions && K.xyBoxPositions.length > 1 && Y.push(H(h_, { show: K.show && Pe || r.editable || K.drawStatus === xt.Drawing, ...Pe }, () => H(Qg, { id: ee() }, () => H(A_, { positions: K.xyBoxPositions, ...ve })))); const Be = Object.assign({}, r.pointOpts, K.pointOpts); Y.push(H(Hte, { enableMouseEvent: r.enableMouseEvent, show: K.show, points: K.points.map((ke, Le) => { const Ye = ke.position, Oe = Object.assign({}, Be, ke); return { position: Ye, id: ee(), _vcPolylineIndx: fe, ...Oe, show: ((Oe == null ? void 0 : Oe.show) || r.editable || K.drawStatus === xt.Drawing) && (t === "VcAnalysisSightline" && K.positions.length === 3 ? Le !== 1 : !0) }; }), onMouseover: w, onMouseout: x, onReady: E })), Y.push(H($te, { enableMouseEvent: r.enableMouseEvent, show: K.show, labels: K.labels, onReady: T })); }), (($ = r.drawtip) == null ? void 0 : $.show) && h.value) { const { viewer: K } = o; Y.push(H(nb, { position: p.value, pixelOffset: (V = r.drawtip) == null ? void 0 : V.pixelOffset, teleport: { to: K.container } }, () => H("div", { class: "vc-drawtip vc-tooltip--style" }, l.value))); } if (d.value) { const K = []; if (g.value) { const J = r.editorOpts; for (const ue in J) if (!Array.isArray(J[ue]) && typeof J[ue] != "number") { const ne = { ...J[ue] }; delete ne.color, K.push(H(c_, { style: { color: J[ue].color, background: J[ue].background }, ...ne, onclick: j.bind(void 0, ue) }, () => H(f_, { ...J[ue].tooltip }, () => { var ve; return H("strong", null, ((ve = J[ue].tooltip) == null ? void 0 : ve.tip) || a(`vc.measurement.editor.${ue}`)); }))); } } const { viewer: fe } = o; Y.push(H(nb, { position: v.value, pixelOffset: (q = r.editorOpts) == null ? void 0 : q.pixelOffset, teleport: { to: fe.container }, onMouseenter: C, onMouseleave: S }, () => H("div", { class: "vc-editor" }, K))); } return H(N5, { ref: y, show: r.show, onReady: b }, () => Y); }; } function pUe(r, e, t) { const n = We(), i = Fa(r, e, n); if (i === void 0) return; const { t: a } = hy(), o = i.$services, { emit: s } = e, { drawingType: u, drawTip: l, drawTipOpts: c, drawStatus: f, canShowDrawTip: h, drawTipPosition: p, showEditor: d, editorPosition: v, mouseoverPoint: g, editingPoint: m, primitiveCollectionRef: y, editorType: _, onMouseoverPoints: w, onMouseoutPoints: x, onMouseenterEditor: C, onMouseleaveEditor: S, onPrimitiveCollectionReady: b, onVcCollectionPointReady: E, onVcCollectionLabelReady: T, onVcPrimitiveReady: P } = qte(r, e, n, t, o); let I, A; const L = 10, D = te([]); r.preRenderDatas && r.preRenderDatas.length && r.preRenderDatas.forEach((V) => { const q = { show: !0, positions: ef(V), tempPositions: [], drawStatus: xt.AfterDraw, loop: r.loop, distance: 0, area: 0, distances: [], labels: [], angles: [], polylineOpts: {}, pointOpts: {}, labelOpts: {}, labelsOpts: {}, primitiveOpts: {}, polygonOpts: {} }; D.value.push(q); }); const O = Ie(() => { const { Cartesian3: V, createGuid: q, defined: ee, Math: Y } = Cesium, K = [], { viewer: fe } = o; return D.value.forEach((J, ue) => { var ne, ve, Pe, Be, ke, Le, Ye, Oe, we; const Je = [], z = [], pe = []; let me = 0; const De = []; J.points = J.positions.map((Kn) => ({ position: Kn })); const ot = J.positions.slice(); if (t === "VcAnalysisSightline") { const Kn = ot.shift(); Kn && ot.forEach((Cr) => { const Wt = []; Wt.push(Kn); const ka = []; y.value.cesiumObject._primitives.forEach((Va) => { Va instanceof Cesium.PointPrimitiveCollection && ka.push(...Va._pointPrimitives), Va instanceof Cesium.Primitive && ka.push(Va); }); const mi = CY(Kn, Cr, o.viewer, ka); ee(mi) && Wt.push(mi), Wt.push(Cr); let ea = 0; const Xo = []; for (let Va = 0; Va < Wt.length - 1; Va++) { const vl = V.distance(Wt[Va], Wt[Va + 1]); Xo.push(vl), ea = ea + vl; } K.push({ ...J, positions: Wt, distance: ea, distances: Xo }); }); } else { r.loop && ot.length > 2 && ot.push(ot[0]); for (let Cr = 0; Cr < ot.length - 1; Cr++) { let Wt = 0; ((ne = r.polylineOpts) == null ? void 0 : ne.arcType) === 0 ? Wt = iM(ot[Cr], ot[Cr + 1], o.viewer.scene.globe.ellipsoid) : Wt = V.distance(ot[Cr], ot[Cr + 1]), z.push(Wt), me = me + Wt; const ka = Object.assign({}, r.labelsOpts, J.labelsOpts); if (Wt > 0 && ot.length > 2 && r.showDistanceLabel && Je.push({ text: es.distanceToString(Wt, (ve = r.measureUnits) == null ? void 0 : ve.distanceUnits, r.locale, (Pe = r.decimals) == null ? void 0 : Pe.distance), position: V.midpoint(ot[Cr], ot[Cr + 1], {}), id: q(), ...ka }), ot.length > 2 && r.showAngleLabel && (Cr > 0 || r.loop)) { const ri = ot[Cr === 0 ? ot.length - 2 : Cr - 1], mi = ot[Cr], ea = ot[Cr + 1], Xo = V.subtract(ri, mi, {}), Va = V.subtract(ea, mi, {}); let vl = 0; V.ZERO.equals(Xo) || V.ZERO.equals(Va) || (vl = V.angleBetween(Xo, Va)), pe.push(vl), Je.push({ text: es.angleToString(vl, (Be = r.measureUnits) == null ? void 0 : Be.angleUnits, r.locale, (ke = r.decimals) == null ? void 0 : ke.angle), position: mi, id: q(), ...ka }); } r.showDashedLine && (De.push({ positions: [ot[Cr], N(ot[Cr])] }), Cr === ot.length - 2 && De.push({ positions: [ot[Cr + 1], N(ot[Cr + 1])] })); } const Kn = _Y(ot), On = Object.assign({}, r.labelOpts, J.labelOpts); r.showLabel && (t.includes("Area") ? Je.push({ text: es.areaToString(Kn, (Le = r.measureUnits) == null ? void 0 : Le.areaUnits, r.locale, (Ye = r.decimals) == null ? void 0 : Ye.area), position: ot[ot.length - 1], id: q(), ...On }) : Je.push({ text: es.distanceToString(me, (Oe = r.measureUnits) == null ? void 0 : Oe.distanceUnits, r.locale, (we = r.decimals) == null ? void 0 : we.distance), position: ot[ot.length - 1], id: q(), ...On })), J.positionsDegreesArray = J.positions.map((Cr) => { const Wt = Cesium.Cartographic.fromCartesian(Cr, fe.scene.globe.ellipsoid); return [Y.toDegrees(Wt.longitude), Y.toDegrees(Wt.latitude), Wt.height]; }), K.push({ ...J, labels: Je, distance: me, distances: z, area: Kn, angles: pe, dashedLines: De }); } }), K; }); n.mount = async () => { const { viewer: V } = o; return r.autoUpdateLabelPosition && V.scene.preRender.addEventListener(F), !0; }, n.unmount = async () => { const { viewer: V } = o; return r.autoUpdateLabelPosition && V.scene.preRender.removeEventListener(F), !0; }; const N = (V) => { const { defined: q, defaultValue: ee } = Cesium, { viewer: Y } = o, K = Y.scene, fe = K.globe, J = K.frameState.mapProjection.ellipsoid, ue = J.cartesianToCartographic(V); return ue.height = q(fe) ? ee(fe.getHeight(ue), 0) : 0, J.cartographicToCartesian(ue); }, F = () => { O.value.forEach((V, q) => { var ee; const Y = V.positions; if (!(Y.length < 2)) { const { defined: K, SceneTransforms: fe, Cartesian2: J, HorizontalOrigin: ue } = Cesium, { viewer: ne } = o, ve = ne.scene; let Pe = Y[0]; const Be = fe.wgs84ToWindowCoordinates(ve, Pe, {}); let ke = K(Be) ? J.clone(Be, {}) : J.fromElements(Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY, {}), Le = ke.y; const we = ((ee = y.value) == null ? void 0 : ee.cesiumObject)._primitives.filter((z) => z instanceof Cesium.LabelCollection)[q]._labels, Je = we[we.length - 1]; for (let z = 1; z < Y.length; z++) { const pe = fe.wgs84ToWindowCoordinates(ve, Y[z], {}); if (K(pe)) { const me = (ke.y - pe.y) / (pe.x - ke.x); we[z - 1] !== Je && (we[z - 1].horizontalOrigin = 0 < me ? ue.LEFT : ue.RIGHT), pe.y < Le && (Le = pe.y, Pe = Y[z]), ke = J.clone(pe, ke); } V.drawStatus === xt.AfterDraw && (Je.position = Pe); } } }); }, k = () => { const V = { show: !1, positions: [], tempPositions: [], drawStatus: xt.BeforeDraw, loop: r.loop, distance: 0, area: 0, distances: [], labels: [], angles: [], polylineOpts: {}, pointOpts: {}, labelOpts: {}, labelsOpts: {}, primitiveOpts: {}, polygonOpts: {} }; if (t === "VcMeasurementHorizontal") { const { Cartesian3: q, Plane: ee } = Cesium; Object.assign(V, { dashedLines: [], heightPlane: new ee(q.UNIT_X, 0), heightPlaneCV: new ee(q.UNIT_X, 0), height: 0, firstMove: !1, tempNextPos: new q() }); } f.value = xt.BeforeDraw, D.value.push(V), h.value = !0, l.value = c.value.drawingTipStart; }, G = (V = !0) => { V && f.value === xt.Drawing && D.value.pop(); const q = m.value ? m.value._vcPolylineIndex : D.value.length - 1, ee = D.value[q]; ee && (ee.positions = ee.tempPositions, ee.drawStatus = xt.AfterDraw), f.value = xt.AfterDraw, h.value = !1, p.value = [0, 0, 0]; }, U = (V, q) => { var ee; const { viewer: Y, drawingFabInstance: K, getWorldPosition: fe, selectedDrawingActionInstance: J } = o, ue = K == null ? void 0 : K.proxy; if (q.button === 2 && q.ctrl) { const pe = ue.getDrawingActionInstance(u); ue.toggleAction(pe), oi(() => { s("drawEvt", { name: u, finished: !0, windowPoistion: V, type: "cancel" }, Y); }); return; } f.value === xt.AfterDraw && k(); const { defined: ne, Cartesian2: ve, Plane: Pe, Cartesian3: Be } = Cesium, ke = m.value ? m.value._vcPolylineIndex : D.value.length - 1, Le = D.value[ke], Ye = Le.tempPositions; if (q.button === 2 && m.value) { _.value === "insert" ? Le.positions.splice(m.value._index, 1) : Le.positions[m.value._index] = A, f.value = xt.AfterDraw, Le.drawStatus = xt.AfterDraw, m.value = void 0, l.value = c.value.drawingTipStart, ue.editingActionName = void 0, h.value = ne(J), oi(() => { s("drawEvt", Object.assign({ index: ke, name: u, renderDatas: D, finished: !0, windowPoistion: V, type: "cancel" }, O.value[ke]), Y); }); return; } if (I = I || new Cesium.Cartesian2(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY), ve.magnitude(ve.subtract(I, V, {})) < L || (q.button === 2 && f.value === xt.Drawing && Ye.length > 1 && (Ye.pop(), B(V)), q.button !== 0)) return; const Oe = Y.scene, we = fe(Oe, V, {}); if (!ne(we)) return; let Je = !1, z = "new"; if (t === "VcMeasurementHorizontal") { if (m.value) f.value = xt.AfterDraw, m.value = void 0, Je = !0, z = _.value, l.value = c.value.drawingTipStart; else if (Ye.length === 0) { const pe = Oe.frameState.mapProjection.ellipsoid; Ye.push(we), Le.positions = Ye, Le.heightPlane = Pe.fromPointNormal(we, pe.geodeticSurfaceNormal(we, {}), Le.heightPlane); const me = pe.cartesianToCartographic(we, {}), De = Oe.mapProjection.project(me, {}), ot = Be.fromElements(De.z, De.x, De.y, De); Le.heightPlaneCV = Pe.fromPointNormal(ot, Be.UNIT_X, Le.heightPlaneCV), Le.height = me.height, Le.firstMove = !0, Le.drawStatus = xt.Drawing, Le.show = !0, f.value = xt.Drawing; } else Ye.push(Le.tempNextPos), Le.positions = Ye, Le.firstMove = !0; l.value = c.value.drawingTipEnd; } else { if (m.value) { if (fs().hasTouch === !0) { const pe = fe(Oe, V, {}); ne(pe) && (Le.positions.splice(m.value._index, 1, pe), m.value.pixelSize = ((ee = r.pointOpts) == null ? void 0 : ee.pixelSize) * 1); } f.value = xt.AfterDraw, m.value = void 0, Je = !0, z = _.value, l.value = c.value.drawingTipStart; } else Ye.push(we), Le.positions = Ye, Le.show = !0, Le.drawStatus = xt.Drawing, f.value = xt.Drawing, h.value = !0, l.value = c.value.drawingTipEnd; z !== "new" && (ue.editingActionName = void 0, h.value = ne(J)); } ve.clone(V, I), oi(() => { s("drawEvt", Object.assign({ index: ke, name: u, renderDatas: D, finished: Je, position: t === "VcMeasurementHorizontal" ? Le.positions[Le.positions.length - 1] : we, windowPoistion: V, type: z }, O.value[ke]), Y); }); }, B = (V, q) => { const { viewer: ee, getWorldPosition: Y } = o, K = ee.scene, fe = Y(K, V, {}), { defined: J } = Cesium; if (!J(fe) || (p.value = fe, f.value !== xt.Drawing)) return; const ue = m.value ? m.value._vcPolylineIndex : D.value.length - 1, ne = D.value[ue]; let ve = "new"; if (t === "VcMeasurementHorizontal") { const { SceneMode: Pe, IntersectionTests: Be, Cartesian3: ke } = Cesium, Le = K.frameState.mapProjection.ellipsoid, Ye = ne.positions, Oe = K.camera.getPickRay(V); let we, Je; if (K.mode === Pe.SCENE3D && ne.heightPlane) we = Be.rayPlane(Oe, ne.heightPlane); else if (K.mode === Pe.COLUMBUS_VIEW && ne.heightPlaneCV) we = Be.rayPlane(Oe, ne.heightPlaneCV), we = ke.fromElements(we.y, we.z, we.x, we), Je = K.mapProjection.unproject(we), we = Le.cartographicToCartesian(Je); else if (we = K.camera.pickEllipsoid(V, Le), J(we)) { const z = Le.cartesianToCartographic(we); z.height = ne.height || 0, we = Le.cartographicToCartesian(z, we); } if (!J(we)) return; if (!ne.firstMove && (q == null ? void 0 : q.shift)) { const z = Ye[Ye.length - 2], pe = ne.tempNextPos, me = ke.subtract(pe, z, {}); let De = ke.subtract(we, z, {}); De = ke.projectVector(De, me, De), we = ke.add(z, De, we); } if (m.value) ne.positions.splice(m.value._index, 1, we), ve = _.value; else { const z = ne.tempPositions.slice(); z.push(we), ne.positions = z, ne.firstMove = !1, ne.tempNextPos = Object.assign(we), l.value = c.value.drawingTipEnd; } } else if (m.value) ne.positions.splice(m.value._index, 1, fe), ve = _.value; else { const Pe = ne.tempPositions.slice(); Pe.push(fe), ne.positions = Pe; } oi(() => { s("drawEvt", Object.assign({ index: ue, name: u, renderDatas: D, finished: !1, position: t === "VcMeasurementHorizontal" ? ne.positions[ne.positions.length - 1] : fe, windowPoistion: V, type: ve }, O.value[ue]), ee); }); }, X = (V) => { const { drawingFabInstance: q, selectedDrawingActionInstance: ee, viewer: Y } = o; if (f.value === xt.Drawing) { const K = m.value ? m.value._vcPolylineIndex : D.value.length - 1, fe = D.value[K]; G(!1), l.value = c.value.drawingTipStart, oi(() => { s("drawEvt", Object.assign({ index: K, name: u, renderDatas: D, finished: !0, position: fe.positions[fe.positions.length - 1], windowPoistion: V, type: "new" }, O.value[K]), Y), r.mode === 1 && (q == null ? void 0 : q.proxy).toggleAction(ee); }); } }, j = () => { let V = m.value._vcPolylineIndex, q = m.value._index; if (t === "VcAnalysisSightline") for (let ee = 0; ee < D.value.length; ee++) { const Y = D.value[ee]; for (let K = 0; K < Y.positions.length; K++) { const fe = Y.positions[K]; m.value.position.equals(fe) && (V = ee, q = K); } } return [V, q]; }, ae = (V) => { var q, ee, Y; if (v.value = [0, 0, 0], d.value = !1, !r.editable) return; const { viewer: K, drawingFabInstance: fe } = o, J = fe == null ? void 0 : fe.proxy; if (_.value = V, V === "move") { l.value = c.value.drawingTipEditing, f.value = xt.Drawing, m.value = g.value, h.value = !0; const ue = j(); m.value._vcPolylineIndex = ue[0], m.value._index = ue[1], A = D.value[ue[0]].positions[ue[1]], J.editingActionName = u; } else if (V === "insert") { const ue = g.value._vcPolylineIndex; D.value[ue].positions.splice(g.value._index, 0, g.value.position), m.value = g.value, h.value = !0, f.value = xt.Drawing, l.value = c.value.drawingTipEditing, J.editingActionName = u; } else if (V === "remove") { const ue = g.value._vcPolylineIndex, ne = D.value[ue]; ne.positions.length > 2 && ne.positions.splice(g.value._index, 1); } else if (V === "removeAll") { const ue = g.value._vcPolylineIndex; D.value.splice(ue, 1); } else { const ue = g.value._vcPolylineIndex, ne = D.value[ue]; (Y = (ee = (q = r.editorOpts) == null ? void 0 : q[V]) == null ? void 0 : ee.callback) == null || Y.call(ee, ue, ne); } s("editorEvt", { type: V, renderDatas: D, name: u, index: g.value._vcPolylineIndex }, K); }, $ = { computedRenderDatas: O, renderDatas: D, startNew: k, stop: G, clear: () => { D.value = [], G(); }, handleMouseClick: U, handleMouseMove: B, handleDoubleClick: X }; return Object.assign(n.proxy, $), () => { var V, q; const { createGuid: ee, Cartesian3: Y } = Cesium, K = [], fe = []; if (O.value.forEach((J, ue) => { var ne, ve; const Pe = J.positions.slice(); if (Pe.length > 1) { J.loop && Pe.push(Pe[0]); const Ye = Object.assign({}, r.polylineOpts, J.polylineOpts); r.clampToGround && delete Ye.arcType; const Oe = Object.assign({}, r.primitiveOpts, J.primitiveOpts); K.push(H(r.clampToGround ? DX : h_, { show: J.show && Oe.show || r.editable || J.drawStatus === xt.Drawing, ...Oe, onReady: (we) => { var Je; (Je = Oe == null ? void 0 : Oe.onReady) == null || Je.call(Oe, we), we.cesiumObject._vcPolylineIndex = ue; } }, () => H(Qg, { id: ee() }, () => H(r.clampToGround ? Xte : A_, { positions: Pe, ...Ye })))); } const Be = Object.assign({}, r.dashLineOpts, J.dashLineOpts), ke = Object.assign({}, r.dashLinePrimitiveOpts, J.dashLinePrimitiveOpts); (ne = J.dashedLines) == null || ne.forEach((Ye) => { K.push(H(h_, { show: J.show && r.dashLinePrimitiveOpts.show || r.editable || J.drawStatus === xt.Drawing, ...ke }, () => H(Qg, { id: ee() }, () => H(A_, { positions: Ye.positions, ...Be })))); }); const Le = Object.assign({}, r.pointOpts, J.pointOpts); if (K.push(H(Hte, { enableMouseEvent: r.enableMouseEvent, show: J.show, points: J.points.map((Ye, Oe) => { var we; const Je = Ye.position; let z = !1; for (let De = 0; De < fe.length; De++) Y.equals(Je, fe[De]) && (z = !0); const pe = (((we = r.pointOpts) == null ? void 0 : we.show) || r.editable || J.drawStatus === xt.Drawing) && (t === "VcAnalysisSightline" && J.positions.length === 3 ? Oe !== 1 : !0) && !z; t === "VcAnalysisSightline" && fe.push(Je); const me = Object.assign({}, Le, Ye); return { position: Je, id: ee(), _vcPolylineIndex: ue, show: pe, ...me }; }), onMouseover: w, onMouseout: x, onReady: E })), K.push(H($te, { enableMouseEvent: r.enableMouseEvent, show: J.show, labels: J.labels, onReady: T })), Pe.length > 2 && (t.includes("Polygon") || t.includes("Area"))) { const Ye = Object.assign({}, r.polygonOpts, J.polygonOpts); K.push(H(Ute, { positions: Pe, clampToGround: r.clampToGround, show: J.show && ((ve = r.polygonOpts) == null ? void 0 : ve.show), ...Ye, onReady: (Oe) => { var we; P(Oe), (we = Ye == null ? void 0 : Ye.onReady) == null || we.call(Ye, Oe), Oe.cesiumObject._vcPolylineIndex = ue; } })); } }), ((V = r.drawtip) == null ? void 0 : V.show) && h.value) { const { viewer: J } = o; K.push(H(nb, { position: p.value, pixelOffset: r.drawtip.pixelOffset, teleport: { to: J.container } }, () => H("div", { class: "vc-drawtip vc-tooltip--style" }, l.value))); } if (d.value) { const J = []; if (g.value) { const ne = r.editorOpts; for (const ve in ne) if (!Array.isArray(ne[ve]) && typeof ne[ve] != "number") { const Pe = { ...ne[ve] }; delete Pe.color, J.push(H(c_, { style: { color: ne[ve].color, background: ne[ve].background }, ...Pe, onclick: ae.bind("polyline", ve) }, () => H(f_, { ...ne[ve].tooltip }, () => { var Be; return H("strong", null, ((Be = ne[ve].tooltip) == null ? void 0 : Be.tip) || a(`vc.drawing.editor.${ve}`)); }))); } } const { viewer: ue } = o; K.push(H(nb, { position: v.value, pixelOffset: (q = r.editorOpts) == null ? void 0 : q.pixelOffset, teleport: { to: ue.container }, onMouseenter: C, onMouseleave: S }, () => H("div", { class: "vc-editor" }, J))); } return H(N5, { ref: y, show: r.show, onReady: b }, () => K); }; } function dUe(r, e, t, n, i, a, o) { t.cesiumEvents = []; const s = Fa(r, e, t); if (s === void 0) return; const { t: u } = hy(), { $services: l } = s, { emit: c } = e, f = te(!1), h = _n({}), p = mEe(r), d = te(null), v = te(null), g = te(!1), m = te(null); let y, _; const w = (B, X) => { var j, ae; const se = _ == null ? void 0 : _.cmpRef.value; (j = se == null ? void 0 : se.handleMouseClick) == null || j.call(se, B.position, X); let $; const V = t.proxy; if (V.editingActionName && ($ = D(V.editingActionName)), $ && $ !== _) { const q = $.cmpRef.value; (ae = q == null ? void 0 : q.handleMouseClick) == null || ae.call(q, B.position, X); } }, x = (B, X) => { var j, ae; const se = _ == null ? void 0 : _.cmpRef.value; (j = se == null ? void 0 : se.handleMouseMove) == null || j.call(se, B.endPosition, X); let $; const V = t.proxy; if (V.editingActionName && ($ = D(V.editingActionName)), $ && $ !== _) { const q = $.cmpRef.value; (ae = q == null ? void 0 : q.handleMouseMove) == null || ae.call(q, B.endPosition, X); } }, C = (B, X) => { var j, ae; const se = _ == null ? void 0 : _.cmpRef.value; (j = se == null ? void 0 : se.handleDoubleClick) == null || j.call(se, B.position, X); let $; const V = t.proxy; if (V.editingActionName && ($ = D(V.editingActionName)), $ && $ !== _) { const q = $.cmpRef.value; (ae = q == null ? void 0 : q.handleDoubleClick) == null || ae.call(q, B.position, X); } }, { activate: S, deactivate: b, destroy: E, isActive: T } = $Ce(l, { handleMouseClick: w, handleMouseMove: x, handleDoubleClick: C }); t.createCesiumObject = async () => (f.value = !0, y = new HCe(), n.value), t.mount = async () => (I(), g.value = !0, S(), !0), t.unmount = async () => (_ && (L(_), _ = void 0), b(), E(), g.value = !1, !0); const P = (B, X, j) => { const { Cesium3DTileFeature: ae, Cesium3DTileset: se, Cartesian3: $, defined: V, Model: q, Ray: ee } = Cesium; if (Cesium.SuperMapVersion) return B.pickPosition(X); let Y; const K = {}, fe = new ee(); if (B.pickPositionSupported) { y.hide(B); const J = B.pick(X, 1, 1); if (y.restore(B), V(J) && (J instanceof ae || J.primitive instanceof se || J.primitive instanceof q || Cesium.S3MTilesLayer && J.primitive instanceof Cesium.S3MTilesLayer) && (Y = B.pickPosition(X, K), V(Y))) return $.clone(Y, j); } if (V(B.globe)) { const J = B.camera.getPickRay(X, fe); return Y = B.globe.pick(J, B, K), V(Y) ? $.clone(Y, j) : void 0; } }, I = () => { var B; const X = p.style.value; h.left = X.left, h.top = X.top, h.transform = X.transform; const j = p.attach.value, ae = (B = JS(v)) == null ? void 0 : B.$el; if (ae !== void 0) { const se = ae.getBoundingClientRect(); X.width = `${se.width}px`, X.height = `${se.height}px`, (j.bottom || j.top) && !j.left && !j.right && (X.left = "50%", X.transform = "translate(-50%, 0)"), (j.left || j.right) && !j.top && !j.bottom && (X.top = "50%", X.transform = "translate(0, -50%)"); } Object.assign(h, X); }, A = te(null), L = (B) => { var X; const { viewer: j } = l; if (ca(B) && (B = D(B)), !B) { s.logger.error("Invalid drawingActionOption or drawingActionOption name"); return; } const ae = O(B.name); if (ae !== -1) { if (_ !== void 0) { _.actionOpts.color = A.value || ""; const se = _.cmpRef.value; (X = se.stop) == null || X.call(se), _.isActive = !1, c("activeEvt", { type: _.name, option: _, isActive: !1 }, j); } (_ == null ? void 0 : _.name) === (B == null ? void 0 : B.name) ? (_ = void 0, n.value[ae].actionOpts.color = A.value || "red") : oi(() => { n.value[ae].cmpRef.value.startNew(), A.value = n.value[ae].actionOpts.color, n.value[ae].actionOpts.color = r.activeColor, n.value[ae].isActive = !0, _ = n.value[ae], c("activeEvt", { type: _.name, option: _, isActive: !0 }, j); }); } }, D = (B) => n.value.find((X) => X.name === B), O = (B) => n.value.findIndex((X) => X.name === B), N = (B) => { B ? S() : (_ && L(_), b()), i.modelValue = B, c("fabUpdated", B); }, F = () => { n.value.forEach((B) => { var X; (X = B.cmpRef.value) == null || X.clear(); }), _ && L(_); }, k = () => gw(s.getServices(), { get drawingFabInstance() { return t; }, get selectedDrawingActionInstance() { return _; }, get getWorldPosition() { return P; }, get drawingHandlerActive() { return T; } }), G = ({ cesiumObject: B }) => { B._vcId = o; }; return $h(vw, k()), t.appContext.config.globalProperties.$VueCesium = k(), Object.assign(t.proxy, { clearAll: F, deactivate: b, activate: S, toggleAction: L, getFabRef: () => v.value, getDrawingActionInstance: D, getDrawingActionInstances: () => n.value, getSelectedDrawingActionInstance: () => _ }), { renderContent: () => { if (f.value) { const B = [], X = []; n.value.forEach((ae) => { B.push(H($V, { ref: ae.actionRef, style: ae.actionStyle, class: ae.actionClass, ...ae.actionOpts, onClick: () => { L(ae); } }, () => H(f_, { ...ae.actionOpts.tooltip }, () => H("strong", null, ae.tip)))), ae.cmp && X.push(H(ae.cmp, { ref: ae.cmpRef, editable: r.editable, clampToGround: r.clampToGround, mode: r.mode, onDrawEvt: (se, $) => { c("drawEvt", se, $); }, onEditorEvt: (se, $) => { c("editorEvt", se, $); }, onMouseEvt: (se, $) => { c("mouseEvt", se, $); }, ...ae.cmpOpts })); }), n.value.length && B.push(H($V, { style: { background: a.color, color: a.textColor }, class: "vc-draw-button vc-draw-clear", ...a, onClick: F }, () => H(f_, { ...a.tooltip }, () => H("strong", null, a.tooltip.tip || u(`vc.${o}.clear.tip`))))); const j = []; return g.value && j.push(H("div", { ref: d, class: "vc-drawings-container " + p.classes.value, style: h }, e.slots.body !== void 0 ? e.slots.body(n.value) : H(gEe, { ref: v, class: "vc-draw-button", style: { background: i.color, color: i.textColor }, ...i, "onUpdate:modelValue": N }, { default: () => B, tooltip: () => H(f_, { ...i.tooltip }, () => H("strong", null, i.tooltip.tip || (i.modelValue ? u("vc.drawing.collapse") : u("vc.drawing.expand")))) }))), j.push(H(N5, { ref: m, show: r.show, onReady: G }, () => X)), j; } else return xe("v-if"); } }; } const vUe = { ...Pt, stop: (r) => !0 }; var gUe = de({ name: "VcAnalysisFlood", props: { minHeight: { type: Number, default: -1 }, maxHeight: { type: Number, default: 8888 }, speed: { type: Number, default: 10 }, loop: { type: Boolean, default: !1 }, color: { type: [Object, Array, String], default: "rgba(40,150,200,0.6)" }, ...cv }, emits: vUe, setup(r, e) { var t; const n = We(); n.cesiumClass = "VcAnalysisFlood", n.cesiumEvents = []; const i = Fa(r, e, n); if (i === void 0) return; const { emit: a } = e, o = te(!1); (t = Fd(n).proxy.creatingPromise) == null || t.then(() => { o.value = !0; }); const u = te(!1), l = te(null), c = te(-1), f = te(null); let h = !1, p = []; p.push(Ve(() => r.minHeight, (y) => { c.value = y; })), n.createCesiumObject = async () => { const { ColorGeometryInstanceAttribute: y } = Cesium; return l.value = { color: y.fromColor(Gt(r.color)) }, f.value; }, n.mount = async () => { const { viewer: y } = i.$services; return y.clock.onTick.addEventListener(d), !0; }, n.unmount = async () => { const { viewer: y } = i.$services; return y.clock.onTick.removeEventListener(d), c.value = -1, u.value = !1, !0; }; const d = () => { u.value && (c.value <= r.maxHeight ? (c.value += r.speed, h = !1) : (xi(n, "stop") && a("stop", f.value), h = !0, r.loop ? c.value = r.minHeight : u.value = !1)); }, v = () => { c.value = r.minHeight, u.value = !0; }, g = () => { u.value = !u.value, h && (c.value = r.minHeight); }, m = () => { c.value = -1, u.value = !1; }; return xa(() => { p.forEach((y) => y()), p = []; }), Object.assign(n.proxy, { start: v, pause: g, stop: m }), () => { if (o.value) { const { createGuid: y } = Cesium; return H(XEe, { asynchronous: !1, ref: f }, () => H(Qg, { id: y(), attributes: l.value }, () => H(hUe, { extrudedHeight: c.value, polygonHierarchy: r.polygonHierarchy }))); } else return xe("v-if"); }; } }); const mUe = Object.assign({}, vy, { icon: "vc-icons-analysis-sightline" }), yUe = Object.assign({}, _Ee, { polylineOpts: Object.assign({}, Aw, { colors: ["#51ff00", "red"] }), primitiveOpts: Object.assign({}, Iw, { appearance: { type: "PolylineColorAppearance" }, depthFailAppearance: { type: "PolylineColorAppearance" } }), sightlineType: "polyline" }), _Ue = Object.assign({}, vy, { icon: "vc-icons-analysis-viewshed" }), wUe = Object.assign({}, CX, { pointOpts: Object.assign({}, gy, { show: !1 }), polylineOpts: Object.assign({}, Aw, { width: 15 }), primitiveOpts: Object.assign({}, Iw, { show: !1, appearance: { type: "PolylineMaterialAppearance", options: { material: { fabric: { type: "PolylineArrow", uniforms: { color: [255, 255, 0, 255] } } } } }, depthFailAppearance: { type: "PolylineMaterialAppearance", options: { material: { fabric: { type: "PolylineArrow", uniforms: { color: [255, 255, 0, 255] } } } } } }), editorOpts: { pixelOffset: [16, -8], delay: 1e3, hideDelay: 1e3, move: Object.assign({}, Xa), removeAll: Object.assign({}, Xa, { icon: "vc-icons-delete" }) }, viewshedOpts: { fovH: 90, fovV: 60, offsetHeight: 1.8, visibleColor: "#00ff00", invisibleColor: "#ff0000", showGridLine: !0, faceColor: "rgba(255,255,255,0.1)", lineColor: "rgba(255,255,255,0.4)" } }), xUe = Object.assign({}, vy, { direction: "right", icon: "vc-icons-analysis-button", activeIcon: "vc-icons-analysis-button", verticalActionsAlign: "center", hideIcon: !1, persistent: !1, modelValue: !0, hideActionOnClick: !1, color: "info" }), Kte = ["sightline", "viewshed"], CUe = (r) => { let e = !0; return r.forEach((t) => { Kte.includes(t) || (console.error(`VueCesium: unknown analysis type: ${t}`), e = !1); }), e; }, Jte = { ...xEe, analyses: { type: Array, default: () => Kte, validator: CUe }, mainFabOpts: { type: Object, default: () => xUe }, sightlineActionOpts: { type: Object, default: () => mUe }, sightlineAnalysisOpts: { type: Object, default: () => yUe }, viewshedActionOpts: { type: Object, default: () => _Ue }, viewshedAnalysisOpts: { type: Object, default: () => wUe } }, ig = bxe(Jte); var SUe = de({ name: "VcAnalysisSightline", props: { ...EX, polylineOpts: Object, polygonOpts: Object, primitiveOpts: Object, sightlineType: { type: String, default: "polyline" } }, emits: AN, setup(r, e) { if (r.sightlineType === "segment" || r.sightlineType === "circle") return Zte(r, e, "VcAnalysisSightline"); if (r.sightlineType === "polyline") return pUe(r, e, "VcAnalysisSightline"); } }), EUe = de({ name: "VcAnalysisViewshed", props: { ...EX, polylineOpts: Object, primitiveOpts: Object, viewshedOpts: Object }, emits: AN, setup(r, e) { return Zte(r, e, "VcAnalysisViewshed"); } }); const bUe = { ...AN, fabUpdated: (r) => !0 }; var Qte = de({ name: "VcAnalyses", props: Jte, emits: bUe, setup(r, e) { var t; const n = We(); n.cesiumClass = "VcAnalyses"; const { t: i } = hy(), a = {}, o = _n(Object.assign({}, ig.clearActionOpts, r.clearActionOpts)), s = _n(Object.assign({}, ig.mainFabOpts, r.mainFabOpts)), u = _n(Object.assign({}, ig.sightlineActionOpts, r.sightlineActionOpts)), l = _n(Object.assign({}, ig.sightlineAnalysisOpts, r.sightlineAnalysisOpts)), c = _n(Object.assign({}, ig.viewshedActionOpts, r.viewshedActionOpts)), f = _n(Object.assign({}, ig.viewshedAnalysisOpts, r.viewshedAnalysisOpts)); a.sightlineActionOpts = u, a.sightlineAnalysisOpts = l, a.viewshedActionOpts = c, a.viewshedAnalysisOpts = f, a.clearActionOpts = o; const h = Ie(() => r.analyses.map((d) => ({ name: d, type: "analysis", actionStyle: { background: a[`${Av(d)}ActionOpts`].color, color: a[`${Av(d)}ActionOpts`].textColor }, actionClass: `vc-analysis-${d} vc-analysis-button`, actionRef: te(null), actionOpts: a[`${Av(d)}ActionOpts`], cmp: p(d), cmpRef: te(null), cmpOpts: a[`${Av(d)}AnalysisOpts`], tip: a[`${Av(d)}ActionOpts`].tooltip.tip || i(`vc.analysis.${Av(d)}.tip`), isActive: !1 }))); function p(d) { switch (d) { case "sightline": return SUe; case "viewshed": return EUe; default: return; } } return (t = dUe(r, e, n, h, s, o, "analysis")) == null ? void 0 : t.renderContent; } }); const TUe = [gUe, Qte]; TUe.forEach((r) => { r.install = (e) => { e.component(r.name, r); }; }); const PUe = Qte, IUe = "ps-module__wh___6yiEh", AUe = "ps-module__w___SA72v", LUe = "ps-module__h___kN89F", DUe = "ps-module__flex___ZOqdq", MUe = "ps-module__displayCenter___ZBUml", OUe = "ps-module__displayBetween___UMWL9", RUe = "ps-module__displayAround___WjEKo", NUe = "ps-module__edit___GlOA9", P0 = { wh: IUe, w: AUe, h: LUe, flex: DUe, displayCenter: MUe, displayBetween: OUe, displayAround: RUe, "control-base": "ps-module__control-base___pXZx3", "v-btn": "ps-module__v-btn___oLfFn", edit: NUe, delete: "ps-module__delete___1eLAe" }, FUe = de({ setup(r, e) { const { emit: t } = e, n = te(), i = te(!1), a = () => { var c; (c = n.value) == null || c.clearAll(); }, o = () => { a(), t("closePs"); }, s = () => i.value = !i.value, u = (c) => { var f; (f = n.value) == null || f.toggleAction(c.name); }, l = { body: (c) => { const f = []; c.forEach((d) => { f.push(re(c_, { class: P0["v-btn"], round: !0, onClick: () => u(d), color: d.isActive ? "amber" : "primary" }, { default: () => [d.tip] })); }); const h = re(c_, { class: [P0["v-btn"], P0.edit], onClick: s }, { default: () => [Ne("\u7F16\u8F91")] }), p = re(c_, { class: P0["v-btn"], rounded: !0, color: "red", onClick: a }, { default: () => [Ne("\u6E05\u9664")] }); return f.push(h, p), re("div", { class: "custom-analysis" }, [f]); } }; return () => re("div", null, [re("span", { class: P0.delete, onClick: o }, [Ne("x")]), re(PUe, { offset: [10, 30], editable: i.value, ref: n, position: "bottom-left" }, l)]); } }); class BUe { constructor(e, t) { Ir(this, "keyDownStatus", (e, t) => { document.onkeydown = (n) => { if (n.ctrlKey && window.event.keyCode == 90) { if (!e) return !1; this.activeShapePoints.pop(), this.Viewer.entities.remove(this.activePoints.pop()), t.pop(); } }; }); Ir(this, "startDraw", (e) => { this.keyDownStatus(!0, e); let t = new this.Cesium.ScreenSpaceEventHandler(this.Viewer.canvas); t.setInputAction((n) => { if (n = this.Viewer.scene.pickPosition(n.position), this.Cesium.defined(n)) { let s = this.Cesium.Cartographic.fromCartesian(n); var i = this.Cesium.Math.toDegrees(s.longitude).toFixed(5), a = this.Cesium.Math.toDegrees(s.latitude).toFixed(5), o = s.height.toFixed(2); e.push({ lon: i, lat: a, height: o }), this.activeShapePoints.length === 0 && (this.floatingPoint = this.createPoint(n), this.activeShapePoints.push(n), i = new this.Cesium.CallbackProperty(() => new this.Cesium.PolygonHierarchy(this.activeShapePoints), !1), this.activeShape = this.drawShape(i)), this.activeShapePoints.push(n), this.createPoint(n); } }, this.Cesium.ScreenSpaceEventType.LEFT_CLICK), t.setInputAction((n) => { this.Cesium.defined(this.floatingPoint) && (n = this.Viewer.scene.pickPosition(n.endPosition), this.Cesium.defined(n) && (this.floatingPoint.position.setValue(n), this.activeShapePoints.pop(), this.activeShapePoints.push(n))); }, this.Cesium.ScreenSpaceEventType.MOUSE_MOVE), t.setInputAction((n) => { this.terminateShape(t); }, this.Cesium.ScreenSpaceEventType.RIGHT_CLICK); }); Ir(this, "createPoint", (e) => (e = this.Viewer.entities.add({ position: e, point: { color: this.Cesium.Color.SKYBLUE, pixelSize: 5 } }), this.activePoints.push(e), e)); Ir(this, "drawShape", (e) => this.Viewer.entities.add({ polygon: { hierarchy: e, material: this.Cesium.ColorMaterialProperty(this.Cesium.Color.WHITE.withAlpha(0.7)) } })); Ir(this, "terminateShape", (e) => { this.activeShapePoints.pop(), this.activeShapePoints.length && this.shapeArr.push(this.drawShape(this.activeShapePoints)), this.Viewer.entities.remove(this.floatingPoint), this.Viewer.entities.remove(this.activeShape), this.activePoints.forEach((t) => { this.Viewer.entities.remove(t); }), this.floatingPoint = void 0, this.activeShape = void 0, this.activeShapePoints = [], this.activePoints = [], e.destroy(); }); Ir(this, "submit", (e, t) => { let n = { id: this.guid(), coordinates: [], height: 0 }; for (let a = 0; a < e.length; a++) { var i = e[a]; n.coordinates.push(Number(i.lon), Number(i.lat)); } t.push(n); }); this.Cesium = e, this.Viewer = t, this.activeShapePoints = [], this.activePoints = [], this.floatingPoint = [], this.activeShape = null, this.shapeArr = []; } guid() { return "ClassifyObject-xxxzzxxx-xxzz-zzxx-zzzxxzzz".replace(/[xz]/g, function(e) { let t = 16 * Math.random() | 0; return (e == "x" ? t : 3 & t | 8).toString(16); }); } cancel() { this.Viewer.entities.remove(this.shapeArr.pop()); } clearAll() { this.shapeArr.forEach((e) => { this.Viewer.entities.remove(e); }), this.shapeArr = []; } exportJson(e) { if (e.length === 0) alert("\u5BFC\u51FA\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A\uFF01"); else { let t = { createTime: new Date().toString(), items: e }; typeof t == "object" && (t = JSON.stringify(t, void 0, 4)); let n = new Blob([t], { type: "text/json" }), i = document.createEvent("MouseEvents"), a = document.createElement("a"); a.download = "default.json", a.href = window.URL.createObjectURL(n), a.dataset.downloadurl = ["text/json", a.download, a.href].join(":"), i.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), a.dispatchEvent(i); } } } const kUe = { class: "building-collect-whole" }, VUe = { class: "dv" }, GUe = /* @__PURE__ */ Ne("\u6574\u5E62\u91C7\u96C6"), zUe = /* @__PURE__ */ Ne("\u786E\u8BA4"), $Ue = /* @__PURE__ */ Ne("\u5BFC\u51FA"), HUe = /* @__PURE__ */ de({ __name: "collection", emits: ["closeCollect"], setup(r, { emit: e }) { const t = new BUe(window.Cesium, window.viewer), n = "\u7ED8\u5236\u591A\u8FB9\u5F62\uFF0C\u76EE\u6807\u662F\u6574\u5E62\u5EFA\u7B51\uFF0C\u5DE6\u952E\u7ED8\u5236\u8282\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F\uFF0C\u6570\u636E\u5728\u4E0B\u8868\u5C55\u793A\u3002\u5B8C\u540E\u9700\u70B9\u51FB\u201C\u786E\u8BA4\u201D\u63D0\u4EA4", i = "\u5C06\u5DF2\u7ECF\u7ED8\u5236\u597D\u5355\u4F53\u5316\u8981\u7D20\u63D0\u4EA4\u5230\u5B58\u50A8\u4E2D\uFF0C\u4EE5\u5907\u5BFC\u51FA", a = "\u5C06\u6240\u6709\u5DF2\u7ECF\u201C\u786E\u8BA4\u201D\u63D0\u4EA4\u7684\u6570\u636E\u5BFC\u51FA\u4E3A\u52A8\u6001\u5355\u4F53\u5316\u56FE\u5C42\uFF0C\u683C\u5F0F\u4E3AJSON\u683C\u5F0F", o = te([]), s = te([]), u = () => t.startDraw(o.value), l = () => { o.value.length === 0 && $g.error("\u8BF7\u7ED8\u5236\u533A\u57DF\u540E\u518D\u786E\u5B9A"), t.submit(o.value, s.value), o.value = []; }, c = () => { t.exportJson(s.value); }, f = () => { e("closeCollect"), t.clearAll(); }; return (h, p) => { const d = mt("el-button"), v = mt("el-table-column"), g = mt("el-table"); return Re(), St("div", kUe, [ he("span", { class: "delete", onClick: f }, "x"), he("div", VUe, [ re(d, { title: n, onClick: u }, { default: Ce(() => [ GUe ]), _: 1 }), re(d, { title: i, onClick: l }, { default: Ce(() => [ zUe ]), _: 1 }), re(d, { title: a, onClick: c }, { default: Ce(() => [ $Ue ]), _: 1 }) ]), re(g, { class: "collect-data-table", data: o.value, style: { width: "100%" }, height: "250", "header-cell-style": { background: "#37456e", color: "#ffffff", fontFamily: "MicrosoftYaHeiUI", fontSize: "14px", fontWeight: 900 }, "row-style": { fontSize: "12px", color: "#ffffff", fontFamily: "MicrosoftYaHeiUI", background: "#37456e" } }, { default: Ce(() => [ re(v, { type: "index", width: "40" }), re(v, { prop: "lon", label: "X" }), re(v, { prop: "lat", label: "Y" }), re(v, { prop: "height", label: "H" }) ]), _: 1 }, 8, ["data"]) ]); }; } }), UUe = /* @__PURE__ */ zn(HUe, [["__scopeId", "data-v-5a0ec844"]]); class WUe { constructor(e, t) { Ir(this, "keyDownStatus", (e, t, n) => { document.onkeydown = (i) => { if (i.ctrlKey && window.event.keyCode == 90) { if (!e) return !1; t === "drawBoundary" ? (this.activeShapePoints.pop(), this.Viewer.entities.remove(this.activePoints[this.activePoints.length - 1]), this.activePoints.pop(), n.pop()) : t === "point" && (this.Viewer.entities.remove(this.vertexPoints.pop()), n.pop()); } }; }); Ir(this, "drawBoundary", (e) => { this.keyDownStatus(!0, "drawBoundary", e); let t = new this.Cesium.ScreenSpaceEventHandler(this.Viewer.canvas); t.setInputAction((n) => { let i = this.Viewer.scene.pickPosition(n.position); if (this.Cesium.defined(i)) { let a = this.Cesium.Cartographic.fromCartesian(i), o = this.Cesium.Math.toDegrees(a.longitude).toFixed(5), s = this.Cesium.Math.toDegrees(a.latitude).toFixed(5), u = a.height.toFixed(2); if (e.push({ lon: o, lat: s, height: u }), this.activeShapePoints.length === 0) { this.floatingPoint = this.createPoint(i), this.activeShapePoints.push(i); let l = new this.Cesium.CallbackProperty(() => new this.Cesium.PolygonHierarchy(this.activeShapePoints), !1); this.activeShape = this.drawShape(l); } this.activeShapePoints.push(i), this.createPoint(i); } }, this.Cesium.ScreenSpaceEventType.LEFT_CLICK), t.setInputAction((n) => { if (this.Cesium.defined(this.floatingPoint)) { let i = this.Viewer.scene.pickPosition(n.endPosition); this.Cesium.defined(i) && (this.floatingPoint.position.setValue(i), this.activeShapePoints.pop(), this.activeShapePoints.push(i)); } }, this.Cesium.ScreenSpaceEventType.MOUSE_MOVE), t.setInputAction((n) => { this.terminateShape(t), document.onkeydown = () => { }; }, this.Cesium.ScreenSpaceEventType.RIGHT_CLICK); }); Ir(this, "terminateShape", (e) => { this.activeShapePoints.pop(), this.activeShapePoints.length && this.drawShape(this.activeShapePoints), this.Viewer.entities.remove(this.floatingPoint), this.Viewer.entities.remove(this.activeShape), this.activePoints.forEach((t) => { this.Viewer.entities.remove(t); }), this.floatingPoint = void 0, this.activeShape = void 0, this.activeShapePoints = [], this.activePoints = [], e.destroy(); }); Ir(this, "createPoint", (e) => { let t = this.Viewer.entities.add({ position: e, point: { color: this.Cesium.Color.SKYBLUE, pixelSize: 5 } }); return this.activePoints.push(t), t; }); Ir(this, "drawShape", (e) => this.Viewer.entities.add({ polygon: { hierarchy: e, material: new this.Cesium.ColorMaterialProperty(this.Cesium.Color.BLUE.withAlpha(0.4)) } })); Ir(this, "drawVertex", (e) => { let t = new Cesium.ScreenSpaceEventHandler(viewer.canvas); this.keyDownStatus(!0, "point", e), t.setInputAction((n) => { let i = viewer.scene.pickPosition(n.position); if (this.Cesium.defined(i)) { let a = viewer.entities.add({ position: i, point: { color: this.Cesium.Color.RED, pixelSize: 15 } }), s = this.Cesium.Cartographic.fromCartesian(i).height.toFixed(2); e.push(Number(s)), this.vertexPoints.push(a); } }, this.Cesium.ScreenSpaceEventType.LEFT_CLICK), t.setInputAction((n) => { t.destroy(), document.onkeydown = () => { }; }, this.Cesium.ScreenSpaceEventType.RIGHT_CLICK); }); Ir(this, "submit", (e, t, n, i) => { let a = { id: this.guid(), coordinates: [], vertexHeights: n, description: i }; e.forEach((o) => { a.coordinates.push(Number(o.lon), Number(o.lat)); }), t.push(a); }); this.Cesium = e, this.Viewer = t, this.activeShapePoints = [], this.activePoints = [], this.floatingPoint = [], this.activeShape = null, this.vertexPoints = [], this.vertexHeights = []; } guid() { return "ClassifyObject-xxxzzxxx-xxzz-zzxx-zzzxxzzz".replace(/[xz]/g, function(e) { let t = Math.random() * 16 | 0; return (e == "x" ? t : t & 3 | 8).toString(16); }); } exportJson(e) { if (e.length === 0) { alert("\u5BFC\u51FA\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A\uFF01"); return; } let t = { createTime: new Date().toString(), items: e }, n = "default.single.json"; typeof t == "object" && (t = JSON.stringify(t, void 0, 4)); let i = new Blob([t], { type: "text/json" }), a = document.createEvent("MouseEvents"), o = document.createElement("a"); o.download = n, o.href = window.URL.createObjectURL(i), o.dataset.downloadurl = ["text/json", o.download, o.href].join(":"), a.initMouseEvent( "click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null ), o.dispatchEvent(a); } } const jUe = (r) => (al("data-v-3533821b"), r = r(), sl(), r), YUe = { class: "c-single-container" }, XUe = /* @__PURE__ */ Ne("\u697C\u5C42\u91C7\u96C6"), qUe = /* @__PURE__ */ Ne("\u9876\u70B9\u91C7\u96C6 "), ZUe = /* @__PURE__ */ Ne("\u786E\u8BA4"), KUe = /* @__PURE__ */ Ne("\u5BFC\u51FA"), JUe = ["title"], QUe = /* @__PURE__ */ jUe(() => /* @__PURE__ */ he("span", null, "\u63CF\u8FF0", -1)), eWe = /* @__PURE__ */ de({ __name: "collectSingle", setup(r) { const e = "\u7ED8\u5236\u697C\u5C42\u533A\u57DF\uFF0C\u5DE6\u952E\u7ED8\u5236\uFF0C\u53F3\u952E\u7ED3\u675F\uFF0C\u6570\u636E\u5728\u4E0B\u8868\u5C55\u793A\u3002\u5B8C\u6210\u540E\u9700\u201C\u9876\u70B9\u91C7\u96C6\u201D", t = "\u5DE6\u952E\u7ED8\u5236\u9876\u70B9\uFF0C\u53F3\u952E\u7ED3\u675F", n = "\u5C06\u5DF2\u7ECF\u7ED8\u5236\u597D\u5355\u4F53\u5316\u8981\u7D20\u63D0\u4EA4\u5230\u5B58\u50A8\u4E2D\uFF0C\u4EE5\u5907\u5BFC\u51FA", i = "\u5C06\u6240\u6709\u5DF2\u7ECF\u201C\u786E\u8BA4\u201D\u63D0\u4EA4\u7684\u6570\u636E\u5BFC\u51FA\u4E3A\u52A8\u6001\u5355\u4F53\u5316\u56FE\u5C42\uFF0C\u683C\u5F0F\u4E3AJSON\u683C\u5F0F", a = te([]), o = te([]), s = te([]), u = te(), l = new WUe(window.Cesium, window.viewer), c = () => { l.drawBoundary(a.value); }, f = () => { l.drawVertex(o.value); }, h = () => { l.submit(a.value, s.value, o.value, u.value), a.value = [], o.value = [], u.value = ""; }, p = () => { l.exportJson(s.value); }; return (d, v) => { const g = mt("el-button"), m = mt("el-table-column"), y = mt("el-table"), _ = mt("el-input"); return Re(), St("div", YUe, [ he("div", null, [ re(g, { title: e, onClick: c }, { default: Ce(() => [ XUe ]), _: 1 }), re(g, { title: t, onClick: f }, { default: Ce(() => [ qUe ]), _: 1 }), re(g, { title: n, onClick: h }, { default: Ce(() => [ ZUe ]), _: 1 }), re(g, { title: i, onClick: p }, { default: Ce(() => [ KUe ]), _: 1 }) ]), re(y, { class: "collect-data-table", data: a.value, style: { width: "100%" }, height: "250", "header-cell-style": { background: "#37456e", color: "#ffffff", fontFamily: "MicrosoftYaHeiUI", fontSize: "14px", fontWeight: 900 }, "row-style": { fontSize: "12px", color: "#ffffff", fontFamily: "MicrosoftYaHeiUI", background: "#37456e" } }, { default: Ce(() => [ re(m, { type: "index", width: "40" }), re(m, { prop: "lon", label: "X" }), re(m, { prop: "lat", label: "Y" }), re(m, { prop: "height", label: "H" }) ]), _: 1 }, 8, ["data"]), he("div", { title: o.value.toString() }, "\u9876\u70B9\u96C6\u5408\uFF1A" + us(o.value.toString()), 9, JUe), he("div", null, [ QUe, re(_, { type: "textarea", modelValue: u.value, "onUpdate:modelValue": v[0] || (v[0] = (w) => u.value = w) }, null, 8, ["modelValue"]) ]) ]); }; } }), tWe = /* @__PURE__ */ zn(eWe, [["__scopeId", "data-v-3533821b"]]); const rWe = { class: "resolutionScale-container" }, nWe = /* @__PURE__ */ de({ __name: "resolutionScale", emits: ["closeRs"], setup(r, { emit: e }) { const t = te(1); Ve( () => t.value, () => { window.viewer.resolutionScale = t.value; } ); const n = () => { e("closeRs"); }; return (i, a) => { const o = mt("el-slider"); return Re(), St("div", rWe, [ he("span", { class: "delete", onClick: n }, "x"), re(o, { modelValue: t.value, "onUpdate:modelValue": a[0] || (a[0] = (s) => t.value = s), min: 0.1, max: 1, step: 0.1 }, null, 8, ["modelValue", "min", "step"]) ]); }; } }), iWe = /* @__PURE__ */ zn(nWe, [["__scopeId", "data-v-01f65e1a"]]); function ib(r, e, t) { let n = document.getElementById("toolTip"), i, a, o, s; if ((i = r && typeof r == "object" ? r : i) && i.origin ? (i.origin === "center" && (a = 15, o = -12), i.origin === "top" && (a = 15, o = -44), i.origin === "bottom" && (a = 15, o = 20)) : (a = 15, o = 20), i && i.color ? (i.color === "white" && (s = "background: rgba(255, 255, 255, 0.8);color: black;"), i.color === "black" && (s = "background: rgba(0, 0, 0, 0.5);color: white;"), i.color === "yellow" && (s = "color: black;background-color: #ffcc33;border: 1px solid white;")) : s = "background: rgba(0, 0, 0, 0.5);color: white;", !n) { const l = document.getElementsByClassName("cesium-viewer")[0]; var u = document.createElement("div"), u = (l.append(u), ''); l.insertAdjacentHTML("beforeend", u), n = document.getElementById("toolTip"); } return t ? (n.innerHTML = r, n.style.left = e.x + a + "px", n.style.top = e.y + o + "px", n.style.display = "block") : n.style.display = "none", { tooltip: n, style: i, showAt: function(l, c) { this.tooltip.innerHTML = c, this.style && this.style.origin ? (this.style.origin === "center" && (a = 15, o = -this.tooltip.offsetHeight / 2), this.style.origin === "top" && (a = 15, o = -this.tooltip.offsetHeight - 20), this.style.origin === "bottom" && (a = 15, o = 20)) : (a = 15, o = -this.tooltip.offsetHeight / 2), this.tooltip.style.left = l.x + a + "px", this.tooltip.style.top = l.y + o + "px", this.tooltip.style.display = "block"; }, show: function(l) { this.tooltip.style.display = l ? "block" : "none"; } }; } function t$(r, e, t) { var n, i = r.scene.drillPick(e); let a = null, o = !1, s = !1; for (n in i) { var u = i[n]; if ((o = u && u.primitive instanceof t.Cesium3DTileFeature || u && u.primitive instanceof t.Cesium3DTileset || u && u.primitive instanceof t.Model ? !0 : o) && (r.scene.pick(e), a = r.scene.pickPosition(e))) { let p = t.Cartographic.fromCartesian(a); p.height < 0 && (p.height = 0); var u = t.Math.toDegrees(p.longitude), l = t.Math.toDegrees(p.latitude), c = p.height; a = r$(0, { lng: u, lat: l, alt: c }, void 0, t); } } var f = r.terrainProvider instanceof t.EllipsoidTerrainProvider; if (!o && !f) { var h = r.scene.camera.getPickRay(e); if (!h) return null; a = r.scene.globe.pick(h, r.scene), s = !0; } return !!(a = o || s || !f ? a : r.scene.camera.pickEllipsoid(e, r.scene.globe.ellipsoid)) && (h = function(p, d) { let v = d.Ellipsoid.WGS84, g = v.cartesianToCartographic(p); return { lng: d.Math.toDegrees(g.longitude), lat: d.Math.toDegrees(g.latitude), alt: g.height }; }(a, t), a = h.alt < 0 ? r$(0, h, 0.1, t) : a); } function r$(r, e, t, n) { return e ? n.Cartesian3.fromDegrees(e.lng || e.lon, e.lat, e.alt = t || e.alt, n.Ellipsoid.WGS84) : n.Cartesian3.ZERO; } function n$(r, e, t, n, i) { if (!r) throw new Error("no viewer object!"); let a = (n = n || {}).id || function(d) { let v = d || 32, g = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678", m = g.length, y = ""; for (let _ = 0; _ < v; _++) y += g.charAt(Math.floor(Math.random() * m)); return y; }(); if (r.entities.getById(a)) throw new Error("the id parameter is an unique value"); let o = n.color || e.Color.RED, s = n.outlineColor || o.withAlpha(1), u = n.outlineWidth || 2; const l = new e.ScreenSpaceEventHandler(r.canvas); let c = "\u5DE6\u952E\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236", f = [], h, p = !0; l.setInputAction(function(m) { var v, g, m = m.position, m = t$(r, m, e); f.length == 0 ? (c = "\u5DE6\u952E\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9", f.push(m), v = new e.CallbackProperty(function() { return f.concat([f[0]]); }, !1), g = new e.CallbackProperty(function() { return new e.PolygonHierarchy(f); }, !1), (h = r.entities.add({ name: "Polygon", id: a, polyline: { positions: v, width: u, material: s, clampToGround: !0 }, polygon: { heightReference: e.HeightReference.None, hierarchy: g, material: o } })).GeoType = "Polygon") : c = "\u5DE6\u952E\u6DFB\u52A0\u70B9\uFF0CCtrl+Z\u56DE\u9000\uFF0C\u53F3\u952E\u5B8C\u6210\u7ED8\u5236", f.push(m); }, e.ScreenSpaceEventType.LEFT_CLICK), l.setInputAction(function(v) { var v = v.endPosition; ib(c, v, !0), e.defined(h) && (f.pop(), v = t$(r, v, e), f.push(v)), f.length === 3 && (h.polygon.heightReference = e.HeightReference.CLAMP_TO_GROUND); }, e.ScreenSpaceEventType.MOUSE_MOVE), l.setInputAction(function(d) { f.pop(), h.pottingPoint = f, t.push(h), l.destroy(), ib(c, d.position, !1), p = !1, typeof i == "function" && i(h); }, e.ScreenSpaceEventType.RIGHT_DOWN), document.onkeydown = function(d) { if (d.ctrlKey && window.event.keyCode == 90) { if (!p) return !1; f.pop(), f.length == 2 && (c = "\u5DE6\u952E\u6DFB\u52A0\u7B2C\u4E8C\u4E2A\u70B9"); } }; } class aWe { constructor(e, t, n) { Ir(this, "openTip", () => { const e = this.viewer; this.handler = new this.Cesium.ScreenSpaceEventHandler(e.canvas), this.handler.setInputAction((n) => { var n = n.endPosition, i = e.scene.pick(n); i && i.id && i.id.type === "SlopeAspect" ? (this.toolTip = i.id.value.toFixed(2), console.log(this.toolTip), ib(this.toolTip, n, !0)) : (this.toolTip = "", ib(this.toolTip, n, !1)); }, this.Cesium.ScreenSpaceEventType.MOUSE_MOVE); }); Ir(this, "createNew4Distance", (e) => { var t = 35 < 200 * (e = e || 0.1) ? 35 : 200 * e; this.arrowWidth = t < 15 ? 15 : t; const n = this.viewer; n$(n, this.Cesium, [], { color: this.Cesium.Color.RED.withAlpha(0.1), outlineColor: this.Cesium.Color.YELLOW, outlineWidth: 2 }, (d) => { var a = this.Cartesian3ListToWGS84(d.pottingPoint); n.entities.remove(d); let o = [], s = 1e4, u = 1e4, l = -1e4, c = -1e3; for (let v = 0; v < a.length; v++) { var h = a[v], f = h.lng, h = h.lat; o.push([f, h]), s = f < s ? f : s, u = h < u ? h : u, l = f > l ? f : l, c = h > c ? h : c; } o.push(o[0]); var d = [s, u, l, c], p = this.turf.polygon([o]), d = this.turf.squareGrid(d, e, { mask: p }); this.createEllipse(d); }); }); Ir(this, "createNew4Num", (e) => { const t = this.viewer; n$(t, this.Cesium, [], { color: this.Cesium.Color.RED.withAlpha(0.1), outlineColor: this.Cesium.Color.YELLOW, outlineWidth: 2 }, (v) => { var i = this.Cartesian3ListToWGS84(v.pottingPoint); t.entities.remove(v); let a = [], o = 1e4, s = 1e4, u = -1e4, l = -1e3; for (let g = 0; g < i.length; g++) { var f = i[g], c = f.lng, f = f.lat; a.push([c, f]), o = c < o ? c : o, s = f < s ? f : s, u = c > u ? c : u, l = f > l ? f : l; } a.push(a[0]); var v = [o, s, u, l], p = u - o; let h = l - s; var p = (h = h > p ? h : p) / e, d = 35 < 2e3 * p ? 35 : 2e3 * p, d = (this.arrowWidth = d < 15 ? 15 : d, this.turf.polygon([a])), v = this.turf.squareGrid(v, p, { units: "degrees", mask: d }); this.createEllipse(v); }); }); if (!t) throw new Error("no viewer object!"); this.viewer = t, this.Cesium = e, this.turf = n, this.result = [], this.handler = void 0, this.toolTip = ""; } closeTip() { this.handler && (this.handler.destroy(), this.handler = void 0); } createEllipse(e) { let t = []; for (let s = 0; s < e.features.length; s++) { var n = e.features[s].geometry.coordinates[0], i = [(n[0][0] + n[2][0]) / 2, (n[0][1] + n[2][1]) / 2], i = this.Cesium.Cartographic.fromDegrees(i[0], i[1]); t.push(i); for (let u = 0; u < n.length; u++) { var a = n[u], o = this.Cesium.Cartographic.fromDegrees(a[0], a[1]), o = (t.push(o), n[u + 1]); o && (a = [(a[0] + o[0]) / 2, (a[1] + o[1]) / 2], o = this.Cesium.Cartographic.fromDegrees(a[0], a[1]), t.push(o)); } } this.Cesium.sampleTerrainMostDetailed(this.viewer.scene.terrainProvider, t).then((s) => { let u = []; s = s.reduce(function(l, c, f, d) { var p = 10 * f, d = d.slice(p, 10 + p); return d.length != 0 && (u[f] = d), u; }, []), this.calculateSlope(s); }); } createPolygonInsrance(e, t) { let n = []; for (let o = 1; o < e.length - 1; o++) { var i = e[o]; n.push(this.Cesium.Cartographic.toCartesian(i)); } var a = new this.Cesium.PolygonGeometry({ polygonHierarchy: new this.Cesium.PolygonHierarchy(n) }); return new this.Cesium.GeometryInstance({ geometry: a, attributes: { color: this.Cesium.ColorGeometryInstanceAttribute.fromColor(this.Cesium.Color.fromCssColorString(t)), show: new this.Cesium.ShowGeometryInstanceAttribute(!0) } }); } createArrowInstance(e, t, n, i, a) { return e = new this.Cesium.Cartographic((e.longitude + t.longitude) / 2, (e.latitude + t.latitude) / 2, (e.height + t.height) / 2), n = new this.Cesium.Cartographic((n.longitude + t.longitude) / 2, (n.latitude + t.latitude) / 2, (n.height + t.height) / 2), t = 0 < i ? [this.Cesium.Cartographic.toCartesian(e), this.Cesium.Cartographic.toCartesian(n)] : [this.Cesium.Cartographic.toCartesian(n), this.Cesium.Cartographic.toCartesian(e)], new this.Cesium.GeometryInstance({ id: { type: "SlopeAspect", value: a }, geometry: new this.Cesium.GroundPolylineGeometry({ positions: t, width: this.arrowWidth }), attributes: { color: this.Cesium.ColorGeometryInstanceAttribute.fromColor(this.Cesium.Color.BLUE.withAlpha(0.6)), show: new this.Cesium.ShowGeometryInstanceAttribute(!0) } }); } calculateSlope(e) { let t = [], n = []; for (let h = 0; h < e.length; h++) { var i = e[h], a = i[0]; let p = 0, d = 0; for (let v = 1; v < i.length - 1; v++) { var o = i[v].height - a.height; Math.abs(o) > p && (p = o, d = v); } var u = new this.Cesium.Cartographic(a.longitude, a.latitude, 0), s = new this.Cesium.Cartographic(i[d].longitude, i[d].latitude, 0), u = this.Cesium.Cartesian3.distance(this.Cesium.Cartographic.toCartesian(u), this.Cesium.Cartographic.toCartesian(s)), s = Math.abs(p / u), u = this.calculateSlopeColor(s, 0.4), u = this.createPolygonInsrance(i, u), u = (n.push(u), 4 < d ? i[d - 4] : i[d + 4]), l = i[d], l = this.createArrowInstance(l, a, u, p, s); t.push(l); } var c = this.viewer.scene.primitives.add(new this.Cesium.GroundPrimitive({ geometryInstances: n, appearance: new this.Cesium.PerInstanceColorAppearance({ translucent: !0, closed: !1 }) })), f = this.viewer.scene.primitives.add(new this.Cesium.GroundPolylinePrimitive({ geometryInstances: t, appearance: new this.Cesium.PolylineMaterialAppearance({ material: new this.Cesium.Material({ fabric: { type: "PolylineArrow", uniforms: { color: new this.Cesium.Color(1, 1, 0, 0.8) } } }) }) })); this.result.push(f, c); } clearAll() { this.result.forEach((e) => { this.viewer.scene.primitives.remove(e); }), this.result = []; } calculateSlopeColor(e, t) { return e < 0.00872686779075879 ? "rgba(85,182,43," + t + ")" : e < 0.03492076949174773 ? "rgba(135,211,43," + t + ")" : e < 0.08748866352592401 ? "rgba(204,244,44," + t + ")" : e < 0.2679491924311227 ? "rgba(245,233,44," + t + ")" : e < 0.7002075382097097 ? "rgba(255,138,43," + t + ")" : e < 1.4281480067421144 ? "rgba(255,84,43," + t + ")" : "rgba(255,32,43," + t + ")"; } Cartesian3ListToWGS84(e) { let t = this.Cesium.Ellipsoid.WGS84, n = []; for (let a = 0; a < e.length; a++) { var i = e[a], i = t.cartesianToCartographic(i); n.push({ lng: this.Cesium.Math.toDegrees(i.longitude), lat: this.Cesium.Math.toDegrees(i.latitude), alt: i.height }); } return n; } } const oWe = { class: "slope-container" }, sWe = /* @__PURE__ */ Ne("\u7ED8\u5236\u533A\u57DF,\u7B49\u5206\u5904\u7406"), uWe = /* @__PURE__ */ Ne("\u7ED8\u5236\u533A\u57DF,\u7B49\u8DDD\u5904\u7406"), lWe = /* @__PURE__ */ Ne("\u6E05\u9664\u6240\u6709"), cWe = /* @__PURE__ */ Ne("\u6D4B\u8BD5"), fWe = /* @__PURE__ */ de({ __name: "slopeAspect", emits: ["closeSlopeAspect"], setup(r, { emit: e }) { const t = window.Cesium, n = window.viewer; let i = Xm(window.Cesium, window.viewer); const a = new aWe(t, n, Fhe); a.openTip(); const o = () => { a.createNew4Num(20); }, s = () => { a.createNew4Distance(0.05); }, u = () => { a.clearAll(); }, l = () => { e("closeSlopeAspect"); }, c = () => { i.setInputAction(({ position: f }) => { const { lon: h, lat: p, height: d } = nH({ position: f }, t, n); n.entities.add({ name: "test", position: window.Cesium.Cartesian3.fromDegrees(h, p, d), point: { pixelSize: 5, color: window.Cesium.Color.fromCssColorString("#ee0000"), outlineColor: window.Cesium.Color.fromCssColorString("#fff"), outlineWidth: 2, show: !0 }, label: { text: "test", font: "14px sans-serif", style: t.LabelStyle.FILL_AND_OUTLINE, fillColor: t.Color.fromCssColorString("#ee0000"), outlineColor: t.Color.fromCssColorString("#fff"), outlineWidth: 2, verticalOrigin: t.VerticalOrigin.BOTTOM, pixelOffset: new t.Cartesian2(0, -9), show: !0, backgroundColor: t.Color.AQUA, showBackground: !0 } }); }, t.ScreenSpaceEventType.LEFT_CLICK); }; return (f, h) => { const p = mt("el-button"); return Re(), St("div", oWe, [ he("span", { class: "delete", onClick: l }, "x"), re(p, { onClick: o }, { default: Ce(() => [ sWe ]), _: 1 }), re(p, { onClick: s }, { default: Ce(() => [ uWe ]), _: 1 }), re(p, { onClick: u }, { default: Ce(() => [ lWe ]), _: 1 }), re(p, { onClick: c }, { default: Ce(() => [ cWe ]), _: 1 }) ]); }; } }), hWe = /* @__PURE__ */ zn(fWe, [["__scopeId", "data-v-468d2db4"]]); class ere { constructor(e) { this.viewer = e.viewer, this.leftDownFlag = !1, this.Cesium = e.Cesium, this.pick = null, this.handler = new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas), this.handlers(); } handlers() { this.leftDownAction(), this.mouseMoveAction(), this.leftUpAction(); } leftDownAction() { let e = this; e.handler.setInputAction(function(t) { let n = e.viewer.scene.pick(t.position); e.Cesium.defined(n) && n.id.id && (e.pick = n, e.leftDownFlag = !0, e.viewer.scene.screenSpaceCameraController.enableRotate = !1); }, e.Cesium.ScreenSpaceEventType.LEFT_DOWN); } mouseMoveAction() { let e = this; e.handler.setInputAction(function(t) { if (e.leftDownFlag === !0 && e.pick != null) { let n = e.viewer.scene.pickPosition(t.endPosition); if (e.Cesium.defined(n)) { const i = e.Cesium.Cartographic.fromCartesian(n), a = e.Cesium.Math.toDegrees(i.longitude), o = e.Cesium.Math.toDegrees(i.latitude), s = i.height + 0.5; e.pick.id.position = e.Cesium.Cartesian3.fromDegrees(a, o, s); } } }, e.Cesium.ScreenSpaceEventType.MOUSE_MOVE); } leftUpAction() { let e = this; e.handler.setInputAction(function(t) { let n = e.viewer.scene.pickPosition(t.position); if (e.Cesium.defined(n)) { const a = e.Cesium.Cartographic.fromCartesian(n).height; e.height = a; } e.leftDownFlag === !0 && e.pick != null && (e.leftDownFlag = !1, e.pointDraged = null, e.viewer.scene.screenSpaceCameraController.enableRotate = !0); }, e.Cesium.ScreenSpaceEventType.LEFT_UP); } updataAction() { let e = this; this.handler.removeInputAction(e.Cesium.ScreenSpaceEventType.LEFT_DOWN), this.handler.removeInputAction(e.Cesium.ScreenSpaceEventType.LEFT_UP), this.handler.removeInputAction(e.Cesium.ScreenSpaceEventType.MOUSE_MOVE); } } const pWe = (r) => (al("data-v-0e2283a0"), r = r(), sl(), r), dWe = { class: "mark-container" }, vWe = /* @__PURE__ */ pWe(() => /* @__PURE__ */ he("span", null, "\u81EA\u5B9A\u4E49\u6807\u6CE8\u5185\u5BB9", -1)), gWe = /* @__PURE__ */ Ne("\u786E\u5B9A"), mWe = /* @__PURE__ */ Ne("\u6E05\u9664\u6807\u6CE8"), yWe = /* @__PURE__ */ Ne("\u6E05\u9664\u6240\u6709\u6807\u8BB0"), _We = { class: "jsonBox" }, wWe = /* @__PURE__ */ Ne("\u5BFC\u51FAJSON"), xWe = /* @__PURE__ */ Ne("\u5BFC\u5165JSON"), CWe = /* @__PURE__ */ de({ __name: "mark", setup(r) { const e = te(), t = window.Cesium, n = window.viewer, i = _n([]); new ere({ viewer: n, Cesium: t }); const a = () => { if (e.value) { let l = Xm(window.Cesium, window.viewer); l.setInputAction(({ position: c }) => { let f = n.scene.pickPosition(c); if (console.log(f), t.defined(f)) { const h = t.Cartographic.fromCartesian(f), p = t.Math.toDegrees(h.longitude), d = t.Math.toDegrees(h.latitude), v = h.height + 1, g = { longitude: p, latitude: d, height: v, label: e.value }; n.entities.add({ id: Date.now() + Math.random() + "", name: "mark", position: window.Cesium.Cartesian3.fromDegrees(p, d, v), point: { pixelSize: 5, color: window.Cesium.Color.fromCssColorString("#ee0000"), outlineColor: window.Cesium.Color.fromCssColorString("#fff"), outlineWidth: 2, show: !0 }, billboard: { image: "/src/assets/img/test/label.png", width: 25, height: 25 }, label: { text: e.value, font: "14pt Source Han Sans CN", fillColor: t.Color.BLACK, backgroundColor: t.Color.AQUA, showBackground: !0, outlineColor: t.Color.WHITE, outlineWidth: 10, scale: 2, style: t.LabelStyle.FILL_AND_OUTLINE, verticalOrigin: t.VerticalOrigin.CENTER, horizontalOrigin: t.HorizontalOrigin.LEFT, pixelOffset: new t.Cartesian2(-40, -50), show: !0 } }), i.push(g); } setTimeout(() => { e.value = "", l.destroy(); }); }, t.ScreenSpaceEventType.LEFT_CLICK); } else $g.error("\u8BF7\u8F93\u5165\u6807\u6CE8\u5185\u5BB9"); }, o = () => { let l = new t.ScreenSpaceEventHandler(n.scene.canvas); l.setInputAction((c) => { let f = n.scene.pick(c.position); if (f) { let h = f.id; h.name === "mark" && n.entities.remove(h); } setTimeout(() => { l.destroy(); }); }, t.ScreenSpaceEventType.LEFT_CLICK); }, s = () => { n.entities.values.filter((f) => f.name === "mark").forEach((f) => { n.entities.remove(f); }); }, u = (l) => { if (l.length === 0) { alert("\u5BFC\u51FA\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A\uFF01"); return; } let c = { createTime: new Date().toString(), items: l }, f = "mark.json"; typeof c == "object" && (c = JSON.stringify(c, void 0, 4)); let h = new Blob([c], { type: "text/json" }), p = document.createEvent("MouseEvents"), d = document.createElement("a"); d.download = f, d.href = window.URL.createObjectURL(h), d.dataset.downloadurl = ["text/json", d.download, d.href].join(":"), p.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), d.dispatchEvent(p); }; return (l, c) => { const f = mt("el-input"), h = mt("el-button"); return Re(), St("div", dWe, [ vWe, re(f, { type: "textarea", placeholder: "\u8F93\u5165\u6807\u6CE8\u5185\u5BB9\uFF0C\u70B9\u51FB\u786E\u5B9A\uFF0C\u9F20\u6807\u70B9\u51FB\u5730\u56FE\uFF0C\u751F\u6210\u6807\u6CE8", modelValue: e.value, "onUpdate:modelValue": c[0] || (c[0] = (p) => e.value = p), class: "inp" }, null, 8, ["modelValue"]), he("div", null, [ re(h, { onClick: a }, { default: Ce(() => [ gWe ]), _: 1 }), re(h, { onClick: o, title: "\u70B9\u51FB\u6309\u94AE\u540E\uFF0C\u5728\u5730\u56FE\u4E0A\u70B9\u51FB\u6807\u6CE8\u70B9\uFF0C\u5B8C\u6210\u6E05\u9664" }, { default: Ce(() => [ mWe ]), _: 1 }), re(h, { onClick: s }, { default: Ce(() => [ yWe ]), _: 1 }) ]), he("div", _We, [ re(h, { onClick: c[1] || (c[1] = (p) => u(i)) }, { default: Ce(() => [ wWe ]), _: 1 }), re(h, null, { default: Ce(() => [ xWe ]), _: 1 }) ]) ]); }; } }), SWe = /* @__PURE__ */ zn(CWe, [["__scopeId", "data-v-0e2283a0"]]); const Ny = (r) => (al("data-v-39c4a299"), r = r(), sl(), r), EWe = { class: "addModel-container" }, bWe = { class: "controlBox" }, TWe = { class: "item" }, PWe = /* @__PURE__ */ Ny(() => /* @__PURE__ */ he("span", null, "\u6A21\u578B\u540D\u79F0", -1)), IWe = { class: "item" }, AWe = /* @__PURE__ */ Ny(() => /* @__PURE__ */ he("span", null, "\u6A21\u578B\u89D2\u5EA6(x\u8F74)", -1)), LWe = { class: "item" }, DWe = /* @__PURE__ */ Ny(() => /* @__PURE__ */ he("span", null, "\u6A21\u578B\u89D2\u5EA6(y\u8F74)", -1)), MWe = { class: "item" }, OWe = /* @__PURE__ */ Ny(() => /* @__PURE__ */ he("span", null, "\u6A21\u578B\u89D2\u5EA6(z\u8F74)", -1)), RWe = { class: "item" }, NWe = /* @__PURE__ */ Ny(() => /* @__PURE__ */ he("span", null, "\u6A21\u578B\u5927\u5C0F", -1)), FWe = { class: "item" }, BWe = /* @__PURE__ */ Ny(() => /* @__PURE__ */ he("span", null, "\u6A21\u578B\u9AD8\u5EA6", -1)), kWe = /* @__PURE__ */ de({ __name: "addModel", setup(r) { const e = te(), t = te(), n = _n({ scale: 1, longitude: 0, latitude: 0, height: 0, rx: 0, ry: 0, rz: 0, alpha: 1 }); new ere({ Cesium: window.Cesium, viewer: window.viewer }); let i = Xm(window.Cesium, window.viewer); i.setInputAction((c) => { const f = window.viewer.scene.pick(c.position); if (f && f.id && f.id.name === "test") { let h = window.viewer.scene.pickPosition(c.position); const p = window.Cesium.Cartographic.fromCartesian(h); n.height = p.height, window.viewer.entities.values.filter((v) => v.name === "test").forEach((v) => { v.model.color = window.Cesium.Color.fromCssColorString("#ffffff"); }), f.id.model.color = window.Cesium.Color.fromAlpha(window.Cesium.Color.RED, 1), e.value = f.id, t.value = f.id.name; } }, window.Cesium.ScreenSpaceEventType.LEFT_CLICK), i.setInputAction((c) => { e.value = null, window.viewer.entities.values.filter((h) => h.name === "test").forEach((h) => { h.model.color = window.Cesium.Color.fromCssColorString("#ffffff"); }); }, window.Cesium.ScreenSpaceEventType.RIGHT_CLICK); const a = () => { let c = new window.Cesium.ScreenSpaceEventHandler(window.viewer.scene.canvas); c.setInputAction((f) => { let h = window.viewer.scene.pickPosition(f.position); if (window.Cesium.defined(h)) { const p = window.Cesium.Cartographic.fromCartesian(h); console.log(p); const d = window.Cesium.Math.toDegrees(p.longitude), v = window.Cesium.Math.toDegrees(p.latitude), g = p.height + 0.5; o(d, v, g), setTimeout(() => { c.removeInputAction(window.Cesium.ScreenSpaceEventType.LEFT_CLICK); }); } }, window.Cesium.ScreenSpaceEventType.LEFT_CLICK); }; async function o(c, f, h) { window.viewer.entities.add({ name: "test", position: window.Cesium.Cartesian3.fromDegrees(c, f, h), id: Date.now() + Math.random() + "", model: { uri: "/src/assets/model/Cesium_Air.glb" } }); } const s = () => { e.value.model.scale = n.scale; }, u = () => { let c = e.value.position.getValue(); const f = window.Cesium.Math.toRadians(n.rx), h = window.Cesium.Math.toRadians(n.ry), p = window.Cesium.Math.toRadians(n.rz), d = new window.Cesium.HeadingPitchRoll(f, h, p), v = window.Cesium.Transforms.headingPitchRollQuaternion(c, d); e.value.orientation = v; }, l = () => { let c = e.value.position.getValue(); const f = window.Cesium.Cartographic.fromCartesian(c); f.height = n.height; const h = window.Cesium.Cartesian3.fromRadians( f.longitude, f.latitude, f.height ); e.value.position = h; }; return (c, f) => { const h = mt("el-slider"); return Re(), St("div", EWe, [ he("span", { class: "modelItem", onClick: a }, "\u6D4B\u8BD5\u6A21\u578B(\u98DE\u673A)"), e.value ? (Re(), Nr(gO, { key: 0, to: "#c-container" }, [ he("div", bWe, [ he("div", TWe, [ PWe, ba(he("input", { type: "text", "onUpdate:modelValue": f[0] || (f[0] = (p) => t.value = p) }, null, 512), [ [Ine, t.value] ]) ]), he("div", IWe, [ AWe, re(h, { modelValue: n.ry, "onUpdate:modelValue": f[1] || (f[1] = (p) => n.ry = p), onChange: u, min: -180, max: 180 }, null, 8, ["modelValue"]) ]), he("div", LWe, [ DWe, re(h, { modelValue: n.rz, "onUpdate:modelValue": f[2] || (f[2] = (p) => n.rz = p), onChange: u, min: -180, max: 180 }, null, 8, ["modelValue"]) ]), he("div", MWe, [ OWe, re(h, { modelValue: n.rx, "onUpdate:modelValue": f[3] || (f[3] = (p) => n.rx = p), onChange: u, min: -180, max: 180 }, null, 8, ["modelValue"]) ]), he("div", RWe, [ NWe, re(h, { modelValue: n.scale, "onUpdate:modelValue": f[4] || (f[4] = (p) => n.scale = p), onChange: s, step: 1, max: 10, min: 1 }, null, 8, ["modelValue"]) ]), he("div", FWe, [ BWe, re(h, { modelValue: n.height, "onUpdate:modelValue": f[5] || (f[5] = (p) => n.height = p), onChange: l, step: 1, max: 1e3, min: 1 }, null, 8, ["modelValue"]) ]) ]) ])) : xe("", !0) ]); }; } }), VWe = /* @__PURE__ */ zn(kWe, [["__scopeId", "data-v-39c4a299"]]); const GWe = "under-module__wh___KkJ0j", zWe = "under-module__w___ovRUr", $We = "under-module__h___XIx1s", HWe = "under-module__flex___Lla7R", UWe = "under-module__displayCenter___9DOqx", WWe = "under-module__displayBetween___GIB4E", jWe = "under-module__displayAround___c-A1B", i$ = { wh: GWe, w: zWe, h: $We, flex: HWe, displayCenter: UWe, displayBetween: WWe, displayAround: jWe, "control-base": "under-module__control-base___bHsNn", "underground-container": "under-module__underground-container___rHCsP", delete: "under-module__delete___Bm-6A" }, YWe = de({ setup(r, { emit: e }) { const t = window.Cesium, n = window.viewer, i = te(!1), a = te(0.5); Ve(() => a.value, (u) => { i.value && o(u); }), Ve(() => i.value, (u) => s(u)); function o(u) { const l = n.scene.globe.translucency.frontFaceAlphaByDistance; l.nearValue = u, l.farValue = u; } function s(u) { n.scene.screenSpaceCameraController.enableCollisionDetection = !u, n.scene.globe.translucency.frontFaceAlphaByDistance = new t.NearFarScalar(150, 0.5, 8e6, 1), n.scene.globe.translucency.enabled = u, o(a.value); } return () => re("div", { class: i$["underground-container"] }, [re("span", { class: i$.delete, onClick: () => e("closeUnder") }, [Ne("x")]), re(mt("el-switch"), { modelValue: i.value, "onUpdate:modelValue": (u) => i.value = u, "active-text": "\u5F00\u542F\u5730\u4E0B\u6A21\u5F0F", "inactive-text": "\u5173\u95ED\u5730\u4E0B\u6A21\u5F0F" }, null), re("div", null, [re("span", null, [Ne("\u900F\u660E\u5EA6\uFF1A ")]), re(mt("el-slider"), { modelValue: a.value, "onUpdate:modelValue": (u) => a.value = u, min: 0, max: 1, step: 0.1, disabled: !i.value }, null)])]); } }); const XWe = (r) => (al("data-v-f3307794"), r = r(), sl(), r), qWe = { class: "profile-echarts" }, ZWe = /* @__PURE__ */ XWe(() => /* @__PURE__ */ he("div", { id: "profile-echarts" }, null, -1)), KWe = /* @__PURE__ */ de({ __name: "profileEcharts", props: { profileData: null }, emits: ["closeChart"], setup(r, { emit: e }) { const t = r; let n, i; const a = () => { let s = [], u = []; const l = t.profileData, c = l[l.length - 1].distance; let f = Math.ceil(c); l.forEach((v) => { const g = [v.distance.toFixed(2), v.position.height.toFixed(2)]; s.push(g); const m = [v.position.lon, v.position.lat]; u.push(m); }); const h = { show: !0, pixelSize: 10, color: window.Cesium.Color.GREEN, outlineColor: window.Cesium.Color.SKYBLUE, outlineWidth: 3 }, p = document.getElementById("profile-echarts"); i = YK(p); let d = { title: { text: "\u5256\u9762\u5206\u6790\u7ED3\u679C" }, tooltip: { show: !0, trigger: "axis", formatter(v) { const g = u[v[0].dataIndex], m = v[0].data; return n ? n.position = window.Cesium.Cartesian3.fromDegrees( g[0], g[1], Number(m[1]) ) : n = window.viewer.entities.add({ position: window.Cesium.Cartesian3.fromDegrees(g[0], g[1], Number(m[1])), point: h }), "\u8DDD\u79BB\uFF1A" + m[0] + "m
\u9AD8\u5EA6\uFF1A" + m[1] + "m
\u5750\u6807\uFF1A" + g[0].toFixed(5) + "\uFF0C" + g[1].toFixed(5); } }, grid: { x: 40, x2: 40, y2: 24 }, calculable: !0, xAxis: [ { type: "value", max: f, scale: !0 } ], yAxis: [ { type: "value", scale: !0 } ], series: [ { name: "ProfileLine", type: "line", data: s, smooth: !0, itemStyle: { color: "#39FDA1" }, lineStyle: { width: 3, color: { type: "linear", x: 0, y: 0, x2: 1, y2: 0, colorStops: [ { offset: 0, color: "rgba(85,254,139,1)" }, { offset: 0.5, color: "rgba(7,252,202,1)" }, { offset: 1, color: "rgba(14,245,210,1)" } ], globalCoord: !1 } }, areaStyle: { color: new xy( 0, 0, 0, 1, [ { offset: 0, color: "rgba(102,153,255,1)" }, { offset: 0.8, color: "rgba(102,153,255,0.08)" }, { offset: 1, color: "rgba(9,173,208,0.15)" } ], !1 ), shadowColor: "rgba(14,245,210,1)", shadowBlur: 20 }, markPoint: { data: [ { type: "max", name: "\u6700\u9AD8\u70B9" }, { type: "min", name: "\u6700\u4F4E\u70B9" } ] } } ] }; i.setOption(d); }; Ve( () => t.profileData, () => { var s; (s = document.getElementById("profile-echarts")) == null || s.removeAttribute("_echarts_instance_"), a(); } ); const o = () => { n && (window.viewer.entities.remove(n), n = void 0), window.profileEntities.forEach((s) => { window.viewer.entities.remove(s); }), window.profileEntities = [], e("closeChart"); }; return hf(() => { a(), window.addEventListener("resize", () => { i == null || i.resize(); }); }), (s, u) => (Re(), St("div", qWe, [ ZWe, he("i", { class: "echarts-close", onClick: o }, "x") ])); } }), JWe = /* @__PURE__ */ zn(KWe, [["__scopeId", "data-v-f3307794"]]), ab = (r, e, t, n = "wuhu") => { let i = document.getElementById(n), a, o = 0, s = 0, u = "", l = ""; if (typeof r == "object" ? (a = r, l = r.showHTML) : (a = null, l = r), a != null && a.origin) switch (a.origin) { case "center": o = 15, s = -12; break; case "top": o = 15, s = 20; break; case "bottom": o = 15, s = 20; break; default: a.origin; break; } else o = 15, s = 20; if (a != null && a.color) switch (a.color) { case "white": u = "background: rgba(255, 255, 255, 0.8);color: black;"; break; case "yellow": u = "color: black;background-color: #ffcc33;border: 1px solid white;"; break; case "black": u = "background: rgba(0, 0, 0, 0.5);color: white;"; break; default: a.color; break; } else u = "background: rgba(0, 0, 0, 0.5);color: white;"; if (!i) { const c = document.getElementsByClassName("cesium-viewer")[0]; let f = document.createElement("div"); c.append(f); let h = ''; c.insertAdjacentHTML("beforeend", h), i = document.getElementById(n); } t ? (i.innerHTML = l, i.style.left = e.x + o + "px", i.style.top = e.y + s + "px", i.style.display = "block") : i.style.display = "none"; }, QWe = (r, e, t, n, i) => { var h, p, d; let a = (h = n.id) != null ? h : eje(); if (e.entities.getById(a)) throw new Error("id\u5DF2\u5B58\u5728,\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5"); let o = (p = n.color) != null ? p : r.Color.RED, s = (d = n.width) != null ? d : 2; const u = Xm(r, e); let l = "\u5DE6\u952E\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236", c = [], f; u.setInputAction((v) => { l = "\u5DE6\u952E\u6DFB\u52A0\u70B9,\u53F3\u952E\u7ED3\u675F\u7ED8\u5236"; let g = v.position, m = a$(r, e, g); c.length == 0 && (c.push(m), f = e.entities.add({ name: "polyline", id: a, polyline: { positions: new r.CallbackProperty(() => c, !1), width: s, material: o } }), f.GeoType = "polyline"), c.push(m); }, r.ScreenSpaceEventType.LEFT_CLICK), u.setInputAction((v) => { let g = v.endPosition; if (ab(l, g, !0, "nice"), r.defined(f)) { c.pop(); let m = a$(r, e, g); c.push(m); } }, r.ScreenSpaceEventType.MOUSE_MOVE), u.setInputAction((v) => { c.pop(), f.pottingPoint = c, t.push(f), u.destroy(), ab(l, v.position, !1, "nice"), i && i(f); }, r.ScreenSpaceEventType.RIGHT_CLICK); }; function eje(r = 32) { let e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgHIJKLMNOPQRSTUVWHYZ1234567890", t = e.length, n = ""; for (let i = 0; i < r; i++) n += e.charAt(Math.floor(Math.random() * t)); return n; } function a$(r, e, t) { let n = e.scene.drillPick(t), i = null, a = !1, o = !1; for (let u in n) { let l = n[u]; if ((l && l.primitive instanceof r.Cesium3DTileset || l && l.primitive instanceof r.Cesium3DTileFeature || l && l.primitive instanceof r.Model) && (a = !0), a && (e.scene.pick(t), i = e.scene.pickPosition(t), i)) { let c = r.Cartographic.fromCartesian(i); if (c.height < 0) { c.height = 0; let f = r.Math.toDegrees(c.longitude), h = r.Math.toDegrees(c.latitude), p = c.height; i = o$(r, { lon: f, lat: h, alt: p }); } } } let s = e.terrainProvider instanceof r.EllipsoidTerrainProvider; if (!a && s) { let u = e.camera.getPickRay(t); u && (i = e.scene.globe.pick(u, e.scene), o = !0); } if (!a && !o && s && (i = e.scene.camera.pickEllipsoid(t, e.scene.globe.ellipsoid)), i) { let u = tje(r, i); return u.alt < 0 && (i = o$(r, u, 0.1)), i; } } function o$(r, e, t) { const n = t || e.alt; return e ? r.Cartesian3.fromDegrees(e.lon, e.lat, n, r.Ellipsoid.WGS84) : r.Cartesian3.ZERO; } function tje(r, e) { let n = r.Ellipsoid.WGS84.cartesianToCartographic(e); return { lon: r.Math.toDegrees(n.longitude), lat: r.Math.toDegrees(n.latitude), alt: n.height }; } const rje = (r, e, t) => { window.profileEntities && window.profileEntities.length > 0 && window.profileEntities.forEach((n) => { e.entities.remove(n); }), window.profileEntities = [], QWe( r, e, window.profileEntities, { color: r.Color.RED, width: 2 }, (n) => { n.polyline.clampToGround = !0; let i = nje(r, e, n.pottingPoint, [n]); t(i); } ); }; function nje(r, e, t, n) { let i = [], a = []; for (let u = 0; u < t.length; u++) { const l = t[u]; let f = e.scene.globe.ellipsoid.cartesianToCartographic(l); i.push(f); } for (let u = 0; u < i.length; u++) { const l = i[u], c = i[u + 1]; if (c) { let f = Math.abs(l.longitude - c.longitude) * 1e6, h = Math.abs(l.latitude - c.latitude) * 1e6; f > h && (h = f); let p = parseInt(`${h}/2`); p > 1e3 && (p = 1e3), p < 2 && (p = 2); for (let d = 0; d < p; d++) a.push( new r.Cartographic( r.Math.lerp( l.longitude, c.longitude, d / (p - 1) ), r.Math.lerp(l.latitude, c.latitude, d / (p - 1)) ) ); a.pop(); } else a.push(l); } let o = [], s = 0; for (let u = 0; u < a.length; u++) { let l = a[u], c = e.scene.sampleHeight(l, n); const f = l.longitude / Math.PI * 180, h = l.latitude / Math.PI * 180; let p = r.Cartesian3.fromDegrees(f, h, c), d = a[u - 1]; if (d) { const v = d.longitude / Math.PI * 180, g = d.latitude / Math.PI * 180; let m = r.Cartesian3.fromDegrees(v, g, c); s += r.Cartesian3.distance(m, p); } o.push({ position: { lon: f, lat: h, height: c }, distance: s }); } return o; } const ije = { class: "profileAnalysis-container" }, aje = /* @__PURE__ */ Ne("\u5F00\u59CB\u5206\u6790"), oje = /* @__PURE__ */ de({ __name: "profileAnalysis", emits: ["closeProfileAnalysis"], setup(r, { emit: e }) { const t = te(!1), n = te([]), i = () => { rje(window.Cesium, window.viewer, (o) => { n.value = o, t.value = !0; }); }, a = () => { e("closeProfileAnalysis"); }; return (o, s) => { const u = mt("el-button"); return Re(), St(yh, null, [ he("div", ije, [ re(u, { onClick: i }, { default: Ce(() => [ aje ]), _: 1 }), he("span", { class: "delete", onClick: a }, "x") ]), (Re(), Nr(gO, { to: "#c-container" }, [ t.value ? (Re(), Nr(JWe, { key: 0, profileData: n.value, onCloseChart: s[0] || (s[0] = (l) => t.value = !1) }, null, 8, ["profileData"])) : xe("", !0) ])) ], 64); }; } }), sje = /* @__PURE__ */ zn(oje, [["__scopeId", "data-v-60d2b362"]]), Fs = (r, e) => { r.value = !1, e.value = ""; }, uje = "Wed Aug 10 2022 14:22:36 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)", lje = [ { id: "ClassifyObject-e00ab31a-f8ab-8b1a-89b2fb88", coordinates: [ 105.48215, 29.50842, 105.48215, 29.50842, 105.48219, 29.50842, 105.48219, 29.50842, 105.48218, 29.50847, 105.48218, 29.50847, 105.48213, 29.50847, 105.48213, 29.50847, 105.48214, 29.50842, 105.48214, 29.50842 ], vertexHeights: [ 428.7, 425.64, 425.59, 428.82 ], description: "\u6237\u4E3B:\u5F20\u4E09,\u6237\u4E3B\u7535\u8BDD:13888888888,\u6237\u4E3B\u8EAB\u4EFD\u8BC1\u53F7:511321199001010001,\u6237\u4E3B\u5730\u5740:xx\u5E02xx\u533Axx\u88571\u53F7" }, { id: "ClassifyObject-9918a386-4f99-b835-ba866998", coordinates: [ 105.48329, 29.50905, 105.4833, 29.50913, 105.48328, 29.50912, 105.48322, 29.50912, 105.48323, 29.50905 ], vertexHeights: [ 467.66, 464.8, 464.86, 467.86 ], description: "\u6237\u4E3B:\u674E\u56DB,\u6237\u4E3B\u7535\u8BDD:13999999999,\u6237\u4E3B\u8EAB\u4EFD\u8BC1\u53F7:511321199001010002,\u6237\u4E3B\u5730\u5740:xx\u5E02xx\u533Axx\u88572\u53F7" }, { id: "ClassifyObject-f14abfea-af99-9b0e-8baae888", coordinates: [ 105.48271, 29.50852, 105.48271, 29.50847, 105.48285, 29.50847, 105.48284, 29.50849, 105.48283, 29.50856, 105.48271, 29.50854 ], vertexHeights: [ 432.61, 429.71, 429.86, 432.94 ], description: "\u6237\u4E3B\uFF1A\u5218\u8C0B" } ], cje = { createTime: uje, items: lje }; class fje { constructor(e, t, n) { Ir(this, "Cesium"); Ir(this, "Viewer"); Ir(this, "handler"); Ir(this, "selected"); Ir(this, "primitive"); Ir(this, "color"); Ir(this, "show"); Ir(this, "attribute", { color: void 0, show: void 0 }); Ir(this, "pickSelected"); Ir(this, "pickPrimitive"); Ir(this, "pickColor"); Ir(this, "pickShow"); Ir(this, "pickAttribute", { color: void 0, show: void 0 }); Ir(this, "ldCollection"); Ir(this, "json"); Ir(this, "classify", () => { this.ldCollection = new this.Cesium.PrimitiveCollection(), this.Viewer.scene.primitives.add(this.ldCollection), this.json.items.map((e) => { var t; for (let n = 0; n < e.vertexHeights.length; n++) { const i = e.vertexHeights[n + 1]; if (i) { const a = e.vertexHeights[n]; let o = this.addPrimitive(e, a, i, n); (t = this.ldCollection) == null || t.add(o); } } }); }); Ir(this, "addPrimitive", (e, t, n, i) => { let a = new this.Cesium.ClassificationPrimitive({ geometryInstances: new this.Cesium.GeometryInstance({ geometry: new this.Cesium.PolygonGeometry({ polygonHierarchy: new this.Cesium.PolygonHierarchy( this.Cesium.Cartesian3.fromDegreesArray(e.coordinates) ), height: t, extrudedHeight: n, vertexFormat: this.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT }), attributes: { color: this.Cesium.ColorGeometryInstanceAttribute.fromColor( new this.Cesium.Color(1, 1, 1, 1e-4) ), show: new this.Cesium.ShowGeometryInstanceAttribute(!0) }, id: e.id + "-" + i }), classificationType: this.Cesium.ClassificationType.BOTH }); return a.description = e.description, a; }); Ir(this, "on", () => { this.handler && this.handler.destroy(), this.handler = new this.Cesium.ScreenSpaceEventHandler(this.Viewer.scene.canvas), this.handler.setInputAction((e) => { var n, i, a; let t = this.Viewer.scene.pick(e.endPosition); if ((n = t == null ? void 0 : t.primitive) != null && n.description ? ab( { showHTML: t.primitive.description, color: "yellow", origin: "center" }, e.endPosition, !0 ) : ab( { showHTML: t.primitive.description, color: "yellow", origin: "center" }, e.endPosition, !1 ), this.Cesium.defined(t) && this.Cesium.defined(t.id)) { if (this.selected === t.id || t.id === this.pickSelected) return; this.Cesium.defined(this.selected) && (this.attribute = (i = this.primitive) == null ? void 0 : i.getGeometryInstanceAttributes(this.selected), this.attribute.color = this.color, this.attribute.show = this.show, this.selected = void 0, this.primitive = void 0, this.color = void 0, this.show = void 0), this.Cesium.defined(t.primitive) && this.Cesium.defined(t.primitive.getGeometryInstanceAttributes) && (this.selected = t.id, this.primitive = t.primitive, this.attribute = this.primitive.getGeometryInstanceAttributes(this.selected), this.color = this.attribute.color, this.show = this.attribute.show, this.Viewer.scene.invertClassification = !0, this.attribute.color = [255, 0, 255, 128], this.attribute.show = [1]); } else this.Cesium.defined(this.selected) && (this.attribute = (a = this.primitive) == null ? void 0 : a.getGeometryInstanceAttributes(this.selected), this.attribute.color = this.color, this.attribute.show = this.show, this.selected = void 0, this.primitive = void 0, this.color = void 0, this.show = void 0); }, this.Cesium.ScreenSpaceEventType.MOUSE_MOVE), this.handler.setInputAction((e) => { var n, i, a, o, s; let t = this.Viewer.scene.pick(e.position); (n = t == null ? void 0 : t.primitive) != null && n.description && alert(t.primitive.description), this.Cesium.defined(this.selected) && (this.attribute = (i = this.primitive) == null ? void 0 : i.getGeometryInstanceAttributes(this.selected), this.attribute.color = this.color, this.attribute.show = this.show, this.selected = void 0, this.primitive = void 0, this.color = void 0, this.show = void 0), this.Cesium.defined(t) && this.Cesium.defined(t.id) ? (this.Cesium.defined(this.pickSelected) && (this.pickAttribute = (a = this.pickPrimitive) == null ? void 0 : a.getGeometryInstanceAttributes(this.pickSelected), this.pickAttribute.color = this.pickColor, this.pickAttribute.show = this.pickShow, this.pickPrimitive = void 0, this.pickSelected = void 0, this.pickColor = void 0, this.pickShow = void 0), this.Cesium.defined(t.primitive) && this.Cesium.defined(t.primitive.getGeometryInstanceAttributes) && (this.pickSelected = t.id, this.pickPrimitive = t.primitive, this.pickAttribute = (o = this.pickPrimitive) == null ? void 0 : o.getGeometryInstanceAttributes(this.pickSelected), this.pickColor = this.pickAttribute.color, this.pickShow = this.pickAttribute.show, this.Viewer.scene.invertClassification = !0, this.pickAttribute.color = [255, 0, 0, 128], this.pickAttribute.show = [1])) : this.Cesium.defined(this.pickSelected) && (this.pickAttribute = (s = this.pickPrimitive) == null ? void 0 : s.getGeometryInstanceAttributes(this.pickSelected), this.pickAttribute.color = this.pickColor, this.pickAttribute.show = this.pickShow, this.pickPrimitive = void 0, this.pickSelected = void 0, this.pickColor = void 0, this.pickShow = void 0); }, this.Cesium.ScreenSpaceEventType.LEFT_CLICK); }); Ir(this, "off", () => { var e; this.handler && this.handler.destroy(), this.handler = void 0, this.Cesium.defined(this.pickSelected) && (this.pickAttribute = (e = this.pickPrimitive) == null ? void 0 : e.getGeometryInstanceAttributes(this.pickSelected), this.pickAttribute.color = this.pickColor, this.pickAttribute.show = this.pickShow, this.pickSelected = void 0, this.pickPrimitive = void 0, this.pickColor = void 0, this.pickShow = void 0); }); this.Cesium = e, this.Viewer = t, this.json = n; } } const mP = (r) => (al("data-v-dbf4c06a"), r = r(), sl(), r), hje = { class: "c-control" }, pje = /* @__PURE__ */ mP(() => /* @__PURE__ */ he("span", { class: "item" }, " \u5206\u6790\u5DE5\u5177 ", -1)), dje = /* @__PURE__ */ Ne("\u6316\u586B\u65B9\u5206\u6790"), vje = /* @__PURE__ */ Ne("\u6DF9\u6CA1\u5206\u6790"), gje = /* @__PURE__ */ Ne("\u89C6\u91CE\u5206\u6790"), mje = /* @__PURE__ */ Ne("\u5761\u5EA6\u5206\u6790"), yje = /* @__PURE__ */ Ne("\u5256\u9762\u5206\u6790"), _je = /* @__PURE__ */ mP(() => /* @__PURE__ */ he("span", { class: "item" }, " \u8C03\u6574\u5DE5\u5177 ", -1)), wje = /* @__PURE__ */ Ne("3d\u5EFA\u7B51\u8C03\u6574"), xje = /* @__PURE__ */ Ne("\u6D4B\u91CF\u5DE5\u5177"), Cje = /* @__PURE__ */ Ne("\u8DEF\u7EBF\u6F2B\u6E38"), Sje = /* @__PURE__ */ mP(() => /* @__PURE__ */ he("span", { class: "item" }, " \u89C6\u56FE\u5207\u6362 ", -1)), Eje = /* @__PURE__ */ Ne("\u54E5\u4F26\u5E03\u89C6\u56FE(2.5d)"), bje = /* @__PURE__ */ Ne("\u4E8C\u7EF4\u6A21\u5F0F"), Tje = /* @__PURE__ */ Ne("\u4E09\u7EF4\u6A21\u5F0F"), Pje = /* @__PURE__ */ Ne("\u5730\u4E0B\u6A21\u5F0F"), Ije = /* @__PURE__ */ Ne("\u5929\u6C14\u6A21\u62DF"), Aje = /* @__PURE__ */ Ne("\u6E05\u6670\u5EA6\u8C03\u6574"), Lje = /* @__PURE__ */ mP(() => /* @__PURE__ */ he("span", { class: "item" }, "\u91C7\u96C6\u5DE5\u5177", -1)), Dje = /* @__PURE__ */ Ne(" \u6574\u680B\u91C7\u96C6 "), Mje = /* @__PURE__ */ Ne(" \u5206\u5C42\u5206\u6237\u91C7\u96C6 "), Oje = /* @__PURE__ */ Ne("\u6807\u6CE8\u5DE5\u5177"), Rje = /* @__PURE__ */ Ne("\u6DFB\u52A0\u6A21\u578B"), Nje = { class: "classify-status" }, Fje = /* @__PURE__ */ Ne(" \u5EFA\u7B51\u4EA4\u4E92 "), Bje = /* @__PURE__ */ de({ __name: "my-control", props: { tileModelTool: { type: Object, required: !0 } }, emits: ["tileEvt"], setup(r, { emit: e }) { const t = r, n = te(!1), i = te(!1), a = te(!1), o = te(!1), s = te(!1), u = te(!1), l = te(!1), c = te(!1), f = te(!1), h = te(!1), p = te(!1), d = te(!1), v = te(!1), g = te(!1), m = te(!1), y = te(!1), _ = [ n, i, a, o, s, u, l, f, h, p, d, v, g, m, y ], w = new fje(window.Cesium, window.viewer, cje); w.classify(), Ve( () => c.value, (G) => { G ? w.on() : w.off(); } ); const x = te(""), C = (G) => { switch (x.value = G, G) { case "1-1": Jn(_, n); break; case "1-2": Jn(_, u); break; case "1-3": Jn(_, f); break; case "1-4": Jn(_, d); break; case "1-5": Jn(_, y); break; case "2-1": Jn(_, o); break; case "3": Jn(_, i); break; case "4": Jn(_, a); break; case "5-1": Jn(_), window.viewer.scene.mode = window.Cesium.SceneMode.COLUMBUS_VIEW; break; case "5-2": Jn(_), window.viewer.scene.mode = window.Cesium.SceneMode.SCENE2D; break; case "5-3": Jn(_), window.viewer.scene.mode = window.Cesium.SceneMode.SCENE3D; break; case "5-4": Jn(_, m); break; case "6": Jn(_, s); break; case "7": Jn(_, p); break; case "8-1": Jn(_, l); break; case "8-2": Jn(_, h); break; case "9": Jn(_, v); break; case "10": Jn(_, g); break; } }, S = () => { Fs(n, x); }, b = () => { Fs(o, x); }, E = () => { Fs(i, x); }, T = () => { Fs(a, x); }, P = () => { Fs(s, x); }, I = () => { Fs(l, x); }, A = () => { Fs(f, x); }, L = () => { Fs(d, x); }, D = () => { Fs(p, x); }, O = () => { Fs(y, x); }, N = () => { Fs(u, x); }, F = () => { Fs(m, x); }, k = (G) => { e("tileEvt", G); }; return (G, U) => { const B = mt("el-menu-item"), X = mt("el-sub-menu"), j = mt("el-switch"), ae = mt("el-menu"); return Re(), St("div", hje, [ re(ae, { mode: "horizontal", "background-color": "transparent", "default-active": x.value, onSelect: C, ellipsis: !1 }, { default: Ce(() => [ re(X, { "popper-append-to-body": !1, index: "1", class: "item" }, { title: Ce(() => [ pje ]), default: Ce(() => [ re(B, { index: "1-1" }, { default: Ce(() => [ dje ]), _: 1 }), re(B, { index: "1-2" }, { default: Ce(() => [ vje ]), _: 1 }), re(B, { index: "1-3" }, { default: Ce(() => [ gje ]), _: 1 }), re(B, { index: "1-4" }, { default: Ce(() => [ mje ]), _: 1 }), re(B, { index: "1-5" }, { default: Ce(() => [ yje ]), _: 1 }) ]), _: 1 }), re(X, { index: "2", "popper-append-to-body": !1 }, { title: Ce(() => [ _je ]), default: Ce(() => [ re(B, { index: "2-1" }, { default: Ce(() => [ wje ]), _: 1 }) ]), _: 1 }), re(B, { index: "3", class: "item" }, { default: Ce(() => [ xje ]), _: 1 }), re(B, { index: "4", class: "item" }, { default: Ce(() => [ Cje ]), _: 1 }), re(X, { "popper-append-to-body": !1, index: "5" }, { title: Ce(() => [ Sje ]), default: Ce(() => [ re(B, { index: "5-1" }, { default: Ce(() => [ Eje ]), _: 1 }), re(B, { index: "5-2" }, { default: Ce(() => [ bje ]), _: 1 }), re(B, { index: "5-3" }, { default: Ce(() => [ Tje ]), _: 1 }), re(B, { index: "5-4" }, { default: Ce(() => [ Pje ]), _: 1 }) ]), _: 1 }), re(B, { index: "6", class: "item" }, { default: Ce(() => [ Ije ]), _: 1 }), re(B, { index: "7", class: "item", title: "\u964D\u4F4E\u753B\u8D28\u8868\u73B0\u53EF\u63D0\u9AD8\u6D41\u7545\u5EA6" }, { default: Ce(() => [ Aje ]), _: 1 }), re(X, { index: "8" }, { title: Ce(() => [ Lje ]), default: Ce(() => [ re(B, { index: "8-1" }, { default: Ce(() => [ Dje ]), _: 1 }), re(B, { index: "8-2" }, { default: Ce(() => [ Mje ]), _: 1 }) ]), _: 1 }), re(B, { index: "9", class: "item" }, { default: Ce(() => [ Oje ]), _: 1 }), re(B, { index: "10", class: "item" }, { default: Ce(() => [ Rje ]), _: 1 }), he("div", Nje, [ Fje, re(j, { modelValue: c.value, "onUpdate:modelValue": U[0] || (U[0] = (se) => c.value = se), "active-color": "#13ce66", "inactive-color": "#ff4949" }, null, 8, ["modelValue"]) ]) ]), _: 1 }, 8, ["default-active"]), re(_i, { name: "rl" }, { default: Ce(() => [ n.value ? (Re(), Nr(Ue(tie), { key: 0, onCloseCut: S })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ i.value ? (Re(), Nr(Ue(Hhe), { key: 0, onCloseMeasure: E })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ a.value ? (Re(), Nr(Ue(ope), { key: 0, onCloseTrack: T })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ o.value ? (Re(), Nr(Ue(mpe), { key: 0, onCloseTile: b, modelValue: t.tileModelTool, "onUpdate:modelValue": k }, null, 8, ["modelValue"])) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ s.value ? (Re(), Nr(Ue(lxe), { key: 0, onCloseWeather: P })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ u.value ? (Re(), Nr(Ue(Sxe), { key: 0, onCloseFlood: N })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ l.value ? (Re(), Nr(Ue(UUe), { key: 0, onCloseCollect: I })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ f.value ? (Re(), Nr(Ue(FUe), { key: 0, onClosePs: A })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ h.value ? (Re(), Nr(Ue(tWe), { key: 0 })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ p.value ? (Re(), Nr(Ue(iWe), { key: 0, onCloseRs: D })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ d.value ? (Re(), Nr(Ue(hWe), { key: 0, onCloseSlopeAspect: L })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ v.value ? (Re(), Nr(Ue(SWe), { key: 0 })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ g.value ? (Re(), Nr(Ue(VWe), { key: 0 })) : xe("", !0) ]), _: 1 }), re(_i, { namr: "rl" }, { default: Ce(() => [ m.value ? (Re(), Nr(Ue(YWe), { key: 0, onCloseUnder: F })) : xe("", !0) ]), _: 1 }), re(_i, { name: "rl" }, { default: Ce(() => [ y.value ? (Re(), Nr(Ue(sje), { key: 0, onCloseProfileAnalysis: O })) : xe("", !0) ]), _: 1 }) ]); }; } }), kje = /* @__PURE__ */ zn(Bje, [["__scopeId", "data-v-dbf4c06a"]]); const Vje = { class: "c-container", id: "c-container" }, Gje = /* @__PURE__ */ de({ __name: "cs", props: { tileUrl: null, terrainUrl: null }, setup(r, { expose: e }) { const t = r, n = te(!1); let i; const a = te(), o = te([ [0, 0], [0, 1], [0, 2], [0, 3] ]), s = _n({ minHeight: 0, maxHeight: 0, speed: 0 }); Sg.on("floodObj", (m) => { for (let y in m) s[y] = m[y]; }), Sg.on("area", (m) => { o.value = m; }), hf(() => { window.flood = a.value; }), xa(() => { Sg.off("floodObj"), Sg.off("area"); }); const u = te(!1), l = _n({ scale: 1, longitude: 0, latitude: 0, height: 0, rx: 0, ry: 0, rz: 0, alpha: 1 }), c = (m) => { for (let y in m) l[y] = m[y]; f(); }, f = () => { let m = window.Cesium.Matrix3.fromRotationX(window.Cesium.Math.toRadians(l.rx)), y = window.Cesium.Matrix3.fromRotationY(window.Cesium.Math.toRadians(l.ry)), _ = window.Cesium.Matrix3.fromRotationZ(window.Cesium.Math.toRadians(l.rz)), w = window.Cesium.Matrix4.fromRotationTranslation(m), x = window.Cesium.Matrix4.fromRotationTranslation(y), C = window.Cesium.Matrix4.fromRotationTranslation(_), S = window.Cesium.Cartesian3.fromDegrees( l.longitude, l.latitude, l.height ), b = window.Cesium.Transforms.eastNorthUpToFixedFrame(S); window.Cesium.Matrix4.multiply(b, w, b), window.Cesium.Matrix4.multiply(b, x, b), window.Cesium.Matrix4.multiply(b, C, b); let E = window.Cesium.Matrix4.fromUniformScale(l.scale); window.Cesium.Matrix4.multiply(b, E, b), i._root.transform = b, window.viewer.scene.globe.translucency.frontFaceAlphaByDistance.nearValue = window.Cesium.Math.clamp(l.alpha, 0, 1); }, h = () => { Xm(window.Cesium, window.viewer).setInputAction((y) => { const { height: _ } = nH(y, window.Cesium, window.viewer); _ && (window.cutHeight = _, console.log(window.cutHeight)); }, window.Cesium.ScreenSpaceEventType.LEFT_CLICK); }, p = (m, y) => { m.readyPromise.then((_) => { u.value = !0, i = _; const w = y.scene, x = w.globe; w.screenSpaceCameraController.enableCollisionDetection = !0, x.translucency.frontFaceAlphaByDistance = new window.Cesium.NearFarScalar( 1e3, 0, 2e3, 1 ), x.translucency.enabled = !0, w.globe.depthTestAgainstTerrain = !0, y.zoomTo(_); let C = _.boundingSphere, S = window.Cesium.Cartographic.fromCartesian(C.center); l.longitude = S.longitude / Math.PI * 180, l.latitude = S.latitude / Math.PI * 180, l.height = 438, f(); }); }, d = ({ Cesium: m, viewer: y }) => { y.cesiumWidget.screenSpaceEventHandler.removeInputAction( m.ScreenSpaceEventType.LEFT_DOUBLE_CLICK ), y.resolutionScale = 1, y.targetFrameRate = 60, y.scene.sun.show = !1, y.scene.moon.show = !1, y.scene.skyBox.show = !1, window.Cesium = m, window.viewer = y, y._cesiumWidget._creditContainer.style.display = "none", y.scene.screenSpaceCameraController.minimumZoomDistance = 10, y.scene.screenSpaceCameraController.maximumZoomDistance = 7e6, oi(() => { h(), n.value = !0; }); }; function v() { return Fne(window.Cesium, window.viewer); } return e({ getCenterPosition: v, setCsCenter: (m) => { Bne(m, window.Cesium, window.viewer); } }), (m, y) => { const _ = mt("vc-analysis-flood"), w = mt("vc-imagery-provider-arcgis"), x = mt("vc-layer-imagery"), C = mt("vc-navigation"), S = mt("vc-terrain-provider-cesium"), b = mt("vc-primitive-tileset"), E = mt("vc-viewer"); return Re(), St("div", Vje, [ ba(re(E, { ref: "vcViewer", onReady: d, "fullscreen-button": !0, infoBox: !1, timeline: !0, animation: !0, shouldAnimate: "" }, { default: Ce(() => [ n.value ? (Re(), Nr(kje, { key: 0, class: "my-control", tileModelTool: l, onTileEvt: c }, null, 8, ["tileModelTool"])) : xe("", !0), re(_, { ref_key: "flood", ref: a, "min-height": s.minHeight, "max-height": s.maxHeight, speed: s.speed, "polygon-hierarchy": o.value }, null, 8, ["min-height", "max-height", "speed", "polygon-hierarchy"]), re(x, null, { default: Ce(() => [ re(w) ]), _: 1 }), re(C, { compassOpts: !1, zoomOpts: !1, printOpts: !1, locationOpts: !1 }), re(S, { url: t.terrainUrl }, null, 8, ["url"]), re(b, { url: t.tileUrl, onReadyPromise: p }, null, 8, ["url"]) ]), _: 1 }, 512), [ [lo, n.value] ]), n.value === !1 ? (Re(), Nr(Nne, { key: 0 })) : xe("", !0) ]); }; } }), zje = /* @__PURE__ */ zn(Gje, [["__scopeId", "data-v-7681b847"]]); var Fy = { RADIANS: "radians", DEGREES: "degrees", FEET: "ft", METERS: "m", PIXELS: "pixels", TILE_PIXELS: "tile-pixels", USFEET: "us-ft" }, cf = {}; cf[Fy.RADIANS] = 6370997 / (2 * Math.PI); cf[Fy.DEGREES] = 2 * Math.PI * 6370997 / 360; cf[Fy.FEET] = 0.3048; cf[Fy.METERS] = 1; cf[Fy.USFEET] = 1200 / 3937; const ud = Fy; var $je = function() { function r(e) { this.code_ = e.code, this.units_ = e.units, this.extent_ = e.extent !== void 0 ? e.extent : null, this.worldExtent_ = e.worldExtent !== void 0 ? e.worldExtent : null, this.axisOrientation_ = e.axisOrientation !== void 0 ? e.axisOrientation : "enu", this.global_ = e.global !== void 0 ? e.global : !1, this.canWrapX_ = !!(this.global_ && this.extent_), this.getPointResolutionFunc_ = e.getPointResolution, this.defaultTileGrid_ = null, this.metersPerUnit_ = e.metersPerUnit; } return r.prototype.canWrapX = function() { return this.canWrapX_; }, r.prototype.getCode = function() { return this.code_; }, r.prototype.getExtent = function() { return this.extent_; }, r.prototype.getUnits = function() { return this.units_; }, r.prototype.getMetersPerUnit = function() { return this.metersPerUnit_ || cf[this.units_]; }, r.prototype.getWorldExtent = function() { return this.worldExtent_; }, r.prototype.getAxisOrientation = function() { return this.axisOrientation_; }, r.prototype.isGlobal = function() { return this.global_; }, r.prototype.setGlobal = function(e) { this.global_ = e, this.canWrapX_ = !!(e && this.extent_); }, r.prototype.getDefaultTileGrid = function() { return this.defaultTileGrid_; }, r.prototype.setDefaultTileGrid = function(e) { this.defaultTileGrid_ = e; }, r.prototype.setExtent = function(e) { this.extent_ = e, this.canWrapX_ = !!(this.global_ && e); }, r.prototype.setWorldExtent = function(e) { this.worldExtent_ = e; }, r.prototype.setGetPointResolution = function(e) { this.getPointResolutionFunc_ = e; }, r.prototype.getPointResolutionFunc = function() { return this.getPointResolutionFunc_; }, r; }(); const tre = $je; function Di(r, e, t) { return Math.min(Math.max(r, e), t); } var Hje = function() { var r; return "cosh" in Math ? r = Math.cosh : r = function(e) { var t = Math.exp(e); return (t + 1 / t) / 2; }, r; }(), Uje = function() { var r; return "log2" in Math ? r = Math.log2 : r = function(e) { return Math.log(e) * Math.LOG2E; }, r; }(); function Wje(r, e, t, n, i, a) { var o = i - t, s = a - n; if (o !== 0 || s !== 0) { var u = ((r - t) * o + (e - n) * s) / (o * o + s * s); u > 1 ? (t = i, n = a) : u > 0 && (t += o * u, n += s * u); } return ld(r, e, t, n); } function ld(r, e, t, n) { var i = t - r, a = n - e; return i * i + a * a; } function jje(r) { for (var e = r.length, t = 0; t < e; t++) { for (var n = t, i = Math.abs(r[t][t]), a = t + 1; a < e; a++) { var o = Math.abs(r[a][t]); o > i && (i = o, n = a); } if (i === 0) return null; var s = r[n]; r[n] = r[t], r[t] = s; for (var u = t + 1; u < e; u++) for (var l = -r[u][t] / r[t][t], c = t; c < e + 1; c++) t == c ? r[u][c] = 0 : r[u][c] += l * r[t][c]; } for (var f = new Array(e), h = e - 1; h >= 0; h--) { f[h] = r[h][e] / r[h][h]; for (var p = h - 1; p >= 0; p--) r[p][e] -= r[p][h] * f[h]; } return f; } function cd(r) { return r * Math.PI / 180; } function em(r, e) { var t = r % e; return t * e < 0 ? t + e : t; } function xc(r, e, t) { return r + t * (e - r); } var Yje = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Kw = 6378137, Bg = Math.PI * Kw, Xje = [-Bg, -Bg, Bg, Bg], qje = [-180, -85, 180, 85], FC = Kw * Math.log(Math.tan(Math.PI / 2)), ag = function(r) { Yje(e, r); function e(t) { return r.call(this, { code: t, units: ud.METERS, extent: Xje, global: !0, worldExtent: qje, getPointResolution: function(n, i) { return n / Hje(i[1] / Kw); } }) || this; } return e; }(tre), s$ = [ new ag("EPSG:3857"), new ag("EPSG:102100"), new ag("EPSG:102113"), new ag("EPSG:900913"), new ag("http://www.opengis.net/def/crs/EPSG/0/3857"), new ag("http://www.opengis.net/gml/srs/epsg.xml#3857") ]; function Zje(r, e, t) { var n = r.length, i = t > 1 ? t : 2, a = e; a === void 0 && (i > 2 ? a = r.slice() : a = new Array(n)); for (var o = 0; o < n; o += i) { a[o] = Bg * r[o] / 180; var s = Kw * Math.log(Math.tan(Math.PI * (+r[o + 1] + 90) / 360)); s > FC ? s = FC : s < -FC && (s = -FC), a[o + 1] = s; } return a; } function Kje(r, e, t) { var n = r.length, i = t > 1 ? t : 2, a = e; a === void 0 && (i > 2 ? a = r.slice() : a = new Array(n)); for (var o = 0; o < n; o += i) a[o] = 180 * r[o] / Bg, a[o + 1] = 360 * Math.atan(Math.exp(r[o + 1] / Kw)) / Math.PI - 90; return a; } var Jje = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Qje = 6378137, u$ = [-180, -90, 180, 90], eYe = Math.PI * Qje / 180, bp = function(r) { Jje(e, r); function e(t, n) { return r.call(this, { code: t, units: ud.DEGREES, extent: u$, axisOrientation: n, global: !0, metersPerUnit: eYe, worldExtent: u$ }) || this; } return e; }(tre), l$ = [ new bp("CRS:84"), new bp("EPSG:4326", "neu"), new bp("urn:ogc:def:crs:OGC:1.3:CRS84"), new bp("urn:ogc:def:crs:OGC:2:84"), new bp("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), new bp("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), new bp("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") ], Q2 = {}; function tYe(r) { return Q2[r] || Q2[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; } function rYe(r, e) { Q2[r] = e; } var jn = typeof Object.assign == "function" ? Object.assign : function(r, e) { if (r == null) throw new TypeError("Cannot convert undefined or null to object"); for (var t = Object(r), n = 1, i = arguments.length; n < i; ++n) { var a = arguments[n]; if (a != null) for (var o in a) a.hasOwnProperty(o) && (t[o] = a[o]); } return t; }; function By(r) { for (var e in r) delete r[e]; } var rre = typeof Object.values == "function" ? Object.values : function(r) { var e = []; for (var t in r) e.push(r[t]); return e; }; function F1(r) { var e; for (e in r) return !1; return !e; } var tm = {}; function ob(r, e, t) { var n = r.getCode(), i = e.getCode(); n in tm || (tm[n] = {}), tm[n][i] = t; } function nYe(r, e) { var t; return r in tm && e in tm[r] && (t = tm[r][e]), t; } const na = { UNKNOWN: 0, INTERSECTING: 1, ABOVE: 2, RIGHT: 4, BELOW: 8, LEFT: 16 }; function Mr() { return function() { throw new Error("Unimplemented abstract method."); }(); } var iYe = 0; function Ft(r) { return r.ol_uid || (r.ol_uid = String(++iYe)); } var aYe = "6.14.1", oYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), sYe = function(r) { oYe(e, r); function e(t) { var n = this, i = "v" + aYe.split("-")[0], a = "Assertion failed. See https://openlayers.org/en/" + i + "/doc/errors/#" + t + " for details."; return n = r.call(this, a) || this, n.code = t, n.name = "AssertionError", n.message = a, n; } return e; }(Error); const nre = sYe; function cn(r, e) { if (!r) throw new nre(e); } function eO(r) { for (var e = Cs(), t = 0, n = r.length; t < n; ++t) L_(e, r[t]); return e; } function $m(r, e, t) { return t ? (t[0] = r[0] - e, t[1] = r[1] - e, t[2] = r[2] + e, t[3] = r[3] + e, t) : [ r[0] - e, r[1] - e, r[2] + e, r[3] + e ]; } function ire(r, e) { return e ? (e[0] = r[0], e[1] = r[1], e[2] = r[2], e[3] = r[3], e) : r.slice(); } function ky(r, e, t) { var n, i; return e < r[0] ? n = r[0] - e : r[2] < e ? n = e - r[2] : n = 0, t < r[1] ? i = r[1] - t : r[3] < t ? i = t - r[3] : i = 0, n * n + i * i; } function Vy(r, e) { return F5(r, e[0], e[1]); } function Lc(r, e) { return r[0] <= e[0] && e[2] <= r[2] && r[1] <= e[1] && e[3] <= r[3]; } function F5(r, e, t) { return r[0] <= e && e <= r[2] && r[1] <= t && t <= r[3]; } function tO(r, e) { var t = r[0], n = r[1], i = r[2], a = r[3], o = e[0], s = e[1], u = na.UNKNOWN; return o < t ? u = u | na.LEFT : o > i && (u = u | na.RIGHT), s < n ? u = u | na.BELOW : s > a && (u = u | na.ABOVE), u === na.UNKNOWN && (u = na.INTERSECTING), u; } function Cs() { return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; } function jd(r, e, t, n, i) { return i ? (i[0] = r, i[1] = e, i[2] = t, i[3] = n, i) : [r, e, t, n]; } function yP(r) { return jd(1 / 0, 1 / 0, -1 / 0, -1 / 0, r); } function uYe(r, e) { var t = r[0], n = r[1]; return jd(t, n, t, n, e); } function are(r, e, t, n, i) { var a = yP(i); return ore(a, r, e, t, n); } function Yd(r, e) { return r[0] == e[0] && r[2] == e[2] && r[1] == e[1] && r[3] == e[3]; } function lYe(r, e) { return e[0] < r[0] && (r[0] = e[0]), e[2] > r[2] && (r[2] = e[2]), e[1] < r[1] && (r[1] = e[1]), e[3] > r[3] && (r[3] = e[3]), r; } function L_(r, e) { e[0] < r[0] && (r[0] = e[0]), e[0] > r[2] && (r[2] = e[0]), e[1] < r[1] && (r[1] = e[1]), e[1] > r[3] && (r[3] = e[1]); } function ore(r, e, t, n, i) { for (; t < n; t += i) cYe(r, e[t], e[t + 1]); return r; } function cYe(r, e, t) { r[0] = Math.min(r[0], e), r[1] = Math.min(r[1], t), r[2] = Math.max(r[2], e), r[3] = Math.max(r[3], t); } function B5(r, e) { var t; return t = e(k5(r)), t || (t = e(V5(r)), t) || (t = e(G5(r)), t) || (t = e(Gy(r)), t) ? t : !1; } function rO(r) { var e = 0; return _P(r) || (e = ai(r) * il(r)), e; } function k5(r) { return [r[0], r[1]]; } function V5(r) { return [r[2], r[1]]; } function Hm(r) { return [(r[0] + r[2]) / 2, (r[1] + r[3]) / 2]; } function nO(r, e, t, n, i) { var a = e * n[0] / 2, o = e * n[1] / 2, s = Math.cos(t), u = Math.sin(t), l = a * s, c = a * u, f = o * s, h = o * u, p = r[0], d = r[1], v = p - l + h, g = p - l - h, m = p + l - h, y = p + l + h, _ = d - c - f, w = d - c + f, x = d + c + f, C = d + c - f; return jd(Math.min(v, g, m, y), Math.min(_, w, x, C), Math.max(v, g, m, y), Math.max(_, w, x, C), i); } function il(r) { return r[3] - r[1]; } function fd(r, e, t) { var n = t || Cs(); return Ti(r, e) ? (r[0] > e[0] ? n[0] = r[0] : n[0] = e[0], r[1] > e[1] ? n[1] = r[1] : n[1] = e[1], r[2] < e[2] ? n[2] = r[2] : n[2] = e[2], r[3] < e[3] ? n[3] = r[3] : n[3] = e[3]) : yP(n), n; } function Gy(r) { return [r[0], r[3]]; } function G5(r) { return [r[2], r[3]]; } function ai(r) { return r[2] - r[0]; } function Ti(r, e) { return r[0] <= e[2] && r[2] >= e[0] && r[1] <= e[3] && r[3] >= e[1]; } function _P(r) { return r[2] < r[0] || r[3] < r[1]; } function fYe(r, e) { return e ? (e[0] = r[0], e[1] = r[1], e[2] = r[2], e[3] = r[3], e) : r; } function hYe(r, e, t) { var n = !1, i = tO(r, e), a = tO(r, t); if (i === na.INTERSECTING || a === na.INTERSECTING) n = !0; else { var o = r[0], s = r[1], u = r[2], l = r[3], c = e[0], f = e[1], h = t[0], p = t[1], d = (p - f) / (h - c), v = void 0, g = void 0; !!(a & na.ABOVE) && !(i & na.ABOVE) && (v = h - (p - l) / d, n = v >= o && v <= u), !n && !!(a & na.RIGHT) && !(i & na.RIGHT) && (g = p - (h - u) * d, n = g >= s && g <= l), !n && !!(a & na.BELOW) && !(i & na.BELOW) && (v = h - (p - s) / d, n = v >= o && v <= u), !n && !!(a & na.LEFT) && !(i & na.LEFT) && (g = p - (h - o) * d, n = g >= s && g <= l); } return n; } function pYe(r, e) { var t = e.getExtent(), n = Hm(r); if (e.canWrapX() && (n[0] < t[0] || n[0] >= t[2])) { var i = ai(t), a = Math.floor((n[0] - t[0]) / i), o = a * i; r[0] -= o, r[2] -= o; } return r; } function dYe(r, e) { return r[0] += +e[0], r[1] += +e[1], r; } function sb(r, e) { for (var t = !0, n = r.length - 1; n >= 0; --n) if (r[n] != e[n]) { t = !1; break; } return t; } function z5(r, e) { var t = Math.cos(e), n = Math.sin(e), i = r[0] * t - r[1] * n, a = r[1] * t + r[0] * n; return r[0] = i, r[1] = a, r; } function vYe(r, e) { return r[0] *= e, r[1] *= e, r; } function gYe(r, e) { var t = r[0] - e[0], n = r[1] - e[1]; return t * t + n * n; } function $5(r, e) { if (e.canWrapX()) { var t = ai(e.getExtent()), n = mYe(r, e, t); n && (r[0] -= n * t); } return r; } function mYe(r, e, t) { var n = e.getExtent(), i = 0; if (e.canWrapX() && (r[0] < n[0] || r[0] > n[2])) { var a = t || ai(n); i = Math.floor((r[0] - n[0]) / a); } return i; } const Ee = { POINT: "Point", LINE_STRING: "LineString", LINEAR_RING: "LinearRing", POLYGON: "Polygon", MULTI_POINT: "MultiPoint", MULTI_LINE_STRING: "MultiLineString", MULTI_POLYGON: "MultiPolygon", GEOMETRY_COLLECTION: "GeometryCollection", CIRCLE: "Circle" }; var H5 = 63710088e-1; function iO(r, e, t) { var n = t || H5, i = cd(r[1]), a = cd(e[1]), o = (a - i) / 2, s = cd(e[0] - r[0]) / 2, u = Math.sin(o) * Math.sin(o) + Math.sin(s) * Math.sin(s) * Math.cos(i) * Math.cos(a); return 2 * n * Math.atan2(Math.sqrt(u), Math.sqrt(1 - u)); } function $L(r, e) { for (var t = 0, n = 0, i = r.length; n < i - 1; ++n) t += iO(r[n], r[n + 1], e); return t; } function r_(r, e) { var t = e || {}, n = t.radius || H5, i = t.projection || "EPSG:3857", a = r.getType(); a !== Ee.GEOMETRY_COLLECTION && (r = r.clone().transform(i, "EPSG:4326")); var o = 0, s, u, l, c, f, h; switch (a) { case Ee.POINT: case Ee.MULTI_POINT: break; case Ee.LINE_STRING: case Ee.LINEAR_RING: { s = r.getCoordinates(), o = $L(s, n); break; } case Ee.MULTI_LINE_STRING: case Ee.POLYGON: { for (s = r.getCoordinates(), l = 0, c = s.length; l < c; ++l) o += $L(s[l], n); break; } case Ee.MULTI_POLYGON: { for (s = r.getCoordinates(), l = 0, c = s.length; l < c; ++l) for (u = s[l], f = 0, h = u.length; f < h; ++f) o += $L(u[f], n); break; } case Ee.GEOMETRY_COLLECTION: { var p = r.getGeometries(); for (l = 0, c = p.length; l < c; ++l) o += r_(p[l], e); break; } default: throw new Error("Unsupported geometry type: " + a); } return o; } function BC(r, e) { for (var t = 0, n = r.length, i = r[n - 1][0], a = r[n - 1][1], o = 0; o < n; o++) { var s = r[o][0], u = r[o][1]; t += cd(s - i) * (2 + Math.sin(cd(a)) + Math.sin(cd(u))), i = s, a = u; } return t * e * e / 2; } function sre(r, e) { var t = e || {}, n = t.radius || H5, i = t.projection || "EPSG:3857", a = r.getType(); a !== Ee.GEOMETRY_COLLECTION && (r = r.clone().transform(i, "EPSG:4326")); var o = 0, s, u, l, c, f, h; switch (a) { case Ee.POINT: case Ee.MULTI_POINT: case Ee.LINE_STRING: case Ee.MULTI_LINE_STRING: case Ee.LINEAR_RING: break; case Ee.POLYGON: { for (s = r.getCoordinates(), o = Math.abs(BC(s[0], n)), l = 1, c = s.length; l < c; ++l) o -= Math.abs(BC(s[l], n)); break; } case Ee.MULTI_POLYGON: { for (s = r.getCoordinates(), l = 0, c = s.length; l < c; ++l) for (u = s[l], o += Math.abs(BC(u[0], n)), f = 1, h = u.length; f < h; ++f) o -= Math.abs(BC(u[f], n)); break; } case Ee.GEOMETRY_COLLECTION: { var p = r.getGeometries(); for (l = 0, c = p.length; l < c; ++l) o += sre(p[l], e); break; } default: throw new Error("Unsupported geometry type: " + a); } return o; } var aO = !0; function ure(r) { var e = r === void 0 ? !0 : r; aO = !e; } function lre(r, e, t) { var n; if (e !== void 0) { for (var i = 0, a = r.length; i < a; ++i) e[i] = r[i]; n = e; } else n = r.slice(); return n; } function U5(r, e, t) { if (e !== void 0 && r !== e) { for (var n = 0, i = r.length; n < i; ++n) e[n] = r[n]; r = e; } return r; } function yYe(r) { rYe(r.getCode(), r), ob(r, r, lre); } function _Ye(r) { r.forEach(yYe); } function ff(r) { return typeof r == "string" ? tYe(r) : r || null; } function c$(r, e, t, n) { r = ff(r); var i, a = r.getPointResolutionFunc(); if (a) { if (i = a(e, t), n && n !== r.getUnits()) { var o = r.getMetersPerUnit(); o && (i = i * o / cf[n]); } } else { var s = r.getUnits(); if (s == ud.DEGREES && !n || n == ud.DEGREES) i = e; else { var u = lb(r, ff("EPSG:4326")); if (u === U5 && s !== ud.DEGREES) i = e * r.getMetersPerUnit(); else { var l = [ t[0] - e / 2, t[1], t[0] + e / 2, t[1], t[0], t[1] - e / 2, t[0], t[1] + e / 2 ]; l = u(l, l, 2); var c = iO(l.slice(0, 2), l.slice(2, 4)), f = iO(l.slice(4, 6), l.slice(6, 8)); i = (c + f) / 2; } var o = n ? cf[n] : r.getMetersPerUnit(); o !== void 0 && (i /= o); } } return i; } function f$(r) { _Ye(r), r.forEach(function(e) { r.forEach(function(t) { e !== t && ob(e, t, lre); }); }); } function wYe(r, e, t, n) { r.forEach(function(i) { e.forEach(function(a) { ob(i, a, t), ob(a, i, n); }); }); } function W5(r, e) { return r ? typeof r == "string" ? ff(r) : r : ff(e); } function ub(r, e) { return ure(), j5(r, "EPSG:4326", e !== void 0 ? e : "EPSG:3857"); } function oO(r, e) { var t = j5(r, e !== void 0 ? e : "EPSG:3857", "EPSG:4326"), n = t[0]; return (n < -180 || n > 180) && (t[0] = em(n + 180, 360) - 180), t; } function lb(r, e) { var t = r.getCode(), n = e.getCode(), i = nYe(t, n); return i || (i = U5), i; } function cb(r, e) { var t = ff(r), n = ff(e); return lb(t, n); } function j5(r, e, t) { var n = cb(e, t); return n(r, void 0, r.length); } var xYe = null; function cre() { return xYe; } function sO(r, e) { return r; } function Mu(r, e) { return aO && !sb(r, [0, 0]) && r[0] >= -180 && r[0] <= 180 && r[1] >= -90 && r[1] <= 90 && (aO = !1, console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")), r; } function fre(r, e) { return r; } function Dc(r, e) { return r; } function CYe() { f$(s$), f$(l$), wYe(l$, s$, Zje, Kje); } CYe(); window.ol && !ol.ext && (ol.ext = {}); var wv = function(r, e) { r.prototype = Object.create(e.prototype), r.prototype.constructor = r; }; window.ol && (ol.inherits || (ol.inherits = wv)); window.NodeList && !NodeList.prototype.forEach && (NodeList.prototype.forEach = Array.prototype.forEach); window.Element && !Element.prototype.remove && (Element.prototype.remove = function() { this.parentNode && this.parentNode.removeChild(this); }); var SYe = function() { function r() { this.disposed = !1; } return r.prototype.dispose = function() { this.disposed || (this.disposed = !0, this.disposeInternal()); }, r.prototype.disposeInternal = function() { }, r; }(); const wP = SYe; var EYe = function() { function r(e) { this.propagationStopped, this.defaultPrevented, this.type = e, this.target = null; } return r.prototype.preventDefault = function() { this.defaultPrevented = !0; }, r.prototype.stopPropagation = function() { this.propagationStopped = !0; }, r; }(); const xf = EYe; function bYe(r, e, t) { for (var n, i, a = t || Um, o = 0, s = r.length, u = !1; o < s; ) n = o + (s - o >> 1), i = +a(r[n], e), i < 0 ? o = n + 1 : (s = n, u = !i); return u ? o : ~o; } function Um(r, e) { return r > e ? 1 : r < e ? -1 : 0; } function hre(r, e, t) { var n = r.length; if (r[0] <= e) return 0; if (e <= r[n - 1]) return n - 1; var i = void 0; if (t > 0) { for (i = 1; i < n; ++i) if (r[i] < e) return i - 1; } else if (t < 0) { for (i = 1; i < n; ++i) if (r[i] <= e) return i; } else for (i = 1; i < n; ++i) { if (r[i] == e) return i; if (r[i] < e) return typeof t == "function" ? t(e, r[i - 1], r[i]) > 0 ? i - 1 : i : r[i - 1] - e < e - r[i] ? i - 1 : i; } return n - 1; } function TYe(r, e, t) { for (; e < t; ) { var n = r[e]; r[e] = r[t], r[t] = n, ++e, --t; } } function zc(r, e) { for (var t = Array.isArray(e) ? e : [e], n = t.length, i = 0; i < n; i++) r[r.length] = t[i]; } function Zh(r, e) { var t = r.length; if (t !== e.length) return !1; for (var n = 0; n < t; n++) if (r[n] !== e[n]) return !1; return !0; } function hd() { return !0; } function Jw() { return !1; } function Xd() { } function PYe(r) { var e = !1, t, n, i; return function() { var a = Array.prototype.slice.call(arguments); return (!e || this !== i || !Zh(a, n)) && (e = !0, i = this, n = a, t = r.apply(this, arguments)), t; }; } var IYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), AYe = function(r) { IYe(e, r); function e(t) { var n = r.call(this) || this; return n.eventTarget_ = t, n.pendingRemovals_ = null, n.dispatching_ = null, n.listeners_ = null, n; } return e.prototype.addEventListener = function(t, n) { if (!(!t || !n)) { var i = this.listeners_ || (this.listeners_ = {}), a = i[t] || (i[t] = []); a.indexOf(n) === -1 && a.push(n); } }, e.prototype.dispatchEvent = function(t) { var n = typeof t == "string", i = n ? t : t.type, a = this.listeners_ && this.listeners_[i]; if (!!a) { var o = n ? new xf(t) : t; o.target || (o.target = this.eventTarget_ || this); var s = this.dispatching_ || (this.dispatching_ = {}), u = this.pendingRemovals_ || (this.pendingRemovals_ = {}); i in s || (s[i] = 0, u[i] = 0), ++s[i]; for (var l, c = 0, f = a.length; c < f; ++c) if ("handleEvent" in a[c] ? l = a[c].handleEvent(o) : l = a[c].call(this, o), l === !1 || o.propagationStopped) { l = !1; break; } if (--s[i] === 0) { var h = u[i]; for (delete u[i]; h--; ) this.removeEventListener(i, Xd); delete s[i]; } return l; } }, e.prototype.disposeInternal = function() { this.listeners_ && By(this.listeners_); }, e.prototype.getListeners = function(t) { return this.listeners_ && this.listeners_[t] || void 0; }, e.prototype.hasListener = function(t) { return this.listeners_ ? t ? t in this.listeners_ : Object.keys(this.listeners_).length > 0 : !1; }, e.prototype.removeEventListener = function(t, n) { var i = this.listeners_ && this.listeners_[t]; if (i) { var a = i.indexOf(n); a !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (i[a] = Xd, ++this.pendingRemovals_[t]) : (i.splice(a, 1), i.length === 0 && delete this.listeners_[t])); } }, e; }(wP); const zy = AYe, Ot = { CHANGE: "change", ERROR: "error", BLUR: "blur", CLEAR: "clear", CONTEXTMENU: "contextmenu", CLICK: "click", DBLCLICK: "dblclick", DRAGENTER: "dragenter", DRAGOVER: "dragover", DROP: "drop", FOCUS: "focus", KEYDOWN: "keydown", KEYPRESS: "keypress", LOAD: "load", RESIZE: "resize", TOUCHMOVE: "touchmove", WHEEL: "wheel" }; function Bt(r, e, t, n, i) { if (n && n !== r && (t = t.bind(n)), i) { var a = t; t = function() { r.removeEventListener(e, t), a.apply(this, arguments); }; } var o = { target: r, type: e, listener: t }; return r.addEventListener(e, t), o; } function fb(r, e, t, n) { return Bt(r, e, t, n, !0); } function pn(r) { r && r.target && (r.target.removeEventListener(r.type, r.listener), By(r)); } var LYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Qw = function(r) { LYe(e, r); function e() { var t = r.call(this) || this; return t.on = t.onInternal, t.once = t.onceInternal, t.un = t.unInternal, t.revision_ = 0, t; } return e.prototype.changed = function() { ++this.revision_, this.dispatchEvent(Ot.CHANGE); }, e.prototype.getRevision = function() { return this.revision_; }, e.prototype.onInternal = function(t, n) { if (Array.isArray(t)) { for (var i = t.length, a = new Array(i), o = 0; o < i; ++o) a[o] = Bt(this, t[o], n); return a; } else return Bt(this, t, n); }, e.prototype.onceInternal = function(t, n) { var i; if (Array.isArray(t)) { var a = t.length; i = new Array(a); for (var o = 0; o < a; ++o) i[o] = fb(this, t[o], n); } else i = fb(this, t, n); return n.ol_key = i, i; }, e.prototype.unInternal = function(t, n) { var i = n.ol_key; if (i) B1(i); else if (Array.isArray(t)) for (var a = 0, o = t.length; a < o; ++a) this.removeEventListener(t[a], n); else this.removeEventListener(t, n); }, e; }(zy); Qw.prototype.on; Qw.prototype.once; Qw.prototype.un; function B1(r) { if (Array.isArray(r)) for (var e = 0, t = r.length; e < t; ++e) pn(r[e]); else pn(r); } const Wm = { PROPERTYCHANGE: "propertychange" }; var pre = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), h$ = function(r) { pre(e, r); function e(t, n, i) { var a = r.call(this, t) || this; return a.key = n, a.oldValue = i, a; } return e; }(xf), DYe = function(r) { pre(e, r); function e(t) { var n = r.call(this) || this; return n.on, n.once, n.un, Ft(n), n.values_ = null, t !== void 0 && n.setProperties(t), n; } return e.prototype.get = function(t) { var n; return this.values_ && this.values_.hasOwnProperty(t) && (n = this.values_[t]), n; }, e.prototype.getKeys = function() { return this.values_ && Object.keys(this.values_) || []; }, e.prototype.getProperties = function() { return this.values_ && jn({}, this.values_) || {}; }, e.prototype.hasProperties = function() { return !!this.values_; }, e.prototype.notify = function(t, n) { var i; i = "change:".concat(t), this.hasListener(i) && this.dispatchEvent(new h$(i, t, n)), i = Wm.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new h$(i, t, n)); }, e.prototype.addChangeListener = function(t, n) { this.addEventListener("change:".concat(t), n); }, e.prototype.removeChangeListener = function(t, n) { this.removeEventListener("change:".concat(t), n); }, e.prototype.set = function(t, n, i) { var a = this.values_ || (this.values_ = {}); if (i) a[t] = n; else { var o = a[t]; a[t] = n, o !== n && this.notify(t, o); } }, e.prototype.setProperties = function(t, n) { for (var i in t) this.set(i, t[i], n); }, e.prototype.applyProperties = function(t) { !t.values_ || jn(this.values_ || (this.values_ = {}), t.values_); }, e.prototype.unset = function(t, n) { if (this.values_ && t in this.values_) { var i = this.values_[t]; delete this.values_[t], F1(this.values_) && (this.values_ = null), n || this.notify(t, i); } }, e; }(Qw); const Ps = DYe, _c = { POSTRENDER: "postrender", MOVESTART: "movestart", MOVEEND: "moveend", LOADSTART: "loadstart", LOADEND: "loadend" }; var zh = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", MYe = zh.indexOf("firefox") !== -1, OYe = zh.indexOf("safari") !== -1 && zh.indexOf("chrom") == -1, RYe = OYe && !!(zh.indexOf("version/15.4") >= 0 || zh.match(/cpu (os|iphone os) 15_4 like mac os x/)), NYe = zh.indexOf("webkit") !== -1 && zh.indexOf("edge") == -1, FYe = zh.indexOf("macintosh") !== -1, dre = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, xP = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, BYe = typeof Image < "u" && Image.prototype.decode, vre = function() { var r = !1; try { var e = Object.defineProperty({}, "passive", { get: function() { r = !0; } }); window.addEventListener("_", null, e), window.removeEventListener("_", null, e); } catch { } return r; }(); function Ss(r, e, t, n) { var i; return t && t.length ? i = t.shift() : xP ? i = new OffscreenCanvas(r || 300, e || 300) : i = document.createElement("canvas"), r && (i.width = r), e && (i.height = e), i.getContext("2d", n); } function kYe(r) { var e = r.offsetWidth, t = getComputedStyle(r); return e += parseInt(t.marginLeft, 10) + parseInt(t.marginRight, 10), e; } function VYe(r) { var e = r.offsetHeight, t = getComputedStyle(r); return e += parseInt(t.marginTop, 10) + parseInt(t.marginBottom, 10), e; } function hb(r, e) { var t = e.parentNode; t && t.replaceChild(r, e); } function pb(r) { return r && r.parentNode ? r.parentNode.removeChild(r) : null; } function gre(r) { for (; r.lastChild; ) r.removeChild(r.lastChild); } function GYe(r, e) { for (var t = r.childNodes, n = 0; ; ++n) { var i = t[n], a = e[n]; if (!i && !a) break; if (i !== a) { if (!i) { r.appendChild(a); continue; } if (!a) { r.removeChild(i), --n; continue; } r.insertBefore(a, i); } } } var zYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), $Ye = function(r) { zYe(e, r); function e(t) { var n = r.call(this) || this, i = t.element; return i && !t.target && !i.style.pointerEvents && (i.style.pointerEvents = "auto"), n.element = i || null, n.target_ = null, n.map_ = null, n.listenerKeys = [], t.render && (n.render = t.render), t.target && n.setTarget(t.target), n; } return e.prototype.disposeInternal = function() { pb(this.element), r.prototype.disposeInternal.call(this); }, e.prototype.getMap = function() { return this.map_; }, e.prototype.setMap = function(t) { this.map_ && pb(this.element); for (var n = 0, i = this.listenerKeys.length; n < i; ++n) pn(this.listenerKeys[n]); if (this.listenerKeys.length = 0, this.map_ = t, t) { var a = this.target_ ? this.target_ : t.getOverlayContainerStopEvent(); a.appendChild(this.element), this.render !== Xd && this.listenerKeys.push(Bt(t, _c.POSTRENDER, this.render, this)), t.render(); } }, e.prototype.render = function(t) { }, e.prototype.setTarget = function(t) { this.target_ = typeof t == "string" ? document.getElementById(t) : t; }, e; }(Ps); const dl = $Ye, Qr = { OPACITY: "opacity", VISIBLE: "visible", EXTENT: "extent", Z_INDEX: "zIndex", MAX_RESOLUTION: "maxResolution", MIN_RESOLUTION: "minResolution", MAX_ZOOM: "maxZoom", MIN_ZOOM: "minZoom", SOURCE: "source", MAP: "map" }; var HYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), UYe = function(r) { HYe(e, r); function e(t) { var n = r.call(this) || this; n.on, n.once, n.un, n.background_ = t.background; var i = jn({}, t); return typeof t.properties == "object" && (delete i.properties, jn(i, t.properties)), i[Qr.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, cn(typeof i[Qr.OPACITY] == "number", 64), i[Qr.VISIBLE] = t.visible !== void 0 ? t.visible : !0, i[Qr.Z_INDEX] = t.zIndex, i[Qr.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, i[Qr.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, i[Qr.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, i[Qr.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, n.className_ = i.className !== void 0 ? i.className : "ol-layer", delete i.className, n.setProperties(i), n.state_ = null, n; } return e.prototype.getBackground = function() { return this.background_; }, e.prototype.getClassName = function() { return this.className_; }, e.prototype.getLayerState = function(t) { var n = this.state_ || { layer: this, managed: t === void 0 ? !0 : t }, i = this.getZIndex(); return n.opacity = Di(Math.round(this.getOpacity() * 100) / 100, 0, 1), n.visible = this.getVisible(), n.extent = this.getExtent(), n.zIndex = i === void 0 && !n.managed ? 1 / 0 : i, n.maxResolution = this.getMaxResolution(), n.minResolution = Math.max(this.getMinResolution(), 0), n.minZoom = this.getMinZoom(), n.maxZoom = this.getMaxZoom(), this.state_ = n, n; }, e.prototype.getLayersArray = function(t) { return Mr(); }, e.prototype.getLayerStatesArray = function(t) { return Mr(); }, e.prototype.getExtent = function() { return this.get(Qr.EXTENT); }, e.prototype.getMaxResolution = function() { return this.get(Qr.MAX_RESOLUTION); }, e.prototype.getMinResolution = function() { return this.get(Qr.MIN_RESOLUTION); }, e.prototype.getMinZoom = function() { return this.get(Qr.MIN_ZOOM); }, e.prototype.getMaxZoom = function() { return this.get(Qr.MAX_ZOOM); }, e.prototype.getOpacity = function() { return this.get(Qr.OPACITY); }, e.prototype.getSourceState = function() { return Mr(); }, e.prototype.getVisible = function() { return this.get(Qr.VISIBLE); }, e.prototype.getZIndex = function() { return this.get(Qr.Z_INDEX); }, e.prototype.setBackground = function(t) { this.background_ = t, this.changed(); }, e.prototype.setExtent = function(t) { this.set(Qr.EXTENT, t); }, e.prototype.setMaxResolution = function(t) { this.set(Qr.MAX_RESOLUTION, t); }, e.prototype.setMinResolution = function(t) { this.set(Qr.MIN_RESOLUTION, t); }, e.prototype.setMaxZoom = function(t) { this.set(Qr.MAX_ZOOM, t); }, e.prototype.setMinZoom = function(t) { this.set(Qr.MIN_ZOOM, t); }, e.prototype.setOpacity = function(t) { cn(typeof t == "number", 64), this.set(Qr.OPACITY, t); }, e.prototype.setVisible = function(t) { this.set(Qr.VISIBLE, t); }, e.prototype.setZIndex = function(t) { this.set(Qr.Z_INDEX, t); }, e.prototype.disposeInternal = function() { this.state_ && (this.state_.layer = null, this.state_ = null), r.prototype.disposeInternal.call(this); }, e; }(Ps); const mre = UYe, Ao = { PRERENDER: "prerender", POSTRENDER: "postrender", PRECOMPOSE: "precompose", POSTCOMPOSE: "postcompose", RENDERCOMPLETE: "rendercomplete" }, qd = { UNDEFINED: "undefined", LOADING: "loading", READY: "ready", ERROR: "error" }; var WYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), jYe = function(r) { WYe(e, r); function e(t) { var n = this, i = jn({}, t); delete i.source, n = r.call(this, i) || this, n.on, n.once, n.un, n.mapPrecomposeKey_ = null, n.mapRenderKey_ = null, n.sourceChangeKey_ = null, n.renderer_ = null, n.rendered = !1, t.render && (n.render = t.render), t.map && n.setMap(t.map), n.addChangeListener(Qr.SOURCE, n.handleSourcePropertyChange_); var a = t.source ? t.source : null; return n.setSource(a), n; } return e.prototype.getLayersArray = function(t) { var n = t || []; return n.push(this), n; }, e.prototype.getLayerStatesArray = function(t) { var n = t || []; return n.push(this.getLayerState()), n; }, e.prototype.getSource = function() { return this.get(Qr.SOURCE) || null; }, e.prototype.getRenderSource = function() { return this.getSource(); }, e.prototype.getSourceState = function() { var t = this.getSource(); return t ? t.getState() : qd.UNDEFINED; }, e.prototype.handleSourceChange_ = function() { this.changed(); }, e.prototype.handleSourcePropertyChange_ = function() { this.sourceChangeKey_ && (pn(this.sourceChangeKey_), this.sourceChangeKey_ = null); var t = this.getSource(); t && (this.sourceChangeKey_ = Bt(t, Ot.CHANGE, this.handleSourceChange_, this)), this.changed(); }, e.prototype.getFeatures = function(t) { return this.renderer_ ? this.renderer_.getFeatures(t) : new Promise(function(n) { return n([]); }); }, e.prototype.getData = function(t) { return !this.renderer_ || !this.rendered ? null : this.renderer_.getData(t); }, e.prototype.render = function(t, n) { var i = this.getRenderer(); if (i.prepareFrame(t)) return this.rendered = !0, i.renderFrame(t, n); }, e.prototype.unrender = function() { this.rendered = !1; }, e.prototype.setMapInternal = function(t) { t || this.unrender(), this.set(Qr.MAP, t); }, e.prototype.getMapInternal = function() { return this.get(Qr.MAP); }, e.prototype.setMap = function(t) { this.mapPrecomposeKey_ && (pn(this.mapPrecomposeKey_), this.mapPrecomposeKey_ = null), t || this.changed(), this.mapRenderKey_ && (pn(this.mapRenderKey_), this.mapRenderKey_ = null), t && (this.mapPrecomposeKey_ = Bt(t, Ao.PRECOMPOSE, function(n) { var i = n, a = i.frameState.layerStatesArray, o = this.getLayerState(!1); cn(!a.some(function(s) { return s.layer === o.layer; }), 67), a.push(o); }, this), this.mapRenderKey_ = Bt(this, Ot.CHANGE, t.render, t), this.changed()); }, e.prototype.setSource = function(t) { this.set(Qr.SOURCE, t); }, e.prototype.getRenderer = function() { return this.renderer_ || (this.renderer_ = this.createRenderer()), this.renderer_; }, e.prototype.hasRenderer = function() { return !!this.renderer_; }, e.prototype.createRenderer = function() { return null; }, e.prototype.disposeInternal = function() { this.renderer_ && (this.renderer_.dispose(), delete this.renderer_), this.setSource(null), r.prototype.disposeInternal.call(this); }, e; }(mre); function db(r, e) { if (!r.visible) return !1; var t = e.resolution; if (t < r.minResolution || t >= r.maxResolution) return !1; var n = e.zoom; return n > r.minZoom && n <= r.maxZoom; } const ex = jYe, ah = { PRELOAD: "preload", USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError" }; var YYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), XYe = function(r) { YYe(e, r); function e(t) { var n = this, i = t || {}, a = jn({}, i); return delete a.preload, delete a.useInterimTilesOnError, n = r.call(this, a) || this, n.on, n.once, n.un, n.setPreload(i.preload !== void 0 ? i.preload : 0), n.setUseInterimTilesOnError(i.useInterimTilesOnError !== void 0 ? i.useInterimTilesOnError : !0), n; } return e.prototype.getPreload = function() { return this.get(ah.PRELOAD); }, e.prototype.setPreload = function(t) { this.set(ah.PRELOAD, t); }, e.prototype.getUseInterimTilesOnError = function() { return this.get(ah.USE_INTERIM_TILES_ON_ERROR); }, e.prototype.setUseInterimTilesOnError = function(t) { this.set(ah.USE_INTERIM_TILES_ON_ERROR, t); }, e.prototype.getData = function(t) { return r.prototype.getData.call(this, t); }, e; }(ex); const qYe = XYe, hn = { IDLE: 0, LOADING: 1, LOADED: 2, ERROR: 3, EMPTY: 4 }; var ZYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), KYe = function(r) { ZYe(e, r); function e(t) { var n = r.call(this) || this; return n.ready = !0, n.boundHandleImageChange_ = n.handleImageChange_.bind(n), n.layer_ = t, n.declutterExecutorGroup = null, n; } return e.prototype.getFeatures = function(t) { return Mr(); }, e.prototype.getData = function(t) { return null; }, e.prototype.prepareFrame = function(t) { return Mr(); }, e.prototype.renderFrame = function(t, n) { return Mr(); }, e.prototype.loadedTileCallback = function(t, n, i) { t[n] || (t[n] = {}), t[n][i.tileCoord.toString()] = i; }, e.prototype.createLoadedTileFinder = function(t, n, i) { return function(a, o) { var s = this.loadedTileCallback.bind(this, i, a); return t.forEachLoadedTile(n, a, o, s); }.bind(this); }, e.prototype.forEachFeatureAtCoordinate = function(t, n, i, a, o) { }, e.prototype.getDataAtPixel = function(t, n, i) { return null; }, e.prototype.getLayer = function() { return this.layer_; }, e.prototype.handleFontsChanged = function() { }, e.prototype.handleImageChange_ = function(t) { var n = t.target; n.getState() === hn.LOADED && this.renderIfReadyAndVisible(); }, e.prototype.loadImage = function(t) { var n = t.getState(); return n != hn.LOADED && n != hn.ERROR && t.addEventListener(Ot.CHANGE, this.boundHandleImageChange_), n == hn.IDLE && (t.load(), n = t.getState()), n == hn.LOADED; }, e.prototype.renderIfReadyAndVisible = function() { var t = this.getLayer(); t.getVisible() && t.getSourceState() == qd.READY && t.changed(); }, e.prototype.disposeInternal = function() { delete this.layer_, r.prototype.disposeInternal.call(this); }, e; }(Qw); const yre = KYe; var JYe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), QYe = function(r) { JYe(e, r); function e(t, n, i, a) { var o = r.call(this, t) || this; return o.inversePixelTransform = n, o.frameState = i, o.context = a, o; } return e; }(xf); const D_ = QYe; var Y5 = new Array(6); function ha() { return [1, 0, 0, 1, 0, 0]; } function M_(r) { return rx(r, 1, 0, 0, 1, 0, 0); } function tx(r, e) { var t = r[0], n = r[1], i = r[2], a = r[3], o = r[4], s = r[5], u = e[0], l = e[1], c = e[2], f = e[3], h = e[4], p = e[5]; return r[0] = t * u + i * l, r[1] = n * u + a * l, r[2] = t * c + i * f, r[3] = n * c + a * f, r[4] = t * h + i * p + o, r[5] = n * h + a * p + s, r; } function rx(r, e, t, n, i, a, o) { return r[0] = e, r[1] = t, r[2] = n, r[3] = i, r[4] = a, r[5] = o, r; } function eXe(r, e) { return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r; } function mn(r, e) { var t = e[0], n = e[1]; return e[0] = r[0] * t + r[2] * n + r[4], e[1] = r[1] * t + r[3] * n + r[5], e; } function tXe(r, e) { var t = Math.cos(e), n = Math.sin(e); return tx(r, rx(Y5, t, n, -n, t, 0, 0)); } function CS(r, e, t) { return tx(r, rx(Y5, e, 0, 0, t, 0, 0)); } function rXe(r, e, t) { return rx(r, e, 0, 0, t, 0, 0); } function nXe(r, e, t) { return tx(r, rx(Y5, 1, 0, 0, 1, e, t)); } function Es(r, e, t, n, i, a, o, s) { var u = Math.sin(a), l = Math.cos(a); return r[0] = n * l, r[1] = i * u, r[2] = -n * u, r[3] = i * l, r[4] = o * n * l - s * n * u + e, r[5] = o * i * u + s * i * l + t, r; } function nx(r, e) { var t = iXe(e); cn(t !== 0, 32); var n = e[0], i = e[1], a = e[2], o = e[3], s = e[4], u = e[5]; return r[0] = o / t, r[1] = -i / t, r[2] = -a / t, r[3] = n / t, r[4] = (a * u - o * s) / t, r[5] = -(n * u - i * s) / t, r; } function iXe(r) { return r[0] * r[3] - r[1] * r[2]; } var p$; function X5(r) { var e = "matrix(" + r.join(", ") + ")"; if (xP) return e; var t = p$ || (p$ = document.createElement("div")); return t.style.transform = e, t.style.transform; } var aXe = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, oXe = /^([a-z]*)$|^hsla?\(.*\)$/i; function _re(r) { return typeof r == "string" ? r : wre(r); } function sXe(r) { var e = document.createElement("div"); if (e.style.color = r, e.style.color !== "") { document.body.appendChild(e); var t = getComputedStyle(e).color; return document.body.removeChild(e), t; } else return ""; } var uXe = function() { var r = 1024, e = {}, t = 0; return function(n) { var i; if (e.hasOwnProperty(n)) i = e[n]; else { if (t >= r) { var a = 0; for (var o in e) (a++ & 3) === 0 && (delete e[o], --t); } i = lXe(n), e[n] = i, ++t; } return i; }; }(); function vb(r) { return Array.isArray(r) ? r : uXe(r); } function lXe(r) { var e, t, n, i, a; if (oXe.exec(r) && (r = sXe(r)), aXe.exec(r)) { var o = r.length - 1, s = void 0; o <= 4 ? s = 1 : s = 2; var u = o === 4 || o === 8; e = parseInt(r.substr(1 + 0 * s, s), 16), t = parseInt(r.substr(1 + 1 * s, s), 16), n = parseInt(r.substr(1 + 2 * s, s), 16), u ? i = parseInt(r.substr(1 + 3 * s, s), 16) : i = 255, s == 1 && (e = (e << 4) + e, t = (t << 4) + t, n = (n << 4) + n, u && (i = (i << 4) + i)), a = [e, t, n, i / 255]; } else r.indexOf("rgba(") == 0 ? (a = r.slice(5, -1).split(",").map(Number), d$(a)) : r.indexOf("rgb(") == 0 ? (a = r.slice(4, -1).split(",").map(Number), a.push(1), d$(a)) : cn(!1, 14); return a; } function d$(r) { return r[0] = Di(r[0] + 0.5 | 0, 0, 255), r[1] = Di(r[1] + 0.5 | 0, 0, 255), r[2] = Di(r[2] + 0.5 | 0, 0, 255), r[3] = Di(r[3], 0, 1), r; } function wre(r) { var e = r[0]; e != (e | 0) && (e = e + 0.5 | 0); var t = r[1]; t != (t | 0) && (t = t + 0.5 | 0); var n = r[2]; n != (n | 0) && (n = n + 0.5 | 0); var i = r[3] === void 0 ? 1 : Math.round(r[3] * 100) / 100; return "rgba(" + e + "," + t + "," + n + "," + i + ")"; } var cXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), n_ = null; function fXe() { var r = document.createElement("canvas"); r.width = 1, r.height = 1, n_ = r.getContext("2d"); } var hXe = function(r) { cXe(e, r); function e(t) { var n = r.call(this, t) || this; return n.container = null, n.renderedResolution, n.tempTransform = ha(), n.pixelTransform = ha(), n.inversePixelTransform = ha(), n.context = null, n.containerReused = !1, n.pixelContext_ = null, n.frameState = null, n; } return e.prototype.getImageData = function(t, n, i) { n_ || fXe(), n_.clearRect(0, 0, 1, 1); var a; try { n_.drawImage(t, n, i, 1, 1, 0, 0, 1, 1), a = n_.getImageData(0, 0, 1, 1).data; } catch { return null; } return a; }, e.prototype.getBackground = function(t) { var n = this.getLayer(), i = n.getBackground(); return typeof i == "function" && (i = i(t.viewState.resolution)), i || void 0; }, e.prototype.useContainer = function(t, n, i, a) { var o = this.getLayer().getClassName(), s, u; if (t && t.className === o && t.style.opacity === "" && i === 1 && (!a || t.style.backgroundColor && Zh(vb(t.style.backgroundColor), vb(a)))) { var l = t.firstElementChild; l instanceof HTMLCanvasElement && (u = l.getContext("2d")); } if (u && u.canvas.style.transform === n ? (this.container = t, this.context = u, this.containerReused = !0) : this.containerReused && (this.container = null, this.context = null, this.containerReused = !1), !this.container) { s = document.createElement("div"), s.className = o; var c = s.style; c.position = "absolute", c.width = "100%", c.height = "100%", a && (c.backgroundColor = a), u = Ss(); var l = u.canvas; s.appendChild(l), c = l.style, c.position = "absolute", c.left = "0", c.transformOrigin = "top left", this.container = s, this.context = u; } }, e.prototype.clipUnrotated = function(t, n, i) { var a = Gy(i), o = G5(i), s = V5(i), u = k5(i); mn(n.coordinateToPixelTransform, a), mn(n.coordinateToPixelTransform, o), mn(n.coordinateToPixelTransform, s), mn(n.coordinateToPixelTransform, u); var l = this.inversePixelTransform; mn(l, a), mn(l, o), mn(l, s), mn(l, u), t.save(), t.beginPath(), t.moveTo(Math.round(a[0]), Math.round(a[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(u[0]), Math.round(u[1])), t.clip(); }, e.prototype.dispatchRenderEvent_ = function(t, n, i) { var a = this.getLayer(); if (a.hasListener(t)) { var o = new D_(t, this.inversePixelTransform, i, n); a.dispatchEvent(o); } }, e.prototype.preRender = function(t, n) { this.frameState = n, this.dispatchRenderEvent_(Ao.PRERENDER, t, n); }, e.prototype.postRender = function(t, n) { this.dispatchRenderEvent_(Ao.POSTRENDER, t, n); }, e.prototype.getRenderTransform = function(t, n, i, a, o, s, u) { var l = o / 2, c = s / 2, f = a / n, h = -f, p = -t[0] + u, d = -t[1]; return Es(this.tempTransform, l, c, f, h, -i, p, d); }, e.prototype.getDataAtPixel = function(t, n, i) { var a = mn(this.inversePixelTransform, t.slice()), o = this.context, s = this.getLayer(), u = s.getExtent(); if (u) { var l = mn(n.pixelToCoordinateTransform, t.slice()); if (!Vy(u, l)) return null; } var c = Math.round(a[0]), f = Math.round(a[1]), h = this.pixelContext_; if (!h) { var p = document.createElement("canvas"); p.width = 1, p.height = 1, h = p.getContext("2d"), this.pixelContext_ = h; } h.clearRect(0, 0, 1, 1); var d; try { h.drawImage(o.canvas, c, f, 1, 1, 0, 0, 1, 1), d = h.getImageData(0, 0, 1, 1).data; } catch (v) { return v.name === "SecurityError" ? (this.pixelContext_ = null, new Uint8Array()) : d; } return d[3] === 0 ? null : d; }, e.prototype.disposeInternal = function() { delete this.frameState, r.prototype.disposeInternal.call(this); }, e; }(yre); const q5 = hXe, It = { IDLE: 0, LOADING: 1, LOADED: 2, ERROR: 3, EMPTY: 4 }; function xre(r) { return Math.pow(r, 3); } function $y(r) { return 1 - xre(1 - r); } function pXe(r) { return 3 * r * r - 2 * r * r * r; } function dXe(r) { return r; } var vXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), gXe = function(r) { vXe(e, r); function e(t, n, i) { var a = r.call(this) || this, o = i || {}; return a.tileCoord = t, a.state = n, a.interimTile = null, a.key = "", a.transition_ = o.transition === void 0 ? 250 : o.transition, a.transitionStarts_ = {}, a.interpolate = !!o.interpolate, a; } return e.prototype.changed = function() { this.dispatchEvent(Ot.CHANGE); }, e.prototype.release = function() { }, e.prototype.getKey = function() { return this.key + "/" + this.tileCoord; }, e.prototype.getInterimTile = function() { if (!this.interimTile) return this; var t = this.interimTile; do { if (t.getState() == It.LOADED) return this.transition_ = 0, t; t = t.interimTile; } while (t); return this; }, e.prototype.refreshInterimChain = function() { if (!!this.interimTile) { var t = this.interimTile, n = this; do { if (t.getState() == It.LOADED) { t.interimTile = null; break; } else t.getState() == It.LOADING ? n = t : t.getState() == It.IDLE ? n.interimTile = t.interimTile : n = t; t = n.interimTile; } while (t); } }, e.prototype.getTileCoord = function() { return this.tileCoord; }, e.prototype.getState = function() { return this.state; }, e.prototype.setState = function(t) { if (this.state !== It.ERROR && this.state > t) throw new Error("Tile load sequence violation"); this.state = t, this.changed(); }, e.prototype.load = function() { Mr(); }, e.prototype.getAlpha = function(t, n) { if (!this.transition_) return 1; var i = this.transitionStarts_[t]; if (!i) i = n, this.transitionStarts_[t] = i; else if (i === -1) return 1; var a = n - i + 1e3 / 60; return a >= this.transition_ ? 1 : xre(a / this.transition_); }, e.prototype.inTransition = function(t) { return this.transition_ ? this.transitionStarts_[t] !== -1 : !1; }, e.prototype.endTransition = function(t) { this.transition_ && (this.transitionStarts_[t] = -1); }, e; }(zy); const Cre = gXe; var mXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), yXe = function(r) { mXe(e, r); function e(t, n, i, a) { var o = r.call(this) || this; return o.extent = t, o.pixelRatio_ = i, o.resolution = n, o.state = a, o; } return e.prototype.changed = function() { this.dispatchEvent(Ot.CHANGE); }, e.prototype.getExtent = function() { return this.extent; }, e.prototype.getImage = function() { return Mr(); }, e.prototype.getPixelRatio = function() { return this.pixelRatio_; }, e.prototype.getResolution = function() { return this.resolution; }, e.prototype.getState = function() { return this.state; }, e.prototype.load = function() { Mr(); }, e; }(zy); const _Xe = yXe; var wXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(); (function(r) { wXe(e, r); function e(t, n, i, a, o, s) { var u = r.call(this, t, n, i, hn.IDLE) || this; return u.src_ = a, u.image_ = new Image(), o !== null && (u.image_.crossOrigin = o), u.unlisten_ = null, u.state = hn.IDLE, u.imageLoadFunction_ = s, u; } return e.prototype.getImage = function() { return this.image_; }, e.prototype.handleImageError_ = function() { this.state = hn.ERROR, this.unlistenImage_(), this.changed(); }, e.prototype.handleImageLoad_ = function() { this.resolution === void 0 && (this.resolution = il(this.extent) / this.image_.height), this.state = hn.LOADED, this.unlistenImage_(), this.changed(); }, e.prototype.load = function() { (this.state == hn.IDLE || this.state == hn.ERROR) && (this.state = hn.LOADING, this.changed(), this.imageLoadFunction_(this, this.src_), this.unlisten_ = Z5(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this))); }, e.prototype.setImage = function(t) { this.image_ = t, this.resolution = il(this.extent) / this.image_.height; }, e.prototype.unlistenImage_ = function() { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); }, e; })(_Xe); function Z5(r, e, t) { var n = r, i = !0, a = !1, o = !1, s = [ fb(n, Ot.LOAD, function() { o = !0, a || e(); }) ]; return n.src && BYe ? (a = !0, n.decode().then(function() { i && e(); }).catch(function(u) { i && (o ? e() : t()); })) : s.push(fb(n, Ot.ERROR, t)), function() { i = !1, s.forEach(pn); }; } var xXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), CXe = function(r) { xXe(e, r); function e(t, n, i, a, o, s) { var u = r.call(this, t, n, s) || this; return u.crossOrigin_ = a, u.src_ = i, u.key = i, u.image_ = new Image(), a !== null && (u.image_.crossOrigin = a), u.unlisten_ = null, u.tileLoadFunction_ = o, u; } return e.prototype.getImage = function() { return this.image_; }, e.prototype.setImage = function(t) { this.image_ = t, this.state = It.LOADED, this.unlistenImage_(), this.changed(); }, e.prototype.handleImageError_ = function() { this.state = It.ERROR, this.unlistenImage_(), this.image_ = SXe(), this.changed(); }, e.prototype.handleImageLoad_ = function() { var t = this.image_; t.naturalWidth && t.naturalHeight ? this.state = It.LOADED : this.state = It.EMPTY, this.unlistenImage_(), this.changed(); }, e.prototype.load = function() { this.state == It.ERROR && (this.state = It.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == It.IDLE && (this.state = It.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = Z5(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this))); }, e.prototype.unlistenImage_ = function() { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); }, e; }(Cre); function SXe() { var r = Ss(1, 1); return r.fillStyle = "rgba(0,0,0,0)", r.fillRect(0, 0, 1, 1), r.canvas; } const EXe = CXe; var bXe = 0.5, TXe = !0, PXe = 10, v$ = 0.25, IXe = function() { function r(e, t, n, i, a, o) { this.sourceProj_ = e, this.targetProj_ = t; var s = {}, u = cb(this.targetProj_, this.sourceProj_); this.transformInv_ = function(_) { var w = _[0] + "/" + _[1]; return s[w] || (s[w] = u(_)), s[w]; }, this.maxSourceExtent_ = i, this.errorThresholdSquared_ = a * a, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!i && !!this.sourceProj_.getExtent() && ai(i) == ai(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? ai(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? ai(this.targetProj_.getExtent()) : null; var l = Gy(n), c = G5(n), f = V5(n), h = k5(n), p = this.transformInv_(l), d = this.transformInv_(c), v = this.transformInv_(f), g = this.transformInv_(h), m = PXe + (o ? Math.max(0, Math.ceil(Uje(rO(n) / (o * o * 256 * 256)))) : 0); if (this.addQuad_(l, c, f, h, p, d, v, g, m), this.wrapsXInSource_) { var y = 1 / 0; this.triangles_.forEach(function(_, w, x) { y = Math.min(y, _.source[0][0], _.source[1][0], _.source[2][0]); }), this.triangles_.forEach(function(_) { if (Math.max(_.source[0][0], _.source[1][0], _.source[2][0]) - y > this.sourceWorldWidth_ / 2) { var w = [ [_.source[0][0], _.source[0][1]], [_.source[1][0], _.source[1][1]], [_.source[2][0], _.source[2][1]] ]; w[0][0] - y > this.sourceWorldWidth_ / 2 && (w[0][0] -= this.sourceWorldWidth_), w[1][0] - y > this.sourceWorldWidth_ / 2 && (w[1][0] -= this.sourceWorldWidth_), w[2][0] - y > this.sourceWorldWidth_ / 2 && (w[2][0] -= this.sourceWorldWidth_); var x = Math.min(w[0][0], w[1][0], w[2][0]), C = Math.max(w[0][0], w[1][0], w[2][0]); C - x < this.sourceWorldWidth_ / 2 && (_.source = w); } }.bind(this)); } s = {}; } return r.prototype.addTriangle_ = function(e, t, n, i, a, o) { this.triangles_.push({ source: [i, a, o], target: [e, t, n] }); }, r.prototype.addQuad_ = function(e, t, n, i, a, o, s, u, l) { var c = eO([a, o, s, u]), f = this.sourceWorldWidth_ ? ai(c) / this.sourceWorldWidth_ : null, h = this.sourceWorldWidth_, p = this.sourceProj_.canWrapX() && f > 0.5 && f < 1, d = !1; if (l > 0) { if (this.targetProj_.isGlobal() && this.targetWorldWidth_) { var v = eO([e, t, n, i]), g = ai(v) / this.targetWorldWidth_; d = g > v$ || d; } !p && this.sourceProj_.isGlobal() && f && (d = f > v$ || d); } if (!(!d && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !Ti(c, this.maxSourceExtent_))) { var m = 0; if (!d && (!isFinite(a[0]) || !isFinite(a[1]) || !isFinite(o[0]) || !isFinite(o[1]) || !isFinite(s[0]) || !isFinite(s[1]) || !isFinite(u[0]) || !isFinite(u[1]))) { if (l > 0) d = !0; else if (m = (!isFinite(a[0]) || !isFinite(a[1]) ? 8 : 0) + (!isFinite(o[0]) || !isFinite(o[1]) ? 4 : 0) + (!isFinite(s[0]) || !isFinite(s[1]) ? 2 : 0) + (!isFinite(u[0]) || !isFinite(u[1]) ? 1 : 0), m != 1 && m != 2 && m != 4 && m != 8) return; } if (l > 0) { if (!d) { var y = [(e[0] + n[0]) / 2, (e[1] + n[1]) / 2], _ = this.transformInv_(y), w = void 0; if (p) { var x = (em(a[0], h) + em(s[0], h)) / 2; w = x - em(_[0], h); } else w = (a[0] + s[0]) / 2 - _[0]; var C = (a[1] + s[1]) / 2 - _[1], S = w * w + C * C; d = S > this.errorThresholdSquared_; } if (d) { if (Math.abs(e[0] - n[0]) <= Math.abs(e[1] - n[1])) { var b = [(t[0] + n[0]) / 2, (t[1] + n[1]) / 2], E = this.transformInv_(b), T = [(i[0] + e[0]) / 2, (i[1] + e[1]) / 2], P = this.transformInv_(T); this.addQuad_(e, t, b, T, a, o, E, P, l - 1), this.addQuad_(T, b, n, i, P, E, s, u, l - 1); } else { var I = [(e[0] + t[0]) / 2, (e[1] + t[1]) / 2], A = this.transformInv_(I), L = [(n[0] + i[0]) / 2, (n[1] + i[1]) / 2], D = this.transformInv_(L); this.addQuad_(e, I, L, i, a, A, D, u, l - 1), this.addQuad_(I, t, n, L, A, o, s, D, l - 1); } return; } } if (p) { if (!this.canWrapXInSource_) return; this.wrapsXInSource_ = !0; } (m & 11) == 0 && this.addTriangle_(e, n, i, a, s, u), (m & 14) == 0 && this.addTriangle_(e, n, t, a, s, o), m && ((m & 13) == 0 && this.addTriangle_(t, i, e, o, u, a), (m & 7) == 0 && this.addTriangle_(t, i, n, o, u, s)); } }, r.prototype.calculateSourceExtent = function() { var e = Cs(); return this.triangles_.forEach(function(t, n, i) { var a = t.source; L_(e, a[0]), L_(e, a[1]), L_(e, a[2]); }), e; }, r.prototype.getTriangles = function() { return this.triangles_; }, r; }(); const AXe = IXe; var gb = { imageSmoothingEnabled: !1, msImageSmoothingEnabled: !1 }, Sre = { imageSmoothingEnabled: !0, msImageSmoothingEnabled: !0 }, HL; function g$(r, e, t, n, i) { r.beginPath(), r.moveTo(0, 0), r.lineTo(e, t), r.lineTo(n, i), r.closePath(), r.save(), r.clip(), r.fillRect(0, 0, Math.max(e, n) + 1, Math.max(t, i)), r.restore(); } function UL(r, e) { return Math.abs(r[e * 4] - 210) > 2 || Math.abs(r[e * 4 + 3] - 0.75 * 255) > 2; } function LXe() { if (HL === void 0) { var r = document.createElement("canvas").getContext("2d"); r.globalCompositeOperation = "lighter", r.fillStyle = "rgba(210, 0, 0, 0.75)", g$(r, 4, 5, 4, 0), g$(r, 4, 5, 0, 5); var e = r.getImageData(0, 0, 3, 3).data; HL = UL(e, 0) || UL(e, 4) || UL(e, 8); } return HL; } function m$(r, e, t, n) { var i = j5(t, e, r), a = c$(e, n, t), o = e.getMetersPerUnit(); o !== void 0 && (a *= o); var s = r.getMetersPerUnit(); s !== void 0 && (a /= s); var u = r.getExtent(); if (!u || Vy(u, i)) { var l = c$(r, a, i) / a; isFinite(l) && l > 0 && (a /= l); } return a; } function DXe(r, e, t, n) { var i = Hm(t), a = m$(r, e, i, n); return (!isFinite(a) || a <= 0) && B5(t, function(o) { return a = m$(r, e, o, n), isFinite(a) && a > 0; }), a; } function MXe(r, e, t, n, i, a, o, s, u, l, c, f) { var h = Ss(Math.round(t * r), Math.round(t * e)); if (f || jn(h, gb), u.length === 0) return h.canvas; h.scale(t, t); function p(w) { return Math.round(w * t) / t; } h.globalCompositeOperation = "lighter"; var d = Cs(); u.forEach(function(w, x, C) { lYe(d, w.extent); }); var v = ai(d), g = il(d), m = Ss(Math.round(t * v / n), Math.round(t * g / n)); f || jn(m, gb); var y = t / n; u.forEach(function(w, x, C) { var S = w.extent[0] - d[0], b = -(w.extent[3] - d[3]), E = ai(w.extent), T = il(w.extent); w.image.width > 0 && w.image.height > 0 && m.drawImage(w.image, l, l, w.image.width - 2 * l, w.image.height - 2 * l, S * y, b * y, E * y, T * y); }); var _ = Gy(o); return s.getTriangles().forEach(function(w, x, C) { var S = w.source, b = w.target, E = S[0][0], T = S[0][1], P = S[1][0], I = S[1][1], A = S[2][0], L = S[2][1], D = p((b[0][0] - _[0]) / a), O = p(-(b[0][1] - _[1]) / a), N = p((b[1][0] - _[0]) / a), F = p(-(b[1][1] - _[1]) / a), k = p((b[2][0] - _[0]) / a), G = p(-(b[2][1] - _[1]) / a), U = E, B = T; E = 0, T = 0, P -= U, I -= B, A -= U, L -= B; var X = [ [P, I, 0, 0, N - D], [A, L, 0, 0, k - D], [0, 0, P, I, F - O], [0, 0, A, L, G - O] ], j = jje(X); if (!!j) { if (h.save(), h.beginPath(), LXe() || !f) { h.moveTo(N, F); for (var ae = 4, se = D - N, $ = O - F, V = 0; V < ae; V++) h.lineTo(N + p((V + 1) * se / ae), F + p(V * $ / (ae - 1))), V != ae - 1 && h.lineTo(N + p((V + 1) * se / ae), F + p((V + 1) * $ / (ae - 1))); h.lineTo(k, G); } else h.moveTo(N, F), h.lineTo(D, O), h.lineTo(k, G); h.clip(), h.transform(j[0], j[2], j[1], j[3], D, O), h.translate(d[0] - U, d[3] - B), h.scale(n / t, -n / t), h.drawImage(m.canvas, 0, 0), h.restore(); } }), c && (h.save(), h.globalCompositeOperation = "source-over", h.strokeStyle = "black", h.lineWidth = 1, s.getTriangles().forEach(function(w, x, C) { var S = w.target, b = (S[0][0] - _[0]) / a, E = -(S[0][1] - _[1]) / a, T = (S[1][0] - _[0]) / a, P = -(S[1][1] - _[1]) / a, I = (S[2][0] - _[0]) / a, A = -(S[2][1] - _[1]) / a; h.beginPath(), h.moveTo(T, P), h.lineTo(b, E), h.lineTo(I, A), h.closePath(), h.stroke(); }), h.restore()), h.canvas; } var OXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), RXe = function(r) { OXe(e, r); function e(t, n, i, a, o, s, u, l, c, f, h, p) { var d = r.call(this, o, It.IDLE, { interpolate: !!p }) || this; d.renderEdges_ = h !== void 0 ? h : !1, d.pixelRatio_ = u, d.gutter_ = l, d.canvas_ = null, d.sourceTileGrid_ = n, d.targetTileGrid_ = a, d.wrappedTileCoord_ = s || o, d.sourceTiles_ = [], d.sourcesListenerKeys_ = null, d.sourceZ_ = 0; var v = a.getTileCoordExtent(d.wrappedTileCoord_), g = d.targetTileGrid_.getExtent(), m = d.sourceTileGrid_.getExtent(), y = g ? fd(v, g) : v; if (rO(y) === 0) return d.state = It.EMPTY, d; var _ = t.getExtent(); _ && (m ? m = fd(m, _) : m = _); var w = a.getResolution(d.wrappedTileCoord_[0]), x = DXe(t, i, y, w); if (!isFinite(x) || x <= 0) return d.state = It.EMPTY, d; var C = f !== void 0 ? f : bXe; if (d.triangulation_ = new AXe(t, i, y, m, x * C, w), d.triangulation_.getTriangles().length === 0) return d.state = It.EMPTY, d; d.sourceZ_ = n.getZForResolution(x); var S = d.triangulation_.calculateSourceExtent(); if (m && (t.canWrapX() ? (S[1] = Di(S[1], m[1], m[3]), S[3] = Di(S[3], m[1], m[3])) : S = fd(S, m)), !rO(S)) d.state = It.EMPTY; else { for (var b = n.getTileRangeForExtentAndZ(S, d.sourceZ_), E = b.minX; E <= b.maxX; E++) for (var T = b.minY; T <= b.maxY; T++) { var P = c(d.sourceZ_, E, T, u); P && d.sourceTiles_.push(P); } d.sourceTiles_.length === 0 && (d.state = It.EMPTY); } return d; } return e.prototype.getImage = function() { return this.canvas_; }, e.prototype.reproject_ = function() { var t = []; if (this.sourceTiles_.forEach(function(c, f, h) { c && c.getState() == It.LOADED && t.push({ extent: this.sourceTileGrid_.getTileCoordExtent(c.tileCoord), image: c.getImage() }); }.bind(this)), this.sourceTiles_.length = 0, t.length === 0) this.state = It.ERROR; else { var n = this.wrappedTileCoord_[0], i = this.targetTileGrid_.getTileSize(n), a = typeof i == "number" ? i : i[0], o = typeof i == "number" ? i : i[1], s = this.targetTileGrid_.getResolution(n), u = this.sourceTileGrid_.getResolution(this.sourceZ_), l = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_); this.canvas_ = MXe(a, o, this.pixelRatio_, u, this.sourceTileGrid_.getExtent(), s, l, this.triangulation_, t, this.gutter_, this.renderEdges_, this.interpolate), this.state = It.LOADED; } this.changed(); }, e.prototype.load = function() { if (this.state == It.IDLE) { this.state = It.LOADING, this.changed(); var t = 0; this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach(function(n, i, a) { var o = n.getState(); if (o == It.IDLE || o == It.LOADING) { t++; var s = Bt(n, Ot.CHANGE, function(u) { var l = n.getState(); (l == It.LOADED || l == It.ERROR || l == It.EMPTY) && (pn(s), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); }, this); this.sourcesListenerKeys_.push(s); } }.bind(this)), t === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function(n, i, a) { var o = n.getState(); o == It.IDLE && n.load(); }); } }, e.prototype.unlistenSources_ = function() { this.sourcesListenerKeys_.forEach(pn), this.sourcesListenerKeys_ = null; }, e; }(Cre); const NXe = RXe; var FXe = function() { function r(e, t, n, i) { this.minX = e, this.maxX = t, this.minY = n, this.maxY = i; } return r.prototype.contains = function(e) { return this.containsXY(e[1], e[2]); }, r.prototype.containsTileRange = function(e) { return this.minX <= e.minX && e.maxX <= this.maxX && this.minY <= e.minY && e.maxY <= this.maxY; }, r.prototype.containsXY = function(e, t) { return this.minX <= e && e <= this.maxX && this.minY <= t && t <= this.maxY; }, r.prototype.equals = function(e) { return this.minX == e.minX && this.minY == e.minY && this.maxX == e.maxX && this.maxY == e.maxY; }, r.prototype.extend = function(e) { e.minX < this.minX && (this.minX = e.minX), e.maxX > this.maxX && (this.maxX = e.maxX), e.minY < this.minY && (this.minY = e.minY), e.maxY > this.maxY && (this.maxY = e.maxY); }, r.prototype.getHeight = function() { return this.maxY - this.minY + 1; }, r.prototype.getSize = function() { return [this.getWidth(), this.getHeight()]; }, r.prototype.getWidth = function() { return this.maxX - this.minX + 1; }, r.prototype.intersects = function(e) { return this.minX <= e.maxX && this.maxX >= e.minX && this.minY <= e.maxY && this.maxY >= e.minY; }, r; }(); const BXe = FXe; var kC = "ol-hidden", kXe = "ol-selectable", ix = "ol-unselectable", y$ = "ol-unsupported", CP = "ol-control", _$ = "ol-collapsed", VXe = new RegExp([ "^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)", "(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)", "(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)", "(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?", "(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))", "(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))", `?\\s*([-,\\"\\'\\sa-z]+?)\\s*$` ].join(""), "i"), w$ = [ "style", "variant", "weight", "size", "lineHeight", "family" ], Ere = function(r) { var e = r.match(VXe); if (!e) return null; for (var t = { lineHeight: "normal", size: "1.2em", style: "normal", weight: "normal", variant: "normal" }, n = 0, i = w$.length; n < i; ++n) { var a = e[n + 1]; a !== void 0 && (t[w$[n]] = a); } return t.families = t.family.split(/,\s?/), t; }; function bre(r) { return r === 1 ? "" : String(Math.round(r * 100) / 100); } function x$(r) { return r[0] > 0 && r[1] > 0; } function jm(r, e) { return Array.isArray(r) ? r : (e === void 0 ? e = [r, r] : (e[0] = r, e[1] = r), e); } var GXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), zXe = function(r) { GXe(e, r); function e(t) { var n = r.call(this, t) || this; return n.extentChanged = !0, n.renderedExtent_ = null, n.renderedPixelRatio, n.renderedProjection = null, n.renderedRevision, n.renderedTiles = [], n.newTiles_ = !1, n.tmpExtent = Cs(), n.tmpTileRange_ = new BXe(0, 0, 0, 0), n; } return e.prototype.isDrawableTile = function(t) { var n = this.getLayer(), i = t.getState(), a = n.getUseInterimTilesOnError(); return i == It.LOADED || i == It.EMPTY || i == It.ERROR && !a; }, e.prototype.getTile = function(t, n, i, a) { var o = a.pixelRatio, s = a.viewState.projection, u = this.getLayer(), l = u.getSource(), c = l.getTile(t, n, i, o, s); return c.getState() == It.ERROR && (u.getUseInterimTilesOnError() ? u.getPreload() > 0 && (this.newTiles_ = !0) : c.setState(It.LOADED)), this.isDrawableTile(c) || (c = c.getInterimTile()), c; }, e.prototype.getData = function(t) { var n = this.frameState; if (!n) return null; var i = this.getLayer(), a = mn(n.pixelToCoordinateTransform, t.slice()), o = i.getExtent(); if (o && !Vy(o, a)) return null; for (var s = n.pixelRatio, u = n.viewState.projection, l = n.viewState, c = i.getRenderSource(), f = c.getTileGridForProjection(l.projection), h = c.getTilePixelRatio(n.pixelRatio), p = f.getZForResolution(l.resolution); p >= f.getMinZoom(); --p) { var d = f.getTileCoordForCoordAndZ(a, p), v = c.getTile(p, d[1], d[2], s, u); if (!(v instanceof EXe || v instanceof NXe)) return null; if (v.getState() === It.LOADED) { var g = f.getOrigin(p), m = jm(f.getTileSize(p)), y = f.getResolution(p), _ = Math.floor(h * ((a[0] - g[0]) / y - d[1] * m[0])), w = Math.floor(h * ((g[1] - a[1]) / y - d[2] * m[1])); return this.getImageData(v.getImage(), _, w); } } return null; }, e.prototype.loadedTileCallback = function(t, n, i) { return this.isDrawableTile(i) ? r.prototype.loadedTileCallback.call(this, t, n, i) : !1; }, e.prototype.prepareFrame = function(t) { return !!this.getLayer().getSource(); }, e.prototype.renderFrame = function(t, n) { var i = t.layerStatesArray[t.layerIndex], a = t.viewState, o = a.projection, s = a.resolution, u = a.center, l = a.rotation, c = t.pixelRatio, f = this.getLayer(), h = f.getSource(), p = h.getRevision(), d = h.getTileGridForProjection(o), v = d.getZForResolution(s, h.zDirection), g = d.getResolution(v), m = t.extent, y = i.extent && Dc(i.extent); y && (m = fd(m, Dc(i.extent))); var _ = h.getTilePixelRatio(c), w = Math.round(t.size[0] * _), x = Math.round(t.size[1] * _); if (l) { var C = Math.round(Math.sqrt(w * w + x * x)); w = C, x = C; } var S = g * w / 2 / _, b = g * x / 2 / _, E = [ u[0] - S, u[1] - b, u[0] + S, u[1] + b ], T = d.getTileRangeForExtentAndZ(m, v), P = {}; P[v] = {}; var I = this.createLoadedTileFinder(h, o, P), A = this.tmpExtent, L = this.tmpTileRange_; this.newTiles_ = !1; for (var D = T.minX; D <= T.maxX; ++D) for (var O = T.minY; O <= T.maxY; ++O) { var N = this.getTile(v, D, O, t); if (this.isDrawableTile(N)) { var F = Ft(this); if (N.getState() == It.LOADED) { P[v][N.tileCoord.toString()] = N; var k = N.inTransition(F); !this.newTiles_ && (k || this.renderedTiles.indexOf(N) === -1) && (this.newTiles_ = !0); } if (N.getAlpha(F, t.time) === 1) continue; } var G = d.getTileCoordChildTileRange(N.tileCoord, L, A), U = !1; G && (U = I(v + 1, G)), U || d.forEachTileCoordParentTileRange(N.tileCoord, I, L, A); } var B = g / s; Es(this.pixelTransform, t.size[0] / 2, t.size[1] / 2, 1 / _, 1 / _, l, -w / 2, -x / 2); var X = X5(this.pixelTransform); this.useContainer(n, X, i.opacity, this.getBackground(t)); var j = this.context, ae = j.canvas; nx(this.inversePixelTransform, this.pixelTransform), Es(this.tempTransform, w / 2, x / 2, B, B, 0, -w / 2, -x / 2), ae.width != w || ae.height != x ? (ae.width = w, ae.height = x) : this.containerReused || j.clearRect(0, 0, w, x), y && this.clipUnrotated(j, t, y), h.getInterpolate() || jn(j, gb), this.preRender(j, t), this.renderedTiles.length = 0; var se = Object.keys(P).map(Number); se.sort(Um); var $, V, q; i.opacity === 1 && (!this.containerReused || h.getOpaque(t.viewState.projection)) ? se = se.reverse() : ($ = [], V = []); for (var ee = se.length - 1; ee >= 0; --ee) { var Y = se[ee], K = h.getTilePixelSize(Y, c, o), fe = d.getResolution(Y), J = fe / g, ue = K[0] * J * B, ne = K[1] * J * B, ve = d.getTileCoordForCoordAndZ(Gy(E), Y), Pe = d.getTileCoordExtent(ve), Be = mn(this.tempTransform, [ _ * (Pe[0] - E[0]) / g, _ * (E[3] - Pe[3]) / g ]), ke = _ * h.getGutterForProjection(o), Le = P[Y]; for (var Ye in Le) { var N = Le[Ye], Oe = N.tileCoord, we = ve[1] - Oe[1], Je = Math.round(Be[0] - (we - 1) * ue), z = ve[2] - Oe[2], pe = Math.round(Be[1] - (z - 1) * ne), D = Math.round(Be[0] - we * ue), O = Math.round(Be[1] - z * ne), me = Je - D, De = pe - O, ot = v === Y, k = ot && N.getAlpha(Ft(this), t.time) !== 1, Kn = !1; if (!k) if ($) { q = [D, O, D + me, O, D + me, O + De, D, O + De]; for (var On = 0, Cr = $.length; On < Cr; ++On) if (v !== Y && Y < V[On]) { var Wt = $[On]; Ti([D, O, D + me, O + De], [Wt[0], Wt[3], Wt[4], Wt[7]]) && (Kn || (j.save(), Kn = !0), j.beginPath(), j.moveTo(q[0], q[1]), j.lineTo(q[2], q[3]), j.lineTo(q[4], q[5]), j.lineTo(q[6], q[7]), j.moveTo(Wt[6], Wt[7]), j.lineTo(Wt[4], Wt[5]), j.lineTo(Wt[2], Wt[3]), j.lineTo(Wt[0], Wt[1]), j.clip()); } $.push(q), V.push(Y); } else j.clearRect(D, O, me, De); this.drawTileImage(N, t, D, O, me, De, ke, ot), $ && !k ? (Kn && j.restore(), this.renderedTiles.unshift(N)) : this.renderedTiles.push(N), this.updateUsedTiles(t.usedTiles, h, N); } } this.renderedRevision = p, this.renderedResolution = g, this.extentChanged = !this.renderedExtent_ || !Yd(this.renderedExtent_, E), this.renderedExtent_ = E, this.renderedPixelRatio = c, this.renderedProjection = o, this.manageTilePyramid(t, h, d, c, o, m, v, f.getPreload()), this.scheduleExpireCache(t, h), this.postRender(j, t), i.extent && j.restore(), jn(j, Sre), X !== ae.style.transform && (ae.style.transform = X); var ka = bre(i.opacity), ri = this.container; return ka !== ri.style.opacity && (ri.style.opacity = ka), this.container; }, e.prototype.drawTileImage = function(t, n, i, a, o, s, u, l) { var c = this.getTileImage(t); if (!!c) { var f = Ft(this), h = l ? t.getAlpha(f, n.time) : 1, p = h !== this.context.globalAlpha; p && (this.context.save(), this.context.globalAlpha = h), this.context.drawImage(c, u, u, c.width - 2 * u, c.height - 2 * u, i, a, o, s), p && this.context.restore(), h !== 1 ? n.animate = !0 : l && t.endTransition(f); } }, e.prototype.getImage = function() { var t = this.context; return t ? t.canvas : null; }, e.prototype.getTileImage = function(t) { return t.getImage(); }, e.prototype.scheduleExpireCache = function(t, n) { if (n.canExpireCache()) { var i = function(a, o, s) { var u = Ft(a); u in s.usedTiles && a.expireCache(s.viewState.projection, s.usedTiles[u]); }.bind(null, n); t.postRenderFunctions.push( i ); } }, e.prototype.updateUsedTiles = function(t, n, i) { var a = Ft(n); a in t || (t[a] = {}), t[a][i.getKey()] = !0; }, e.prototype.manageTilePyramid = function(t, n, i, a, o, s, u, l, c) { var f = Ft(n); f in t.wantedTiles || (t.wantedTiles[f] = {}); var h = t.wantedTiles[f], p = t.tileQueue, d = i.getMinZoom(), v = 0, g, m, y, _, w, x; for (x = d; x <= u; ++x) for (m = i.getTileRangeForExtentAndZ(s, x, m), y = i.getResolution(x), _ = m.minX; _ <= m.maxX; ++_) for (w = m.minY; w <= m.maxY; ++w) u - x <= l ? (++v, g = n.getTile(x, _, w, a, o), g.getState() == It.IDLE && (h[g.getKey()] = !0, p.isKeyQueued(g.getKey()) || p.enqueue([ g, f, i.getTileCoordCenter(g.tileCoord), y ])), c !== void 0 && c(g)) : n.useTile(x, _, w, o); n.updateCacheSize(v, o); }, e; }(q5); const Tre = zXe; var $Xe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), HXe = function(r) { $Xe(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.createRenderer = function() { return new Tre(this); }, e; }(qYe); const Pre = HXe; var UXe = function() { function r(e) { this.opacity_ = e.opacity, this.rotateWithView_ = e.rotateWithView, this.rotation_ = e.rotation, this.scale_ = e.scale, this.scaleArray_ = jm(e.scale), this.displacement_ = e.displacement; } return r.prototype.clone = function() { var e = this.getScale(); return new r({ opacity: this.getOpacity(), scale: Array.isArray(e) ? e.slice() : e, rotation: this.getRotation(), rotateWithView: this.getRotateWithView(), displacement: this.getDisplacement().slice() }); }, r.prototype.getOpacity = function() { return this.opacity_; }, r.prototype.getRotateWithView = function() { return this.rotateWithView_; }, r.prototype.getRotation = function() { return this.rotation_; }, r.prototype.getScale = function() { return this.scale_; }, r.prototype.getScaleArray = function() { return this.scaleArray_; }, r.prototype.getDisplacement = function() { return this.displacement_; }, r.prototype.getAnchor = function() { return Mr(); }, r.prototype.getImage = function(e) { return Mr(); }, r.prototype.getHitDetectionImage = function() { return Mr(); }, r.prototype.getPixelRatio = function(e) { return 1; }, r.prototype.getImageState = function() { return Mr(); }, r.prototype.getImageSize = function() { return Mr(); }, r.prototype.getOrigin = function() { return Mr(); }, r.prototype.getSize = function() { return Mr(); }, r.prototype.setDisplacement = function(e) { this.displacement_ = e; }, r.prototype.setOpacity = function(e) { this.opacity_ = e; }, r.prototype.setRotateWithView = function(e) { this.rotateWithView_ = e; }, r.prototype.setRotation = function(e) { this.rotation_ = e; }, r.prototype.setScale = function(e) { this.scale_ = e, this.scaleArray_ = jm(e); }, r.prototype.listenImageChange = function(e) { Mr(); }, r.prototype.load = function() { Mr(); }, r.prototype.unlistenImageChange = function(e) { Mr(); }, r; }(); const Ire = UXe; function kl(r) { return Array.isArray(r) ? wre(r) : r; } var Are = "10px sans-serif", $c = "#000", mb = "round", k1 = [], V1 = 0, Ym = "round", G1 = 10, z1 = "#000", $1 = "center", yb = "middle", Xp = [0, 0, 0, 0], H1 = 1, gc = new Ps(), WXe = new zy(); WXe.setSize = function() { console.warn("labelCache is deprecated."); }; var wg = null, uO, lO = {}, jXe = function() { var r = 100, e = "32px ", t = ["monospace", "serif"], n = t.length, i = "wmytzilWMYTZIL@#/&?$%10\uF013", a, o; function s(l, c, f) { for (var h = !0, p = 0; p < n; ++p) { var d = t[p]; if (o = _b(l + " " + c + " " + e + d, i), f != d) { var v = _b(l + " " + c + " " + e + f + "," + d, i); h = h && v != o; } } return !!h; } function u() { for (var l = !0, c = gc.getKeys(), f = 0, h = c.length; f < h; ++f) { var p = c[f]; gc.get(p) < r && (s.apply(this, p.split(` `)) ? (By(lO), wg = null, uO = void 0, gc.set(p, r)) : (gc.set(p, gc.get(p) + 1, !0), l = !1)); } l && (clearInterval(a), a = void 0); } return function(l) { var c = Ere(l); if (!!c) for (var f = c.families, h = 0, p = f.length; h < p; ++h) { var d = f[h], v = c.style + ` ` + c.weight + ` ` + d; gc.get(v) === void 0 && (gc.set(v, r, !0), s(c.style, c.weight, d) || (gc.set(v, 0, !0), a === void 0 && (a = setInterval(u, 32)))); } }; }(), YXe = function() { var r; return function(e) { var t = lO[e]; if (t == null) { if (xP) { var n = Ere(e), i = Lre(e, "\u017Dg"), a = isNaN(Number(n.lineHeight)) ? 1.2 : Number(n.lineHeight); t = a * (i.actualBoundingBoxAscent + i.actualBoundingBoxDescent); } else r || (r = document.createElement("div"), r.innerHTML = "M", r.style.minHeight = "0", r.style.maxHeight = "none", r.style.height = "auto", r.style.padding = "0", r.style.border = "none", r.style.position = "absolute", r.style.display = "block", r.style.left = "-99999px"), r.style.font = e, document.body.appendChild(r), t = r.offsetHeight, document.body.removeChild(r); lO[e] = t; } return t; }; }(); function Lre(r, e) { return wg || (wg = Ss(1, 1)), r != uO && (wg.font = r, uO = wg.font), wg.measureText(e); } function _b(r, e) { return Lre(r, e).width; } function C$(r, e, t) { if (e in t) return t[e]; var n = _b(r, e); return t[e] = n, n; } function XXe(r, e) { for (var t = [], n = [], i = [], a = 0, o = 0, s = 0, u = 0, l = 0, c = e.length; l <= c; l += 2) { var f = e[l]; if (f === ` ` || l === c) { a = Math.max(a, o), i.push(o), o = 0, s += u; continue; } var h = e[l + 1] || r.font, p = _b(h, f); t.push(p), o += p; var d = YXe(h); n.push(d), u = Math.max(u, d); } return { width: a, height: s, widths: t, heights: n, lineWidths: i }; } function qXe(r, e, t, n, i, a, o, s, u, l, c) { r.save(), t !== 1 && (r.globalAlpha *= t), e && r.setTransform.apply(r, e), n.contextInstructions ? (r.translate(u, l), r.scale(c[0], c[1]), ZXe(n, r)) : c[0] < 0 || c[1] < 0 ? (r.translate(u, l), r.scale(c[0], c[1]), r.drawImage( n, i, a, o, s, 0, 0, o, s )) : r.drawImage( n, i, a, o, s, u, l, o * c[0], s * c[1] ), r.restore(); } function ZXe(r, e) { for (var t = r.contextInstructions, n = 0, i = t.length; n < i; n += 2) Array.isArray(t[n + 1]) ? e[t[n]].apply(e, t[n + 1]) : e[t[n]] = t[n + 1]; } var KXe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), JXe = function(r) { KXe(e, r); function e(t) { var n = this, i = t.rotateWithView !== void 0 ? t.rotateWithView : !1; return n = r.call(this, { opacity: 1, rotateWithView: i, rotation: t.rotation !== void 0 ? t.rotation : 0, scale: t.scale !== void 0 ? t.scale : 1, displacement: t.displacement !== void 0 ? t.displacement : [0, 0] }) || this, n.canvas_ = void 0, n.hitDetectionCanvas_ = null, n.fill_ = t.fill !== void 0 ? t.fill : null, n.origin_ = [0, 0], n.points_ = t.points, n.radius_ = t.radius !== void 0 ? t.radius : t.radius1, n.radius2_ = t.radius2, n.angle_ = t.angle !== void 0 ? t.angle : 0, n.stroke_ = t.stroke !== void 0 ? t.stroke : null, n.size_ = null, n.renderOptions_ = null, n.render(), n; } return e.prototype.clone = function() { var t = this.getScale(), n = new e({ fill: this.getFill() ? this.getFill().clone() : void 0, points: this.getPoints(), radius: this.getRadius(), radius2: this.getRadius2(), angle: this.getAngle(), stroke: this.getStroke() ? this.getStroke().clone() : void 0, rotation: this.getRotation(), rotateWithView: this.getRotateWithView(), scale: Array.isArray(t) ? t.slice() : t, displacement: this.getDisplacement().slice() }); return n.setOpacity(this.getOpacity()), n; }, e.prototype.getAnchor = function() { var t = this.size_; if (!t) return null; var n = this.getDisplacement(); return [t[0] / 2 - n[0], t[1] / 2 + n[1]]; }, e.prototype.getAngle = function() { return this.angle_; }, e.prototype.getFill = function() { return this.fill_; }, e.prototype.getHitDetectionImage = function() { return this.hitDetectionCanvas_ || this.createHitDetectionCanvas_(this.renderOptions_), this.hitDetectionCanvas_; }, e.prototype.getImage = function(t) { var n = this.canvas_[t]; if (!n) { var i = this.renderOptions_, a = Ss(i.size * t, i.size * t); this.draw_(i, a, t), n = a.canvas, this.canvas_[t] = n; } return n; }, e.prototype.getPixelRatio = function(t) { return t; }, e.prototype.getImageSize = function() { return this.size_; }, e.prototype.getImageState = function() { return hn.LOADED; }, e.prototype.getOrigin = function() { return this.origin_; }, e.prototype.getPoints = function() { return this.points_; }, e.prototype.getRadius = function() { return this.radius_; }, e.prototype.getRadius2 = function() { return this.radius2_; }, e.prototype.getSize = function() { return this.size_; }, e.prototype.getStroke = function() { return this.stroke_; }, e.prototype.listenImageChange = function(t) { }, e.prototype.load = function() { }, e.prototype.unlistenImageChange = function(t) { }, e.prototype.calculateLineJoinSize_ = function(t, n, i) { if (n === 0 || this.points_ === 1 / 0 || t !== "bevel" && t !== "miter") return n; var a = this.radius_, o = this.radius2_ === void 0 ? a : this.radius2_; if (a < o) { var s = a; a = o, o = s; } var u = this.radius2_ === void 0 ? this.points_ : this.points_ * 2, l = 2 * Math.PI / u, c = o * Math.sin(l), f = Math.sqrt(o * o - c * c), h = a - f, p = Math.sqrt(c * c + h * h), d = p / c; if (t === "miter" && d <= i) return d * n; var v = n / 2 / d, g = n / 2 * (h / p), m = Math.sqrt((a + v) * (a + v) + g * g), y = m - a; if (this.radius2_ === void 0 || t === "bevel") return y * 2; var _ = a * Math.sin(l), w = Math.sqrt(a * a - _ * _), x = o - w, C = Math.sqrt(_ * _ + x * x), S = C / _; if (S <= i) { var b = S * n / 2 - o - a; return 2 * Math.max(y, b); } return y * 2; }, e.prototype.createRenderOptions = function() { var t = Ym, n = 0, i = null, a = 0, o, s = 0; this.stroke_ && (o = this.stroke_.getColor(), o === null && (o = z1), o = kl(o), s = this.stroke_.getWidth(), s === void 0 && (s = H1), i = this.stroke_.getLineDash(), a = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = Ym), n = this.stroke_.getMiterLimit(), n === void 0 && (n = G1)); var u = this.calculateLineJoinSize_(t, s, n), l = Math.max(this.radius_, this.radius2_ || 0), c = Math.ceil(2 * l + u); return { strokeStyle: o, strokeWidth: s, size: c, lineDash: i, lineDashOffset: a, lineJoin: t, miterLimit: n }; }, e.prototype.render = function() { this.renderOptions_ = this.createRenderOptions(); var t = this.renderOptions_.size; this.canvas_ = {}, this.size_ = [t, t]; }, e.prototype.draw_ = function(t, n, i) { if (n.scale(i, i), n.translate(t.size / 2, t.size / 2), this.createPath_(n), this.fill_) { var a = this.fill_.getColor(); a === null && (a = $c), n.fillStyle = kl(a), n.fill(); } this.stroke_ && (n.strokeStyle = t.strokeStyle, n.lineWidth = t.strokeWidth, n.setLineDash && t.lineDash && (n.setLineDash(t.lineDash), n.lineDashOffset = t.lineDashOffset), n.lineJoin = t.lineJoin, n.miterLimit = t.miterLimit, n.stroke()); }, e.prototype.createHitDetectionCanvas_ = function(t) { if (this.fill_) { var n = this.fill_.getColor(), i = 0; if (typeof n == "string" && (n = vb(n)), n === null ? i = 1 : Array.isArray(n) && (i = n.length === 4 ? n[3] : 1), i === 0) { var a = Ss(t.size, t.size); this.hitDetectionCanvas_ = a.canvas, this.drawHitDetectionCanvas_(t, a); } } this.hitDetectionCanvas_ || (this.hitDetectionCanvas_ = this.getImage(1)); }, e.prototype.createPath_ = function(t) { var n = this.points_, i = this.radius_; if (n === 1 / 0) t.arc(0, 0, i, 0, 2 * Math.PI); else { var a = this.radius2_ === void 0 ? i : this.radius2_; this.radius2_ !== void 0 && (n *= 2); for (var o = this.angle_ - Math.PI / 2, s = 2 * Math.PI / n, u = 0; u < n; u++) { var l = o + u * s, c = u % 2 === 0 ? i : a; t.lineTo(c * Math.cos(l), c * Math.sin(l)); } t.closePath(); } }, e.prototype.drawHitDetectionCanvas_ = function(t, n) { n.translate(t.size / 2, t.size / 2), this.createPath_(n), n.fillStyle = $c, n.fill(), this.stroke_ && (n.strokeStyle = t.strokeStyle, n.lineWidth = t.strokeWidth, t.lineDash && (n.setLineDash(t.lineDash), n.lineDashOffset = t.lineDashOffset), n.lineJoin = t.lineJoin, n.miterLimit = t.miterLimit, n.stroke()); }, e; }(Ire); const QXe = JXe; var eqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), tqe = function(r) { eqe(e, r); function e(t) { var n = t || {}; return r.call(this, { points: 1 / 0, fill: n.fill, radius: n.radius, stroke: n.stroke, scale: n.scale !== void 0 ? n.scale : 1, rotation: n.rotation !== void 0 ? n.rotation : 0, rotateWithView: n.rotateWithView !== void 0 ? n.rotateWithView : !1, displacement: n.displacement !== void 0 ? n.displacement : [0, 0] }) || this; } return e.prototype.clone = function() { var t = this.getScale(), n = new e({ fill: this.getFill() ? this.getFill().clone() : void 0, stroke: this.getStroke() ? this.getStroke().clone() : void 0, radius: this.getRadius(), scale: Array.isArray(t) ? t.slice() : t, rotation: this.getRotation(), rotateWithView: this.getRotateWithView(), displacement: this.getDisplacement().slice() }); return n.setOpacity(this.getOpacity()), n; }, e.prototype.setRadius = function(t) { this.radius_ = t, this.render(); }, e; }(QXe); const U1 = tqe; var rqe = function() { function r(e) { var t = e || {}; this.color_ = t.color !== void 0 ? t.color : null; } return r.prototype.clone = function() { var e = this.getColor(); return new r({ color: Array.isArray(e) ? e.slice() : e || void 0 }); }, r.prototype.getColor = function() { return this.color_; }, r.prototype.setColor = function(e) { this.color_ = e; }, r; }(); const Vl = rqe; var nqe = function() { function r(e) { var t = e || {}; this.color_ = t.color !== void 0 ? t.color : null, this.lineCap_ = t.lineCap, this.lineDash_ = t.lineDash !== void 0 ? t.lineDash : null, this.lineDashOffset_ = t.lineDashOffset, this.lineJoin_ = t.lineJoin, this.miterLimit_ = t.miterLimit, this.width_ = t.width; } return r.prototype.clone = function() { var e = this.getColor(); return new r({ color: Array.isArray(e) ? e.slice() : e || void 0, lineCap: this.getLineCap(), lineDash: this.getLineDash() ? this.getLineDash().slice() : void 0, lineDashOffset: this.getLineDashOffset(), lineJoin: this.getLineJoin(), miterLimit: this.getMiterLimit(), width: this.getWidth() }); }, r.prototype.getColor = function() { return this.color_; }, r.prototype.getLineCap = function() { return this.lineCap_; }, r.prototype.getLineDash = function() { return this.lineDash_; }, r.prototype.getLineDashOffset = function() { return this.lineDashOffset_; }, r.prototype.getLineJoin = function() { return this.lineJoin_; }, r.prototype.getMiterLimit = function() { return this.miterLimit_; }, r.prototype.getWidth = function() { return this.width_; }, r.prototype.setColor = function(e) { this.color_ = e; }, r.prototype.setLineCap = function(e) { this.lineCap_ = e; }, r.prototype.setLineDash = function(e) { this.lineDash_ = e; }, r.prototype.setLineDashOffset = function(e) { this.lineDashOffset_ = e; }, r.prototype.setLineJoin = function(e) { this.lineJoin_ = e; }, r.prototype.setMiterLimit = function(e) { this.miterLimit_ = e; }, r.prototype.setWidth = function(e) { this.width_ = e; }, r; }(); const gh = nqe; var oh = function() { function r(e) { var t = e || {}; this.geometry_ = null, this.geometryFunction_ = S$, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; } return r.prototype.clone = function() { var e = this.getGeometry(); return e && typeof e == "object" && (e = e.clone()), new r({ geometry: e, fill: this.getFill() ? this.getFill().clone() : void 0, image: this.getImage() ? this.getImage().clone() : void 0, renderer: this.getRenderer(), stroke: this.getStroke() ? this.getStroke().clone() : void 0, text: this.getText() ? this.getText().clone() : void 0, zIndex: this.getZIndex() }); }, r.prototype.getRenderer = function() { return this.renderer_; }, r.prototype.setRenderer = function(e) { this.renderer_ = e; }, r.prototype.setHitDetectionRenderer = function(e) { this.hitDetectionRenderer_ = e; }, r.prototype.getHitDetectionRenderer = function() { return this.hitDetectionRenderer_; }, r.prototype.getGeometry = function() { return this.geometry_; }, r.prototype.getGeometryFunction = function() { return this.geometryFunction_; }, r.prototype.getFill = function() { return this.fill_; }, r.prototype.setFill = function(e) { this.fill_ = e; }, r.prototype.getImage = function() { return this.image_; }, r.prototype.setImage = function(e) { this.image_ = e; }, r.prototype.getStroke = function() { return this.stroke_; }, r.prototype.setStroke = function(e) { this.stroke_ = e; }, r.prototype.getText = function() { return this.text_; }, r.prototype.setText = function(e) { this.text_ = e; }, r.prototype.getZIndex = function() { return this.zIndex_; }, r.prototype.setGeometry = function(e) { typeof e == "function" ? this.geometryFunction_ = e : typeof e == "string" ? this.geometryFunction_ = function(t) { return t.get(e); } : e ? e !== void 0 && (this.geometryFunction_ = function() { return e; }) : this.geometryFunction_ = S$, this.geometry_ = e; }, r.prototype.setZIndex = function(e) { this.zIndex_ = e; }, r; }(); function iqe(r) { var e; if (typeof r == "function") e = r; else { var t; if (Array.isArray(r)) t = r; else { cn(typeof r.getZIndex == "function", 41); var n = r; t = [n]; } e = function() { return t; }; } return e; } var WL = null; function aqe(r, e) { if (!WL) { var t = new Vl({ color: "rgba(255,255,255,0.4)" }), n = new gh({ color: "#3399CC", width: 1.25 }); WL = [ new oh({ image: new U1({ fill: t, stroke: n, radius: 5 }), fill: t, stroke: n }) ]; } return WL; } function oqe() { var r = {}, e = [255, 255, 255, 1], t = [0, 153, 255, 1], n = 3; return r[Ee.POLYGON] = [ new oh({ fill: new Vl({ color: [255, 255, 255, 0.5] }) }) ], r[Ee.MULTI_POLYGON] = r[Ee.POLYGON], r[Ee.LINE_STRING] = [ new oh({ stroke: new gh({ color: e, width: n + 2 }) }), new oh({ stroke: new gh({ color: t, width: n }) }) ], r[Ee.MULTI_LINE_STRING] = r[Ee.LINE_STRING], r[Ee.CIRCLE] = r[Ee.POLYGON].concat(r[Ee.LINE_STRING]), r[Ee.POINT] = [ new oh({ image: new U1({ radius: n * 2, fill: new Vl({ color: t }), stroke: new gh({ color: e, width: n / 2 }) }), zIndex: 1 / 0 }) ], r[Ee.MULTI_POINT] = r[Ee.POINT], r[Ee.GEOMETRY_COLLECTION] = r[Ee.POLYGON].concat(r[Ee.LINE_STRING], r[Ee.POINT]), r; } function S$(r) { return r.getGeometry(); } var sqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), E$ = { RENDER_ORDER: "renderOrder" }, uqe = function(r) { sqe(e, r); function e(t) { var n = this, i = t || {}, a = jn({}, i); return delete a.style, delete a.renderBuffer, delete a.updateWhileAnimating, delete a.updateWhileInteracting, n = r.call(this, a) || this, n.declutter_ = i.declutter !== void 0 ? i.declutter : !1, n.renderBuffer_ = i.renderBuffer !== void 0 ? i.renderBuffer : 100, n.style_ = null, n.styleFunction_ = void 0, n.setStyle(i.style), n.updateWhileAnimating_ = i.updateWhileAnimating !== void 0 ? i.updateWhileAnimating : !1, n.updateWhileInteracting_ = i.updateWhileInteracting !== void 0 ? i.updateWhileInteracting : !1, n; } return e.prototype.getDeclutter = function() { return this.declutter_; }, e.prototype.getFeatures = function(t) { return r.prototype.getFeatures.call(this, t); }, e.prototype.getRenderBuffer = function() { return this.renderBuffer_; }, e.prototype.getRenderOrder = function() { return this.get(E$.RENDER_ORDER); }, e.prototype.getStyle = function() { return this.style_; }, e.prototype.getStyleFunction = function() { return this.styleFunction_; }, e.prototype.getUpdateWhileAnimating = function() { return this.updateWhileAnimating_; }, e.prototype.getUpdateWhileInteracting = function() { return this.updateWhileInteracting_; }, e.prototype.renderDeclutter = function(t) { t.declutterTree || (t.declutterTree = new IO(9)), this.getRenderer().renderDeclutter(t); }, e.prototype.setRenderOrder = function(t) { this.set(E$.RENDER_ORDER, t); }, e.prototype.setStyle = function(t) { this.style_ = t !== void 0 ? t : aqe, this.styleFunction_ = t === null ? void 0 : iqe(this.style_), this.changed(); }, e; }(ex); const SP = uqe; var ax = { BEGIN_GEOMETRY: 0, BEGIN_PATH: 1, CIRCLE: 2, CLOSE_PATH: 3, CUSTOM: 4, DRAW_CHARS: 5, DRAW_IMAGE: 6, END_GEOMETRY: 7, FILL: 8, MOVE_TO_LINE_TO: 9, SET_FILL_STYLE: 10, SET_STROKE_STYLE: 11, STROKE: 12 }, VC = [ax.FILL], sh = [ax.STROKE], qp = [ax.BEGIN_PATH], b$ = [ax.CLOSE_PATH]; const Ct = ax; var lqe = function() { function r() { } return r.prototype.drawCustom = function(e, t, n, i) { }, r.prototype.drawGeometry = function(e) { }, r.prototype.setStyle = function(e) { }, r.prototype.drawCircle = function(e, t) { }, r.prototype.drawFeature = function(e, t) { }, r.prototype.drawGeometryCollection = function(e, t) { }, r.prototype.drawLineString = function(e, t) { }, r.prototype.drawMultiLineString = function(e, t) { }, r.prototype.drawMultiPoint = function(e, t) { }, r.prototype.drawMultiPolygon = function(e, t) { }, r.prototype.drawPoint = function(e, t) { }, r.prototype.drawPolygon = function(e, t) { }, r.prototype.drawText = function(e, t) { }, r.prototype.setFillStrokeStyle = function(e, t) { }, r.prototype.setImageStyle = function(e, t) { }, r.prototype.setTextStyle = function(e, t) { }, r; }(); const Dre = lqe; function uh(r, e, t, n, i) { for (var a = i !== void 0 ? i : [], o = 0, s = e; s < t; s += n) a[o++] = r.slice(s, s + n); return a.length = o, a; } function W1(r, e, t, n, i) { for (var a = i !== void 0 ? i : [], o = 0, s = 0, u = t.length; s < u; ++s) { var l = t[s]; a[o++] = uh(r, e, l, n, a[o]), e = l; } return a.length = o, a; } function cO(r, e, t, n, i) { for (var a = i !== void 0 ? i : [], o = 0, s = 0, u = t.length; s < u; ++s) { var l = t[s]; a[o++] = W1(r, e, l, n, a[o]), e = l[l.length - 1]; } return a.length = o, a; } var cqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), fqe = function(r) { cqe(e, r); function e(t, n, i, a) { var o = r.call(this) || this; return o.tolerance = t, o.maxExtent = n, o.pixelRatio = a, o.maxLineWidth = 0, o.resolution = i, o.beginGeometryInstruction1_ = null, o.beginGeometryInstruction2_ = null, o.bufferedMaxExtent_ = null, o.instructions = [], o.coordinates = [], o.tmpCoordinate_ = [], o.hitDetectionInstructions = [], o.state = {}, o; } return e.prototype.applyPixelRatio = function(t) { var n = this.pixelRatio; return n == 1 ? t : t.map(function(i) { return i * n; }); }, e.prototype.appendFlatPointCoordinates = function(t, n) { for (var i = this.getBufferedMaxExtent(), a = this.tmpCoordinate_, o = this.coordinates, s = o.length, u = 0, l = t.length; u < l; u += n) a[0] = t[u], a[1] = t[u + 1], Vy(i, a) && (o[s++] = a[0], o[s++] = a[1]); return s; }, e.prototype.appendFlatLineCoordinates = function(t, n, i, a, o, s) { var u = this.coordinates, l = u.length, c = this.getBufferedMaxExtent(); s && (n += a); var f = t[n], h = t[n + 1], p = this.tmpCoordinate_, d = !0, v, g, m; for (v = n + a; v < i; v += a) p[0] = t[v], p[1] = t[v + 1], m = tO(c, p), m !== g ? (d && (u[l++] = f, u[l++] = h, d = !1), u[l++] = p[0], u[l++] = p[1]) : m === na.INTERSECTING ? (u[l++] = p[0], u[l++] = p[1], d = !1) : d = !0, f = p[0], h = p[1], g = m; return (o && d || v === n + a) && (u[l++] = f, u[l++] = h), l; }, e.prototype.drawCustomCoordinates_ = function(t, n, i, a, o) { for (var s = 0, u = i.length; s < u; ++s) { var l = i[s], c = this.appendFlatLineCoordinates(t, n, l, a, !1, !1); o.push(c), n = l; } return n; }, e.prototype.drawCustom = function(t, n, i, a) { this.beginGeometry(t, n); var o = t.getType(), s = t.getStride(), u = this.coordinates.length, l, c, f, h, p; switch (o) { case Ee.MULTI_POLYGON: l = t.getOrientedFlatCoordinates(), h = []; var d = t.getEndss(); p = 0; for (var v = 0, g = d.length; v < g; ++v) { var m = []; p = this.drawCustomCoordinates_(l, p, d[v], s, m), h.push(m); } this.instructions.push([ Ct.CUSTOM, u, h, t, i, cO ]), this.hitDetectionInstructions.push([ Ct.CUSTOM, u, h, t, a || i, cO ]); break; case Ee.POLYGON: case Ee.MULTI_LINE_STRING: f = [], l = o == Ee.POLYGON ? t.getOrientedFlatCoordinates() : t.getFlatCoordinates(), p = this.drawCustomCoordinates_( l, 0, t.getEnds(), s, f ), this.instructions.push([ Ct.CUSTOM, u, f, t, i, W1 ]), this.hitDetectionInstructions.push([ Ct.CUSTOM, u, f, t, a || i, W1 ]); break; case Ee.LINE_STRING: case Ee.CIRCLE: l = t.getFlatCoordinates(), c = this.appendFlatLineCoordinates(l, 0, l.length, s, !1, !1), this.instructions.push([ Ct.CUSTOM, u, c, t, i, uh ]), this.hitDetectionInstructions.push([ Ct.CUSTOM, u, c, t, a || i, uh ]); break; case Ee.MULTI_POINT: l = t.getFlatCoordinates(), c = this.appendFlatPointCoordinates(l, s), c > u && (this.instructions.push([ Ct.CUSTOM, u, c, t, i, uh ]), this.hitDetectionInstructions.push([ Ct.CUSTOM, u, c, t, a || i, uh ])); break; case Ee.POINT: l = t.getFlatCoordinates(), this.coordinates.push(l[0], l[1]), c = this.coordinates.length, this.instructions.push([ Ct.CUSTOM, u, c, t, i ]), this.hitDetectionInstructions.push([ Ct.CUSTOM, u, c, t, a || i ]); break; } this.endGeometry(n); }, e.prototype.beginGeometry = function(t, n) { this.beginGeometryInstruction1_ = [ Ct.BEGIN_GEOMETRY, n, 0, t ], this.instructions.push(this.beginGeometryInstruction1_), this.beginGeometryInstruction2_ = [ Ct.BEGIN_GEOMETRY, n, 0, t ], this.hitDetectionInstructions.push(this.beginGeometryInstruction2_); }, e.prototype.finish = function() { return { instructions: this.instructions, hitDetectionInstructions: this.hitDetectionInstructions, coordinates: this.coordinates }; }, e.prototype.reverseHitDetectionInstructions = function() { var t = this.hitDetectionInstructions; t.reverse(); var n, i = t.length, a, o, s = -1; for (n = 0; n < i; ++n) a = t[n], o = a[0], o == Ct.END_GEOMETRY ? s = n : o == Ct.BEGIN_GEOMETRY && (a[2] = n, TYe(this.hitDetectionInstructions, s, n), s = -1); }, e.prototype.setFillStrokeStyle = function(t, n) { var i = this.state; if (t) { var a = t.getColor(); i.fillStyle = kl(a || $c); } else i.fillStyle = void 0; if (n) { var o = n.getColor(); i.strokeStyle = kl(o || z1); var s = n.getLineCap(); i.lineCap = s !== void 0 ? s : mb; var u = n.getLineDash(); i.lineDash = u ? u.slice() : k1; var l = n.getLineDashOffset(); i.lineDashOffset = l || V1; var c = n.getLineJoin(); i.lineJoin = c !== void 0 ? c : Ym; var f = n.getWidth(); i.lineWidth = f !== void 0 ? f : H1; var h = n.getMiterLimit(); i.miterLimit = h !== void 0 ? h : G1, i.lineWidth > this.maxLineWidth && (this.maxLineWidth = i.lineWidth, this.bufferedMaxExtent_ = null); } else i.strokeStyle = void 0, i.lineCap = void 0, i.lineDash = null, i.lineDashOffset = void 0, i.lineJoin = void 0, i.lineWidth = void 0, i.miterLimit = void 0; }, e.prototype.createFill = function(t) { var n = t.fillStyle, i = [Ct.SET_FILL_STYLE, n]; return typeof n != "string" && i.push(!0), i; }, e.prototype.applyStroke = function(t) { this.instructions.push(this.createStroke(t)); }, e.prototype.createStroke = function(t) { return [ Ct.SET_STROKE_STYLE, t.strokeStyle, t.lineWidth * this.pixelRatio, t.lineCap, t.lineJoin, t.miterLimit, this.applyPixelRatio(t.lineDash), t.lineDashOffset * this.pixelRatio ]; }, e.prototype.updateFillStyle = function(t, n) { var i = t.fillStyle; (typeof i != "string" || t.currentFillStyle != i) && (i !== void 0 && this.instructions.push(n.call(this, t)), t.currentFillStyle = i); }, e.prototype.updateStrokeStyle = function(t, n) { var i = t.strokeStyle, a = t.lineCap, o = t.lineDash, s = t.lineDashOffset, u = t.lineJoin, l = t.lineWidth, c = t.miterLimit; (t.currentStrokeStyle != i || t.currentLineCap != a || o != t.currentLineDash && !Zh(t.currentLineDash, o) || t.currentLineDashOffset != s || t.currentLineJoin != u || t.currentLineWidth != l || t.currentMiterLimit != c) && (i !== void 0 && n.call(this, t), t.currentStrokeStyle = i, t.currentLineCap = a, t.currentLineDash = o, t.currentLineDashOffset = s, t.currentLineJoin = u, t.currentLineWidth = l, t.currentMiterLimit = c); }, e.prototype.endGeometry = function(t) { this.beginGeometryInstruction1_[2] = this.instructions.length, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length, this.beginGeometryInstruction2_ = null; var n = [Ct.END_GEOMETRY, t]; this.instructions.push(n), this.hitDetectionInstructions.push(n); }, e.prototype.getBufferedMaxExtent = function() { if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = ire(this.maxExtent), this.maxLineWidth > 0)) { var t = this.resolution * (this.maxLineWidth + 1) / 2; $m(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); } return this.bufferedMaxExtent_; }, e; }(Dre); const ox = fqe; var hqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), pqe = function(r) { hqe(e, r); function e(t, n, i, a) { var o = r.call(this, t, n, i, a) || this; return o.hitDetectionImage_ = null, o.image_ = null, o.imagePixelRatio_ = void 0, o.anchorX_ = void 0, o.anchorY_ = void 0, o.height_ = void 0, o.opacity_ = void 0, o.originX_ = void 0, o.originY_ = void 0, o.rotateWithView_ = void 0, o.rotation_ = void 0, o.scale_ = void 0, o.width_ = void 0, o.declutterImageWithText_ = void 0, o; } return e.prototype.drawPoint = function(t, n) { if (!!this.image_) { this.beginGeometry(t, n); var i = t.getFlatCoordinates(), a = t.getStride(), o = this.coordinates.length, s = this.appendFlatPointCoordinates(i, a); this.instructions.push([ Ct.DRAW_IMAGE, o, s, this.image_, this.anchorX_ * this.imagePixelRatio_, this.anchorY_ * this.imagePixelRatio_, Math.ceil(this.height_ * this.imagePixelRatio_), this.opacity_, this.originX_, this.originY_, this.rotateWithView_, this.rotation_, [ this.scale_[0] * this.pixelRatio / this.imagePixelRatio_, this.scale_[1] * this.pixelRatio / this.imagePixelRatio_ ], Math.ceil(this.width_ * this.imagePixelRatio_), this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ Ct.DRAW_IMAGE, o, s, this.hitDetectionImage_, this.anchorX_, this.anchorY_, this.height_, this.opacity_, this.originX_, this.originY_, this.rotateWithView_, this.rotation_, this.scale_, this.width_, this.declutterImageWithText_ ]), this.endGeometry(n); } }, e.prototype.drawMultiPoint = function(t, n) { if (!!this.image_) { this.beginGeometry(t, n); var i = t.getFlatCoordinates(), a = t.getStride(), o = this.coordinates.length, s = this.appendFlatPointCoordinates(i, a); this.instructions.push([ Ct.DRAW_IMAGE, o, s, this.image_, this.anchorX_ * this.imagePixelRatio_, this.anchorY_ * this.imagePixelRatio_, Math.ceil(this.height_ * this.imagePixelRatio_), this.opacity_, this.originX_, this.originY_, this.rotateWithView_, this.rotation_, [ this.scale_[0] * this.pixelRatio / this.imagePixelRatio_, this.scale_[1] * this.pixelRatio / this.imagePixelRatio_ ], Math.ceil(this.width_ * this.imagePixelRatio_), this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ Ct.DRAW_IMAGE, o, s, this.hitDetectionImage_, this.anchorX_, this.anchorY_, this.height_, this.opacity_, this.originX_, this.originY_, this.rotateWithView_, this.rotation_, this.scale_, this.width_, this.declutterImageWithText_ ]), this.endGeometry(n); } }, e.prototype.finish = function() { return this.reverseHitDetectionInstructions(), this.anchorX_ = void 0, this.anchorY_ = void 0, this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.height_ = void 0, this.scale_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.width_ = void 0, r.prototype.finish.call(this); }, e.prototype.setImageStyle = function(t, n) { var i = t.getAnchor(), a = t.getSize(), o = t.getHitDetectionImage(), s = t.getImage(this.pixelRatio), u = t.getOrigin(); this.imagePixelRatio_ = t.getPixelRatio(this.pixelRatio), this.anchorX_ = i[0], this.anchorY_ = i[1], this.hitDetectionImage_ = o, this.image_ = s, this.height_ = a[1], this.opacity_ = t.getOpacity(), this.originX_ = u[0] * this.imagePixelRatio_, this.originY_ = u[1] * this.imagePixelRatio_, this.rotateWithView_ = t.getRotateWithView(), this.rotation_ = t.getRotation(), this.scale_ = t.getScaleArray(), this.width_ = a[0], this.declutterImageWithText_ = n; }, e; }(ox); const dqe = pqe; var vqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), gqe = function(r) { vqe(e, r); function e(t, n, i, a) { return r.call(this, t, n, i, a) || this; } return e.prototype.drawFlatCoordinates_ = function(t, n, i, a) { var o = this.coordinates.length, s = this.appendFlatLineCoordinates(t, n, i, a, !1, !1), u = [ Ct.MOVE_TO_LINE_TO, o, s ]; return this.instructions.push(u), this.hitDetectionInstructions.push(u), i; }, e.prototype.drawLineString = function(t, n) { var i = this.state, a = i.strokeStyle, o = i.lineWidth; if (!(a === void 0 || o === void 0)) { this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(t, n), this.hitDetectionInstructions.push([ Ct.SET_STROKE_STYLE, i.strokeStyle, i.lineWidth, i.lineCap, i.lineJoin, i.miterLimit, k1, V1 ], qp); var s = t.getFlatCoordinates(), u = t.getStride(); this.drawFlatCoordinates_(s, 0, s.length, u), this.hitDetectionInstructions.push(sh), this.endGeometry(n); } }, e.prototype.drawMultiLineString = function(t, n) { var i = this.state, a = i.strokeStyle, o = i.lineWidth; if (!(a === void 0 || o === void 0)) { this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(t, n), this.hitDetectionInstructions.push([ Ct.SET_STROKE_STYLE, i.strokeStyle, i.lineWidth, i.lineCap, i.lineJoin, i.miterLimit, i.lineDash, i.lineDashOffset ], qp); for (var s = t.getEnds(), u = t.getFlatCoordinates(), l = t.getStride(), c = 0, f = 0, h = s.length; f < h; ++f) c = this.drawFlatCoordinates_( u, c, s[f], l ); this.hitDetectionInstructions.push(sh), this.endGeometry(n); } }, e.prototype.finish = function() { var t = this.state; return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(sh), this.reverseHitDetectionInstructions(), this.state = null, r.prototype.finish.call(this); }, e.prototype.applyStroke = function(t) { t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(sh), t.lastStroke = this.coordinates.length), t.lastStroke = 0, r.prototype.applyStroke.call(this, t), this.instructions.push(qp); }, e; }(ox); const mqe = gqe; function K5(r, e, t, n, i, a, o) { var s = (t - e) / n; if (s < 3) { for (; e < t; e += n) a[o++] = r[e], a[o++] = r[e + 1]; return o; } var u = new Array(s); u[0] = 1, u[s - 1] = 1; for (var l = [e, t - n], c = 0; l.length > 0; ) { for (var f = l.pop(), h = l.pop(), p = 0, d = r[h], v = r[h + 1], g = r[f], m = r[f + 1], y = h + n; y < f; y += n) { var _ = r[y], w = r[y + 1], x = Wje(_, w, d, v, g, m); x > p && (c = y, p = x); } p > i && (u[(c - e) / n] = 1, h + n < c && l.push(h, c), c + n < f && l.push(c, f)); } for (var y = 0; y < s; ++y) u[y] && (a[o++] = r[e + y * n], a[o++] = r[e + y * n + 1]); return o; } function yqe(r, e, t, n, i, a, o, s) { for (var u = 0, l = t.length; u < l; ++u) { var c = t[u]; o = K5(r, e, c, n, i, a, o), s.push(o), e = c; } return o; } function Np(r, e) { return e * Math.round(r / e); } function _qe(r, e, t, n, i, a, o) { if (e == t) return o; var s = Np(r[e], i), u = Np(r[e + 1], i); e += n, a[o++] = s, a[o++] = u; var l, c; do if (l = Np(r[e], i), c = Np(r[e + 1], i), e += n, e == t) return a[o++] = l, a[o++] = c, o; while (l == s && c == u); for (; e < t; ) { var f = Np(r[e], i), h = Np(r[e + 1], i); if (e += n, !(f == l && h == c)) { var p = l - s, d = c - u, v = f - s, g = h - u; if (p * g == d * v && (p < 0 && v < p || p == v || p > 0 && v > p) && (d < 0 && g < d || d == g || d > 0 && g > d)) { l = f, c = h; continue; } a[o++] = l, a[o++] = c, s = l, u = c, l = f, c = h; } } return a[o++] = l, a[o++] = c, o; } function Mre(r, e, t, n, i, a, o, s) { for (var u = 0, l = t.length; u < l; ++u) { var c = t[u]; o = _qe(r, e, c, n, i, a, o), s.push(o), e = c; } return o; } function wqe(r, e, t, n, i, a, o, s) { for (var u = 0, l = t.length; u < l; ++u) { var c = t[u], f = []; o = Mre(r, e, c, n, i, a, o, f), s.push(f), e = c[c.length - 1]; } return o; } var xqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Cqe = function(r) { xqe(e, r); function e(t, n, i, a) { return r.call(this, t, n, i, a) || this; } return e.prototype.drawFlatCoordinatess_ = function(t, n, i, a) { var o = this.state, s = o.fillStyle !== void 0, u = o.strokeStyle !== void 0, l = i.length; this.instructions.push(qp), this.hitDetectionInstructions.push(qp); for (var c = 0; c < l; ++c) { var f = i[c], h = this.coordinates.length, p = this.appendFlatLineCoordinates(t, n, f, a, !0, !u), d = [ Ct.MOVE_TO_LINE_TO, h, p ]; this.instructions.push(d), this.hitDetectionInstructions.push(d), u && (this.instructions.push(b$), this.hitDetectionInstructions.push(b$)), n = f; } return s && (this.instructions.push(VC), this.hitDetectionInstructions.push(VC)), u && (this.instructions.push(sh), this.hitDetectionInstructions.push(sh)), n; }, e.prototype.drawCircle = function(t, n) { var i = this.state, a = i.fillStyle, o = i.strokeStyle; if (!(a === void 0 && o === void 0)) { this.setFillStrokeStyles_(), this.beginGeometry(t, n), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ Ct.SET_FILL_STYLE, $c ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ Ct.SET_STROKE_STYLE, i.strokeStyle, i.lineWidth, i.lineCap, i.lineJoin, i.miterLimit, i.lineDash, i.lineDashOffset ]); var s = t.getFlatCoordinates(), u = t.getStride(), l = this.coordinates.length; this.appendFlatLineCoordinates(s, 0, s.length, u, !1, !1); var c = [Ct.CIRCLE, l]; this.instructions.push(qp, c), this.hitDetectionInstructions.push(qp, c), i.fillStyle !== void 0 && (this.instructions.push(VC), this.hitDetectionInstructions.push(VC)), i.strokeStyle !== void 0 && (this.instructions.push(sh), this.hitDetectionInstructions.push(sh)), this.endGeometry(n); } }, e.prototype.drawPolygon = function(t, n) { var i = this.state, a = i.fillStyle, o = i.strokeStyle; if (!(a === void 0 && o === void 0)) { this.setFillStrokeStyles_(), this.beginGeometry(t, n), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ Ct.SET_FILL_STYLE, $c ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ Ct.SET_STROKE_STYLE, i.strokeStyle, i.lineWidth, i.lineCap, i.lineJoin, i.miterLimit, i.lineDash, i.lineDashOffset ]); var s = t.getEnds(), u = t.getOrientedFlatCoordinates(), l = t.getStride(); this.drawFlatCoordinatess_( u, 0, s, l ), this.endGeometry(n); } }, e.prototype.drawMultiPolygon = function(t, n) { var i = this.state, a = i.fillStyle, o = i.strokeStyle; if (!(a === void 0 && o === void 0)) { this.setFillStrokeStyles_(), this.beginGeometry(t, n), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ Ct.SET_FILL_STYLE, $c ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ Ct.SET_STROKE_STYLE, i.strokeStyle, i.lineWidth, i.lineCap, i.lineJoin, i.miterLimit, i.lineDash, i.lineDashOffset ]); for (var s = t.getEndss(), u = t.getOrientedFlatCoordinates(), l = t.getStride(), c = 0, f = 0, h = s.length; f < h; ++f) c = this.drawFlatCoordinatess_(u, c, s[f], l); this.endGeometry(n); } }, e.prototype.finish = function() { this.reverseHitDetectionInstructions(), this.state = null; var t = this.tolerance; if (t !== 0) for (var n = this.coordinates, i = 0, a = n.length; i < a; ++i) n[i] = Np(n[i], t); return r.prototype.finish.call(this); }, e.prototype.setFillStrokeStyles_ = function() { var t = this.state, n = t.fillStyle; n !== void 0 && this.updateFillStyle(t, this.createFill), t.strokeStyle !== void 0 && this.updateStrokeStyle(t, this.applyStroke); }, e; }(ox); const T$ = Cqe, Ore = { POINT: "point", LINE: "line" }; function Sqe(r, e, t, n, i) { var a = t, o = t, s = 0, u = 0, l = t, c, f, h, p, d, v, g, m, y, _; for (f = t; f < n; f += i) { var w = e[f], x = e[f + 1]; d !== void 0 && (y = w - d, _ = x - v, p = Math.sqrt(y * y + _ * _), g !== void 0 && (u += h, c = Math.acos((g * y + m * _) / (h * p)), c > r && (u > s && (s = u, a = l, o = f), u = 0, l = f - i)), h = p, g = y, m = _), d = w, v = x; } return u += p, u > s ? [l, f] : [a, o]; } var Eqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), wb = { left: 0, end: 0, center: 0.5, right: 1, start: 1, top: 0, middle: 0.5, hanging: 0.2, alphabetic: 0.8, ideographic: 0.8, bottom: 1 }, bqe = function(r) { Eqe(e, r); function e(t, n, i, a) { var o = r.call(this, t, n, i, a) || this; return o.labels_ = null, o.text_ = "", o.textOffsetX_ = 0, o.textOffsetY_ = 0, o.textRotateWithView_ = void 0, o.textRotation_ = 0, o.textFillState_ = null, o.fillStates = {}, o.textStrokeState_ = null, o.strokeStates = {}, o.textState_ = {}, o.textStates = {}, o.textKey_ = "", o.fillKey_ = "", o.strokeKey_ = "", o.declutterImageWithText_ = void 0, o; } return e.prototype.finish = function() { var t = r.prototype.finish.call(this); return t.textStates = this.textStates, t.fillStates = this.fillStates, t.strokeStates = this.strokeStates, t; }, e.prototype.drawText = function(t, n) { var i = this.textFillState_, a = this.textStrokeState_, o = this.textState_; if (!(this.text_ === "" || !o || !i && !a)) { var s = this.coordinates, u = s.length, l = t.getType(), c = null, f = t.getStride(); if (o.placement === Ore.LINE && (l == Ee.LINE_STRING || l == Ee.MULTI_LINE_STRING || l == Ee.POLYGON || l == Ee.MULTI_POLYGON)) { if (!Ti(this.getBufferedMaxExtent(), t.getExtent())) return; var h = void 0; if (c = t.getFlatCoordinates(), l == Ee.LINE_STRING) h = [c.length]; else if (l == Ee.MULTI_LINE_STRING) h = t.getEnds(); else if (l == Ee.POLYGON) h = t.getEnds().slice(0, 1); else if (l == Ee.MULTI_POLYGON) { var p = t.getEndss(); h = []; for (var d = 0, v = p.length; d < v; ++d) h.push(p[d][0]); } this.beginGeometry(t, n); for (var g = o.textAlign, m = 0, y = void 0, _ = 0, w = h.length; _ < w; ++_) { if (g == null) { var x = Sqe(o.maxAngle, c, m, h[_], f); m = x[0], y = x[1]; } else y = h[_]; for (var d = m; d < y; d += f) s.push(c[d], c[d + 1]); var C = s.length; m = h[_], this.drawChars_(u, C), u = C; } this.endGeometry(n); } else { var S = o.overflow ? null : []; switch (l) { case Ee.POINT: case Ee.MULTI_POINT: c = t.getFlatCoordinates(); break; case Ee.LINE_STRING: c = t.getFlatMidpoint(); break; case Ee.CIRCLE: c = t.getCenter(); break; case Ee.MULTI_LINE_STRING: c = t.getFlatMidpoints(), f = 2; break; case Ee.POLYGON: c = t.getFlatInteriorPoint(), o.overflow || S.push(c[2] / this.resolution), f = 3; break; case Ee.MULTI_POLYGON: var b = t.getFlatInteriorPoints(); c = []; for (var d = 0, v = b.length; d < v; d += 3) o.overflow || S.push(b[d + 2] / this.resolution), c.push(b[d], b[d + 1]); if (c.length === 0) return; f = 2; break; } var C = this.appendFlatPointCoordinates(c, f); if (C === u) return; if (S && (C - u) / 2 !== c.length / f) { var E = u / 2; S = S.filter(function(F, k) { var G = s[(E + k) * 2] === c[k * f] && s[(E + k) * 2 + 1] === c[k * f + 1]; return G || --E, G; }); } this.saveTextStates_(), (o.backgroundFill || o.backgroundStroke) && (this.setFillStrokeStyle(o.backgroundFill, o.backgroundStroke), o.backgroundFill && (this.updateFillStyle(this.state, this.createFill), this.hitDetectionInstructions.push(this.createFill(this.state))), o.backgroundStroke && (this.updateStrokeStyle(this.state, this.applyStroke), this.hitDetectionInstructions.push(this.createStroke(this.state)))), this.beginGeometry(t, n); var T = o.padding; if (T != Xp && (o.scale[0] < 0 || o.scale[1] < 0)) { var P = o.padding[0], I = o.padding[1], A = o.padding[2], L = o.padding[3]; o.scale[0] < 0 && (I = -I, L = -L), o.scale[1] < 0 && (P = -P, A = -A), T = [P, I, A, L]; } var D = this.pixelRatio; this.instructions.push([ Ct.DRAW_IMAGE, u, C, null, NaN, NaN, NaN, 1, 0, 0, this.textRotateWithView_, this.textRotation_, [1, 1], NaN, this.declutterImageWithText_, T == Xp ? Xp : T.map(function(F) { return F * D; }), !!o.backgroundFill, !!o.backgroundStroke, this.text_, this.textKey_, this.strokeKey_, this.fillKey_, this.textOffsetX_, this.textOffsetY_, S ]); var O = 1 / D; this.hitDetectionInstructions.push([ Ct.DRAW_IMAGE, u, C, null, NaN, NaN, NaN, 1, 0, 0, this.textRotateWithView_, this.textRotation_, [O, O], NaN, this.declutterImageWithText_, T, !!o.backgroundFill, !!o.backgroundStroke, this.text_, this.textKey_, this.strokeKey_, this.fillKey_, this.textOffsetX_, this.textOffsetY_, S ]), this.endGeometry(n); } } }, e.prototype.saveTextStates_ = function() { var t = this.textStrokeState_, n = this.textState_, i = this.textFillState_, a = this.strokeKey_; t && (a in this.strokeStates || (this.strokeStates[a] = { strokeStyle: t.strokeStyle, lineCap: t.lineCap, lineDashOffset: t.lineDashOffset, lineWidth: t.lineWidth, lineJoin: t.lineJoin, miterLimit: t.miterLimit, lineDash: t.lineDash })); var o = this.textKey_; o in this.textStates || (this.textStates[o] = { font: n.font, textAlign: n.textAlign || $1, textBaseline: n.textBaseline || yb, scale: n.scale }); var s = this.fillKey_; i && (s in this.fillStates || (this.fillStates[s] = { fillStyle: i.fillStyle })); }, e.prototype.drawChars_ = function(t, n) { var i = this.textStrokeState_, a = this.textState_, o = this.strokeKey_, s = this.textKey_, u = this.fillKey_; this.saveTextStates_(); var l = this.pixelRatio, c = wb[a.textBaseline], f = this.textOffsetY_ * l, h = this.text_, p = i ? i.lineWidth * Math.abs(a.scale[0]) / 2 : 0; this.instructions.push([ Ct.DRAW_CHARS, t, n, c, a.overflow, u, a.maxAngle, l, f, o, p * l, h, s, 1 ]), this.hitDetectionInstructions.push([ Ct.DRAW_CHARS, t, n, c, a.overflow, u, a.maxAngle, 1, f, o, p, h, s, 1 / l ]); }, e.prototype.setTextStyle = function(t, n) { var i, a, o; if (!t) this.text_ = ""; else { var s = t.getFill(); s ? (a = this.textFillState_, a || (a = {}, this.textFillState_ = a), a.fillStyle = kl(s.getColor() || $c)) : (a = null, this.textFillState_ = a); var u = t.getStroke(); if (!u) o = null, this.textStrokeState_ = o; else { o = this.textStrokeState_, o || (o = {}, this.textStrokeState_ = o); var l = u.getLineDash(), c = u.getLineDashOffset(), f = u.getWidth(), h = u.getMiterLimit(); o.lineCap = u.getLineCap() || mb, o.lineDash = l ? l.slice() : k1, o.lineDashOffset = c === void 0 ? V1 : c, o.lineJoin = u.getLineJoin() || Ym, o.lineWidth = f === void 0 ? H1 : f, o.miterLimit = h === void 0 ? G1 : h, o.strokeStyle = kl(u.getColor() || z1); } i = this.textState_; var p = t.getFont() || Are; jXe(p); var d = t.getScaleArray(); i.overflow = t.getOverflow(), i.font = p, i.maxAngle = t.getMaxAngle(), i.placement = t.getPlacement(), i.textAlign = t.getTextAlign(), i.textBaseline = t.getTextBaseline() || yb, i.backgroundFill = t.getBackgroundFill(), i.backgroundStroke = t.getBackgroundStroke(), i.padding = t.getPadding() || Xp, i.scale = d === void 0 ? [1, 1] : d; var v = t.getOffsetX(), g = t.getOffsetY(), m = t.getRotateWithView(), y = t.getRotation(); this.text_ = t.getText() || "", this.textOffsetX_ = v === void 0 ? 0 : v, this.textOffsetY_ = g === void 0 ? 0 : g, this.textRotateWithView_ = m === void 0 ? !1 : m, this.textRotation_ = y === void 0 ? 0 : y, this.strokeKey_ = o ? (typeof o.strokeStyle == "string" ? o.strokeStyle : Ft(o.strokeStyle)) + o.lineCap + o.lineDashOffset + "|" + o.lineWidth + o.lineJoin + o.miterLimit + "[" + o.lineDash.join() + "]" : "", this.textKey_ = i.font + i.scale + (i.textAlign || "?") + (i.textBaseline || "?"), this.fillKey_ = a ? typeof a.fillStyle == "string" ? a.fillStyle : "|" + Ft(a.fillStyle) : ""; } this.declutterImageWithText_ = n; }, e; }(ox); const Tqe = bqe; var Pqe = { Circle: T$, Default: ox, Image: dqe, LineString: mqe, Polygon: T$, Text: Tqe }, Iqe = function() { function r(e, t, n, i) { this.tolerance_ = e, this.maxExtent_ = t, this.pixelRatio_ = i, this.resolution_ = n, this.buildersByZIndex_ = {}; } return r.prototype.finish = function() { var e = {}; for (var t in this.buildersByZIndex_) { e[t] = e[t] || {}; var n = this.buildersByZIndex_[t]; for (var i in n) { var a = n[i].finish(); e[t][i] = a; } } return e; }, r.prototype.getBuilder = function(e, t) { var n = e !== void 0 ? e.toString() : "0", i = this.buildersByZIndex_[n]; i === void 0 && (i = {}, this.buildersByZIndex_[n] = i); var a = i[t]; if (a === void 0) { var o = Pqe[t]; a = new o(this.tolerance_, this.maxExtent_, this.resolution_, this.pixelRatio_), i[t] = a; } return a; }, r; }(); const xb = Iqe, jt = { CIRCLE: "Circle", DEFAULT: "Default", IMAGE: "Image", LINE_STRING: "LineString", POLYGON: "Polygon", TEXT: "Text" }; function pd(r, e, t, n, i, a) { for (var o = a || [], s = 0, u = e; u < t; u += n) { var l = r[u], c = r[u + 1]; o[s++] = i[0] * l + i[2] * c + i[4], o[s++] = i[1] * l + i[3] * c + i[5]; } return a && o.length != s && (o.length = s), o; } function J5(r, e, t, n, i, a, o) { for (var s = o || [], u = Math.cos(i), l = Math.sin(i), c = a[0], f = a[1], h = 0, p = e; p < t; p += n) { var d = r[p] - c, v = r[p + 1] - f; s[h++] = c + d * u - v * l, s[h++] = f + d * l + v * u; for (var g = p + 2; g < p + n; ++g) s[h++] = r[g]; } return o && s.length != h && (s.length = h), s; } function Aqe(r, e, t, n, i, a, o, s) { for (var u = s || [], l = o[0], c = o[1], f = 0, h = e; h < t; h += n) { var p = r[h] - l, d = r[h + 1] - c; u[f++] = l + i * p, u[f++] = c + a * d; for (var v = h + 2; v < h + n; ++v) u[f++] = r[v]; } return s && u.length != f && (u.length = f), u; } function Rre(r, e, t, n, i, a, o) { for (var s = o || [], u = 0, l = e; l < t; l += n) { s[u++] = r[l] + i, s[u++] = r[l + 1] + a; for (var c = l + 2; c < l + n; ++c) s[u++] = r[c]; } return o && s.length != u && (s.length = u), s; } function Lqe(r, e, t, n, i, a, o, s, u, l, c, f) { var h = r[e], p = r[e + 1], d = 0, v = 0, g = 0, m = 0; function y() { d = h, v = p, e += n, h = r[e], p = r[e + 1], m += g, g = Math.sqrt((h - d) * (h - d) + (p - v) * (p - v)); } do y(); while (e < t - n && m + g < a); for (var _ = g === 0 ? 0 : (a - m) / g, w = xc(d, h, _), x = xc(v, p, _), C = e - n, S = m, b = a + s * u(l, i, c); e < t - n && m + g < b; ) y(); _ = g === 0 ? 0 : (b - m) / g; var E = xc(d, h, _), T = xc(v, p, _), P; if (f) { var I = [w, x, E, T]; J5(I, 0, 4, 2, f, I, I), P = I[0] > I[2]; } else P = w > E; var A = Math.PI, L = [], D = C + n === e; e = C, g = 0, m = S, h = r[e], p = r[e + 1]; var O; if (D) { y(), O = Math.atan2(p - v, h - d), P && (O += O > 0 ? -A : A); var N = (E + w) / 2, F = (T + x) / 2; return L[0] = [N, F, (b - a) / 2, O, i], L; } for (var k = 0, G = i.length; k < G; ) { y(); var U = Math.atan2(p - v, h - d); if (P && (U += U > 0 ? -A : A), O !== void 0) { var B = U - O; if (B += B > A ? -2 * A : B < -A ? 2 * A : 0, Math.abs(B) > o) return null; } O = U; for (var X = k, j = 0; k < G; ++k) { var ae = P ? G - k - 1 : k, se = s * u(l, i[ae], c); if (e + n < t && m + g < a + j + se / 2) break; j += se; } if (k !== X) { var $ = P ? i.substring(G - X, G - k) : i.substring(X, k); _ = g === 0 ? 0 : (a + j / 2 - m) / g; var N = xc(d, h, _), F = xc(v, p, _); L.push([N, F, j / 2, U, $]), a += j; } } return L; } function Nre(r, e, t, n) { for (var i = r[e], a = r[e + 1], o = 0, s = e + n; s < t; s += n) { var u = r[s], l = r[s + 1]; o += Math.sqrt((u - i) * (u - i) + (l - a) * (l - a)), i = u, a = l; } return o; } var og = Cs(), Nf = [], dc = [], vc = [], Ff = []; function P$(r) { return r[3].declutterBox; } var Dqe = new RegExp( "[" + String.fromCharCode(1425) + "-" + String.fromCharCode(2303) + String.fromCharCode(64285) + "-" + String.fromCharCode(65023) + String.fromCharCode(65136) + "-" + String.fromCharCode(65276) + String.fromCharCode(67584) + "-" + String.fromCharCode(69631) + String.fromCharCode(124928) + "-" + String.fromCharCode(126975) + "]" ); function I$(r, e) { return (e === "start" || e === "end") && !Dqe.test(r) && (e = e === "start" ? "left" : "right"), wb[e]; } function Mqe(r, e, t) { return t > 0 && r.push(` `, ""), r.push(e, ""), r; } var Oqe = function() { function r(e, t, n, i) { this.overlaps = n, this.pixelRatio = t, this.resolution = e, this.alignFill_, this.instructions = i.instructions, this.coordinates = i.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = ha(), this.hitDetectionInstructions = i.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = i.fillStates || {}, this.strokeStates = i.strokeStates || {}, this.textStates = i.textStates || {}, this.widths_ = {}, this.labels_ = {}; } return r.prototype.createLabel = function(e, t, n, i) { var a = e + t + n + i; if (this.labels_[a]) return this.labels_[a]; var o = i ? this.strokeStates[i] : null, s = n ? this.fillStates[n] : null, u = this.textStates[t], l = this.pixelRatio, c = [ u.scale[0] * l, u.scale[1] * l ], f = Array.isArray(e), h = I$(f ? e[0] : e, u.textAlign || $1), p = i && o.lineWidth ? o.lineWidth : 0, d = f ? e : e.split(` `).reduce(Mqe, []), v = XXe(u, d), g = v.width, m = v.height, y = v.widths, _ = v.heights, w = v.lineWidths, x = g + p, C = [], S = (x + 2) * c[0], b = (m + p) * c[1], E = { width: S < 0 ? Math.floor(S) : Math.ceil(S), height: b < 0 ? Math.floor(b) : Math.ceil(b), contextInstructions: C }; if ((c[0] != 1 || c[1] != 1) && C.push("scale", c), i) { C.push("strokeStyle", o.strokeStyle), C.push("lineWidth", p), C.push("lineCap", o.lineCap), C.push("lineJoin", o.lineJoin), C.push("miterLimit", o.miterLimit); var T = xP ? OffscreenCanvasRenderingContext2D : CanvasRenderingContext2D; T.prototype.setLineDash && (C.push("setLineDash", [o.lineDash]), C.push("lineDashOffset", o.lineDashOffset)); } n && C.push("fillStyle", s.fillStyle), C.push("textBaseline", "middle"), C.push("textAlign", "center"); for (var P = 0.5 - h, I = h * x + P * p, A = [], L = [], D = 0, O = 0, N = 0, F = 0, k, G = 0, U = d.length; G < U; G += 2) { var B = d[G]; if (B === ` `) { O += D, D = 0, I = h * x + P * p, ++F; continue; } var X = d[G + 1] || u.font; X !== k && (i && A.push("font", X), n && L.push("font", X), k = X), D = Math.max(D, _[N]); var j = [ B, I + P * y[N] + h * (y[N] - w[F]), 0.5 * (p + D) + O ]; I += y[N], i && A.push("strokeText", j), n && L.push("fillText", j), ++N; } return Array.prototype.push.apply(C, A), Array.prototype.push.apply(C, L), this.labels_[a] = E, E; }, r.prototype.replayTextBackground_ = function(e, t, n, i, a, o, s) { e.beginPath(), e.moveTo.apply(e, t), e.lineTo.apply(e, n), e.lineTo.apply(e, i), e.lineTo.apply(e, a), e.lineTo.apply(e, t), o && (this.alignFill_ = o[2], this.fill_(e)), s && (this.setStrokeStyle_( e, s ), e.stroke()); }, r.prototype.calculateImageOrLabelDimensions_ = function(e, t, n, i, a, o, s, u, l, c, f, h, p, d, v, g) { s *= h[0], u *= h[1]; var m = n - s, y = i - u, _ = a + l > e ? e - l : a, w = o + c > t ? t - c : o, x = d[3] + _ * h[0] + d[1], C = d[0] + w * h[1] + d[2], S = m - d[3], b = y - d[0]; (v || f !== 0) && (Nf[0] = S, Ff[0] = S, Nf[1] = b, dc[1] = b, dc[0] = S + x, vc[0] = dc[0], vc[1] = b + C, Ff[1] = vc[1]); var E; return f !== 0 ? (E = Es(ha(), n, i, 1, 1, f, -n, -i), mn(E, Nf), mn(E, dc), mn(E, vc), mn(E, Ff), jd(Math.min(Nf[0], dc[0], vc[0], Ff[0]), Math.min(Nf[1], dc[1], vc[1], Ff[1]), Math.max(Nf[0], dc[0], vc[0], Ff[0]), Math.max(Nf[1], dc[1], vc[1], Ff[1]), og)) : jd(Math.min(S, S + x), Math.min(b, b + C), Math.max(S, S + x), Math.max(b, b + C), og), p && (m = Math.round(m), y = Math.round(y)), { drawImageX: m, drawImageY: y, drawImageW: _, drawImageH: w, originX: l, originY: c, declutterBox: { minX: og[0], minY: og[1], maxX: og[2], maxY: og[3], value: g }, canvasTransform: E, scale: h }; }, r.prototype.replayImageOrLabel_ = function(e, t, n, i, a, o, s) { var u = !!(o || s), l = i.declutterBox, c = e.canvas, f = s ? s[2] * i.scale[0] / 2 : 0, h = l.minX - f <= c.width / t && l.maxX + f >= 0 && l.minY - f <= c.height / t && l.maxY + f >= 0; return h && (u && this.replayTextBackground_( e, Nf, dc, vc, Ff, o, s ), qXe(e, i.canvasTransform, a, n, i.originX, i.originY, i.drawImageW, i.drawImageH, i.drawImageX, i.drawImageY, i.scale)), !0; }, r.prototype.fill_ = function(e) { if (this.alignFill_) { var t = mn(this.renderedTransform_, [0, 0]), n = 512 * this.pixelRatio; e.save(), e.translate(t[0] % n, t[1] % n), e.rotate(this.viewRotation_); } e.fill(), this.alignFill_ && e.restore(); }, r.prototype.setStrokeStyle_ = function(e, t) { e.strokeStyle = t[1], e.lineWidth = t[2], e.lineCap = t[3], e.lineJoin = t[4], e.miterLimit = t[5], e.setLineDash && (e.lineDashOffset = t[7], e.setLineDash(t[6])); }, r.prototype.drawLabelWithPointPlacement_ = function(e, t, n, i) { var a = this.textStates[t], o = this.createLabel(e, t, i, n), s = this.strokeStates[n], u = this.pixelRatio, l = I$(Array.isArray(e) ? e[0] : e, a.textAlign || $1), c = wb[a.textBaseline || yb], f = s && s.lineWidth ? s.lineWidth : 0, h = o.width / u - 2 * a.scale[0], p = l * h + 2 * (0.5 - l) * f, d = c * o.height / u + 2 * (0.5 - c) * f; return { label: o, anchorX: p, anchorY: d }; }, r.prototype.execute_ = function(e, t, n, i, a, o, s, u) { var l; this.pixelCoordinates_ && Zh(n, this.renderedTransform_) ? l = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), l = pd(this.coordinates, 0, this.coordinates.length, 2, n, this.pixelCoordinates_), eXe(this.renderedTransform_, n)); for (var c = 0, f = i.length, h = 0, p, d, v, g, m, y, _, w, x, C, S, b, E = 0, T = 0, P = null, I = null, A = this.coordinateCache_, L = this.viewRotation_, D = Math.round(Math.atan2(-n[1], n[0]) * 1e12) / 1e12, O = { context: e, pixelRatio: this.pixelRatio, resolution: this.resolution, rotation: L }, N = this.instructions != i || this.overlaps ? 0 : 200, F, k, G, U; c < f; ) { var B = i[c], X = B[0]; switch (X) { case Ct.BEGIN_GEOMETRY: F = B[1], U = B[3], F.getGeometry() ? s !== void 0 && !Ti(s, U.getExtent()) ? c = B[2] + 1 : ++c : c = B[2]; break; case Ct.BEGIN_PATH: E > N && (this.fill_(e), E = 0), T > N && (e.stroke(), T = 0), !E && !T && (e.beginPath(), g = NaN, m = NaN), ++c; break; case Ct.CIRCLE: h = B[1]; var j = l[h], ae = l[h + 1], se = l[h + 2], $ = l[h + 3], V = se - j, q = $ - ae, ee = Math.sqrt(V * V + q * q); e.moveTo(j + ee, ae), e.arc(j, ae, ee, 0, 2 * Math.PI, !0), ++c; break; case Ct.CLOSE_PATH: e.closePath(), ++c; break; case Ct.CUSTOM: h = B[1], p = B[2]; var Y = B[3], K = B[4], fe = B.length == 6 ? B[5] : void 0; O.geometry = Y, O.feature = F, c in A || (A[c] = []); var J = A[c]; fe ? fe(l, h, p, 2, J) : (J[0] = l[h], J[1] = l[h + 1], J.length = 2), K(J, O), ++c; break; case Ct.DRAW_IMAGE: h = B[1], p = B[2], w = B[3], d = B[4], v = B[5]; var ue = B[6], ne = B[7], ve = B[8], Pe = B[9], Be = B[10], ke = B[11], Le = B[12], Ye = B[13], Oe = B[14]; if (!w && B.length >= 19) { x = B[18], C = B[19], S = B[20], b = B[21]; var we = this.drawLabelWithPointPlacement_(x, C, S, b); w = we.label, B[3] = w; var Je = B[22]; d = (we.anchorX - Je) * this.pixelRatio, B[4] = d; var z = B[23]; v = (we.anchorY - z) * this.pixelRatio, B[5] = v, ue = w.height, B[6] = ue, Ye = w.width, B[13] = Ye; } var pe = void 0; B.length > 24 && (pe = B[24]); var me = void 0, De = void 0, ot = void 0; B.length > 16 ? (me = B[15], De = B[16], ot = B[17]) : (me = Xp, De = !1, ot = !1), Be && D ? ke += L : !Be && !D && (ke -= L); for (var Kn = 0; h < p; h += 2) if (!(pe && pe[Kn++] < Ye / this.pixelRatio)) { var On = this.calculateImageOrLabelDimensions_(w.width, w.height, l[h], l[h + 1], Ye, ue, d, v, ve, Pe, ke, Le, a, me, De || ot, F), Cr = [ e, t, w, On, ne, De ? P : null, ot ? I : null ], Wt = void 0, ka = void 0; if (u && Oe) { var ri = p - h; if (!Oe[ri]) { Oe[ri] = Cr; continue; } if (Wt = Oe[ri], delete Oe[ri], ka = P$(Wt), u.collides(ka)) continue; } u && u.collides(On.declutterBox) || (Wt && (u && u.insert(ka), this.replayImageOrLabel_.apply(this, Wt)), u && u.insert(On.declutterBox), this.replayImageOrLabel_.apply(this, Cr)); } ++c; break; case Ct.DRAW_CHARS: var mi = B[1], ea = B[2], Xo = B[3], Va = B[4]; b = B[5]; var vl = B[6], ux = B[7], Kr = B[8]; S = B[9]; var Sv = B[10]; x = B[11], C = B[12]; var Pn = [ B[13], B[13] ], _r = this.textStates[C], yi = _r.font, Sr = [ _r.scale[0] * ux, _r.scale[1] * ux ], Gi = void 0; yi in this.widths_ ? Gi = this.widths_[yi] : (Gi = {}, this.widths_[yi] = Gi); var zi = Nre(l, mi, ea, 2), bu = Math.abs(Sr[0]) * C$(yi, x, Gi); if (Va || bu <= zi) { var Uy = this.textStates[C].textAlign, lx = (zi - bu) * wb[Uy], Cf = Lqe(l, mi, ea, 2, x, lx, vl, Math.abs(Sr[0]), C$, yi, Gi, D ? 0 : this.viewRotation_); e: if (Cf) { var Sf = [], Ef = void 0, cx = void 0, fx = void 0, So = void 0, Is = void 0; if (S) for (Ef = 0, cx = Cf.length; Ef < cx; ++Ef) { Is = Cf[Ef], fx = Is[4], So = this.createLabel(fx, C, "", S), d = Is[2] + (Sr[0] < 0 ? -Sv : Sv), v = Xo * So.height + (0.5 - Xo) * 2 * Sv * Sr[1] / Sr[0] - Kr; var On = this.calculateImageOrLabelDimensions_(So.width, So.height, Is[0], Is[1], So.width, So.height, d, v, 0, 0, Is[3], Pn, !1, Xp, !1, F); if (u && u.collides(On.declutterBox)) break e; Sf.push([ e, t, So, On, 1, null, null ]); } if (b) for (Ef = 0, cx = Cf.length; Ef < cx; ++Ef) { Is = Cf[Ef], fx = Is[4], So = this.createLabel(fx, C, b, ""), d = Is[2], v = Xo * So.height - Kr; var On = this.calculateImageOrLabelDimensions_(So.width, So.height, Is[0], Is[1], So.width, So.height, d, v, 0, 0, Is[3], Pn, !1, Xp, !1, F); if (u && u.collides(On.declutterBox)) break e; Sf.push([ e, t, So, On, 1, null, null ]); } u && u.load(Sf.map(P$)); for (var IP = 0, mne = Sf.length; IP < mne; ++IP) this.replayImageOrLabel_.apply(this, Sf[IP]); } } ++c; break; case Ct.END_GEOMETRY: if (o !== void 0) { F = B[1]; var p3 = o(F, U); if (p3) return p3; } ++c; break; case Ct.FILL: N ? E++ : this.fill_(e), ++c; break; case Ct.MOVE_TO_LINE_TO: for (h = B[1], p = B[2], k = l[h], G = l[h + 1], y = k + 0.5 | 0, _ = G + 0.5 | 0, (y !== g || _ !== m) && (e.moveTo(k, G), g = y, m = _), h += 2; h < p; h += 2) k = l[h], G = l[h + 1], y = k + 0.5 | 0, _ = G + 0.5 | 0, (h == p - 2 || y !== g || _ !== m) && (e.lineTo(k, G), g = y, m = _); ++c; break; case Ct.SET_FILL_STYLE: P = B, this.alignFill_ = B[2], E && (this.fill_(e), E = 0, T && (e.stroke(), T = 0)), e.fillStyle = B[1], ++c; break; case Ct.SET_STROKE_STYLE: I = B, T && (e.stroke(), T = 0), this.setStrokeStyle_(e, B), ++c; break; case Ct.STROKE: N ? T++ : e.stroke(), ++c; break; default: ++c; break; } } E && this.fill_(e), T && e.stroke(); }, r.prototype.execute = function(e, t, n, i, a, o) { this.viewRotation_ = i, this.execute_(e, t, n, this.instructions, a, void 0, void 0, o); }, r.prototype.executeHitDetection = function(e, t, n, i, a) { return this.viewRotation_ = n, this.execute_(e, 1, t, this.hitDetectionInstructions, !0, i, a); }, r; }(); const Rqe = Oqe; var jL = [ jt.POLYGON, jt.CIRCLE, jt.LINE_STRING, jt.IMAGE, jt.TEXT, jt.DEFAULT ], Nqe = function() { function r(e, t, n, i, a, o) { this.maxExtent_ = e, this.overlaps_ = i, this.pixelRatio_ = n, this.resolution_ = t, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = ha(), this.createExecutors_(a); } return r.prototype.clip = function(e, t) { var n = this.getClipCoords(t); e.beginPath(), e.moveTo(n[0], n[1]), e.lineTo(n[2], n[3]), e.lineTo(n[4], n[5]), e.lineTo(n[6], n[7]), e.clip(); }, r.prototype.createExecutors_ = function(e) { for (var t in e) { var n = this.executorsByZIndex_[t]; n === void 0 && (n = {}, this.executorsByZIndex_[t] = n); var i = e[t]; for (var a in i) { var o = i[a]; n[a] = new Rqe(this.resolution_, this.pixelRatio_, this.overlaps_, o); } } }, r.prototype.hasExecutors = function(e) { for (var t in this.executorsByZIndex_) for (var n = this.executorsByZIndex_[t], i = 0, a = e.length; i < a; ++i) if (e[i] in n) return !0; return !1; }, r.prototype.forEachFeatureAtCoordinate = function(e, t, n, i, a, o) { i = Math.round(i); var s = i * 2 + 1, u = Es(this.hitDetectionTransform_, i + 0.5, i + 0.5, 1 / t, -1 / t, -n, -e[0], -e[1]), l = !this.hitDetectionContext_; l && (this.hitDetectionContext_ = Ss(s, s)); var c = this.hitDetectionContext_; c.canvas.width !== s || c.canvas.height !== s ? (c.canvas.width = s, c.canvas.height = s) : l || c.clearRect(0, 0, s, s); var f; this.renderBuffer_ !== void 0 && (f = Cs(), L_(f, e), $m(f, t * (this.renderBuffer_ + i), f)); var h = Fqe(i), p; function d(C, S) { for (var b = c.getImageData(0, 0, s, s).data, E = 0, T = h.length; E < T; E++) if (b[h[E]] > 0) { if (!o || p !== jt.IMAGE && p !== jt.TEXT || o.indexOf(C) !== -1) { var P = (h[E] - 3) / 4, I = i - P % s, A = i - (P / s | 0), L = a(C, S, I * I + A * A); if (L) return L; } c.clearRect(0, 0, s, s); break; } } var v = Object.keys(this.executorsByZIndex_).map(Number); v.sort(Um); var g, m, y, _, w; for (g = v.length - 1; g >= 0; --g) { var x = v[g].toString(); for (y = this.executorsByZIndex_[x], m = jL.length - 1; m >= 0; --m) if (p = jL[m], _ = y[p], _ !== void 0 && (w = _.executeHitDetection(c, u, n, d, f), w)) return w; } }, r.prototype.getClipCoords = function(e) { var t = this.maxExtent_; if (!t) return null; var n = t[0], i = t[1], a = t[2], o = t[3], s = [n, i, n, o, a, o, a, i]; return pd(s, 0, 8, 2, e, s), s; }, r.prototype.isEmpty = function() { return F1(this.executorsByZIndex_); }, r.prototype.execute = function(e, t, n, i, a, o, s) { var u = Object.keys(this.executorsByZIndex_).map(Number); u.sort(Um), this.maxExtent_ && (e.save(), this.clip(e, n)); var l = o || jL, c, f, h, p, d, v; for (s && u.reverse(), c = 0, f = u.length; c < f; ++c) { var g = u[c].toString(); for (d = this.executorsByZIndex_[g], h = 0, p = l.length; h < p; ++h) { var m = l[h]; v = d[m], v !== void 0 && v.execute(e, t, n, i, a, s); } } this.maxExtent_ && e.restore(); }, r; }(), YL = {}; function Fqe(r) { if (YL[r] !== void 0) return YL[r]; for (var e = r * 2 + 1, t = r * r, n = new Array(t + 1), i = 0; i <= r; ++i) for (var a = 0; a <= r; ++a) { var o = i * i + a * a; if (o > t) break; var s = n[o]; s || (s = [], n[o] = s), s.push(((r + i) * e + (r + a)) * 4 + 3), i > 0 && s.push(((r - i) * e + (r + a)) * 4 + 3), a > 0 && (s.push(((r + i) * e + (r - a)) * 4 + 3), i > 0 && s.push(((r - i) * e + (r - a)) * 4 + 3)); } for (var u = [], i = 0, l = n.length; i < l; ++i) n[i] && u.push.apply(u, n[i]); return YL[r] = u, u; } const Cb = Nqe, yn = { ANIMATING: 0, INTERACTING: 1 }; var Bqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), A$ = ha(), kqe = function(r) { Bqe(e, r); function e() { var t = r.call(this) || this; return t.extent_ = Cs(), t.extentRevision_ = -1, t.simplifiedGeometryMaxMinSquaredTolerance = 0, t.simplifiedGeometryRevision = 0, t.simplifyTransformedInternal = PYe(function(n, i, a) { if (!a) return this.getSimplifiedGeometry(i); var o = this.clone(); return o.applyTransform(a), o.getSimplifiedGeometry(i); }), t; } return e.prototype.simplifyTransformed = function(t, n) { return this.simplifyTransformedInternal(this.getRevision(), t, n); }, e.prototype.clone = function() { return Mr(); }, e.prototype.closestPointXY = function(t, n, i, a) { return Mr(); }, e.prototype.containsXY = function(t, n) { var i = this.getClosestPoint([t, n]); return i[0] === t && i[1] === n; }, e.prototype.getClosestPoint = function(t, n) { var i = n || [NaN, NaN]; return this.closestPointXY(t[0], t[1], i, 1 / 0), i; }, e.prototype.intersectsCoordinate = function(t) { return this.containsXY(t[0], t[1]); }, e.prototype.computeExtent = function(t) { return Mr(); }, e.prototype.getExtent = function(t) { if (this.extentRevision_ != this.getRevision()) { var n = this.computeExtent(this.extent_); (isNaN(n[0]) || isNaN(n[1])) && yP(n), this.extentRevision_ = this.getRevision(); } return fYe(this.extent_, t); }, e.prototype.rotate = function(t, n) { Mr(); }, e.prototype.scale = function(t, n, i) { Mr(); }, e.prototype.simplify = function(t) { return this.getSimplifiedGeometry(t * t); }, e.prototype.getSimplifiedGeometry = function(t) { return Mr(); }, e.prototype.getType = function() { return Mr(); }, e.prototype.applyTransform = function(t) { Mr(); }, e.prototype.intersectsExtent = function(t) { return Mr(); }, e.prototype.translate = function(t, n) { Mr(); }, e.prototype.transform = function(t, n) { var i = ff(t), a = i.getUnits() == ud.TILE_PIXELS ? function(o, s, u) { var l = i.getExtent(), c = i.getWorldExtent(), f = il(c) / il(l); return Es(A$, c[0], c[3], f, -f, 0, 0, 0), pd(o, 0, o.length, u, A$, s), cb(i, n)(o, s, u); } : cb(i, n); return this.applyTransform(a), this; }, e; }(Ps); const Vqe = kqe, li = { XY: "XY", XYZ: "XYZ", XYM: "XYM", XYZM: "XYZM" }; var Gqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Kh = function(r) { Gqe(e, r); function e() { var t = r.call(this) || this; return t.layout = li.XY, t.stride = 2, t.flatCoordinates = null, t; } return e.prototype.computeExtent = function(t) { return are(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, t); }, e.prototype.getCoordinates = function() { return Mr(); }, e.prototype.getFirstCoordinate = function() { return this.flatCoordinates.slice(0, this.stride); }, e.prototype.getFlatCoordinates = function() { return this.flatCoordinates; }, e.prototype.getLastCoordinate = function() { return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride); }, e.prototype.getLayout = function() { return this.layout; }, e.prototype.getSimplifiedGeometry = function(t) { if (this.simplifiedGeometryRevision !== this.getRevision() && (this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = this.getRevision()), t < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && t <= this.simplifiedGeometryMaxMinSquaredTolerance) return this; var n = this.getSimplifiedGeometryInternal(t), i = n.getFlatCoordinates(); return i.length < this.flatCoordinates.length ? n : (this.simplifiedGeometryMaxMinSquaredTolerance = t, this); }, e.prototype.getSimplifiedGeometryInternal = function(t) { return this; }, e.prototype.getStride = function() { return this.stride; }, e.prototype.setFlatCoordinates = function(t, n) { this.stride = L$(t), this.layout = t, this.flatCoordinates = n; }, e.prototype.setCoordinates = function(t, n) { Mr(); }, e.prototype.setLayout = function(t, n, i) { var a; if (t) a = L$(t); else { for (var o = 0; o < i; ++o) if (n.length === 0) { this.layout = li.XY, this.stride = 2; return; } else n = n[0]; a = n.length, t = zqe(a); } this.layout = t, this.stride = a; }, e.prototype.applyTransform = function(t) { this.flatCoordinates && (t(this.flatCoordinates, this.flatCoordinates, this.stride), this.changed()); }, e.prototype.rotate = function(t, n) { var i = this.getFlatCoordinates(); if (i) { var a = this.getStride(); J5(i, 0, i.length, a, t, n, i), this.changed(); } }, e.prototype.scale = function(t, n, i) { var a = n; a === void 0 && (a = t); var o = i; o || (o = Hm(this.getExtent())); var s = this.getFlatCoordinates(); if (s) { var u = this.getStride(); Aqe(s, 0, s.length, u, t, a, o, s), this.changed(); } }, e.prototype.translate = function(t, n) { var i = this.getFlatCoordinates(); if (i) { var a = this.getStride(); Rre(i, 0, i.length, a, t, n, i), this.changed(); } }, e; }(Vqe); function zqe(r) { var e; return r == 2 ? e = li.XY : r == 3 ? e = li.XYZ : r == 4 && (e = li.XYZM), e; } function L$(r) { var e; return r == li.XY ? e = 2 : r == li.XYZ || r == li.XYM ? e = 3 : r == li.XYZM && (e = 4), e; } function $qe(r, e, t) { var n = r.getFlatCoordinates(); if (n) { var i = r.getStride(); return pd(n, 0, n.length, i, e, t); } else return null; } var Hqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Uqe = function(r) { Hqe(e, r); function e(t, n, i, a, o, s, u) { var l = r.call(this) || this; return l.context_ = t, l.pixelRatio_ = n, l.extent_ = i, l.transform_ = a, l.viewRotation_ = o, l.squaredTolerance_ = s, l.userTransform_ = u, l.contextFillState_ = null, l.contextStrokeState_ = null, l.contextTextState_ = null, l.fillState_ = null, l.strokeState_ = null, l.image_ = null, l.imageAnchorX_ = 0, l.imageAnchorY_ = 0, l.imageHeight_ = 0, l.imageOpacity_ = 0, l.imageOriginX_ = 0, l.imageOriginY_ = 0, l.imageRotateWithView_ = !1, l.imageRotation_ = 0, l.imageScale_ = [0, 0], l.imageWidth_ = 0, l.text_ = "", l.textOffsetX_ = 0, l.textOffsetY_ = 0, l.textRotateWithView_ = !1, l.textRotation_ = 0, l.textScale_ = [0, 0], l.textFillState_ = null, l.textStrokeState_ = null, l.textState_ = null, l.pixelCoordinates_ = [], l.tmpLocalTransform_ = ha(), l; } return e.prototype.drawImages_ = function(t, n, i, a) { if (!!this.image_) { var o = pd(t, n, i, a, this.transform_, this.pixelCoordinates_), s = this.context_, u = this.tmpLocalTransform_, l = s.globalAlpha; this.imageOpacity_ != 1 && (s.globalAlpha = l * this.imageOpacity_); var c = this.imageRotation_; this.imageRotateWithView_ && (c += this.viewRotation_); for (var f = 0, h = o.length; f < h; f += 2) { var p = o[f] - this.imageAnchorX_, d = o[f + 1] - this.imageAnchorY_; if (c !== 0 || this.imageScale_[0] != 1 || this.imageScale_[1] != 1) { var v = p + this.imageAnchorX_, g = d + this.imageAnchorY_; Es(u, v, g, 1, 1, c, -v, -g), s.setTransform.apply(s, u), s.translate(v, g), s.scale(this.imageScale_[0], this.imageScale_[1]), s.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this.imageHeight_, -this.imageAnchorX_, -this.imageAnchorY_, this.imageWidth_, this.imageHeight_), s.setTransform(1, 0, 0, 1, 0, 0); } else s.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this.imageHeight_, p, d, this.imageWidth_, this.imageHeight_); } this.imageOpacity_ != 1 && (s.globalAlpha = l); } }, e.prototype.drawText_ = function(t, n, i, a) { if (!(!this.textState_ || this.text_ === "")) { this.textFillState_ && this.setContextFillState_(this.textFillState_), this.textStrokeState_ && this.setContextStrokeState_(this.textStrokeState_), this.setContextTextState_(this.textState_); var o = pd(t, n, i, a, this.transform_, this.pixelCoordinates_), s = this.context_, u = this.textRotation_; for (this.textRotateWithView_ && (u += this.viewRotation_); n < i; n += a) { var l = o[n] + this.textOffsetX_, c = o[n + 1] + this.textOffsetY_; if (u !== 0 || this.textScale_[0] != 1 || this.textScale_[1] != 1) { var f = Es(this.tmpLocalTransform_, l, c, 1, 1, u, -l, -c); s.setTransform.apply(s, f), s.translate(l, c), s.scale(this.textScale_[0], this.textScale_[1]), this.textStrokeState_ && s.strokeText(this.text_, 0, 0), this.textFillState_ && s.fillText(this.text_, 0, 0), s.setTransform(1, 0, 0, 1, 0, 0); } else this.textStrokeState_ && s.strokeText(this.text_, l, c), this.textFillState_ && s.fillText(this.text_, l, c); } } }, e.prototype.moveToLineTo_ = function(t, n, i, a, o) { var s = this.context_, u = pd(t, n, i, a, this.transform_, this.pixelCoordinates_); s.moveTo(u[0], u[1]); var l = u.length; o && (l -= 2); for (var c = 2; c < l; c += 2) s.lineTo(u[c], u[c + 1]); return o && s.closePath(), i; }, e.prototype.drawRings_ = function(t, n, i, a) { for (var o = 0, s = i.length; o < s; ++o) n = this.moveToLineTo_(t, n, i[o], a, !0); return n; }, e.prototype.drawCircle = function(t) { if (!!Ti(this.extent_, t.getExtent())) { if (this.fillState_ || this.strokeState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); var n = $qe(t, this.transform_, this.pixelCoordinates_), i = n[2] - n[0], a = n[3] - n[1], o = Math.sqrt(i * i + a * a), s = this.context_; s.beginPath(), s.arc(n[0], n[1], o, 0, 2 * Math.PI), this.fillState_ && s.fill(), this.strokeState_ && s.stroke(); } this.text_ !== "" && this.drawText_(t.getCenter(), 0, 2, 2); } }, e.prototype.setStyle = function(t) { this.setFillStrokeStyle(t.getFill(), t.getStroke()), this.setImageStyle(t.getImage()), this.setTextStyle(t.getText()); }, e.prototype.setTransform = function(t) { this.transform_ = t; }, e.prototype.drawGeometry = function(t) { var n = t.getType(); switch (n) { case Ee.POINT: this.drawPoint( t ); break; case Ee.LINE_STRING: this.drawLineString( t ); break; case Ee.POLYGON: this.drawPolygon( t ); break; case Ee.MULTI_POINT: this.drawMultiPoint( t ); break; case Ee.MULTI_LINE_STRING: this.drawMultiLineString( t ); break; case Ee.MULTI_POLYGON: this.drawMultiPolygon( t ); break; case Ee.GEOMETRY_COLLECTION: this.drawGeometryCollection( t ); break; case Ee.CIRCLE: this.drawCircle( t ); break; } }, e.prototype.drawFeature = function(t, n) { var i = n.getGeometryFunction()(t); !i || !Ti(this.extent_, i.getExtent()) || (this.setStyle(n), this.drawGeometry(i)); }, e.prototype.drawGeometryCollection = function(t) { for (var n = t.getGeometriesArray(), i = 0, a = n.length; i < a; ++i) this.drawGeometry(n[i]); }, e.prototype.drawPoint = function(t) { this.squaredTolerance_ && (t = t.simplifyTransformed(this.squaredTolerance_, this.userTransform_)); var n = t.getFlatCoordinates(), i = t.getStride(); this.image_ && this.drawImages_(n, 0, n.length, i), this.text_ !== "" && this.drawText_(n, 0, n.length, i); }, e.prototype.drawMultiPoint = function(t) { this.squaredTolerance_ && (t = t.simplifyTransformed(this.squaredTolerance_, this.userTransform_)); var n = t.getFlatCoordinates(), i = t.getStride(); this.image_ && this.drawImages_(n, 0, n.length, i), this.text_ !== "" && this.drawText_(n, 0, n.length, i); }, e.prototype.drawLineString = function(t) { if (this.squaredTolerance_ && (t = t.simplifyTransformed(this.squaredTolerance_, this.userTransform_)), !!Ti(this.extent_, t.getExtent())) { if (this.strokeState_) { this.setContextStrokeState_(this.strokeState_); var n = this.context_, i = t.getFlatCoordinates(); n.beginPath(), this.moveToLineTo_(i, 0, i.length, t.getStride(), !1), n.stroke(); } if (this.text_ !== "") { var a = t.getFlatMidpoint(); this.drawText_(a, 0, 2, 2); } } }, e.prototype.drawMultiLineString = function(t) { this.squaredTolerance_ && (t = t.simplifyTransformed(this.squaredTolerance_, this.userTransform_)); var n = t.getExtent(); if (!!Ti(this.extent_, n)) { if (this.strokeState_) { this.setContextStrokeState_(this.strokeState_); var i = this.context_, a = t.getFlatCoordinates(), o = 0, s = t.getEnds(), u = t.getStride(); i.beginPath(); for (var l = 0, c = s.length; l < c; ++l) o = this.moveToLineTo_(a, o, s[l], u, !1); i.stroke(); } if (this.text_ !== "") { var f = t.getFlatMidpoints(); this.drawText_(f, 0, f.length, 2); } } }, e.prototype.drawPolygon = function(t) { if (this.squaredTolerance_ && (t = t.simplifyTransformed(this.squaredTolerance_, this.userTransform_)), !!Ti(this.extent_, t.getExtent())) { if (this.strokeState_ || this.fillState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); var n = this.context_; n.beginPath(), this.drawRings_( t.getOrientedFlatCoordinates(), 0, t.getEnds(), t.getStride() ), this.fillState_ && n.fill(), this.strokeState_ && n.stroke(); } if (this.text_ !== "") { var i = t.getFlatInteriorPoint(); this.drawText_(i, 0, 2, 2); } } }, e.prototype.drawMultiPolygon = function(t) { if (this.squaredTolerance_ && (t = t.simplifyTransformed(this.squaredTolerance_, this.userTransform_)), !!Ti(this.extent_, t.getExtent())) { if (this.strokeState_ || this.fillState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); var n = this.context_, i = t.getOrientedFlatCoordinates(), a = 0, o = t.getEndss(), s = t.getStride(); n.beginPath(); for (var u = 0, l = o.length; u < l; ++u) { var c = o[u]; a = this.drawRings_(i, a, c, s); } this.fillState_ && n.fill(), this.strokeState_ && n.stroke(); } if (this.text_ !== "") { var f = t.getFlatInteriorPoints(); this.drawText_(f, 0, f.length, 2); } } }, e.prototype.setContextFillState_ = function(t) { var n = this.context_, i = this.contextFillState_; i ? i.fillStyle != t.fillStyle && (i.fillStyle = t.fillStyle, n.fillStyle = t.fillStyle) : (n.fillStyle = t.fillStyle, this.contextFillState_ = { fillStyle: t.fillStyle }); }, e.prototype.setContextStrokeState_ = function(t) { var n = this.context_, i = this.contextStrokeState_; i ? (i.lineCap != t.lineCap && (i.lineCap = t.lineCap, n.lineCap = t.lineCap), n.setLineDash && (Zh(i.lineDash, t.lineDash) || n.setLineDash(i.lineDash = t.lineDash), i.lineDashOffset != t.lineDashOffset && (i.lineDashOffset = t.lineDashOffset, n.lineDashOffset = t.lineDashOffset)), i.lineJoin != t.lineJoin && (i.lineJoin = t.lineJoin, n.lineJoin = t.lineJoin), i.lineWidth != t.lineWidth && (i.lineWidth = t.lineWidth, n.lineWidth = t.lineWidth), i.miterLimit != t.miterLimit && (i.miterLimit = t.miterLimit, n.miterLimit = t.miterLimit), i.strokeStyle != t.strokeStyle && (i.strokeStyle = t.strokeStyle, n.strokeStyle = t.strokeStyle)) : (n.lineCap = t.lineCap, n.setLineDash && (n.setLineDash(t.lineDash), n.lineDashOffset = t.lineDashOffset), n.lineJoin = t.lineJoin, n.lineWidth = t.lineWidth, n.miterLimit = t.miterLimit, n.strokeStyle = t.strokeStyle, this.contextStrokeState_ = { lineCap: t.lineCap, lineDash: t.lineDash, lineDashOffset: t.lineDashOffset, lineJoin: t.lineJoin, lineWidth: t.lineWidth, miterLimit: t.miterLimit, strokeStyle: t.strokeStyle }); }, e.prototype.setContextTextState_ = function(t) { var n = this.context_, i = this.contextTextState_, a = t.textAlign ? t.textAlign : $1; i ? (i.font != t.font && (i.font = t.font, n.font = t.font), i.textAlign != a && (i.textAlign = a, n.textAlign = a), i.textBaseline != t.textBaseline && (i.textBaseline = t.textBaseline, n.textBaseline = t.textBaseline)) : (n.font = t.font, n.textAlign = a, n.textBaseline = t.textBaseline, this.contextTextState_ = { font: t.font, textAlign: a, textBaseline: t.textBaseline }); }, e.prototype.setFillStrokeStyle = function(t, n) { var i = this; if (!t) this.fillState_ = null; else { var a = t.getColor(); this.fillState_ = { fillStyle: kl(a || $c) }; } if (!n) this.strokeState_ = null; else { var o = n.getColor(), s = n.getLineCap(), u = n.getLineDash(), l = n.getLineDashOffset(), c = n.getLineJoin(), f = n.getWidth(), h = n.getMiterLimit(), p = u || k1; this.strokeState_ = { lineCap: s !== void 0 ? s : mb, lineDash: this.pixelRatio_ === 1 ? p : p.map(function(d) { return d * i.pixelRatio_; }), lineDashOffset: (l || V1) * this.pixelRatio_, lineJoin: c !== void 0 ? c : Ym, lineWidth: (f !== void 0 ? f : H1) * this.pixelRatio_, miterLimit: h !== void 0 ? h : G1, strokeStyle: kl(o || z1) }; } }, e.prototype.setImageStyle = function(t) { var n; if (!t || !(n = t.getSize())) { this.image_ = null; return; } var i = t.getAnchor(), a = t.getOrigin(); this.image_ = t.getImage(this.pixelRatio_), this.imageAnchorX_ = i[0] * this.pixelRatio_, this.imageAnchorY_ = i[1] * this.pixelRatio_, this.imageHeight_ = n[1] * this.pixelRatio_, this.imageOpacity_ = t.getOpacity(), this.imageOriginX_ = a[0], this.imageOriginY_ = a[1], this.imageRotateWithView_ = t.getRotateWithView(), this.imageRotation_ = t.getRotation(), this.imageScale_ = t.getScaleArray(), this.imageWidth_ = n[0] * this.pixelRatio_; }, e.prototype.setTextStyle = function(t) { if (!t) this.text_ = ""; else { var n = t.getFill(); if (!n) this.textFillState_ = null; else { var i = n.getColor(); this.textFillState_ = { fillStyle: kl(i || $c) }; } var a = t.getStroke(); if (!a) this.textStrokeState_ = null; else { var o = a.getColor(), s = a.getLineCap(), u = a.getLineDash(), l = a.getLineDashOffset(), c = a.getLineJoin(), f = a.getWidth(), h = a.getMiterLimit(); this.textStrokeState_ = { lineCap: s !== void 0 ? s : mb, lineDash: u || k1, lineDashOffset: l || V1, lineJoin: c !== void 0 ? c : Ym, lineWidth: f !== void 0 ? f : H1, miterLimit: h !== void 0 ? h : G1, strokeStyle: kl(o || z1) }; } var p = t.getFont(), d = t.getOffsetX(), v = t.getOffsetY(), g = t.getRotateWithView(), m = t.getRotation(), y = t.getScaleArray(), _ = t.getText(), w = t.getTextAlign(), x = t.getTextBaseline(); this.textState_ = { font: p !== void 0 ? p : Are, textAlign: w !== void 0 ? w : $1, textBaseline: x !== void 0 ? x : yb }, this.text_ = _ !== void 0 ? Array.isArray(_) ? _.reduce(function(C, S, b) { return C += b % 2 ? " " : S; }, "") : _ : "", this.textOffsetX_ = d !== void 0 ? this.pixelRatio_ * d : 0, this.textOffsetY_ = v !== void 0 ? this.pixelRatio_ * v : 0, this.textRotateWithView_ = g !== void 0 ? g : !1, this.textRotation_ = m !== void 0 ? m : 0, this.textScale_ = [ this.pixelRatio_ * y[0], this.pixelRatio_ * y[1] ]; } }, e; }(Dre); const Wqe = Uqe, Uf = { FRACTION: "fraction", PIXELS: "pixels" }, Bs = { BOTTOM_LEFT: "bottom-left", BOTTOM_RIGHT: "bottom-right", TOP_LEFT: "top-left", TOP_RIGHT: "top-right" }; var jqe = function() { function r() { this.cache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 32; } return r.prototype.clear = function() { this.cache_ = {}, this.cacheSize_ = 0; }, r.prototype.canExpireCache = function() { return this.cacheSize_ > this.maxCacheSize_; }, r.prototype.expire = function() { if (this.canExpireCache()) { var e = 0; for (var t in this.cache_) { var n = this.cache_[t]; (e++ & 3) === 0 && !n.hasListener() && (delete this.cache_[t], --this.cacheSize_); } } }, r.prototype.get = function(e, t, n) { var i = D$(e, t, n); return i in this.cache_ ? this.cache_[i] : null; }, r.prototype.set = function(e, t, n, i) { var a = D$(e, t, n); this.cache_[a] = i, ++this.cacheSize_; }, r.prototype.setSize = function(e) { this.maxCacheSize_ = e, this.expire(); }, r; }(); function D$(r, e, t) { var n = t ? _re(t) : "null"; return e + ":" + r + ":" + n; } var Sb = new jqe(), Yqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), I0 = null, Xqe = function(r) { Yqe(e, r); function e(t, n, i, a, o, s) { var u = r.call(this) || this; return u.hitDetectionImage_ = null, u.image_ = t || new Image(), a !== null && (u.image_.crossOrigin = a), u.canvas_ = {}, u.color_ = s, u.unlisten_ = null, u.imageState_ = o, u.size_ = i, u.src_ = n, u.tainted_, u; } return e.prototype.isTainted_ = function() { if (this.tainted_ === void 0 && this.imageState_ === hn.LOADED) { I0 || (I0 = Ss(1, 1)), I0.drawImage(this.image_, 0, 0); try { I0.getImageData(0, 0, 1, 1), this.tainted_ = !1; } catch { I0 = null, this.tainted_ = !0; } } return this.tainted_ === !0; }, e.prototype.dispatchChangeEvent_ = function() { this.dispatchEvent(Ot.CHANGE); }, e.prototype.handleImageError_ = function() { this.imageState_ = hn.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); }, e.prototype.handleImageLoad_ = function() { this.imageState_ = hn.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); }, e.prototype.getImage = function(t) { return this.replaceColor_(t), this.canvas_[t] ? this.canvas_[t] : this.image_; }, e.prototype.getPixelRatio = function(t) { return this.replaceColor_(t), this.canvas_[t] ? t : 1; }, e.prototype.getImageState = function() { return this.imageState_; }, e.prototype.getHitDetectionImage = function() { if (!this.hitDetectionImage_) if (this.isTainted_()) { var t = this.size_[0], n = this.size_[1], i = Ss(t, n); i.fillRect(0, 0, t, n), this.hitDetectionImage_ = i.canvas; } else this.hitDetectionImage_ = this.image_; return this.hitDetectionImage_; }, e.prototype.getSize = function() { return this.size_; }, e.prototype.getSrc = function() { return this.src_; }, e.prototype.load = function() { if (this.imageState_ == hn.IDLE) { this.imageState_ = hn.LOADING; try { this.image_.src = this.src_; } catch { this.handleImageError_(); } this.unlisten_ = Z5(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this)); } }, e.prototype.replaceColor_ = function(t) { if (!(!this.color_ || this.canvas_[t] || this.imageState_ !== hn.LOADED)) { var n = document.createElement("canvas"); this.canvas_[t] = n, n.width = Math.ceil(this.image_.width * t), n.height = Math.ceil(this.image_.height * t); var i = n.getContext("2d"); if (i.scale(t, t), i.drawImage(this.image_, 0, 0), i.globalCompositeOperation = "multiply", i.globalCompositeOperation === "multiply" || this.isTainted_()) i.fillStyle = _re(this.color_), i.fillRect(0, 0, n.width / t, n.height / t), i.globalCompositeOperation = "destination-in", i.drawImage(this.image_, 0, 0); else { for (var a = i.getImageData(0, 0, n.width, n.height), o = a.data, s = this.color_[0] / 255, u = this.color_[1] / 255, l = this.color_[2] / 255, c = this.color_[3], f = 0, h = o.length; f < h; f += 4) o[f] *= s, o[f + 1] *= u, o[f + 2] *= l, o[f + 3] *= c; i.putImageData(a, 0, 0); } } }, e.prototype.unlistenImage_ = function() { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); }, e; }(zy); function qqe(r, e, t, n, i, a) { var o = Sb.get(e, n, a); return o || (o = new Xqe(r, e, t, n, i, a), Sb.set(e, n, a, o)), o; } var Zqe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Kqe = function(r) { Zqe(e, r); function e(t) { var n = this, i = t || {}, a = i.opacity !== void 0 ? i.opacity : 1, o = i.rotation !== void 0 ? i.rotation : 0, s = i.scale !== void 0 ? i.scale : 1, u = i.rotateWithView !== void 0 ? i.rotateWithView : !1; n = r.call(this, { opacity: a, rotation: o, scale: s, displacement: i.displacement !== void 0 ? i.displacement : [0, 0], rotateWithView: u }) || this, n.anchor_ = i.anchor !== void 0 ? i.anchor : [0.5, 0.5], n.normalizedAnchor_ = null, n.anchorOrigin_ = i.anchorOrigin !== void 0 ? i.anchorOrigin : Bs.TOP_LEFT, n.anchorXUnits_ = i.anchorXUnits !== void 0 ? i.anchorXUnits : Uf.FRACTION, n.anchorYUnits_ = i.anchorYUnits !== void 0 ? i.anchorYUnits : Uf.FRACTION, n.crossOrigin_ = i.crossOrigin !== void 0 ? i.crossOrigin : null; var l = i.img !== void 0 ? i.img : null; n.imgSize_ = i.imgSize; var c = i.src; cn(!(c !== void 0 && l), 4), cn(!l || l && n.imgSize_, 5), (c === void 0 || c.length === 0) && l && (c = l.src || Ft(l)), cn(c !== void 0 && c.length > 0, 6); var f = i.src !== void 0 ? hn.IDLE : hn.LOADED; return n.color_ = i.color !== void 0 ? vb(i.color) : null, n.iconImage_ = qqe( l, c, n.imgSize_ !== void 0 ? n.imgSize_ : null, n.crossOrigin_, f, n.color_ ), n.offset_ = i.offset !== void 0 ? i.offset : [0, 0], n.offsetOrigin_ = i.offsetOrigin !== void 0 ? i.offsetOrigin : Bs.TOP_LEFT, n.origin_ = null, n.size_ = i.size !== void 0 ? i.size : null, n; } return e.prototype.clone = function() { var t = this.getScale(); return new e({ anchor: this.anchor_.slice(), anchorOrigin: this.anchorOrigin_, anchorXUnits: this.anchorXUnits_, anchorYUnits: this.anchorYUnits_, color: this.color_ && this.color_.slice ? this.color_.slice() : this.color_ || void 0, crossOrigin: this.crossOrigin_, imgSize: this.imgSize_, offset: this.offset_.slice(), offsetOrigin: this.offsetOrigin_, opacity: this.getOpacity(), rotateWithView: this.getRotateWithView(), rotation: this.getRotation(), scale: Array.isArray(t) ? t.slice() : t, size: this.size_ !== null ? this.size_.slice() : void 0, src: this.getSrc() }); }, e.prototype.getAnchor = function() { var t = this.normalizedAnchor_; if (!t) { t = this.anchor_; var n = this.getSize(); if (this.anchorXUnits_ == Uf.FRACTION || this.anchorYUnits_ == Uf.FRACTION) { if (!n) return null; t = this.anchor_.slice(), this.anchorXUnits_ == Uf.FRACTION && (t[0] *= n[0]), this.anchorYUnits_ == Uf.FRACTION && (t[1] *= n[1]); } if (this.anchorOrigin_ != Bs.TOP_LEFT) { if (!n) return null; t === this.anchor_ && (t = this.anchor_.slice()), (this.anchorOrigin_ == Bs.TOP_RIGHT || this.anchorOrigin_ == Bs.BOTTOM_RIGHT) && (t[0] = -t[0] + n[0]), (this.anchorOrigin_ == Bs.BOTTOM_LEFT || this.anchorOrigin_ == Bs.BOTTOM_RIGHT) && (t[1] = -t[1] + n[1]); } this.normalizedAnchor_ = t; } var i = this.getDisplacement(); return [t[0] - i[0], t[1] + i[1]]; }, e.prototype.setAnchor = function(t) { this.anchor_ = t, this.normalizedAnchor_ = null; }, e.prototype.getColor = function() { return this.color_; }, e.prototype.getImage = function(t) { return this.iconImage_.getImage(t); }, e.prototype.getPixelRatio = function(t) { return this.iconImage_.getPixelRatio(t); }, e.prototype.getImageSize = function() { return this.iconImage_.getSize(); }, e.prototype.getImageState = function() { return this.iconImage_.getImageState(); }, e.prototype.getHitDetectionImage = function() { return this.iconImage_.getHitDetectionImage(); }, e.prototype.getOrigin = function() { if (this.origin_) return this.origin_; var t = this.offset_; if (this.offsetOrigin_ != Bs.TOP_LEFT) { var n = this.getSize(), i = this.iconImage_.getSize(); if (!n || !i) return null; t = t.slice(), (this.offsetOrigin_ == Bs.TOP_RIGHT || this.offsetOrigin_ == Bs.BOTTOM_RIGHT) && (t[0] = i[0] - n[0] - t[0]), (this.offsetOrigin_ == Bs.BOTTOM_LEFT || this.offsetOrigin_ == Bs.BOTTOM_RIGHT) && (t[1] = i[1] - n[1] - t[1]); } return this.origin_ = t, this.origin_; }, e.prototype.getSrc = function() { return this.iconImage_.getSrc(); }, e.prototype.getSize = function() { return this.size_ ? this.size_ : this.iconImage_.getSize(); }, e.prototype.listenImageChange = function(t) { this.iconImage_.addEventListener(Ot.CHANGE, t); }, e.prototype.load = function() { this.iconImage_.load(); }, e.prototype.unlistenImageChange = function(t) { this.iconImage_.removeEventListener(Ot.CHANGE, t); }, e; }(Ire); const Jqe = Kqe; var Qqe = "#333", eZe = function() { function r(e) { var t = e || {}; this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = jm(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new Vl({ color: Qqe }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : Ore.POINT, this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; } return r.prototype.clone = function() { var e = this.getScale(); return new r({ font: this.getFont(), placement: this.getPlacement(), maxAngle: this.getMaxAngle(), overflow: this.getOverflow(), rotation: this.getRotation(), rotateWithView: this.getRotateWithView(), scale: Array.isArray(e) ? e.slice() : e, text: this.getText(), textAlign: this.getTextAlign(), textBaseline: this.getTextBaseline(), fill: this.getFill() ? this.getFill().clone() : void 0, stroke: this.getStroke() ? this.getStroke().clone() : void 0, offsetX: this.getOffsetX(), offsetY: this.getOffsetY(), backgroundFill: this.getBackgroundFill() ? this.getBackgroundFill().clone() : void 0, backgroundStroke: this.getBackgroundStroke() ? this.getBackgroundStroke().clone() : void 0, padding: this.getPadding() || void 0 }); }, r.prototype.getOverflow = function() { return this.overflow_; }, r.prototype.getFont = function() { return this.font_; }, r.prototype.getMaxAngle = function() { return this.maxAngle_; }, r.prototype.getPlacement = function() { return this.placement_; }, r.prototype.getOffsetX = function() { return this.offsetX_; }, r.prototype.getOffsetY = function() { return this.offsetY_; }, r.prototype.getFill = function() { return this.fill_; }, r.prototype.getRotateWithView = function() { return this.rotateWithView_; }, r.prototype.getRotation = function() { return this.rotation_; }, r.prototype.getScale = function() { return this.scale_; }, r.prototype.getScaleArray = function() { return this.scaleArray_; }, r.prototype.getStroke = function() { return this.stroke_; }, r.prototype.getText = function() { return this.text_; }, r.prototype.getTextAlign = function() { return this.textAlign_; }, r.prototype.getTextBaseline = function() { return this.textBaseline_; }, r.prototype.getBackgroundFill = function() { return this.backgroundFill_; }, r.prototype.getBackgroundStroke = function() { return this.backgroundStroke_; }, r.prototype.getPadding = function() { return this.padding_; }, r.prototype.setOverflow = function(e) { this.overflow_ = e; }, r.prototype.setFont = function(e) { this.font_ = e; }, r.prototype.setMaxAngle = function(e) { this.maxAngle_ = e; }, r.prototype.setOffsetX = function(e) { this.offsetX_ = e; }, r.prototype.setOffsetY = function(e) { this.offsetY_ = e; }, r.prototype.setPlacement = function(e) { this.placement_ = e; }, r.prototype.setRotateWithView = function(e) { this.rotateWithView_ = e; }, r.prototype.setFill = function(e) { this.fill_ = e; }, r.prototype.setRotation = function(e) { this.rotation_ = e; }, r.prototype.setScale = function(e) { this.scale_ = e, this.scaleArray_ = jm(e !== void 0 ? e : 1); }, r.prototype.setStroke = function(e) { this.stroke_ = e; }, r.prototype.setText = function(e) { this.text_ = e; }, r.prototype.setTextAlign = function(e) { this.textAlign_ = e; }, r.prototype.setTextBaseline = function(e) { this.textBaseline_ = e; }, r.prototype.setBackgroundFill = function(e) { this.backgroundFill_ = e; }, r.prototype.setBackgroundStroke = function(e) { this.backgroundStroke_ = e; }, r.prototype.setPadding = function(e) { this.padding_ = e; }, r; }(); const tZe = eZe; var os = 0.5; function Fre(r, e, t, n, i, a, o) { var s = r[0] * os, u = r[1] * os, l = Ss(s, u); l.imageSmoothingEnabled = !1; for (var c = l.canvas, f = new Wqe(l, os, i, null, o), h = t.length, p = Math.floor((256 * 256 * 256 - 1) / h), d = {}, v = 1; v <= h; ++v) { var g = t[v - 1], m = g.getStyleFunction() || n; if (!!n) { var y = m(g, a); if (!!y) { Array.isArray(y) || (y = [y]); for (var _ = v * p, w = "#" + ("000000" + _.toString(16)).slice(-6), x = 0, C = y.length; x < C; ++x) { var S = y[x], b = S.getGeometryFunction()(g); if (!(!b || !Ti(i, b.getExtent()))) { var E = S.clone(), T = E.getFill(); T && T.setColor(w); var P = E.getStroke(); P && (P.setColor(w), P.setLineDash(null)), E.setText(void 0); var I = S.getImage(); if (I && I.getOpacity() !== 0) { var A = I.getImageSize(); if (!A) continue; var L = Ss(A[0], A[1], void 0, { alpha: !1 }), D = L.canvas; L.fillStyle = w, L.fillRect(0, 0, D.width, D.height), E.setImage(new Jqe({ img: D, imgSize: A, anchor: I.getAnchor(), anchorXUnits: Uf.PIXELS, anchorYUnits: Uf.PIXELS, offset: I.getOrigin(), opacity: 1, size: I.getSize(), scale: I.getScale(), rotation: I.getRotation(), rotateWithView: I.getRotateWithView() })); } var O = E.getZIndex() || 0, N = d[O]; N || (N = {}, d[O] = N, N[Ee.POLYGON] = [], N[Ee.CIRCLE] = [], N[Ee.LINE_STRING] = [], N[Ee.POINT] = []), N[b.getType().replace("Multi", "")].push(b, E); } } } } } for (var F = Object.keys(d).map(Number).sort(Um), v = 0, k = F.length; v < k; ++v) { var N = d[F[v]]; for (var G in N) for (var U = N[G], x = 0, C = U.length; x < C; x += 2) { f.setStyle(U[x + 1]); for (var B = 0, X = e.length; B < X; ++B) f.setTransform(e[B]), f.drawGeometry(U[x]); } } return l.getImageData(0, 0, c.width, c.height); } function Bre(r, e, t) { var n = []; if (t) { var i = Math.floor(Math.round(r[0]) * os), a = Math.floor(Math.round(r[1]) * os), o = (Di(i, 0, t.width - 1) + Di(a, 0, t.height - 1) * t.width) * 4, s = t.data[o], u = t.data[o + 1], l = t.data[o + 2], c = l + 256 * (u + 256 * s), f = Math.floor((256 * 256 * 256 - 1) / e.length); c && c % f === 0 && n.push(e[c / f - 1]); } return n; } var rZe = 0.5, kre = { Point: cZe, LineString: sZe, Polygon: hZe, MultiPoint: fZe, MultiLineString: uZe, MultiPolygon: lZe, GeometryCollection: oZe, Circle: iZe }; function nZe(r, e) { return parseInt(Ft(r), 10) - parseInt(Ft(e), 10); } function Vre(r, e) { var t = fO(r, e); return t * t; } function fO(r, e) { return rZe * r / e; } function iZe(r, e, t, n, i) { var a = t.getFill(), o = t.getStroke(); if (a || o) { var s = r.getBuilder(t.getZIndex(), jt.CIRCLE); s.setFillStrokeStyle(a, o), s.drawCircle(e, n); } var u = t.getText(); if (u && u.getText()) { var l = (i || r).getBuilder(t.getZIndex(), jt.TEXT); l.setTextStyle(u), l.drawText(e, n); } } function Eb(r, e, t, n, i, a, o) { var s = !1, u = t.getImage(); if (u) { var l = u.getImageState(); l == hn.LOADED || l == hn.ERROR ? u.unlistenImageChange(i) : (l == hn.IDLE && u.load(), l = u.getImageState(), u.listenImageChange(i), s = !0); } return aZe(r, e, t, n, a, o), s; } function aZe(r, e, t, n, i, a) { var o = t.getGeometryFunction()(e); if (!!o) { var s = o.simplifyTransformed(n, i), u = t.getRenderer(); if (u) Gre(r, s, t, e); else { var l = kre[s.getType()]; l(r, s, t, e, a); } } } function Gre(r, e, t, n) { if (e.getType() == Ee.GEOMETRY_COLLECTION) { for (var i = e.getGeometries(), a = 0, o = i.length; a < o; ++a) Gre(r, i[a], t, n); return; } var s = r.getBuilder(t.getZIndex(), jt.DEFAULT); s.drawCustom( e, n, t.getRenderer(), t.getHitDetectionRenderer() ); } function oZe(r, e, t, n, i) { var a = e.getGeometriesArray(), o, s; for (o = 0, s = a.length; o < s; ++o) { var u = kre[a[o].getType()]; u(r, a[o], t, n, i); } } function sZe(r, e, t, n, i) { var a = t.getStroke(); if (a) { var o = r.getBuilder(t.getZIndex(), jt.LINE_STRING); o.setFillStrokeStyle(null, a), o.drawLineString(e, n); } var s = t.getText(); if (s && s.getText()) { var u = (i || r).getBuilder(t.getZIndex(), jt.TEXT); u.setTextStyle(s), u.drawText(e, n); } } function uZe(r, e, t, n, i) { var a = t.getStroke(); if (a) { var o = r.getBuilder(t.getZIndex(), jt.LINE_STRING); o.setFillStrokeStyle(null, a), o.drawMultiLineString(e, n); } var s = t.getText(); if (s && s.getText()) { var u = (i || r).getBuilder(t.getZIndex(), jt.TEXT); u.setTextStyle(s), u.drawText(e, n); } } function lZe(r, e, t, n, i) { var a = t.getFill(), o = t.getStroke(); if (o || a) { var s = r.getBuilder(t.getZIndex(), jt.POLYGON); s.setFillStrokeStyle(a, o), s.drawMultiPolygon(e, n); } var u = t.getText(); if (u && u.getText()) { var l = (i || r).getBuilder(t.getZIndex(), jt.TEXT); l.setTextStyle(u), l.drawText(e, n); } } function cZe(r, e, t, n, i) { var a = t.getImage(), o = t.getText(), s; if (i && (r = i, s = a && o && o.getText() ? {} : void 0), a) { if (a.getImageState() != hn.LOADED) return; var u = r.getBuilder(t.getZIndex(), jt.IMAGE); u.setImageStyle(a, s), u.drawPoint(e, n); } if (o && o.getText()) { var l = r.getBuilder(t.getZIndex(), jt.TEXT); l.setTextStyle(o, s), l.drawText(e, n); } } function fZe(r, e, t, n, i) { var a = t.getImage(), o = t.getText(), s; if (i && (r = i, s = a && o && o.getText() ? {} : void 0), a) { if (a.getImageState() != hn.LOADED) return; var u = r.getBuilder(t.getZIndex(), jt.IMAGE); u.setImageStyle(a, s), u.drawMultiPoint(e, n); } if (o && o.getText()) { var l = (i || r).getBuilder(t.getZIndex(), jt.TEXT); l.setTextStyle(o, s), l.drawText(e, n); } } function hZe(r, e, t, n, i) { var a = t.getFill(), o = t.getStroke(); if (a || o) { var s = r.getBuilder(t.getZIndex(), jt.POLYGON); s.setFillStrokeStyle(a, o), s.drawPolygon(e, n); } var u = t.getText(); if (u && u.getText()) { var l = (i || r).getBuilder(t.getZIndex(), jt.TEXT); l.setTextStyle(u), l.drawText(e, n); } } var pZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), dZe = function(r) { pZe(e, r); function e(t) { var n = r.call(this, t) || this; return n.boundHandleStyleImageChange_ = n.handleStyleImageChange_.bind(n), n.animatingOrInteracting_, n.dirty_ = !1, n.hitDetectionImageData_ = null, n.renderedFeatures_ = null, n.renderedRevision_ = -1, n.renderedResolution_ = NaN, n.renderedExtent_ = Cs(), n.wrappedRenderedExtent_ = Cs(), n.renderedRotation_, n.renderedCenter_ = null, n.renderedProjection_ = null, n.renderedRenderOrder_ = null, n.replayGroup_ = null, n.replayGroupChanged = !0, n.declutterExecutorGroup = null, n.clipping = !0, n; } return e.prototype.renderWorlds = function(t, n, i) { var a = n.extent, o = n.viewState, s = o.center, u = o.resolution, l = o.projection, c = o.rotation, f = l.getExtent(), h = this.getLayer().getSource(), p = n.pixelRatio, d = n.viewHints, v = !(d[yn.ANIMATING] || d[yn.INTERACTING]), g = this.context, m = Math.round(n.size[0] * p), y = Math.round(n.size[1] * p), _ = h.getWrapX() && l.canWrapX(), w = _ ? ai(f) : null, x = _ ? Math.ceil((a[2] - f[2]) / w) + 1 : 1, C = _ ? Math.floor((a[0] - f[0]) / w) : 0; do { var S = this.getRenderTransform(s, u, c, p, m, y, C * w); t.execute(g, 1, S, c, v, void 0, i); } while (++C < x); }, e.prototype.renderDeclutter = function(t) { this.declutterExecutorGroup && this.renderWorlds(this.declutterExecutorGroup, t, t.declutterTree); }, e.prototype.renderFrame = function(t, n) { var i = t.pixelRatio, a = t.layerStatesArray[t.layerIndex]; rXe(this.pixelTransform, 1 / i, 1 / i), nx(this.inversePixelTransform, this.pixelTransform); var o = X5(this.pixelTransform); this.useContainer(n, o, a.opacity, this.getBackground(t)); var s = this.context, u = s.canvas, l = this.replayGroup_, c = this.declutterExecutorGroup; if ((!l || l.isEmpty()) && (!c || c.isEmpty())) return null; var f = Math.round(t.size[0] * i), h = Math.round(t.size[1] * i); u.width != f || u.height != h ? (u.width = f, u.height = h, u.style.transform !== o && (u.style.transform = o)) : this.containerReused || s.clearRect(0, 0, f, h), this.preRender(s, t); var p = t.viewState; p.projection; var d = !1, v = !0; if (a.extent && this.clipping) { var g = Dc(a.extent); v = Ti(g, t.extent), d = v && !Lc(g, t.extent), d && this.clipUnrotated(s, t, g); } v && this.renderWorlds(l, t), d && s.restore(), this.postRender(s, t); var m = bre(a.opacity), y = this.container; return m !== y.style.opacity && (y.style.opacity = m), this.renderedRotation_ !== p.rotation && (this.renderedRotation_ = p.rotation, this.hitDetectionImageData_ = null), this.container; }, e.prototype.getFeatures = function(t) { return new Promise( function(n) { if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) { var i = [this.context.canvas.width, this.context.canvas.height]; mn(this.pixelTransform, i); var a = this.renderedCenter_, o = this.renderedResolution_, s = this.renderedRotation_, u = this.renderedProjection_, l = this.wrappedRenderedExtent_, c = this.getLayer(), f = [], h = i[0] * os, p = i[1] * os; f.push(this.getRenderTransform(a, o, s, os, h, p, 0).slice()); var d = c.getSource(), v = u.getExtent(); if (d.getWrapX() && u.canWrapX() && !Lc(v, l)) { for (var g = l[0], m = ai(v), y = 0, _ = void 0; g < v[0]; ) --y, _ = m * y, f.push(this.getRenderTransform(a, o, s, os, h, p, _).slice()), g += m; for (y = 0, g = l[2]; g > v[2]; ) ++y, _ = m * y, f.push(this.getRenderTransform(a, o, s, os, h, p, _).slice()), g -= m; } this.hitDetectionImageData_ = Fre(i, f, this.renderedFeatures_, c.getStyleFunction(), l, o, s); } n(Bre(t, this.renderedFeatures_, this.hitDetectionImageData_)); }.bind(this) ); }, e.prototype.forEachFeatureAtCoordinate = function(t, n, i, a, o) { var s = this; if (!!this.replayGroup_) { var u = n.viewState.resolution, l = n.viewState.rotation, c = this.getLayer(), f = {}, h = function(v, g, m) { var y = Ft(v), _ = f[y]; if (_) { if (_ !== !0 && m < _.distanceSq) { if (m === 0) return f[y] = !0, o.splice(o.lastIndexOf(_), 1), a(v, c, g); _.geometry = g, _.distanceSq = m; } } else { if (m === 0) return f[y] = !0, a(v, c, g); o.push(f[y] = { feature: v, layer: c, geometry: g, distanceSq: m, callback: a }); } }, p, d = [this.replayGroup_]; return this.declutterExecutorGroup && d.push(this.declutterExecutorGroup), d.some(function(v) { return p = v.forEachFeatureAtCoordinate(t, u, l, i, h, v === s.declutterExecutorGroup && n.declutterTree ? n.declutterTree.all().map(function(g) { return g.value; }) : null); }), p; } }, e.prototype.handleFontsChanged = function() { var t = this.getLayer(); t.getVisible() && this.replayGroup_ && t.changed(); }, e.prototype.handleStyleImageChange_ = function(t) { this.renderIfReadyAndVisible(); }, e.prototype.prepareFrame = function(t) { var n = this.getLayer(), i = n.getSource(); if (!i) return !1; var a = t.viewHints[yn.ANIMATING], o = t.viewHints[yn.INTERACTING], s = n.getUpdateWhileAnimating(), u = n.getUpdateWhileInteracting(); if (!this.dirty_ && !s && a || !u && o) return this.animatingOrInteracting_ = !0, !0; this.animatingOrInteracting_ = !1; var l = t.extent, c = t.viewState, f = c.projection, h = c.resolution, p = t.pixelRatio, d = n.getRevision(), v = n.getRenderBuffer(), g = n.getRenderOrder(); g === void 0 && (g = nZe); var m = c.center.slice(), y = $m(l, v * h), _ = y.slice(), w = [y.slice()], x = f.getExtent(); if (i.getWrapX() && f.canWrapX() && !Lc(x, t.extent)) { var C = ai(x), S = Math.max(ai(y) / 2, C); y[0] = x[0] - S, y[2] = x[2] + S, $5(m, f); var b = pYe(w[0], f); b[0] < x[0] && b[2] < x[2] ? w.push([ b[0] + C, b[1], b[2] + C, b[3] ]) : b[0] > x[0] && b[2] > x[2] && w.push([ b[0] - C, b[1], b[2] - C, b[3] ]); } if (!this.dirty_ && this.renderedResolution_ == h && this.renderedRevision_ == d && this.renderedRenderOrder_ == g && Lc(this.wrappedRenderedExtent_, y)) return Zh(this.renderedExtent_, _) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = _), this.renderedCenter_ = m, this.replayGroupChanged = !1, !0; this.replayGroup_ = null, this.dirty_ = !1; var E = new xb(fO(h, p), y, h, p), T; this.getLayer().getDeclutter() && (T = new xb(fO(h, p), y, h, p)); for (var P, I, A, I = 0, A = w.length; I < A; ++I) i.loadFeatures(w[I], h, f); var L = Vre(h, p), D = function(G) { var U, B = G.getStyleFunction() || n.getStyleFunction(); if (B && (U = B(G, h)), U) { var X = this.renderFeature(G, L, U, E, P, T); this.dirty_ = this.dirty_ || X; } }.bind(this), O = fre(y), N = i.getFeaturesInExtent(O); g && N.sort(g); for (var I = 0, A = N.length; I < A; ++I) D(N[I]); this.renderedFeatures_ = N; var F = E.finish(), k = new Cb(y, h, p, i.getOverlaps(), F, n.getRenderBuffer()); return T && (this.declutterExecutorGroup = new Cb(y, h, p, i.getOverlaps(), T.finish(), n.getRenderBuffer())), this.renderedResolution_ = h, this.renderedRevision_ = d, this.renderedRenderOrder_ = g, this.renderedExtent_ = _, this.wrappedRenderedExtent_ = y, this.renderedCenter_ = m, this.renderedProjection_ = f, this.replayGroup_ = k, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; }, e.prototype.renderFeature = function(t, n, i, a, o, s) { if (!i) return !1; var u = !1; if (Array.isArray(i)) for (var l = 0, c = i.length; l < c; ++l) u = Eb(a, t, i[l], n, this.boundHandleStyleImageChange_, o, s) || u; else u = Eb(a, t, i, n, this.boundHandleStyleImageChange_, o, s); return u; }, e; }(q5); const vZe = dZe; var gZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), mZe = function(r) { gZe(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.createRenderer = function() { return new vZe(this); }, e; }(SP); const EP = mZe, lh = { IMAGE: "image", HYBRID: "hybrid", VECTOR: "vector" }; var yZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), _Ze = { image: [ jt.POLYGON, jt.CIRCLE, jt.LINE_STRING, jt.IMAGE, jt.TEXT ], hybrid: [jt.POLYGON, jt.LINE_STRING], vector: [] }, wZe = { hybrid: [jt.IMAGE, jt.TEXT, jt.DEFAULT], vector: [ jt.POLYGON, jt.CIRCLE, jt.LINE_STRING, jt.IMAGE, jt.TEXT, jt.DEFAULT ] }, xZe = function(r) { yZe(e, r); function e(t) { var n = r.call(this, t) || this; return n.boundHandleStyleImageChange_ = n.handleStyleImageChange_.bind(n), n.dirty_ = !1, n.renderedLayerRevision_, n.renderedPixelToCoordinateTransform_ = null, n.renderedRotation_, n.tmpTransform_ = ha(), n; } return e.prototype.prepareTile = function(t, n, i) { var a, o = t.getState(); return (o === It.LOADED || o === It.ERROR) && (this.updateExecutorGroup_(t, n, i), this.tileImageNeedsRender_(t) && (a = !0)), a; }, e.prototype.getTile = function(t, n, i, a) { var o = a.pixelRatio, s = a.viewState, u = s.resolution, l = s.projection, c = this.getLayer(), f = c.getSource().getTile(t, n, i, o, l), h = a.viewHints, p = !(h[yn.ANIMATING] || h[yn.INTERACTING]); (p || !f.wantedResolution) && (f.wantedResolution = u); var d = this.prepareTile(f, o, l); return d && (p || Date.now() - a.time < 8) && c.getRenderMode() !== lh.VECTOR && this.renderTileImage_(f, a), r.prototype.getTile.call(this, t, n, i, a); }, e.prototype.isDrawableTile = function(t) { var n = this.getLayer(); return r.prototype.isDrawableTile.call(this, t) && (n.getRenderMode() === lh.VECTOR ? Ft(n) in t.executorGroups : t.hasContext(n)); }, e.prototype.getTileImage = function(t) { return t.getImage(this.getLayer()); }, e.prototype.prepareFrame = function(t) { var n = this.getLayer().getRevision(); return this.renderedLayerRevision_ != n && (this.renderedTiles.length = 0), this.renderedLayerRevision_ = n, r.prototype.prepareFrame.call(this, t); }, e.prototype.updateExecutorGroup_ = function(t, n, i) { var a = this.getLayer(), o = a.getRevision(), s = a.getRenderOrder() || null, u = t.wantedResolution, l = t.getReplayState(a); if (!(!l.dirty && l.renderedResolution === u && l.renderedRevision == o && l.renderedRenderOrder == s)) { var c = a.getSource(), f = a.getDeclutter(), h = c.getTileGrid(), p = c.getTileGridForProjection(i), d = p.getTileCoordExtent(t.wrappedTileCoord), v = c.getSourceTiles(n, i, t), g = Ft(a); delete t.hitDetectionImageData[g], t.executorGroups[g] = [], f && (t.declutterExecutorGroups[g] = []); for (var m = function(x, C) { var S = v[x]; if (S.getState() != It.LOADED) return "continue"; var b = S.tileCoord, E = h.getTileCoordExtent(b), T = fd(d, E), P = $m(T, a.getRenderBuffer() * u, y.tmpExtent), I = Yd(E, T) ? null : P; l.dirty = !1; var A = new xb(0, P, u, n), L = f ? new xb(0, T, u, n) : void 0, D = Vre(u, n), O = function(ae) { var se, $ = ae.getStyleFunction() || a.getStyleFunction(); if ($ && (se = $(ae, u)), se) { var V = this.renderFeature(ae, D, se, A, L); this.dirty_ = this.dirty_ || V, l.dirty = l.dirty || V; } }, N = S.getFeatures(); s && s !== l.renderedRenderOrder && N.sort(s); for (var F = 0, k = N.length; F < k; ++F) { var G = N[F]; (!I || Ti(I, G.getGeometry().getExtent())) && O.call(y, G); } var U = A.finish(), B = a.getRenderMode() !== lh.VECTOR && f && v.length === 1 ? null : T, X = new Cb(B, u, n, c.getOverlaps(), U, a.getRenderBuffer()); if (t.executorGroups[g].push(X), L) { var j = new Cb(null, u, n, c.getOverlaps(), L.finish(), a.getRenderBuffer()); t.declutterExecutorGroups[g].push(j); } }, y = this, _ = 0, w = v.length; _ < w; ++_) m(_); l.renderedRevision = o, l.renderedRenderOrder = s, l.renderedResolution = u; } }, e.prototype.forEachFeatureAtCoordinate = function(t, n, i, a, o) { var s = n.viewState.resolution, u = n.viewState.rotation; i = i == null ? 0 : i; var l = this.getLayer(), c = l.getSource(), f = c.getTileGridForProjection(n.viewState.projection), h = eO([t]); $m(h, s * i, h); for (var p = {}, d = function(w, x, C) { var S = w.getId(); S === void 0 && (S = Ft(w)); var b = p[S]; if (b) { if (b !== !0 && C < b.distanceSq) { if (C === 0) return p[S] = !0, o.splice(o.lastIndexOf(b), 1), a(w, l, x); b.geometry = x, b.distanceSq = C; } } else { if (C === 0) return p[S] = !0, a(w, l, x); o.push(p[S] = { feature: w, layer: l, geometry: x, distanceSq: C, callback: a }); } }, v = this.renderedTiles, g, m = function(w, x) { var C = v[w], S = f.getTileCoordExtent(C.wrappedTileCoord); if (!Ti(S, h)) return "continue"; var b = Ft(l), E = [C.executorGroups[b]], T = C.declutterExecutorGroups[b]; T && E.push(T), E.some(function(P) { for (var I = P === T ? n.declutterTree.all().map(function(O) { return O.value; }) : null, A = 0, L = P.length; A < L; ++A) { var D = P[A]; if (g = D.forEachFeatureAtCoordinate(t, s, u, i, d, I), g) return !0; } }); }, y = 0, _ = v.length; !g && y < _; ++y) m(y); return g; }, e.prototype.getFeatures = function(t) { return new Promise(function(n, i) { for (var a = this.getLayer(), o = Ft(a), s = a.getSource(), u = this.renderedProjection, l = u.getExtent(), c = this.renderedResolution, f = s.getTileGridForProjection(u), h = mn(this.renderedPixelToCoordinateTransform_, t.slice()), p = f.getTileCoordForCoordAndResolution(h, c), d, v = 0, g = this.renderedTiles.length; v < g; ++v) if (p.toString() === this.renderedTiles[v].tileCoord.toString()) { if (d = this.renderedTiles[v], d.getState() === It.LOADED) { var m = f.getTileCoordExtent(d.tileCoord); s.getWrapX() && u.canWrapX() && !Lc(l, m) && $5(h, u); break; } d = void 0; } if (!d || d.loadingSourceTiles > 0) { n([]); return; } var y = f.getTileCoordExtent(d.wrappedTileCoord), _ = Gy(y), w = [ (h[0] - _[0]) / c, (_[1] - h[1]) / c ], x = d.getSourceTiles().reduce(function(T, P) { return T.concat(P.getFeatures()); }, []), C = d.hitDetectionImageData[o]; if (!C && !this.animatingOrInteracting_) { var S = jm(f.getTileSize(f.getZForResolution(c))), b = this.renderedRotation_, E = [ this.getRenderTransform(f.getTileCoordCenter(d.wrappedTileCoord), c, 0, os, S[0] * os, S[1] * os, 0) ]; C = Fre(S, E, x, a.getStyleFunction(), f.getTileCoordExtent(d.wrappedTileCoord), d.getReplayState(a).renderedResolution, b), d.hitDetectionImageData[o] = C; } n(Bre(w, x, C)); }.bind(this)); }, e.prototype.handleFontsChanged = function() { var t = this.getLayer(); t.getVisible() && this.renderedLayerRevision_ !== void 0 && t.changed(); }, e.prototype.handleStyleImageChange_ = function(t) { this.renderIfReadyAndVisible(); }, e.prototype.renderDeclutter = function(t) { var n = this.context, i = n.globalAlpha; n.globalAlpha = this.getLayer().getOpacity(); for (var a = t.viewHints, o = !(a[yn.ANIMATING] || a[yn.INTERACTING]), s = this.renderedTiles, u = 0, l = s.length; u < l; ++u) { var c = s[u], f = c.declutterExecutorGroups[Ft(this.getLayer())]; if (f) for (var h = f.length - 1; h >= 0; --h) f[h].execute(this.context, 1, this.getTileRenderTransform(c, t), t.viewState.rotation, o, void 0, t.declutterTree); } n.globalAlpha = i; }, e.prototype.getTileRenderTransform = function(t, n) { var i = n.pixelRatio, a = n.viewState, o = a.center, s = a.resolution, u = a.rotation, l = n.size, c = Math.round(l[0] * i), f = Math.round(l[1] * i), h = this.getLayer().getSource(), p = h.getTileGridForProjection(n.viewState.projection), d = t.tileCoord, v = p.getTileCoordExtent(t.wrappedTileCoord), g = p.getTileCoordExtent(d, this.tmpExtent)[0] - v[0], m = tx(CS(this.inversePixelTransform.slice(), 1 / i, 1 / i), this.getRenderTransform(o, s, u, i, c, f, g)); return m; }, e.prototype.renderFrame = function(t, n) { var i = t.viewHints, a = !(i[yn.ANIMATING] || i[yn.INTERACTING]); r.prototype.renderFrame.call(this, t, n), this.renderedPixelToCoordinateTransform_ = t.pixelToCoordinateTransform.slice(), this.renderedRotation_ = t.viewState.rotation; var o = this.getLayer(), s = o.getRenderMode(), u = this.context, l = u.globalAlpha; u.globalAlpha = o.getOpacity(); for (var c = wZe[s], f = t.viewState, h = f.rotation, p = o.getSource(), d = p.getTileGridForProjection(f.projection), v = d.getZForResolution(f.resolution, p.zDirection), g = this.renderedTiles, m = [], y = [], _ = g.length - 1; _ >= 0; --_) { var w = g[_], x = w.executorGroups[Ft(o)].filter(function(O) { return O.hasExecutors(c); }); if (x.length !== 0) { for (var C = this.getTileRenderTransform(w, t), S = w.tileCoord[0], b = !1, E = x[0].getClipCoords(C), T = 0, P = m.length; T < P; ++T) if (v !== S && S < y[T]) { var I = m[T]; Ti([E[0], E[3], E[4], E[7]], [I[0], I[3], I[4], I[7]]) && (b || (u.save(), b = !0), u.beginPath(), u.moveTo(E[0], E[1]), u.lineTo(E[2], E[3]), u.lineTo(E[4], E[5]), u.lineTo(E[6], E[7]), u.moveTo(I[6], I[7]), u.lineTo(I[4], I[5]), u.lineTo(I[2], I[3]), u.lineTo(I[0], I[1]), u.clip()); } m.push(E), y.push(S); for (var A = 0, L = x.length; A < L; ++A) { var D = x[A]; D.execute(u, 1, C, h, a, c); } b && u.restore(); } } return u.globalAlpha = l, this.container; }, e.prototype.renderFeature = function(t, n, i, a, o) { if (!i) return !1; var s = !1; if (Array.isArray(i)) for (var u = 0, l = i.length; u < l; ++u) s = Eb(a, t, i[u], n, this.boundHandleStyleImageChange_, void 0, o) || s; else s = Eb(a, t, i, n, this.boundHandleStyleImageChange_, void 0, o); return s; }, e.prototype.tileImageNeedsRender_ = function(t) { var n = this.getLayer(); if (n.getRenderMode() === lh.VECTOR) return !1; var i = t.getReplayState(n), a = n.getRevision(), o = t.wantedResolution; return i.renderedTileResolution !== o || i.renderedTileRevision !== a; }, e.prototype.renderTileImage_ = function(t, n) { var i = this.getLayer(), a = t.getReplayState(i), o = i.getRevision(), s = t.executorGroups[Ft(i)]; a.renderedTileRevision = o; var u = t.wrappedTileCoord, l = u[0], c = i.getSource(), f = n.pixelRatio, h = n.viewState, p = h.projection, d = c.getTileGridForProjection(p), v = d.getResolution(t.tileCoord[0]), g = n.pixelRatio / t.wantedResolution * v, m = d.getResolution(l), y = t.getContext(i); f = Math.round(Math.max(f, g / f)); var _ = c.getTilePixelSize(l, f, p); y.canvas.width = _[0], y.canvas.height = _[1]; var w = f / g; if (w !== 1) { var x = M_(this.tmpTransform_); CS(x, w, w), y.setTransform.apply(y, x); } var C = d.getTileCoordExtent(u, this.tmpExtent), S = g / m, b = M_(this.tmpTransform_); CS(b, S, -S), nXe(b, -C[0], -C[3]); for (var E = 0, T = s.length; E < T; ++E) { var P = s[E]; P.execute(y, w, b, 0, !0, _Ze[i.getRenderMode()]); } a.renderedTileResolution = t.wantedResolution; }, e; }(Tre); const CZe = xZe; var SZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), EZe = function(r) { SZe(e, r); function e(t) { var n = this, i = t || {}, a = jn({}, i); delete a.preload, delete a.useInterimTilesOnError, n = r.call( this, a ) || this, n.on, n.once, n.un, i.renderMode === lh.IMAGE && (console.warn('renderMode: "image" is deprecated. Option ignored.'), i.renderMode = void 0); var o = i.renderMode || lh.HYBRID; return cn(o == lh.HYBRID || o == lh.VECTOR, 28), n.renderMode_ = o, n.setPreload(i.preload ? i.preload : 0), n.setUseInterimTilesOnError(i.useInterimTilesOnError !== void 0 ? i.useInterimTilesOnError : !0), n.getBackground, n.setBackground, n; } return e.prototype.createRenderer = function() { return new CZe(this); }, e.prototype.getFeatures = function(t) { return r.prototype.getFeatures.call(this, t); }, e.prototype.getRenderMode = function() { return this.renderMode_; }, e.prototype.getPreload = function() { return this.get(ah.PRELOAD); }, e.prototype.getUseInterimTilesOnError = function() { return this.get(ah.USE_INTERIM_TILES_ON_ERROR); }, e.prototype.setPreload = function(t) { this.set(ah.PRELOAD, t); }, e.prototype.setUseInterimTilesOnError = function(t) { this.set(ah.USE_INTERIM_TILES_ON_ERROR, t); }, e; }(SP); const bZe = EZe; var TZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), PZe = function(r) { TZe(e, r); function e(t) { var n = t || {}; return r.call(this, n) || this; } return e; }(ex); const IZe = PZe; var AZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), LZe = function(r) { AZe(e, r); function e(t) { var n = r.call(this, t) || this; return n.image_ = null, n; } return e.prototype.getImage = function() { return this.image_ ? this.image_.getImage() : null; }, e.prototype.prepareFrame = function(t) { var n = t.layerStatesArray[t.layerIndex], i = t.pixelRatio, a = t.viewState, o = a.resolution, s = this.getLayer().getSource(), u = t.viewHints, l = t.extent; if (n.extent !== void 0 && (l = fd(l, Dc(n.extent, a.projection))), !u[yn.ANIMATING] && !u[yn.INTERACTING] && !_P(l)) if (s) { var c = a.projection; if (!TXe) { var f = s.getProjection(); f && (c = f); } var h = s.getImage(l, o, i, c); h && (this.loadImage(h) ? this.image_ = h : h.getState() === hn.EMPTY && (this.image_ = null)); } else this.image_ = null; return !!this.image_; }, e.prototype.getData = function(t) { var n = this.frameState; if (!n) return null; var i = this.getLayer(), a = mn(n.pixelToCoordinateTransform, t.slice()), o = i.getExtent(); if (o && !Vy(o, a)) return null; var s = this.image_.getExtent(), u = this.image_.getImage(), l = ai(s), c = Math.floor(u.width * ((a[0] - s[0]) / l)); if (c < 0 || c >= u.width) return null; var f = il(s), h = Math.floor(u.height * ((s[3] - a[1]) / f)); return h < 0 || h >= u.height ? null : this.getImageData(u, c, h); }, e.prototype.renderFrame = function(t, n) { var i = this.image_, a = i.getExtent(), o = i.getResolution(), s = i.getPixelRatio(), u = t.layerStatesArray[t.layerIndex], l = t.pixelRatio, c = t.viewState, f = c.center, h = c.resolution, p = t.size, d = l * o / (h * s), v = Math.round(p[0] * l), g = Math.round(p[1] * l), m = c.rotation; if (m) { var y = Math.round(Math.sqrt(v * v + g * g)); v = y, g = y; } Es(this.pixelTransform, t.size[0] / 2, t.size[1] / 2, 1 / l, 1 / l, m, -v / 2, -g / 2), nx(this.inversePixelTransform, this.pixelTransform); var _ = X5(this.pixelTransform); this.useContainer(n, _, u.opacity, this.getBackground(t)); var w = this.context, x = w.canvas; x.width != v || x.height != g ? (x.width = v, x.height = g) : this.containerReused || w.clearRect(0, 0, v, g); var C = !1, S = !0; if (u.extent) { var b = Dc(u.extent, c.projection); S = Ti(b, t.extent), C = S && !Lc(b, t.extent), C && this.clipUnrotated(w, t, b); } var E = i.getImage(), T = Es(this.tempTransform, v / 2, g / 2, d, d, 0, s * (a[0] - f[0]) / o, s * (f[1] - a[3]) / o); this.renderedResolution = o * l / s; var P = E.width * T[0], I = E.height * T[3]; if (this.getLayer().getSource().getInterpolate() || jn(w, gb), this.preRender(w, t), S && P >= 0.5 && I >= 0.5) { var A = T[4], L = T[5], D = u.opacity, O = void 0; D !== 1 && (O = w.globalAlpha, w.globalAlpha = D), w.drawImage(E, 0, 0, +E.width, +E.height, Math.round(A), Math.round(L), Math.round(P), Math.round(I)), D !== 1 && (w.globalAlpha = O); } return this.postRender(w, t), C && w.restore(), jn(w, Sre), _ !== x.style.transform && (x.style.transform = _), this.container; }, e; }(q5); const DZe = LZe; var MZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), OZe = function(r) { MZe(e, r); function e(t) { return r.call(this, t) || this; } return e.prototype.createRenderer = function() { return new DZe(this); }, e.prototype.getData = function(t) { return r.prototype.getData.call(this, t); }, e; }(IZe); const RZe = OZe, ao = { ADDFEATURE: "addfeature", CHANGEFEATURE: "changefeature", CLEAR: "clear", REMOVEFEATURE: "removefeature", FEATURESLOADSTART: "featuresloadstart", FEATURESLOADEND: "featuresloadend", FEATURESLOADERROR: "featuresloaderror" }; var bb = 34962, Q5 = 34963, NZe = 35040, FZe = 35044, SS = 35048, BZe = 5121, kZe = 5123, VZe = 5125, zre = 5126, M$ = ["experimental-webgl", "webgl", "webkit-3d", "moz-webgl"]; function $re(r, e) { for (var t = jn({ preserveDrawingBuffer: !0, antialias: !RYe }, e), n = M$.length, i = 0; i < n; ++i) try { var a = r.getContext(M$[i], t); if (a) return a; } catch { } return null; } var GZe = { STATIC_DRAW: FZe, STREAM_DRAW: NZe, DYNAMIC_DRAW: SS }, zZe = function() { function r(e, t) { this.array = null, this.type = e, cn(e === bb || e === Q5, 62), this.usage = t !== void 0 ? t : GZe.STATIC_DRAW; } return r.prototype.ofSize = function(e) { this.array = new (XL(this.type))(e); }, r.prototype.fromArray = function(e) { var t = XL(this.type); this.array = t.from ? t.from(e) : new t(e); }, r.prototype.fromArrayBuffer = function(e) { this.array = new (XL(this.type))(e); }, r.prototype.getType = function() { return this.type; }, r.prototype.getArray = function() { return this.array; }, r.prototype.getUsage = function() { return this.usage; }, r.prototype.getSize = function() { return this.array ? this.array.length : 0; }, r; }(); function XL(r) { switch (r) { case bb: return Float32Array; case Q5: return Uint32Array; default: return Float32Array; } } const qL = zZe, GC = { LOST: "webglcontextlost", RESTORED: "webglcontextrestored" }; var $Ze = ` precision mediump float; attribute vec2 a_position; varying vec2 v_texCoord; varying vec2 v_screenCoord; uniform vec2 u_screenSize; void main() { v_texCoord = a_position * 0.5 + 0.5; v_screenCoord = v_texCoord * u_screenSize; gl_Position = vec4(a_position, 0.0, 1.0); } `, HZe = ` precision mediump float; uniform sampler2D u_image; uniform float u_opacity; varying vec2 v_texCoord; void main() { gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity; } `, UZe = function() { function r(e) { this.gl_ = e.webGlContext; var t = this.gl_; this.scaleRatio_ = e.scaleRatio || 1, this.renderTargetTexture_ = t.createTexture(), this.renderTargetTextureSize_ = null, this.frameBuffer_ = t.createFramebuffer(); var n = t.createShader(t.VERTEX_SHADER); t.shaderSource(n, e.vertexShader || $Ze), t.compileShader(n); var i = t.createShader(t.FRAGMENT_SHADER); t.shaderSource(i, e.fragmentShader || HZe), t.compileShader(i), this.renderTargetProgram_ = t.createProgram(), t.attachShader(this.renderTargetProgram_, n), t.attachShader(this.renderTargetProgram_, i), t.linkProgram(this.renderTargetProgram_), this.renderTargetVerticesBuffer_ = t.createBuffer(); var a = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1]; t.bindBuffer(t.ARRAY_BUFFER, this.renderTargetVerticesBuffer_), t.bufferData(t.ARRAY_BUFFER, new Float32Array(a), t.STATIC_DRAW), this.renderTargetAttribLocation_ = t.getAttribLocation(this.renderTargetProgram_, "a_position"), this.renderTargetUniformLocation_ = t.getUniformLocation(this.renderTargetProgram_, "u_screenSize"), this.renderTargetOpacityLocation_ = t.getUniformLocation(this.renderTargetProgram_, "u_opacity"), this.renderTargetTextureLocation_ = t.getUniformLocation(this.renderTargetProgram_, "u_image"), this.uniforms_ = [], e.uniforms && Object.keys(e.uniforms).forEach(function(o) { this.uniforms_.push({ value: e.uniforms[o], location: t.getUniformLocation(this.renderTargetProgram_, o) }); }.bind(this)); } return r.prototype.getGL = function() { return this.gl_; }, r.prototype.init = function(e) { var t = this.getGL(), n = [ t.drawingBufferWidth * this.scaleRatio_, t.drawingBufferHeight * this.scaleRatio_ ]; if (t.bindFramebuffer(t.FRAMEBUFFER, this.getFrameBuffer()), t.viewport(0, 0, n[0], n[1]), !this.renderTargetTextureSize_ || this.renderTargetTextureSize_[0] !== n[0] || this.renderTargetTextureSize_[1] !== n[1]) { this.renderTargetTextureSize_ = n; var i = 0, a = t.RGBA, o = 0, s = t.RGBA, u = t.UNSIGNED_BYTE, l = null; t.bindTexture(t.TEXTURE_2D, this.renderTargetTexture_), t.texImage2D(t.TEXTURE_2D, i, a, n[0], n[1], o, s, u, l), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, this.renderTargetTexture_, 0); } }, r.prototype.apply = function(e, t, n, i) { var a = this.getGL(), o = e.size; if (a.bindFramebuffer(a.FRAMEBUFFER, t ? t.getFrameBuffer() : null), a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, this.renderTargetTexture_), !t) { var s = Ft(a.canvas); if (!e.renderTargets[s]) { var u = a.getContextAttributes(); u && u.preserveDrawingBuffer && (a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT)), e.renderTargets[s] = !0; } } a.enable(a.BLEND), a.blendFunc(a.ONE, a.ONE_MINUS_SRC_ALPHA), a.viewport(0, 0, a.drawingBufferWidth, a.drawingBufferHeight), a.bindBuffer(a.ARRAY_BUFFER, this.renderTargetVerticesBuffer_), a.useProgram(this.renderTargetProgram_), a.enableVertexAttribArray(this.renderTargetAttribLocation_), a.vertexAttribPointer(this.renderTargetAttribLocation_, 2, a.FLOAT, !1, 0, 0), a.uniform2f(this.renderTargetUniformLocation_, o[0], o[1]), a.uniform1i(this.renderTargetTextureLocation_, 0); var l = e.layerStatesArray[e.layerIndex].opacity; a.uniform1f(this.renderTargetOpacityLocation_, l), this.applyUniforms(e), n && n(a, e), a.drawArrays(a.TRIANGLES, 0, 6), i && i(a, e); }, r.prototype.getFrameBuffer = function() { return this.frameBuffer_; }, r.prototype.applyUniforms = function(e) { var t = this.getGL(), n, i = 1; this.uniforms_.forEach(function(a) { if (n = typeof a.value == "function" ? a.value(e) : a.value, n instanceof HTMLCanvasElement || n instanceof ImageData) a.texture || (a.texture = t.createTexture()), t.activeTexture(t["TEXTURE".concat(i)]), t.bindTexture(t.TEXTURE_2D, a.texture), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), n instanceof ImageData ? t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, n.width, n.height, 0, t.UNSIGNED_BYTE, new Uint8Array(n.data)) : t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, t.UNSIGNED_BYTE, n), t.uniform1i(a.location, i++); else if (Array.isArray(n)) switch (n.length) { case 2: t.uniform2f(a.location, n[0], n[1]); return; case 3: t.uniform3f(a.location, n[0], n[1], n[2]); return; case 4: t.uniform4f(a.location, n[0], n[1], n[2], n[3]); return; default: return; } else typeof n == "number" && t.uniform1f(a.location, n); }); }, r; }(); const O$ = UZe; function WZe() { return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; } function ZL(r, e) { return r[0] = e[0], r[1] = e[1], r[4] = e[2], r[5] = e[3], r[12] = e[4], r[13] = e[5], r; } var jZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), xg = { PROJECTION_MATRIX: "u_projectionMatrix", OFFSET_SCALE_MATRIX: "u_offsetScaleMatrix", OFFSET_ROTATION_MATRIX: "u_offsetRotateMatrix", TIME: "u_time", ZOOM: "u_zoom", RESOLUTION: "u_resolution" }, Ou = { UNSIGNED_BYTE: BZe, UNSIGNED_SHORT: kZe, UNSIGNED_INT: VZe, FLOAT: zre }, Tb = {}; function R$(r) { return "shared/" + r; } var N$ = 0; function YZe() { var r = "unique/" + N$; return N$ += 1, r; } function XZe(r) { var e = Tb[r]; if (!e) { var t = document.createElement("canvas"); t.style.position = "absolute", t.style.left = "0", e = { users: 0, canvas: t }, Tb[r] = e; } return e.users += 1, e.canvas; } function qZe(r) { var e = Tb[r]; if (!!e && (e.users -= 1, !(e.users > 0))) { var t = e.canvas, n = $re(t), i = n.getExtension("WEBGL_lose_context"); i && i.loseContext(), delete Tb[r]; } } var ZZe = function(r) { jZe(e, r); function e(t) { var n = r.call(this) || this, i = t || {}; n.boundHandleWebGLContextLost_ = n.handleWebGLContextLost.bind(n), n.boundHandleWebGLContextRestored_ = n.handleWebGLContextRestored.bind(n), n.canvasCacheKey_ = i.canvasCacheKey ? R$(i.canvasCacheKey) : YZe(), n.canvas_ = XZe(n.canvasCacheKey_), n.gl_ = $re(n.canvas_), n.bufferCache_ = {}, n.extensionCache_ = {}, n.currentProgram_ = null, n.canvas_.addEventListener(GC.LOST, n.boundHandleWebGLContextLost_), n.canvas_.addEventListener(GC.RESTORED, n.boundHandleWebGLContextRestored_), n.offsetRotateMatrix_ = ha(), n.offsetScaleMatrix_ = ha(), n.tmpMat4_ = WZe(), n.uniformLocations_ = {}, n.attribLocations_ = {}, n.uniforms_ = [], i.uniforms && n.setUniforms(i.uniforms); var a = n.getGL(); return n.postProcessPasses_ = i.postProcesses ? i.postProcesses.map(function(o) { return new O$({ webGlContext: a, scaleRatio: o.scaleRatio, vertexShader: o.vertexShader, fragmentShader: o.fragmentShader, uniforms: o.uniforms }); }) : [new O$({ webGlContext: a })], n.shaderCompileErrors_ = null, n.startTime_ = Date.now(), n; } return e.prototype.setUniforms = function(t) { this.uniforms_ = []; for (var n in t) this.uniforms_.push({ name: n, value: t[n] }); this.uniformLocations_ = {}; }, e.prototype.canvasCacheKeyMatches = function(t) { return this.canvasCacheKey_ === R$(t); }, e.prototype.getExtension = function(t) { if (t in this.extensionCache_) return this.extensionCache_[t]; var n = this.gl_.getExtension(t); return this.extensionCache_[t] = n, n; }, e.prototype.bindBuffer = function(t) { var n = this.getGL(), i = Ft(t), a = this.bufferCache_[i]; if (!a) { var o = n.createBuffer(); a = { buffer: t, webGlBuffer: o }, this.bufferCache_[i] = a; } n.bindBuffer(t.getType(), a.webGlBuffer); }, e.prototype.flushBufferData = function(t) { var n = this.getGL(); this.bindBuffer(t), n.bufferData(t.getType(), t.getArray(), t.getUsage()); }, e.prototype.deleteBuffer = function(t) { var n = this.getGL(), i = Ft(t), a = this.bufferCache_[i]; a && !n.isContextLost() && n.deleteBuffer(a.webGlBuffer), delete this.bufferCache_[i]; }, e.prototype.disposeInternal = function() { this.canvas_.removeEventListener(GC.LOST, this.boundHandleWebGLContextLost_), this.canvas_.removeEventListener(GC.RESTORED, this.boundHandleWebGLContextRestored_), qZe(this.canvasCacheKey_), delete this.gl_, delete this.canvas_; }, e.prototype.prepareDraw = function(t, n) { var i = this.getGL(), a = this.getCanvas(), o = t.size, s = t.pixelRatio; a.width = o[0] * s, a.height = o[1] * s, a.style.width = o[0] + "px", a.style.height = o[1] + "px", i.useProgram(this.currentProgram_); for (var u = this.postProcessPasses_.length - 1; u >= 0; u--) this.postProcessPasses_[u].init(t); i.bindTexture(i.TEXTURE_2D, null), i.clearColor(0, 0, 0, 0), i.clear(i.COLOR_BUFFER_BIT), i.enable(i.BLEND), i.blendFunc(i.ONE, n ? i.ZERO : i.ONE_MINUS_SRC_ALPHA), i.useProgram(this.currentProgram_), this.applyFrameState(t), this.applyUniforms(t); }, e.prototype.prepareDrawToRenderTarget = function(t, n, i) { var a = this.getGL(), o = n.getSize(); a.bindFramebuffer(a.FRAMEBUFFER, n.getFramebuffer()), a.viewport(0, 0, o[0], o[1]), a.bindTexture(a.TEXTURE_2D, n.getTexture()), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT), a.enable(a.BLEND), a.blendFunc(a.ONE, i ? a.ZERO : a.ONE_MINUS_SRC_ALPHA), a.useProgram(this.currentProgram_), this.applyFrameState(t), this.applyUniforms(t); }, e.prototype.drawElements = function(t, n) { var i = this.getGL(); this.getExtension("OES_element_index_uint"); var a = i.UNSIGNED_INT, o = 4, s = n - t, u = t * o; i.drawElements(i.TRIANGLES, s, a, u); }, e.prototype.finalizeDraw = function(t, n, i) { for (var a = 0, o = this.postProcessPasses_.length; a < o; a++) a === o - 1 ? this.postProcessPasses_[a].apply(t, null, n, i) : this.postProcessPasses_[a].apply(t, this.postProcessPasses_[a + 1]); }, e.prototype.getCanvas = function() { return this.canvas_; }, e.prototype.getGL = function() { return this.gl_; }, e.prototype.applyFrameState = function(t) { var n = t.size, i = t.viewState.rotation, a = M_(this.offsetScaleMatrix_); CS(a, 2 / n[0], 2 / n[1]); var o = M_(this.offsetRotateMatrix_); i !== 0 && tXe(o, -i), this.setUniformMatrixValue(xg.OFFSET_SCALE_MATRIX, ZL(this.tmpMat4_, a)), this.setUniformMatrixValue(xg.OFFSET_ROTATION_MATRIX, ZL(this.tmpMat4_, o)), this.setUniformFloatValue(xg.TIME, (Date.now() - this.startTime_) * 1e-3), this.setUniformFloatValue(xg.ZOOM, t.viewState.zoom), this.setUniformFloatValue(xg.RESOLUTION, t.viewState.resolution); }, e.prototype.applyUniforms = function(t) { var n = this.getGL(), i, a = 0; this.uniforms_.forEach(function(o) { if (i = typeof o.value == "function" ? o.value(t) : o.value, i instanceof HTMLCanvasElement || i instanceof HTMLImageElement || i instanceof ImageData) { o.texture || (o.prevValue = void 0, o.texture = n.createTexture()), n.activeTexture(n["TEXTURE".concat(a)]), n.bindTexture(n.TEXTURE_2D, o.texture), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_MIN_FILTER, n.LINEAR), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_S, n.CLAMP_TO_EDGE), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_T, n.CLAMP_TO_EDGE); var s = !(i instanceof HTMLImageElement) || i.complete; s && o.prevValue !== i && (o.prevValue = i, n.texImage2D(n.TEXTURE_2D, 0, n.RGBA, n.RGBA, n.UNSIGNED_BYTE, i)), n.uniform1i(this.getUniformLocation(o.name), a++); } else if (Array.isArray(i) && i.length === 6) this.setUniformMatrixValue(o.name, ZL(this.tmpMat4_, i)); else if (Array.isArray(i) && i.length <= 4) switch (i.length) { case 2: n.uniform2f(this.getUniformLocation(o.name), i[0], i[1]); return; case 3: n.uniform3f(this.getUniformLocation(o.name), i[0], i[1], i[2]); return; case 4: n.uniform4f(this.getUniformLocation(o.name), i[0], i[1], i[2], i[3]); return; default: return; } else typeof i == "number" && n.uniform1f(this.getUniformLocation(o.name), i); }.bind(this)); }, e.prototype.useProgram = function(t) { if (t == this.currentProgram_) return !1; var n = this.getGL(); return n.useProgram(t), this.currentProgram_ = t, this.uniformLocations_ = {}, this.attribLocations_ = {}, !0; }, e.prototype.compileShader = function(t, n) { var i = this.getGL(), a = i.createShader(n); return i.shaderSource(a, t), i.compileShader(a), a; }, e.prototype.getProgram = function(t, n) { var i = this.getGL(), a = this.compileShader(t, i.FRAGMENT_SHADER), o = this.compileShader(n, i.VERTEX_SHADER), s = i.createProgram(); if (i.attachShader(s, a), i.attachShader(s, o), i.linkProgram(s), !i.getShaderParameter(a, i.COMPILE_STATUS)) { var u = "Fragment shader compliation failed: ".concat(i.getShaderInfoLog(a)); throw new Error(u); } if (i.deleteShader(a), !i.getShaderParameter(o, i.COMPILE_STATUS)) { var u = "Vertex shader compilation failed: ".concat(i.getShaderInfoLog(o)); throw new Error(u); } if (i.deleteShader(o), !i.getProgramParameter(s, i.LINK_STATUS)) { var u = "GL program linking failed: ".concat(i.getShaderInfoLog(o)); throw new Error(u); } return s; }, e.prototype.getUniformLocation = function(t) { return this.uniformLocations_[t] === void 0 && (this.uniformLocations_[t] = this.getGL().getUniformLocation(this.currentProgram_, t)), this.uniformLocations_[t]; }, e.prototype.getAttributeLocation = function(t) { return this.attribLocations_[t] === void 0 && (this.attribLocations_[t] = this.getGL().getAttribLocation(this.currentProgram_, t)), this.attribLocations_[t]; }, e.prototype.makeProjectionTransform = function(t, n) { var i = t.size, a = t.viewState.rotation, o = t.viewState.resolution, s = t.viewState.center; return M_(n), Es(n, 0, 0, 2 / (o * i[0]), 2 / (o * i[1]), -a, -s[0], -s[1]), n; }, e.prototype.setUniformFloatValue = function(t, n) { this.getGL().uniform1f(this.getUniformLocation(t), n); }, e.prototype.setUniformFloatVec4 = function(t, n) { this.getGL().uniform4fv(this.getUniformLocation(t), n); }, e.prototype.setUniformMatrixValue = function(t, n) { this.getGL().uniformMatrix4fv(this.getUniformLocation(t), !1, n); }, e.prototype.enableAttributeArray_ = function(t, n, i, a, o) { var s = this.getAttributeLocation(t); s < 0 || (this.getGL().enableVertexAttribArray(s), this.getGL().vertexAttribPointer(s, n, i, !1, a, o)); }, e.prototype.enableAttributes = function(t) { for (var n = KZe(t), i = 0, a = 0; a < t.length; a++) { var o = t[a]; this.enableAttributeArray_(o.name, o.size, o.type || zre, n, i), i += o.size * Hre(o.type); } }, e.prototype.handleWebGLContextLost = function() { By(this.bufferCache_), this.currentProgram_ = null; }, e.prototype.handleWebGLContextRestored = function() { }, e.prototype.createTexture = function(t, n, i) { var a = this.getGL(), o = i || a.createTexture(), s = 0, u = a.RGBA, l = 0, c = a.RGBA, f = a.UNSIGNED_BYTE; return a.bindTexture(a.TEXTURE_2D, o), n ? a.texImage2D(a.TEXTURE_2D, s, u, c, f, n) : a.texImage2D(a.TEXTURE_2D, s, u, t[0], t[1], l, c, f, null), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), o; }, e; }(wP); function KZe(r) { for (var e = 0, t = 0; t < r.length; t++) { var n = r[t]; e += n.size * Hre(n.type); } return e; } function Hre(r) { switch (r) { case Ou.UNSIGNED_BYTE: return Uint8Array.BYTES_PER_ELEMENT; case Ou.UNSIGNED_SHORT: return Uint16Array.BYTES_PER_ELEMENT; case Ou.UNSIGNED_INT: return Uint32Array.BYTES_PER_ELEMENT; case Ou.FLOAT: default: return Float32Array.BYTES_PER_ELEMENT; } } var JZe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), KL = { GENERATE_BUFFERS: "GENERATE_BUFFERS" }, QZe = function(r) { JZe(e, r); function e(t, n) { var i = r.call(this, t) || this, a = n || {}; return i.inversePixelTransform_ = ha(), i.pixelContext_ = null, i.postProcesses_ = a.postProcesses, i.uniforms_ = a.uniforms, i.helper, t.addChangeListener(Qr.MAP, i.removeHelper.bind(i)), i.dispatchPreComposeEvent = i.dispatchPreComposeEvent.bind(i), i.dispatchPostComposeEvent = i.dispatchPostComposeEvent.bind(i), i; } return e.prototype.dispatchPreComposeEvent = function(t, n) { var i = this.getLayer(); if (i.hasListener(Ao.PRECOMPOSE)) { var a = new D_(Ao.PRECOMPOSE, void 0, n, t); i.dispatchEvent(a); } }, e.prototype.dispatchPostComposeEvent = function(t, n) { var i = this.getLayer(); if (i.hasListener(Ao.POSTCOMPOSE)) { var a = new D_(Ao.POSTCOMPOSE, void 0, n, t); i.dispatchEvent(a); } }, e.prototype.reset = function(t) { this.uniforms_ = t.uniforms, this.helper && this.helper.setUniforms(this.uniforms_); }, e.prototype.removeHelper = function() { this.helper && (this.helper.dispose(), delete this.helper); }, e.prototype.prepareFrame = function(t) { if (this.getLayer().getRenderSource()) { for (var n = !0, i = -1, a = void 0, o = 0, s = t.layerStatesArray.length; o < s; o++) { var u = t.layerStatesArray[o].layer, l = u.getRenderer(); if (!(l instanceof e)) { n = !0; continue; } var c = u.getClassName(); if ((n || c !== a) && (i += 1, n = !1), a = c, l === this) break; } var f = "map/" + t.mapId + "/group/" + i; (!this.helper || !this.helper.canvasCacheKeyMatches(f)) && (this.removeHelper(), this.helper = new ZZe({ postProcesses: this.postProcesses_, uniforms: this.uniforms_, canvasCacheKey: f }), a && (this.helper.getCanvas().className = a), this.afterHelperCreated()); } return this.prepareFrameInternal(t); }, e.prototype.afterHelperCreated = function() { }, e.prototype.prepareFrameInternal = function(t) { return !0; }, e.prototype.disposeInternal = function() { this.removeHelper(), r.prototype.disposeInternal.call(this); }, e.prototype.dispatchRenderEvent_ = function(t, n, i) { var a = this.getLayer(); if (a.hasListener(t)) { Es(this.inversePixelTransform_, 0, 0, i.pixelRatio, -i.pixelRatio, 0, 0, -i.size[1]); var o = new D_(t, this.inversePixelTransform_, i, n); a.dispatchEvent(o); } }, e.prototype.preRender = function(t, n) { this.dispatchRenderEvent_(Ao.PRERENDER, t, n); }, e.prototype.postRender = function(t, n) { this.dispatchRenderEvent_(Ao.POSTRENDER, t, n); }, e.prototype.getDataAtPixel = function(t, n, i) { var a = mn([n.pixelRatio, 0, 0, n.pixelRatio, 0, 0], t.slice()), o = this.helper.getGL(); if (!o) return null; var s = this.getLayer(), u = s.getExtent(); if (u) { var l = mn(n.pixelToCoordinateTransform, t.slice()); if (!Vy(u, l)) return null; } var c = o.getContextAttributes(); if (!c || !c.preserveDrawingBuffer) return new Uint8Array(); var f = Math.round(a[0]), h = Math.round(a[1]), p = this.pixelContext_; if (!p) { var d = document.createElement("canvas"); d.width = 1, d.height = 1, p = d.getContext("2d"), this.pixelContext_ = p; } p.clearRect(0, 0, 1, 1); var v; try { p.drawImage(o.canvas, f, h, 1, 1, 0, 0, 1, 1), v = p.getImageData(0, 0, 1, 1).data; } catch { return v; } return v[3] === 0 ? null : v; }, e; }(yre); function eKe(r, e) { var t = e || [], n = 256, i = n - 1; return t[0] = Math.floor(r / n / n / n) / i, t[1] = Math.floor(r / n / n) % n / i, t[2] = Math.floor(r / n) % n / i, t[3] = r % n / i, t; } function tKe(r) { var e = 0, t = 256, n = t - 1; return e += Math.round(r[0] * t * t * t * n), e += Math.round(r[1] * t * t * n), e += Math.round(r[2] * t * n), e += Math.round(r[3] * n), e; } const rKe = QZe; var Sl = new Uint8Array(4), nKe = function() { function r(e, t) { this.helper_ = e; var n = e.getGL(); this.texture_ = n.createTexture(), this.framebuffer_ = n.createFramebuffer(), this.size_ = t || [1, 1], this.data_ = new Uint8Array(0), this.dataCacheDirty_ = !0, this.updateSize_(); } return r.prototype.setSize = function(e) { Zh(e, this.size_) || (this.size_[0] = e[0], this.size_[1] = e[1], this.updateSize_()); }, r.prototype.getSize = function() { return this.size_; }, r.prototype.clearCachedData = function() { this.dataCacheDirty_ = !0; }, r.prototype.readAll = function() { if (this.dataCacheDirty_) { var e = this.size_, t = this.helper_.getGL(); t.bindFramebuffer(t.FRAMEBUFFER, this.framebuffer_), t.readPixels(0, 0, e[0], e[1], t.RGBA, t.UNSIGNED_BYTE, this.data_), this.dataCacheDirty_ = !1; } return this.data_; }, r.prototype.readPixel = function(e, t) { if (e < 0 || t < 0 || e > this.size_[0] || t >= this.size_[1]) return Sl[0] = 0, Sl[1] = 0, Sl[2] = 0, Sl[3] = 0, Sl; this.readAll(); var n = Math.floor(e) + (this.size_[1] - Math.floor(t) - 1) * this.size_[0]; return Sl[0] = this.data_[n * 4], Sl[1] = this.data_[n * 4 + 1], Sl[2] = this.data_[n * 4 + 2], Sl[3] = this.data_[n * 4 + 3], Sl; }, r.prototype.getTexture = function() { return this.texture_; }, r.prototype.getFramebuffer = function() { return this.framebuffer_; }, r.prototype.updateSize_ = function() { var e = this.size_, t = this.helper_.getGL(); this.texture_ = this.helper_.createTexture(e, null, this.texture_), t.bindFramebuffer(t.FRAMEBUFFER, this.framebuffer_), t.viewport(0, 0, e[0], e[1]), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, this.texture_, 0), this.data_ = new Uint8Array(e[0] * e[1] * 4); }, r; }(); const iKe = nKe; function aKe() { var r = 'var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r "u" ? "data:application/javascript;base64," + Buffer.from(r, "binary").toString("base64") : URL.createObjectURL(new Blob([r], { type: "application/javascript" }))); } var oKe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), sKe = function(r) { oKe(e, r); function e(t, n) { var i = this, a = n.uniforms || {}, o = ha(); a[xg.PROJECTION_MATRIX] = o, i = r.call(this, t, { uniforms: a, postProcesses: n.postProcesses }) || this, i.ready = !1, i.sourceRevision_ = -1, i.verticesBuffer_ = new qL(bb, SS), i.hitVerticesBuffer_ = new qL(bb, SS), i.indicesBuffer_ = new qL(Q5, SS), i.vertexShader_ = n.vertexShader, i.fragmentShader_ = n.fragmentShader, i.program_, i.hitDetectionEnabled_ = !!(n.hitFragmentShader && n.hitVertexShader), i.hitVertexShader_ = n.hitVertexShader, i.hitFragmentShader_ = n.hitFragmentShader, i.hitProgram_; var s = n.attributes ? n.attributes.map(function(l) { return { name: "a_" + l.name, size: 1, type: Ou.FLOAT }; }) : []; i.attributes = [ { name: "a_position", size: 2, type: Ou.FLOAT }, { name: "a_index", size: 1, type: Ou.FLOAT } ].concat(s), i.hitDetectionAttributes = [ { name: "a_position", size: 2, type: Ou.FLOAT }, { name: "a_index", size: 1, type: Ou.FLOAT }, { name: "a_hitColor", size: 4, type: Ou.FLOAT }, { name: "a_featureUid", size: 1, type: Ou.FLOAT } ].concat(s), i.customAttributes = n.attributes ? n.attributes : [], i.previousExtent_ = Cs(), i.currentTransform_ = o, i.renderTransform_ = ha(), i.invertRenderTransform_ = ha(), i.renderInstructions_ = new Float32Array(0), i.hitRenderInstructions_ = new Float32Array(0), i.hitRenderTarget_, i.generateBuffersRun_ = 0, i.worker_ = aKe(), i.worker_.addEventListener( "message", function(l) { var c = l.data; if (c.type === KL.GENERATE_BUFFERS) { var f = c.projectionTransform; c.hitDetection ? (this.hitVerticesBuffer_.fromArrayBuffer(c.vertexBuffer), this.helper.flushBufferData(this.hitVerticesBuffer_)) : (this.verticesBuffer_.fromArrayBuffer(c.vertexBuffer), this.helper.flushBufferData(this.verticesBuffer_)), this.indicesBuffer_.fromArrayBuffer(c.indexBuffer), this.helper.flushBufferData(this.indicesBuffer_), this.renderTransform_ = f, nx(this.invertRenderTransform_, this.renderTransform_), c.hitDetection ? this.hitRenderInstructions_ = new Float32Array(l.data.renderInstructions) : (this.renderInstructions_ = new Float32Array(l.data.renderInstructions), c.generateBuffersRun === this.generateBuffersRun_ && (this.ready = !0)), this.getLayer().changed(); } }.bind(i) ), i.featureCache_ = {}, i.featureCount_ = 0; var u = i.getLayer().getSource(); return i.sourceListenKeys_ = [ Bt(u, ao.ADDFEATURE, i.handleSourceFeatureAdded_, i), Bt(u, ao.CHANGEFEATURE, i.handleSourceFeatureChanged_, i), Bt(u, ao.REMOVEFEATURE, i.handleSourceFeatureDelete_, i), Bt(u, ao.CLEAR, i.handleSourceFeatureClear_, i) ], u.forEachFeature(function(l) { this.featureCache_[Ft(l)] = { feature: l, properties: l.getProperties(), geometry: l.getGeometry() }, this.featureCount_++; }.bind(i)), i; } return e.prototype.afterHelperCreated = function() { this.program_ = this.helper.getProgram(this.fragmentShader_, this.vertexShader_), this.hitDetectionEnabled_ && (this.hitProgram_ = this.helper.getProgram(this.hitFragmentShader_, this.hitVertexShader_), this.hitRenderTarget_ = new iKe(this.helper)); }, e.prototype.handleSourceFeatureAdded_ = function(t) { var n = t.feature; this.featureCache_[Ft(n)] = { feature: n, properties: n.getProperties(), geometry: n.getGeometry() }, this.featureCount_++; }, e.prototype.handleSourceFeatureChanged_ = function(t) { var n = t.feature; this.featureCache_[Ft(n)] = { feature: n, properties: n.getProperties(), geometry: n.getGeometry() }; }, e.prototype.handleSourceFeatureDelete_ = function(t) { var n = t.feature; delete this.featureCache_[Ft(n)], this.featureCount_--; }, e.prototype.handleSourceFeatureClear_ = function() { this.featureCache_ = {}, this.featureCount_ = 0; }, e.prototype.renderFrame = function(t) { var n = this.helper.getGL(); this.preRender(n, t); var i = this.indicesBuffer_.getSize(); this.helper.drawElements(0, i), this.helper.finalizeDraw(t, this.dispatchPreComposeEvent, this.dispatchPostComposeEvent); var a = this.helper.getCanvas(); return this.hitDetectionEnabled_ && (this.renderHitDetection(t), this.hitRenderTarget_.clearCachedData()), this.postRender(n, t), a; }, e.prototype.prepareFrameInternal = function(t) { var n = this.getLayer(), i = n.getSource(), a = t.viewState, o = !t.viewHints[yn.ANIMATING] && !t.viewHints[yn.INTERACTING], s = !Yd(this.previousExtent_, t.extent), u = this.sourceRevision_ < i.getRevision(); if (u && (this.sourceRevision_ = i.getRevision()), o && (s || u)) { var l = a.projection, c = a.resolution, f = n instanceof SP ? n.getRenderBuffer() : 0, h = $m(t.extent, f * c); i.loadFeatures(h, c, l), this.rebuildBuffers_(t), this.previousExtent_ = t.extent.slice(); } return this.helper.makeProjectionTransform(t, this.currentTransform_), tx(this.currentTransform_, this.invertRenderTransform_), this.helper.useProgram(this.program_), this.helper.prepareDraw(t), this.helper.bindBuffer(this.verticesBuffer_), this.helper.bindBuffer(this.indicesBuffer_), this.helper.enableAttributes(this.attributes), !0; }, e.prototype.rebuildBuffers_ = function(t) { var n = ha(); this.helper.makeProjectionTransform(t, n); var i = (2 + this.customAttributes.length) * this.featureCount_; if ((!this.renderInstructions_ || this.renderInstructions_.length !== i) && (this.renderInstructions_ = new Float32Array(i)), this.hitDetectionEnabled_) { var a = (7 + this.customAttributes.length) * this.featureCount_; (!this.hitRenderInstructions_ || this.hitRenderInstructions_.length !== a) && (this.hitRenderInstructions_ = new Float32Array(a)); } var o, s, u = [], l = [], c = 0, f = 0, h; for (var p in this.featureCache_) if (o = this.featureCache_[p], s = o.geometry, !(!s || s.getType() !== Ee.POINT)) { u[0] = s.getFlatCoordinates()[0], u[1] = s.getFlatCoordinates()[1], mn(n, u), h = eKe(f + 6, l), this.renderInstructions_[c++] = u[0], this.renderInstructions_[c++] = u[1], this.hitDetectionEnabled_ && (this.hitRenderInstructions_[f++] = u[0], this.hitRenderInstructions_[f++] = u[1], this.hitRenderInstructions_[f++] = h[0], this.hitRenderInstructions_[f++] = h[1], this.hitRenderInstructions_[f++] = h[2], this.hitRenderInstructions_[f++] = h[3], this.hitRenderInstructions_[f++] = Number(p)); for (var d = void 0, v = 0; v < this.customAttributes.length; v++) d = this.customAttributes[v].callback(o.feature, o.properties), this.renderInstructions_[c++] = d, this.hitDetectionEnabled_ && (this.hitRenderInstructions_[f++] = d); } var g = { type: KL.GENERATE_BUFFERS, renderInstructions: this.renderInstructions_.buffer, customAttributesCount: this.customAttributes.length }; if (g.projectionTransform = n, g.generateBuffersRun = ++this.generateBuffersRun_, this.ready = !1, this.worker_.postMessage(g, [this.renderInstructions_.buffer]), this.renderInstructions_ = null, this.hitDetectionEnabled_) { var m = { type: KL.GENERATE_BUFFERS, renderInstructions: this.hitRenderInstructions_.buffer, customAttributesCount: 5 + this.customAttributes.length }; m.projectionTransform = n, m.hitDetection = !0, this.worker_.postMessage(m, [ this.hitRenderInstructions_.buffer ]), this.hitRenderInstructions_ = null; } }, e.prototype.forEachFeatureAtCoordinate = function(t, n, i, a, o) { if (cn(this.hitDetectionEnabled_, 66), !!this.hitRenderInstructions_) { var s = mn(n.coordinateToPixelTransform, t.slice()), u = this.hitRenderTarget_.readPixel(s[0] / 2, s[1] / 2), l = [u[0] / 255, u[1] / 255, u[2] / 255, u[3] / 255], c = tKe(l), f = this.hitRenderInstructions_[c], h = Math.floor(f).toString(), p = this.getLayer().getSource(), d = p.getFeatureByUid(h); if (d) return a(d, this.getLayer(), null); } }, e.prototype.renderHitDetection = function(t) { if (!!this.hitVerticesBuffer_.getSize()) { this.hitRenderTarget_.setSize([ Math.floor(t.size[0] / 2), Math.floor(t.size[1] / 2) ]), this.helper.useProgram(this.hitProgram_), this.helper.prepareDrawToRenderTarget(t, this.hitRenderTarget_, !0), this.helper.bindBuffer(this.hitVerticesBuffer_), this.helper.bindBuffer(this.indicesBuffer_), this.helper.enableAttributes(this.hitDetectionAttributes); var n = this.indicesBuffer_.getSize(); this.helper.drawElements(0, n); } }, e.prototype.disposeInternal = function() { this.worker_.terminate(), this.layer_ = null, this.sourceListenKeys_.forEach(function(t) { pn(t); }), this.sourceListenKeys_ = null, r.prototype.disposeInternal.call(this); }, e; }(rKe); const uKe = sKe; var lKe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Tu = { BLUR: "blur", GRADIENT: "gradient", RADIUS: "radius" }, cKe = ["#00f", "#0ff", "#0f0", "#ff0", "#f00"], fKe = function(r) { lKe(e, r); function e(t) { var n = this, i = t || {}, a = jn({}, i); delete a.gradient, delete a.radius, delete a.blur, delete a.weight, n = r.call(this, a) || this, n.gradient_ = null, n.addChangeListener(Tu.GRADIENT, n.handleGradientChanged_), n.setGradient(i.gradient ? i.gradient : cKe), n.setBlur(i.blur !== void 0 ? i.blur : 15), n.setRadius(i.radius !== void 0 ? i.radius : 8); var o = i.weight ? i.weight : "weight"; return typeof o == "string" ? n.weightFunction_ = function(s) { return s.get(o); } : n.weightFunction_ = o, n.setRenderOrder(null), n; } return e.prototype.getBlur = function() { return this.get(Tu.BLUR); }, e.prototype.getGradient = function() { return this.get(Tu.GRADIENT); }, e.prototype.getRadius = function() { return this.get(Tu.RADIUS); }, e.prototype.handleGradientChanged_ = function() { this.gradient_ = hKe(this.getGradient()); }, e.prototype.setBlur = function(t) { this.set(Tu.BLUR, t); }, e.prototype.setGradient = function(t) { this.set(Tu.GRADIENT, t); }, e.prototype.setRadius = function(t) { this.set(Tu.RADIUS, t); }, e.prototype.createRenderer = function() { return new uKe(this, { className: this.getClassName(), attributes: [ { name: "weight", callback: function(t) { var n = this.weightFunction_(t); return n !== void 0 ? Di(n, 0, 1) : 1; }.bind(this) } ], vertexShader: ` precision mediump float; uniform mat4 u_projectionMatrix; uniform mat4 u_offsetScaleMatrix; uniform float u_size; attribute vec2 a_position; attribute float a_index; attribute float a_weight; varying vec2 v_texCoord; varying float v_weight; void main(void) { mat4 offsetMatrix = u_offsetScaleMatrix; float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0; float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0; vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0); gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets; float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0; float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0; v_texCoord = vec2(u, v); v_weight = a_weight; }`, fragmentShader: ` precision mediump float; uniform float u_blurSlope; varying vec2 v_texCoord; varying float v_weight; void main(void) { vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0); float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y; float value = (1.0 - sqrt(sqRadius)) * u_blurSlope; float alpha = smoothstep(0.0, 1.0, value) * v_weight; gl_FragColor = vec4(alpha, alpha, alpha, alpha); }`, hitVertexShader: ` precision mediump float; uniform mat4 u_projectionMatrix; uniform mat4 u_offsetScaleMatrix; uniform float u_size; attribute vec2 a_position; attribute float a_index; attribute float a_weight; attribute vec4 a_hitColor; varying vec2 v_texCoord; varying float v_weight; varying vec4 v_hitColor; void main(void) { mat4 offsetMatrix = u_offsetScaleMatrix; float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0; float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0; vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0); gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets; float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0; float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0; v_texCoord = vec2(u, v); v_hitColor = a_hitColor; v_weight = a_weight; }`, hitFragmentShader: ` precision mediump float; uniform float u_blurSlope; varying vec2 v_texCoord; varying float v_weight; varying vec4 v_hitColor; void main(void) { vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0); float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y; float value = (1.0 - sqrt(sqRadius)) * u_blurSlope; float alpha = smoothstep(0.0, 1.0, value) * v_weight; if (alpha < 0.05) { discard; } gl_FragColor = v_hitColor; }`, uniforms: { u_size: function() { return (this.get(Tu.RADIUS) + this.get(Tu.BLUR)) * 2; }.bind(this), u_blurSlope: function() { return this.get(Tu.RADIUS) / Math.max(1, this.get(Tu.BLUR)); }.bind(this) }, postProcesses: [ { fragmentShader: ` precision mediump float; uniform sampler2D u_image; uniform sampler2D u_gradientTexture; uniform float u_opacity; varying vec2 v_texCoord; void main() { vec4 color = texture2D(u_image, v_texCoord); gl_FragColor.a = color.a * u_opacity; gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb; gl_FragColor.rgb *= gl_FragColor.a; }`, uniforms: { u_gradientTexture: function() { return this.gradient_; }.bind(this), u_opacity: function() { return this.getOpacity(); }.bind(this) } } ] }); }, e.prototype.renderDeclutter = function() { }, e; }(SP); function hKe(r) { for (var e = 1, t = 256, n = Ss(e, t), i = n.createLinearGradient(0, 0, e, t), a = 1 / (r.length - 1), o = 0, s = r.length; o < s; ++o) i.addColorStop(o * a, r[o]); return n.fillStyle = i, n.fillRect(0, 0, e, t), n.canvas; } const pKe = fKe; window.ol && (ol.ext.input = {}); var xv = function(r) { r = r || {}, Ps.call(this); var e = this.input = r.input; e || (e = this.input = document.createElement("INPUT"), r.type && e.setAttribute("type", r.type), r.min !== void 0 && e.setAttribute("min", r.min), r.max !== void 0 && e.setAttribute("max", r.max), r.step !== void 0 && e.setAttribute("step", r.step), r.parent && r.parent.appendChild(e)), r.disabled && (e.disabled = !0), r.checked !== void 0 && (e.checked = !!r.checked), r.val !== void 0 && (e.value = r.val), r.hidden && (e.style.display = "none"), e.addEventListener("focus", function() { this.element && this.element.classList.add("ol-focus"); }.bind(this)); var t; e.addEventListener("focusout", function() { this.element && (t && clearTimeout(t), t = setTimeout(function() { this.element.classList.remove("ol-focus"); }.bind(this), 0)); }.bind(this)); }; wv(xv, Ps); xv.prototype._listenDrag = function(r, e) { var t = function(n) { this.moving = !0, this.element.classList.add("ol-moving"); var i = function(a) { a.type === "pointerup" && (document.removeEventListener("pointermove", i), document.removeEventListener("pointerup", i), document.removeEventListener("pointercancel", i), setTimeout(function() { this.moving = !1, this.element.classList.remove("ol-moving"); }.bind(this))), a.target === r && e(a), a.stopPropagation(), a.preventDefault(); }.bind(this); document.addEventListener("pointermove", i, !1), document.addEventListener("pointerup", i, !1), document.addEventListener("pointercancel", i, !1), n.stopPropagation(), n.preventDefault(); }.bind(this); r.addEventListener("mousedown", t, !1), r.addEventListener("touchstart", t, !1); }; xv.prototype.setValue = function(r) { r !== void 0 && (this.input.value = r), this.input.dispatchEvent(new Event("change")); }; xv.prototype.getValue = function() { return this.input.value; }; xv.prototype.getInputElement = function() { return this.input; }; var Cv = function(r) { r = r || {}, xv.call(this, r); var e = this.element = document.createElement("LABEL"); r.html instanceof Element ? e.appendChild(r.html) : r.html !== void 0 && (e.innerHTML = r.html), e.className = ("ol-ext-check ol-ext-checkbox " + (r.className || "")).trim(), this.input.parentNode && this.input.parentNode.insertBefore(e, this.input), e.appendChild(this.input), e.appendChild(document.createElement("SPAN")), r.after && e.appendChild(document.createTextNode(r.after)), this.input.addEventListener("change", function() { this.dispatchEvent({ type: "check", checked: this.input.checked, value: this.input.value }); }.bind(this)); }; wv(Cv, xv); Cv.prototype.isChecked = function() { return this.input.checked; }; var Ure = function(r) { r = r || {}, Cv.call(this, r), this.element.className = ("ol-ext-toggle-switch " + (r.className || "")).trim(); }; wv(Ure, Cv); var Wre = function(r) { r = r || {}, Cv.call(this, r), this.element.className = ("ol-ext-check ol-ext-radio " + (r.className || "")).trim(); }; wv(Wre, Cv); var ge = {}; ge.create = function(r, e) { e = e || {}; var t; if (r === "TEXT") t = document.createTextNode(e.html || ""), e.parent && e.parent.appendChild(t); else { t = document.createElement(r), /button/i.test(r) && t.setAttribute("type", "button"); for (var n in e) switch (n) { case "className": { e.className && e.className.trim && t.setAttribute("class", e.className.trim()); break; } case "text": { t.innerText = e.text; break; } case "html": { e.html instanceof Element ? t.appendChild(e.html) : e.html !== void 0 && (t.innerHTML = e.html); break; } case "parent": { e.parent && e.parent.appendChild(t); break; } case "options": { if (/select/i.test(r)) for (var i in e.options) ge.create("OPTION", { html: i, value: e.options[i], parent: t }); break; } case "style": { ge.setStyle(t, e.style); break; } case "change": case "click": { ge.addListener(t, n, e[n]); break; } case "on": { for (var a in e.on) ge.addListener(t, a, e.on[a]); break; } case "checked": { t.checked = !!e.checked; break; } default: { t.setAttribute(n, e[n]); break; } } } return t; }; ge.createSwitch = function(r) { var e = ge.create("INPUT", { type: "checkbox", on: r.on, click: r.click, change: r.change, parent: r.parent }), t = Object.assign({ input: e }, r || {}); return new Ure(t), e; }; ge.createCheck = function(r) { var e = ge.create("INPUT", { name: r.name, type: r.type === "radio" ? "radio" : "checkbox", on: r.on, parent: r.parent }), t = Object.assign({ input: e }, r || {}); return r.type === "radio" ? new Wre(t) : new Cv(t), e; }; ge.setHTML = function(r, e) { e instanceof Element ? r.appendChild(e) : e !== void 0 && (r.innerHTML = e); }; ge.appendText = function(r, e) { r.appendChild(document.createTextNode(e || "")); }; ge.addListener = function(r, e, t, n) { typeof e == "string" && (e = e.split(" ")), e.forEach(function(i) { r.addEventListener(i, t, n); }); }; ge.removeListener = function(r, e, t) { typeof e == "string" && (e = e.split(" ")), e.forEach(function(n) { r.removeEventListener(n, t); }); }; ge.show = function(r) { r.style.display = ""; }; ge.hide = function(r) { r.style.display = "none"; }; ge.hidden = function(r) { return ge.getStyle(r, "display") === "none"; }; ge.toggle = function(r) { r.style.display = r.style.display === "none" ? "" : "none"; }; ge.setStyle = function(r, e) { for (var t in e) switch (t) { case "top": case "left": case "bottom": case "right": case "minWidth": case "maxWidth": case "width": case "height": { typeof e[t] == "number" ? r.style[t] = e[t] + "px" : r.style[t] = e[t]; break; } default: r.style[t] = e[t]; } }; ge.getStyle = function(r, e) { var t, n = (r.ownerDocument || document).defaultView; if (n && n.getComputedStyle) e = e.replace(/([A-Z])/g, "-$1").toLowerCase(), t = n.getComputedStyle(r, null).getPropertyValue(e); else if (r.currentStyle && (e = e.replace(/-(\w)/g, function(i, a) { return a.toUpperCase(); }), t = r.currentStyle[e], /^\d+(em|pt|%|ex)?$/i.test(t))) return function(i) { var a = r.style.left, o = r.runtimeStyle.left; return r.runtimeStyle.left = r.currentStyle.left, r.style.left = i || 0, i = r.style.pixelLeft + "px", r.style.left = a, r.runtimeStyle.left = o, i; }(t); return /px$/.test(t) ? parseInt(t) : t; }; ge.outerHeight = function(r) { return r.offsetHeight + ge.getStyle(r, "marginBottom"); }; ge.outerWidth = function(r) { return r.offsetWidth + ge.getStyle(r, "marginLeft"); }; ge.offsetRect = function(r) { var e = r.getBoundingClientRect(); return { top: e.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0), left: e.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0), height: e.height || e.bottom - e.top, width: e.width || e.right - e.left }; }; ge.getFixedOffset = function(r) { var e = { left: 0, top: 0 }, t = function(n) { if (!n) return e; if (ge.getStyle(n, "position") === "absolute" && ge.getStyle(n, "transform") !== "none") { var i = n.getBoundingClientRect(); return e.left += i.left, e.top += i.top, e; } return t(n.offsetParent); }; return t(r.offsetParent); }; ge.positionRect = function(r, e) { var t = 0, n = 0, i = function(a) { if (a) return t += a.offsetLeft, n += a.offsetTop, i(a.offsetParent); var o = { top: r.offsetTop + n, left: r.offsetLeft + t }; return e && (o.top -= window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, o.left -= window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0), o.bottom = o.top + r.offsetHeight, o.right = o.top + r.offsetWidth, o; }; return i(r.offsetParent); }; ge.scrollDiv = function(r, e) { e = e || {}; var t = !1, n = 0, i, a = 0, o = typeof e.onmove == "function" ? e.onmove : function() { }, s = e.vertical ? "screenY" : "screenX", u = e.vertical ? "scrollTop" : "scrollLeft", l = !1, c, f, h = 0, p = function() { _ && (h++, setTimeout(d)); }, d = function() { if (_) { if (h--, h) return; var S = r.clientHeight, b = r.scrollHeight; c = S / b, _.style.height = c * 100 + "%", _.style.top = r.scrollTop / b * 100 + "%", y.style.height = S + "px", S > b - 0.5 ? y.classList.add("ol-100pc") : y.classList.remove("ol-100pc"); } }, v = function(S) { S.target.classList.contains("ol-noscroll") || (l = !1, t = S[s], a = new Date(), r.classList.add("ol-move"), S.preventDefault(), window.addEventListener("pointermove", g), ge.addListener(window, ["pointerup", "pointercancel"], x)); }, g = function(S) { if (l = !0, t !== !1) { var b = (f ? -1 / c : 1) * (t - S[s]); r[u] += b, i = new Date(), i - a && (n = (n + b / (i - a)) / 2), t = S[s], a = i, b && o(!0); } }, m = function(S) { var b = S > 0 ? Math.min(100, S / 2) : Math.max(-100, S / 2); S -= b, r[u] += b, -1 < S && S < 1 ? (l ? setTimeout(function() { r.classList.remove("ol-move"); }) : r.classList.remove("ol-move"), l = !1, o(!1)) : setTimeout(function() { m(S); }, 40); }, y, _; if (e.vertical && e.minibar) { var w = function(S) { r.removeEventListener("pointermove", w), r.parentNode.classList.add("ol-miniscroll"), _ = ge.create("DIV"), y = ge.create("DIV", { className: "ol-scroll", html: _ }), r.parentNode.insertBefore(y, r), _.addEventListener("pointerdown", function(b) { f = !0, v(b); }), e.mousewheel && (ge.addListener( y, ["mousewheel", "DOMMouseScroll", "onmousewheel"], function(b) { C(b); } ), ge.addListener( _, ["mousewheel", "DOMMouseScroll", "onmousewheel"], function(b) { C(b); } )), r.parentNode.addEventListener("pointerenter", p), window.addEventListener("resize", p), S !== !1 && p(); }; r.parentNode ? w(!1) : r.addEventListener("pointermove", w), r.addEventListener("scroll", function() { p(); }); } r.style["touch-action"] = "none", r.style.overflow = "hidden", r.classList.add("ol-scrolldiv"), ge.addListener(r, ["pointerdown"], function(S) { f = !1, v(S); }), r.addEventListener("click", function(S) { r.classList.contains("ol-move") && (S.preventDefault(), S.stopPropagation()); }, !0); var x = function(S) { a = new Date() - a, a > 100 || f ? n = 0 : a > 0 && (n = ((n || 0) + (t - S[s]) / a) / 2), m(e.animate === !1 ? 0 : n * 200), t = !1, n = 0, a = 0, r.classList.contains("ol-move") ? r.classList.remove("ol-hasClick") : (r.classList.add("ol-hasClick"), setTimeout(function() { r.classList.remove("ol-hasClick"); }, 500)), f = !1, window.removeEventListener("pointermove", g), ge.removeListener(window, ["pointerup", "pointercancel"], x); }, C = function(S) { var b = Math.max(-1, Math.min(1, S.wheelDelta || -S.detail)); return r.classList.add("ol-move"), r[u] -= b * 30, r.classList.remove("ol-move"), !1; }; return e.mousewheel && ge.addListener( r, ["mousewheel", "DOMMouseScroll", "onmousewheel"], C ), { refresh: p }; }; ge.dispatchEvent = function(r, e) { var t; try { t = new CustomEvent(r); } catch { t = document.createEvent("CustomEvent"), t.initCustomEvent(r, !0, !0, {}); } e.dispatchEvent(t); }; var un = function(r) { r = r || {}; var e = this; this.dcount = 0, this.show_progress = r.show_progress, this.oninfo = typeof r.oninfo == "function" ? r.oninfo : null, this.onextent = typeof r.onextent == "function" ? r.onextent : null, this.hasextent = r.extent || r.onextent, this.hastrash = r.trash, this.reordering = r.reordering !== !1, this._layers = [], this._layerGroup = r.layerGroup && r.layerGroup.getLayers ? r.layerGroup : null, this.onchangeCheck = typeof r.onchangeCheck == "function" ? r.onchangeCheck : null, typeof r.displayInLayerSwitcher == "function" && (this.displayInLayerSwitcher = r.displayInLayerSwitcher); var t; r.target ? t = ge.create("DIV", { className: r.switcherClass || "ol-layerswitcher" }) : (t = ge.create("DIV", { className: (r.switcherClass || "ol-layerswitcher") + " ol-unselectable ol-control" }), r.collapsed !== !1 ? t.classList.add("ol-collapsed") : t.classList.add("ol-forceopen"), this.button = ge.create("BUTTON", { type: "button", parent: t }), this.button.addEventListener("touchstart", function(n) { t.classList.toggle("ol-forceopen"), t.classList.add("ol-collapsed"), e.dispatchEvent({ type: "toggle", collapsed: t.classList.contains("ol-collapsed") }), n.preventDefault(), e.overflow(); }), this.button.addEventListener("click", function() { t.classList.toggle("ol-forceopen"), t.classList.add("ol-collapsed"), e.dispatchEvent({ type: "toggle", collapsed: !t.classList.contains("ol-forceopen") }), e.overflow(); }), r.mouseover && (t.addEventListener("mouseleave", function() { t.classList.add("ol-collapsed"), e.dispatchEvent({ type: "toggle", collapsed: !0 }); }), t.addEventListener("mouseover", function() { t.classList.remove("ol-collapsed"), e.dispatchEvent({ type: "toggle", collapsed: !1 }); })), r.minibar && (r.noScroll = !0), r.noScroll || (this.topv = ge.create("DIV", { className: "ol-switchertopdiv", parent: t, click: function() { e.overflow("+50%"); } }), this.botv = ge.create("DIV", { className: "ol-switcherbottomdiv", parent: t, click: function() { e.overflow("-50%"); } })), this._noScroll = r.noScroll), this.panel_ = ge.create("UL", { className: "panel" }), this.panelContainer_ = ge.create("DIV", { className: "panel-container", html: this.panel_, parent: t }), !r.target && !r.noScroll && ge.addListener(this.panel_, "mousewheel DOMMouseScroll onmousewheel", function(n) { e.overflow(Math.max(-1, Math.min(1, n.wheelDelta || -n.detail))) && (n.stopPropagation(), n.preventDefault()); }), this.header_ = ge.create("LI", { className: "ol-header", parent: this.panel_ }), dl.call(this, { element: t, target: r.target }), this.set("drawDelay", r.drawDelay || 0), this.set("selection", r.selection), r.minibar && setTimeout(function() { var n = ge.scrollDiv(this.panelContainer_, { mousewheel: !0, vertical: !0, minibar: !0 }); this.on(["drawlist", "toggle"], function() { n.refresh(); }); }.bind(this)); }; wv(un, dl); un.prototype.tip = { up: "up/down", down: "down", info: "informations...", extent: "zoom to extent", trash: "remove layer", plus: "expand/shrink" }; un.prototype.displayInLayerSwitcher = function(r) { return r.get("displayInLayerSwitcher") !== !1; }; un.prototype.setMap = function(r) { if (dl.prototype.setMap.call(this, r), this.drawPanel(), this._listener) for (var e in this._listener) B1(this._listener[e]); this._listener = null, r && (this._listener = { moveend: r.on("moveend", this.viewChange.bind(this)), size: r.on("change:size", this.overflow.bind(this)) }, this._layerGroup ? this._listener.change = this._layerGroup.getLayers().on("change:length", this.drawPanel.bind(this)) : this._listener.change = r.getLayerGroup().getLayers().on("change:length", this.drawPanel.bind(this))); }; un.prototype.show = function() { this.element.classList.add("ol-forceopen"), this.overflow(), self.dispatchEvent({ type: "toggle", collapsed: !1 }); }; un.prototype.hide = function() { this.element.classList.remove("ol-forceopen"), this.overflow(), self.dispatchEvent({ type: "toggle", collapsed: !0 }); }; un.prototype.toggle = function() { this.element.classList.toggle("ol-forceopen"), this.overflow(); }; un.prototype.isOpen = function() { return this.element.classList.contains("ol-forceopen"); }; un.prototype.setHeader = function(r) { ge.setHTML(this.header_, r); }; un.prototype.overflow = function(r) { if (this.button && !this._noScroll) { if (ge.hidden(this.panel_)) { ge.setStyle(this.element, { height: "auto" }); return; } var e = ge.outerHeight(this.element), t = ge.outerHeight(this.panel_), n = this.button.offsetTop + ge.outerHeight(this.button), i = this.panel_.offsetTop - n; if (t > e - n) { ge.setStyle(this.element, { height: "100%" }); var a = this.panel_.querySelectorAll("li.visible .li-content")[0], o = a ? 2 * ge.getStyle(a, "height") : 0; switch (r) { case 1: i += o; break; case -1: i -= o; break; case "+50%": i += Math.round(e / 2); break; case "-50%": i -= Math.round(e / 2); break; } return i + t <= e - 3 * n / 2 ? (i = e - 3 * n / 2 - t, ge.hide(this.botv)) : ge.show(this.botv), i >= 0 ? (i = 0, ge.hide(this.topv)) : ge.show(this.topv), ge.setStyle(this.panel_, { top: i + "px" }), !0; } else return ge.setStyle(this.element, { height: "auto" }), ge.setStyle(this.panel_, { top: 0 }), ge.hide(this.botv), ge.hide(this.topv), !1; } else return !1; }; un.prototype._setLayerForLI = function(r, e) { var t = []; e.getLayers && t.push(e.getLayers().on("change:length", this.drawPanel.bind(this))), r && (t.push(e.on("change:opacity", function() { this.setLayerOpacity(e, r); }.bind(this))), t.push(e.on("change:visible", function() { this.setLayerVisibility(e, r); }.bind(this)))), t.push(e.on("propertychange", function(n) { (n.key === "displayInLayerSwitcher" || n.key === "openInLayerSwitcher") && this.drawPanel(n); }.bind(this))), this._layers.push({ li: r, layer: e, listeners: t }); }; un.prototype.setLayerOpacity = function(r, e) { var t = e.querySelector(".layerswitcher-opacity-cursor"); t && (t.style.left = r.getOpacity() * 100 + "%"), this.dispatchEvent({ type: "layer:opacity", layer: r }); }; un.prototype.setLayerVisibility = function(r, e) { var t = e.querySelector(".ol-visibility"); t && (t.checked = r.getVisible()), r.getVisible() ? e.classList.add("ol-visible") : e.classList.remove("ol-visible"), this.dispatchEvent({ type: "layer:visible", layer: r }); }; un.prototype._clearLayerForLI = function() { this._layers.forEach(function(r) { r.listeners.forEach(function(e) { B1(e); }); }), this._layers = []; }; un.prototype._getLayerForLI = function(r) { for (var e = 0, t; t = this._layers[e]; e++) if (t.li === r) return t.layer; return null; }; un.prototype.viewChange = function() { this.panel_.querySelectorAll("li").forEach(function(r) { var e = this._getLayerForLI(r); e && (this.testLayerVisibility(e) ? r.classList.remove("ol-layer-hidden") : r.classList.add("ol-layer-hidden")); }.bind(this)); }; un.prototype.getPanel = function() { return this.panelContainer_; }; un.prototype.drawPanel = function() { if (!!this.getMap()) { var r = this; this.dcount++, setTimeout(function() { r.drawPanel_(); }, this.get("drawDelay") || 0); } }; un.prototype.drawPanel_ = function() { if (!(--this.dcount || this.dragging_)) { var r = this.panelContainer_.scrollTop; this._clearLayerForLI(), this.panel_.querySelectorAll("li").forEach(function(e) { e.classList.contains("ol-header") || e.remove(); }.bind(this)), this._layerGroup ? this.drawList(this.panel_, this._layerGroup.getLayers()) : this.getMap() && this.drawList(this.panel_, this.getMap().getLayers()), this.panelContainer_.scrollTop = r; } }; un.prototype.switchLayerVisibility = function(r, e) { r.get("baseLayer") ? (r.getVisible() || r.setVisible(!0), e.forEach(function(t) { r !== t && t.get("baseLayer") && t.getVisible() && t.setVisible(!1); })) : r.setVisible(!r.getVisible()); }; un.prototype.testLayerVisibility = function(r) { if (!this.getMap()) return !0; var e = this.getMap().getView().getResolution(), t = this.getMap().getView().getZoom(); if (r.getMaxResolution() <= e || r.getMinResolution() >= e) return !1; if (r.getMinZoom && (r.getMinZoom() >= t || r.getMaxZoom() < t)) return !1; var n = r.getExtent(); if (n) { var i = this.getMap().getView().calculateExtent(this.getMap().getSize()); return Ti(i, n); } return !0; }; un.prototype.dragOrdering_ = function(r) { r.stopPropagation(), r.preventDefault(); var e = this, t = r.currentTarget.parentNode.parentNode, n = !0, i = this.panel_, a, o = r.pageY || r.touches && r.touches.length && r.touches[0].pageY || r.changedTouches && r.changedTouches.length && r.changedTouches[0].pageY, s, u, l, c; t.parentNode.classList.add("drag"); function f() { if (s) { var p = l, d = e.getSelection() === p; if (p && s) { var v; c ? v = c.getLayers() : v = e._layerGroup ? e._layerGroup.getLayers() : e.getMap().getLayers(); for (var g = v.getArray(), m = 0; m < g.length; m++) if (g[m] == p) { v.removeAt(m); break; } for (var y = 0; y < g.length; y++) if (g[y] === s) { m > y ? v.insertAt(y, p) : v.insertAt(y + 1, p); break; } } d && e.selectLayer(p), e.dispatchEvent({ type: "reorder-end", layer: p, group: c }); } t.parentNode.querySelectorAll("li").forEach(function(_) { _.classList.remove("dropover"), _.classList.remove("dropover-after"), _.classList.remove("dropover-before"); }), t.classList.remove("drag"), t.parentNode.classList.remove("drag"), e.element.classList.remove("drag"), u && u.remove(), ge.removeListener(document, "mousemove touchmove", h), ge.removeListener(document, "mouseup touchend touchcancel", f); } function h(p) { if (a = p.pageY || p.touches && p.touches.length && p.touches[0].pageY || p.changedTouches && p.changedTouches.length && p.changedTouches[0].pageY, n && Math.abs(o - a) > 2 && (n = !1, t.classList.add("drag"), l = e._getLayerForLI(t), s = !1, c = e._getLayerForLI(t.parentNode.parentNode), u = ge.create("LI", { className: "ol-dragover", html: t.innerHTML, style: { position: "absolute", "z-index": 1e4, left: t.offsetLeft, opacity: 0.5, width: ge.outerWidth(t), height: ge.getStyle(t, "height") }, parent: i }), e.element.classList.add("drag"), e.dispatchEvent({ type: "reorder-start", layer: l, group: c })), !n) { p.preventDefault(), p.stopPropagation(), ge.setStyle(u, { top: a - ge.offsetRect(i).top + i.scrollTop + 5 }); var d; for (p.touches ? d = document.elementFromPoint(p.touches[0].clientX, p.touches[0].clientY) : d = p.target, d.classList.contains("ol-switcherbottomdiv") ? e.overflow(-1) : d.classList.contains("ol-switchertopdiv") && e.overflow(1); d && d.tagName !== "LI"; ) d = d.parentNode; (!d || !d.classList.contains("dropover")) && t.parentNode.querySelectorAll("li").forEach(function(v) { v.classList.remove("dropover"), v.classList.remove("dropover-after"), v.classList.remove("dropover-before"); }), d && d.parentNode.classList.contains("drag") && d !== t ? (s = e._getLayerForLI(d), s && !s.get("allwaysOnTop") == !l.get("allwaysOnTop") ? (d.classList.add("dropover"), d.classList.add(t.offsetTop < d.offsetTop ? "dropover-after" : "dropover-before")) : s = !1, ge.show(u)) : (s = !1, d === t ? ge.hide(u) : ge.show(u)), s ? u.classList.remove("forbidden") : u.classList.add("forbidden"); } } ge.addListener(document, "mousemove touchmove", h), ge.addListener(document, "mouseup touchend touchcancel", f); }; un.prototype.dragOpacity_ = function(r) { r.stopPropagation(), r.preventDefault(); var e = this, t = r.target, n = this._getLayerForLI(t.parentNode.parentNode.parentNode); if (!n) return; var i = r.pageX || r.touches && r.touches.length && r.touches[0].pageX || r.changedTouches && r.changedTouches.length && r.changedTouches[0].pageX, a = ge.getStyle(t, "left") - i; e.dragging_ = !0; function o() { ge.removeListener(document, "mouseup touchend touchcancel", o), ge.removeListener(document, "mousemove touchmove", s), e.dragging_ = !1; } function s(u) { var l = u.pageX || u.touches && u.touches.length && u.touches[0].pageX || u.changedTouches && u.changedTouches.length && u.changedTouches[0].pageX, c = (a + l) / ge.getStyle(t.parentNode, "width"), f = Math.max(0, Math.min(1, c)); ge.setStyle(t, { left: f * 100 + "%" }), t.parentNode.nextElementSibling.innerHTML = Math.round(f * 100), n.setOpacity(f); } ge.addListener(document, "mouseup touchend touchcancel", o), ge.addListener(document, "mousemove touchmove", s); }; un.prototype.drawList = function(r, e) { var t = this, n = e.getArray(), i = function(c) { c.stopPropagation(), c.preventDefault(); var f = t._getLayerForLI(this.parentNode.parentNode); t.switchLayerVisibility(f, e), t.get("selection") && f.getVisible() && t.selectLayer(f), t.onchangeCheck && t.onchangeCheck(f); }; function a(c) { c.stopPropagation(), c.preventDefault(); var f = t._getLayerForLI(this.parentNode.parentNode); t.oninfo(f), t.dispatchEvent({ type: "info", layer: f }); } function o(c) { c.stopPropagation(), c.preventDefault(); var f = t._getLayerForLI(this.parentNode.parentNode); t.onextent ? t.onextent(f) : t.getMap().getView().fit(f.getExtent(), t.getMap().getSize()), t.dispatchEvent({ type: "extent", layer: f }); } function s(c) { c.stopPropagation(), c.preventDefault(); var f = this.parentNode.parentNode.parentNode.parentNode, h, p = t._getLayerForLI(f); p ? (h = t._getLayerForLI(this.parentNode.parentNode), p.getLayers().remove(h), p.getLayers().getLength() == 0 && !p.get("noSwitcherDelete") && s.call(f.querySelectorAll(".layerTrash")[0], c)) : (f = this.parentNode.parentNode, t.getMap().removeLayer(t._getLayerForLI(f))); } function u(c) { if (!this.displayInLayerSwitcher(c)) { this._setLayerForLI(null, c); return; } var f = ge.create("LI", { className: (c.getVisible() ? "visible " : " ") + (c.get("baseLayer") ? "baselayer" : ""), parent: r }); this._setLayerForLI(f, c), this._selectedLayer === c && f.classList.add("ol-layer-select"); var h = ge.create("DIV", { className: "ol-layerswitcher-buttons", parent: f }), p = ge.create("DIV", { className: "li-content", parent: f }); ge.create("INPUT", { type: c.get("baseLayer") ? "radio" : "checkbox", className: "ol-visibility", checked: c.getVisible(), click: i, parent: p }); var d = ge.create("LABEL", { title: c.get("title") || c.get("name"), click: i, unselectable: "on", style: { userSelect: "none" }, parent: p }); if (d.addEventListener("selectstart", function() { return !1; }), ge.create("SPAN", { html: c.get("title") || c.get("name"), click: function(w) { this.get("selection") && (w.stopPropagation(), this.selectLayer(c)); }.bind(this), parent: d }), this.reordering && (l < n.length - 1 && (c.get("allwaysOnTop") || !n[l + 1].get("allwaysOnTop")) || l > 0 && (!c.get("allwaysOnTop") || n[l - 1].get("allwaysOnTop"))) && ge.create("DIV", { className: "layerup ol-noscroll", title: this.tip.up, on: { "mousedown touchstart": function(w) { t.dragOrdering_(w); } }, parent: h }), c.getLayers) { var v = 0; c.getLayers().forEach(function(w) { t.displayInLayerSwitcher(w) && v++; }), v && ge.create("DIV", { className: c.get("openInLayerSwitcher") ? "collapse-layers" : "expend-layers", title: this.tip.plus, click: function() { var w = t._getLayerForLI(this.parentNode.parentNode); w.set("openInLayerSwitcher", !w.get("openInLayerSwitcher")); }, parent: h }); } if (this.oninfo && ge.create("DIV", { className: "layerInfo", title: this.tip.info, click: a, parent: h }), this.hastrash && !c.get("noSwitcherDelete") && ge.create("DIV", { className: "layerTrash", title: this.tip.trash, click: s, parent: h }), this.hasextent && n[l].getExtent()) { var g = n[l].getExtent(); g.length == 4 && g[0] < g[2] && g[1] < g[3] && ge.create("DIV", { className: "layerExtent", title: this.tip.extent, click: o, parent: h }); } if (this.show_progress && c instanceof Pre) { var m = ge.create("DIV", { className: "layerswitcher-progress", parent: p }); this.setprogress_(c), c.layerswitcher_progress = ge.create("DIV", { parent: m }); } var y = ge.create("DIV", { className: "layerswitcher-opacity", click: function(w) { if (w.target === this) { w.stopPropagation(), w.preventDefault(); var x = Math.max(0, Math.min(1, w.offsetX / ge.getStyle(this, "width"))); t._getLayerForLI(this.parentNode.parentNode).setOpacity(x); } }, parent: p }); if (ge.create("DIV", { className: "layerswitcher-opacity-cursor ol-noscroll", style: { left: c.getOpacity() * 100 + "%" }, on: { "mousedown touchstart": function(w) { t.dragOpacity_(w); } }, parent: y }), ge.create("DIV", { className: "layerswitcher-opacity-label", html: Math.round(c.getOpacity() * 100), parent: p }), c.getLayers && (f.classList.add("ol-layer-group"), c.get("openInLayerSwitcher") === !0)) { var _ = ge.create("UL", { parent: f }); this.drawList(_, c.getLayers()); } f.classList.add(this.getLayerClass(c)), this.dispatchEvent({ type: "drawlist", layer: c, li: f }); } for (var l = n.length - 1; l >= 0; l--) u.call(this, n[l]); this.viewChange(), r === this.panel_ && this.overflow(); }; un.prototype.getLayerClass = function(r) { return r ? r.getLayers ? "ol-layer-group" : r instanceof EP ? "ol-layer-vector" : r instanceof bZe ? "ol-layer-vectortile" : r instanceof Pre ? "ol-layer-tile" : r instanceof RZe ? "ol-layer-image" : r instanceof pKe ? "ol-layer-heatmap" : r.getFeatures ? "ol-layer-vectorimage" : "unknown" : "none"; }; un.prototype.selectLayer = function(r, e) { if (!r) { if (!this.getMap()) return; r = this.getMap().getLayers().item(this.getMap().getLayers().getLength() - 1); } this._selectedLayer = r, this.drawPanel(), e || this.dispatchEvent({ type: "select", layer: r }); }; un.prototype.getSelection = function() { return this._selectedLayer; }; un.prototype.setprogress_ = function(r) { if (!r.layerswitcher_progress) { var e = 0, t = 0, n = function() { t === e ? (t = e = 0, ge.setStyle(r.layerswitcher_progress, { width: 0 })) : ge.setStyle(r.layerswitcher_progress, { width: (e / t * 100).toFixed(1) + "%" }); }; r.getSource().on("tileloadstart", function() { t++, n(); }), r.getSource().on("tileloadend", function() { e++, n(); }), r.getSource().on("tileloaderror", function() { e++, n(); }); } }; var Yo = function(r) { r = r || {}; var e = document.createElement("button"), t = document.createElement("div"); t.className = (r.className || "ol-swipe") + " ol-unselectable ol-control", t.appendChild(e), t.addEventListener("mousedown", this.move.bind(this)), t.addEventListener("touchstart", this.move.bind(this)), dl.call(this, { element: t }), this.precomposeRight_ = this.precomposeRight.bind(this), this.precomposeLeft_ = this.precomposeLeft.bind(this), this.postcompose_ = this.postcompose.bind(this), this.layers = [], r.layers && this.addLayer(r.layers, !1), r.rightLayers && this.addLayer(r.rightLayers, !0), this.on("propertychange", function(n) { if (this.getMap()) try { this.getMap().renderSync(); } catch { } this.get("orientation") === "horizontal" ? (this.element.style.top = this.get("position") * 100 + "%", this.element.style.left = "") : (this.get("orientation") !== "vertical" && this.set("orientation", "vertical"), this.element.style.left = this.get("position") * 100 + "%", this.element.style.top = ""), n.key === "orientation" && (this.element.classList.remove("horizontal", "vertical"), this.element.classList.add(this.get("orientation"))), this.isMoving || this.layers.forEach(function(i) { i.layer.getImageRatio && i.layer.changed(); }); }.bind(this)), this.set("position", r.position || 0.5), this.set("orientation", r.orientation || "vertical"); }; wv(Yo, dl); Yo.prototype.setMap = function(r) { var e, t; if (this.getMap()) { for (e = 0; e < this.layers.length; e++) t = this.layers[e], t.right ? t.layer.un(["precompose", "prerender"], this.precomposeRight_) : t.layer.un(["precompose", "prerender"], this.precomposeLeft_), t.layer.un(["postcompose", "postrender"], this.postcompose_); try { this.getMap().renderSync(); } catch { } } if (dl.prototype.setMap.call(this, r), r) { for (this._listener = [], e = 0; e < this.layers.length; e++) t = this.layers[e], t.right ? t.layer.on(["precompose", "prerender"], this.precomposeRight_) : t.layer.on(["precompose", "prerender"], this.precomposeLeft_), t.layer.on(["postcompose", "postrender"], this.postcompose_); try { r.renderSync(); } catch { } } }; Yo.prototype.isLayer_ = function(r) { for (var e = 0; e < this.layers.length; e++) if (this.layers[e].layer === r) return e; return -1; }; Yo.prototype.addLayer = function(r, e) { r instanceof Array || (r = [r]); for (var t = 0; t < r.length; t++) { var n = r[t]; if (this.isLayer_(n) < 0 && (this.layers.push({ layer: n, right: e }), this.getMap())) { e ? n.on(["precompose", "prerender"], this.precomposeRight_) : n.on(["precompose", "prerender"], this.precomposeLeft_), n.on(["postcompose", "postrender"], this.postcompose_); try { this.getMap().renderSync(); } catch { } } } }; Yo.prototype.removeLayers = function() { var r = []; this.layers.forEach(function(e) { r.push(e.layer); }), this.removeLayer(r); }; Yo.prototype.removeLayer = function(r) { r instanceof Array || (r = [r]); for (var e = 0; e < r.length; e++) { var t = this.isLayer_(r[e]); t >= 0 && this.getMap() && (this.layers[t].right ? r[e].un(["precompose", "prerender"], this.precomposeRight_) : r[e].un(["precompose", "prerender"], this.precomposeLeft_), r[e].un(["postcompose", "postrender"], this.postcompose_), this.layers.splice(t, 1)); } if (this.getMap()) try { this.getMap().renderSync(); } catch { } }; Yo.prototype.getRectangle = function() { var r; return this.get("orientation") === "vertical" ? (r = this.getMap().getSize(), [0, 0, r[0] * this.get("position"), r[1]]) : (r = this.getMap().getSize(), [0, 0, r[0], r[1] * this.get("position")]); }; Yo.prototype.move = function(r) { var e = this, t; switch (this._movefn || (this._movefn = this.move.bind(this)), r.type) { case "touchcancel": case "touchend": case "mouseup": { e.isMoving = !1, ["mouseup", "mousemove", "touchend", "touchcancel", "touchmove"].forEach(function(s) { document.removeEventListener(s, e._movefn); }), this.layers.forEach(function(s) { s.layer.getImageRatio && s.layer.changed(); }); break; } case "mousedown": case "touchstart": e.isMoving = !0, ["mouseup", "mousemove", "touchend", "touchcancel", "touchmove"].forEach(function(s) { document.addEventListener(s, e._movefn); }); case "mousemove": case "touchmove": { if (e.isMoving) if (e.get("orientation") === "vertical") { var n = r.pageX || r.touches && r.touches.length && r.touches[0].pageX || r.changedTouches && r.changedTouches.length && r.changedTouches[0].pageX; if (!n) break; n -= e.getMap().getTargetElement().getBoundingClientRect().left + window.pageXOffset - document.documentElement.clientLeft, t = e.getMap().getSize()[0]; var i = t - Math.min(Math.max(0, t - n), t); t = i / t, e.set("position", t), e.dispatchEvent({ type: "moving", size: [i, e.getMap().getSize()[1]], position: [t, 0] }); } else { var a = r.pageY || r.touches && r.touches.length && r.touches[0].pageY || r.changedTouches && r.changedTouches.length && r.changedTouches[0].pageY; if (!a) break; a -= e.getMap().getTargetElement().getBoundingClientRect().top + window.pageYOffset - document.documentElement.clientTop, t = e.getMap().getSize()[1]; var o = t - Math.min(Math.max(0, t - a), t); t = o / t, e.set("position", t), e.dispatchEvent({ type: "moving", size: [e.getMap().getSize()[0], o], position: [0, t] }); } break; } } }; Yo.prototype._transformPt = function(r, e) { var t = r.inversePixelTransform, n = e[0], i = e[1]; return e[0] = t[0] * n + t[2] * i + t[4], e[1] = t[1] * n + t[3] * i + t[5], e; }; Yo.prototype._drawRect = function(r, e) { var t = r.inversePixelTransform; if (t) { var n = [ [e[0][0], e[0][1]], [e[0][0], e[1][1]], [e[1][0], e[1][1]], [e[1][0], e[0][1]], [e[0][0], e[0][1]] ]; if (r.context.save(), r.target.getImageRatio) { var i = -Math.atan2(r.frameState.pixelToCoordinateTransform[1], r.frameState.pixelToCoordinateTransform[0]); r.context.translate(r.frameState.size[0] / 2, r.frameState.size[1] / 2), r.context.rotate(i), r.context.translate(-r.frameState.size[0] / 2, -r.frameState.size[1] / 2); } n.forEach(function(o, s) { o = [ o[0] * t[0] - o[1] * t[1] + t[4], -o[0] * t[2] + o[1] * t[3] + t[5] ], s ? r.context.lineTo(o[0], o[1]) : r.context.moveTo(o[0], o[1]); }), r.context.restore(); } else { var a = r.frameState.pixelRatio; r.context.rect(e[0][0] * a, e[0][1] * a, e[1][0] * a, e[1][1] * a); } }; Yo.prototype.precomposeLeft = function(r) { var e = r.context; if (e instanceof WebGLRenderingContext) { if (r.type === "prerender") { e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.enable(e.SCISSOR_TEST); var t = this.getMap().getSize(), n = this._transformPt(r, [0, t[1]]), i = this._transformPt(r, [t[0], 0]), a = i[0] - n[0], o = i[1] - n[1]; if (this.get("orientation") === "vertical") var s = Math.round(a * this.get("position")), u = o; else { var s = a, u = Math.round(o * this.get("position")); n[1] += o - u; } e.scissor(n[0], n[1], s, u); } } else { var l = r.frameState.size; e.save(), e.beginPath(); var c = [[0, 0], [l[0], l[1]]]; this.get("orientation") === "vertical" ? c[1] = [ l[0] * 0.5 + this.getMap().getSize()[0] * (this.get("position") - 0.5), l[1] ] : c[1] = [ l[0], l[1] * 0.5 + this.getMap().getSize()[1] * (this.get("position") - 0.5) ], this._drawRect(r, c), e.clip(); } }; Yo.prototype.precomposeRight = function(r) { var e = r.context; if (e instanceof WebGLRenderingContext) { if (r.type === "prerender") { e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.enable(e.SCISSOR_TEST); var t = this.getMap().getSize(), n = this._transformPt(r, [0, t[1]]), i = this._transformPt(r, [t[0], 0]), a = i[0] - n[0], o = i[1] - n[1]; if (this.get("orientation") === "vertical") { var s = o, u = Math.round(a * (1 - this.get("position"))); n[0] += a - u; } else var u = a, s = Math.round(o * (1 - this.get("position"))); e.scissor(n[0], n[1], u, s); } } else { var l = r.frameState.size; e.save(), e.beginPath(); var c = [[0, 0], [l[0], l[1]]]; this.get("orientation") === "vertical" ? c[0] = [ l[0] * 0.5 + this.getMap().getSize()[0] * (this.get("position") - 0.5), 0 ] : c[0] = [ 0, l[1] * 0.5 + this.getMap().getSize()[1] * (this.get("position") - 0.5) ], this._drawRect(r, c), e.clip(); } }; Yo.prototype.postcompose = function(r) { if (r.context instanceof WebGLRenderingContext) { if (r.type === "postrender") { var e = r.context; e.disable(e.SCISSOR_TEST); } } else r.target.getClassName && r.target.getClassName() !== "ol-layer" && r.target.get("declutter") ? setTimeout(function() { r.context.restore(); }, 0) : r.context.restore(); }; const dKe = (r, e, t) => { e === "" ? t(new Error("\u8BF7\u8F93\u5165\u7ECF\u5EA6")) : /^-?((0|1?[0-7]?[0-9]?)(([.][0-9]{1,4})?)|180(([.][0]{1,4})?))$/.test(e) ? t() : t(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u7ECF\u5EA6")); }, vKe = (r, e, t) => { e === "" ? t(new Error("\u8BF7\u8F93\u5165\u7EAC\u5EA6")) : /^-?((0|[1-8]?[0-9]?)(([.][0-9]{1,4})?)|90(([.][0]{1,4})?))$/.test(e) ? t() : t(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u7EAC\u5EA6")); }, gKe = _n({ longitude: [ { required: !0, message: "\u8BF7\u8F93\u5165\u7ECF\u5EA6", trigger: "blur" }, { validator: dKe, trigger: "blur" } ], latitude: [ { required: !0, message: "\u8BF7\u8F93\u5165\u7EAC\u5EA6", trigger: "blur" }, { validator: vKe, trigger: "blur" } ] }), mKe = (r, e, t) => () => { r.value.validate((i) => { if (i) { const a = ub([e.longitude, e.latitude]); console.log(a), t("submitForm", a); } else return console.log("error submit!"), !1; }); }; const yKe = (r) => (al("data-v-4d11856e"), r = r(), sl(), r), _Ke = { class: "position-container" }, wKe = /* @__PURE__ */ yKe(() => /* @__PURE__ */ he("h1", null, "\u8BF7\u8F93\u5165\u7ECF\u7EAC\u5EA6", -1)), xKe = { class: "loginBtn" }, CKe = /* @__PURE__ */ Ne("\u67E5\u8BE2"), SKe = /* @__PURE__ */ Ne("\u6E05\u7A7A"), EKe = /* @__PURE__ */ de({ __name: "position", emits: ["submitForm", "hidePosition", "clearFeatrue"], setup(r, { expose: e, emit: t }) { const n = te(), i = _n({ longitude: null, latitude: null }), a = mKe(n, i, t), o = () => { n.value.resetFields(), t("clearFeatrue"); }, s = () => { o(), t("hidePosition", !1); }; return e({ clearEvt: o }), (u, l) => { const c = mt("el-input"), f = mt("el-form-item"), h = mt("el-button"); return Re(), St("div", _Ke, [ wKe, he("span", { class: "delet", onClick: s }, "\xD7"), re(Ue(Nwe), { labelPosition: "left", ref_key: "ruleFormRef", ref: n, model: i, rules: Ue(gKe), "label-width": "120px", class: "demo-ruleForm" }, { default: Ce(() => [ re(f, { label: "\u7ECF\u5EA6", prop: "longitude" }, { default: Ce(() => [ re(c, { placeholder: "\u8BF7\u8F93\u5165\u7ECF\u5EA6", modelValue: i.longitude, "onUpdate:modelValue": l[0] || (l[0] = (p) => i.longitude = p) }, null, 8, ["modelValue"]) ]), _: 1 }), re(f, { label: "\u7EAC\u5EA6", prop: "latitude" }, { default: Ce(() => [ re(c, { placeholder: "\u8BF7\u8F93\u5165\u7EAC\u5EA6", modelValue: i.latitude, "onUpdate:modelValue": l[1] || (l[1] = (p) => i.latitude = p) }, null, 8, ["modelValue"]) ]), _: 1 }) ]), _: 1 }, 8, ["model", "rules"]), he("div", xKe, [ re(h, { type: "primary", onClick: Ue(a) }, { default: Ce(() => [ CKe ]), _: 1 }, 8, ["onClick"]), re(h, { type: "danger", onClick: o }, { default: Ce(() => [ SKe ]), _: 1 }) ]) ]); }; } }), bKe = /* @__PURE__ */ zn(EKe, [["__scopeId", "data-v-4d11856e"]]); const TKe = { class: "nav-container" }, PKe = ["onClick"], IKe = /* @__PURE__ */ de({ __name: "nav", props: { navLinks: { type: Array, default: () => [] } }, emits: ["navEvt", "hideNav"], setup(r, { emit: e }) { const t = r, { navLinks: n } = Ab(t), i = te(), a = (s, u) => { i.value = u, e("navEvt", s); }, o = () => { e("hideNav", !1); }; return (s, u) => (Re(), St("div", TKe, [ Ue(n).length ? (Re(!0), St(yh, { key: 0 }, Ib(Ue(n), (l, c) => (Re(), St("span", { key: l.name, class: Ui({ isActive: i.value === c }), onClick: (f) => a(l.position, c) }, us(l.name), 11, PKe))), 128)) : xe("", !0), he("span", { class: "delet", onClick: o }, "\xD7") ])); } }), AKe = /* @__PURE__ */ zn(IKe, [["__scopeId", "data-v-3d5fb344"]]), Lo = { ADD: "add", REMOVE: "remove" }; var jre = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), F$ = { LENGTH: "length" }, zC = function(r) { jre(e, r); function e(t, n, i) { var a = r.call(this, t) || this; return a.element = n, a.index = i, a; } return e; }(xf), LKe = function(r) { jre(e, r); function e(t, n) { var i = r.call(this) || this; i.on, i.once, i.un; var a = n || {}; if (i.unique_ = !!a.unique, i.array_ = t || [], i.unique_) for (var o = 0, s = i.array_.length; o < s; ++o) i.assertUnique_(i.array_[o], o); return i.updateLength_(), i; } return e.prototype.clear = function() { for (; this.getLength() > 0; ) this.pop(); }, e.prototype.extend = function(t) { for (var n = 0, i = t.length; n < i; ++n) this.push(t[n]); return this; }, e.prototype.forEach = function(t) { for (var n = this.array_, i = 0, a = n.length; i < a; ++i) t(n[i], i, n); }, e.prototype.getArray = function() { return this.array_; }, e.prototype.item = function(t) { return this.array_[t]; }, e.prototype.getLength = function() { return this.get(F$.LENGTH); }, e.prototype.insertAt = function(t, n) { this.unique_ && this.assertUnique_(n), this.array_.splice(t, 0, n), this.updateLength_(), this.dispatchEvent(new zC(Lo.ADD, n, t)); }, e.prototype.pop = function() { return this.removeAt(this.getLength() - 1); }, e.prototype.push = function(t) { this.unique_ && this.assertUnique_(t); var n = this.getLength(); return this.insertAt(n, t), this.getLength(); }, e.prototype.remove = function(t) { for (var n = this.array_, i = 0, a = n.length; i < a; ++i) if (n[i] === t) return this.removeAt(i); }, e.prototype.removeAt = function(t) { var n = this.array_[t]; return this.array_.splice(t, 1), this.updateLength_(), this.dispatchEvent(new zC(Lo.REMOVE, n, t)), n; }, e.prototype.setAt = function(t, n) { var i = this.getLength(); if (t < i) { this.unique_ && this.assertUnique_(n, t); var a = this.array_[t]; this.array_[t] = n, this.dispatchEvent(new zC(Lo.REMOVE, a, t)), this.dispatchEvent(new zC(Lo.ADD, n, t)); } else { for (var o = i; o < t; ++o) this.insertAt(o, void 0); this.insertAt(t, n); } }, e.prototype.updateLength_ = function() { this.set(F$.LENGTH, this.array_.length); }, e.prototype.assertUnique_ = function(t, n) { for (var i = 0, a = this.array_.length; i < a; ++i) if (this.array_[i] === t && i !== n) throw new nre(58); }, e; }(Ps); const Qs = LKe, hO = { ACTIVE: "active" }; var DKe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), MKe = function(r) { DKe(e, r); function e(t) { var n = r.call(this) || this; return n.on, n.once, n.un, t && t.handleEvent && (n.handleEvent = t.handleEvent), n.map_ = null, n.setActive(!0), n; } return e.prototype.getActive = function() { return this.get(hO.ACTIVE); }, e.prototype.getMap = function() { return this.map_; }, e.prototype.handleEvent = function(t) { return !0; }, e.prototype.setActive = function(t) { this.set(hO.ACTIVE, t); }, e.prototype.setMap = function(t) { this.map_ = t; }, e; }(Ps); function OKe(r, e, t) { var n = r.getCenterInternal(); if (n) { var i = [n[0] + e[0], n[1] + e[1]]; r.animateInternal({ duration: t !== void 0 ? t : 250, easing: dXe, center: r.getConstrainedCenter(i) }); } } function e3(r, e, t, n) { var i = r.getZoom(); if (i !== void 0) { var a = r.getConstrainedZoom(i + e), o = r.getResolutionForZoom(a); r.getAnimating() && r.cancelAnimations(), r.animate({ resolution: o, anchor: t, duration: n !== void 0 ? n : 250, easing: $y }); } } const sx = MKe, Vr = { SINGLECLICK: "singleclick", CLICK: Ot.CLICK, DBLCLICK: Ot.DBLCLICK, POINTERDRAG: "pointerdrag", POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", POINTERUP: "pointerup", POINTEROVER: "pointerover", POINTEROUT: "pointerout", POINTERENTER: "pointerenter", POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" }; var RKe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), NKe = function(r) { RKe(e, r); function e(t) { var n = r.call(this) || this, i = t || {}; return n.delta_ = i.delta ? i.delta : 1, n.duration_ = i.duration !== void 0 ? i.duration : 250, n; } return e.prototype.handleEvent = function(t) { var n = !1; if (t.type == Vr.DBLCLICK) { var i = t.originalEvent, a = t.map, o = t.coordinate, s = i.shiftKey ? -this.delta_ : this.delta_, u = a.getView(); e3(u, s, o, this.duration_), i.preventDefault(), n = !0; } return !n; }, e; }(sx); const FKe = NKe; var BKe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), kKe = function(r) { BKe(e, r); function e(t) { var n = this, i = t || {}; return n = r.call( this, i ) || this, i.handleDownEvent && (n.handleDownEvent = i.handleDownEvent), i.handleDragEvent && (n.handleDragEvent = i.handleDragEvent), i.handleMoveEvent && (n.handleMoveEvent = i.handleMoveEvent), i.handleUpEvent && (n.handleUpEvent = i.handleUpEvent), i.stopDown && (n.stopDown = i.stopDown), n.handlingDownUpSequence = !1, n.trackedPointers_ = {}, n.targetPointers = [], n; } return e.prototype.getPointerCount = function() { return this.targetPointers.length; }, e.prototype.handleDownEvent = function(t) { return !1; }, e.prototype.handleDragEvent = function(t) { }, e.prototype.handleEvent = function(t) { if (!t.originalEvent) return !0; var n = !1; if (this.updateTrackedPointers_(t), this.handlingDownUpSequence) { if (t.type == Vr.POINTERDRAG) this.handleDragEvent(t), t.originalEvent.preventDefault(); else if (t.type == Vr.POINTERUP) { var i = this.handleUpEvent(t); this.handlingDownUpSequence = i && this.targetPointers.length > 0; } } else if (t.type == Vr.POINTERDOWN) { var a = this.handleDownEvent(t); this.handlingDownUpSequence = a, n = this.stopDown(a); } else t.type == Vr.POINTERMOVE && this.handleMoveEvent(t); return !n; }, e.prototype.handleMoveEvent = function(t) { }, e.prototype.handleUpEvent = function(t) { return !1; }, e.prototype.stopDown = function(t) { return t; }, e.prototype.updateTrackedPointers_ = function(t) { if (VKe(t)) { var n = t.originalEvent, i = n.pointerId.toString(); t.type == Vr.POINTERUP ? delete this.trackedPointers_[i] : t.type == Vr.POINTERDOWN ? this.trackedPointers_[i] = n : i in this.trackedPointers_ && (this.trackedPointers_[i] = n), this.targetPointers = rre(this.trackedPointers_); } }, e; }(sx); function t3(r) { for (var e = r.length, t = 0, n = 0, i = 0; i < e; i++) t += r[i].clientX, n += r[i].clientY; return [t / e, n / e]; } function VKe(r) { var e = r.type; return e === Vr.POINTERDOWN || e === Vr.POINTERDRAG || e === Vr.POINTERUP; } const Hy = kKe; function pO(r) { var e = arguments; return function(t) { for (var n = !0, i = 0, a = e.length; i < a && (n = n && e[i](t), !!n); ++i) ; return n; }; } var GKe = function(r) { var e = r.originalEvent; return e.altKey && !(e.metaKey || e.ctrlKey) && e.shiftKey; }, zKe = function(r) { var e = r.map.getTargetElement(), t = r.map.getOwnerDocument().activeElement; return e.contains(t); }, Yre = function(r) { return r.map.getTargetElement().hasAttribute("tabindex") ? zKe(r) : !0; }, Xre = hd, qre = function(r) { var e = r.originalEvent; return e.button == 0 && !(NYe && FYe && e.ctrlKey); }, r3 = function(r) { var e = r.originalEvent; return !e.altKey && !(e.metaKey || e.ctrlKey) && !e.shiftKey; }, Zre = function(r) { var e = r.originalEvent; return !e.altKey && !(e.metaKey || e.ctrlKey) && e.shiftKey; }, Kre = function(r) { var e = r.originalEvent, t = e.target.tagName; return t !== "INPUT" && t !== "SELECT" && t !== "TEXTAREA"; }, JL = function(r) { var e = r.originalEvent; return cn(e !== void 0, 56), e.pointerType == "mouse"; }, $Ke = function(r) { var e = r.originalEvent; return cn(e !== void 0, 56), e.isPrimary && e.button === 0; }, HKe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), UKe = function(r) { HKe(e, r); function e(t) { var n = r.call(this, { stopDown: Jw }) || this, i = t || {}; n.kinetic_ = i.kinetic, n.lastCentroid = null, n.lastPointersCount_, n.panning_ = !1; var a = i.condition ? i.condition : pO(r3, $Ke); return n.condition_ = i.onFocusOnly ? pO(Yre, a) : a, n.noKinetic_ = !1, n; } return e.prototype.handleDragEvent = function(t) { this.panning_ || (this.panning_ = !0, this.getMap().getView().beginInteraction()); var n = this.targetPointers, i = t3(n); if (n.length == this.lastPointersCount_) { if (this.kinetic_ && this.kinetic_.update(i[0], i[1]), this.lastCentroid) { var a = [ this.lastCentroid[0] - i[0], i[1] - this.lastCentroid[1] ], o = t.map, s = o.getView(); vYe(a, s.getResolution()), z5(a, s.getRotation()), s.adjustCenterInternal(a); } } else this.kinetic_ && this.kinetic_.begin(); this.lastCentroid = i, this.lastPointersCount_ = n.length, t.originalEvent.preventDefault(); }, e.prototype.handleUpEvent = function(t) { var n = t.map, i = n.getView(); if (this.targetPointers.length === 0) { if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) { var a = this.kinetic_.getDistance(), o = this.kinetic_.getAngle(), s = i.getCenterInternal(), u = n.getPixelFromCoordinateInternal(s), l = n.getCoordinateFromPixelInternal([ u[0] - a * Math.cos(o), u[1] - a * Math.sin(o) ]); i.animateInternal({ center: i.getConstrainedCenter(l), duration: 500, easing: $y }); } return this.panning_ && (this.panning_ = !1, i.endInteraction()), !1; } else return this.kinetic_ && this.kinetic_.begin(), this.lastCentroid = null, !0; }, e.prototype.handleDownEvent = function(t) { if (this.targetPointers.length > 0 && this.condition_(t)) { var n = t.map, i = n.getView(); return this.lastCentroid = null, i.getAnimating() && i.cancelAnimations(), this.kinetic_ && this.kinetic_.begin(), this.noKinetic_ = this.targetPointers.length > 1, !0; } else return !1; }, e; }(Hy); const WKe = UKe; function n3(r) { if (r !== void 0) return 0; } function B$(r) { if (r !== void 0) return r; } function jKe(r) { var e = 2 * Math.PI / r; return function(t, n) { if (n) return t; if (t !== void 0) return t = Math.floor(t / e + 0.5) * e, t; }; } function YKe(r) { var e = r || cd(5); return function(t, n) { if (n) return t; if (t !== void 0) return Math.abs(t) <= e ? 0 : t; }; } var XKe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), qKe = function(r) { XKe(e, r); function e(t) { var n = this, i = t || {}; return n = r.call(this, { stopDown: Jw }) || this, n.condition_ = i.condition ? i.condition : GKe, n.lastAngle_ = void 0, n.duration_ = i.duration !== void 0 ? i.duration : 250, n; } return e.prototype.handleDragEvent = function(t) { if (!!JL(t)) { var n = t.map, i = n.getView(); if (i.getConstraints().rotation !== n3) { var a = n.getSize(), o = t.pixel, s = Math.atan2(a[1] / 2 - o[1], o[0] - a[0] / 2); if (this.lastAngle_ !== void 0) { var u = s - this.lastAngle_; i.adjustRotationInternal(-u); } this.lastAngle_ = s; } } }, e.prototype.handleUpEvent = function(t) { if (!JL(t)) return !0; var n = t.map, i = n.getView(); return i.endInteraction(this.duration_), !1; }, e.prototype.handleDownEvent = function(t) { if (!JL(t)) return !1; if (qre(t) && this.condition_(t)) { var n = t.map; return n.getView().beginInteraction(), this.lastAngle_ = void 0, !0; } else return !1; }, e; }(Hy); const ZKe = qKe; function k$(r, e, t, n, i, a, o) { var s = r[e], u = r[e + 1], l = r[t] - s, c = r[t + 1] - u, f; if (l === 0 && c === 0) f = e; else { var h = ((i - s) * l + (a - u) * c) / (l * l + c * c); if (h > 1) f = t; else if (h > 0) { for (var p = 0; p < n; ++p) o[p] = xc(r[e + p], r[t + p], h); o.length = n; return; } else f = e; } for (var p = 0; p < n; ++p) o[p] = r[f + p]; o.length = n; } function i3(r, e, t, n, i) { var a = r[e], o = r[e + 1]; for (e += n; e < t; e += n) { var s = r[e], u = r[e + 1], l = ld(a, o, s, u); l > i && (i = l), a = s, o = u; } return i; } function a3(r, e, t, n, i) { for (var a = 0, o = t.length; a < o; ++a) { var s = t[a]; i = i3(r, e, s, n, i), e = s; } return i; } function KKe(r, e, t, n, i) { for (var a = 0, o = t.length; a < o; ++a) { var s = t[a]; i = a3(r, e, s, n, i), e = s[s.length - 1]; } return i; } function o3(r, e, t, n, i, a, o, s, u, l, c) { if (e == t) return l; var f, h; if (i === 0) if (h = ld(o, s, r[e], r[e + 1]), h < l) { for (f = 0; f < n; ++f) u[f] = r[e + f]; return u.length = n, h; } else return l; for (var p = c || [NaN, NaN], d = e + n; d < t; ) if (k$(r, d - n, d, n, o, s, p), h = ld(o, s, p[0], p[1]), h < l) { for (l = h, f = 0; f < n; ++f) u[f] = p[f]; u.length = n, d += n; } else d += n * Math.max((Math.sqrt(h) - Math.sqrt(l)) / i | 0, 1); if (a && (k$(r, t - n, e, n, o, s, p), h = ld(o, s, p[0], p[1]), h < l)) { for (l = h, f = 0; f < n; ++f) u[f] = p[f]; u.length = n; } return l; } function s3(r, e, t, n, i, a, o, s, u, l, c) { for (var f = c || [NaN, NaN], h = 0, p = t.length; h < p; ++h) { var d = t[h]; l = o3(r, e, d, n, i, a, o, s, u, l, f), e = d; } return l; } function JKe(r, e, t, n, i, a, o, s, u, l, c) { for (var f = c || [NaN, NaN], h = 0, p = t.length; h < p; ++h) { var d = t[h]; l = s3(r, e, d, n, i, a, o, s, u, l, f), e = d[d.length - 1]; } return l; } function Jre(r, e, t, n) { for (var i = 0, a = t.length; i < a; ++i) r[e++] = t[i]; return e; } function bP(r, e, t, n) { for (var i = 0, a = t.length; i < a; ++i) for (var o = t[i], s = 0; s < n; ++s) r[e++] = o[s]; return e; } function u3(r, e, t, n, i) { for (var a = i || [], o = 0, s = 0, u = t.length; s < u; ++s) { var l = bP(r, e, t[s], n); a[o++] = l, e = l; } return a.length = o, a; } function QKe(r, e, t, n, i) { for (var a = i || [], o = 0, s = 0, u = t.length; s < u; ++s) { var l = u3(r, e, t[s], n, a[o]); a[o++] = l, e = l[l.length - 1]; } return a.length = o, a; } function Qre(r, e, t, n) { for (var i = 0, a = r[t - n], o = r[t - n + 1]; e < t; e += n) { var s = r[e], u = r[e + 1]; i += o * s - a * u, a = s, o = u; } return i / 2; } function ene(r, e, t, n) { for (var i = 0, a = 0, o = t.length; a < o; ++a) { var s = t[a]; i += Qre(r, e, s, n), e = s; } return i; } function eJe(r, e, t, n) { for (var i = 0, a = 0, o = t.length; a < o; ++a) { var s = t[a]; i += ene(r, e, s, n), e = s[s.length - 1]; } return i; } var tJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), rJe = function(r) { tJe(e, r); function e(t, n) { var i = r.call(this) || this; return i.maxDelta_ = -1, i.maxDeltaRevision_ = -1, n !== void 0 && !Array.isArray(t[0]) ? i.setFlatCoordinates( n, t ) : i.setCoordinates( t, n ), i; } return e.prototype.clone = function() { return new e(this.flatCoordinates.slice(), this.layout); }, e.prototype.closestPointXY = function(t, n, i, a) { return a < ky(this.getExtent(), t, n) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(i3(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0)), this.maxDeltaRevision_ = this.getRevision()), o3(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, !0, t, n, i, a)); }, e.prototype.getArea = function() { return Qre(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride); }, e.prototype.getCoordinates = function() { return uh(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride); }, e.prototype.getSimplifiedGeometryInternal = function(t) { var n = []; return n.length = K5(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, t, n, 0), new e(n, li.XY); }, e.prototype.getType = function() { return Ee.LINEAR_RING; }, e.prototype.intersectsExtent = function(t) { return !1; }, e.prototype.setCoordinates = function(t, n) { this.setLayout(n, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = bP(this.flatCoordinates, 0, t, this.stride), this.changed(); }, e; }(Kh); const V$ = rJe; var nJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), iJe = function(r) { nJe(e, r); function e(t, n) { var i = r.call(this) || this; return i.setCoordinates(t, n), i; } return e.prototype.clone = function() { var t = new e(this.flatCoordinates.slice(), this.layout); return t.applyProperties(this), t; }, e.prototype.closestPointXY = function(t, n, i, a) { var o = this.flatCoordinates, s = ld(t, n, o[0], o[1]); if (s < a) { for (var u = this.stride, l = 0; l < u; ++l) i[l] = o[l]; return i.length = u, s; } else return a; }, e.prototype.getCoordinates = function() { return this.flatCoordinates ? this.flatCoordinates.slice() : []; }, e.prototype.computeExtent = function(t) { return uYe(this.flatCoordinates, t); }, e.prototype.getType = function() { return Ee.POINT; }, e.prototype.intersectsExtent = function(t) { return F5(t, this.flatCoordinates[0], this.flatCoordinates[1]); }, e.prototype.setCoordinates = function(t, n) { this.setLayout(n, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Jre(this.flatCoordinates, 0, t, this.stride), this.changed(); }, e; }(Kh); const dd = iJe; function aJe(r, e, t, n, i) { var a = B5( i, function(o) { return !Zp(r, e, t, n, o[0], o[1]); } ); return !a; } function Zp(r, e, t, n, i, a) { for (var o = 0, s = r[t - n], u = r[t - n + 1]; e < t; e += n) { var l = r[e], c = r[e + 1]; u <= a ? c > a && (l - s) * (a - u) - (i - s) * (c - u) > 0 && o++ : c <= a && (l - s) * (a - u) - (i - s) * (c - u) < 0 && o--, s = l, u = c; } return o !== 0; } function l3(r, e, t, n, i, a) { if (t.length === 0 || !Zp(r, e, t[0], n, i, a)) return !1; for (var o = 1, s = t.length; o < s; ++o) if (Zp(r, t[o - 1], t[o], n, i, a)) return !1; return !0; } function oJe(r, e, t, n, i, a) { if (t.length === 0) return !1; for (var o = 0, s = t.length; o < s; ++o) { var u = t[o]; if (l3(r, e, u, n, i, a)) return !0; e = u[u.length - 1]; } return !1; } function tne(r, e, t, n, i, a, o) { for (var s, u, l, c, f, h, p, d = i[a + 1], v = [], g = 0, m = t.length; g < m; ++g) { var y = t[g]; for (c = r[y - n], h = r[y - n + 1], s = e; s < y; s += n) f = r[s], p = r[s + 1], (d <= h && p <= d || h <= d && d <= p) && (l = (d - h) / (p - h) * (f - c) + c, v.push(l)), c = f, h = p; } var _ = NaN, w = -1 / 0; for (v.sort(Um), c = v[0], s = 1, u = v.length; s < u; ++s) { f = v[s]; var x = Math.abs(f - c); x > w && (l = (c + f) / 2, l3(r, e, t, n, l, d) && (_ = l, w = x)), c = f; } return isNaN(_) && (_ = i[a]), o ? (o.push(_, d, w), o) : [_, d, w]; } function sJe(r, e, t, n, i) { for (var a = [], o = 0, s = t.length; o < s; ++o) { var u = t[o]; a = tne(r, e, u, n, i, 2 * o, a), e = u[u.length - 1]; } return a; } function rne(r, e, t, n, i) { var a; for (e += n; e < t; e += n) if (a = i(r.slice(e - n, e), r.slice(e, e + n)), a) return a; return !1; } function TP(r, e, t, n, i) { var a = ore(Cs(), r, e, t, n); return Ti(i, a) ? Lc(i, a) || a[0] >= i[0] && a[2] <= i[2] || a[1] >= i[1] && a[3] <= i[3] ? !0 : rne( r, e, t, n, function(o, s) { return hYe(i, o, s); } ) : !1; } function uJe(r, e, t, n, i) { for (var a = 0, o = t.length; a < o; ++a) { if (TP(r, e, t[a], n, i)) return !0; e = t[a]; } return !1; } function lJe(r, e, t, n, i) { return !!(TP(r, e, t, n, i) || Zp(r, e, t, n, i[0], i[1]) || Zp(r, e, t, n, i[0], i[3]) || Zp(r, e, t, n, i[2], i[1]) || Zp(r, e, t, n, i[2], i[3])); } function nne(r, e, t, n, i) { if (!lJe(r, e, t[0], n, i)) return !1; if (t.length === 1) return !0; for (var a = 1, o = t.length; a < o; ++a) if (aJe(r, t[a - 1], t[a], n, i) && !TP(r, t[a - 1], t[a], n, i)) return !1; return !0; } function cJe(r, e, t, n, i) { for (var a = 0, o = t.length; a < o; ++a) { var s = t[a]; if (nne(r, e, s, n, i)) return !0; e = s[s.length - 1]; } return !1; } function fJe(r, e, t, n) { for (; e < t - n; ) { for (var i = 0; i < n; ++i) { var a = r[e + i]; r[e + i] = r[t - n + i], r[t - n + i] = a; } e += n, t -= n; } } function ine(r, e, t, n) { for (var i = 0, a = r[t - n], o = r[t - n + 1]; e < t; e += n) { var s = r[e], u = r[e + 1]; i += (s - a) * (u + o), a = s, o = u; } return i === 0 ? void 0 : i > 0; } function ane(r, e, t, n, i) { for (var a = i !== void 0 ? i : !1, o = 0, s = t.length; o < s; ++o) { var u = t[o], l = ine(r, e, u, n); if (o === 0) { if (a && l || !a && !l) return !1; } else if (a && !l || !a && l) return !1; e = u; } return !0; } function hJe(r, e, t, n, i) { for (var a = 0, o = t.length; a < o; ++a) { var s = t[a]; if (!ane(r, e, s, n, i)) return !1; s.length && (e = s[s.length - 1]); } return !0; } function dO(r, e, t, n, i) { for (var a = i !== void 0 ? i : !1, o = 0, s = t.length; o < s; ++o) { var u = t[o], l = ine(r, e, u, n), c = o === 0 ? a && l || !a && !l : a && !l || !a && l; c && fJe(r, e, u, n), e = u; } return e; } function G$(r, e, t, n, i) { for (var a = 0, o = t.length; a < o; ++a) e = dO(r, e, t[a], n, i); return e; } var pJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), j1 = function(r) { pJe(e, r); function e(t, n, i) { var a = r.call(this) || this; return a.ends_ = [], a.flatInteriorPointRevision_ = -1, a.flatInteriorPoint_ = null, a.maxDelta_ = -1, a.maxDeltaRevision_ = -1, a.orientedRevision_ = -1, a.orientedFlatCoordinates_ = null, n !== void 0 && i ? (a.setFlatCoordinates( n, t ), a.ends_ = i) : a.setCoordinates( t, n ), a; } return e.prototype.appendLinearRing = function(t) { this.flatCoordinates ? zc(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); }, e.prototype.clone = function() { var t = new e(this.flatCoordinates.slice(), this.layout, this.ends_.slice()); return t.applyProperties(this), t; }, e.prototype.closestPointXY = function(t, n, i, a) { return a < ky(this.getExtent(), t, n) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(a3(this.flatCoordinates, 0, this.ends_, this.stride, 0)), this.maxDeltaRevision_ = this.getRevision()), s3(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, !0, t, n, i, a)); }, e.prototype.containsXY = function(t, n) { return l3(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, t, n); }, e.prototype.getArea = function() { return ene(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride); }, e.prototype.getCoordinates = function(t) { var n; return t !== void 0 ? (n = this.getOrientedFlatCoordinates().slice(), dO(n, 0, this.ends_, this.stride, t)) : n = this.flatCoordinates, W1(n, 0, this.ends_, this.stride); }, e.prototype.getEnds = function() { return this.ends_; }, e.prototype.getFlatInteriorPoint = function() { if (this.flatInteriorPointRevision_ != this.getRevision()) { var t = Hm(this.getExtent()); this.flatInteriorPoint_ = tne(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, t, 0), this.flatInteriorPointRevision_ = this.getRevision(); } return this.flatInteriorPoint_; }, e.prototype.getInteriorPoint = function() { return new dd(this.getFlatInteriorPoint(), li.XYM); }, e.prototype.getLinearRingCount = function() { return this.ends_.length; }, e.prototype.getLinearRing = function(t) { return t < 0 || this.ends_.length <= t ? null : new V$(this.flatCoordinates.slice(t === 0 ? 0 : this.ends_[t - 1], this.ends_[t]), this.layout); }, e.prototype.getLinearRings = function() { for (var t = this.layout, n = this.flatCoordinates, i = this.ends_, a = [], o = 0, s = 0, u = i.length; s < u; ++s) { var l = i[s], c = new V$(n.slice(o, l), t); a.push(c), o = l; } return a; }, e.prototype.getOrientedFlatCoordinates = function() { if (this.orientedRevision_ != this.getRevision()) { var t = this.flatCoordinates; ane(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = dO(this.orientedFlatCoordinates_, 0, this.ends_, this.stride)), this.orientedRevision_ = this.getRevision(); } return this.orientedFlatCoordinates_; }, e.prototype.getSimplifiedGeometryInternal = function(t) { var n = [], i = []; return n.length = Mre(this.flatCoordinates, 0, this.ends_, this.stride, Math.sqrt(t), n, 0, i), new e(n, li.XY, i); }, e.prototype.getType = function() { return Ee.POLYGON; }, e.prototype.intersectsExtent = function(t) { return nne(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, t); }, e.prototype.setCoordinates = function(t, n) { this.setLayout(n, t, 2), this.flatCoordinates || (this.flatCoordinates = []); var i = u3(this.flatCoordinates, 0, t, this.stride, this.ends_); this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed(); }, e; }(Kh); function z$(r) { var e = r[0], t = r[1], n = r[2], i = r[3], a = [ e, t, e, i, n, i, n, t, e, t ]; return new j1(a, li.XY, [ a.length ]); } var dJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), vJe = function(r) { dJe(e, r); function e(t) { var n = r.call(this) || this; return n.geometry_ = null, n.element_ = document.createElement("div"), n.element_.style.position = "absolute", n.element_.style.pointerEvents = "auto", n.element_.className = "ol-box " + t, n.map_ = null, n.startPixel_ = null, n.endPixel_ = null, n; } return e.prototype.disposeInternal = function() { this.setMap(null); }, e.prototype.render_ = function() { var t = this.startPixel_, n = this.endPixel_, i = "px", a = this.element_.style; a.left = Math.min(t[0], n[0]) + i, a.top = Math.min(t[1], n[1]) + i, a.width = Math.abs(n[0] - t[0]) + i, a.height = Math.abs(n[1] - t[1]) + i; }, e.prototype.setMap = function(t) { if (this.map_) { this.map_.getOverlayContainer().removeChild(this.element_); var n = this.element_.style; n.left = "inherit", n.top = "inherit", n.width = "inherit", n.height = "inherit"; } this.map_ = t, this.map_ && this.map_.getOverlayContainer().appendChild(this.element_); }, e.prototype.setPixels = function(t, n) { this.startPixel_ = t, this.endPixel_ = n, this.createOrUpdateGeometry(), this.render_(); }, e.prototype.createOrUpdateGeometry = function() { var t = this.startPixel_, n = this.endPixel_, i = [ t, [t[0], n[1]], n, [n[0], t[1]] ], a = i.map(this.map_.getCoordinateFromPixelInternal, this.map_); a[4] = a[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([a]) : this.geometry_ = new j1([a]); }, e.prototype.getGeometry = function() { return this.geometry_; }, e; }(wP); const gJe = vJe; var one = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), $C = { BOXSTART: "boxstart", BOXDRAG: "boxdrag", BOXEND: "boxend", BOXCANCEL: "boxcancel" }, QL = function(r) { one(e, r); function e(t, n, i) { var a = r.call(this, t) || this; return a.coordinate = n, a.mapBrowserEvent = i, a; } return e; }(xf), mJe = function(r) { one(e, r); function e(t) { var n = r.call(this) || this; n.on, n.once, n.un; var i = t || {}; return n.box_ = new gJe(i.className || "ol-dragbox"), n.minArea_ = i.minArea !== void 0 ? i.minArea : 64, i.onBoxEnd && (n.onBoxEnd = i.onBoxEnd), n.startPixel_ = null, n.condition_ = i.condition ? i.condition : qre, n.boxEndCondition_ = i.boxEndCondition ? i.boxEndCondition : n.defaultBoxEndCondition, n; } return e.prototype.defaultBoxEndCondition = function(t, n, i) { var a = i[0] - n[0], o = i[1] - n[1]; return a * a + o * o >= this.minArea_; }, e.prototype.getGeometry = function() { return this.box_.getGeometry(); }, e.prototype.handleDragEvent = function(t) { this.box_.setPixels(this.startPixel_, t.pixel), this.dispatchEvent(new QL($C.BOXDRAG, t.coordinate, t)); }, e.prototype.handleUpEvent = function(t) { this.box_.setMap(null); var n = this.boxEndCondition_(t, this.startPixel_, t.pixel); return n && this.onBoxEnd(t), this.dispatchEvent(new QL(n ? $C.BOXEND : $C.BOXCANCEL, t.coordinate, t)), !1; }, e.prototype.handleDownEvent = function(t) { return this.condition_(t) ? (this.startPixel_ = t.pixel, this.box_.setMap(t.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent(new QL($C.BOXSTART, t.coordinate, t)), !0) : !1; }, e.prototype.onBoxEnd = function(t) { }, e; }(Hy); const yJe = mJe; var _Je = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), wJe = function(r) { _Je(e, r); function e(t) { var n = this, i = t || {}, a = i.condition ? i.condition : Zre; return n = r.call(this, { condition: a, className: i.className || "ol-dragzoom", minArea: i.minArea }) || this, n.duration_ = i.duration !== void 0 ? i.duration : 200, n.out_ = i.out !== void 0 ? i.out : !1, n; } return e.prototype.onBoxEnd = function(t) { var n = this.getMap(), i = n.getView(), a = this.getGeometry(); if (this.out_) { var o = i.rotatedExtentForGeometry(a), s = i.getResolutionForExtentInternal(o), u = i.getResolution() / s; a = a.clone(), a.scale(u * u); } i.fitInternal(a, { duration: this.duration_, easing: $y }); }, e; }(yJe); const xJe = wJe, Tp = { LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40 }; var CJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), SJe = function(r) { CJe(e, r); function e(t) { var n = r.call(this) || this, i = t || {}; return n.defaultCondition_ = function(a) { return r3(a) && Kre(a); }, n.condition_ = i.condition !== void 0 ? i.condition : n.defaultCondition_, n.duration_ = i.duration !== void 0 ? i.duration : 100, n.pixelDelta_ = i.pixelDelta !== void 0 ? i.pixelDelta : 128, n; } return e.prototype.handleEvent = function(t) { var n = !1; if (t.type == Ot.KEYDOWN) { var i = t.originalEvent, a = i.keyCode; if (this.condition_(t) && (a == Tp.DOWN || a == Tp.LEFT || a == Tp.RIGHT || a == Tp.UP)) { var o = t.map, s = o.getView(), u = s.getResolution() * this.pixelDelta_, l = 0, c = 0; a == Tp.DOWN ? c = -u : a == Tp.LEFT ? l = -u : a == Tp.RIGHT ? l = u : c = u; var f = [l, c]; z5(f, s.getRotation()), OKe(s, f, this.duration_), i.preventDefault(), n = !0; } } return !n; }, e; }(sx); const EJe = SJe; var bJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), TJe = function(r) { bJe(e, r); function e(t) { var n = r.call(this) || this, i = t || {}; return n.condition_ = i.condition ? i.condition : Kre, n.delta_ = i.delta ? i.delta : 1, n.duration_ = i.duration !== void 0 ? i.duration : 100, n; } return e.prototype.handleEvent = function(t) { var n = !1; if (t.type == Ot.KEYDOWN || t.type == Ot.KEYPRESS) { var i = t.originalEvent, a = i.charCode; if (this.condition_(t) && (a == "+".charCodeAt(0) || a == "-".charCodeAt(0))) { var o = t.map, s = a == "+".charCodeAt(0) ? this.delta_ : -this.delta_, u = o.getView(); e3(u, s, void 0, this.duration_), i.preventDefault(), n = !0; } } return !n; }, e; }(sx); const PJe = TJe; var IJe = function() { function r(e, t, n) { this.decay_ = e, this.minVelocity_ = t, this.delay_ = n, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0; } return r.prototype.begin = function() { this.points_.length = 0, this.angle_ = 0, this.initialVelocity_ = 0; }, r.prototype.update = function(e, t) { this.points_.push(e, t, Date.now()); }, r.prototype.end = function() { if (this.points_.length < 6) return !1; var e = Date.now() - this.delay_, t = this.points_.length - 3; if (this.points_[t + 2] < e) return !1; for (var n = t - 3; n > 0 && this.points_[n + 2] > e; ) n -= 3; var i = this.points_[t + 2] - this.points_[n + 2]; if (i < 1e3 / 60) return !1; var a = this.points_[t] - this.points_[n], o = this.points_[t + 1] - this.points_[n + 1]; return this.angle_ = Math.atan2(o, a), this.initialVelocity_ = Math.sqrt(a * a + o * o) / i, this.initialVelocity_ > this.minVelocity_; }, r.prototype.getDistance = function() { return (this.minVelocity_ - this.initialVelocity_) / this.decay_; }, r.prototype.getAngle = function() { return this.angle_; }, r; }(); const AJe = IJe; var LJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), eD = { TRACKPAD: "trackpad", WHEEL: "wheel" }, DJe = function(r) { LJe(e, r); function e(t) { var n = this, i = t || {}; n = r.call( this, i ) || this, n.totalDelta_ = 0, n.lastDelta_ = 0, n.maxDelta_ = i.maxDelta !== void 0 ? i.maxDelta : 1, n.duration_ = i.duration !== void 0 ? i.duration : 250, n.timeout_ = i.timeout !== void 0 ? i.timeout : 80, n.useAnchor_ = i.useAnchor !== void 0 ? i.useAnchor : !0, n.constrainResolution_ = i.constrainResolution !== void 0 ? i.constrainResolution : !1; var a = i.condition ? i.condition : Xre; return n.condition_ = i.onFocusOnly ? pO(Yre, a) : a, n.lastAnchor_ = null, n.startTime_ = void 0, n.timeoutId_, n.mode_ = void 0, n.trackpadEventGap_ = 400, n.trackpadTimeoutId_, n.deltaPerZoom_ = 300, n; } return e.prototype.endInteraction_ = function() { this.trackpadTimeoutId_ = void 0; var t = this.getMap().getView(); t.endInteraction(void 0, this.lastDelta_ ? this.lastDelta_ > 0 ? 1 : -1 : 0, this.lastAnchor_); }, e.prototype.handleEvent = function(t) { if (!this.condition_(t)) return !0; var n = t.type; if (n !== Ot.WHEEL) return !0; var i = t.map, a = t.originalEvent; a.preventDefault(), this.useAnchor_ && (this.lastAnchor_ = t.coordinate); var o; if (t.type == Ot.WHEEL && (o = a.deltaY, MYe && a.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (o /= dre), a.deltaMode === WheelEvent.DOM_DELTA_LINE && (o *= 40)), o === 0) return !1; this.lastDelta_ = o; var s = Date.now(); this.startTime_ === void 0 && (this.startTime_ = s), (!this.mode_ || s - this.startTime_ > this.trackpadEventGap_) && (this.mode_ = Math.abs(o) < 4 ? eD.TRACKPAD : eD.WHEEL); var u = i.getView(); if (this.mode_ === eD.TRACKPAD && !(u.getConstrainResolution() || this.constrainResolution_)) return this.trackpadTimeoutId_ ? clearTimeout(this.trackpadTimeoutId_) : (u.getAnimating() && u.cancelAnimations(), u.beginInteraction()), this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeout_), u.adjustZoom(-o / this.deltaPerZoom_, this.lastAnchor_), this.startTime_ = s, !1; this.totalDelta_ += o; var l = Math.max(this.timeout_ - (s - this.startTime_), 0); return clearTimeout(this.timeoutId_), this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, i), l), !1; }, e.prototype.handleWheelZoom_ = function(t) { var n = t.getView(); n.getAnimating() && n.cancelAnimations(); var i = -Di(this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_) / this.deltaPerZoom_; (n.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0), e3(n, i, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; }, e.prototype.setMouseAnchor = function(t) { this.useAnchor_ = t, t || (this.lastAnchor_ = null); }, e; }(sx); const MJe = DJe; var OJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), RJe = function(r) { OJe(e, r); function e(t) { var n = this, i = t || {}, a = i; return a.stopDown || (a.stopDown = Jw), n = r.call(this, a) || this, n.anchor_ = null, n.lastAngle_ = void 0, n.rotating_ = !1, n.rotationDelta_ = 0, n.threshold_ = i.threshold !== void 0 ? i.threshold : 0.3, n.duration_ = i.duration !== void 0 ? i.duration : 250, n; } return e.prototype.handleDragEvent = function(t) { var n = 0, i = this.targetPointers[0], a = this.targetPointers[1], o = Math.atan2(a.clientY - i.clientY, a.clientX - i.clientX); if (this.lastAngle_ !== void 0) { var s = o - this.lastAngle_; this.rotationDelta_ += s, !this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_ && (this.rotating_ = !0), n = s; } this.lastAngle_ = o; var u = t.map, l = u.getView(); if (l.getConstraints().rotation !== n3) { var c = u.getViewport().getBoundingClientRect(), f = t3(this.targetPointers); f[0] -= c.left, f[1] -= c.top, this.anchor_ = u.getCoordinateFromPixelInternal(f), this.rotating_ && (u.render(), l.adjustRotationInternal(n, this.anchor_)); } }, e.prototype.handleUpEvent = function(t) { if (this.targetPointers.length < 2) { var n = t.map, i = n.getView(); return i.endInteraction(this.duration_), !1; } else return !0; }, e.prototype.handleDownEvent = function(t) { if (this.targetPointers.length >= 2) { var n = t.map; return this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.handlingDownUpSequence || n.getView().beginInteraction(), !0; } else return !1; }, e; }(Hy); const NJe = RJe; var FJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), BJe = function(r) { FJe(e, r); function e(t) { var n = this, i = t || {}, a = i; return a.stopDown || (a.stopDown = Jw), n = r.call(this, a) || this, n.anchor_ = null, n.duration_ = i.duration !== void 0 ? i.duration : 400, n.lastDistance_ = void 0, n.lastScaleDelta_ = 1, n; } return e.prototype.handleDragEvent = function(t) { var n = 1, i = this.targetPointers[0], a = this.targetPointers[1], o = i.clientX - a.clientX, s = i.clientY - a.clientY, u = Math.sqrt(o * o + s * s); this.lastDistance_ !== void 0 && (n = this.lastDistance_ / u), this.lastDistance_ = u; var l = t.map, c = l.getView(); n != 1 && (this.lastScaleDelta_ = n); var f = l.getViewport().getBoundingClientRect(), h = t3(this.targetPointers); h[0] -= f.left, h[1] -= f.top, this.anchor_ = l.getCoordinateFromPixelInternal(h), l.render(), c.adjustResolutionInternal(n, this.anchor_); }, e.prototype.handleUpEvent = function(t) { if (this.targetPointers.length < 2) { var n = t.map, i = n.getView(), a = this.lastScaleDelta_ > 1 ? 1 : -1; return i.endInteraction(this.duration_, a), !1; } else return !0; }, e.prototype.handleDownEvent = function(t) { if (this.targetPointers.length >= 2) { var n = t.map; return this.anchor_ = null, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1, this.handlingDownUpSequence || n.getView().beginInteraction(), !0; } else return !1; }, e; }(Hy); const kJe = BJe, A0 = { ARRAY_BUFFER: "arraybuffer", JSON: "json", TEXT: "text", XML: "xml" }; var VJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), sne = function(r) { VJe(e, r); function e(t, n, i) { var a = r.call(this) || this; if (i !== void 0 && n === void 0) a.setFlatCoordinates(i, t); else { var o = n || 0; a.setCenterAndRadius(t, o, i); } return a; } return e.prototype.clone = function() { var t = new e(this.flatCoordinates.slice(), void 0, this.layout); return t.applyProperties(this), t; }, e.prototype.closestPointXY = function(t, n, i, a) { var o = this.flatCoordinates, s = t - o[0], u = n - o[1], l = s * s + u * u; if (l < a) { if (l === 0) for (var c = 0; c < this.stride; ++c) i[c] = o[c]; else { var f = this.getRadius() / Math.sqrt(l); i[0] = o[0] + f * s, i[1] = o[1] + f * u; for (var c = 2; c < this.stride; ++c) i[c] = o[c]; } return i.length = this.stride, l; } else return a; }, e.prototype.containsXY = function(t, n) { var i = this.flatCoordinates, a = t - i[0], o = n - i[1]; return a * a + o * o <= this.getRadiusSquared_(); }, e.prototype.getCenter = function() { return this.flatCoordinates.slice(0, this.stride); }, e.prototype.computeExtent = function(t) { var n = this.flatCoordinates, i = n[this.stride] - n[0]; return jd(n[0] - i, n[1] - i, n[0] + i, n[1] + i, t); }, e.prototype.getRadius = function() { return Math.sqrt(this.getRadiusSquared_()); }, e.prototype.getRadiusSquared_ = function() { var t = this.flatCoordinates[this.stride] - this.flatCoordinates[0], n = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1]; return t * t + n * n; }, e.prototype.getType = function() { return Ee.CIRCLE; }, e.prototype.intersectsExtent = function(t) { var n = this.getExtent(); if (Ti(t, n)) { var i = this.getCenter(); return t[0] <= i[0] && t[2] >= i[0] || t[1] <= i[1] && t[3] >= i[1] ? !0 : B5(t, this.intersectsCoordinate.bind(this)); } return !1; }, e.prototype.setCenter = function(t) { var n = this.stride, i = this.flatCoordinates[n] - this.flatCoordinates[0], a = t.slice(); a[n] = a[0] + i; for (var o = 1; o < n; ++o) a[n + o] = t[o]; this.setFlatCoordinates(this.layout, a), this.changed(); }, e.prototype.setCenterAndRadius = function(t, n, i) { this.setLayout(i, t, 0), this.flatCoordinates || (this.flatCoordinates = []); var a = this.flatCoordinates, o = Jre(a, 0, t, this.stride); a[o++] = a[0] + n; for (var s = 1, u = this.stride; s < u; ++s) a[o++] = a[s]; a.length = o, this.changed(); }, e.prototype.getCoordinates = function() { return null; }, e.prototype.setCoordinates = function(t, n) { }, e.prototype.setRadius = function(t) { this.flatCoordinates[this.stride] = this.flatCoordinates[0] + t, this.changed(); }, e.prototype.rotate = function(t, n) { var i = this.getCenter(), a = this.getStride(); this.setCenter(J5(i, 0, i.length, a, t, n, i)), this.changed(); }, e.prototype.translate = function(t, n) { var i = this.getCenter(), a = this.getStride(); this.setCenter(Rre(i, 0, i.length, a, t, n, i)), this.changed(); }, e; }(Kh); sne.prototype.transform; const GJe = sne; var zJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), $Je = function(r) { zJe(e, r); function e(t) { var n = r.call(this) || this; if (n.on, n.once, n.un, n.id_ = void 0, n.geometryName_ = "geometry", n.style_ = null, n.styleFunction_ = void 0, n.geometryChangeKey_ = null, n.addChangeListener(n.geometryName_, n.handleGeometryChanged_), t) if (typeof t.getSimplifiedGeometry == "function") { var i = t; n.setGeometry(i); } else { var a = t; n.setProperties(a); } return n; } return e.prototype.clone = function() { var t = new e(this.hasProperties() ? this.getProperties() : null); t.setGeometryName(this.getGeometryName()); var n = this.getGeometry(); n && t.setGeometry(n.clone()); var i = this.getStyle(); return i && t.setStyle(i), t; }, e.prototype.getGeometry = function() { return this.get(this.geometryName_); }, e.prototype.getId = function() { return this.id_; }, e.prototype.getGeometryName = function() { return this.geometryName_; }, e.prototype.getStyle = function() { return this.style_; }, e.prototype.getStyleFunction = function() { return this.styleFunction_; }, e.prototype.handleGeometryChange_ = function() { this.changed(); }, e.prototype.handleGeometryChanged_ = function() { this.geometryChangeKey_ && (pn(this.geometryChangeKey_), this.geometryChangeKey_ = null); var t = this.getGeometry(); t && (this.geometryChangeKey_ = Bt(t, Ot.CHANGE, this.handleGeometryChange_, this)), this.changed(); }, e.prototype.setGeometry = function(t) { this.set(this.geometryName_, t); }, e.prototype.setStyle = function(t) { this.style_ = t, this.styleFunction_ = t ? HJe(t) : void 0, this.changed(); }, e.prototype.setId = function(t) { this.id_ = t, this.changed(); }, e.prototype.setGeometryName = function(t) { this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_(); }, e; }(Ps); function HJe(r) { if (typeof r == "function") return r; var e; if (Array.isArray(r)) e = r; else { cn(typeof r.getZIndex == "function", 41); var t = r; e = [t]; } return function() { return e; }; } const Cc = $Je; function une(r, e, t, n, i, a, o) { var s, u, l = (t - e) / n; if (l === 1) s = e; else if (l === 2) s = e, u = i; else if (l !== 0) { for (var c = r[e], f = r[e + 1], h = 0, p = [0], d = e + n; d < t; d += n) { var v = r[d], g = r[d + 1]; h += Math.sqrt((v - c) * (v - c) + (g - f) * (g - f)), p.push(h), c = v, f = g; } var m = i * h, y = bYe(p, m); y < 0 ? (u = (m - p[-y - 2]) / (p[-y - 1] - p[-y - 2]), s = e + (-y - 2) * n) : s = e + y * n; } for (var _ = o > 1 ? o : 2, w = a || new Array(_), d = 0; d < _; ++d) w[d] = s === void 0 ? NaN : u === void 0 ? r[s + d] : xc(r[s + d], r[s + n + d], u); return w; } function vO(r, e, t, n, i, a) { if (t == e) return null; var o; if (i < r[e + n - 1]) return a ? (o = r.slice(e, e + n), o[n - 1] = i, o) : null; if (r[t - 1] < i) return a ? (o = r.slice(t - n, t), o[n - 1] = i, o) : null; if (i == r[e + n - 1]) return r.slice(e, e + n); for (var s = e / n, u = t / n; s < u; ) { var l = s + u >> 1; i < r[(l + 1) * n - 1] ? u = l : s = l + 1; } var c = r[s * n - 1]; if (i == c) return r.slice((s - 1) * n, (s - 1) * n + n); var f = r[(s + 1) * n - 1], h = (i - c) / (f - c); o = []; for (var p = 0; p < n - 1; ++p) o.push(xc(r[(s - 1) * n + p], r[s * n + p], h)); return o.push(i), o; } function UJe(r, e, t, n, i, a, o) { if (o) return vO(r, e, t[t.length - 1], n, i, a); var s; if (i < r[n - 1]) return a ? (s = r.slice(0, n), s[n - 1] = i, s) : null; if (r[r.length - 1] < i) return a ? (s = r.slice(r.length - n), s[n - 1] = i, s) : null; for (var u = 0, l = t.length; u < l; ++u) { var c = t[u]; if (e != c) { if (i < r[e + n - 1]) return null; if (i <= r[c - 1]) return vO(r, e, c, n, i, !1); e = c; } } return null; } var WJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), jJe = function(r) { WJe(e, r); function e(t, n) { var i = r.call(this) || this; return i.flatMidpoint_ = null, i.flatMidpointRevision_ = -1, i.maxDelta_ = -1, i.maxDeltaRevision_ = -1, n !== void 0 && !Array.isArray(t[0]) ? i.setFlatCoordinates( n, t ) : i.setCoordinates( t, n ), i; } return e.prototype.appendCoordinate = function(t) { this.flatCoordinates ? zc(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); }, e.prototype.clone = function() { var t = new e(this.flatCoordinates.slice(), this.layout); return t.applyProperties(this), t; }, e.prototype.closestPointXY = function(t, n, i, a) { return a < ky(this.getExtent(), t, n) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(i3(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0)), this.maxDeltaRevision_ = this.getRevision()), o3(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, !1, t, n, i, a)); }, e.prototype.forEachSegment = function(t) { return rne(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, t); }, e.prototype.getCoordinateAtM = function(t, n) { if (this.layout != li.XYM && this.layout != li.XYZM) return null; var i = n !== void 0 ? n : !1; return vO(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, t, i); }, e.prototype.getCoordinates = function() { return uh(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride); }, e.prototype.getCoordinateAt = function(t, n) { return une(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, t, n, this.stride); }, e.prototype.getLength = function() { return Nre(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride); }, e.prototype.getFlatMidpoint = function() { return this.flatMidpointRevision_ != this.getRevision() && (this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_), this.flatMidpointRevision_ = this.getRevision()), this.flatMidpoint_; }, e.prototype.getSimplifiedGeometryInternal = function(t) { var n = []; return n.length = K5(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, t, n, 0), new e(n, li.XY); }, e.prototype.getType = function() { return Ee.LINE_STRING; }, e.prototype.intersectsExtent = function(t) { return TP(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, t); }, e.prototype.setCoordinates = function(t, n) { this.setLayout(n, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = bP(this.flatCoordinates, 0, t, this.stride), this.changed(); }, e; }(Kh); const mh = jJe; var YJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), XJe = function(r) { YJe(e, r); function e(t, n, i) { var a = r.call(this, t) || this; return a.map = n, a.frameState = i !== void 0 ? i : null, a; } return e; }(xf); const Cg = XJe; var qJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), ZJe = function(r) { qJe(e, r); function e(t, n, i, a, o) { var s = r.call(this, t, n, o) || this; return s.originalEvent = i, s.pixel_ = null, s.coordinate_ = null, s.dragging = a !== void 0 ? a : !1, s; } return Object.defineProperty(e.prototype, "pixel", { get: function() { return this.pixel_ || (this.pixel_ = this.map.getEventPixel(this.originalEvent)), this.pixel_; }, set: function(t) { this.pixel_ = t; }, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "coordinate", { get: function() { return this.coordinate_ || (this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel)), this.coordinate_; }, set: function(t) { this.coordinate_ = t; }, enumerable: !1, configurable: !0 }), e.prototype.preventDefault = function() { r.prototype.preventDefault.call(this), "preventDefault" in this.originalEvent && this.originalEvent.preventDefault(); }, e.prototype.stopPropagation = function() { r.prototype.stopPropagation.call(this), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation(); }, e; }(Cg); const wc = ZJe; var KJe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), JJe = function(r) { KJe(e, r); function e(t, n, i) { var a = r.call(this) || this; if (a.ends_ = [], a.maxDelta_ = -1, a.maxDeltaRevision_ = -1, Array.isArray(t[0])) a.setCoordinates( t, n ); else if (n !== void 0 && i) a.setFlatCoordinates( n, t ), a.ends_ = i; else { for (var o = a.getLayout(), s = t, u = [], l = [], c = 0, f = s.length; c < f; ++c) { var h = s[c]; c === 0 && (o = h.getLayout()), zc(u, h.getFlatCoordinates()), l.push(u.length); } a.setFlatCoordinates(o, u), a.ends_ = l; } return a; } return e.prototype.appendLineString = function(t) { this.flatCoordinates ? zc(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); }, e.prototype.clone = function() { var t = new e(this.flatCoordinates.slice(), this.layout, this.ends_.slice()); return t.applyProperties(this), t; }, e.prototype.closestPointXY = function(t, n, i, a) { return a < ky(this.getExtent(), t, n) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(a3(this.flatCoordinates, 0, this.ends_, this.stride, 0)), this.maxDeltaRevision_ = this.getRevision()), s3(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, !1, t, n, i, a)); }, e.prototype.getCoordinateAtM = function(t, n, i) { if (this.layout != li.XYM && this.layout != li.XYZM || this.flatCoordinates.length === 0) return null; var a = n !== void 0 ? n : !1, o = i !== void 0 ? i : !1; return UJe(this.flatCoordinates, 0, this.ends_, this.stride, t, a, o); }, e.prototype.getCoordinates = function() { return W1(this.flatCoordinates, 0, this.ends_, this.stride); }, e.prototype.getEnds = function() { return this.ends_; }, e.prototype.getLineString = function(t) { return t < 0 || this.ends_.length <= t ? null : new mh(this.flatCoordinates.slice(t === 0 ? 0 : this.ends_[t - 1], this.ends_[t]), this.layout); }, e.prototype.getLineStrings = function() { for (var t = this.flatCoordinates, n = this.ends_, i = this.layout, a = [], o = 0, s = 0, u = n.length; s < u; ++s) { var l = n[s], c = new mh(t.slice(o, l), i); a.push(c), o = l; } return a; }, e.prototype.getFlatMidpoints = function() { for (var t = [], n = this.flatCoordinates, i = 0, a = this.ends_, o = this.stride, s = 0, u = a.length; s < u; ++s) { var l = a[s], c = une(n, i, l, o, 0.5); zc(t, c), i = l; } return t; }, e.prototype.getSimplifiedGeometryInternal = function(t) { var n = [], i = []; return n.length = yqe(this.flatCoordinates, 0, this.ends_, this.stride, t, n, 0, i), new e(n, li.XY, i); }, e.prototype.getType = function() { return Ee.MULTI_LINE_STRING; }, e.prototype.intersectsExtent = function(t) { return uJe(this.flatCoordinates, 0, this.ends_, this.stride, t); }, e.prototype.setCoordinates = function(t, n) { this.setLayout(n, t, 2), this.flatCoordinates || (this.flatCoordinates = []); var i = u3(this.flatCoordinates, 0, t, this.stride, this.ends_); this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed(); }, e; }(Kh); const QJe = JJe; var eQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), tQe = function(r) { eQe(e, r); function e(t, n) { var i = r.call(this) || this; return n && !Array.isArray(t[0]) ? i.setFlatCoordinates( n, t ) : i.setCoordinates( t, n ), i; } return e.prototype.appendPoint = function(t) { this.flatCoordinates ? zc(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); }, e.prototype.clone = function() { var t = new e(this.flatCoordinates.slice(), this.layout); return t.applyProperties(this), t; }, e.prototype.closestPointXY = function(t, n, i, a) { if (a < ky(this.getExtent(), t, n)) return a; for (var o = this.flatCoordinates, s = this.stride, u = 0, l = o.length; u < l; u += s) { var c = ld(t, n, o[u], o[u + 1]); if (c < a) { a = c; for (var f = 0; f < s; ++f) i[f] = o[u + f]; i.length = s; } } return a; }, e.prototype.getCoordinates = function() { return uh(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride); }, e.prototype.getPoint = function(t) { var n = this.flatCoordinates ? this.flatCoordinates.length / this.stride : 0; return t < 0 || n <= t ? null : new dd(this.flatCoordinates.slice(t * this.stride, (t + 1) * this.stride), this.layout); }, e.prototype.getPoints = function() { for (var t = this.flatCoordinates, n = this.layout, i = this.stride, a = [], o = 0, s = t.length; o < s; o += i) { var u = new dd(t.slice(o, o + i), n); a.push(u); } return a; }, e.prototype.getType = function() { return Ee.MULTI_POINT; }, e.prototype.intersectsExtent = function(t) { for (var n = this.flatCoordinates, i = this.stride, a = 0, o = n.length; a < o; a += i) { var s = n[a], u = n[a + 1]; if (F5(t, s, u)) return !0; } return !1; }, e.prototype.setCoordinates = function(t, n) { this.setLayout(n, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = bP(this.flatCoordinates, 0, t, this.stride), this.changed(); }, e; }(Kh); const lne = tQe; function rQe(r, e, t, n) { for (var i = [], a = Cs(), o = 0, s = t.length; o < s; ++o) { var u = t[o]; a = are(r, e, u[0], n), i.push((a[0] + a[2]) / 2, (a[1] + a[3]) / 2), e = u[u.length - 1]; } return i; } var nQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), iQe = function(r) { nQe(e, r); function e(t, n, i) { var a = r.call(this) || this; if (a.endss_ = [], a.flatInteriorPointsRevision_ = -1, a.flatInteriorPoints_ = null, a.maxDelta_ = -1, a.maxDeltaRevision_ = -1, a.orientedRevision_ = -1, a.orientedFlatCoordinates_ = null, !i && !Array.isArray(t[0])) { for (var o = a.getLayout(), s = t, u = [], l = [], c = 0, f = s.length; c < f; ++c) { var h = s[c]; c === 0 && (o = h.getLayout()); for (var p = u.length, d = h.getEnds(), v = 0, g = d.length; v < g; ++v) d[v] += p; zc(u, h.getFlatCoordinates()), l.push(d); } n = o, t = u, i = l; } return n !== void 0 && i ? (a.setFlatCoordinates( n, t ), a.endss_ = i) : a.setCoordinates( t, n ), a; } return e.prototype.appendPolygon = function(t) { var n; if (!this.flatCoordinates) this.flatCoordinates = t.getFlatCoordinates().slice(), n = t.getEnds().slice(), this.endss_.push(); else { var i = this.flatCoordinates.length; zc(this.flatCoordinates, t.getFlatCoordinates()), n = t.getEnds().slice(); for (var a = 0, o = n.length; a < o; ++a) n[a] += i; } this.endss_.push(n), this.changed(); }, e.prototype.clone = function() { for (var t = this.endss_.length, n = new Array(t), i = 0; i < t; ++i) n[i] = this.endss_[i].slice(); var a = new e(this.flatCoordinates.slice(), this.layout, n); return a.applyProperties(this), a; }, e.prototype.closestPointXY = function(t, n, i, a) { return a < ky(this.getExtent(), t, n) ? a : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(KKe(this.flatCoordinates, 0, this.endss_, this.stride, 0)), this.maxDeltaRevision_ = this.getRevision()), JKe(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, this.maxDelta_, !0, t, n, i, a)); }, e.prototype.containsXY = function(t, n) { return oJe(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, t, n); }, e.prototype.getArea = function() { return eJe(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride); }, e.prototype.getCoordinates = function(t) { var n; return t !== void 0 ? (n = this.getOrientedFlatCoordinates().slice(), G$(n, 0, this.endss_, this.stride, t)) : n = this.flatCoordinates, cO(n, 0, this.endss_, this.stride); }, e.prototype.getEndss = function() { return this.endss_; }, e.prototype.getFlatInteriorPoints = function() { if (this.flatInteriorPointsRevision_ != this.getRevision()) { var t = rQe(this.flatCoordinates, 0, this.endss_, this.stride); this.flatInteriorPoints_ = sJe(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, t), this.flatInteriorPointsRevision_ = this.getRevision(); } return this.flatInteriorPoints_; }, e.prototype.getInteriorPoints = function() { return new lne(this.getFlatInteriorPoints().slice(), li.XYM); }, e.prototype.getOrientedFlatCoordinates = function() { if (this.orientedRevision_ != this.getRevision()) { var t = this.flatCoordinates; hJe(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = G$(this.orientedFlatCoordinates_, 0, this.endss_, this.stride)), this.orientedRevision_ = this.getRevision(); } return this.orientedFlatCoordinates_; }, e.prototype.getSimplifiedGeometryInternal = function(t) { var n = [], i = []; return n.length = wqe(this.flatCoordinates, 0, this.endss_, this.stride, Math.sqrt(t), n, 0, i), new e(n, li.XY, i); }, e.prototype.getPolygon = function(t) { if (t < 0 || this.endss_.length <= t) return null; var n; if (t === 0) n = 0; else { var i = this.endss_[t - 1]; n = i[i.length - 1]; } var a = this.endss_[t].slice(), o = a[a.length - 1]; if (n !== 0) for (var s = 0, u = a.length; s < u; ++s) a[s] -= n; return new j1(this.flatCoordinates.slice(n, o), this.layout, a); }, e.prototype.getPolygons = function() { for (var t = this.layout, n = this.flatCoordinates, i = this.endss_, a = [], o = 0, s = 0, u = i.length; s < u; ++s) { var l = i[s].slice(), c = l[l.length - 1]; if (o !== 0) for (var f = 0, h = l.length; f < h; ++f) l[f] -= o; var p = new j1(n.slice(o, c), t, l); a.push(p), o = c; } return a; }, e.prototype.getType = function() { return Ee.MULTI_POLYGON; }, e.prototype.intersectsExtent = function(t) { return cJe(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, t); }, e.prototype.setCoordinates = function(t, n) { this.setLayout(n, t, 3), this.flatCoordinates || (this.flatCoordinates = []); var i = QKe(this.flatCoordinates, 0, t, this.stride, this.endss_); if (i.length === 0) this.flatCoordinates.length = 0; else { var a = i[i.length - 1]; this.flatCoordinates.length = a.length === 0 ? 0 : a[a.length - 1]; } this.changed(); }, e; }(Kh); const aQe = iQe; var oQe = function() { function r(e) { this.rbush_ = new IO(e), this.items_ = {}; } return r.prototype.insert = function(e, t) { var n = { minX: e[0], minY: e[1], maxX: e[2], maxY: e[3], value: t }; this.rbush_.insert(n), this.items_[Ft(t)] = n; }, r.prototype.load = function(e, t) { for (var n = new Array(t.length), i = 0, a = t.length; i < a; i++) { var o = e[i], s = t[i], u = { minX: o[0], minY: o[1], maxX: o[2], maxY: o[3], value: s }; n[i] = u, this.items_[Ft(s)] = u; } this.rbush_.load(n); }, r.prototype.remove = function(e) { var t = Ft(e), n = this.items_[t]; return delete this.items_[t], this.rbush_.remove(n) !== null; }, r.prototype.update = function(e, t) { var n = this.items_[Ft(t)], i = [n.minX, n.minY, n.maxX, n.maxY]; Yd(i, e) || (this.remove(t), this.insert(e, t)); }, r.prototype.getAll = function() { var e = this.rbush_.all(); return e.map(function(t) { return t.value; }); }, r.prototype.getInExtent = function(e) { var t = { minX: e[0], minY: e[1], maxX: e[2], maxY: e[3] }, n = this.rbush_.search(t); return n.map(function(i) { return i.value; }); }, r.prototype.forEach = function(e) { return this.forEach_(this.getAll(), e); }, r.prototype.forEachInExtent = function(e, t) { return this.forEach_(this.getInExtent(e), t); }, r.prototype.forEach_ = function(e, t) { for (var n, i = 0, a = e.length; i < a; i++) if (n = t(e[i]), n) return n; return n; }, r.prototype.isEmpty = function() { return F1(this.items_); }, r.prototype.clear = function() { this.rbush_.clear(), this.items_ = {}; }, r.prototype.getExtent = function(e) { var t = this.rbush_.toJSON(); return jd(t.minX, t.minY, t.maxX, t.maxY, e); }, r.prototype.concat = function(e) { this.rbush_.load(e.rbush_.all()); for (var t in e.items_) this.items_[t] = e.items_[t]; }, r; }(); const $$ = oQe; var sQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), uQe = function(r) { sQe(e, r); function e(t) { var n = r.call(this) || this; n.projection = ff(t.projection), n.attributions_ = H$(t.attributions), n.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, n.loading = !1, n.state_ = t.state !== void 0 ? t.state : qd.READY, n.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, n.interpolate_ = !!t.interpolate, n.viewResolver = null, n.viewRejector = null; var i = n; return n.viewPromise_ = new Promise(function(a, o) { i.viewResolver = a, i.viewRejector = o; }), n; } return e.prototype.getAttributions = function() { return this.attributions_; }, e.prototype.getAttributionsCollapsible = function() { return this.attributionsCollapsible_; }, e.prototype.getProjection = function() { return this.projection; }, e.prototype.getResolutions = function() { return Mr(); }, e.prototype.getView = function() { return this.viewPromise_; }, e.prototype.getState = function() { return this.state_; }, e.prototype.getWrapX = function() { return this.wrapX_; }, e.prototype.getInterpolate = function() { return this.interpolate_; }, e.prototype.refresh = function() { this.changed(); }, e.prototype.setAttributions = function(t) { this.attributions_ = H$(t), this.changed(); }, e.prototype.setState = function(t) { this.state_ = t, this.changed(); }, e; }(Ps); function H$(r) { return r ? Array.isArray(r) ? function(e) { return r; } : typeof r == "function" ? r : function(e) { return [r]; } : null; } const lQe = uQe; function cQe(r, e) { return [[-1 / 0, -1 / 0, 1 / 0, 1 / 0]]; } var fQe = !1; function hQe(r, e, t, n, i, a, o) { var s = new XMLHttpRequest(); s.open("GET", typeof r == "function" ? r(t, n, i) : r, !0), e.getType() == A0.ARRAY_BUFFER && (s.responseType = "arraybuffer"), s.withCredentials = fQe, s.onload = function(u) { if (!s.status || s.status >= 200 && s.status < 300) { var l = e.getType(), c = void 0; l == A0.JSON || l == A0.TEXT ? c = s.responseText : l == A0.XML ? (c = s.responseXML, c || (c = new DOMParser().parseFromString(s.responseText, "application/xml"))) : l == A0.ARRAY_BUFFER && (c = s.response), c ? a( e.readFeatures(c, { extent: t, featureProjection: i }), e.readProjection(c) ) : o(); } else o(); }, s.onerror = o, s.send(); } function U$(r, e) { return function(t, n, i, a, o) { var s = this; hQe( r, e, t, n, i, function(u, l) { s.addFeatures(u), a !== void 0 && a(u); }, o || Xd ); }; } var cne = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Bf = function(r) { cne(e, r); function e(t, n, i) { var a = r.call(this, t) || this; return a.feature = n, a.features = i, a; } return e; }(xf), pQe = function(r) { cne(e, r); function e(t) { var n = this, i = t || {}; n = r.call(this, { attributions: i.attributions, interpolate: !0, projection: void 0, state: qd.READY, wrapX: i.wrapX !== void 0 ? i.wrapX : !0 }) || this, n.on, n.once, n.un, n.loader_ = Xd, n.format_ = i.format, n.overlaps_ = i.overlaps === void 0 ? !0 : i.overlaps, n.url_ = i.url, i.loader !== void 0 ? n.loader_ = i.loader : n.url_ !== void 0 && (cn(n.format_, 7), n.loader_ = U$( n.url_, n.format_ )), n.strategy_ = i.strategy !== void 0 ? i.strategy : cQe; var a = i.useSpatialIndex !== void 0 ? i.useSpatialIndex : !0; n.featuresRtree_ = a ? new $$() : null, n.loadedExtentsRtree_ = new $$(), n.loadingExtentsCount_ = 0, n.nullGeometryFeatures_ = {}, n.idIndex_ = {}, n.uidIndex_ = {}, n.featureChangeKeys_ = {}, n.featuresCollection_ = null; var o, s; return Array.isArray(i.features) ? s = i.features : i.features && (o = i.features, s = o.getArray()), !a && o === void 0 && (o = new Qs(s)), s !== void 0 && n.addFeaturesInternal(s), o !== void 0 && n.bindFeaturesCollection_(o), n; } return e.prototype.addFeature = function(t) { this.addFeatureInternal(t), this.changed(); }, e.prototype.addFeatureInternal = function(t) { var n = Ft(t); if (!this.addToIndex_(n, t)) { this.featuresCollection_ && this.featuresCollection_.remove(t); return; } this.setupChangeEvents_(n, t); var i = t.getGeometry(); if (i) { var a = i.getExtent(); this.featuresRtree_ && this.featuresRtree_.insert(a, t); } else this.nullGeometryFeatures_[n] = t; this.dispatchEvent(new Bf(ao.ADDFEATURE, t)); }, e.prototype.setupChangeEvents_ = function(t, n) { this.featureChangeKeys_[t] = [ Bt(n, Ot.CHANGE, this.handleFeatureChange_, this), Bt(n, Wm.PROPERTYCHANGE, this.handleFeatureChange_, this) ]; }, e.prototype.addToIndex_ = function(t, n) { var i = !0, a = n.getId(); return a !== void 0 && (a.toString() in this.idIndex_ ? i = !1 : this.idIndex_[a.toString()] = n), i && (cn(!(t in this.uidIndex_), 30), this.uidIndex_[t] = n), i; }, e.prototype.addFeatures = function(t) { this.addFeaturesInternal(t), this.changed(); }, e.prototype.addFeaturesInternal = function(t) { for (var n = [], i = [], a = [], o = 0, s = t.length; o < s; o++) { var u = t[o], l = Ft(u); this.addToIndex_(l, u) && i.push(u); } for (var o = 0, c = i.length; o < c; o++) { var u = i[o], l = Ft(u); this.setupChangeEvents_(l, u); var f = u.getGeometry(); if (f) { var h = f.getExtent(); n.push(h), a.push(u); } else this.nullGeometryFeatures_[l] = u; } if (this.featuresRtree_ && this.featuresRtree_.load(n, a), this.hasListener(ao.ADDFEATURE)) for (var o = 0, p = i.length; o < p; o++) this.dispatchEvent(new Bf(ao.ADDFEATURE, i[o])); }, e.prototype.bindFeaturesCollection_ = function(t) { var n = !1; this.addEventListener( ao.ADDFEATURE, function(i) { n || (n = !0, t.push(i.feature), n = !1); } ), this.addEventListener( ao.REMOVEFEATURE, function(i) { n || (n = !0, t.remove(i.feature), n = !1); } ), t.addEventListener( Lo.ADD, function(i) { n || (n = !0, this.addFeature( i.element ), n = !1); }.bind(this) ), t.addEventListener( Lo.REMOVE, function(i) { n || (n = !0, this.removeFeature( i.element ), n = !1); }.bind(this) ), this.featuresCollection_ = t; }, e.prototype.clear = function(t) { if (t) { for (var n in this.featureChangeKeys_) { var i = this.featureChangeKeys_[n]; i.forEach(pn); } this.featuresCollection_ || (this.featureChangeKeys_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}); } else if (this.featuresRtree_) { var a = function(u) { this.removeFeatureInternal(u); }.bind(this); this.featuresRtree_.forEach(a); for (var o in this.nullGeometryFeatures_) this.removeFeatureInternal(this.nullGeometryFeatures_[o]); } this.featuresCollection_ && this.featuresCollection_.clear(), this.featuresRtree_ && this.featuresRtree_.clear(), this.nullGeometryFeatures_ = {}; var s = new Bf(ao.CLEAR); this.dispatchEvent(s), this.changed(); }, e.prototype.forEachFeature = function(t) { if (this.featuresRtree_) return this.featuresRtree_.forEach(t); this.featuresCollection_ && this.featuresCollection_.forEach(t); }, e.prototype.forEachFeatureAtCoordinateDirect = function(t, n) { var i = [t[0], t[1], t[0], t[1]]; return this.forEachFeatureInExtent(i, function(a) { var o = a.getGeometry(); if (o.intersectsCoordinate(t)) return n(a); }); }, e.prototype.forEachFeatureInExtent = function(t, n) { if (this.featuresRtree_) return this.featuresRtree_.forEachInExtent(t, n); this.featuresCollection_ && this.featuresCollection_.forEach(n); }, e.prototype.forEachFeatureIntersectingExtent = function(t, n) { return this.forEachFeatureInExtent( t, function(i) { var a = i.getGeometry(); if (a.intersectsExtent(t)) { var o = n(i); if (o) return o; } } ); }, e.prototype.getFeaturesCollection = function() { return this.featuresCollection_; }, e.prototype.getFeatures = function() { var t; return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), F1(this.nullGeometryFeatures_) || zc(t, rre(this.nullGeometryFeatures_))), t; }, e.prototype.getFeaturesAtCoordinate = function(t) { var n = []; return this.forEachFeatureAtCoordinateDirect(t, function(i) { n.push(i); }), n; }, e.prototype.getFeaturesInExtent = function(t) { return this.featuresRtree_ ? this.featuresRtree_.getInExtent(t) : this.featuresCollection_ ? this.featuresCollection_.getArray().slice(0) : []; }, e.prototype.getClosestFeatureToCoordinate = function(t, n) { var i = t[0], a = t[1], o = null, s = [NaN, NaN], u = 1 / 0, l = [-1 / 0, -1 / 0, 1 / 0, 1 / 0], c = n || hd; return this.featuresRtree_.forEachInExtent( l, function(f) { if (c(f)) { var h = f.getGeometry(), p = u; if (u = h.closestPointXY(i, a, s, u), u < p) { o = f; var d = Math.sqrt(u); l[0] = i - d, l[1] = a - d, l[2] = i + d, l[3] = a + d; } } } ), o; }, e.prototype.getExtent = function(t) { return this.featuresRtree_.getExtent(t); }, e.prototype.getFeatureById = function(t) { var n = this.idIndex_[t.toString()]; return n !== void 0 ? n : null; }, e.prototype.getFeatureByUid = function(t) { var n = this.uidIndex_[t]; return n !== void 0 ? n : null; }, e.prototype.getFormat = function() { return this.format_; }, e.prototype.getOverlaps = function() { return this.overlaps_; }, e.prototype.getUrl = function() { return this.url_; }, e.prototype.handleFeatureChange_ = function(t) { var n = t.target, i = Ft(n), a = n.getGeometry(); if (!a) i in this.nullGeometryFeatures_ || (this.featuresRtree_ && this.featuresRtree_.remove(n), this.nullGeometryFeatures_[i] = n); else { var o = a.getExtent(); i in this.nullGeometryFeatures_ ? (delete this.nullGeometryFeatures_[i], this.featuresRtree_ && this.featuresRtree_.insert(o, n)) : this.featuresRtree_ && this.featuresRtree_.update(o, n); } var s = n.getId(); if (s !== void 0) { var u = s.toString(); this.idIndex_[u] !== n && (this.removeFromIdIndex_(n), this.idIndex_[u] = n); } else this.removeFromIdIndex_(n), this.uidIndex_[i] = n; this.changed(), this.dispatchEvent(new Bf(ao.CHANGEFEATURE, n)); }, e.prototype.hasFeature = function(t) { var n = t.getId(); return n !== void 0 ? n in this.idIndex_ : Ft(t) in this.uidIndex_; }, e.prototype.isEmpty = function() { return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && F1(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; }, e.prototype.loadFeatures = function(t, n, i) { for (var a = this.loadedExtentsRtree_, o = this.strategy_(t, n, i), s = function(f, h) { var p = o[f], d = a.forEachInExtent( p, function(v) { return Lc(v.extent, p); } ); d || (++u.loadingExtentsCount_, u.dispatchEvent(new Bf(ao.FEATURESLOADSTART)), u.loader_.call(u, p, n, i, function(v) { --this.loadingExtentsCount_, this.dispatchEvent(new Bf(ao.FEATURESLOADEND, void 0, v)); }.bind(u), function() { --this.loadingExtentsCount_, this.dispatchEvent(new Bf(ao.FEATURESLOADERROR)); }.bind(u)), a.insert(p, { extent: p.slice() })); }, u = this, l = 0, c = o.length; l < c; ++l) s(l); this.loading = this.loader_.length < 4 ? !1 : this.loadingExtentsCount_ > 0; }, e.prototype.refresh = function() { this.clear(!0), this.loadedExtentsRtree_.clear(), r.prototype.refresh.call(this); }, e.prototype.removeLoadedExtent = function(t) { var n = this.loadedExtentsRtree_, i; n.forEachInExtent(t, function(a) { if (Yd(a.extent, t)) return i = a, !0; }), i && n.remove(i); }, e.prototype.removeFeature = function(t) { if (!!t) { var n = Ft(t); n in this.nullGeometryFeatures_ ? delete this.nullGeometryFeatures_[n] : this.featuresRtree_ && this.featuresRtree_.remove(t); var i = this.removeFeatureInternal(t); i && this.changed(); } }, e.prototype.removeFeatureInternal = function(t) { var n = Ft(t), i = this.featureChangeKeys_[n]; if (!!i) { i.forEach(pn), delete this.featureChangeKeys_[n]; var a = t.getId(); return a !== void 0 && delete this.idIndex_[a.toString()], delete this.uidIndex_[n], this.dispatchEvent(new Bf(ao.REMOVEFEATURE, t)), t; } }, e.prototype.removeFromIdIndex_ = function(t) { var n = !1; for (var i in this.idIndex_) if (this.idIndex_[i] === t) { delete this.idIndex_[i], n = !0; break; } return n; }, e.prototype.setLoader = function(t) { this.loader_ = t; }, e.prototype.setUrl = function(t) { cn(this.format_, 7), this.url_ = t, this.setLoader(U$(t, this.format_)); }, e; }(lQe); const c3 = pQe; var fne = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), kr = { POINT: "Point", LINE_STRING: "LineString", POLYGON: "Polygon", CIRCLE: "Circle" }, HC = { DRAWSTART: "drawstart", DRAWEND: "drawend", DRAWABORT: "drawabort" }, UC = function(r) { fne(e, r); function e(t, n) { var i = r.call(this, t) || this; return i.feature = n, i; } return e; }(xf), dQe = function(r) { fne(e, r); function e(t) { var n = this, i = t; i.stopDown || (i.stopDown = Jw), n = r.call(this, i) || this, n.on, n.once, n.un, n.shouldHandle_ = !1, n.downPx_ = null, n.downTimeout_, n.lastDragTime_, n.pointerType_, n.freehand_ = !1, n.source_ = t.source ? t.source : null, n.features_ = t.features ? t.features : null, n.snapTolerance_ = t.snapTolerance ? t.snapTolerance : 12, n.type_ = t.type, n.mode_ = gQe(n.type_), n.stopClick_ = !!t.stopClick, n.minPoints_ = t.minPoints ? t.minPoints : n.mode_ === kr.POLYGON ? 3 : 2, n.maxPoints_ = n.mode_ === kr.CIRCLE ? 2 : t.maxPoints ? t.maxPoints : 1 / 0, n.finishCondition_ = t.finishCondition ? t.finishCondition : hd; var a = t.geometryFunction; if (!a) { var o = n.mode_; if (o === kr.CIRCLE) a = function(u, l, c) { var f = l || new GJe([NaN, NaN]), h = Mu(u[0]), p = gYe(h, Mu(u[u.length - 1])); return f.setCenterAndRadius(h, Math.sqrt(p)), f; }; else { var s; o === kr.POINT ? s = dd : o === kr.LINE_STRING ? s = mh : o === kr.POLYGON && (s = j1), a = function(u, l, c) { return l ? o === kr.POLYGON ? u[0].length ? l.setCoordinates([ u[0].concat([u[0][0]]) ]) : l.setCoordinates([]) : l.setCoordinates(u) : l = new s(u), l; }; } } return n.geometryFunction_ = a, n.dragVertexDelay_ = t.dragVertexDelay !== void 0 ? t.dragVertexDelay : 500, n.finishCoordinate_ = null, n.sketchFeature_ = null, n.sketchPoint_ = null, n.sketchCoords_ = null, n.sketchLine_ = null, n.sketchLineCoords_ = null, n.squaredClickTolerance_ = t.clickTolerance ? t.clickTolerance * t.clickTolerance : 36, n.overlay_ = new EP({ source: new c3({ useSpatialIndex: !1, wrapX: t.wrapX ? t.wrapX : !1 }), style: t.style ? t.style : vQe(), updateWhileInteracting: !0 }), n.geometryName_ = t.geometryName, n.condition_ = t.condition ? t.condition : r3, n.freehandCondition_, t.freehand ? n.freehandCondition_ = Xre : n.freehandCondition_ = t.freehandCondition ? t.freehandCondition : Zre, n.addChangeListener(hO.ACTIVE, n.updateState_), n; } return e.prototype.setMap = function(t) { r.prototype.setMap.call(this, t), this.updateState_(); }, e.prototype.getOverlay = function() { return this.overlay_; }, e.prototype.handleEvent = function(t) { t.originalEvent.type === Ot.CONTEXTMENU && t.originalEvent.preventDefault(), this.freehand_ = this.mode_ !== kr.POINT && this.freehandCondition_(t); var n = t.type === Vr.POINTERMOVE, i = !0; if (!this.freehand_ && this.lastDragTime_ && t.type === Vr.POINTERDRAG) { var a = Date.now(); a - this.lastDragTime_ >= this.dragVertexDelay_ ? (this.downPx_ = t.pixel, this.shouldHandle_ = !this.freehand_, n = !0) : this.lastDragTime_ = void 0, this.shouldHandle_ && this.downTimeout_ !== void 0 && (clearTimeout(this.downTimeout_), this.downTimeout_ = void 0); } return this.freehand_ && t.type === Vr.POINTERDRAG && this.sketchFeature_ !== null ? (this.addToDrawing_(t.coordinate), i = !1) : this.freehand_ && t.type === Vr.POINTERDOWN ? i = !1 : n && this.getPointerCount() < 2 ? (i = t.type === Vr.POINTERMOVE, i && this.freehand_ ? (this.handlePointerMove_(t), this.shouldHandle_ && t.originalEvent.preventDefault()) : (t.originalEvent.pointerType === "mouse" || t.type === Vr.POINTERDRAG && this.downTimeout_ === void 0) && this.handlePointerMove_(t)) : t.type === Vr.DBLCLICK && (i = !1), r.prototype.handleEvent.call(this, t) && i; }, e.prototype.handleDownEvent = function(t) { return this.shouldHandle_ = !this.freehand_, this.freehand_ ? (this.downPx_ = t.pixel, this.finishCoordinate_ || this.startDrawing_(t.coordinate), !0) : this.condition_(t) ? (this.lastDragTime_ = Date.now(), this.downTimeout_ = setTimeout(function() { this.handlePointerMove_(new wc(Vr.POINTERMOVE, t.map, t.originalEvent, !1, t.frameState)); }.bind(this), this.dragVertexDelay_), this.downPx_ = t.pixel, !0) : (this.lastDragTime_ = void 0, !1); }, e.prototype.handleUpEvent = function(t) { var n = !0; if (this.getPointerCount() === 0) if (this.downTimeout_ && (clearTimeout(this.downTimeout_), this.downTimeout_ = void 0), this.handlePointerMove_(t), this.shouldHandle_) { var i = !this.finishCoordinate_; i && this.startDrawing_(t.coordinate), !i && this.freehand_ ? this.finishDrawing() : !this.freehand_ && (!i || this.mode_ === kr.POINT) && (this.atFinish_(t.pixel) ? this.finishCondition_(t) && this.finishDrawing() : this.addToDrawing_(t.coordinate)), n = !1; } else this.freehand_ && this.abortDrawing(); return !n && this.stopClick_ && t.preventDefault(), n; }, e.prototype.handlePointerMove_ = function(t) { if (this.pointerType_ = t.originalEvent.pointerType, this.downPx_ && (!this.freehand_ && this.shouldHandle_ || this.freehand_ && !this.shouldHandle_)) { var n = this.downPx_, i = t.pixel, a = n[0] - i[0], o = n[1] - i[1], s = a * a + o * o; if (this.shouldHandle_ = this.freehand_ ? s > this.squaredClickTolerance_ : s <= this.squaredClickTolerance_, !this.shouldHandle_) return; } this.finishCoordinate_ ? this.modifyDrawing_(t.coordinate) : this.createOrUpdateSketchPoint_(t.coordinate.slice()); }, e.prototype.atFinish_ = function(t) { var n = !1; if (this.sketchFeature_) { var i = !1, a = [this.finishCoordinate_], o = this.mode_; if (o === kr.POINT) n = !0; else if (o === kr.CIRCLE) n = this.sketchCoords_.length === 2; else if (o === kr.LINE_STRING) i = this.sketchCoords_.length > this.minPoints_; else if (o === kr.POLYGON) { var s = this.sketchCoords_; i = s[0].length > this.minPoints_, a = [ s[0][0], s[0][s[0].length - 2] ]; } if (i) for (var u = this.getMap(), l = 0, c = a.length; l < c; l++) { var f = a[l], h = u.getPixelFromCoordinate(f), p = t[0] - h[0], d = t[1] - h[1], v = this.freehand_ ? 1 : this.snapTolerance_; if (n = Math.sqrt(p * p + d * d) <= v, n) { this.finishCoordinate_ = f; break; } } } return n; }, e.prototype.createOrUpdateSketchPoint_ = function(t) { if (!this.sketchPoint_) this.sketchPoint_ = new Cc(new dd(t)), this.updateSketchFeatures_(); else { var n = this.sketchPoint_.getGeometry(); n.setCoordinates(t); } }, e.prototype.createOrUpdateCustomSketchLine_ = function(t) { this.sketchLine_ || (this.sketchLine_ = new Cc()); var n = t.getLinearRing(0), i = this.sketchLine_.getGeometry(); i ? (i.setFlatCoordinates(n.getLayout(), n.getFlatCoordinates()), i.changed()) : (i = new mh(n.getFlatCoordinates(), n.getLayout()), this.sketchLine_.setGeometry(i)); }, e.prototype.startDrawing_ = function(t) { var n = this.getMap().getView().getProjection(); this.finishCoordinate_ = t, this.mode_ === kr.POINT ? this.sketchCoords_ = t.slice() : this.mode_ === kr.POLYGON ? (this.sketchCoords_ = [[t.slice(), t.slice()]], this.sketchLineCoords_ = this.sketchCoords_[0]) : this.sketchCoords_ = [t.slice(), t.slice()], this.sketchLineCoords_ && (this.sketchLine_ = new Cc(new mh(this.sketchLineCoords_))); var i = this.geometryFunction_(this.sketchCoords_, void 0, n); this.sketchFeature_ = new Cc(), this.geometryName_ && this.sketchFeature_.setGeometryName(this.geometryName_), this.sketchFeature_.setGeometry(i), this.updateSketchFeatures_(), this.dispatchEvent(new UC(HC.DRAWSTART, this.sketchFeature_)); }, e.prototype.modifyDrawing_ = function(t) { var n = this.getMap(), i = this.sketchFeature_.getGeometry(), a = n.getView().getProjection(), o, s; if (this.mode_ === kr.POINT ? s = this.sketchCoords_ : this.mode_ === kr.POLYGON ? (o = this.sketchCoords_[0], s = o[o.length - 1], this.atFinish_(n.getPixelFromCoordinate(t)) && (t = this.finishCoordinate_.slice())) : (o = this.sketchCoords_, s = o[o.length - 1]), s[0] = t[0], s[1] = t[1], this.geometryFunction_( this.sketchCoords_, i, a ), this.sketchPoint_) { var u = this.sketchPoint_.getGeometry(); u.setCoordinates(t); } if (i.getType() === Ee.POLYGON && this.mode_ !== kr.POLYGON) this.createOrUpdateCustomSketchLine_(i); else if (this.sketchLineCoords_) { var l = this.sketchLine_.getGeometry(); l.setCoordinates(this.sketchLineCoords_); } this.updateSketchFeatures_(); }, e.prototype.addToDrawing_ = function(t) { var n = this.sketchFeature_.getGeometry(), i = this.getMap().getView().getProjection(), a, o, s = this.mode_; s === kr.LINE_STRING || s === kr.CIRCLE ? (this.finishCoordinate_ = t.slice(), o = this.sketchCoords_, o.length >= this.maxPoints_ && (this.freehand_ ? o.pop() : a = !0), o.push(t.slice()), this.geometryFunction_(o, n, i)) : s === kr.POLYGON && (o = this.sketchCoords_[0], o.length >= this.maxPoints_ && (this.freehand_ ? o.pop() : a = !0), o.push(t.slice()), a && (this.finishCoordinate_ = o[0]), this.geometryFunction_(this.sketchCoords_, n, i)), this.createOrUpdateSketchPoint_(t.slice()), this.updateSketchFeatures_(), a && this.finishDrawing(); }, e.prototype.removeLastPoint = function() { if (!!this.sketchFeature_) { var t = this.sketchFeature_.getGeometry(), n = this.getMap().getView().getProjection(), i, a = this.mode_; if (a === kr.LINE_STRING || a === kr.CIRCLE) { if (i = this.sketchCoords_, i.splice(-2, 1), i.length >= 2) { this.finishCoordinate_ = i[i.length - 2].slice(); var o = this.finishCoordinate_.slice(); i[i.length - 1] = o, this.createOrUpdateSketchPoint_(o); } this.geometryFunction_(i, t, n), t.getType() === Ee.POLYGON && this.sketchLine_ && this.createOrUpdateCustomSketchLine_(t); } else if (a === kr.POLYGON) { i = this.sketchCoords_[0], i.splice(-2, 1); var s = this.sketchLine_.getGeometry(); if (i.length >= 2) { var o = i[i.length - 2].slice(); i[i.length - 1] = o, this.createOrUpdateSketchPoint_(o); } s.setCoordinates(i), this.geometryFunction_(this.sketchCoords_, t, n); } i.length === 1 && this.abortDrawing(), this.updateSketchFeatures_(); } }, e.prototype.finishDrawing = function() { var t = this.abortDrawing_(); if (!!t) { var n = this.sketchCoords_, i = t.getGeometry(), a = this.getMap().getView().getProjection(); this.mode_ === kr.LINE_STRING ? (n.pop(), this.geometryFunction_(n, i, a)) : this.mode_ === kr.POLYGON && (n[0].pop(), this.geometryFunction_(n, i, a), n = i.getCoordinates()), this.type_ === Ee.MULTI_POINT ? t.setGeometry(new lne([n])) : this.type_ === Ee.MULTI_LINE_STRING ? t.setGeometry(new QJe([n])) : this.type_ === Ee.MULTI_POLYGON && t.setGeometry(new aQe([n])), this.dispatchEvent(new UC(HC.DRAWEND, t)), this.features_ && this.features_.push(t), this.source_ && this.source_.addFeature(t); } }, e.prototype.abortDrawing_ = function() { this.finishCoordinate_ = null; var t = this.sketchFeature_; return this.sketchFeature_ = null, this.sketchPoint_ = null, this.sketchLine_ = null, this.overlay_.getSource().clear(!0), t; }, e.prototype.abortDrawing = function() { var t = this.abortDrawing_(); t && this.dispatchEvent(new UC(HC.DRAWABORT, t)); }, e.prototype.appendCoordinates = function(t) { var n = this.mode_, i = !this.sketchFeature_; i && this.startDrawing_(t[0]); var a; if (n === kr.LINE_STRING || n === kr.CIRCLE) a = this.sketchCoords_; else if (n === kr.POLYGON) a = this.sketchCoords_ && this.sketchCoords_.length ? this.sketchCoords_[0] : []; else return; i && a.shift(), a.pop(); for (var o = 0; o < t.length; o++) this.addToDrawing_(t[o]); var s = t[t.length - 1]; this.addToDrawing_(s), this.modifyDrawing_(s); }, e.prototype.extend = function(t) { var n = t.getGeometry(), i = n; this.sketchFeature_ = t, this.sketchCoords_ = i.getCoordinates(); var a = this.sketchCoords_[this.sketchCoords_.length - 1]; this.finishCoordinate_ = a.slice(), this.sketchCoords_.push(a.slice()), this.sketchPoint_ = new Cc(new dd(a)), this.updateSketchFeatures_(), this.dispatchEvent(new UC(HC.DRAWSTART, this.sketchFeature_)); }, e.prototype.updateSketchFeatures_ = function() { var t = []; this.sketchFeature_ && t.push(this.sketchFeature_), this.sketchLine_ && t.push(this.sketchLine_), this.sketchPoint_ && t.push(this.sketchPoint_); var n = this.overlay_.getSource(); n.clear(!0), n.addFeatures(t); }, e.prototype.updateState_ = function() { var t = this.getMap(), n = this.getActive(); (!t || !n) && this.abortDrawing(), this.overlay_.setMap(n ? t : null); }, e; }(Hy); function vQe() { var r = oqe(); return function(e, t) { return r[e.getGeometry().getType()]; }; } function gQe(r) { switch (r) { case Ee.POINT: case Ee.MULTI_POINT: return kr.POINT; case Ee.LINE_STRING: case Ee.MULTI_LINE_STRING: return kr.LINE_STRING; case Ee.POLYGON: case Ee.MULTI_POLYGON: return kr.POLYGON; case Ee.CIRCLE: return kr.CIRCLE; default: throw new Error("Invalid type: " + r); } } const mQe = dQe; function yQe(r) { var e = r || {}, t = new Qs(), n = new AJe(-5e-3, 0.05, 100), i = e.altShiftDragRotate !== void 0 ? e.altShiftDragRotate : !0; i && t.push(new ZKe()); var a = e.doubleClickZoom !== void 0 ? e.doubleClickZoom : !0; a && t.push(new FKe({ delta: e.zoomDelta, duration: e.zoomDuration })); var o = e.dragPan !== void 0 ? e.dragPan : !0; o && t.push(new WKe({ onFocusOnly: e.onFocusOnly, kinetic: n })); var s = e.pinchRotate !== void 0 ? e.pinchRotate : !0; s && t.push(new NJe()); var u = e.pinchZoom !== void 0 ? e.pinchZoom : !0; u && t.push(new kJe({ duration: e.zoomDuration })); var l = e.keyboard !== void 0 ? e.keyboard : !0; l && (t.push(new EJe()), t.push(new PJe({ delta: e.zoomDelta, duration: e.zoomDuration }))); var c = e.mouseWheelZoom !== void 0 ? e.mouseWheelZoom : !0; c && t.push(new MJe({ onFocusOnly: e.onFocusOnly, duration: e.zoomDuration })); var f = e.shiftDragZoom !== void 0 ? e.shiftDragZoom : !0; return f && t.push(new xJe({ duration: e.zoomDuration })), t; } var _Qe = 256, Pb = 1 / 0, wQe = function() { function r(e, t) { this.priorityFunction_ = e, this.keyFunction_ = t, this.elements_ = [], this.priorities_ = [], this.queuedElements_ = {}; } return r.prototype.clear = function() { this.elements_.length = 0, this.priorities_.length = 0, By(this.queuedElements_); }, r.prototype.dequeue = function() { var e = this.elements_, t = this.priorities_, n = e[0]; e.length == 1 ? (e.length = 0, t.length = 0) : (e[0] = e.pop(), t[0] = t.pop(), this.siftUp_(0)); var i = this.keyFunction_(n); return delete this.queuedElements_[i], n; }, r.prototype.enqueue = function(e) { cn(!(this.keyFunction_(e) in this.queuedElements_), 31); var t = this.priorityFunction_(e); return t != Pb ? (this.elements_.push(e), this.priorities_.push(t), this.queuedElements_[this.keyFunction_(e)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; }, r.prototype.getCount = function() { return this.elements_.length; }, r.prototype.getLeftChildIndex_ = function(e) { return e * 2 + 1; }, r.prototype.getRightChildIndex_ = function(e) { return e * 2 + 2; }, r.prototype.getParentIndex_ = function(e) { return e - 1 >> 1; }, r.prototype.heapify_ = function() { var e; for (e = (this.elements_.length >> 1) - 1; e >= 0; e--) this.siftUp_(e); }, r.prototype.isEmpty = function() { return this.elements_.length === 0; }, r.prototype.isKeyQueued = function(e) { return e in this.queuedElements_; }, r.prototype.isQueued = function(e) { return this.isKeyQueued(this.keyFunction_(e)); }, r.prototype.siftUp_ = function(e) { for (var t = this.elements_, n = this.priorities_, i = t.length, a = t[e], o = n[e], s = e; e < i >> 1; ) { var u = this.getLeftChildIndex_(e), l = this.getRightChildIndex_(e), c = l < i && n[l] < n[u] ? l : u; t[e] = t[c], n[e] = n[c], e = c; } t[e] = a, n[e] = o, this.siftDown_(s, e); }, r.prototype.siftDown_ = function(e, t) { for (var n = this.elements_, i = this.priorities_, a = n[t], o = i[t]; t > e; ) { var s = this.getParentIndex_(t); if (i[s] > o) n[t] = n[s], i[t] = i[s], t = s; else break; } n[t] = a, i[t] = o; }, r.prototype.reprioritize = function() { var e = this.priorityFunction_, t = this.elements_, n = this.priorities_, i = 0, a = t.length, o, s, u; for (s = 0; s < a; ++s) o = t[s], u = e(o), u == Pb ? delete this.queuedElements_[this.keyFunction_(o)] : (n[i] = u, t[i++] = o); t.length = i, n.length = i, this.heapify_(); }, r; }(); const xQe = wQe; var CQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), SQe = function(r) { CQe(e, r); function e(t, n) { var i = r.call( this, function(a) { return t.apply(null, a); }, function(a) { return a[0].getKey(); } ) || this; return i.boundHandleTileChange_ = i.handleTileChange.bind(i), i.tileChangeCallback_ = n, i.tilesLoading_ = 0, i.tilesLoadingKeys_ = {}, i; } return e.prototype.enqueue = function(t) { var n = r.prototype.enqueue.call(this, t); if (n) { var i = t[0]; i.addEventListener(Ot.CHANGE, this.boundHandleTileChange_); } return n; }, e.prototype.getTilesLoading = function() { return this.tilesLoading_; }, e.prototype.handleTileChange = function(t) { var n = t.target, i = n.getState(); if (i === It.LOADED || i === It.ERROR || i === It.EMPTY) { n.removeEventListener(Ot.CHANGE, this.boundHandleTileChange_); var a = n.getKey(); a in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[a], --this.tilesLoading_), this.tileChangeCallback_(); } }, e.prototype.loadMoreTiles = function(t, n) { for (var i = 0, a, o, s; this.tilesLoading_ < t && i < n && this.getCount() > 0; ) o = this.dequeue()[0], s = o.getKey(), a = o.getState(), a === It.IDLE && !(s in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[s] = !0, ++this.tilesLoading_, ++i, o.load()); }, e; }(xQe); const EQe = SQe; function bQe(r, e, t, n, i) { if (!r || !(t in r.wantedTiles) || !r.wantedTiles[t][e.getKey()]) return Pb; var a = r.viewState.center, o = n[0] - a[0], s = n[1] - a[1]; return 65536 * Math.log(i) + Math.sqrt(o * o + s * s) / i; } var hne = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Wf = function(r) { hne(e, r); function e(t, n) { var i = r.call(this, t) || this; return i.layer = n, i; } return e; }(xf), tD = { LAYERS: "layers" }, TQe = function(r) { hne(e, r); function e(t) { var n = this, i = t || {}, a = jn({}, i); delete a.layers; var o = i.layers; return n = r.call(this, a) || this, n.on, n.once, n.un, n.layersListenerKeys_ = [], n.listenerKeys_ = {}, n.addChangeListener(tD.LAYERS, n.handleLayersChanged_), o ? Array.isArray(o) ? o = new Qs(o.slice(), { unique: !0 }) : cn(typeof o.getArray == "function", 43) : o = new Qs(void 0, { unique: !0 }), n.setLayers(o), n; } return e.prototype.handleLayerChange_ = function() { this.changed(); }, e.prototype.handleLayersChanged_ = function() { this.layersListenerKeys_.forEach(pn), this.layersListenerKeys_.length = 0; var t = this.getLayers(); this.layersListenerKeys_.push(Bt(t, Lo.ADD, this.handleLayersAdd_, this), Bt(t, Lo.REMOVE, this.handleLayersRemove_, this)); for (var n in this.listenerKeys_) this.listenerKeys_[n].forEach(pn); By(this.listenerKeys_); for (var i = t.getArray(), a = 0, o = i.length; a < o; a++) { var s = i[a]; this.registerLayerListeners_(s), this.dispatchEvent(new Wf("addlayer", s)); } this.changed(); }, e.prototype.registerLayerListeners_ = function(t) { var n = [ Bt(t, Wm.PROPERTYCHANGE, this.handleLayerChange_, this), Bt(t, Ot.CHANGE, this.handleLayerChange_, this) ]; t instanceof e && n.push(Bt(t, "addlayer", this.handleLayerGroupAdd_, this), Bt(t, "removelayer", this.handleLayerGroupRemove_, this)), this.listenerKeys_[Ft(t)] = n; }, e.prototype.handleLayerGroupAdd_ = function(t) { this.dispatchEvent(new Wf("addlayer", t.layer)); }, e.prototype.handleLayerGroupRemove_ = function(t) { this.dispatchEvent(new Wf("removelayer", t.layer)); }, e.prototype.handleLayersAdd_ = function(t) { var n = t.element; this.registerLayerListeners_(n), this.dispatchEvent(new Wf("addlayer", n)), this.changed(); }, e.prototype.handleLayersRemove_ = function(t) { var n = t.element, i = Ft(n); this.listenerKeys_[i].forEach(pn), delete this.listenerKeys_[i], this.dispatchEvent(new Wf("removelayer", n)), this.changed(); }, e.prototype.getLayers = function() { return this.get(tD.LAYERS); }, e.prototype.setLayers = function(t) { var n = this.getLayers(); if (n) for (var i = n.getArray(), a = 0, o = i.length; a < o; ++a) this.dispatchEvent(new Wf("removelayer", i[a])); this.set(tD.LAYERS, t); }, e.prototype.getLayersArray = function(t) { var n = t !== void 0 ? t : []; return this.getLayers().forEach(function(i) { i.getLayersArray(n); }), n; }, e.prototype.getLayerStatesArray = function(t) { var n = t !== void 0 ? t : [], i = n.length; this.getLayers().forEach(function(c) { c.getLayerStatesArray(n); }); var a = this.getLayerState(), o = a.zIndex; !t && a.zIndex === void 0 && (o = 0); for (var s = i, u = n.length; s < u; s++) { var l = n[s]; l.opacity *= a.opacity, l.visible = l.visible && a.visible, l.maxResolution = Math.min(l.maxResolution, a.maxResolution), l.minResolution = Math.max(l.minResolution, a.minResolution), l.minZoom = Math.max(l.minZoom, a.minZoom), l.maxZoom = Math.min(l.maxZoom, a.maxZoom), a.extent !== void 0 && (l.extent !== void 0 ? l.extent = fd(l.extent, a.extent) : l.extent = a.extent), l.zIndex === void 0 && (l.zIndex = o); } return n; }, e.prototype.getSourceState = function() { return qd.READY; }, e; }(mre); const PP = TQe; var PQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), IQe = function(r) { PQe(e, r); function e(t) { var n = r.call(this) || this; return n.map_ = t, n; } return e.prototype.dispatchRenderEvent = function(t, n) { Mr(); }, e.prototype.calculateMatrices2D = function(t) { var n = t.viewState, i = t.coordinateToPixelTransform, a = t.pixelToCoordinateTransform; Es(i, t.size[0] / 2, t.size[1] / 2, 1 / n.resolution, -1 / n.resolution, -n.rotation, -n.center[0], -n.center[1]), nx(a, i); }, e.prototype.forEachFeatureAtCoordinate = function(t, n, i, a, o, s, u, l) { var c, f = n.viewState; function h(D, O, N, F) { return o.call(s, O, D ? N : null, F); } var p = f.projection, d = $5(t.slice(), p), v = [[0, 0]]; if (p.canWrapX() && a) { var g = p.getExtent(), m = ai(g); v.push([-m, 0], [m, 0]); } for (var y = n.layerStatesArray, _ = y.length, w = [], x = [], C = 0; C < v.length; C++) for (var S = _ - 1; S >= 0; --S) { var b = y[S], E = b.layer; if (E.hasRenderer() && db(b, f) && u.call(l, E)) { var T = E.getRenderer(), P = E.getSource(); if (T && P) { var I = P.getWrapX() ? d : t, A = h.bind(null, b.managed); x[0] = I[0] + v[C][0], x[1] = I[1] + v[C][1], c = T.forEachFeatureAtCoordinate(x, n, i, A, w); } if (c) return c; } } if (w.length !== 0) { var L = 1 / w.length; return w.forEach(function(D, O) { return D.distanceSq += O * L; }), w.sort(function(D, O) { return D.distanceSq - O.distanceSq; }), w.some(function(D) { return c = D.callback(D.feature, D.layer, D.geometry); }), c; } }, e.prototype.forEachLayerAtPixel = function(t, n, i, a, o) { return Mr(); }, e.prototype.hasFeatureAtCoordinate = function(t, n, i, a, o, s) { var u = this.forEachFeatureAtCoordinate(t, n, i, a, hd, this, o, s); return u !== void 0; }, e.prototype.getMap = function() { return this.map_; }, e.prototype.renderFrame = function(t) { Mr(); }, e.prototype.scheduleExpireIconCache = function(t) { Sb.canExpireCache() && t.postRenderFunctions.push(AQe); }, e; }(wP); function AQe(r, e) { Sb.expire(); } const LQe = IQe; var DQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), MQe = function(r) { DQe(e, r); function e(t) { var n = r.call(this, t) || this; n.fontChangeListenerKey_ = Bt(gc, Wm.PROPERTYCHANGE, t.redrawText.bind(t)), n.element_ = document.createElement("div"); var i = n.element_.style; i.position = "absolute", i.width = "100%", i.height = "100%", i.zIndex = "0", n.element_.className = ix + " ol-layers"; var a = t.getViewport(); return a.insertBefore(n.element_, a.firstChild || null), n.children_ = [], n.renderedVisible_ = !0, n; } return e.prototype.dispatchRenderEvent = function(t, n) { var i = this.getMap(); if (i.hasListener(t)) { var a = new D_(t, void 0, n); i.dispatchEvent(a); } }, e.prototype.disposeInternal = function() { pn(this.fontChangeListenerKey_), this.element_.parentNode.removeChild(this.element_), r.prototype.disposeInternal.call(this); }, e.prototype.renderFrame = function(t) { if (!t) { this.renderedVisible_ && (this.element_.style.display = "none", this.renderedVisible_ = !1); return; } this.calculateMatrices2D(t), this.dispatchRenderEvent(Ao.PRECOMPOSE, t); var n = t.layerStatesArray.sort(function(p, d) { return p.zIndex - d.zIndex; }), i = t.viewState; this.children_.length = 0; for (var a = [], o = null, s = 0, u = n.length; s < u; ++s) { var l = n[s]; t.layerIndex = s; var c = l.layer, f = c.getSourceState(); if (!db(l, i) || f != qd.READY && f != qd.UNDEFINED) { c.unrender(); continue; } var h = c.render(t, o); !h || (h !== o && (this.children_.push(h), o = h), "getDeclutter" in c && a.push( c )); } for (var s = a.length - 1; s >= 0; --s) a[s].renderDeclutter(t); GYe(this.element_, this.children_), this.dispatchRenderEvent(Ao.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); }, e.prototype.forEachLayerAtPixel = function(t, n, i, a, o) { for (var s = n.viewState, u = n.layerStatesArray, l = u.length, c = l - 1; c >= 0; --c) { var f = u[c], h = f.layer; if (h.hasRenderer() && db(f, s) && o(h)) { var p = h.getRenderer(), d = p.getDataAtPixel(t, n, i); if (d) { var v = a(h, d); if (v) return v; } } } }, e; }(LQe); const OQe = MQe, Y1 = { POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", POINTERUP: "pointerup", POINTEROVER: "pointerover", POINTEROUT: "pointerout", POINTERENTER: "pointerenter", POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" }; var RQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), NQe = function(r) { RQe(e, r); function e(t, n) { var i = r.call(this, t) || this; i.map_ = t, i.clickTimeoutId_, i.emulateClicks_ = !1, i.dragging_ = !1, i.dragListenerKeys_ = [], i.moveTolerance_ = n === void 0 ? 1 : n, i.down_ = null; var a = i.map_.getViewport(); return i.activePointers_ = 0, i.trackedTouches_ = {}, i.element_ = a, i.pointerdownListenerKey_ = Bt(a, Y1.POINTERDOWN, i.handlePointerDown_, i), i.originalPointerMoveEvent_, i.relayedListenerKey_ = Bt(a, Y1.POINTERMOVE, i.relayEvent_, i), i.boundHandleTouchMove_ = i.handleTouchMove_.bind(i), i.element_.addEventListener(Ot.TOUCHMOVE, i.boundHandleTouchMove_, vre ? { passive: !1 } : !1), i; } return e.prototype.emulateClick_ = function(t) { var n = new wc(Vr.CLICK, this.map_, t); this.dispatchEvent(n), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, n = new wc(Vr.DBLCLICK, this.map_, t), this.dispatchEvent(n)) : this.clickTimeoutId_ = setTimeout( function() { this.clickTimeoutId_ = void 0; var i = new wc(Vr.SINGLECLICK, this.map_, t); this.dispatchEvent(i); }.bind(this), 250 ); }, e.prototype.updateActivePointers_ = function(t) { var n = t; n.type == Vr.POINTERUP || n.type == Vr.POINTERCANCEL ? delete this.trackedTouches_[n.pointerId] : n.type == Vr.POINTERDOWN && (this.trackedTouches_[n.pointerId] = !0), this.activePointers_ = Object.keys(this.trackedTouches_).length; }, e.prototype.handlePointerUp_ = function(t) { this.updateActivePointers_(t); var n = new wc(Vr.POINTERUP, this.map_, t); this.dispatchEvent(n), this.emulateClicks_ && !n.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(t) && this.emulateClick_(this.down_), this.activePointers_ === 0 && (this.dragListenerKeys_.forEach(pn), this.dragListenerKeys_.length = 0, this.dragging_ = !1, this.down_ = null); }, e.prototype.isMouseActionButton_ = function(t) { return t.button === 0; }, e.prototype.handlePointerDown_ = function(t) { this.emulateClicks_ = this.activePointers_ === 0, this.updateActivePointers_(t); var n = new wc(Vr.POINTERDOWN, this.map_, t); this.dispatchEvent(n), this.down_ = {}; for (var i in t) { var a = t[i]; this.down_[i] = typeof a == "function" ? Xd : a; } if (this.dragListenerKeys_.length === 0) { var o = this.map_.getOwnerDocument(); this.dragListenerKeys_.push( Bt(o, Vr.POINTERMOVE, this.handlePointerMove_, this), Bt(o, Vr.POINTERUP, this.handlePointerUp_, this), Bt(this.element_, Vr.POINTERCANCEL, this.handlePointerUp_, this) ), this.element_.getRootNode && this.element_.getRootNode() !== o && this.dragListenerKeys_.push(Bt(this.element_.getRootNode(), Vr.POINTERUP, this.handlePointerUp_, this)); } }, e.prototype.handlePointerMove_ = function(t) { if (this.isMoving_(t)) { this.dragging_ = !0; var n = new wc(Vr.POINTERDRAG, this.map_, t, this.dragging_); this.dispatchEvent(n); } }, e.prototype.relayEvent_ = function(t) { this.originalPointerMoveEvent_ = t; var n = !!(this.down_ && this.isMoving_(t)); this.dispatchEvent(new wc(t.type, this.map_, t, n)); }, e.prototype.handleTouchMove_ = function(t) { var n = this.originalPointerMoveEvent_; (!n || n.defaultPrevented) && (typeof t.cancelable != "boolean" || t.cancelable === !0) && t.preventDefault(); }, e.prototype.isMoving_ = function(t) { return this.dragging_ || Math.abs(t.clientX - this.down_.clientX) > this.moveTolerance_ || Math.abs(t.clientY - this.down_.clientY) > this.moveTolerance_; }, e.prototype.disposeInternal = function() { this.relayedListenerKey_ && (pn(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener(Ot.TOUCHMOVE, this.boundHandleTouchMove_), this.pointerdownListenerKey_ && (pn(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(pn), this.dragListenerKeys_.length = 0, this.element_ = null, r.prototype.disposeInternal.call(this); }, e; }(zy); const FQe = NQe, ta = { LAYERGROUP: "layergroup", SIZE: "size", TARGET: "target", VIEW: "view" }, Pu = { CENTER: "center", RESOLUTION: "resolution", ROTATION: "rotation" }; function W$(r, e, t) { return function(n, i, a, o, s) { if (!!n) { if (!i && !e) return n; var u = e ? 0 : a[0] * i, l = e ? 0 : a[1] * i, c = s ? s[0] : 0, f = s ? s[1] : 0, h = r[0] + u / 2 + c, p = r[2] - u / 2 + c, d = r[1] + l / 2 + f, v = r[3] - l / 2 + f; h > p && (h = (p + h) / 2, p = h), d > v && (d = (v + d) / 2, v = d); var g = Di(n[0], h, p), m = Di(n[1], d, v); if (o && t && i) { var y = 30 * i; g += -y * Math.log(1 + Math.max(0, h - n[0]) / y) + y * Math.log(1 + Math.max(0, n[0] - p) / y), m += -y * Math.log(1 + Math.max(0, d - n[1]) / y) + y * Math.log(1 + Math.max(0, n[1] - v) / y); } return [g, m]; } }; } function BQe(r) { return r; } function f3(r, e, t, n) { var i = ai(e) / t[0], a = il(e) / t[1]; return n ? Math.min(r, Math.max(i, a)) : Math.min(r, Math.min(i, a)); } function h3(r, e, t) { var n = Math.min(r, e), i = 50; return n *= Math.log(1 + i * Math.max(0, r / e - 1)) / i + 1, t && (n = Math.max(n, t), n /= Math.log(1 + i * Math.max(0, t / r - 1)) / i + 1), Di(n, t / 2, e * 2); } function kQe(r, e, t, n) { return function(i, a, o, s) { if (i !== void 0) { var u = r[0], l = r[r.length - 1], c = t ? f3(u, t, o, n) : u; if (s) { var f = e !== void 0 ? e : !0; return f ? h3(i, c, l) : Di(i, l, c); } var h = Math.min(c, i), p = Math.floor(hre(r, h, a)); return r[p] > c && p < r.length - 1 ? r[p + 1] : r[p]; } else return; }; } function VQe(r, e, t, n, i, a) { return function(o, s, u, l) { if (o !== void 0) { var c = i ? f3(e, i, u, a) : e, f = t !== void 0 ? t : 0; if (l) { var h = n !== void 0 ? n : !0; return h ? h3(o, c, f) : Di(o, f, c); } var p = 1e-9, d = Math.ceil(Math.log(e / c) / Math.log(r) - p), v = -s * (0.5 - p) + 0.5, g = Math.min(c, o), m = Math.floor(Math.log(e / g) / Math.log(r) + v), y = Math.max(d, m), _ = e / Math.pow(r, y); return Di(_, f, c); } else return; }; } function j$(r, e, t, n, i) { return function(a, o, s, u) { if (a !== void 0) { var l = n ? f3(r, n, s, i) : r, c = t !== void 0 ? t : !0; return !c || !u ? Di(a, e, l) : h3(a, l, e); } else return; }; } var GQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), rD = 0, zQe = function(r) { GQe(e, r); function e(t) { var n = r.call(this) || this; n.on, n.once, n.un; var i = jn({}, t); return n.hints_ = [0, 0], n.animations_ = [], n.updateAnimationKey_, n.projection_ = W5(i.projection, "EPSG:3857"), n.viewportSize_ = [100, 100], n.targetCenter_ = null, n.targetResolution_, n.targetRotation_, n.nextCenter_ = null, n.nextResolution_, n.nextRotation_, n.cancelAnchor_ = void 0, i.projection && ure(), i.center && (i.center = Mu(i.center, n.projection_)), i.extent && (i.extent = Dc(i.extent, n.projection_)), n.applyOptions_(i), n; } return e.prototype.applyOptions_ = function(t) { var n = jn({}, t); for (var i in Pu) delete n[i]; this.setProperties(n, !0); var a = HQe(t); this.maxResolution_ = a.maxResolution, this.minResolution_ = a.minResolution, this.zoomFactor_ = a.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = a.minZoom; var o = $Qe(t), s = a.constraint, u = UQe(t); this.constraints_ = { center: o, resolution: s, rotation: u }, this.setRotation(t.rotation !== void 0 ? t.rotation : 0), this.setCenterInternal(t.center !== void 0 ? t.center : null), t.resolution !== void 0 ? this.setResolution(t.resolution) : t.zoom !== void 0 && this.setZoom(t.zoom); }, Object.defineProperty(e.prototype, "padding", { get: function() { return this.padding_; }, set: function(t) { var n = this.padding_; this.padding_ = t; var i = this.getCenter(); if (i) { var a = t || [0, 0, 0, 0]; n = n || [0, 0, 0, 0]; var o = this.getResolution(), s = o / 2 * (a[3] - n[3] + n[1] - a[1]), u = o / 2 * (a[0] - n[0] + n[2] - a[2]); this.setCenterInternal([i[0] + s, i[1] - u]); } }, enumerable: !1, configurable: !0 }), e.prototype.getUpdatedOptions_ = function(t) { var n = this.getProperties(); return n.resolution !== void 0 ? n.resolution = this.getResolution() : n.zoom = this.getZoom(), n.center = this.getCenterInternal(), n.rotation = this.getRotation(), jn({}, n, t); }, e.prototype.animate = function(t) { this.isDef() && !this.getAnimating() && this.resolveConstraints(0); for (var n = new Array(arguments.length), i = 0; i < n.length; ++i) { var a = arguments[i]; a.center && (a = jn({}, a), a.center = Mu(a.center, this.getProjection())), a.anchor && (a = jn({}, a), a.anchor = Mu(a.anchor, this.getProjection())), n[i] = a; } this.animateInternal.apply(this, n); }, e.prototype.animateInternal = function(t) { var n = arguments.length, i; n > 1 && typeof arguments[n - 1] == "function" && (i = arguments[n - 1], --n); for (var a = 0; a < n && !this.isDef(); ++a) { var o = arguments[a]; o.center && this.setCenterInternal(o.center), o.zoom !== void 0 ? this.setZoom(o.zoom) : o.resolution && this.setResolution(o.resolution), o.rotation !== void 0 && this.setRotation(o.rotation); } if (a === n) { i && WC(i, !0); return; } for (var s = Date.now(), u = this.targetCenter_.slice(), l = this.targetResolution_, c = this.targetRotation_, f = []; a < n; ++a) { var h = arguments[a], p = { start: s, complete: !1, anchor: h.anchor, duration: h.duration !== void 0 ? h.duration : 1e3, easing: h.easing || pXe, callback: i }; if (h.center && (p.sourceCenter = u, p.targetCenter = h.center.slice(), u = p.targetCenter), h.zoom !== void 0 ? (p.sourceResolution = l, p.targetResolution = this.getResolutionForZoom(h.zoom), l = p.targetResolution) : h.resolution && (p.sourceResolution = l, p.targetResolution = h.resolution, l = p.targetResolution), h.rotation !== void 0) { p.sourceRotation = c; var d = em(h.rotation - c + Math.PI, 2 * Math.PI) - Math.PI; p.targetRotation = c + d, c = p.targetRotation; } WQe(p) ? p.complete = !0 : s += p.duration, f.push(p); } this.animations_.push(f), this.setHint(yn.ANIMATING, 1), this.updateAnimations_(); }, e.prototype.getAnimating = function() { return this.hints_[yn.ANIMATING] > 0; }, e.prototype.getInteracting = function() { return this.hints_[yn.INTERACTING] > 0; }, e.prototype.cancelAnimations = function() { this.setHint(yn.ANIMATING, -this.hints_[yn.ANIMATING]); for (var t, n = 0, i = this.animations_.length; n < i; ++n) { var a = this.animations_[n]; if (a[0].callback && WC(a[0].callback, !1), !t) for (var o = 0, s = a.length; o < s; ++o) { var u = a[o]; if (!u.complete) { t = u.anchor; break; } } } this.animations_.length = 0, this.cancelAnchor_ = t, this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; }, e.prototype.updateAnimations_ = function() { if (this.updateAnimationKey_ !== void 0 && (cancelAnimationFrame(this.updateAnimationKey_), this.updateAnimationKey_ = void 0), !!this.getAnimating()) { for (var t = Date.now(), n = !1, i = this.animations_.length - 1; i >= 0; --i) { for (var a = this.animations_[i], o = !0, s = 0, u = a.length; s < u; ++s) { var l = a[s]; if (!l.complete) { var c = t - l.start, f = l.duration > 0 ? c / l.duration : 1; f >= 1 ? (l.complete = !0, f = 1) : o = !1; var h = l.easing(f); if (l.sourceCenter) { var p = l.sourceCenter[0], d = l.sourceCenter[1], v = l.targetCenter[0], g = l.targetCenter[1]; this.nextCenter_ = l.targetCenter; var m = p + h * (v - p), y = d + h * (g - d); this.targetCenter_ = [m, y]; } if (l.sourceResolution && l.targetResolution) { var _ = h === 1 ? l.targetResolution : l.sourceResolution + h * (l.targetResolution - l.sourceResolution); if (l.anchor) { var w = this.getViewportSize_(this.getRotation()), x = this.constraints_.resolution(_, 0, w, !0); this.targetCenter_ = this.calculateCenterZoom(x, l.anchor); } this.nextResolution_ = l.targetResolution, this.targetResolution_ = _, this.applyTargetState_(!0); } if (l.sourceRotation !== void 0 && l.targetRotation !== void 0) { var C = h === 1 ? em(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + h * (l.targetRotation - l.sourceRotation); if (l.anchor) { var S = this.constraints_.rotation(C, !0); this.targetCenter_ = this.calculateCenterRotate(S, l.anchor); } this.nextRotation_ = l.targetRotation, this.targetRotation_ = C; } if (this.applyTargetState_(!0), n = !0, !l.complete) break; } } if (o) { this.animations_[i] = null, this.setHint(yn.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; var b = a[0].callback; b && WC(b, !0); } } this.animations_ = this.animations_.filter(Boolean), n && this.updateAnimationKey_ === void 0 && (this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this))); } }, e.prototype.calculateCenterRotate = function(t, n) { var i, a = this.getCenterInternal(); return a !== void 0 && (i = [a[0] - n[0], a[1] - n[1]], z5(i, t - this.getRotation()), dYe(i, n)), i; }, e.prototype.calculateCenterZoom = function(t, n) { var i, a = this.getCenterInternal(), o = this.getResolution(); if (a !== void 0 && o !== void 0) { var s = n[0] - t * (n[0] - a[0]) / o, u = n[1] - t * (n[1] - a[1]) / o; i = [s, u]; } return i; }, e.prototype.getViewportSize_ = function(t) { var n = this.viewportSize_; if (t) { var i = n[0], a = n[1]; return [ Math.abs(i * Math.cos(t)) + Math.abs(a * Math.sin(t)), Math.abs(i * Math.sin(t)) + Math.abs(a * Math.cos(t)) ]; } else return n; }, e.prototype.setViewportSize = function(t) { this.viewportSize_ = Array.isArray(t) ? t.slice() : [100, 100], this.getAnimating() || this.resolveConstraints(0); }, e.prototype.getCenter = function() { var t = this.getCenterInternal(); return t && sO(t, this.getProjection()); }, e.prototype.getCenterInternal = function() { return this.get(Pu.CENTER); }, e.prototype.getConstraints = function() { return this.constraints_; }, e.prototype.getConstrainResolution = function() { return this.get("constrainResolution"); }, e.prototype.getHints = function(t) { return t !== void 0 ? (t[0] = this.hints_[0], t[1] = this.hints_[1], t) : this.hints_.slice(); }, e.prototype.calculateExtent = function(t) { var n = this.calculateExtentInternal(t); return fre(n, this.getProjection()); }, e.prototype.calculateExtentInternal = function(t) { var n = t || this.getViewportSizeMinusPadding_(), i = this.getCenterInternal(); cn(i, 1); var a = this.getResolution(); cn(a !== void 0, 2); var o = this.getRotation(); return cn(o !== void 0, 3), nO(i, a, o, n); }, e.prototype.getMaxResolution = function() { return this.maxResolution_; }, e.prototype.getMinResolution = function() { return this.minResolution_; }, e.prototype.getMaxZoom = function() { return this.getZoomForResolution(this.minResolution_); }, e.prototype.setMaxZoom = function(t) { this.applyOptions_(this.getUpdatedOptions_({ maxZoom: t })); }, e.prototype.getMinZoom = function() { return this.getZoomForResolution(this.maxResolution_); }, e.prototype.setMinZoom = function(t) { this.applyOptions_(this.getUpdatedOptions_({ minZoom: t })); }, e.prototype.setConstrainResolution = function(t) { this.applyOptions_(this.getUpdatedOptions_({ constrainResolution: t })); }, e.prototype.getProjection = function() { return this.projection_; }, e.prototype.getResolution = function() { return this.get(Pu.RESOLUTION); }, e.prototype.getResolutions = function() { return this.resolutions_; }, e.prototype.getResolutionForExtent = function(t, n) { return this.getResolutionForExtentInternal(Dc(t, this.getProjection()), n); }, e.prototype.getResolutionForExtentInternal = function(t, n) { var i = n || this.getViewportSizeMinusPadding_(), a = ai(t) / i[0], o = il(t) / i[1]; return Math.max(a, o); }, e.prototype.getResolutionForValueFunction = function(t) { var n = t || 2, i = this.getConstrainedResolution(this.maxResolution_), a = this.minResolution_, o = Math.log(i / a) / Math.log(n); return function(s) { var u = i / Math.pow(n, s * o); return u; }; }, e.prototype.getRotation = function() { return this.get(Pu.ROTATION); }, e.prototype.getValueForResolutionFunction = function(t) { var n = Math.log(t || 2), i = this.getConstrainedResolution(this.maxResolution_), a = this.minResolution_, o = Math.log(i / a) / n; return function(s) { var u = Math.log(i / s) / n / o; return u; }; }, e.prototype.getViewportSizeMinusPadding_ = function(t) { var n = this.getViewportSize_(t), i = this.padding_; return i && (n = [ n[0] - i[1] - i[3], n[1] - i[0] - i[2] ]), n; }, e.prototype.getState = function() { var t = this.getProjection(), n = this.getResolution(), i = this.getRotation(), a = this.getCenterInternal(), o = this.padding_; if (o) { var s = this.getViewportSizeMinusPadding_(); a = nD(a, this.getViewportSize_(), [s[0] / 2 + o[3], s[1] / 2 + o[0]], n, i); } return { center: a.slice(0), projection: t !== void 0 ? t : null, resolution: n, nextCenter: this.nextCenter_, nextResolution: this.nextResolution_, nextRotation: this.nextRotation_, rotation: i, zoom: this.getZoom() }; }, e.prototype.getZoom = function() { var t, n = this.getResolution(); return n !== void 0 && (t = this.getZoomForResolution(n)), t; }, e.prototype.getZoomForResolution = function(t) { var n = this.minZoom_ || 0, i, a; if (this.resolutions_) { var o = hre(this.resolutions_, t, 1); n = o, i = this.resolutions_[o], o == this.resolutions_.length - 1 ? a = 2 : a = i / this.resolutions_[o + 1]; } else i = this.maxResolution_, a = this.zoomFactor_; return n + Math.log(i / t) / Math.log(a); }, e.prototype.getResolutionForZoom = function(t) { if (this.resolutions_) { if (this.resolutions_.length <= 1) return 0; var n = Di(Math.floor(t), 0, this.resolutions_.length - 2), i = this.resolutions_[n] / this.resolutions_[n + 1]; return this.resolutions_[n] / Math.pow(i, Di(t - n, 0, 1)); } else return this.maxResolution_ / Math.pow(this.zoomFactor_, t - this.minZoom_); }, e.prototype.fit = function(t, n) { var i; if (cn(Array.isArray(t) || typeof t.getSimplifiedGeometry == "function", 24), Array.isArray(t)) { cn(!_P(t), 25); var a = Dc(t, this.getProjection()); i = z$(a); } else if (t.getType() === Ee.CIRCLE) { var a = Dc(t.getExtent(), this.getProjection()); i = z$(a), i.rotate(this.getRotation(), Hm(a)); } else { var o = cre(); o ? i = t.clone().transform(o, this.getProjection()) : i = t; } this.fitInternal(i, n); }, e.prototype.rotatedExtentForGeometry = function(t) { for (var n = this.getRotation(), i = Math.cos(n), a = Math.sin(-n), o = t.getFlatCoordinates(), s = t.getStride(), u = 1 / 0, l = 1 / 0, c = -1 / 0, f = -1 / 0, h = 0, p = o.length; h < p; h += s) { var d = o[h] * i - o[h + 1] * a, v = o[h] * a + o[h + 1] * i; u = Math.min(u, d), l = Math.min(l, v), c = Math.max(c, d), f = Math.max(f, v); } return [u, l, c, f]; }, e.prototype.fitInternal = function(t, n) { var i = n || {}, a = i.size; a || (a = this.getViewportSizeMinusPadding_()); var o = i.padding !== void 0 ? i.padding : [0, 0, 0, 0], s = i.nearest !== void 0 ? i.nearest : !1, u; i.minResolution !== void 0 ? u = i.minResolution : i.maxZoom !== void 0 ? u = this.getResolutionForZoom(i.maxZoom) : u = 0; var l = this.rotatedExtentForGeometry(t), c = this.getResolutionForExtentInternal(l, [ a[0] - o[1] - o[3], a[1] - o[0] - o[2] ]); c = isNaN(c) ? u : Math.max(c, u), c = this.getConstrainedResolution(c, s ? 0 : 1); var f = this.getRotation(), h = Math.sin(f), p = Math.cos(f), d = Hm(l); d[0] += (o[1] - o[3]) / 2 * c, d[1] += (o[0] - o[2]) / 2 * c; var v = d[0] * p - d[1] * h, g = d[1] * p + d[0] * h, m = this.getConstrainedCenter([v, g], c), y = i.callback ? i.callback : Xd; i.duration !== void 0 ? this.animateInternal({ resolution: c, center: m, duration: i.duration, easing: i.easing }, y) : (this.targetResolution_ = c, this.targetCenter_ = m, this.applyTargetState_(!1, !0), WC(y, !0)); }, e.prototype.centerOn = function(t, n, i) { this.centerOnInternal(Mu(t, this.getProjection()), n, i); }, e.prototype.centerOnInternal = function(t, n, i) { this.setCenterInternal(nD(t, n, i, this.getResolution(), this.getRotation())); }, e.prototype.calculateCenterShift = function(t, n, i, a) { var o, s = this.padding_; if (s && t) { var u = this.getViewportSizeMinusPadding_(-i), l = nD(t, a, [u[0] / 2 + s[3], u[1] / 2 + s[0]], n, i); o = [ t[0] - l[0], t[1] - l[1] ]; } return o; }, e.prototype.isDef = function() { return !!this.getCenterInternal() && this.getResolution() !== void 0; }, e.prototype.adjustCenter = function(t) { var n = sO(this.targetCenter_, this.getProjection()); this.setCenter([ n[0] + t[0], n[1] + t[1] ]); }, e.prototype.adjustCenterInternal = function(t) { var n = this.targetCenter_; this.setCenterInternal([ n[0] + t[0], n[1] + t[1] ]); }, e.prototype.adjustResolution = function(t, n) { var i = n && Mu(n, this.getProjection()); this.adjustResolutionInternal(t, i); }, e.prototype.adjustResolutionInternal = function(t, n) { var i = this.getAnimating() || this.getInteracting(), a = this.getViewportSize_(this.getRotation()), o = this.constraints_.resolution(this.targetResolution_ * t, 0, a, i); n && (this.targetCenter_ = this.calculateCenterZoom(o, n)), this.targetResolution_ *= t, this.applyTargetState_(); }, e.prototype.adjustZoom = function(t, n) { this.adjustResolution(Math.pow(this.zoomFactor_, -t), n); }, e.prototype.adjustRotation = function(t, n) { n && (n = Mu(n, this.getProjection())), this.adjustRotationInternal(t, n); }, e.prototype.adjustRotationInternal = function(t, n) { var i = this.getAnimating() || this.getInteracting(), a = this.constraints_.rotation(this.targetRotation_ + t, i); n && (this.targetCenter_ = this.calculateCenterRotate(a, n)), this.targetRotation_ += t, this.applyTargetState_(); }, e.prototype.setCenter = function(t) { this.setCenterInternal(t && Mu(t, this.getProjection())); }, e.prototype.setCenterInternal = function(t) { this.targetCenter_ = t, this.applyTargetState_(); }, e.prototype.setHint = function(t, n) { return this.hints_[t] += n, this.changed(), this.hints_[t]; }, e.prototype.setResolution = function(t) { this.targetResolution_ = t, this.applyTargetState_(); }, e.prototype.setRotation = function(t) { this.targetRotation_ = t, this.applyTargetState_(); }, e.prototype.setZoom = function(t) { this.setResolution(this.getResolutionForZoom(t)); }, e.prototype.applyTargetState_ = function(t, n) { var i = this.getAnimating() || this.getInteracting() || n, a = this.constraints_.rotation(this.targetRotation_, i), o = this.getViewportSize_(a), s = this.constraints_.resolution(this.targetResolution_, 0, o, i), u = this.constraints_.center(this.targetCenter_, s, o, i, this.calculateCenterShift(this.targetCenter_, s, a, o)); this.get(Pu.ROTATION) !== a && this.set(Pu.ROTATION, a), this.get(Pu.RESOLUTION) !== s && (this.set(Pu.RESOLUTION, s), this.set("zoom", this.getZoom(), !0)), (!u || !this.get(Pu.CENTER) || !sb(this.get(Pu.CENTER), u)) && this.set(Pu.CENTER, u), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; }, e.prototype.resolveConstraints = function(t, n, i) { var a = t !== void 0 ? t : 200, o = n || 0, s = this.constraints_.rotation(this.targetRotation_), u = this.getViewportSize_(s), l = this.constraints_.resolution(this.targetResolution_, o, u), c = this.constraints_.center(this.targetCenter_, l, u, !1, this.calculateCenterShift(this.targetCenter_, l, s, u)); if (a === 0 && !this.cancelAnchor_) { this.targetResolution_ = l, this.targetRotation_ = s, this.targetCenter_ = c, this.applyTargetState_(); return; } var f = i || (a === 0 ? this.cancelAnchor_ : void 0); this.cancelAnchor_ = void 0, (this.getResolution() !== l || this.getRotation() !== s || !this.getCenterInternal() || !sb(this.getCenterInternal(), c)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ rotation: s, center: c, resolution: l, duration: a, easing: $y, anchor: f })); }, e.prototype.beginInteraction = function() { this.resolveConstraints(0), this.setHint(yn.INTERACTING, 1); }, e.prototype.endInteraction = function(t, n, i) { var a = i && Mu(i, this.getProjection()); this.endInteractionInternal(t, n, a); }, e.prototype.endInteractionInternal = function(t, n, i) { this.setHint(yn.INTERACTING, -1), this.resolveConstraints(t, n, i); }, e.prototype.getConstrainedCenter = function(t, n) { var i = this.getViewportSize_(this.getRotation()); return this.constraints_.center(t, n || this.getResolution(), i); }, e.prototype.getConstrainedZoom = function(t, n) { var i = this.getResolutionForZoom(t); return this.getZoomForResolution(this.getConstrainedResolution(i, n)); }, e.prototype.getConstrainedResolution = function(t, n) { var i = n || 0, a = this.getViewportSize_(this.getRotation()); return this.constraints_.resolution(t, i, a); }, e; }(Ps); function WC(r, e) { setTimeout(function() { r(e); }, 0); } function $Qe(r) { if (r.extent !== void 0) { var e = r.smoothExtentConstraint !== void 0 ? r.smoothExtentConstraint : !0; return W$(r.extent, r.constrainOnlyCenter, e); } var t = W5(r.projection, "EPSG:3857"); if (r.multiWorld !== !0 && t.isGlobal()) { var n = t.getExtent().slice(); return n[0] = -1 / 0, n[2] = 1 / 0, W$(n, !1, !1); } return BQe; } function HQe(r) { var e, t, n, i = 28, a = 2, o = r.minZoom !== void 0 ? r.minZoom : rD, s = r.maxZoom !== void 0 ? r.maxZoom : i, u = r.zoomFactor !== void 0 ? r.zoomFactor : a, l = r.multiWorld !== void 0 ? r.multiWorld : !1, c = r.smoothResolutionConstraint !== void 0 ? r.smoothResolutionConstraint : !0, f = r.showFullExtent !== void 0 ? r.showFullExtent : !1, h = W5(r.projection, "EPSG:3857"), p = h.getExtent(), d = r.constrainOnlyCenter, v = r.extent; if (!l && !v && h.isGlobal() && (d = !1, v = p), r.resolutions !== void 0) { var g = r.resolutions; t = g[o], n = g[s] !== void 0 ? g[s] : g[g.length - 1], r.constrainResolution ? e = kQe(g, c, !d && v, f) : e = j$(t, n, c, !d && v, f); } else { var m = p ? Math.max(ai(p), il(p)) : 360 * cf[ud.DEGREES] / h.getMetersPerUnit(), y = m / _Qe / Math.pow(a, rD), _ = y / Math.pow(a, i - rD); t = r.maxResolution, t !== void 0 ? o = 0 : t = y / Math.pow(u, o), n = r.minResolution, n === void 0 && (r.maxZoom !== void 0 ? r.maxResolution !== void 0 ? n = t / Math.pow(u, s) : n = y / Math.pow(u, s) : n = _), s = o + Math.floor(Math.log(t / n) / Math.log(u)), n = t / Math.pow(u, s - o), r.constrainResolution ? e = VQe(u, t, n, c, !d && v, f) : e = j$(t, n, c, !d && v, f); } return { constraint: e, maxResolution: t, minResolution: n, minZoom: o, zoomFactor: u }; } function UQe(r) { var e = r.enableRotation !== void 0 ? r.enableRotation : !0; if (e) { var t = r.constrainRotation; return t === void 0 || t === !0 ? YKe() : t === !1 ? B$ : typeof t == "number" ? jKe(t) : B$; } else return n3; } function WQe(r) { return !(r.sourceCenter && r.targetCenter && !sb(r.sourceCenter, r.targetCenter) || r.sourceResolution !== r.targetResolution || r.sourceRotation !== r.targetRotation); } function nD(r, e, t, n, i) { var a = Math.cos(-i), o = Math.sin(-i), s = r[0] * a - r[1] * o, u = r[1] * a + r[0] * o; s += (e[0] / 2 - t[0]) * n, u += (t[1] - e[1] / 2) * n, o = -o; var l = s * a - u * o, c = u * a + s * o; return [l, c]; } const Yf = zQe; var jQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(); function pne(r) { if (r instanceof ex) { r.setMapInternal(null); return; } r instanceof PP && r.getLayers().forEach(pne); } function dne(r, e) { if (r instanceof ex) { r.setMapInternal(e); return; } if (r instanceof PP) for (var t = r.getLayers().getArray(), n = 0, i = t.length; n < i; ++n) dne(t[n], e); } var YQe = function(r) { jQe(e, r); function e(t) { var n = r.call(this) || this; n.on, n.once, n.un; var i = XQe(t); n.renderComplete_, n.loaded_ = !0, n.boundHandleBrowserEvent_ = n.handleBrowserEvent.bind(n), n.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, n.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : dre, n.postRenderTimeoutHandle_, n.animationDelayKey_, n.animationDelay_ = function() { this.animationDelayKey_ = void 0, this.renderFrame_(Date.now()); }.bind(n), n.coordinateToPixelTransform_ = ha(), n.pixelToCoordinateTransform_ = ha(), n.frameIndex_ = 0, n.frameState_ = null, n.previousExtent_ = null, n.viewPropertyListenerKey_ = null, n.viewChangeListenerKey_ = null, n.layerGroupPropertyListenerKeys_ = null, n.viewport_ = document.createElement("div"), n.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), n.viewport_.style.position = "relative", n.viewport_.style.overflow = "hidden", n.viewport_.style.width = "100%", n.viewport_.style.height = "100%", n.overlayContainer_ = document.createElement("div"), n.overlayContainer_.style.position = "absolute", n.overlayContainer_.style.zIndex = "0", n.overlayContainer_.style.width = "100%", n.overlayContainer_.style.height = "100%", n.overlayContainer_.style.pointerEvents = "none", n.overlayContainer_.className = "ol-overlaycontainer", n.viewport_.appendChild(n.overlayContainer_), n.overlayContainerStopEvent_ = document.createElement("div"), n.overlayContainerStopEvent_.style.position = "absolute", n.overlayContainerStopEvent_.style.zIndex = "0", n.overlayContainerStopEvent_.style.width = "100%", n.overlayContainerStopEvent_.style.height = "100%", n.overlayContainerStopEvent_.style.pointerEvents = "none", n.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", n.viewport_.appendChild(n.overlayContainerStopEvent_), n.mapBrowserEventHandler_ = null, n.moveTolerance_ = t.moveTolerance, n.keyboardEventTarget_ = i.keyboardEventTarget, n.targetChangeHandlerKeys_ = null, n.controls = i.controls || new Qs(), n.interactions = i.interactions || new Qs(), n.overlays_ = i.overlays, n.overlayIdIndex_ = {}, n.renderer_ = null, n.postRenderFunctions_ = [], n.tileQueue_ = new EQe(n.getTilePriority.bind(n), n.handleTileChange_.bind(n)), n.addChangeListener(ta.LAYERGROUP, n.handleLayerGroupChanged_), n.addChangeListener(ta.VIEW, n.handleViewChanged_), n.addChangeListener(ta.SIZE, n.handleSizeChanged_), n.addChangeListener(ta.TARGET, n.handleTargetChanged_), n.setProperties(i.values); var a = n; return t.view && !(t.view instanceof Yf) && t.view.then(function(o) { a.setView(new Yf(o)); }), n.controls.addEventListener( Lo.ADD, function(o) { o.element.setMap(this); }.bind(n) ), n.controls.addEventListener( Lo.REMOVE, function(o) { o.element.setMap(null); }.bind(n) ), n.interactions.addEventListener( Lo.ADD, function(o) { o.element.setMap(this); }.bind(n) ), n.interactions.addEventListener( Lo.REMOVE, function(o) { o.element.setMap(null); }.bind(n) ), n.overlays_.addEventListener( Lo.ADD, function(o) { this.addOverlayInternal_( o.element ); }.bind(n) ), n.overlays_.addEventListener( Lo.REMOVE, function(o) { var s = o.element, u = s.getId(); u !== void 0 && delete this.overlayIdIndex_[u.toString()], o.element.setMap(null); }.bind(n) ), n.controls.forEach( function(o) { o.setMap(this); }.bind(n) ), n.interactions.forEach( function(o) { o.setMap(this); }.bind(n) ), n.overlays_.forEach(n.addOverlayInternal_.bind(n)), n; } return e.prototype.createRenderer = function() { throw new Error("Use a map type that has a createRenderer method"); }, e.prototype.addControl = function(t) { this.getControls().push(t); }, e.prototype.addInteraction = function(t) { this.getInteractions().push(t); }, e.prototype.addLayer = function(t) { var n = this.getLayerGroup().getLayers(); n.push(t); }, e.prototype.handleLayerAdd_ = function(t) { dne(t.layer, this); }, e.prototype.addOverlay = function(t) { this.getOverlays().push(t); }, e.prototype.addOverlayInternal_ = function(t) { var n = t.getId(); n !== void 0 && (this.overlayIdIndex_[n.toString()] = t), t.setMap(this); }, e.prototype.disposeInternal = function() { this.setTarget(null), r.prototype.disposeInternal.call(this); }, e.prototype.forEachFeatureAtPixel = function(t, n, i) { if (!(!this.frameState_ || !this.renderer_)) { var a = this.getCoordinateFromPixelInternal(t); i = i !== void 0 ? i : {}; var o = i.hitTolerance !== void 0 ? i.hitTolerance : 0, s = i.layerFilter !== void 0 ? i.layerFilter : hd, u = i.checkWrapped !== !1; return this.renderer_.forEachFeatureAtCoordinate(a, this.frameState_, o, u, n, null, s, null); } }, e.prototype.getFeaturesAtPixel = function(t, n) { var i = []; return this.forEachFeatureAtPixel(t, function(a) { i.push(a); }, n), i; }, e.prototype.getAllLayers = function() { var t = []; function n(i) { i.forEach(function(a) { a instanceof PP ? n(a.getLayers()) : t.push(a); }); } return n(this.getLayers()), t; }, e.prototype.forEachLayerAtPixel = function(t, n, i) { if (!(!this.frameState_ || !this.renderer_)) { var a = i || {}, o = a.hitTolerance !== void 0 ? a.hitTolerance : 0, s = a.layerFilter || hd; return this.renderer_.forEachLayerAtPixel(t, this.frameState_, o, n, s); } }, e.prototype.hasFeatureAtPixel = function(t, n) { if (!this.frameState_ || !this.renderer_) return !1; var i = this.getCoordinateFromPixelInternal(t); n = n !== void 0 ? n : {}; var a = n.layerFilter !== void 0 ? n.layerFilter : hd, o = n.hitTolerance !== void 0 ? n.hitTolerance : 0, s = n.checkWrapped !== !1; return this.renderer_.hasFeatureAtCoordinate(i, this.frameState_, o, s, a, null); }, e.prototype.getEventCoordinate = function(t) { return this.getCoordinateFromPixel(this.getEventPixel(t)); }, e.prototype.getEventCoordinateInternal = function(t) { return this.getCoordinateFromPixelInternal(this.getEventPixel(t)); }, e.prototype.getEventPixel = function(t) { var n = this.viewport_.getBoundingClientRect(), i = "changedTouches" in t ? t.changedTouches[0] : t; return [ i.clientX - n.left, i.clientY - n.top ]; }, e.prototype.getTarget = function() { return this.get(ta.TARGET); }, e.prototype.getTargetElement = function() { var t = this.getTarget(); return t !== void 0 ? typeof t == "string" ? document.getElementById(t) : t : null; }, e.prototype.getCoordinateFromPixel = function(t) { return sO(this.getCoordinateFromPixelInternal(t), this.getView().getProjection()); }, e.prototype.getCoordinateFromPixelInternal = function(t) { var n = this.frameState_; return n ? mn(n.pixelToCoordinateTransform, t.slice()) : null; }, e.prototype.getControls = function() { return this.controls; }, e.prototype.getOverlays = function() { return this.overlays_; }, e.prototype.getOverlayById = function(t) { var n = this.overlayIdIndex_[t.toString()]; return n !== void 0 ? n : null; }, e.prototype.getInteractions = function() { return this.interactions; }, e.prototype.getLayerGroup = function() { return this.get(ta.LAYERGROUP); }, e.prototype.setLayers = function(t) { var n = this.getLayerGroup(); if (t instanceof Qs) { n.setLayers(t); return; } var i = n.getLayers(); i.clear(), i.extend(t); }, e.prototype.getLayers = function() { var t = this.getLayerGroup().getLayers(); return t; }, e.prototype.getLoadingOrNotReady = function() { for (var t = this.getLayerGroup().getLayerStatesArray(), n = 0, i = t.length; n < i; ++n) { var a = t[n]; if (!!a.visible) { var o = a.layer.getRenderer(); if (o && !o.ready) return !0; var s = a.layer.getSource(); if (s && s.loading) return !0; } } return !1; }, e.prototype.getPixelFromCoordinate = function(t) { var n = Mu(t, this.getView().getProjection()); return this.getPixelFromCoordinateInternal(n); }, e.prototype.getPixelFromCoordinateInternal = function(t) { var n = this.frameState_; return n ? mn(n.coordinateToPixelTransform, t.slice(0, 2)) : null; }, e.prototype.getRenderer = function() { return this.renderer_; }, e.prototype.getSize = function() { return this.get(ta.SIZE); }, e.prototype.getView = function() { return this.get(ta.VIEW); }, e.prototype.getViewport = function() { return this.viewport_; }, e.prototype.getOverlayContainer = function() { return this.overlayContainer_; }, e.prototype.getOverlayContainerStopEvent = function() { return this.overlayContainerStopEvent_; }, e.prototype.getOwnerDocument = function() { var t = this.getTargetElement(); return t ? t.ownerDocument : document; }, e.prototype.getTilePriority = function(t, n, i, a) { return bQe(this.frameState_, t, n, i, a); }, e.prototype.handleBrowserEvent = function(t, n) { var i = n || t.type, a = new wc(i, this, t); this.handleMapBrowserEvent(a); }, e.prototype.handleMapBrowserEvent = function(t) { if (!!this.frameState_) { var n = t.originalEvent, i = n.type; if (i === Y1.POINTERDOWN || i === Ot.WHEEL || i === Ot.KEYDOWN) { var a = this.getOwnerDocument(), o = this.viewport_.getRootNode ? this.viewport_.getRootNode() : a, s = n.target; if (this.overlayContainerStopEvent_.contains(s) || !(o === a ? a.documentElement : o).contains(s)) return; } if (t.frameState = this.frameState_, this.dispatchEvent(t) !== !1) for (var u = this.getInteractions().getArray().slice(), l = u.length - 1; l >= 0; l--) { var c = u[l]; if (!(c.getMap() !== this || !c.getActive() || !this.getTargetElement())) { var f = c.handleEvent(t); if (!f || t.propagationStopped) break; } } } }, e.prototype.handlePostRender = function() { var t = this.frameState_, n = this.tileQueue_; if (!n.isEmpty()) { var i = this.maxTilesLoading_, a = i; if (t) { var o = t.viewHints; if (o[yn.ANIMATING] || o[yn.INTERACTING]) { var s = Date.now() - t.time > 8; i = s ? 0 : 8, a = s ? 0 : 2; } } n.getTilesLoading() < i && (n.reprioritize(), n.loadMoreTiles(i, a)); } t && this.renderer_ && !t.animate && (this.renderComplete_ === !0 ? (this.hasListener(Ao.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent(Ao.RENDERCOMPLETE, t), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent(new Cg(_c.LOADEND, this, t)))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent(new Cg(_c.LOADSTART, this, t)))); for (var u = this.postRenderFunctions_, l = 0, c = u.length; l < c; ++l) u[l](this, t); u.length = 0; }, e.prototype.handleSizeChanged_ = function() { this.getView() && !this.getView().getAnimating() && this.getView().resolveConstraints(0), this.render(); }, e.prototype.handleTargetChanged_ = function() { if (this.mapBrowserEventHandler_) { for (var t = 0, n = this.targetChangeHandlerKeys_.length; t < n; ++t) pn(this.targetChangeHandlerKeys_[t]); this.targetChangeHandlerKeys_ = null, this.viewport_.removeEventListener(Ot.CONTEXTMENU, this.boundHandleBrowserEvent_), this.viewport_.removeEventListener(Ot.WHEEL, this.boundHandleBrowserEvent_), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, pb(this.viewport_); } var i = this.getTargetElement(); if (!i) this.renderer_ && (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), this.renderer_ = null), this.animationDelayKey_ && (cancelAnimationFrame(this.animationDelayKey_), this.animationDelayKey_ = void 0); else { i.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = this.createRenderer()), this.mapBrowserEventHandler_ = new FQe(this, this.moveTolerance_); for (var a in Vr) this.mapBrowserEventHandler_.addEventListener(Vr[a], this.handleMapBrowserEvent.bind(this)); this.viewport_.addEventListener(Ot.CONTEXTMENU, this.boundHandleBrowserEvent_, !1), this.viewport_.addEventListener(Ot.WHEEL, this.boundHandleBrowserEvent_, vre ? { passive: !1 } : !1); var o = this.getOwnerDocument().defaultView, s = this.keyboardEventTarget_ ? this.keyboardEventTarget_ : i; this.targetChangeHandlerKeys_ = [ Bt(s, Ot.KEYDOWN, this.handleBrowserEvent, this), Bt(s, Ot.KEYPRESS, this.handleBrowserEvent, this), Bt(o, Ot.RESIZE, this.updateSize, this) ]; } this.updateSize(); }, e.prototype.handleTileChange_ = function() { this.render(); }, e.prototype.handleViewPropertyChanged_ = function() { this.render(); }, e.prototype.handleViewChanged_ = function() { this.viewPropertyListenerKey_ && (pn(this.viewPropertyListenerKey_), this.viewPropertyListenerKey_ = null), this.viewChangeListenerKey_ && (pn(this.viewChangeListenerKey_), this.viewChangeListenerKey_ = null); var t = this.getView(); t && (this.updateViewportSize_(), this.viewPropertyListenerKey_ = Bt(t, Wm.PROPERTYCHANGE, this.handleViewPropertyChanged_, this), this.viewChangeListenerKey_ = Bt(t, Ot.CHANGE, this.handleViewPropertyChanged_, this), t.resolveConstraints(0)), this.render(); }, e.prototype.handleLayerGroupChanged_ = function() { this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(pn), this.layerGroupPropertyListenerKeys_ = null); var t = this.getLayerGroup(); t && (this.handleLayerAdd_(new Wf("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ Bt(t, Wm.PROPERTYCHANGE, this.render, this), Bt(t, Ot.CHANGE, this.render, this), Bt(t, "addlayer", this.handleLayerAdd_, this), Bt(t, "removelayer", this.handleLayerRemove_, this) ]), this.render(); }, e.prototype.isRendered = function() { return !!this.frameState_; }, e.prototype.renderSync = function() { this.animationDelayKey_ && cancelAnimationFrame(this.animationDelayKey_), this.animationDelay_(); }, e.prototype.redrawText = function() { for (var t = this.getLayerGroup().getLayerStatesArray(), n = 0, i = t.length; n < i; ++n) { var a = t[n].layer; a.hasRenderer() && a.getRenderer().handleFontsChanged(); } }, e.prototype.render = function() { this.renderer_ && this.animationDelayKey_ === void 0 && (this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_)); }, e.prototype.removeControl = function(t) { return this.getControls().remove(t); }, e.prototype.removeInteraction = function(t) { return this.getInteractions().remove(t); }, e.prototype.removeLayer = function(t) { var n = this.getLayerGroup().getLayers(); return n.remove(t); }, e.prototype.handleLayerRemove_ = function(t) { pne(t.layer); }, e.prototype.removeOverlay = function(t) { return this.getOverlays().remove(t); }, e.prototype.renderFrame_ = function(t) { var n = this, i = this.getSize(), a = this.getView(), o = this.frameState_, s = null; if (i !== void 0 && x$(i) && a && a.isDef()) { var u = a.getHints(this.frameState_ ? this.frameState_.viewHints : void 0), l = a.getState(); if (s = { animate: !1, coordinateToPixelTransform: this.coordinateToPixelTransform_, declutterTree: null, extent: nO(l.center, l.resolution, l.rotation, i), index: this.frameIndex_++, layerIndex: 0, layerStatesArray: this.getLayerGroup().getLayerStatesArray(), pixelRatio: this.pixelRatio_, pixelToCoordinateTransform: this.pixelToCoordinateTransform_, postRenderFunctions: [], size: i, tileQueue: this.tileQueue_, time: t, usedTiles: {}, viewState: l, viewHints: u, wantedTiles: {}, mapId: Ft(this), renderTargets: {} }, l.nextCenter && l.nextResolution) { var c = isNaN(l.nextRotation) ? l.rotation : l.nextRotation; s.nextExtent = nO(l.nextCenter, l.nextResolution, c, i); } } if (this.frameState_ = s, this.renderer_.renderFrame(s), s) { if (s.animate && this.render(), Array.prototype.push.apply(this.postRenderFunctions_, s.postRenderFunctions), o) { var f = !this.previousExtent_ || !_P(this.previousExtent_) && !Yd(s.extent, this.previousExtent_); f && (this.dispatchEvent(new Cg(_c.MOVESTART, this, o)), this.previousExtent_ = yP(this.previousExtent_)); } var h = this.previousExtent_ && !s.viewHints[yn.ANIMATING] && !s.viewHints[yn.INTERACTING] && !Yd(s.extent, this.previousExtent_); h && (this.dispatchEvent(new Cg(_c.MOVEEND, this, s)), ire(s.extent, this.previousExtent_)); } this.dispatchEvent(new Cg(_c.POSTRENDER, this, s)), this.renderComplete_ = this.hasListener(_c.LOADSTART) || this.hasListener(_c.LOADEND) || this.hasListener(Ao.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(function() { n.postRenderTimeoutHandle_ = void 0, n.handlePostRender(); }, 0)); }, e.prototype.setLayerGroup = function(t) { var n = this.getLayerGroup(); n && this.handleLayerRemove_(new Wf("removelayer", n)), this.set(ta.LAYERGROUP, t); }, e.prototype.setSize = function(t) { this.set(ta.SIZE, t); }, e.prototype.setTarget = function(t) { this.set(ta.TARGET, t); }, e.prototype.setView = function(t) { if (!t || t instanceof Yf) { this.set(ta.VIEW, t); return; } this.set(ta.VIEW, new Yf()); var n = this; t.then(function(i) { n.setView(new Yf(i)); }); }, e.prototype.updateSize = function() { var t = this.getTargetElement(), n = void 0; if (t) { var i = getComputedStyle(t), a = t.offsetWidth - parseFloat(i.borderLeftWidth) - parseFloat(i.paddingLeft) - parseFloat(i.paddingRight) - parseFloat(i.borderRightWidth), o = t.offsetHeight - parseFloat(i.borderTopWidth) - parseFloat(i.paddingTop) - parseFloat(i.paddingBottom) - parseFloat(i.borderBottomWidth); !isNaN(a) && !isNaN(o) && (n = [a, o], !x$(n) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn("No map visible because the map container's width or height are 0.")); } this.setSize(n), this.updateViewportSize_(); }, e.prototype.updateViewportSize_ = function() { var t = this.getView(); if (t) { var n = void 0, i = getComputedStyle(this.viewport_); i.width && i.height && (n = [ parseInt(i.width, 10), parseInt(i.height, 10) ]), t.setViewportSize(n); } }, e; }(Ps); function XQe(r) { var e = null; r.keyboardEventTarget !== void 0 && (e = typeof r.keyboardEventTarget == "string" ? document.getElementById(r.keyboardEventTarget) : r.keyboardEventTarget); var t = {}, n = r.layers && typeof r.layers.getLayers == "function" ? r.layers : new PP({ layers: r.layers }); t[ta.LAYERGROUP] = n, t[ta.TARGET] = r.target, t[ta.VIEW] = r.view instanceof Yf ? r.view : new Yf(); var i; r.controls !== void 0 && (Array.isArray(r.controls) ? i = new Qs(r.controls.slice()) : (cn(typeof r.controls.getArray == "function", 47), i = r.controls)); var a; r.interactions !== void 0 && (Array.isArray(r.interactions) ? a = new Qs(r.interactions.slice()) : (cn(typeof r.interactions.getArray == "function", 48), a = r.interactions)); var o; return r.overlays !== void 0 ? Array.isArray(r.overlays) ? o = new Qs(r.overlays.slice()) : (cn(typeof r.overlays.getArray == "function", 49), o = r.overlays) : o = new Qs(), { controls: i, interactions: a, keyboardEventTarget: e, overlays: o, values: t }; } const qQe = YQe; var ZQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), KQe = function(r) { ZQe(e, r); function e(t) { var n = this, i = t || {}; n = r.call(this, { element: document.createElement("div"), render: i.render, target: i.target }) || this, n.ulElement_ = document.createElement("ul"), n.collapsed_ = i.collapsed !== void 0 ? i.collapsed : !0, n.userCollapsed_ = n.collapsed_, n.overrideCollapsible_ = i.collapsible !== void 0, n.collapsible_ = i.collapsible !== void 0 ? i.collapsible : !0, n.collapsible_ || (n.collapsed_ = !1); var a = i.className !== void 0 ? i.className : "ol-attribution", o = i.tipLabel !== void 0 ? i.tipLabel : "Attributions", s = i.expandClassName !== void 0 ? i.expandClassName : a + "-expand", u = i.collapseLabel !== void 0 ? i.collapseLabel : "\u203A", l = i.collapseClassName !== void 0 ? i.collapseClassName : a + "-collapse"; typeof u == "string" ? (n.collapseLabel_ = document.createElement("span"), n.collapseLabel_.textContent = u, n.collapseLabel_.className = l) : n.collapseLabel_ = u; var c = i.label !== void 0 ? i.label : "i"; typeof c == "string" ? (n.label_ = document.createElement("span"), n.label_.textContent = c, n.label_.className = s) : n.label_ = c; var f = n.collapsible_ && !n.collapsed_ ? n.collapseLabel_ : n.label_; n.toggleButton_ = document.createElement("button"), n.toggleButton_.setAttribute("type", "button"), n.toggleButton_.setAttribute("aria-expanded", String(!n.collapsed_)), n.toggleButton_.title = o, n.toggleButton_.appendChild(f), n.toggleButton_.addEventListener(Ot.CLICK, n.handleClick_.bind(n), !1); var h = a + " " + ix + " " + CP + (n.collapsed_ && n.collapsible_ ? " " + _$ : "") + (n.collapsible_ ? "" : " ol-uncollapsible"), p = n.element; return p.className = h, p.appendChild(n.toggleButton_), p.appendChild(n.ulElement_), n.renderedAttributions_ = [], n.renderedVisible_ = !0, n; } return e.prototype.collectSourceAttributions_ = function(t) { for (var n = {}, i = [], a = !0, o = t.layerStatesArray, s = 0, u = o.length; s < u; ++s) { var l = o[s]; if (!!db(l, t.viewState)) { var c = l.layer.getSource(); if (!!c) { var f = c.getAttributions(); if (!!f) { var h = f(t); if (!!h) if (a = a && c.getAttributionsCollapsible() !== !1, Array.isArray(h)) for (var p = 0, d = h.length; p < d; ++p) h[p] in n || (i.push(h[p]), n[h[p]] = !0); else h in n || (i.push(h), n[h] = !0); } } } } return this.overrideCollapsible_ || this.setCollapsible(a), i; }, e.prototype.updateElement_ = function(t) { if (!t) { this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1); return; } var n = this.collectSourceAttributions_(t), i = n.length > 0; if (this.renderedVisible_ != i && (this.element.style.display = i ? "" : "none", this.renderedVisible_ = i), !Zh(n, this.renderedAttributions_)) { gre(this.ulElement_); for (var a = 0, o = n.length; a < o; ++a) { var s = document.createElement("li"); s.innerHTML = n[a], this.ulElement_.appendChild(s); } this.renderedAttributions_ = n; } }, e.prototype.handleClick_ = function(t) { t.preventDefault(), this.handleToggle_(), this.userCollapsed_ = this.collapsed_; }, e.prototype.handleToggle_ = function() { this.element.classList.toggle(_$), this.collapsed_ ? hb(this.collapseLabel_, this.label_) : hb(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); }, e.prototype.getCollapsible = function() { return this.collapsible_; }, e.prototype.setCollapsible = function(t) { this.collapsible_ !== t && (this.collapsible_ = t, this.element.classList.toggle("ol-uncollapsible"), this.userCollapsed_ && this.handleToggle_()); }, e.prototype.setCollapsed = function(t) { this.userCollapsed_ = t, !(!this.collapsible_ || this.collapsed_ === t) && this.handleToggle_(); }, e.prototype.getCollapsed = function() { return this.collapsed_; }, e.prototype.render = function(t) { this.updateElement_(t.frameState); }, e; }(dl); const JQe = KQe; var QQe = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), eet = function(r) { QQe(e, r); function e(t) { var n = this, i = t || {}; n = r.call(this, { element: document.createElement("div"), render: i.render, target: i.target }) || this; var a = i.className !== void 0 ? i.className : "ol-rotate", o = i.label !== void 0 ? i.label : "\u21E7", s = i.compassClassName !== void 0 ? i.compassClassName : "ol-compass"; n.label_ = null, typeof o == "string" ? (n.label_ = document.createElement("span"), n.label_.className = s, n.label_.textContent = o) : (n.label_ = o, n.label_.classList.add(s)); var u = i.tipLabel ? i.tipLabel : "Reset rotation", l = document.createElement("button"); l.className = a + "-reset", l.setAttribute("type", "button"), l.title = u, l.appendChild(n.label_), l.addEventListener(Ot.CLICK, n.handleClick_.bind(n), !1); var c = a + " " + ix + " " + CP, f = n.element; return f.className = c, f.appendChild(l), n.callResetNorth_ = i.resetNorth ? i.resetNorth : void 0, n.duration_ = i.duration !== void 0 ? i.duration : 250, n.autoHide_ = i.autoHide !== void 0 ? i.autoHide : !0, n.rotation_ = void 0, n.autoHide_ && n.element.classList.add(kC), n; } return e.prototype.handleClick_ = function(t) { t.preventDefault(), this.callResetNorth_ !== void 0 ? this.callResetNorth_() : this.resetNorth_(); }, e.prototype.resetNorth_ = function() { var t = this.getMap(), n = t.getView(); if (!!n) { var i = n.getRotation(); i !== void 0 && (this.duration_ > 0 && i % (2 * Math.PI) !== 0 ? n.animate({ rotation: 0, duration: this.duration_, easing: $y }) : n.setRotation(0)); } }, e.prototype.render = function(t) { var n = t.frameState; if (!!n) { var i = n.viewState.rotation; if (i != this.rotation_) { var a = "rotate(" + i + "rad)"; if (this.autoHide_) { var o = this.element.classList.contains(kC); !o && i === 0 ? this.element.classList.add(kC) : o && i !== 0 && this.element.classList.remove(kC); } this.label_.style.transform = a; } this.rotation_ = i; } }, e; }(dl); const tet = eet; var ret = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), net = function(r) { ret(e, r); function e(t) { var n = this, i = t || {}; n = r.call(this, { element: document.createElement("div"), target: i.target }) || this; var a = i.className !== void 0 ? i.className : "ol-zoom", o = i.delta !== void 0 ? i.delta : 1, s = i.zoomInClassName !== void 0 ? i.zoomInClassName : a + "-in", u = i.zoomOutClassName !== void 0 ? i.zoomOutClassName : a + "-out", l = i.zoomInLabel !== void 0 ? i.zoomInLabel : "+", c = i.zoomOutLabel !== void 0 ? i.zoomOutLabel : "\u2013", f = i.zoomInTipLabel !== void 0 ? i.zoomInTipLabel : "Zoom in", h = i.zoomOutTipLabel !== void 0 ? i.zoomOutTipLabel : "Zoom out", p = document.createElement("button"); p.className = s, p.setAttribute("type", "button"), p.title = f, p.appendChild(typeof l == "string" ? document.createTextNode(l) : l), p.addEventListener(Ot.CLICK, n.handleClick_.bind(n, o), !1); var d = document.createElement("button"); d.className = u, d.setAttribute("type", "button"), d.title = h, d.appendChild(typeof c == "string" ? document.createTextNode(c) : c), d.addEventListener(Ot.CLICK, n.handleClick_.bind(n, -o), !1); var v = a + " " + ix + " " + CP, g = n.element; return g.className = v, g.appendChild(p), g.appendChild(d), n.duration_ = i.duration !== void 0 ? i.duration : 250, n; } return e.prototype.handleClick_ = function(t, n) { n.preventDefault(), this.zoomByDelta_(t); }, e.prototype.zoomByDelta_ = function(t) { var n = this.getMap(), i = n.getView(); if (!!i) { var a = i.getZoom(); if (a !== void 0) { var o = i.getConstrainedZoom(a + t); this.duration_ > 0 ? (i.getAnimating() && i.cancelAnimations(), i.animate({ zoom: o, duration: this.duration_, easing: $y })) : i.setZoom(o); } } }, e; }(dl); const iet = net; var aet = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), Y$ = [ "fullscreenchange", "webkitfullscreenchange", "MSFullscreenChange" ], X$ = { ENTERFULLSCREEN: "enterfullscreen", LEAVEFULLSCREEN: "leavefullscreen" }, oet = function(r) { aet(e, r); function e(t) { var n = this, i = t || {}; n = r.call(this, { element: document.createElement("div"), target: i.target }) || this, n.on, n.once, n.un, n.keys_ = i.keys !== void 0 ? i.keys : !1, n.source_ = i.source, n.isInFullscreen_ = !1, n.boundHandleMapTargetChange_ = n.handleMapTargetChange_.bind(n), n.cssClassName_ = i.className !== void 0 ? i.className : "ol-full-screen", n.documentListeners_ = [], n.activeClassName_ = i.activeClassName !== void 0 ? i.activeClassName.split(" ") : [n.cssClassName_ + "-true"], n.inactiveClassName_ = i.inactiveClassName !== void 0 ? i.inactiveClassName.split(" ") : [n.cssClassName_ + "-false"]; var a = i.label !== void 0 ? i.label : "\u2922"; n.labelNode_ = typeof a == "string" ? document.createTextNode(a) : a; var o = i.labelActive !== void 0 ? i.labelActive : "\xD7"; n.labelActiveNode_ = typeof o == "string" ? document.createTextNode(o) : o; var s = i.tipLabel ? i.tipLabel : "Toggle full-screen"; return n.button_ = document.createElement("button"), n.button_.title = s, n.button_.setAttribute("type", "button"), n.button_.appendChild(n.labelNode_), n.button_.addEventListener(Ot.CLICK, n.handleClick_.bind(n), !1), n.setClassName_(n.button_, n.isInFullscreen_), n.element.className = "".concat(n.cssClassName_, " ").concat(ix, " ").concat(CP), n.element.appendChild(n.button_), n; } return e.prototype.handleClick_ = function(t) { t.preventDefault(), this.handleFullScreen_(); }, e.prototype.handleFullScreen_ = function() { var t = this.getMap(); if (!!t) { var n = t.getOwnerDocument(); if (!!q$(n)) if (Z$(n)) uet(n); else { var i = void 0; this.source_ ? i = typeof this.source_ == "string" ? n.getElementById(this.source_) : this.source_ : i = t.getTargetElement(), this.keys_ ? set(i) : vne(i); } } }, e.prototype.handleFullScreenChange_ = function() { var t = this.getMap(); if (!!t) { var n = this.isInFullscreen_; this.isInFullscreen_ = Z$(t.getOwnerDocument()), n !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (hb(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(X$.ENTERFULLSCREEN)) : (hb(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(X$.LEAVEFULLSCREEN)), t.updateSize()); } }, e.prototype.setClassName_ = function(t, n) { var i, a, o, s; n ? ((i = t.classList).remove.apply(i, this.inactiveClassName_), (a = t.classList).add.apply(a, this.activeClassName_)) : ((o = t.classList).remove.apply(o, this.activeClassName_), (s = t.classList).add.apply(s, this.inactiveClassName_)); }, e.prototype.setMap = function(t) { var n = this.getMap(); n && n.removeChangeListener(ta.TARGET, this.boundHandleMapTargetChange_), r.prototype.setMap.call(this, t), this.handleMapTargetChange_(), t && t.addChangeListener(ta.TARGET, this.boundHandleMapTargetChange_); }, e.prototype.handleMapTargetChange_ = function() { for (var t = this.documentListeners_, n = 0, i = t.length; n < i; ++n) pn(t[n]); t.length = 0; var a = this.getMap(); if (a) { var o = a.getOwnerDocument(); q$(o) ? this.element.classList.remove(y$) : this.element.classList.add(y$); for (var n = 0, i = Y$.length; n < i; ++n) t.push(Bt(o, Y$[n], this.handleFullScreenChange_, this)); this.handleFullScreenChange_(); } }, e; }(dl); function q$(r) { var e = r.body; return !!(e.webkitRequestFullscreen || e.msRequestFullscreen && r.msFullscreenEnabled || e.requestFullscreen && r.fullscreenEnabled); } function Z$(r) { return !!(r.webkitIsFullScreen || r.msFullscreenElement || r.fullscreenElement); } function vne(r) { r.requestFullscreen ? r.requestFullscreen() : r.msRequestFullscreen ? r.msRequestFullscreen() : r.webkitRequestFullscreen && r.webkitRequestFullscreen(); } function set(r) { r.webkitRequestFullscreen ? r.webkitRequestFullscreen() : vne(r); } function uet(r) { r.exitFullscreen ? r.exitFullscreen() : r.msExitFullscreen ? r.msExitFullscreen() : r.webkitExitFullscreen && r.webkitExitFullscreen(); } const cet = oet; var fet = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), iD = "projection", K$ = "coordinateFormat", het = function(r) { fet(e, r); function e(t) { var n = this, i = t || {}, a = document.createElement("div"); a.className = i.className !== void 0 ? i.className : "ol-mouse-position", n = r.call(this, { element: a, render: i.render, target: i.target }) || this, n.on, n.once, n.un, n.addChangeListener(iD, n.handleProjectionChanged_), i.coordinateFormat && n.setCoordinateFormat(i.coordinateFormat), i.projection && n.setProjection(i.projection); var o = !0, s = " "; return "undefinedHTML" in i ? (i.undefinedHTML !== void 0 && (s = i.undefinedHTML), o = !!s) : "placeholder" in i && (i.placeholder === !1 ? o = !1 : s = String(i.placeholder)), n.placeholder_ = s, n.renderOnMouseOut_ = o, n.renderedHTML_ = a.innerHTML, n.mapProjection_ = null, n.transform_ = null, n; } return e.prototype.handleProjectionChanged_ = function() { this.transform_ = null; }, e.prototype.getCoordinateFormat = function() { return this.get(K$); }, e.prototype.getProjection = function() { return this.get(iD); }, e.prototype.handleMouseMove = function(t) { var n = this.getMap(); this.updateHTML_(n.getEventPixel(t)); }, e.prototype.handleMouseOut = function(t) { this.updateHTML_(null); }, e.prototype.setMap = function(t) { if (r.prototype.setMap.call(this, t), t) { var n = t.getViewport(); this.listenerKeys.push(Bt(n, Y1.POINTERMOVE, this.handleMouseMove, this)), this.renderOnMouseOut_ && this.listenerKeys.push(Bt(n, Y1.POINTEROUT, this.handleMouseOut, this)), this.updateHTML_(null); } }, e.prototype.setCoordinateFormat = function(t) { this.set(K$, t); }, e.prototype.setProjection = function(t) { this.set(iD, ff(t)); }, e.prototype.updateHTML_ = function(t) { var n = this.placeholder_; if (t && this.mapProjection_) { if (!this.transform_) { var i = this.getProjection(); i ? this.transform_ = lb(this.mapProjection_, i) : this.transform_ = U5; } var a = this.getMap(), o = a.getCoordinateFromPixelInternal(t); if (o) { var s = cre(); s && (this.transform_ = lb(this.mapProjection_, s)), this.transform_(o, o); var u = this.getCoordinateFormat(); u ? n = u(o) : n = o.toString(); } } (!this.renderedHTML_ || n !== this.renderedHTML_) && (this.element.innerHTML = n, this.renderedHTML_ = n); }, e.prototype.render = function(t) { var n = t.frameState; n ? this.mapProjection_ != n.viewState.projection && (this.mapProjection_ = n.viewState.projection, this.transform_ = null) : this.mapProjection_ = null; }, e; }(dl); const pet = het, Ko = { BOTTOM_LEFT: "bottom-left", BOTTOM_CENTER: "bottom-center", BOTTOM_RIGHT: "bottom-right", CENTER_LEFT: "center-left", CENTER_CENTER: "center-center", CENTER_RIGHT: "center-right", TOP_LEFT: "top-left", TOP_CENTER: "top-center", TOP_RIGHT: "top-right" }; var det = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), $a = { ELEMENT: "element", MAP: "map", OFFSET: "offset", POSITION: "position", POSITIONING: "positioning" }, vet = function(r) { det(e, r); function e(t) { var n = r.call(this) || this; n.on, n.once, n.un, n.options = t, n.id = t.id, n.insertFirst = t.insertFirst !== void 0 ? t.insertFirst : !0, n.stopEvent = t.stopEvent !== void 0 ? t.stopEvent : !0, n.element = document.createElement("div"), n.element.className = t.className !== void 0 ? t.className : "ol-overlay-container " + kXe, n.element.style.position = "absolute", n.element.style.pointerEvents = "auto"; var i = t.autoPan; return i && typeof i != "object" && (i = { animation: t.autoPanAnimation, margin: t.autoPanMargin }), n.autoPan = i || !1, n.rendered = { transform_: "", visible: !0 }, n.mapPostrenderListenerKey = null, n.addChangeListener($a.ELEMENT, n.handleElementChanged), n.addChangeListener($a.MAP, n.handleMapChanged), n.addChangeListener($a.OFFSET, n.handleOffsetChanged), n.addChangeListener($a.POSITION, n.handlePositionChanged), n.addChangeListener($a.POSITIONING, n.handlePositioningChanged), t.element !== void 0 && n.setElement(t.element), n.setOffset(t.offset !== void 0 ? t.offset : [0, 0]), n.setPositioning(t.positioning !== void 0 ? t.positioning : Ko.TOP_LEFT), t.position !== void 0 && n.setPosition(t.position), n; } return e.prototype.getElement = function() { return this.get($a.ELEMENT); }, e.prototype.getId = function() { return this.id; }, e.prototype.getMap = function() { return this.get($a.MAP) || null; }, e.prototype.getOffset = function() { return this.get($a.OFFSET); }, e.prototype.getPosition = function() { return this.get($a.POSITION); }, e.prototype.getPositioning = function() { return this.get($a.POSITIONING); }, e.prototype.handleElementChanged = function() { gre(this.element); var t = this.getElement(); t && this.element.appendChild(t); }, e.prototype.handleMapChanged = function() { this.mapPostrenderListenerKey && (pb(this.element), pn(this.mapPostrenderListenerKey), this.mapPostrenderListenerKey = null); var t = this.getMap(); if (t) { this.mapPostrenderListenerKey = Bt(t, _c.POSTRENDER, this.render, this), this.updatePixelPosition(); var n = this.stopEvent ? t.getOverlayContainerStopEvent() : t.getOverlayContainer(); this.insertFirst ? n.insertBefore(this.element, n.childNodes[0] || null) : n.appendChild(this.element), this.performAutoPan(); } }, e.prototype.render = function() { this.updatePixelPosition(); }, e.prototype.handleOffsetChanged = function() { this.updatePixelPosition(); }, e.prototype.handlePositionChanged = function() { this.updatePixelPosition(), this.performAutoPan(); }, e.prototype.handlePositioningChanged = function() { this.updatePixelPosition(); }, e.prototype.setElement = function(t) { this.set($a.ELEMENT, t); }, e.prototype.setMap = function(t) { this.set($a.MAP, t); }, e.prototype.setOffset = function(t) { this.set($a.OFFSET, t); }, e.prototype.setPosition = function(t) { this.set($a.POSITION, t); }, e.prototype.performAutoPan = function() { this.autoPan && this.panIntoView(this.autoPan); }, e.prototype.panIntoView = function(t) { var n = this.getMap(); if (!(!n || !n.getTargetElement() || !this.get($a.POSITION))) { var i = this.getRect(n.getTargetElement(), n.getSize()), a = this.getElement(), o = this.getRect(a, [ kYe(a), VYe(a) ]), s = t || {}, u = s.margin === void 0 ? 20 : s.margin; if (!Lc(i, o)) { var l = o[0] - i[0], c = i[2] - o[2], f = o[1] - i[1], h = i[3] - o[3], p = [0, 0]; if (l < 0 ? p[0] = l - u : c < 0 && (p[0] = Math.abs(c) + u), f < 0 ? p[1] = f - u : h < 0 && (p[1] = Math.abs(h) + u), p[0] !== 0 || p[1] !== 0) { var d = n.getView().getCenterInternal(), v = n.getPixelFromCoordinateInternal(d); if (!v) return; var g = [v[0] + p[0], v[1] + p[1]], m = s.animation || {}; n.getView().animateInternal({ center: n.getCoordinateFromPixelInternal(g), duration: m.duration, easing: m.easing }); } } } }, e.prototype.getRect = function(t, n) { var i = t.getBoundingClientRect(), a = i.left + window.pageXOffset, o = i.top + window.pageYOffset; return [a, o, a + n[0], o + n[1]]; }, e.prototype.setPositioning = function(t) { this.set($a.POSITIONING, t); }, e.prototype.setVisible = function(t) { this.rendered.visible !== t && (this.element.style.display = t ? "" : "none", this.rendered.visible = t); }, e.prototype.updatePixelPosition = function() { var t = this.getMap(), n = this.getPosition(); if (!t || !t.isRendered() || !n) { this.setVisible(!1); return; } var i = t.getPixelFromCoordinate(n), a = t.getSize(); this.updateRenderedPosition(i, a); }, e.prototype.updateRenderedPosition = function(t, n) { var i = this.element.style, a = this.getOffset(), o = this.getPositioning(); this.setVisible(!0); var s = Math.round(t[0] + a[0]) + "px", u = Math.round(t[1] + a[1]) + "px", l = "0%", c = "0%"; o == Ko.BOTTOM_RIGHT || o == Ko.CENTER_RIGHT || o == Ko.TOP_RIGHT ? l = "-100%" : (o == Ko.BOTTOM_CENTER || o == Ko.CENTER_CENTER || o == Ko.TOP_CENTER) && (l = "-50%"), o == Ko.BOTTOM_LEFT || o == Ko.BOTTOM_CENTER || o == Ko.BOTTOM_RIGHT ? c = "-100%" : (o == Ko.CENTER_LEFT || o == Ko.CENTER_CENTER || o == Ko.CENTER_RIGHT) && (c = "-50%"); var f = "translate(".concat(l, ", ").concat(c, ") translate(").concat(s, ", ").concat(u, ")"); this.rendered.transform_ != f && (this.rendered.transform_ = f, i.transform = f, i.msTransform = f); }, e.prototype.getOptions = function() { return this.options; }, e; }(Ps); const J$ = vet; function gne(r) { var e = r || {}, t = new Qs(), n = e.zoom !== void 0 ? e.zoom : !0; n && t.push(new iet(e.zoomOptions)); var i = e.rotate !== void 0 ? e.rotate : !0; i && t.push(new tet(e.rotateOptions)); var a = e.attribution !== void 0 ? e.attribution : !0; return a && t.push(new JQe(e.attributionOptions)), t; } var get = globalThis && globalThis.__extends || function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; } || function(n, i) { for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]); }, r(e, t); }; return function(e, t) { if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); r(e, t); function n() { this.constructor = e; } e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); }; }(), met = function(r) { get(e, r); function e(t) { return t = jn({}, t), t.controls || (t.controls = gne()), t.interactions || (t.interactions = yQe({ onFocusOnly: !0 })), r.call(this, t) || this; } return e.prototype.createRenderer = function() { return new OQe(this); }, e; }(qQe); const yet = met; const _et = { props: ["map"], data() { return { measureType: "diatence", draw: null, vectorLayer: null, tipDiv: null, pointermoveEvent: null, sketchFeature: null, geometryListener: null, measureResult: "0" }; }, methods: { creatDraw(r) { let e = null; this.measureType == "angle" ? e = 3 : e = null; let t = new c3({ wrapX: !1 }); this.vectorLayer = new EP({ source: t, style: new oh({ fill: new Vl({ color: "rgba(252, 86, 49, 0.1)" }), stroke: new gh({ color: "#fc5531", width: 3 }), image: new U1({ radius: 0, fill: new Vl({ color: "#fc5531" }) }) }), name: "\u6D4B\u91CF\u56FE\u5C42" }), this.vectorLayer.values_.zIndex = 1, this.map.addLayer(this.vectorLayer), this.draw = new mQe({ source: t, type: r, maxPoints: e, style: new oh({ fill: new Vl({ color: "rgba(252, 86, 49, 0.1)" }), stroke: new gh({ color: "#fc5531", lineDash: [10, 10], width: 3 }), image: new U1({ radius: 0, fill: new Vl({ color: "#fc5531" }) }) }), condition: (n) => (this.measureResult != "0" && !this.map.getOverlayById(this.measureResult) && this.measureType == "distence" && this.creatMark(null, this.measureResult, this.measureResult).setPosition(n.coordinate), !0) }), this.map.addInteraction(this.draw), this.draw.on("drawstart", (n) => { this.sketchFeature = n.feature; let i = this.map.getView().getProjection(); this.measureType == "distence" ? (this.creatMark(null, "\u8D77\u70B9", "start").setPosition( this.map.getCoordinateFromPixel(n.target.downPx_) ), this.tipDiv.innerHTML = "\u603B\u957F\uFF1A0 m
\u5355\u51FB\u786E\u5B9A\u5730\u70B9\uFF0C\u53CC\u51FB\u7ED3\u675F", this.geometryListener = this.sketchFeature.getGeometry().on("change", (a) => { this.measureResult = this.distenceFormat( r_(a.target, { projection: i, radius: 6378137 }) ), this.tipDiv.innerHTML = "\u603B\u957F\uFF1A" + this.measureResult + "
\u5355\u51FB\u786E\u5B9A\u5730\u70B9\uFF0C\u53CC\u51FB\u7ED3\u675F"; })) : this.measureType == "area" ? (this.tipDiv.innerHTML = "\u9762\u79EF\uFF1A0 m2
\u7EE7\u7EED\u5355\u51FB\u786E\u5B9A\u5730\u70B9", this.geometryListener = this.sketchFeature.getGeometry().on("change", (a) => { a.target.getCoordinates()[0].length < 4 ? this.tipDiv.innerHTML = "\u9762\u79EF\uFF1A0m2
\u7EE7\u7EED\u5355\u51FB\u786E\u5B9A\u5730\u70B9" : (this.measureResult = this.formatArea( sre(a.target, { projection: i, radius: 6378137 }) ), this.tipDiv.innerHTML = "\u9762\u79EF\uFF1A" + this.measureResult + "
\u5355\u51FB\u786E\u5B9A\u5730\u70B9\uFF0C\u53CC\u51FB\u7ED3\u675F"); })) : this.measureType == "angle" && (this.tipDiv.innerHTML = "\u7EE7\u7EED\u5355\u51FB\u786E\u5B9A\u9876\u70B9", this.geometryListener = this.sketchFeature.getGeometry().on("change", (a) => { a.target.getCoordinates().length < 3 ? this.tipDiv.innerHTML = "\u7EE7\u7EED\u5355\u51FB\u786E\u5B9A\u9876\u70B9" : (this.measureResult = this.formatAngle(a.target), this.tipDiv.innerHTML = "\u89D2\u5EA6\uFF1A" + this.measureResult + "
\u7EE7\u7EED\u5355\u51FB\u7ED3\u675F"); })); }), this.draw.on("drawend", (n) => { let i = document.createElement("span"); i.innerHTML = "\xD7", i.title = "\u6E05\u9664\u6D4B\u91CF", i.style = "width: 10px;height:10px;line-height: 12px;text-align: center;border-radius: 5px;display: inline-block;padding: 2px;color: rgb(255, 68, 0);border: 2px solid rgb(255, 68, 0);background-color: rgb(255, 255, 255);font-weight: 600;position: absolute;top: -25px;right: -2px;cursor: pointer;", i.addEventListener("click", () => { this.clearMeasure(); }), this.measureType == "distence" ? (this.creatMark(i, null, "close1").setPosition( n.feature.getGeometry().getLastCoordinate() ), this.creatMark(null, "\u603B\u957F\uFF1A" + this.measureResult, "length").setPosition( n.feature.getGeometry().getLastCoordinate() ), this.map.removeOverlay(this.map.getOverlayById(this.measureResult))) : this.measureType == "area" ? (this.creatMark(i, null, "close2").setPosition( n.feature.getGeometry().getInteriorPoint().getCoordinates() ), this.creatMark(null, "\u603B\u9762\u79EF\uFF1A" + this.measureResult, "area").setPosition( n.feature.getGeometry().getInteriorPoint().getCoordinates() )) : this.measureType == "angle" && (this.creatMark(i, null, "close3").setPosition( n.feature.getGeometry().getCoordinates()[1] ), this.creatMark(null, "\u89D2\u5EA6\uFF1A" + this.measureResult, "angle").setPosition( n.feature.getGeometry().getCoordinates()[1] )), this.stopMeasure(); }); }, measure(r) { if (this.draw != null) return !1; this.measureType = r, this.vectorLayer != null && this.clearMeasure(), this.tipDiv = document.createElement("div"), this.tipDiv.innerHTML = "\u5355\u51FB\u786E\u5B9A\u8D77\u70B9", this.tipDiv.className = "tipDiv", this.tipDiv.style = "width:auto;height:auto;padding:4px;border:1px solid #fc5531;font-size:12px;background-color:#fff;position:relative;top:60%;left:60%;font-weight:600;"; let e = new J$({ element: this.tipDiv, autoPan: !1, positioning: "bottom-center", id: "tipLay", stopEvent: !1 }); this.map.addOverlay(e), this.pointermoveEvent = this.map.on("pointermove", (t) => { e.setPosition(t.coordinate); }), this.measureType == "distence" || this.measureType == "angle" ? this.creatDraw("LineString") : this.measureType == "area" && this.creatDraw("Polygon"); }, creatMark(r, e, t) { r == null && (r = document.createElement("div"), r.innerHTML = e, r.style = "width:auto;height:auto;padding:4px;border:1px solid #fc5531;font-size:12px;background-color:#fff;position:relative;top:60%;left:60%;font-weight:600;"); let n = new J$({ element: r, autoPan: !1, positioning: "bottom-center", id: t, stopEvent: !1 }); return this.map.addOverlay(n), n; }, distenceFormat(r) { let e; return r > 100 ? e = Math.round(r / 1e3 * 100) / 100 + " km" : e = Math.round(r * 100) / 100 + " m", e; }, formatArea(r) { let e; return r > 1e4 ? e = Math.round(r / 1e6 * 100) / 100 + " km2" : e = Math.round(r * 100) / 100 + " m2", e; }, formatAngle(r) { var e = r.getCoordinates(), t = "0\xB0"; if (e.length == 3) { const i = r_( new Cc({ geometry: new mh([e[0], e[1]]) }).getGeometry(), { radius: 6378137, projection: this.map.getView().getProjection() } ), a = r_( new Cc({ geometry: new mh([e[1], e[2]]) }).getGeometry(), { radius: 6378137, projection: this.map.getView().getProjection() } ), o = r_( new Cc({ geometry: new mh([e[0], e[2]]) }).getGeometry(), { radius: 6378137, projection: this.map.getView().getProjection() } ); var n = (i * i + a * a - o * o) / (2 * i * a); t = Math.acos(n) * 180 / Math.PI, t = t.toFixed(2); } return isNaN(t) ? "0\xB0" : t + "\xB0"; }, stopMeasure() { this.tipDiv = null, this.map.removeInteraction(this.draw), this.draw = null, this.map.removeOverlay(this.map.getOverlayById("tipLay")); }, clearMeasure() { this.clearLastDraw(), this.vectorLayer.getSource().clear(), this.map.getOverlays().clear(), B1(this.pointermoveEvent), B1(this.geometryListener), this.pointermoveEvent = null, this.geometryListener = null, this.measureResult = "0"; }, clearLastDraw() { this.$emit("clearLastDraw"); } } }, wet = { class: "measure-tool" }, xet = { class: "ol-control" }, Cet = { class: "ol-control" }, Eet = { class: "ol-control" }; function bet(r, e, t, n, i, a) { return Re(), St("div", wet, [ he("div", xet, [ he("button", { onClick: e[0] || (e[0] = (o) => a.measure("distence")) }, "\u8DDD") ]), he("div", Cet, [ he("button", { onClick: e[1] || (e[1] = (o) => a.measure("area")) }, "\u9762") ]), he("div", Eet, [ he("button", { onClick: e[2] || (e[2] = (o) => a.measure("angle")) }, "\u89D2") ]) ]); } const Tet = /* @__PURE__ */ zn(_et, [["render", bet], ["__scopeId", "data-v-41853b7a"]]); const Pet = { class: "query-container" }, Iet = /* @__PURE__ */ de({ __name: "query", props: { treeData: { type: Array, default: () => [] } }, setup(r) { const e = r, t = te(""), n = (i) => { console.log(i.values_), t.value = i.values_.title; }; return (i, a) => { const o = mt("el-tree-select"); return Re(), St("div", Pet, [ re(o, { "check-strictly": !1, class: "t-select", teleported: !1, data: e.treeData, modelValue: t.value, onChange: a[0] || (a[0] = (s) => n(s)) }, null, 8, ["data", "modelValue"]) ]); }; } }), Aet = /* @__PURE__ */ zn(Iet, [["__scopeId", "data-v-94bf1098"]]), Let = [ { label: "\u5BFC\u822A", type: "nav" }, { label: "\u4FE1\u606F", type: "info" }, { label: "\u56FE\u5C42", type: "level" }, { label: "\u6D4B\u91CF", type: "measure" }, { label: "\u67E5\u8BE2", type: "query" }, { label: "\u5B9A\u4F4D", type: "position" }, { label: "\u5377\u5E18", type: "swipe" }, { label: "\u56FE\u4F8B", type: "legend" } ]; const Det = { class: "cl" }, Met = { class: "position" }, Oet = { class: "nav" }, Ret = { class: "measure" }, Net = { class: "query" }, Fet = /* @__PURE__ */ de({ __name: "control", props: { navLinks: { type: Array, default: () => [] }, showSwipe: { type: Boolean, default: !1 }, map: { type: Object, default: {} }, layers: { type: Array, required: !0 }, treeData: { type: Array, default: () => [] } }, emits: ["setPosition", "navTo", "swipeControl", "swipeOption", "clearFeatrue"], setup(r, { emit: e }) { const t = r, { navLinks: n, showSwipe: i, treeData: a } = Ab(t), o = te(!1), s = te(!1), u = te(!1), l = te(!1), c = te(), f = () => { o.value = !o.value, s.value = !1, u.value = !1, l.value = !1, e("swipeControl", !1), document.getElementsByClassName("ol-swipe")[0].style.display = "none", document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none", e("swipeOption"); }, h = () => { if (t.map.getAllLayers().length === t.layers.length) return; const L = t.map.getAllLayers().pop(); t.map.removeLayer(L); }, p = () => { e("clearFeatrue"); }, d = () => { c.value.clearEvt(), s.value = !s.value, u.value = !1, o.value = !1, l.value = !1, e("swipeControl", !1), document.getElementsByClassName("ol-swipe")[0].style.display = "none", document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none", e("swipeOption"); }, v = () => { document.getElementsByClassName("ol-swipe")[0].style.display === "none" ? (e("swipeControl", !0), document.getElementsByClassName("ol-swipe")[0].style.display = "block") : (e("swipeOption"), document.getElementsByClassName("ol-swipe")[0].style.display = "none", e("swipeControl", !1)); }, g = () => { v(), s.value = !1, u.value = !1, o.value = !1, l.value = !1, document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none"; }, m = () => { document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display === "none" ? (document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "block", document.getElementsByClassName("panel-container")[0].style.display = "block", document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.backgroundColor = "transparent") : document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none"; }, y = () => { m(), s.value = !1, u.value = !1, o.value = !1, l.value = !1, e("swipeControl", !1), document.getElementsByClassName("ol-swipe")[0].style.display = "none", e("swipeOption"); }, _ = (A) => { e("setPosition", A); }, w = () => { P.value = -1, s.value = !1; }, x = () => { u.value = !u.value, c.value.clearEvt(), s.value = !1, o.value = !1, l.value = !1, e("swipeControl", !1), document.getElementsByClassName("ol-swipe")[0].style.display = "none", document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none", e("swipeOption"); }, C = (A) => { e("navTo", A); }, S = (A) => { P.value = -1, u.value = A; }, b = () => { s.value = !1, u.value = !1, o.value = !1, l.value = !1, e("swipeControl", !1), document.getElementsByClassName("ol-swipe")[0].style.display = "none", document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none", e("swipeOption"); }, E = () => { s.value = !1, u.value = !1, o.value = !1, l.value = !l.value, e("swipeControl", !1), document.getElementsByClassName("ol-swipe")[0].style.display = "none", document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none", e("swipeOption"); }, T = () => { s.value = !1, u.value = !1, o.value = !1, l.value = !1, e("swipeControl", !1), document.getElementsByClassName("ol-swipe")[0].style.display = "none", document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0].style.display = "none", e("swipeOption"); }, P = te(), I = (A, L) => { switch (P.value === L ? P.value = void 0 : P.value = L, A) { case "nav": x(); break; case "swipe": g(); break; case "level": y(); break; case "position": d(); break; case "measure": f(); break; case "info": b(); break; case "query": E(); break; case "legend": T(); break; } }; return (A, L) => { var O; const D = mt("el-button"); return Re(), St("div", Det, [ (Re(!0), St(yh, null, Ib(Ue(Let), (N, F) => (Re(), St(yh, { key: N.label }, [ N.type === "nav" ? ba((Re(), Nr(D, { key: 0, class: Ui({ isActive: F === P.value }), onClick: (k) => I(N.type, F) }, { default: Ce(() => [ Ne(us(N.label), 1) ]), _: 2 }, 1032, ["class", "onClick"])), [ [lo, Ue(n).length] ]) : N.type === "swipe" ? ba((Re(), Nr(D, { key: 1, class: Ui({ isActive: F === P.value }), onClick: (k) => I(N.type, F) }, { default: Ce(() => [ Ne(us(N.label), 1) ]), _: 2 }, 1032, ["class", "onClick"])), [ [lo, Ue(i)] ]) : (Re(), Nr(D, { key: 2, class: Ui({ isActive: F === P.value }), onClick: (k) => I(N.type, F) }, { default: Ce(() => [ Ne(us(N.label), 1) ]), _: 2 }, 1032, ["class", "onClick"])) ], 64))), 128)), ba(he("div", Met, [ re(bKe, { ref_key: "positionRef", ref: c, onSubmitForm: _, onHidePosition: w, onClearFeatrue: p }, null, 512) ], 512), [ [lo, s.value] ]), ba(he("div", Oet, [ re(AKe, { onNavEvt: C, onHideNav: S, navLinks: (O = Ue(n)) != null ? O : [] }, null, 8, ["navLinks"]) ], 512), [ [lo, u.value] ]), he("div", Ret, [ ba(re(Tet, { onClearLastDraw: h, class: "measureTool", map: r.map }, null, 8, ["map"]), [ [lo, r.map && o.value] ]) ]), ba(he("div", Net, [ re(Aet, { treeData: Ue(a) }, null, 8, ["treeData"]) ], 512), [ [lo, l.value] ]) ]); }; } }), Bet = /* @__PURE__ */ zn(Fet, [["__scopeId", "data-v-622c8432"]]), ket = (r, e, t, n) => { t.length && t != [0, 0] && (t = ub(t)), r.value = new yet({ target: "map", layers: e, view: new Yf({ center: t, zoom: n }), controls: gne().extend([ new cet(), new pet({ coordinateFormat: (i) => `\u7ECF\u5EA6\uFF1A${i[0].toFixed(2)} \u7EAC\u5EA6\uFF1A${i[1].toFixed(2)}`, projection: "EPSG:4326", className: "custom-mouse-position", target: document.getElementById("mouse-position"), undefinedHTML: "\u672A\u77E5" }) ]) }); }, Vet = () => { const r = te(), e = te(), t = (i, a) => { var o; a.value && ((o = i.value) == null || o.removeLayer(a.value)); }; return { locationLayer: e, clearFeatrue: t, positionFeatrue: (i, a) => { var c, f; t(i, e); let o = new oh({ image: new U1({ radius: 8, stroke: new gh({ color: "#ff0000", width: 1 }), fill: new Vl({ color: "#ff000055" }) }), text: new tZe({ offsetY: 30, font: "16px Calibri,sans-serif", fill: new Vl({ color: "#000" }), stroke: new gh({ color: "#fffc", width: 3 }) }) }); r.value = null, r.value = new c3({ wrapX: !1 }), e.value = new EP({ source: r.value, properties: { name: "\u5750\u6807", caption: "\u5750\u6807", type: "2" }, style: function(h) { return o.getText().setText(h.get("label")), o; } }), (c = i.value) == null || c.addLayer(e.value); const s = new dd(a); console.log(s); const u = new Cc(s); var l = "\u7ECF\u5EA6\uFF1A" + oO(a)[0].toFixed(2) + " \u7EAC\u5EA6\uFF1A" + oO(a)[1].toFixed(2); u.set("label", l), (f = e.value.getSource()) == null || f.addFeature(u); } }; }, Get = () => { const r = document.getElementsByClassName( "ol-layerswitcher ol-unselectable ol-control ol-collapsed" )[0]; r.style.display = "none"; }, zet = () => { const r = document.getElementsByClassName("ol-swipe")[0]; r && (r.style.display = "none"); }, $et = (r, e) => { r.getAllLayers().forEach((n) => { e.push({ label: n.getProperties().title, value: n }); }); }; const Het = (r) => (al("data-v-77e86720"), r = r(), sl(), r), Uet = { id: "map", class: "map__x" }, Wet = /* @__PURE__ */ Het(() => /* @__PURE__ */ he("div", { id: "mouse-position" }, null, -1)), jet = { class: "control" }, Yet = { class: "options" }, Xet = { class: "orientation" }, qet = { class: "set" }, Zet = { class: "levelDv" }, Ket = /* @__PURE__ */ de({ __name: "map", props: { layers: null, center: null, zoom: null, navLinks: null, treeData: null }, setup(r, { expose: e }) { const t = r, n = te(), i = new un({ collapsed: !0, trash: !0 }), a = te(""); let o = _n([]); const s = te(!1), u = (E) => { s.value = E, a.value = ""; }, l = (E) => { E ? h.set("orientation", "horizontal") : h.set("orientation", "vertical"); }, c = (E) => { a.value = E.values_.title; for (let T = h.layers.length - 1; T >= 0; T--) h.removeLayer(h.layers[T].layer); h.addLayer(sg(E)); }, f = te(!1); let h; const p = () => { n.value.getLayers().getLength() > 1 && (h = new Yo({ position: 0.5 }), f.value = !0, t.layers.values_ ? t.layers.getLayers().getArray().forEach((T) => { h.addLayer(T); }) : t.layers.forEach((T) => { h.addLayer(T); }), h.setMap(n.value)); }, d = () => { for (let E = h.layers.length - 1; E >= 0; E--) h.removeLayer(h.layers[E].layer); }, v = (E) => { n.value.getView().setCenter(E), _(n, E); }, g = (E) => { const T = n.value.getView(); T.setCenter(ub(E)), T.setZoom(12); }, { locationLayer: m, clearFeatrue: y, positionFeatrue: _ } = Vet(), w = () => { y(n, m); }, x = () => { h.set("position", 0.5), d(); }; return hf(() => { ket(n, t.layers, t.center, t.zoom), $et(n.value, o), n.value.addControl(i), Get(), p(), d(), zet(), window.addEventListener("resize", () => { n.value.updateSize(); }); }), e({ getMapCenter: () => { const E = n.value.getView().getResolution(), T = oO(n.value.getView().getCenter()); return T.push(E * 1e3), T; }, setMapCenter: (E) => { const T = n.value.getView(), P = E.pop(); T.setCenter(ub(E)), T.setResolution(P); }, updateSizeEvt: () => { setTimeout(() => { n.value.updateSize(); }, 300); } }), (E, T) => { const P = mt("el-checkbox"), I = mt("el-tree-select"); return Re(), St("div", Uet, [ Wet, he("div", jet, [ re(Bet, { onSetPosition: v, onNavTo: g, navLinks: t.navLinks, showSwipe: f.value, onSwipeControl: u, onSwipeOption: x, onClearFeatrue: w, map: n.value, layers: t.layers, treeData: t.treeData }, null, 8, ["navLinks", "showSwipe", "map", "layers", "treeData"]) ]), ba(he("div", Yet, [ he("div", Xet, [ re(P, { id: "ori", label: "\u6C34\u5E73\u6ED1\u52A8", onChange: l }) ]), he("div", qet, [ he("div", Zet, [ re(I, { onChange: T[0] || (T[0] = (A) => c(A)), modelValue: a.value, class: "t-select", teleported: !1, data: t.treeData }, null, 8, ["modelValue", "data"]) ]) ]) ], 512), [ [lo, s.value] ]) ]); }; } }), Jet = /* @__PURE__ */ zn(Ket, [["__scopeId", "data-v-77e86720"]]); class Qet { setCache(e, t, n = !0) { if (n === !1) { window.sessionStorage.setItem(e, JSON.stringify(t)); return; } window.localStorage.setItem(e, JSON.stringify(t)); } getCache(e, t = !0) { let n; if (t === !1 ? n = window.sessionStorage.getItem(e) : n = window.localStorage.getItem(e), n) return JSON.parse(n); } deleteCache(e, t = !0) { if (t === !1) { window.sessionStorage.removeItem(e); return; } window.localStorage.removeItem(e); } clearCache() { window.localStorage.clear(), window.sessionStorage.clear(); } } const jC = new Qet(); const ett = { class: "ol-cs-map-container" }, ttt = { name: "olcs" }, rtt = /* @__PURE__ */ de({ ...ttt, props: { csMapConfig: null, olMapConfig: null }, setup(r) { const e = r, t = te(), n = te(), i = te(), a = jC.getCache("mapMode", !1); a ? i.value = a : (i.value = "2d", jC.setCache("mapMode", "2d", !1)); const o = te(); Ve( () => i.value, (u) => { u === "2d" ? o.value = "3d" : o.value = "2d"; }, { immediate: !0 } ); const s = () => { if (i.value === "2d") { const u = t.value.getMapCenter(); oi(() => { var l; return (l = n.value) == null ? void 0 : l.setCsCenter(u); }), i.value = "3d", jC.setCache("mapMode", "3d", !1); } else { const { lon: u, lat: l, height: c } = n.value.getCenterPosition(), f = [u, l, c / 1e3]; oi(() => { var h, p; (h = t.value) == null || h.updateSizeEvt(), (p = t.value) == null || p.setMapCenter(f); }), i.value = "2d", jC.setCache("mapMode", "2d", !1); } }; return (u, l) => { const c = mt("el-button"); return Re(), St("div", ett, [ ba(re(Jet, aD({ ref_key: "ol", ref: t }, e.olMapConfig), null, 16), [ [lo, i.value === "2d"] ]), ba(re(zje, aD({ ref_key: "cs", ref: n }, e.csMapConfig), null, 16), [ [lo, i.value === "3d"] ]), re(c, { class: "changeBtn", onClick: s }, { default: Ce(() => [ Ne("\u5207\u6362" + us(o.value), 1) ]), _: 1 }) ]); }; } }), Q$ = /* @__PURE__ */ zn(rtt, [["__scopeId", "data-v-7bf78a54"]]), att = { install(r) { r.component(Q$.name, Q$); } }; export { att as default };