/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	// The require scope
/******/ 	var __webpack_require__ = {};
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "CompareMapTree": function() { return /* reexport */ CompareMapTree; },
  "CompareMapViewModel": function() { return /* reexport */ CompareMapViewModel; },
  "MapCompareViewModel": function() { return /* reexport */ MapCompare; },
  "default": function() { return /* reexport */ CompareMap; }
});

;// CONCATENATED MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject = require("vue");
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/_utils/mitt"
var mitt_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/mitt");
var mitt_default = /*#__PURE__*/__webpack_require__.n(mitt_namespaceObject);
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/_utils/gis-utils"
var gis_utils_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/gis-utils");
;// CONCATENATED MODULE: ./src/leaflet/comparemap/CompareMapViewModel.js


/**
 * Author: 朱鹏超
 * Date: 2022-11-23
 * Description: 2d多窗口对比逻辑层
 */



/**
 * @class CompareMapViewModel
 * @classdesc 2d多窗口对比逻辑层
 * @param {string} mapTarget - 绑定的当前mapview
 */

class CompareMapViewModel extends (mitt_default()) {
  constructor(mapTarget) {
    super();

    _defineProperty(this, "_props", null);

    _defineProperty(this, "_webMap", null);

    this._props = {
      mapTarget
    }; // 事件绑定this

    this._loadedAsync = this._loadedAsync.bind(this);
    this._loadedSync = this._loadedSync.bind(this);
    this._setLayerData = this._setLayerData.bind(this);

    this._registerEvents();
  }
  /**
   * @description 注册事件
   * @private
   */


  _registerEvents() {
    // mapview初始化结束监听 如果view已经存在了，mounted事件不会添加监听
    gis_utils_namespaceObject.mapViewUtils.bindViewEvents("mounted", this._loadedAsync, this._props.mapTarget); // 同步

    gis_utils_namespaceObject.utils.getWebMap(this._props.mapTarget, this._loadedSync);
  }
  /**
   * @description 异步加载
   * @private
   */


  _loadedAsync(e) {
    // 如果图层变化事件是自己触发的 则不继续执行 避免死循环
    if (e.eventTarget && e.eventTarget === this) {
      return;
    }

    this._webMap = e.target;

    this._setLayerData();

    this._getWebMap();
  }
  /**
   * @description 同步加载
   * @private
   */


  _loadedSync(e) {
    this._webMap = e;

    this._setLayerData();
  }
  /**
   * @description 设置图层树数据
   * @private
   */


  _setLayerData() {
    let layerCheckedKeys = this._webMap._layerCheckedKeys;
    let layerCheckedList = this._webMap._layerCheckedList;
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.nextTick)(() => {
      this.fire("setLayerData", {
        layerCheckedKeys,
        layerCheckedList
      });
    });
  }
  /**
   * @description 二维勾选图层逻辑
   * @param {string} value - 选中的图层的key值，即id
   * @param {number} visible - 选中图层的透明度，默认为1
   */


  setLayerVisible(value, visible) {
    this._webMap.setLayerOpacityStateById(value, visible ? 1 : 0);
  }
  /**
   * @description 获取webmap
   * @private
   */


  _getWebMap() {
    this.fire("getWebMap", {
      webMap: this._webMap
    });
  }

}
;// CONCATENATED MODULE: ./src/leaflet/comparemap/MapCompareViewModel.js
/**
 * Author: 朱鹏超
 * Date: 2022-11-23
 * Description: 2d多窗口对比操作逻辑层
 */

/**
 * @class MapCompare
 * @classdesc 2d多窗口对比操作逻辑层
 * @param {string} currentMapId - 当前窗口地图id
 * @param {Object} mainMapView - 当前窗口地图
 */
class MapCompare {
  constructor(currentMapId, mainMapView) {
    // 对比地图
    this.mapCompareConfig = {}; // 主要的地图

    this.mainMapView = mainMapView; // 当前操作图层ID

    this.currentMapId = currentMapId; // 当前地图已关闭二、四窗口

    this.isClose = false; // 当前地图的右键菜单

    this.checkedMenu = null; // 鼠标移动多少会触发一次同步, 值越小越灵敏，请求服务越多

    this.moveDistance = 5; // 是否在移动

    this.isMove = false; // 转屏幕坐标

    this.project = this.mainMapView.map.latLngToLayerPoint.bind(this.mainMapView.map); // 初始增加主地图

    this.mapCompareConfig[mainMapView.target] = {
      mapView: mainMapView,
      isSynchro: true,
      // 是否同步
      marker: null,
      // 鼠标移动的圆标示
      startPoint: null // 地图开始移动的位置

    };
  }

}
/**
 * @description 增加主地图事件
 */

MapCompare.prototype.addMainMapEvent = function () {
  this.mainMapView.map.on("mouseover", this.onMousedown, this); // 鼠标移动事件

  this.mainMapView.map.on("mousemove", this.onMousemove, this); // 鼠标移出事件

  this.mainMapView.map.on("mouseout", this.onMouseout, this); // 鼠标按下事件

  this.mainMapView.map.on("mousedown", this.onMousedown, this); // 地图移动事件

  this.mainMapView.map.on("move", this.onMove, this); // 地图移动开始事件

  this.mainMapView.map.on("movestart", this.onMovestart, this); // 地图移动结束事件

  this.mainMapView.map.on("moveend", this.onMoveend, this); // 鼠标缩放事件

  this.mainMapView.map.on("zoomend", this.onZoomend, this);
};
/**
 * @description 移出主地图事件
 */


MapCompare.prototype.removeMainMapEvent = function () {
  this.mainMapView.map.off("mouseover", this.onMousedown, this); // 鼠标移动事件

  this.mainMapView.map.off("mousemove", this.onMousemove, this); // 鼠标移出事件

  this.mainMapView.map.off("mouseout", this.onMouseout, this); // 鼠标按下事件

  this.mainMapView.map.off("mousedown", this.onMousedown, this); // 地图移动事件

  this.mainMapView.map.off("move", this.onMove, this); // 地图移动开始事件

  this.mainMapView.map.off("movestart", this.onMovestart, this); // 地图移动结束事件

  this.mainMapView.map.off("moveend", this.onMoveend, this); // 鼠标缩放事件

  this.mainMapView.map.off("zoomend", this.onZoomend, this);
};
/**
 * @description
 * @param {Object} compMapView - 窗口地图
 */


MapCompare.prototype.addMap = function (compMapView) {
  compMapView.map.on("mouseover", this.onMousedown, this); // 鼠标移动事件

  compMapView.map.on("mousemove", this.onMousemove, this); // 鼠标移出事件

  compMapView.map.on("mouseout", this.onMouseout, this); // 鼠标按下事件

  compMapView.map.on("mousedown", this.onMousedown, this); // 地图移动事件

  compMapView.map.on("move", this.onMove, this); // 地图移动开始事件

  compMapView.map.on("movestart", this.onMovestart, this); // 地图移动结束事件

  compMapView.map.on("moveend", this.onMoveend, this); // 鼠标缩放事件

  compMapView.map.on("zoomend", this.onZoomend, this);
  this.mapCompareConfig[compMapView.target] = {
    mapView: compMapView,
    isSynchro: true,
    marker: null,
    startPoint: null
  };
  compMapView.map.setView(this.mainMapView.map.getCenter(), this.mainMapView.map.getZoom());
};
/**
 * @description 鼠标按下事件
 * @param {Object} e
 */


MapCompare.prototype.onMousedown = function (e) {
  let mapId = e.target._container.id;

  if (this.currentMapId !== mapId) {
    this.currentMapId = mapId;
  }
};
/**
 * @description 地图移动事件
 * @param {Object} e
 */


MapCompare.prototype.onMove = function (e) {
  let mapId = e.target._container.id;

  if (this.currentMapId === mapId) {
    this.isMove = false;
  }

  if (this.mapCompareConfig[mapId].isSynchro) {
    let movePoint = this.project(e.target.getCenter());

    if (this._isTrueDistanceMove(this.mapCompareConfig[mapId].startPoint, movePoint)) {
      this.mapCompareConfig[mapId].startPoint = movePoint;
      this.mapMove(e, mapId);
    }
  }
};
/**
 * @description 地图移动开始事件
 * @param {Object} e
 */


MapCompare.prototype.onMovestart = function (e) {
  let mapId = e.target._container.id;

  if (this.currentMapId === mapId) {
    this.isMove = true;
  }

  this.mapCompareConfig[mapId].startPoint = this.project(e.target.getCenter());
};
/**
 * @description 地图移动结束事件
 * @param {Object} e
 */


MapCompare.prototype.onMoveend = function (e) {
  let mapId = e.target._container.id;

  if (this.currentMapId === mapId) {
    this.isMove = false;
  }

  if (this.mapCompareConfig[mapId].isSynchro) {
    this.mapMove(e, mapId);
  }
};
/**
 * @description 鼠标缩放事件
 * @param {Object} e
 */


MapCompare.prototype.onZoomend = function (e) {
  let mapId = e.target._container.id;

  if (this.currentMapId === mapId) {
    this.isMove = false;
  }

  if (this.mapCompareConfig[mapId].isSynchro) {
    this.mapMove(e, mapId);
  }
};
/**
 * @description 鼠标移动事件
 * @param {Object} e
 */


MapCompare.prototype.onMousemove = function (e) {
  let lat = e.latlng.lat.toFixed(4);
  let lng = e.latlng.lng.toFixed(4);
  let mapId = this.currentMapId; // 给不同地图添加marker

  if (!this.isClose) {
    if (mapId === this.mainMapView.target) {
      this.moveMarker(lat, lng, "map2");
      this.moveMarker(lat, lng, "map3");
      this.moveMarker(lat, lng, "map4");
    } else if (mapId === "map2") {
      this.moveMarker(lat, lng, this.mainMapView.target);
      this.moveMarker(lat, lng, "map3");
      this.moveMarker(lat, lng, "map4");
    } else if (mapId === "map3") {
      this.moveMarker(lat, lng, this.mainMapView.target);
      this.moveMarker(lat, lng, "map2");
      this.moveMarker(lat, lng, "map4");
    } else if (mapId === "map4") {
      this.moveMarker(lat, lng, this.mainMapView.target);
      this.moveMarker(lat, lng, "map2");
      this.moveMarker(lat, lng, "map3");
    }
  }
};
/**
 * @description 鼠标移出事件
 * @param {Object} e
 */


MapCompare.prototype.onMouseout = function (e) {
  for (let mapId in this.mapCompareConfig) {
    if (this.mapCompareConfig[mapId]["marker"] !== null) {
      this.mapCompareConfig[mapId]["marker"].remove();
      this.mapCompareConfig[mapId]["marker"] = null;
    }
  }
};
/**
 * @description 地图移动事件
 * @param {Object} e
 * @param {string} mapId - 地图id
 */


MapCompare.prototype.mapMove = function (e, mapId) {
  if (this.currentMapId === mapId) {
    let map = e.target;

    for (let name in this.mapCompareConfig) {
      if (name !== mapId && this.mapCompareConfig[name].isSynchro) {
        this.mapCompareConfig[name].mapView.map.setView(map.getCenter(), map.getZoom());
      }
    }
  }
};
/**
 * @description 创建鼠标移动的圆标示
 * @param {number} lat - 纬度
 * @param {number} lng - 经度
 * @param {string} mapName - 地图name
 */


MapCompare.prototype.moveMarker = function (lat, lng, mapName) {
  for (let name in this.mapCompareConfig) {
    if (name === mapName) {
      if (this.mapCompareConfig[mapName].marker === null) {
        this.mapCompareConfig[mapName].marker = L.circleMarker([lat, lng], {
          stroke: true,
          color: "#aaaaaa",
          weight: 1,
          opacity: 1,
          fillColor: "#0087FF",
          fillOpacity: 0.6,
          radius: 15
        });
        this.mapCompareConfig[mapName].marker.addTo(this.mapCompareConfig[mapName].mapView.map);
      }

      this.mapCompareConfig[mapName].marker.setLatLng([Number(lat), Number(lng)]);
    }
  }
};
/**
 * @description 判断是否大于或等于有效触发同步移动的距离
 * @param {*} startPoint
 * @param {*} movePoint
 * @returns
 */


MapCompare.prototype._isTrueDistanceMove = function (startPoint, movePoint) {
  if (this.moveDistance === 0) {
    return true;
  }

  if (startPoint === null) {
    return false;
  }

  let distance = Math.sqrt(Math.pow(startPoint.x - movePoint.x, 2) + Math.pow(startPoint.y - movePoint.y, 2));

  if (distance >= this.moveDistance) {
    return true;
  }

  return false;
};
/*
 * @description 关闭对比销毁数据
 */


MapCompare.prototype.destroy = function () {
  // 销毁地图对象
  for (let target in this.mapCompareConfig) {
    if (target !== this.mainMapView.target) {
      delete this.mapCompareConfig[target];
    }
  } // 当前操作图层ID


  this.currentMapId = this.mainMapView.target;
  this.isMove = false; // 移出主地图事件

  this.removeMainMapEvent();
};
;// CONCATENATED MODULE: external "@element-plus/icons-vue"
var icons_vue_namespaceObject = require("@element-plus/icons-vue");
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/_utils/util"
var util_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/util");
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/leaflet/comparemap/CompareMap.vue?vue&type=script&setup=true&lang=js

const _hoisted_1 = {
  class: "kq-2d-compare-map"
};
const _hoisted_2 = {
  key: 0,
  class: "anmimate-box4"
};
const _hoisted_3 = {
  key: 0,
  class: "anmimate-box5"
};




 // 图层树1

const __default__ = {
  name: "Kq2dCompareMap"
};
/* harmony default export */ var CompareMapvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
  props: {
    mapTarget: String
  },
  emits: ["back"],

  setup(__props, {
    expose,
    emit
  }) {
    const props = __props;
    let tree1 = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false); // 图层树2

    let tree2 = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false); // 图层树3

    let tree3 = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false); // 图层树4

    let tree4 = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false); // 二窗口

    let twoShow = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false); // 四窗口

    let fourShow = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false); // 分屏返回按钮

    let btnShow = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false); // 地图窗口参数

    let mapProps = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(); // 二四窗口样式

    let map2Style = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)("");
    let viewModel = null; // 窗口操作变量

    let mapCompare = null;
    let mapOptions = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({
      zoomControl: false
    }); // 二窗口容器

    let map2_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null); // 三窗口容器

    let map3_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null); // 四窗口容器

    let map4_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null); // 分发组件返回事件

    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
      viewModel = new CompareMapViewModel(props.mapTarget);
      viewModel.on("getWebMap", _data => {
        mapProps.value = _data.webMap.webMapInfo;
        mapCompare = new MapCompare(_data.webMap.target, _data.webMap);
      });
    });
    /**
     * 打开二窗口，初始化地图
     */

    function setTwoMap() {
      // 初始化第二张地图
      mapCompare.isClose = false;
      btnShow.value = true;
      twoShow.value = true;
      map2Style.value = "";
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.nextTick)(() => {
        tree1.value = true;
        tree2.value = true;
        console.log();
        mapCompare.addMap(map2_ref.value.getWebMap());
        resetMainWin("map-style", 600); // 增加主地图联动事件

        mapCompare.addMainMapEvent();
      });
    }
    /**
     * 打开四窗口，初始化地图
     */


    function setFourMap() {
      mapCompare.isClose = false;
      btnShow.value = true;
      twoShow.value = true;
      fourShow.value = true;
      map2Style.value = "height: 50%;border-bottom:solid 2px var(--kq-color-primary);";
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.nextTick)(() => {
        tree1.value = true;
        tree2.value = true;
        tree3.value = true;
        tree4.value = true;
        mapCompare.addMap(map2_ref.value.getWebMap());
        mapCompare.addMap(map3_ref.value.getWebMap());
        mapCompare.addMap(map4_ref.value.getWebMap());
        resetMainWin("map-style-4", 600); // 增加主地图联动事件

        mapCompare.addMainMapEvent();
      });
    }
    /**
     * 重置主窗口
     */


    function resetMainWin(newClass, time, condition) {
      let target = document.getElementById(viewModel._webMap.map._container.id);

      if (condition) {
        viewModel._webMap._layerCheckedList.forEach(item => {
          viewModel._webMap.setLayerOpacityStateById(item.guid, 1);
        });

        (0,util_namespaceObject.addClass)(target, newClass);
        (0,util_namespaceObject.removeClass)(target, ["map-style", "map-style-4"]);
      } else {
        if (newClass === "map-style") {
          (0,util_namespaceObject.removeClass)(target, "map-style-4");
        } else {
          (0,util_namespaceObject.removeClass)(target, "map-style");
        }

        (0,util_namespaceObject.addClass)(target, newClass);
        (0,util_namespaceObject.removeClass)(target, "map-style-back");
      }

      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.nextTick)(() => {
        // 根据地图窗口的大小，刷新地图
        setTimeout(() => {
          viewModel._webMap.map.invalidateSize(true);
        }, time);
      });
    }
    /**
     * 返回主窗口
     */


    function back() {
      tree1.value = false;
      tree2.value = false;
      tree3.value = false;
      tree4.value = false;
      twoShow.value = false;
      fourShow.value = false;
      btnShow.value = false;
      mapCompare.isClose = true; // 判断是否关闭了窗口

      mapCompare.destroy(); // 销毁对比数据 包括主地图联动事件

      resetMainWin("map-style-back", 500, true); // 返回时触发

      emit("back");
    }
    /**
     * 鼠标移入二窗口及四窗口地图高亮获取焦点
     */


    function enter(num) {
      if (num === 2) {
        mapCompare.currentMapId = "map2";
      } else if (num === 3) {
        mapCompare.currentMapId = "map3";
      } else if (num === 4) {
        mapCompare.currentMapId = "map4";
      }
    }

    expose({
      setTwoMap,
      setFourMap
    });
    return (_ctx, _cache) => {
      const _component_kq_2d_compare_map_tree = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-2d-compare-map-tree");

      const _component_kq_map_view = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-map-view");

      const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-icon");

      const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-button");

      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("section", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 图层树 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.Transition, {
        "enter-active-class": "animated fade-in-left",
        "leave-active-class": "animated bounce-out-left",
        duration: {
          enter: 5000,
          leave: 100
        },
        mode: "out-in"
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(tree1) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_2d_compare_map_tree, {
          key: 0,
          mapTarget: __props.mapTarget
        }, null, 8
        /* PROPS */
        , ["mapTarget"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)("v-if", true)]),
        _: 1
        /* STABLE */

      }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 二分屏窗口 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.Transition, {
        "enter-active-class": "animated fade-in-right",
        "leave-active-class": "animated bounce-out-left",
        duration: {
          enter: 5000,
          leave: 100
        },
        mode: "out-in"
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(twoShow) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("div", {
          key: 0,
          class: "anmimate-box2",
          style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(map2Style))
        }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_map_view, {
          ref_key: "map2_ref",
          ref: map2_ref,
          webMapInfo: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(mapProps),
          target: "map2",
          mapOptions: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(mapOptions),
          class: "map2",
          onMouseenter: _cache[0] || (_cache[0] = $event => enter(2))
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_2d_compare_map_tree, {
            mapTarget: "map2"
          }, null, 512
          /* NEED_PATCH */
          ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(tree2)]])]),
          _: 1
          /* STABLE */

        }, 8
        /* PROPS */
        , ["webMapInfo", "mapOptions"])], 4
        /* STYLE */
        )) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)("v-if", true)]),
        _: 1
        /* STABLE */

      }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 四分屏窗口 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", {
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeClass)(["anmimate-box3", (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(fourShow) ? null : 'none'])
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 分屏窗口3 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.Transition, {
        "enter-active-class": "animated fade-in-right",
        "leave-active-class": "animated bounce-out-left",
        duration: {
          enter: 5000,
          leave: 100
        },
        mode: "out-in"
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(fourShow) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("div", _hoisted_2, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_map_view, {
          ref_key: "map3_ref",
          ref: map3_ref,
          webMapInfo: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(mapProps),
          target: "map3",
          mapOptions: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(mapOptions),
          class: "map3",
          onMouseenter: _cache[1] || (_cache[1] = $event => enter(3))
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_2d_compare_map_tree, {
            mapTarget: "map3"
          }, null, 512
          /* NEED_PATCH */
          ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(tree3)]])]),
          _: 1
          /* STABLE */

        }, 8
        /* PROPS */
        , ["webMapInfo", "mapOptions"])])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)("v-if", true)]),
        _: 1
        /* STABLE */

      }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 分屏窗口4 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.Transition, {
        "enter-active-class": "animated fade-in-right",
        "leave-active-class": "animated bounce-out-left",
        duration: {
          enter: 5000,
          leave: 100
        },
        mode: "out-in"
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(fourShow) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("div", _hoisted_3, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_map_view, {
          ref_key: "map4_ref",
          ref: map4_ref,
          webMapInfo: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(mapProps),
          target: "map4",
          mapOptions: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(mapOptions),
          class: "map4",
          onMouseenter: _cache[2] || (_cache[2] = $event => enter(4))
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_2d_compare_map_tree, {
            mapTarget: "map4"
          }, null, 512
          /* NEED_PATCH */
          ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(tree4)]])]),
          _: 1
          /* STABLE */

        }, 8
        /* PROPS */
        , ["webMapInfo", "mapOptions"])])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)("v-if", true)]),
        _: 1
        /* STABLE */

      })], 2
      /* CLASS */
      ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 返回 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
        circle: "",
        title: "返回",
        class: "close-button",
        onClick: _cache[3] || (_cache[3] = $event => back())
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, null, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.Back))]),
          _: 1
          /* STABLE */

        })]),
        _: 1
        /* STABLE */

      }, 512
      /* NEED_PATCH */
      ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(btnShow)]])]);
    };
  }

}));
;// CONCATENATED MODULE: ./src/leaflet/comparemap/CompareMap.vue?vue&type=script&setup=true&lang=js
 
;// CONCATENATED MODULE: ./src/leaflet/comparemap/CompareMap.vue



const __exports__ = CompareMapvue_type_script_setup_true_lang_js;

/* harmony default export */ var CompareMap = (__exports__);
;// CONCATENATED MODULE: external "core-js/modules/es.array.includes.js"
var es_array_includes_js_namespaceObject = require("core-js/modules/es.array.includes.js");
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common"
var vue_iclient_common_namespaceObject = require("@zpc_npm/vue-iclient-common");
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/leaflet/comparemap/CompareMapTree.vue?vue&type=script&setup=true&lang=js





const CompareMapTreevue_type_script_setup_true_lang_js_default_ = {
  name: "Kq2dCompareMapTree"
};
/* harmony default export */ var CompareMapTreevue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(CompareMapTreevue_type_script_setup_true_lang_js_default_, {
  props: {
    mapTarget: String
  },

  setup(__props) {
    const props = __props; // 图层树选择框样式

    let layerTreeStyle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(); // 图层树选中值

    let selectedLayers = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)([]); // 图层树选项数据

    let layerTreeData = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)([]);
    let preCheckedKeys = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)([]);
    let viewModel = null;
    /**
     * 二维设置图层树列表数据
     */

    function setLayerTree2d() {
      let name = props.mapTarget;
      let layerCheckedList = [];
      viewModel.on("setLayerData", _data => {
        selectedLayers.value = _data.layerCheckedKeys;
        layerCheckedList = _data.layerCheckedList;

        if (name === "map2") {
          layerTreeStyle.value = "layer-tree-2";
        } else if (name === "map3") {
          layerTreeStyle.value = "layer-tree-3";
        } else if (name === "map4") {
          layerTreeStyle.value = "layer-tree-4";
        } else {
          layerTreeStyle.value = "layer-tree-1";

          if (layerCheckedList.length == 0) {
            (0,vue_iclient_common_namespaceObject.KqMessage)({
              showClose: true,
              message: "返回请先选择图层!",
              type: "info",
              duration: 1000
            });
          }
        }

        layerTreeData.value = JSON.parse(JSON.stringify(layerCheckedList));
        preCheckedKeys.value = selectedLayers.value;
      });
    }
    /**
     * 二维勾选图层逻辑
     */


    function onChangeLayer(values) {
      let checkedKeys = preCheckedKeys.value;

      if (checkedKeys.length > values.length) {
        for (let val of checkedKeys.values()) {
          if (!values.includes(val)) {
            viewModel.setLayerVisible(val, false);
          }
        }
      } else {
        for (let val of values.values()) {
          if (!checkedKeys.includes(val)) {
            viewModel.setLayerVisible(val, true);
          }
        }
      }

      preCheckedKeys.value = values;
    }

    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.nextTick)(() => {
        viewModel = new CompareMapViewModel(props.mapTarget);
        setLayerTree2d();
      });
    });
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onBeforeUnmount)(() => {});
    return (_ctx, _cache) => {
      const _component_kq_option = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-option");

      const _component_kq_select = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-select");

      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("section", {
        class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeClass)(["kq-compare-map-tree", (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(layerTreeStyle)])
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_select, {
        "popper-append-to-body": true,
        multiple: "",
        "collapse-tags": "",
        onChange: onChangeLayer,
        modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(selectedLayers),
        "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.isRef)(selectedLayers) ? selectedLayers.value = $event : selectedLayers = $event),
        "value-key": "id",
        placeholder: "请选择图层...",
        style: {
          "width": "285px"
        }
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(layerTreeData), item => {
          return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_option, {
            key: item.guid,
            label: item.name,
            value: item.guid,
            style: {
              "width": "275px"
            }
          }, null, 8
          /* PROPS */
          , ["label", "value"]);
        }), 128
        /* KEYED_FRAGMENT */
        ))]),
        _: 1
        /* STABLE */

      }, 8
      /* PROPS */
      , ["modelValue"])], 2
      /* CLASS */
      );
    };
  }

}));
;// CONCATENATED MODULE: ./src/leaflet/comparemap/CompareMapTree.vue?vue&type=script&setup=true&lang=js
 
;// CONCATENATED MODULE: ./src/leaflet/comparemap/CompareMapTree.vue



const CompareMapTree_exports_ = CompareMapTreevue_type_script_setup_true_lang_js;

/* harmony default export */ var CompareMapTree = (CompareMapTree_exports_);
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/init.js"
var init_js_namespaceObject = require("@zpc_npm/vue-iclient-common/init.js");
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_namespaceObject);
;// CONCATENATED MODULE: ./src/leaflet/comparemap/index.js






CompareMap.install = (Vue, opts) => {
  init_js_default()(Vue, opts);
  Vue.component(CompareMap.name, CompareMap);
};

CompareMapTree.install = (Vue, opts) => {
  Vue.component(CompareMapTree.name, CompareMapTree);
};


module.exports = __webpack_exports__;
/******/ })()
;