import { defineComponent as b, ref as s, onMounted as E, watch as k, createElementBlock as L, openBlock as p, createElementVNode as O, unref as z, createVNode as W, withCtx as N, createBlock as u, createCommentVNode as c } from "vue";
import { cloneDeep as m, debounce as I, isEqual as g } from "lodash";
import { nanoid as T } from "nanoid";
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 "./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 "../scene-amap3d/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 V } from "../../plugins/datasource/index.mjs";
import { SHJParseEvent as d } from "../../plugins/event/index.mjs";
import A from "../../commons/core/earth/main.vue.mjs";
import v from "../../commons/core/earth/border.vue.mjs";
const D = { class: "zerov-widget" }, j = ["id"], F = b({ name: "zv-map-earth-hacker" }), Ii = /* @__PURE__ */ b({
  ...F,
  props: {
    basicOption: {},
    sources: {},
    useEvents: {},
    uuid: {}
  },
  emits: ["on-success"],
  setup(w, { expose: B, emit: S }) {
    const C = S, o = w, _ = T(), l = s(), y = s(!0), r = s(m(o.basicOption)), e = I((i = !1) => {
      y.value = !0, r.value = m(o.basicOption), o.sources && o.sources.length > 0 ? V.parse({
        tId: o.uuid,
        sources: o.sources,
        callback: (t) => {
          try {
            d.parseEvents(o.useEvents, "dataListener", t.data);
            const n = r.value.lines && r.value.lines.find((a) => a._sourceId === t.id);
            n && (n.data = t.data[0].data);
            const h = r.value.flylines && r.value.flylines.find((a) => a._sourceId === t.id);
            h && (h.data = t.data[0].data);
            const f = r.value.lightBeams && r.value.lightBeams.find((a) => a._sourceId === t.id);
            f && (f.data = t.data[0].data), !i && l.value.refresh();
          } catch {
            d.parseEvents(o.useEvents, "dataListener", null);
          }
        }
      }) : !i && l.value.refresh();
    }, 200);
    E(() => e(!0)), k(() => m(o.basicOption), (i, t) => {
      g(i, t) || e();
    }, { deep: !0 }), k(() => m(o.sources), (i, t) => {
      g(i, t) || e();
    }, { deep: !0 }), B({
      refresh: () => e(),
      refreshView: () => e(),
      refreshData: () => e()
    });
    const x = () => {
      y.value = !1, C("on-success"), d.parseEvents(o.useEvents, "on-success", null);
    };
    return (i, t) => (p(), L("div", D, [
      O("div", {
        id: z(_),
        class: "widget"
      }, [
        W(A, {
          ref_key: "earthRef",
          ref: l,
          style: { height: "100%" },
          background: r.value.background,
          "is-background": r.value.isBackground,
          fog: r.value.fog,
          "fog-color": r.value.fogColor,
          "fog-near": r.value.fogNear,
          "fog-far": r.value.fogFar,
          stats: r.value.stats,
          "stats-type": r.value.statsType,
          radius: r.value.radius,
          subdivision: r.value.subdivision,
          animation: r.value.animation,
          "animation-speed": r.value.animationSpeed,
          texture: r.value.texture,
          color: r.value.color,
          opacity: r.value.opacity,
          transparent: r.value.transparent,
          wireframe: r.value.wireframe,
          label: r.value.label,
          particle: r.value.particle,
          "particle-color": r.value.particleColor,
          "particle-size": r.value.particleSize,
          aperture: r.value.aperture,
          "aperture-color": r.value.apertureColor,
          "aperture-opacity": r.value.apertureOpacity,
          "aperture-transparent": r.value.apertureTransparent,
          "aperture-depth-write": r.value.apertureDepthWrite,
          "cloud-cover": r.value.cloudCover,
          "cloud-cover-color": r.value.cloudCoverColor,
          "cloud-cover-opacity": r.value.cloudCoverOpacity,
          "cloud-cover-transparent": r.value.cloudCoverTransparent,
          "cloud-cover-animation": r.value.cloudCoverAnimation,
          "cloud-cover-animation-speed": r.value.cloudCoverAnimationSpeed,
          "starry-sky": r.value.starrySky,
          "starry-sky-texture": r.value.starrySkyTexture,
          "starry-sky-number": r.value.starrySkyNumber,
          "starry-sky-size": r.value.starrySkySize,
          "starry-sky-color": r.value.starrySkyColor,
          "starry-sky-opacity": r.value.starrySkyOpacity,
          "starry-sky-animation": r.value.starrySkyAnimation,
          "starry-sky-animation-speed": r.value.starrySkyAnimationSpeed,
          "ambient-light-color": r.value.ambientLightColor,
          "ambient-light-intensity": r.value.ambientLightIntensity,
          "directional-light-x": r.value.directionalLightX,
          "directional-light-y": r.value.directionalLightY,
          "directional-light-z": r.value.directionalLightZ,
          "directional-light-intensity": r.value.directionalLightIntensity,
          "directional-light-color": r.value.directionalLightColor,
          "is-composer": r.value.isComposer,
          composer: r.value.composer,
          flylines: r.value.flylines,
          lines: r.value.lines,
          "light-beam": r.value.lightBeams,
          onOnSuccess: x
        }, {
          default: N(() => [
            r.value.chinaBorderShow ? (p(), u(v, {
              key: 0,
              geojson: "china",
              color: r.value.chinaBorderColor,
              width: r.value.chinaBorderWidth,
              opacity: r.value.chinaBorderOpacity,
              wakeline: r.value.chinaBorderWakeline,
              "wakeline-number": r.value.chinaBorderWakelineNumber
            }, null, 8, ["color", "width", "opacity", "wakeline", "wakeline-number"])) : c("", !0),
            r.value.china2BorderShow ? (p(), u(v, {
              key: 1,
              geojson: "china-border",
              color: r.value.china2BorderColor,
              width: r.value.china2BorderWidth,
              opacity: r.value.china2BorderOpacity,
              wakeline: r.value.china2BorderWakeline,
              "wakeline-number": r.value.china2BorderWakelineNumber
            }, null, 8, ["color", "width", "opacity", "wakeline", "wakeline-number"])) : c("", !0),
            r.value.worldBorderShow ? (p(), u(v, {
              key: 2,
              geojson: "world",
              color: r.value.worldBorderColor,
              width: r.value.worldBorderWidth,
              opacity: r.value.worldBorderOpacity,
              wakeline: r.value.worldBorderWakeline,
              "wakeline-number": r.value.worldBorderWakelineNumber
            }, null, 8, ["color", "width", "opacity", "wakeline", "wakeline-number"])) : c("", !0)
          ]),
          _: 1
        }, 8, ["background", "is-background", "fog", "fog-color", "fog-near", "fog-far", "stats", "stats-type", "radius", "subdivision", "animation", "animation-speed", "texture", "color", "opacity", "transparent", "wireframe", "label", "particle", "particle-color", "particle-size", "aperture", "aperture-color", "aperture-opacity", "aperture-transparent", "aperture-depth-write", "cloud-cover", "cloud-cover-color", "cloud-cover-opacity", "cloud-cover-transparent", "cloud-cover-animation", "cloud-cover-animation-speed", "starry-sky", "starry-sky-texture", "starry-sky-number", "starry-sky-size", "starry-sky-color", "starry-sky-opacity", "starry-sky-animation", "starry-sky-animation-speed", "ambient-light-color", "ambient-light-intensity", "directional-light-x", "directional-light-y", "directional-light-z", "directional-light-intensity", "directional-light-color", "is-composer", "composer", "flylines", "lines", "light-beam"])
      ], 8, j)
    ]));
  }
});
export {
  Ii as default
};
