import { defineComponent as M, watch as d, createElementBlock as ee, openBlock as te, normalizeClass as re, unref as ae, createElementVNode as oe, shallowRef as E, ref as v, onMounted as ie, onUnmounted as se } from "vue";
import le from "@amap/amap-jsapi-loader";
import ne from "axios";
import { nanoid as me } from "nanoid";
import { debounce as z } 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";
import "../commons/custom-component-render/index.mjs";
import "../hj-componets/zv-hj-tree-list/index.mjs";
import "../hj-componets/zv-hj-model-resource/index.mjs";
import "../hj-componets/zv-hj-one-map-config/index.mjs";
import "../hj-componets/zv-hj-video-control/index.mjs";
import "../hj-componets/zv-hj-video-page/index.mjs";
import "../hj-componets/zv-hj-password-input/index.mjs";
import "../hj-componets/zv-hj-carousel/index.mjs";
import "../hj-componets/zv-hj-video-monitor/index.mjs";
import "../hj-componets/zv-hj-scene-amap2d/index.mjs";
import "../hj-componets/zv-hj-scene-amap3d/index.mjs";
import "../hj-componets/zv-hj-person-face/index.mjs";
import "../hj-componets/zv-hj-resource-type-phone/index.mjs";
import "../hj-componets/zv-hj-tree-list-phone/index.mjs";
import "../hj-componets/zv-hj-video-page-phone/index.mjs";
import "../hj-componets/zv-hj-model-resource-phone/index.mjs";
import "../hj-componets/zv-hj-bottom-suspend/index.mjs";
import "../hj-componets/zv-hj-pagination/index.mjs";
import "../hj-componets/zv-hj-password-input-phone/index.mjs";
/* empty css                        */
/* empty css                               */
import { SHJDatasourceV2 as ce } from "../../plugins/datasource/index.mjs";
import { SHJParseEvent as p } from "../../plugins/event/index.mjs";
const de = M({ name: "zv-scene-amap3d" }), oo = /* @__PURE__ */ M({
  ...de,
  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(I, { expose: A, emit: B }) {
    const o = I, u = B;
    p.parseEvents(o.useEvents, "on-page-loaded", null);
    const W = () => {
      const s = E(), m = E(), x = v(!1), h = v(), b = v(), k = v(), c = v(), C = (t) => {
        O(), window._AMapSecurityConfig = {
          securityJsCode: t.basic.securityJsCode
        }, le.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) => {
          c.value = e;
          const a = new c.value.createDefaultLayer({
            visible: !0,
            // 是否可见
            opacity: 1,
            // 透明度
            zIndex: 0
            // 叠加层级
          });
          s.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: [a]
          }), m.value = new window.Loca.Container({
            map: s.value
          }), k.value = new c.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"
            }
          }), s.value.addControl(k.value), h.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"
            }
          }), s.value.addControl(h.value), b.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"
            }
          }), s.value.addControl(b.value), S(e), s.value.on("complete", () => {
            setTimeout(() => {
              x.value = !0, u("amap3d-scene-success"), p.parseEvents(o.useEvents, "amap3d-scene-success", null);
            }, 666);
          }), s.value.on("zoomstart", () => {
            u("amap3d-scene-zoomstart"), p.parseEvents(o.useEvents, "amap3d-scene-zoomstart", null);
          }), s.value.on("zoomend", () => {
            u("amap3d-scene-zoomend"), p.parseEvents(o.useEvents, "amap3d-scene-zoomend", null);
          }), s.value.on("click", (r) => {
            u("amap3d-scene-mapclick", r.lnglat), p.parseEvents(o.useEvents, "amap3d-scene-mapclick", r.lnglat);
          }), s.value.on("dragstart", (r) => {
            u("amap3d-scene-dragstart", r.lnglat), p.parseEvents(o.useEvents, "amap3d-scene-dragstart", r.lnglat);
          }), s.value.on("dragend", (r) => {
            u("amap3d-scene-dragend", r.lnglat), p.parseEvents(o.useEvents, "amap3d-scene-dragend", r.lnglat);
          });
        }).catch((e) => {
        });
      }, S = z((t) => {
        o.sources && o.sources.length > 0 ? ce.parse({
          tId: o.uuid,
          sources: o.sources,
          callback: (a) => {
            try {
              const r = o.basicOption.widgets.find((i) => i._sourceId === a.id);
              r && r.type === "heatmap" && G(window.Loca, r, f(a.data[0].data, "Point")), r && r.type === "dotlayers" && H(window.Loca, r, f(a.data[0].data, "Point")), r && r.type === "scatter" && Z(window.Loca, r, f(a.data[0].data, "Point")), r && r.type === "labelsLayer" && R(window.Loca, r, f(a.data[0].data, "Point")), r && r.type === "signagePoints" && j(window.Loca, r, f(a.data[0].data, "Point")), r && r.type === "pulseLinkLayer" && V(window.Loca, r, f(a.data[0].data, "LineString"));
            } catch {
            }
            o.basicOption.widgets.filter((r) => r.type === "boundary").forEach((r) => {
              L(t, r);
            });
          }
        }) : o.basicOption.widgets.filter((a) => a.type === "boundary").forEach((a) => {
          L(t, a);
        });
        const e = s.value.getLayers();
        for (let a = 0; a < e.length; a++)
          (e[a].type === "sketchTileLayer" || e[a]._opts.type === "sketchImageLayer") && s.value.removeLayer(e[a]);
        o.basicOption.widgets.filter((a) => a.type === "sketchTile").forEach((a) => {
          const r = N(a);
          r && s.value.addLayer(r);
        }), o.basicOption.widgets.filter((a) => a.type === "sketchImage").forEach((a) => {
          const r = _(a);
          s.value.addLayer(r);
        });
      }, 200), F = (t) => {
        const a = t.slice(t.indexOf("(") + 1, t.lastIndexOf(")")).split(",").map((i) => i.trim()), r = {};
        for (let i = 1; i < a.length; i++) {
          const n = a[i].split(" "), l = n[0], y = parseFloat(n[1]) / 100, Y = Math.round(y * 100) / 100;
          r[Y] = l;
        }
        return r;
      }, N = (t) => {
        try {
          return new c.value.TileLayer({
            bounds: new c.value.Bounds(
              t.bounds[0],
              t.bounds[1]
            ),
            getTileUrl: function(a, r, i) {
              try {
                return t.url.replace("{z}", i).replace("{x}", a).replace("{y}", r);
              } catch {
              }
            },
            type: "sketchTileLayer",
            tileSize: t.tileSize,
            opacity: t.opacity,
            zIndex: t.zIndex,
            zooms: t.zooms
          });
        } catch {
        }
        return null;
      }, _ = (t) => {
        try {
          return new c.value.ImageLayer({
            bounds: new c.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, a) => {
        try {
          const r = new t.HeatMapLayer({
            zIndex: 10,
            opacity: e.opacity,
            visible: !0,
            zooms: [2, 22]
          }), i = new t.GeoJSONSource({
            data: a
          });
          r.setSource(i, {
            radius: e.style.radius,
            unit: e.style.unit,
            height: e.style.height,
            opacity: e.style.opacity,
            gradient: F(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]
          }), m.value.add(r);
        } catch {
        }
      }, L = async (t, e) => {
        try {
          const a = await ne.get(e.geojson);
          if (a.status === 200) {
            const r = new t.GeoJSON({
              geoJSON: a.data,
              getPolygon: function(i, 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;
              }
            });
            s.value.add(r);
          }
        } catch {
        }
      }, H = (t, e, a) => {
        try {
          const r = new t.GeoJSONSource({
            data: a
          }), i = 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
          };
          i.setSource(r), i.setStyle(n), m.value.add(i), i.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, a) => {
        try {
          const r = new t.GeoJSONSource({
            data: a
          }), i = new t.ScatterLayer({
            loca: m.value,
            zIndex: e.zIndex,
            opacity: e.opacity,
            visible: e.visible,
            zooms: e.zooms
          });
          i.setSource(r), i.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
          }), m.value.animate.start();
        } catch {
        }
      }, R = (t, e, a) => {
        try {
          const r = new t.GeoJSONSource({
            data: a
          }), i = new t.LabelsLayer({
            eventSupport: !0,
            visible: e.visible,
            zooms: e.zooms,
            opacity: e.opacity,
            collision: e.collision,
            allowCollision: e.allowCollision,
            zIndex: e.zIndex
          });
          i.setSource(r), i.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
              }
            }
          }), i.on("complete", () => {
            const n = i.getLabelsLayer().getAllOverlays();
            for (const l of n)
              l.on("click", (y) => {
              }), l.on("mouseover", (y) => {
              }), l.on("mouseout", (y) => {
              });
          }), m.value.add(i);
        } catch {
        }
      }, j = (t, e, a) => {
        try {
          const r = new t.GeoJSONSource({
            data: a
          }), i = new t.ZMarkerLayer({
            zIndex: e.signs.zIndex,
            visible: e.signs.visible,
            zooms: e.signs.zooms,
            opacity: e.signs.opacity,
            depth: !1
          });
          i.setSource(r), i.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
          }), m.value.add(i);
          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(r), 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
          }), m.value.add(n), m.value.animate.start();
        } catch {
        }
      }, V = (t, e, a) => {
        const r = new t.PulseLinkLayer({
          zIndex: e.zIndex,
          opacity: e.opacity,
          visible: e.visible,
          zooms: e.zooms,
          depth: e.depth
        }), i = new t.GeoJSONSource({
          data: a
        });
        r.setSource(i), r.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
        }), s.value.on("click", (n) => {
          const l = r.queryFeature(n.pixel.toArray());
          l && (u("amap3d-scene-pulseLinkLayer", l), p.parseEvents(o.useEvents, "amap3d-scene-pulseLinkLayer", l));
        }), m.value.add(r), m.value.animate.start();
      }, f = (t, e) => {
        const a = {
          type: "FeatureCollection",
          features: []
        };
        return t.forEach((r, i) => {
          const n = {
            type: "Feature",
            id: me(),
            properties: {
              type: e === "Point" ? e : 0,
              ...r
            },
            geometry: {
              type: e,
              coordinates: r.value
            }
          };
          a.features.push(n);
        }), a;
      }, U = (t) => {
        s.value.setFeatures(t.config.features), s.value.setPitch(t.config.pitch), s.value.setRotation(t.config.rotation), s.value.setStatus({
          dragEnable: t.config.dragEnable,
          zoomEnable: t.config.zoomEnable,
          rotateEnable: t.config.rotateEnable,
          pitchEnable: t.config.pitchEnable
        }), t.config.plugin.scale.visible ? k.value.show() : k.value.hide(), t.config.plugin.toolBar.visible ? b.value.show() : b.value.hide(), t.config.plugin.controlBar.visible ? h.value.show() : h.value.hide();
      }, q = () => {
        s.value.clearMap(), m.value.clear(), S(c.value);
      }, K = (t) => {
        s.value.setMapStyle(t.config.mapStyle);
      }, Q = (t) => {
        s.value.setZoom(t.config.zoom, !1, 200);
      }, X = (t) => {
        s.value.setCenter(t.config.center, !1, 200);
      }, O = () => {
        s.value && (s.value.clearMap(), s.value.destroy(), s.value = null, m.value && (m.value.clear(), m.value.destroy(), m.value = null));
      };
      return ie(() => {
        setTimeout(() => {
          C(o.basicOption);
        }, 0);
      }), se(() => O()), {
        initAMap3d: C,
        updateAMapStyle: K,
        updateAMapConfig: U,
        updateAMapComponents: q,
        updateAMapZoom: Q,
        updateAMapCenter: X,
        amap3d: s,
        loading: x,
        AMapPrototype: c
      };
    }, {
      initAMap3d: g,
      updateAMapStyle: P,
      updateAMapConfig: w,
      updateAMapComponents: $,
      updateAMapZoom: J,
      updateAMapCenter: D,
      loading: T
    } = W();
    return d(() => o.basicOption.config, () => {
      w(o.basicOption);
    }, { deep: !0 }), d(() => o.basicOption.config.zoom, () => {
      J(o.basicOption);
    }, { deep: !0 }), d(() => o.basicOption.config.center, () => {
      D(o.basicOption);
    }, { deep: !0 }), d(() => o.basicOption.config.floors, z(() => {
      g(o.basicOption);
    }, 300), { deep: !0 }), d(() => o.basicOption.config.skyColor, z(() => {
      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: () => w(o.basicOption),
      refreshData: () => g(o.basicOption)
    }), (s, m) => (te(), ee("div", {
      class: re(["amap-3d-wrap", { show: ae(T) }])
    }, m[0] || (m[0] = [
      oe("div", {
        id: "zerov-amap-3d",
        class: "zerov-amap-container"
      }, null, -1)
    ]), 2));
  }
});
export {
  oo as default
};
