(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js"));
	else if(typeof define === 'function' && define.amd)
		define(["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/init.js"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/init.js")) : factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/init.js"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(this, function(__WEBPACK_EXTERNAL_MODULE__154__, __WEBPACK_EXTERNAL_MODULE__64__, __WEBPACK_EXTERNAL_MODULE__455__) {
return /******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ 5698:
/***/ (function(module) {

module.exports = require("@kq_npm/client_icons_vue");

/***/ }),

/***/ 64:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__64__;

/***/ }),

/***/ 455:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__455__;

/***/ }),

/***/ 154:
/***/ (function(module) {

module.exports = __WEBPACK_EXTERNAL_MODULE__154__;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* 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__, {
  "default": function() { return /* reexport */ WebPrintRangeSelect; }
});

// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(154);
// EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
var client_icons_vue_ = __webpack_require__(5698);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
var gis_utils_ = __webpack_require__(64);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/leaflet/webprintrangeselect/WebPrintRangeSelect.vue?vue&type=script&setup=true&lang=js

const _hoisted_1 = {
  class: "kq-2d-web-print-frame"
};
const _hoisted_2 = {
  class: "btns-box"
};



const __default__ = {
  name: "Kq2dWebPrintRangeSelect"
};
/* harmony default export */ var WebPrintRangeSelectvue_type_script_setup_true_lang_js = (/*@__PURE__*/Object.assign(__default__, {
  props: {
    mapTarget: String,
    initServes: {
      type: Array,
      default: []
    },
    drawStyle: {
      type: Object,
      default: {
        color: "#3388ff",
        dashArray: "0",
        fill: true,
        fillColor: "#3388ff",
        fillOpacity: 0.3,
        weight: 2
      }
    }
  },
  setup(__props, {
    expose: __expose
  }) {
    // import { Kq2dWebPrint } from "@/leaflet/webprint";
    const props = __props;
    let webPrintRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
    let isShowKq2dWebPrint = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
    let printBounds = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
    let drawGroupName = "framePrint";
    const resetWebPrint = () => {
      webPrintRef.value && webPrintRef.value.reset();
    };
    const startPrint = () => {
      isShowKq2dWebPrint.value = true;
      setTimeout(() => {
        webPrintRef.value && webPrintRef.value.init(props.initServes, printBounds.value);
      });
    };

    // 直接打印
    const onPrint = () => {
      printBounds.value = [];
      startPrint();
    };

    // 拉框打印
    const onFramePrint = () => {
      reset();
      gis_utils_.mapDrawUtils.startDraw(props.mapTarget, (jsonGeometry, event) => {
        printBounds.value = [jsonGeometry.coordinates[0][0][0], jsonGeometry.coordinates[0][0][1], jsonGeometry.coordinates[0][2][0], jsonGeometry.coordinates[0][2][1]];
        startPrint();
      }, "rectangle", drawGroupName, props.drawStyle);
    };

    /**
     * @description 重置打印组件
     */
    const reset = () => {
      resetWebPrint();
      gis_utils_.mapDrawUtils.stopDrawState(props.mapTarget);
      gis_utils_.mapDrawUtils.removeGeometryByIdCustom(props.mapTarget, drawGroupName);
    };
    __expose({
      reset
    });
    return (_ctx, _cache) => {
      const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-button");
      const _component_kq_2d_web_print = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-2d-web-print");
      const _component_kq_base_window = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-base-window");
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_2, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        class: "",
        type: "primary",
        onClick: onPrint
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => _cache[1] || (_cache[1] = [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)("直接打印")])),
        _: 1 /* STABLE */
      }), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
        class: "",
        onClick: onFramePrint
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => _cache[2] || (_cache[2] = [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createTextVNode)("拉框打印")])),
        _: 1 /* STABLE */
      })])]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_base_window, {
        modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isShowKq2dWebPrint),
        "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(isShowKq2dWebPrint) ? isShowKq2dWebPrint.value = $event : isShowKq2dWebPrint = $event),
        titleIcon: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(client_icons_vue_.IconPrint),
        padding: "0",
        fullscreen: true,
        single: false,
        destroyOnClose: true,
        title: "服务端打印",
        onBeforeHide: resetWebPrint,
        id: "kq-2d-web-print",
        fixed: "fixed"
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_2d_web_print, {
          ref_key: "webPrintRef",
          ref: webPrintRef
        }, null, 512 /* NEED_PATCH */)]),
        _: 1 /* STABLE */
      }, 8 /* PROPS */, ["modelValue", "titleIcon"])], 64 /* STABLE_FRAGMENT */);
    };
  }
}));
;// CONCATENATED MODULE: ./src/leaflet/webprintrangeselect/WebPrintRangeSelect.vue?vue&type=script&setup=true&lang=js
 
;// CONCATENATED MODULE: ./src/leaflet/webprintrangeselect/WebPrintRangeSelect.vue



const __exports__ = WebPrintRangeSelectvue_type_script_setup_true_lang_js;

/* harmony default export */ var WebPrintRangeSelect = (__exports__);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/init.js"
var init_js_ = __webpack_require__(455);
var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_);
;// CONCATENATED MODULE: ./src/leaflet/webprintrangeselect/index.js
/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */


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

/******/ 	return __webpack_exports__;
/******/ })()
;
});