(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/_utils/util"), 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/_utils/util", "@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/_utils/util"), 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/_utils/util"], 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__1895__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__3458__, __WEBPACK_EXTERNAL_MODULE__7997__) {
return /******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ 7656:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": function() { return /* binding */ UndergroundViewModel; }
/* harmony export */ });
/* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5301);

/*
 * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
 * All rights reserved.
 */
class UndergroundViewModel {
  // 地下模式三维管理对象
  constructor(viewer) {
    (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
    // 三维viewer对象
    (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_undergroundManager", null);
    this._viewer = viewer;
    this._undergroundManager = new Cesium.Kq3dUndergroundManager(this._viewer.scene);
  }
  open() {
    // this._viewer.scene.skyAtmosphere.show = false;
    // 关闭碰撞检测
    // this._viewer.scene.screenSpaceCameraController.enableCollisionDetection = false; // false;
    // 关闭深度检测
    // this._viewer.scene.globe.depthTestAgainstTerrain = false; // false;
    // window.Cesium.Kq3dUndergroundMixin(this._viewer.scene);
    // 开启地下模式
    this._undergroundManager.undergroundEnabled = true; // true;
    // 开启地形透明
    this._undergroundManager.transparentEnabled = true; // true;
    // 设置地形透明度，透明度在0-1之间
    this._undergroundManager.transparent = 0.5;
  }
  close() {
    // this._viewer.scene.skyAtmosphere.show = true;
    // 开启碰撞检测
    // this._viewer.scene.screenSpaceCameraController.enableCollisionDetection = true; // true;
    // 开启深度检测
    // this._viewer.scene.globe.depthTestAgainstTerrain = true; // true;
    // 关闭地下模式
    this._undergroundManager.undergroundEnabled = false; // false;
    // 关闭地形透明
    this._undergroundManager.transparentEnabled = false; // false;
    // 设置地形透明度，透明度在0-1之间
    this._undergroundManager.transparent = 0;
  }
  destroy() {
    this.close();
  }
}

/***/ }),

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

module.exports = require("vue-i18n/dist/vue-i18n.cjs.js");

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__7135__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__3458__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__7997__;

/***/ }),

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

module.exports = __WEBPACK_EXTERNAL_MODULE__1895__;

/***/ }),

/***/ 5301:
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "Z": function() { return /* binding */ _defineProperty; }
});

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js

function toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// 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__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
!function() {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "UndergroundViewModel": function() { return /* reexport */ UndergroundViewModel/* default */.Z; },
  "default": function() { return /* reexport */ Underground; }
});

// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(1895);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
var gis_utils_ = __webpack_require__(7135);
// EXTERNAL MODULE: ./src/webgl/underground/UndergroundViewModel.js
var UndergroundViewModel = __webpack_require__(7656);
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
var util_ = __webpack_require__(3458);
// EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
var vue_i18n_cjs_js_ = __webpack_require__(7080);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/underground/Underground.vue?vue&type=script&setup=true&lang=js

const _hoisted_1 = {
  class: "kq3d-underground-switch"
};





const __default__ = {
  name: "kq3dUnderground"
};
/* harmony default export */ var Undergroundvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(__default__, {
  props: {
    /**
     * 例："center","topLeft","topRight","bottomLeft","bottomRight", "topCenter", "bottomCenter" {top:'16px',left:'16px'}, {top:16,left:16}
     */
    position: [String, Object]
  },
  emits: ["undergroundChange"],
  setup(__props, {
    expose: __expose,
    emit
  }) {
    const props = __props;
    const {
      proxy
    } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();

    //获取组件传参

    //语言
    let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["webgl"]);
    let isUndergroundMode = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
    let viewModel = null;

    // 组件容器Ref
    let boxRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);

    // 国际化
    let {
      locale,
      messages
    } = (0,vue_i18n_cjs_js_.useI18n)();
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => locale.value, (newVal, oldVal) => {
      language.value = messages.value[newVal]["webgl"];
    });
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
      (0,util_.updatePosition)(boxRef.value, props);
      (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(() => props.position, (newVal, oldVal) => {
        (0,util_.updatePosition)(boxRef.value, props);
      });
      gis_utils_.utils.getWebMap(null, scenceView => {
        if (scenceView) {
          viewModel = new UndergroundViewModel/* default */.Z(scenceView._viewer);
        }
      });
    });
    // 地下模式点击事件
    function undergroundChange() {
      if (isUndergroundMode.value) {
        viewModel.open();
      } else {
        viewModel.close();
      }
      emit("undergroundChange", isUndergroundMode.value);
    }
    // 销毁
    (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
      viewModel && viewModel.destroy();
    });
    __expose({
      undergroundChange
    });
    return (_ctx, _cache) => {
      const _component_kq_switch = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-switch");
      const _component_kq_form = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-form");
      return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("section", {
        class: "kq3d-underground",
        ref_key: "boxRef",
        ref: boxRef
      }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_form, {
        "label-width": "120px",
        "label-position": "left"
      }, {
        default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_switch, {
          modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isUndergroundMode),
          "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(isUndergroundMode) ? isUndergroundMode.value = $event : isUndergroundMode = $event),
          onChange: undergroundChange,
          width: 30,
          "active-text": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).undergroundText,
          style: {
            "margin-right": "'5px'"
          }
        }, null, 8 /* PROPS */, ["modelValue", "active-text"])])]),
        _: 1 /* STABLE */
      })], 512 /* NEED_PATCH */);
    };
  }
}));
;// CONCATENATED MODULE: ./src/webgl/underground/Underground.vue?vue&type=script&setup=true&lang=js
 
;// CONCATENATED MODULE: ./src/webgl/underground/Underground.vue



const __exports__ = Undergroundvue_type_script_setup_true_lang_js;

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



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

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