import { defineComponent as I, watch as d, createElementBlock as ee, openBlock as te, normalizeClass as ae, unref as re, shallowRef as M, ref as h, onMounted as oe, onUnmounted as se, createElementVNode as ie, pushScopeId as le, popScopeId as ne } from "vue";
import ce from "@amap/amap-jsapi-loader";
import me from "axios";
import { nanoid as de } from "nanoid";
import { debounce as w } from "lodash";
import "../text-text-basic/index.mjs";
import "../text-table-basic/index.mjs";
import "../chart-other-gauge/index.mjs";
import "../chart-other-gauge-stage/index.mjs";
import "../chart-other-gauge-grade/index.mjs";
import "../chart-other-word-cloud/index.mjs";
import "../chart-other-liquidfill/index.mjs";
import "../chart-other-funnel/index.mjs";
import "../chart-other-force/index.mjs";
import "../chart-other-radar/index.mjs";
import "../chart-other-funnel-split/index.mjs";
import "../chart-other-funnel-contrast/index.mjs";
import "../chart-other-candlestick-basic/index.mjs";
import "../chart-other-candlestick-shanghai/index.mjs";
import "../chart-other-candlestick-demo/index.mjs";
import "../chart-other-heatmap/index.mjs";
import "../chart-other-force2/index.mjs";
import "../chart-other-graph-basic/index.mjs";
import "../chart-other-graph-basic2/index.mjs";
import "../chart-other-graph-calendar/index.mjs";
import "../chart-other-tree-line/index.mjs";
import "../chart-other-treemap-basic/index.mjs";
import "../chart-other-sunburst-basic/index.mjs";
import "../chart-other-sunburst-basic2/index.mjs";
import "../chart-other-sunburst-basic3/index.mjs";
import "../chart-other-sunburst-basic4/index.mjs";
import "../chart-other-sunburst-book/index.mjs";
import "../chart-other-sunburst-radius/index.mjs";
import "../chart-other-sunburst-flavors/index.mjs";
import "../chart-other-parallel-basic/index.mjs";
import "../chart-other-parallel-mul/index.mjs";
import "../chart-other-circular-graph/index.mjs";
import "../map-earth-basic/index.mjs";
import "../map-earth-cool-tech/index.mjs";
import "../map-earth-particle/index.mjs";
import "../map-earth-hacker/index.mjs";
import "../map-earth-fly-line/index.mjs";
import "../chart-other-grid-percentage/index.mjs";
import "../chart-other-radar-stack/index.mjs";
import "../chart-other-funnel2/index.mjs";
import "../chart-other-label-gauge/index.mjs";
import "../chart-other-theme-river/index.mjs";
import "../chart-other-tree/index.mjs";
import "../chart-other-treemap/index.mjs";
import "../commons-product-model/index.mjs";
import "../commons-vr-photo/index.mjs";
import "../commons-vr-video/index.mjs";
import "../commons-three-loader/index.mjs";
import "../commons-three-loader3/index.mjs";
import "../commons-loop-iterator/index.mjs";
import "../commons-gaussian-splatting-view/index.mjs";
import "../commons-babylon/index.mjs";
import "../commons-svg/index.mjs";
import "../commons-weather/index.mjs";
import "../commons-weather-dynamic/index.mjs";
import "../media-wavesurfer/index.mjs";
import "../interaction-tabs/index.mjs";
import "../interaction-tabs2/index.mjs";
import "../interaction-button/index.mjs";
import "../interaction-button-image/index.mjs";
import "../interaction-select/index.mjs";
import "../interaction-input/index.mjs";
import "../interaction-radio/index.mjs";
import "../interaction-slider/index.mjs";
import "../interaction-switch/index.mjs";
import "../interaction-data-picker/index.mjs";
import "../interaction-button-refresh/index.mjs";
import "../media-image/index.mjs";
import "../text-title/index.mjs";
import "../commons-qrcode/index.mjs";
import "../media-video/index.mjs";
import "../media-audio/index.mjs";
import "../text-real-time/index.mjs";
import "../media-carousel/index.mjs";
import "../media-carousel-slides/index.mjs";
import "../media-iframe-carousel/index.mjs";
import "../media-iframe/index.mjs";
import "../media-m3u8/index.mjs";
import "../media-m3u8-dynamic/index.mjs";
import "../media-audio-dynamic/index.mjs";
import "../media-video-dynamic/index.mjs";
import "../media-image-dynamic/index.mjs";
import "../media-iframe-dynamic/index.mjs";
import "../media-flv/index.mjs";
import "../commons-echarts/index.mjs";
import "../text-over-number/index.mjs";
import "../text-table-scroll/index.mjs";
import "../text-carousel/index.mjs";
import "../text-row-scroll/index.mjs";
import "../text-text-dynamic/index.mjs";
import "../text-count-down/index.mjs";
import "../graphical-circle/index.mjs";
import "../graphical-diamond/index.mjs";
import "../graphical-hexagon/index.mjs";
import "../graphical-isosceles-triangle/index.mjs";
import "../graphical-pentagon/index.mjs";
import "../graphical-rect/index.mjs";
import "../graphical-right-triangle/index.mjs";
import "../scene-map3d/index.mjs";
import "../scene-amap2d/index.mjs";
import "./index.mjs";
import "../scene-vr/index.mjs";
import "../scene-unity-iframe/index.mjs";
import "../scene-unity-webgl/index.mjs";
import "../scene-ue-iframe/index.mjs";
import "../scene-ue-shj/index.mjs";
import "../scene-default/index.mjs";
import "../interaction/tabs/index.mjs";
import "../interaction/tabs-icon/index.mjs";
import "../interaction/button/index.mjs";
import "../interaction/date-picker/src/date-picker/index.mjs";
import "../interaction/date-picker/src/date-picker-range/index.mjs";
import "../text/list/index.mjs";
import "../chart/src/bar/basic/index.mjs";
import "../chart/src/bar/animation/index.mjs";
import "../chart/src/bar/contrast/index.mjs";
import "../chart/src/bar/contrast2/index.mjs";
import "../chart/src/bar/contrast3/index.mjs";
import "../chart/src/bar/gradient-column-chart/index.mjs";
import "../chart/src/bar/horizontal/index.mjs";
import "../chart/src/bar/horizontal-stack/index.mjs";
import "../chart/src/bar/line-bar/index.mjs";
import "../chart/src/bar/line-bar2/index.mjs";
import "../chart/src/bar/loop/index.mjs";
import "../chart/src/bar/mini/index.mjs";
import "../chart/src/bar/polar/index.mjs";
import "../chart/src/bar/polar-stack/index.mjs";
import "../chart/src/bar/polar2/index.mjs";
import "../chart/src/bar/radius-circle/index.mjs";
import "../chart/src/bar/rank/index.mjs";
import "../chart/src/bar/segmented-progress/index.mjs";
import "../chart/src/bar/spire/index.mjs";
import "../chart/src/bar/stack/index.mjs";
import "../chart/src/bar/stack-line/index.mjs";
import "../chart/src/bar/stack2/index.mjs";
import "../chart/src/bar/stack3/index.mjs";
import "../chart/src/bar/staggered/index.mjs";
import "../chart/src/bar/three/index.mjs";
import "../chart/src/bar/waterfall/index.mjs";
import "../chart/src/bar/zebra/index.mjs";
import "../chart/src/line/area-gradient/index.mjs";
import "../chart/src/line/area-highlight/index.mjs";
import "../chart/src/line/area-highlight2/index.mjs";
import "../chart/src/line/basic/index.mjs";
import "../chart/src/line/bump/index.mjs";
import "../chart/src/line/dashed/index.mjs";
import "../chart/src/line/ladder/index.mjs";
import "../chart/src/line/logarithm/index.mjs";
import "../chart/src/line/multix/index.mjs";
import "../chart/src/line/polar-double/index.mjs";
import "../chart/src/line/rain-flow/index.mjs";
import "../chart/src/line/scale/index.mjs";
import "../chart/src/line/smooth/index.mjs";
import "../chart/src/line/smooth-area/index.mjs";
import "../chart/src/line/stack/index.mjs";
import "../chart/src/line/stack-area/index.mjs";
import "../chart/src/line/temp/index.mjs";
import "../chart/src/line/vertical/index.mjs";
import "../chart/src/map/basic/index.mjs";
import "../chart/src/map/bmap-basic/index.mjs";
import "../chart/src/map/bmap-heatmap/index.mjs";
import "../chart/src/map/bmap-rich/index.mjs";
import "../chart/src/map/customize/index.mjs";
import "../chart/src/map/lines/index.mjs";
import "../chart/src/map/scatter/index.mjs";
import "../chart/src/pie/3d/index.mjs";
import "../chart/src/pie/basic/index.mjs";
import "../chart/src/pie/basic2/index.mjs";
import "../chart/src/pie/customized/index.mjs";
import "../chart/src/pie/index/index.mjs";
import "../chart/src/pie/interval/index.mjs";
import "../chart/src/pie/legend-scroll/index.mjs";
import "../chart/src/pie/radius/index.mjs";
import "../chart/src/pie/rose/index.mjs";
import "../chart/src/pie/round/index.mjs";
import "../chart/src/pie/sunburst/index.mjs";
import "../chart/src/scatter/basic/index.mjs";
import "../chart/src/scatter/basic2/index.mjs";
import "../chart/src/scatter/bubble/index.mjs";
import "../chart/src/scatter/ripples/index.mjs";
/* empty css                        */
/* empty css                               */
import { SHJDatasourceV2 as pe } from "../../plugins/datasource/index.mjs";
import { SHJParseEvent as p } from "../../plugins/event/index.mjs";
const ue = (v) => (le("data-v-ba897a3f"), v = v(), ne(), v), ye = /* @__PURE__ */ ue(() => /* @__PURE__ */ ie("div", {
  id: "zerov-amap-3d",
  class: "zerov-amap-container"
}, null, -1)), ge = [
  ye
], fe = I({ name: "zv-scene-amap3d" }), Zr = /* @__PURE__ */ I({
  ...fe,
  props: {
    basicOption: {},
    sources: {},
    useEvents: {},
    uuid: {}
  },
  emits: [
    "amap3d-scene-success",
    "amap3d-scene-zoomstart",
    "amap3d-scene-zoomend",
    "amap3d-scene-mapclick",
    "amap3d-scene-dragstart",
    "amap3d-scene-dragging",
    "amap3d-scene-dragend",
    "amap3d-scene-pulseLinkLayer"
  ],
  setup(v, { expose: A, emit: B }) {
    const o = v, u = B;
    p.parseEvents(o.useEvents, "on-page-loaded", null);
    const W = () => {
      const i = M(), c = M(), S = h(!1), b = h(), k = h(), z = h(), m = h(), C = (t) => {
        E(), window._AMapSecurityConfig = {
          securityJsCode: t.basic.securityJsCode
        }, ce.load({
          key: t.basic.key,
          // 申请好的Web端开发者Key，首次调用 load 时必填
          version: "2.0",
          // 指定要加载的 JSAPI 的版本，缺省时默认为 1.4.15
          Loca: {
            version: "2.0.0"
          },
          plugins: ["AMap.ControlBar", "AMap.ToolBar", "AMap.Scale", "AMap.HeatMap", "AMap.GeoJSON", "AMap.ImageLayer", "AMap.TileLayer"]
        }).then((e) => {
          m.value = e;
          const r = new m.value.createDefaultLayer({
            visible: !0,
            // 是否可见
            opacity: 1,
            // 透明度
            zIndex: 0
            // 叠加层级
          });
          i.value = new e.Map("zerov-amap-3d", {
            rotateEnable: t.config.rotateEnable,
            // 是否开启地图旋转交互 鼠标右键 + 鼠标画圈移动 或 键盘Ctrl + 鼠标画圈移动
            pitchEnable: t.config.pitchEnable,
            // 是否开启地图倾斜交互 鼠标右键 + 鼠标上下移动或键盘Ctrl + 鼠标上下移动
            resizeEnable: t.config.resizeEnable,
            zoomEnable: t.config.zoomEnable,
            dragEnable: t.config.dragEnable,
            zoom: t.config.zoom,
            // 初始化地图层级
            viewMode: "3D",
            // 开启3D视图,默认为关闭
            zooms: t.config.zooms,
            // 地图显示的缩放级别范围
            center: t.config.center,
            // 初始地图中心经纬度
            mapStyle: t.config.mapStyle,
            features: t.config.features,
            pitch: t.config.pitch,
            // 0-83
            rotation: t.config.rotation,
            // 0-360
            wallColor: t.config.floors.wallColor,
            roofColor: t.config.floors.roofColor,
            skyColor: t.config.skyColor,
            layers: [r]
          }), c.value = new window.Loca.Container({
            map: i.value
          }), z.value = new m.value.Scale({
            visible: t.config.plugin.scale.visible,
            position: {
              left: t.config.plugin.scale.position.left + "px",
              bottom: t.config.plugin.scale.position.bottom + "px"
            }
          }), i.value.addControl(z.value), b.value = new e.ControlBar({
            visible: t.config.plugin.controlBar.visible,
            showControlButton: t.config.plugin.controlBar.showControlButton,
            position: {
              right: t.config.plugin.controlBar.position.right + "px",
              top: t.config.plugin.controlBar.position.top + "px"
            }
          }), i.value.addControl(b.value), k.value = new e.ToolBar({
            visible: t.config.plugin.toolBar.visible,
            position: {
              left: t.config.plugin.toolBar.position.left + "px",
              top: t.config.plugin.toolBar.position.top + "px"
            }
          }), i.value.addControl(k.value), L(e), i.value.on("complete", () => {
            setTimeout(() => {
              S.value = !0, u("amap3d-scene-success"), p.parseEvents(o.useEvents, "amap3d-scene-success", null);
            }, 666);
          }), i.value.on("zoomstart", () => {
            u("amap3d-scene-zoomstart"), p.parseEvents(o.useEvents, "amap3d-scene-zoomstart", null);
          }), i.value.on("zoomend", () => {
            u("amap3d-scene-zoomend"), p.parseEvents(o.useEvents, "amap3d-scene-zoomend", null);
          }), i.value.on("click", (a) => {
            u("amap3d-scene-mapclick", a.lnglat), p.parseEvents(o.useEvents, "amap3d-scene-mapclick", a.lnglat);
          }), i.value.on("dragstart", (a) => {
            u("amap3d-scene-dragstart", a.lnglat), p.parseEvents(o.useEvents, "amap3d-scene-dragstart", a.lnglat);
          }), i.value.on("dragend", (a) => {
            u("amap3d-scene-dragend", a.lnglat), p.parseEvents(o.useEvents, "amap3d-scene-dragend", a.lnglat);
          });
        }).catch((e) => {
        });
      }, L = w((t) => {
        o.sources && o.sources.length > 0 ? pe.parse({
          tId: o.uuid,
          sources: o.sources,
          callback: (r) => {
            try {
              const a = o.basicOption.widgets.find((s) => s._sourceId === r.id);
              a && a.type === "heatmap" && G(window.Loca, a, f(r.data[0].data, "Point")), a && a.type === "dotlayers" && H(window.Loca, a, f(r.data[0].data, "Point")), a && a.type === "scatter" && Z(window.Loca, a, f(r.data[0].data, "Point")), a && a.type === "labelsLayer" && R(window.Loca, a, f(r.data[0].data, "Point")), a && a.type === "signagePoints" && j(window.Loca, a, f(r.data[0].data, "Point")), a && a.type === "pulseLinkLayer" && V(window.Loca, a, f(r.data[0].data, "LineString"));
            } catch {
            }
            o.basicOption.widgets.filter((a) => a.type === "boundary").forEach((a) => {
              O(t, a);
            });
          }
        }) : o.basicOption.widgets.filter((r) => r.type === "boundary").forEach((r) => {
          O(t, r);
        });
        const e = i.value.getLayers();
        for (let r = 0; r < e.length; r++)
          (e[r].type === "sketchTileLayer" || e[r]._opts.type === "sketchImageLayer") && i.value.removeLayer(e[r]);
        o.basicOption.widgets.filter((r) => r.type === "sketchTile").forEach((r) => {
          const a = F(r);
          a && i.value.addLayer(a);
        }), o.basicOption.widgets.filter((r) => r.type === "sketchImage").forEach((r) => {
          const a = N(r);
          i.value.addLayer(a);
        });
      }, 200), T = (t) => {
        const r = t.slice(t.indexOf("(") + 1, t.lastIndexOf(")")).split(",").map((s) => s.trim()), a = {};
        for (let s = 1; s < r.length; s++) {
          const n = r[s].split(" "), l = n[0], y = parseFloat(n[1]) / 100, Y = Math.round(y * 100) / 100;
          a[Y] = l;
        }
        return a;
      }, F = (t) => {
        try {
          return new m.value.TileLayer({
            bounds: new m.value.Bounds(
              t.bounds[0],
              t.bounds[1]
            ),
            getTileUrl: function(r, a, s) {
              try {
                return t.url.replace("{z}", s).replace("{x}", r).replace("{y}", a);
              } catch {
              }
            },
            type: "sketchTileLayer",
            tileSize: t.tileSize,
            opacity: t.opacity,
            zIndex: t.zIndex,
            zooms: t.zooms
          });
        } catch {
        }
        return null;
      }, N = (t) => {
        try {
          return new m.value.ImageLayer({
            bounds: new m.value.Bounds(
              t.bounds[0],
              // 左下  手绘图左下相对于地图的经纬度
              t.bounds[1]
              // 右上  手绘图右上相对于地图的经纬度
            ),
            type: "sketchImageLayer",
            opacity: t.opacity,
            url: t.url,
            zIndex: t.zIndex,
            zooms: t.zooms
            // 设置可见级别，[最小级别，最大级别]
          });
        } catch {
        }
        return null;
      }, G = (t, e, r) => {
        try {
          const a = new t.HeatMapLayer({
            zIndex: 10,
            opacity: e.opacity,
            visible: !0,
            zooms: [2, 22]
          }), s = new t.GeoJSONSource({
            data: r
          });
          a.setSource(s, {
            radius: e.style.radius,
            unit: e.style.unit,
            height: e.style.height,
            opacity: e.style.opacity,
            gradient: T(e.style.gradient),
            value: function(n, l) {
              return l.coordinates[2] || 0;
            },
            min: e.style.min,
            max: e.style.max,
            // 4.6
            heightBezier: [0, 0.53, 0.37, 0.98]
          }), c.value.add(a);
        } catch {
        }
      }, O = async (t, e) => {
        try {
          const r = await me.get(e.geojson);
          if (r.status === 200) {
            const a = new t.GeoJSON({
              geoJSON: r.data,
              getPolygon: function(s, n) {
                const l = new t.Polygon({
                  path: n,
                  zIndex: e.zIndex,
                  fillColor: e.style.fillColor,
                  // 填充色
                  strokeOpacity: e.style.strokeOpacity,
                  // 轮廓线透明度
                  fillOpacity: e.style.fillOpacity,
                  // 填充色透明度
                  strokeColor: e.style.strokeColor,
                  // 线条颜色
                  strokeWeight: e.style.strokeWeight,
                  // 线条宽度
                  strokeStyle: e.style.strokeStyle
                  // 线条样式
                });
                return l.on("mouseover", () => {
                  l.setOptions({
                    fillOpacity: e.mouseover.fillOpacity,
                    fillColor: e.mouseover.fillColor,
                    strokeOpacity: e.mouseover.strokeOpacity,
                    strokeColor: e.mouseover.strokeColor,
                    strokeStyle: e.mouseover.strokeStyle,
                    strokeWeight: e.mouseover.strokeWeight
                  });
                }), l.on("mouseout", () => {
                  l.setOptions({
                    fillColor: e.style.fillColor,
                    // 填充色
                    strokeOpacity: e.style.strokeOpacity,
                    // 轮廓线透明度
                    fillOpacity: e.style.fillOpacity,
                    // 填充色透明度
                    strokeColor: e.style.strokeColor,
                    // 线条颜色
                    strokeWeight: e.style.strokeWeight,
                    // 线条宽度
                    strokeStyle: e.style.strokeStyle
                    // 线条样式
                  });
                }), l;
              }
            });
            i.value.add(a);
          }
        } catch {
        }
      }, H = (t, e, r) => {
        try {
          const a = new t.GeoJSONSource({
            data: r
          }), s = new t.PointLayer({
            zIndex: e.zIndex,
            blend: e.blend,
            visible: e.visible,
            opacity: e.opacity
          }), n = {
            radius: e.style.radius,
            unit: e.style.unit,
            color: e.style.color,
            borderWidth: e.style.borderWidth,
            blurWidth: e.style.blurWidth,
            borderColor: e.style.borderColor
          };
          s.setSource(a), s.setStyle(n), c.value.add(s), s.addAnimate({
            key: e.animate.key,
            value: e.animate.value,
            duration: e.animate.duration,
            easing: e.animate.easing,
            transform: e.animate.transform,
            random: e.animate.random,
            delay: e.animate.delay,
            yoyo: e.animate.yoyo,
            repeat: e.animate.repeat
          });
        } catch {
        }
      }, Z = (t, e, r) => {
        try {
          const a = new t.GeoJSONSource({
            data: r
          }), s = new t.ScatterLayer({
            loca: c.value,
            zIndex: e.zIndex,
            opacity: e.opacity,
            visible: e.visible,
            zooms: e.zooms
          });
          s.setSource(a), s.setStyle({
            unit: e.style.unit,
            size: e.style.size,
            borderWidth: e.style.borderWidth,
            texture: e.style.texture,
            duration: e.style.duration,
            animate: e.style.animate
          }), c.value.animate.start();
        } catch {
        }
      }, R = (t, e, r) => {
        try {
          const a = new t.GeoJSONSource({
            data: r
          }), s = new t.LabelsLayer({
            eventSupport: !0,
            visible: e.visible,
            zooms: e.zooms,
            opacity: e.opacity,
            collision: e.collision,
            allowCollision: e.allowCollision,
            zIndex: e.zIndex
          });
          s.setSource(a), s.setStyle({
            icon: {
              image: e.icon.image,
              size: e.icon.size,
              clipOrigin: e.icon.clipOrigin,
              offset: e.icon.offset,
              anchor: e.icon.anchor
            },
            text: {
              // 每项配置都可使用回调函数来动态配置
              content: (n, l) => l.properties[e.text.content],
              zooms: e.text.zooms,
              offset: e.text.offset,
              direction: e.text.direction,
              style: {
                fontSize: e.text.style.fontSize,
                fillColor: e.text.style.fillColor,
                strokeColor: e.text.style.strokeColor,
                strokeWidth: e.text.style.strokeWidth,
                padding: e.text.style.padding,
                backgroundColor: e.text.style.backgroundColor,
                borderColor: e.text.style.borderColor,
                borderWidth: e.text.style.borderWidth,
                fold: e.text.style.fold,
                fontWeight: e.text.style.fontWeight
              }
            }
          }), s.on("complete", () => {
            const n = s.getLabelsLayer().getAllOverlays();
            for (const l of n)
              l.on("click", (y) => {
              }), l.on("mouseover", (y) => {
              }), l.on("mouseout", (y) => {
              });
          }), c.value.add(s);
        } catch {
        }
      }, j = (t, e, r) => {
        try {
          const a = new t.GeoJSONSource({
            data: r
          }), s = new t.ZMarkerLayer({
            zIndex: e.signs.zIndex,
            visible: e.signs.visible,
            zooms: e.signs.zooms,
            opacity: e.signs.opacity,
            depth: !1
          });
          s.setSource(a), s.setStyle({
            content: (l, y) => `<div style="
                                width: ${e.signs.style.width}px; 
                                height: ${e.signs.style.height + 148}px;
                            ">
                            <p style="
                                display: block;
                                height:${e.signs.style.height}px;
                                background-image:${e.signs.style.background};
                                border:${e.signs.style.borderWidth}px ${e.signs.style.borderStyle} ${e.signs.style.borderColor};
                                border-radius: ${e.signs.style.borderRadius}px;
                                line-height:${e.signs.style.lineHeight}px;
                                text-align:${e.signs.style.textAlign};
                                font-size:${e.signs.style.fontSize}px;
                                color:${e.signs.style.fillColor};
                                margin:0;
                            ">
                                ${y.properties.name}
                            </p>
                        </div>`,
            unit: e.signs.style.unit,
            rotation: e.signs.style.rotation,
            alwaysFront: e.signs.style.alwaysFront,
            size: [e.signs.style.width, e.signs.style.height + 148],
            altitude: e.signs.style.altitude
          }), c.value.add(s);
          const n = new t.ZMarkerLayer({
            zIndex: e.landmark.zIndex,
            visible: e.landmark.visible,
            zooms: e.landmark.zooms,
            opacity: e.landmark.opacity,
            depth: !1
          });
          n.setSource(a), n.setStyle({
            content: (l, y) => `<div style="
                            width: ${e.landmark.style.size[0]}px;
                            height: ${e.landmark.style.size[1]}px;
                            background: url(${e.landmark.style.image});
                            background-size:contain;
                        ">
                        </div>`,
            unit: e.landmark.style.unit,
            rotation: e.landmark.style.rotation,
            alwaysFront: e.landmark.style.alwaysFront,
            size: e.landmark.style.size,
            altitude: e.landmark.style.altitude
          }), n.addAnimate({
            key: "altitude",
            value: [0, 1],
            random: e.landmark.animate.random,
            duration: e.landmark.animate.duration,
            transform: e.landmark.animate.transform,
            delay: e.landmark.animate.delay,
            yoyo: e.landmark.animate.yoyo,
            repeat: e.landmark.animate.repeat
          }), c.value.add(n), c.value.animate.start();
        } catch {
        }
      }, V = (t, e, r) => {
        const a = new t.PulseLinkLayer({
          zIndex: e.zIndex,
          opacity: e.opacity,
          visible: e.visible,
          zooms: e.zooms,
          depth: e.depth
        }), s = new t.GeoJSONSource({
          data: r
        });
        a.setSource(s), a.setStyle({
          unit: e.style.unit,
          dash: [4e4, 0, 4e4, 0],
          lineWidth: e.style.lineWidth,
          height: function(n, l) {
            return l.distance / 3 + e.style.height;
          },
          // altitude: 1000,
          smoothSteps: 30,
          speed: function(n, l) {
            return 1e5 + Math.random() * e.style.speed;
          },
          flowLength: e.style.flowLength,
          lineColors: e.style.lineColors,
          maxHeightScale: e.style.maxHeightScale,
          // 弧顶位置比例
          headColor: e.style.headColor,
          trailColor: e.style.trailColor
        }), i.value.on("click", (n) => {
          const l = a.queryFeature(n.pixel.toArray());
          l && (u("amap3d-scene-pulseLinkLayer", l), p.parseEvents(o.useEvents, "amap3d-scene-pulseLinkLayer", l));
        }), c.value.add(a), c.value.animate.start();
      }, f = (t, e) => {
        const r = {
          type: "FeatureCollection",
          features: []
        };
        return t.forEach((a, s) => {
          const n = {
            type: "Feature",
            id: de(),
            properties: {
              type: e === "Point" ? e : 0,
              ...a
            },
            geometry: {
              type: e,
              coordinates: a.value
            }
          };
          r.features.push(n);
        }), r;
      }, U = (t) => {
        i.value.setFeatures(t.config.features), i.value.setPitch(t.config.pitch), i.value.setRotation(t.config.rotation), i.value.setStatus({
          dragEnable: t.config.dragEnable,
          zoomEnable: t.config.zoomEnable,
          rotateEnable: t.config.rotateEnable,
          pitchEnable: t.config.pitchEnable
        }), t.config.plugin.scale.visible ? z.value.show() : z.value.hide(), t.config.plugin.toolBar.visible ? k.value.show() : k.value.hide(), t.config.plugin.controlBar.visible ? b.value.show() : b.value.hide();
      }, q = () => {
        i.value.clearMap(), c.value.clear(), L(m.value);
      }, K = (t) => {
        i.value.setMapStyle(t.config.mapStyle);
      }, Q = (t) => {
        i.value.setZoom(t.config.zoom, !1, 200);
      }, X = (t) => {
        i.value.setCenter(t.config.center, !1, 200);
      }, E = () => {
        i.value && (i.value.clearMap(), i.value.destroy(), i.value = null, c.value && (c.value.clear(), c.value.destroy(), c.value = null));
      };
      return oe(() => {
        setTimeout(() => {
          C(o.basicOption);
        }, 0);
      }), se(() => E()), {
        initAMap3d: C,
        updateAMapStyle: K,
        updateAMapConfig: U,
        updateAMapComponents: q,
        updateAMapZoom: Q,
        updateAMapCenter: X,
        amap3d: i,
        loading: S,
        AMapPrototype: m
      };
    }, {
      initAMap3d: g,
      updateAMapStyle: P,
      updateAMapConfig: x,
      updateAMapComponents: _,
      updateAMapZoom: $,
      updateAMapCenter: J,
      loading: D
    } = W();
    return d(() => o.basicOption.config, () => {
      x(o.basicOption);
    }, { deep: !0 }), d(() => o.basicOption.config.zoom, () => {
      $(o.basicOption);
    }, { deep: !0 }), d(() => o.basicOption.config.center, () => {
      J(o.basicOption);
    }, { deep: !0 }), d(() => o.basicOption.config.floors, w(() => {
      g(o.basicOption);
    }, 300), { deep: !0 }), d(() => o.basicOption.config.skyColor, w(() => {
      g(o.basicOption);
    }, 300), { deep: !0 }), d(() => o.basicOption.widgets, () => {
      _();
    }, { deep: !0 }), d(() => o.basicOption.config.mapStyle, () => {
      P(o.basicOption);
    }, { deep: !0 }), d(() => o.basicOption.basic, () => {
      g(o.basicOption);
    }, { deep: !0 }), d(() => o.sources, () => {
      g(o.basicOption);
    }, { deep: !0 }), A({
      refresh: () => g(o.basicOption),
      refreshView: () => x(o.basicOption),
      refreshData: () => g(o.basicOption)
    }), (i, c) => (te(), ee("div", {
      class: ae(["amap-3d-wrap", { show: re(D) }])
    }, ge, 2));
  }
});
export {
  Zr as default
};
