/******/ (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__, {
  "AddDataViewModel": function() { return /* reexport */ AddDataViewModel; },
  "default": function() { return /* reexport */ AddData; }
});

;// CONCATENATED MODULE: external "core-js/modules/es.error.cause.js"
var es_error_cause_js_namespaceObject = require("core-js/modules/es.error.cause.js");
;// 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: 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/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/gis-utils"
var gis_utils_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/gis-utils");
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/_utils/webmapservice"
var webmapservice_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/webmapservice");
var webmapservice_default = /*#__PURE__*/__webpack_require__.n(webmapservice_namespaceObject);
;// CONCATENATED MODULE: external "xe-utils"
var external_xe_utils_namespaceObject = require("xe-utils");
var external_xe_utils_default = /*#__PURE__*/__webpack_require__.n(external_xe_utils_namespaceObject);
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common"
var vue_iclient_common_namespaceObject = require("@zpc_npm/vue-iclient-common");
;// CONCATENATED MODULE: external "@zpc_npm/vue-iclient-common/_utils/dictionaries"
var dictionaries_namespaceObject = require("@zpc_npm/vue-iclient-common/_utils/dictionaries");
;// CONCATENATED MODULE: ./src/leaflet/adddata/AddDataViewModel.js


/**
 * Author: 朱鹏超
 * Date: 2022-11-23
 * Description: 2d添加数据逻辑层
 */







/**
 * @class AddDataViewModel
 * @classdesc 2d添加数据逻辑层
 * @param {string} mapTarget - 绑定的当前mapview
 * @param {string} geometryServerUrl - 当前mapview 初始化服务地址
 * @param {string} geometryServerToken - 当前mapview 初始化token
 */

class AddDataViewModel extends L.Evented {
  constructor(mapTarget, geometryServerUrl, geometryServerToken) {
    super();

    _defineProperty(this, "_props", null);

    _defineProperty(this, "_webMap", null);

    this._props = {
      mapTarget,
      geometryServerUrl,
      geometryServerToken
    };
    this._loadedAsync = this._loadedAsync.bind(this);
    this._loadedSync = this._loadedSync.bind(this);

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


  _registerEvents() {
    // 监听地图初始化完成事件
    // 异步
    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;
  }
  /**
   * @description 同步加载
   * @private
   */


  _loadedSync(e) {
    this._webMap = e;
  }
  /**
   * @description 单个导入文件
   * @param {string} file - 导入的文件
   */


  uploadFile(file) {
    return new Promise((resolve, reject) => {
      let that = this;

      if (file.status === "ready") {
        let fileType = file.name.substring(file.name.lastIndexOf("."));

        if (fileType.toUpperCase() === ".ZIP" || fileType.toUpperCase() === ".RAR") {
          (0,util_namespaceObject.uploadSHP)(this._props.geometryServerUrl, file.raw, this._props.geometryServerToken, function (res) {
            if (res) {
              that._addMapLayer(res, file.name);

              resolve("success");
            } else {
              reject(file.uid);
            }
          });
        } else if (fileType.toUpperCase() === ".TXT") {
          (0,util_namespaceObject.readTxT)(file.raw, res => {
            if (res) {
              this._addMapLayer(res, file.name);

              resolve("success");
            } else {
              reject(file.uid);
            }
          });
        } else if (fileType.toUpperCase() === ".JSON" || fileType.toUpperCase() === ".GEOJSON") {
          (0,util_namespaceObject.readJSON)(file.raw, res => {
            if (res) {
              this._addMapLayer(res, file.name);

              resolve("success");
            } else {
              reject(file.uid);
            }
          });
        }
      }
    });
  }
  /**
   * @description 批量导入文件
   * @param {Array.<string>} files - 导入的文件数据集合
   */
  // 批量导入文件


  uploadFiles(files) {
    let arr = [];
    files.forEach(file => {
      arr.push(this.uploadFile(file));
    });
    return Promise.all(arr);
  }
  /**
   * @description 添加图层到地图
   * @private
   * @param {object} geojson - geojson
   * @param {filename} filename - 文件名称
   */


  _addMapLayer(geojson, filename) {
    let gc = (0,util_namespaceObject.featureCollection2GeometryCollection)(geojson);
    let layers = [{
      name: filename.split(".")[0],
      guid: external_xe_utils_default().uniqueId("addData_"),
      data: gc
    }];

    this._webMap.addTempData(layers, true);
  }
  /**
   * @description URL添加数据
   * @param {Object} params - 参数
   * @param {string} params.type
   * @param {string} params.url - 服务地址，例：http://support.kqgeo.com:29800/china3857-proxy/kqgis/rest/services/china3857/map/wms
   *                                   http://support.kqgeo.com:29800/china3857-proxy/kqgis/rest/services/china3857/map/wmts
   *                                   http://support.kqgeo.com:29800/jingjin3857-proxy/kqgis/rest/services/jingjin3857/map/wmts
   *                                   http://support.kqgeo.com:29800/jingjin4490-proxy/kqgis/tilecache/jingjin4490/style.json?ua_token=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJob3N0IiwiY3JlYXRlZCI6MTY1NTk2MzU1NzUyMywiZXhwIjoxNzY3MTEwNDAwfQ.BiNOr6vL6liHzlMK89XSvqmFY9fuWiYqDEwYmWxk-6vFKBgLeMC8FloBXyKcxOCl9Rd28y_pX4PhVRYP5cZTwA
   *                                   http://support.kqgeo.com:29800/jingjin3857_slwp-proxy/kqgis/tilecache/jingjin3857_slwp/style.json?ua_token=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJob3N0IiwiY3JlYXRlZCI6MTY1NTk2MzU1NzUyMywiZXhwIjoxNzY3MTEwNDAwfQ.BiNOr6vL6liHzlMK89XSvqmFY9fuWiYqDEwYmWxk-6vFKBgLeMC8FloBXyKcxOCl9Rd28y_pX4PhVRYP5cZTwA
   *
   *                                   http://172.16.3.10:6080/arcgis/rest/services/test3857/MapServer/WMTS?service=WMTS&request=GetCapabilities
   *                                   http://172.16.3.10:6080/arcgis/services/china_shp_sheng/MapServer/WMSServer?service=WMS&request=GetCapabilities
   *
   *                                   http://172.16.3.10:6080/arcgis/rest/services/hsq3857_qt/MapServer/WMTS
   *                                   http://172.16.3.10:6080/arcgis/rest/services/china4326/MapServer/WMTS
   *
   *                                   http://172.16.1.223:9800/zg_4326-proxy/kqgis/rest/services/zg_4326/map/wmts
   *                                   http://172.16.1.223:9800/smx4326-proxy/kqgis/rest/services/smx4326/map/wmts
   *                                   http://172.16.1.223:9800/4490_mian-proxy/kqgis/rest/services/4490_mian/map/wmts
   * @param {string} [params.name] - 服务图层名称
   */


  loadURL(params) {
    if (params.type === "KQGIS REST") {
      return this._restServer(params);
    } else if (params.type === "KQGIS WMS") {
      return this._wmsServer(params);
    } else if (params.type === "KQGIS WMTS") {
      return this._wmtsServer(params);
    } else if (params.type === "ARCGIS WMS") {
      return this._wmsServer(params);
    } else if (params.type === "ARCGIS WMTS") {
      return this._wmtsServer(params);
    } else if (params.type === "vectortile") {
      return this._vectortileServer(params);
    }
  }
  /**
   * @description KQGIS REST服务
   * @private
   * @param {Object} params - 参数
   * @param {string} params.type - 类型
   * @param {string} param.url -  服务地址
   * @param {string} [params.name] - 服务图层名称
   */


  _restServer(params) {
    return new Promise((resolve, reject) => {
      // let serverName = params.name ? params.name : params.url.split("services/")[1].split("/")[0];
      let serverName = params.url.split("services/")[1].split("/")[0];
      let serverUrl = params.url.split("services/")[0] + "services/";
      let token;

      if (params.url.indexOf("ua_token") != -1) {
        token = params.url.split("ua_token=")[1].split("&")[0];
      }

      let webMapService = new (webmapservice_default())(serverName, {
        token: this._props.geometryServerToken || token,
        serverUrl: serverUrl
      });
      webMapService.getMapInfo().then(mapInfo => {
        if (mapInfo.resultcode === "error") {
          reject(error);
          (0,vue_iclient_common_namespaceObject.KqMessage)({
            message: mapInfo.message,
            grouping: true,
            type: "error",
            duration: 6000
          });
          return;
        } // 存储地图的名称以及描述等信息，返回给用户


        mapInfo = mapInfo.result;
        const webMapInfo = (0,util_namespaceObject.formatKQMapInfo)(mapInfo, serverUrl, serverName, this._props.geometryServerToken, null, true);
        let _mapInfo = null;

        if (!this._webMap.webMapInfo) {
          _mapInfo = webMapInfo;
        }

        webMapInfo.layerTreeData.forEach(item => {
          if (item.parentLayerId === -1 && params.name) {
            item.name = params.name;
          }
        });

        this._webMap.addTempData(webMapInfo.layerTreeData, true, webMapInfo.layers_show, "kqserver", _mapInfo);

        if (!this.webMap.webMapInfo) {
          let _bounds = [[_mapInfo.rect.minx, _mapInfo.rect.miny], [_mapInfo.rect.maxx, _mapInfo.rect.maxy]];

          this._webMap.map.fitBounds(_bounds);
        }

        resolve(webMapInfo);
      }, error => {
        throw error;
      });
    });
  }
  /**
   * @description KQGIS WMS服务
   * @private
   * @param {Object} params - 参数
   * @param {string} params.type - 类型
   * @param {string} param.url -  服务地址
   * @param {string} [params.name] - 服务图层名称
   */


  _wmsServer(params) {
    return new Promise((resolve, reject) => {
      if (this._props.geometryServerToken && params.url.indexOf("ua_token=") == -1) {
        params.url = `${params.url}?ua_token=${this._props.geometryServerToken}`;
      }

      let serverInfo = new KqGIS.Map.GetMapWMSInfoService(params.url);
      serverInfo.init(() => {
        let layerTreeData = [];
        let getLayerInfos = serverInfo.getLayerInfos();

        if (!Array.isArray(getLayerInfos)) {
          getLayerInfos = [getLayerInfos];
        }

        for (let i = 0, item; item = getLayerInfos[i++];) {
          item.url = params.url;
          item.guid = external_xe_utils_default().uniqueId(`${item.Title}-${item.Name}-`);
          item.name = item.Title;
          item.accessToken = this._props.geometryServerToken || (params.url.indexOf("ua_token=") != -1 ? params.url.split("ua_token=")[1].split("&")[0] : null);
          layerTreeData.push(item);
        }

        this._webMap.addTempData(layerTreeData, true, null, "wms");

        console.log("layerTreeData", layerTreeData);

        if (!this._webMap.webMapInfo) {
          let _bounds = [[serverInfo.getBounds().bottom, serverInfo.getBounds().left], [serverInfo.getBounds().top, serverInfo.getBounds().right]];

          this._webMap.map.fitBounds(_bounds);
        }

        resolve(serverInfo);
      });
    });
  }
  /**
   * @description KQGIS WMTS服务
   * @private
   * @param {Object} params - 参数
   * @param {string} params.type - 类型
   * @param {string} param.url -  服务地址
   * @param {string} [params.name] - 服务图层名称
   */


  _wmtsServer(params) {
    return new Promise((resolve, reject) => {
      if (this._props.geometryServerToken && params.url.indexOf("ua_token=") == -1) {
        params.url = `${params.url}?ua_token=${this._props.geometryServerToken}`;
      }

      let serverInfo = new KqGIS.Map.GetMapWMTSInfoService(params.url);
      serverInfo.init().then(() => {
        let layerTreeData = [];

        for (let i = 0, item; item = serverInfo.getLayerInfos()[i++];) {
          item.url = params.url;
          item.guid = external_xe_utils_default().uniqueId(`${item.name}-${item.id}-`);
          item.accessToken = this._props.geometryServerToken || (params.url.indexOf("ua_token=") != -1 ? params.url.split("ua_token=")[1].split("&")[0] : null);
          layerTreeData.push(item);
        }

        let _mapInfo = null;

        if (!this._webMap.webMapInfo) {
          _mapInfo = {
            spatialReference: {
              epsg: serverInfo.getEpsgCode(),
              proj4: dictionaries_namespaceObject.proj4Dic[serverInfo.getEpsgCode()]
            },
            rect: (() => {
              let rect;
              let _val = false;

              for (let i in serverInfo.getBounds()) {
                if (serverInfo.getBounds()[i] !== null && Math.abs(serverInfo.getBounds()[i]) <= 180) {
                  _val = true;
                  break;
                }
              } // if (Math.abs(serverInfo.getBounds()["left"]) <= 180) {
              //   _val = true;
              // }


              if (_val) {
                rect = {
                  minx: serverInfo.getBounds()["left"],
                  miny: serverInfo.getBounds()["bottom"],
                  maxx: serverInfo.getBounds()["right"],
                  maxy: serverInfo.getBounds()["top"]
                };
              } else {
                rect = {
                  minx: -20037508.342787,
                  miny: -20037508.342787,
                  maxx: 20037508.342787,
                  maxy: 20037508.342787
                };
              }

              console.log("rect", rect);
              return rect;
            })(),
            origin: [Number(serverInfo.getOrigin()["x"]), Number(serverInfo.getOrigin()["y"])],
            // center: [serverInfo.getCenter().lon, serverInfo.getCenter().lat],
            center: [30, 114],
            resolutions: (() => {
              let scales = [];
              let tileMatrix;

              if (serverInfo.root.Contents.TileMatrixSet instanceof Array) {
                tileMatrix = serverInfo.root.Contents.TileMatrixSet[0].TileMatrix;
              } else {
                tileMatrix = serverInfo.root.Contents.TileMatrixSet.TileMatrix;
              }

              tileMatrix.forEach(item => {
                scales.push(1 / item.ScaleDenominator);
              });
              let resolutions = KqGIS.CommonTools.stdScalesToResolutions(scales, KqGIS.CommonTools.getToMetersFromProj4(dictionaries_namespaceObject.proj4Dic[serverInfo.getEpsgCode()]));

              for (let i = 0; i < resolutions.length; i++) {
                resolutions[i] = resolutions[i] * 1.058267716535433;
              }

              return resolutions;
            })()
          };
        }

        this._webMap.addTempData(layerTreeData, true, null, "wmts", _mapInfo);

        if (!this._webMap.webMapInfo) {
          let _bounds = [[serverInfo.getBounds84().bottom, serverInfo.getBounds84().left], [serverInfo.getBounds84().top, serverInfo.getBounds84().right]];

          this._webMap.map.fitBounds(_bounds);
        }

        resolve(serverInfo);
      }, error => {
        throw error;
      });
    });
  }
  /**
   * @description 矢量瓦片
   * @private
   * @param {Object} params - 参数
   * @param {string} params.type - 类型
   * @param {string} param.url -  服务地址
   * @param {string} params.name - 服务图层名称
   */


  _vectortileServer(params) {
    return new Promise((resolve, reject) => {
      if (this._props.geometryServerToken && params.url.indexOf("ua_token") == -1) {
        params.url = params.url + `?ua_token=${this._props.geometryServerToken}`;
      }

      fetch(params.url).then(response => response.json()).then(mapInfo => {
        let layerTreeData = [{
          url: params.url,
          guid: external_xe_utils_default().uniqueId(`${mapInfo.name}-`),
          accessToken: this._props.geometryServerToken || (params.url.indexOf("ua_token=") != -1 ? params.url.split("ua_token=")[1].split("&")[0] : null),
          name: mapInfo.name,
          style: params.url
        }];
        let _mapInfo = null;

        if (!this._webMap.webMapInfo) {
          _mapInfo = {
            name: mapInfo.name,
            spatialReference: (() => {
              let _obj = null;

              if (mapInfo.metadata && mapInfo.metadata.epsgCode) {
                _obj = {
                  epsg: mapInfo.metadata.epsgCode.split(":")[1],
                  proj4: dictionaries_namespaceObject.proj4Dic[mapInfo.metadata.epsgCode.split(":")[1]]
                };
              } else {
                _obj = {
                  epsg: "3857",
                  proj4: dictionaries_namespaceObject.proj4Dic[3857]
                };
              }

              return _obj;
            })(),
            center: mapInfo.center,
            rect: (() => {
              let rect;
              let _val = false;
              let _bounds = mapInfo.sources[mapInfo.name]["bounds"];

              for (let i = 0, item; item = _bounds[i++];) {
                if (item !== null && Math.abs(item) <= 180) {
                  _val = true;
                  break;
                }
              }

              if (_val) {
                rect = {
                  minx: _bounds[0],
                  miny: _bounds[1],
                  maxx: _bounds[2],
                  maxy: _bounds[3]
                };
              } else {
                rect = {
                  minx: -20037508.342787,
                  miny: -20037508.342787,
                  maxx: 20037508.342787,
                  maxy: 20037508.342787
                };
              }

              return rect;
            })()
          };
        }

        this._webMap.addTempData(layerTreeData, true, null, "vectortile", _mapInfo);

        if (!this.webMap.webMapInfo) {
          let _boundsArray = mapInfo.sources[mapInfo.name]["bounds"];
          let _bounds = [[_boundsArray[1], _boundsArray[0]], [_boundsArray[3], _boundsArray[2]]];

          this._webMap.map.fitBounds(_bounds);
        }

        resolve(mapInfo);
      });
    });
  }
  /**
   * @description 销毁方法
   */


  destroy() {
    this.off();
  }

}
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/leaflet/adddata/AddData.vue?vue&type=script&setup=true&lang=js


const _hoisted_1 = {
  class: "kq-add-data-desc"
};

const _hoisted_2 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)("文件格式说明");

const _hoisted_3 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)("支持上传.zip、.txt、.json、.geojson文件");

const _hoisted_4 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", {
  class: "kq-add-data-upload_text"
}, "将文件拖拽至此区域", -1
/* HOISTED */
);

const _hoisted_5 = {
  class: "kq-add-data-filelist"
};
const _hoisted_6 = {
  class: "kq-add-data-file"
};
const _hoisted_7 = ["title"];
const _hoisted_8 = {
  class: "kq-add-data-footer"
};

const _hoisted_9 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)(" 选择文件 ");

const _hoisted_10 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)(" 清空文件 ");

const _hoisted_11 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)(" 加载 ");

const _hoisted_12 = {
  class: "kq-add-data-tip"
};
const _hoisted_13 = {
  key: 0,
  class: "kq-add-data-tip"
};
const _hoisted_14 = {
  class: "kq-add-data-footer"
};

const _hoisted_15 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)(" 加载 ");

const _hoisted_16 = /*#__PURE__*/(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)(" 重置 ");





 // 获取组件传参

const __default__ = {
  name: "Kq2dAddData"
};
/* harmony default export */ var AddDatavue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
  props: {
    // 每个地图相关组件的必须参数 非必传 指定组件绑定的map对象的div的id
    mapTarget: String,
    // 是否显示阴影
    showShadow: {
      type: Boolean,
      default: false
    },

    /**
     * 例："center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
     */
    position: [String, Object],
    // 几何服务地址前缀，例：http://support.kqgeo.com:29800/geometry-proxy/kqgis/rest/services/geometry
    geometryServerUrl: {
      type: String,
      required: true
    },
    // 几何服务token，例：eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJob3N0IiwiY3JlYXRlZCI6MTY1NTk2MzU1NzUyMywiZXhwIjoxNzY3MTEwNDAwfQ.BiNOr6vL6liHzlMK89XSvqmFY9fuWiYqDEwYmWxk-6vFKBgLeMC8FloBXyKcxOCl9Rd28y_pX4PhVRYP5cZTwA
    geometryServerToken: {
      type: String,
      required: true
    }
  },

  setup(__props) {
    const props = __props; // 组件容器

    let box_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null);
    let viewModel = null; // 文件拖拽区容器

    let upload_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null); // 文件存储区容器

    let upload_btn_ref = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null); // 文件缓存数组

    let fileList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)([]); // 当前显示的pane

    let activeName = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)("upload"); // 通过URL添加数据的类型

    let types = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.reactive)([{
      name: "KQGIS REST服务",
      value: "KQGIS REST"
    }, {
      name: "KQGIS WMS服务",
      value: "KQGIS WMS"
    }, {
      name: "KQGIS WMTS服务",
      value: "KQGIS WMTS"
    }, {
      name: "ARCGIS WMS服务",
      value: "ARCGIS WMS"
    }, {
      name: "ARCGIS WMTS服务",
      value: "ARCGIS WMTS"
    } // {
    //   name: "矢量瓦片",
    //   value: "vectortile"
    // }
    ]); // URL添加数据选项卡的表单默认数据

    let URLForm = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.reactive)({
      type: "KQGIS REST",
      url: "",
      name: ""
    }); // URL添加数据选项卡的表单校验方法

    const validateUrl = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请输入URL地址"));
      }

      if (URLForm.type === "KQGIS REST" && URLForm.url.toLowerCase().indexOf("arcgis") != -1) {
        callback(new Error("请输入正确的KQGIS REST地址"));
      }

      if (URLForm.type === "KQGIS WMS" && URLForm.url.toLowerCase().indexOf("wms") == -1) {
        callback(new Error("请输入正确的KQGIS WMS地址"));
      }

      if (URLForm.type === "KQGIS WMTS" && (URLForm.url.toLowerCase().indexOf("kqgis") == -1 || URLForm.url.toLowerCase().indexOf("wmts") == -1)) {
        callback(new Error("请输入正确的KQGIS WMTS地址"));
      }

      if (URLForm.type === "ARCGIS WMS" && (URLForm.url.toLowerCase().indexOf("arcgis") == -1 || URLForm.url.toLowerCase().indexOf("wms") == -1)) {
        callback(new Error("请输入正确的ARCGIS WMS"));
      }

      if (URLForm.type === "ARCGIS WMTS" && (URLForm.url.toLowerCase().indexOf("arcgis") == -1 || URLForm.url.toLowerCase().indexOf("wmts") == -1)) {
        callback(new Error("请输入正确的ARCGIS WMTS地址"));
      }

      if (URLForm.type === "vectortile" && (URLForm.url.toLowerCase().indexOf("tile") == -1 || URLForm.url.toLowerCase().indexOf("json") == -1)) {
        callback(new Error("请输入正确的矢量瓦片地址地址"));
      }

      callback();
    }; // URL添加数据选项卡的表单校验


    const rules = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.reactive)({
      url: [{
        validator: validateUrl,
        trigger: "blur"
      }]
    }); // URL添加数据选项卡的容器

    const ruleFormRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null); // URL添加数据选项卡的规则提示

    let typeTip = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)("由苍穹服务程序(KQGIS Server)发布的二维地图服务");
    let urlFormat = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)("格式:http://<host>:<port>/kqgis/rest/services/<servername>/map"); // 上传数据选项卡的文件集（数组）处理 

    let operatorArray = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.computed)(() => {
      let array = [];
      let list = [...fileList.value];
      let len = list.length;

      for (let i = 0, j = 0; i < len; i += 3, j++) {
        array[j] = list.splice(0, 3);
      }

      return array;
    }); // 上传数据选项卡的加载按钮是否禁用

    let disabled = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.computed)(() => {
      let flag = true;

      if (fileList.value.length > 0) {
        flag = false;
      }

      return flag;
    }); // 是否开启按钮loading

    let loading_file = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false);
    let loading_URL = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false);
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
      // 组件位置定位
      (0,util_namespaceObject.updatePosition)(box_ref.value, props);
      viewModel = new AddDataViewModel(props.mapTarget, props.geometryServerUrl, props.geometryServerToken);
    }); // 销毁

    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onBeforeUnmount)(() => {
      clear();
      viewModel = null;
    }); // 切换tab页

    function handleChange(pane) {
      if (pane === "upload") {
        removeFiles();
      } else {
        reset(ruleFormRef.value);
      }
    } // 切换URL数据类型


    function changeType(val) {
      switch (val) {
        case "KQGIS REST":
          typeTip.value = "由苍穹服务程序(KQGIS Server)发布的二维地图服务";
          urlFormat.value = "格式:http://<host>:<port>/kqgis/rest/services/<servername>/map";
          break;

        case "KQGIS WMS":
          typeTip.value = "符合KQGIS WMS服务标准的二维地图服务";
          urlFormat.value = "格式:http://<host>:<port>/kqgis/rest/services/<servername>/map/WMS";
          break;

        case "KQGIS WMTS":
          typeTip.value = "符合KQGIS WMTS服务标准的二维地图服务";
          urlFormat.value = "格式: http://<host>:<port>/kqgis/rest/services/<servername>/map/WMTS";
          break;

        case "ARCGIS WMS":
          typeTip.value = "符合ARCGIS WMS服务标准的二维地图服务";
          urlFormat.value = "格式: http://<host>:<port>/arcgis/rest/services/<servername>/MapServer/WMSServer?service=WMS&request=GetCapabilities";
          break;

        case "ARCGIS WMTS":
          typeTip.value = "符合ARCGIS WMTS服务标准的二维地图服务";
          urlFormat.value = "格式: http://<host>:<port>/arcgis/rest/services/<servername>/MapServer/WMTS?service=WMTS&request=GetCapabilities";
          break;

        case "vectortile":
          typeTip.value = "符合矢量瓦片服务标准的二维地图服务";
          urlFormat.value = "";
          break;

        default:
          break;
      }
    } //上传数据-选择文件


    function changeFile(file) {
      fileList.value.push(file);
    } // 上传数据-删除文件


    function removeFile(file) {
      fileList.value.forEach((item, index) => {
        if (item.uid === file.uid) {
          fileList.value.splice(index, 1);
        }
      });
    } // 上传数据-清空所有文件


    function removeFiles() {
      upload_ref.value.$refs.child.clearFiles();
      upload_btn_ref.value.$refs.child.clearFiles();
      fileList.value = [];
    } //上传数据-加载文件


    function loadFiles() {
      loading_file.value = true;
      viewModel.uploadFiles(fileList.value).then(() => {
        removeFiles();
        loading_file.value = false;
      }).catch(err => {
        let result = external_xe_utils_default().filter(fileList.value, item => item.uid == err);
        fileList.value = result;
        loading_file.value = false;
      });
    } // 通过URL添加数据-加载服务


    function loadURL(formEl) {
      if (!formEl || !formEl.$refs.child) return; // console.log(formEl, formEl.validate, formEl.$refs.child);

      formEl.$refs.child.validate((valid, fields) => {
        if (valid) {
          loading_URL.value = true;
          viewModel.loadURL({
            type: URLForm.type,
            url: URLForm.url,
            name: URLForm.name
          }).then(() => {
            loading_URL.value = false;
          }).catch(err => {
            loading_URL.value = false;
          });
        } else {}
      });
    } // 通过URL添加数据-重置


    function reset(formEl) {
      if (formEl && formEl.$refs.child) {
        formEl.$refs.child.resetFields();
      }

      loading_URL.value = false;
      typeTip.value = "由苍穹服务程序(KQGIS Server)发布的二维地图服务";
      urlFormat.value = "格式:http://<host>:<port>/KQGis/rest/services/<servername>/map";
      URLForm.type = "KQGIS REST";
      URLForm.url = "";
      URLForm.name = "";
    }

    function clear() {
      viewModel.destroy();
    }

    return (_ctx, _cache) => {
      const _component_kq_row = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-row");

      const _component_kq_upload = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-upload");

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

      const _component_kq_col = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-col");

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

      const _component_kq_tab_pane = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-tab-pane");

      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");

      const _component_kq_form_item = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-form-item");

      const _component_kq_input = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-input");

      const _component_kq_form = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-form");

      const _component_kq_tabs = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-tabs");

      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-add-data-2d", __props.showShadow ? 'shadow' : null]),
        ref_key: "box_ref",
        ref: box_ref
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_tabs, {
        modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(activeName),
        "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.isRef)(activeName) ? activeName.value = $event : activeName = $event),
        onTabChange: handleChange
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 上传数据 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_tab_pane, {
          label: "上传数据",
          name: "upload"
        }, {
          default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_row, {
            class: ""
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_2]),
            _: 1
            /* STABLE */

          }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_row, {
            class: "kq-add-data-tip"
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_3]),
            _: 1
            /* STABLE */

          })]), (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_upload, {
            drag: "",
            action: "",
            accept: ".zip,.rar,.txt,.json,.geojson",
            multiple: true,
            "show-file-list": false,
            "auto-upload": false,
            "file-list": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(fileList),
            "onUpdate:file-list": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.isRef)(fileList) ? fileList.value = $event : fileList = $event),
            "on-change": changeFile,
            ref_key: "upload_ref",
            ref: upload_ref
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_4]),
            _: 1
            /* STABLE */

          }, 8
          /* PROPS */
          , ["file-list"]), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.vShow, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(fileList).length === 0]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", _hoisted_5, [((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)(operatorArray), (rowItem, i) => {
            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_row, {
              key: i,
              gutter: 20
            }, {
              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)(rowItem, (file, j) => {
                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_col, {
                  span: 8,
                  key: j
                }, {
                  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", _hoisted_6, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
                    class: "kq-add-data-doc"
                  }, {
                    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.Document))]),
                    _: 1
                    /* STABLE */

                  }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("p", {
                    title: file.name
                  }, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)(file.name), 9
                  /* TEXT, PROPS */
                  , _hoisted_7), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
                    class: "kq-add-data-close",
                    onClick: $event => removeFile(file)
                  }, {
                    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.CircleClose))]),
                    _: 2
                    /* DYNAMIC */

                  }, 1032
                  /* PROPS, DYNAMIC_SLOTS */
                  , ["onClick"])])]),
                  _: 2
                  /* DYNAMIC */

                }, 1024
                /* DYNAMIC_SLOTS */
                );
              }), 128
              /* KEYED_FRAGMENT */
              ))]),
              _: 2
              /* DYNAMIC */

            }, 1024
            /* DYNAMIC_SLOTS */
            );
          }), 128
          /* KEYED_FRAGMENT */
          ))], 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)(fileList).length > 0]]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", _hoisted_8, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_upload, {
            action: "",
            multiple: true,
            "show-file-list": false,
            "auto-upload": false,
            accept: ".zip,.rar,.txt,.json,.geojson",
            ref_key: "upload_btn_ref",
            ref: upload_btn_ref,
            class: "kq-add-data-footer-upload",
            "on-change": changeFile
          }, {
            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_button, {
              title: "选择文件",
              type: "primary"
            }, {
              default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_9]),
              _: 1
              /* STABLE */

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

          }, 512
          /* NEED_PATCH */
          ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
            onClick: _cache[1] || (_cache[1] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withModifiers)($event => removeFiles(), ["stop"])),
            title: "清空文件",
            type: "primary"
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_10]),
            _: 1
            /* STABLE */

          }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
            onClick: _cache[2] || (_cache[2] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withModifiers)($event => loadFiles(), ["stop"])),
            title: "加载",
            type: "primary",
            disabled: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(disabled),
            loading: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(loading_file)
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_11]),
            _: 1
            /* STABLE */

          }, 8
          /* PROPS */
          , ["disabled", "loading"])])]),
          _: 1
          /* STABLE */

        }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)(" 通过URL添加 "), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_tab_pane, {
          label: "通过URL添加",
          name: "url"
        }, {
          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_form, {
            "label-width": "80px",
            "label-position": "left",
            model: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm),
            rules: rules,
            ref_key: "ruleFormRef",
            ref: ruleFormRef
          }, {
            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_row, 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)(_component_kq_form_item, {
                label: "类型"
              }, {
                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_select, {
                  modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm).type,
                  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm).type = $event),
                  onChange: changeType
                }, {
                  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)(types), 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.value,
                      label: item.name,
                      value: item.value
                    }, {
                      default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createTextVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)(item.name), 1
                      /* TEXT */
                      )]),
                      _: 2
                      /* DYNAMIC */

                    }, 1032
                    /* PROPS, DYNAMIC_SLOTS */
                    , ["label", "value"]);
                  }), 128
                  /* KEYED_FRAGMENT */
                  ))]),
                  _: 1
                  /* STABLE */

                }, 8
                /* PROPS */
                , ["modelValue"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("span", _hoisted_12, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(typeTip)), 1
                /* TEXT */
                )]),
                _: 1
                /* STABLE */

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

            }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_row, 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)(_component_kq_form_item, {
                label: "URL地址",
                prop: "url"
              }, {
                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_input, {
                  modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm).url,
                  "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm).url = $event),
                  placeholder: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(urlFormat)
                }, null, 8
                /* PROPS */
                , ["modelValue", "placeholder"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm).type ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("span", _hoisted_13, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(urlFormat)), 1
                /* TEXT */
                )) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)("v-if", true)]),
                _: 1
                /* STABLE */

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

            }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_row, 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)(_component_kq_form_item, {
                label: "图层名称"
              }, {
                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_input, {
                  modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm).name,
                  "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(URLForm).name = $event),
                  placeholder: "未命名的图层"
                }, null, 8
                /* PROPS */
                , ["modelValue"])]),
                _: 1
                /* STABLE */

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

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

          }, 8
          /* PROPS */
          , ["model", "rules"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", _hoisted_14, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
            onClick: _cache[6] || (_cache[6] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withModifiers)($event => loadURL(ruleFormRef.value), ["stop"])),
            title: "加载",
            type: "primary",
            loading: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(loading_URL)
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_15]),
            _: 1
            /* STABLE */

          }, 8
          /* PROPS */
          , ["loading"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
            onClick: _cache[7] || (_cache[7] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withModifiers)($event => reset(ruleFormRef.value), ["stop"])),
            title: "重置"
          }, {
            default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [_hoisted_16]),
            _: 1
            /* STABLE */

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

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

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

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



const __exports__ = AddDatavue_type_script_setup_true_lang_js;

/* harmony default export */ var AddData = (__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/adddata/index.js




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


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