19 lines
2.7 MiB
19 lines
2.7 MiB
/*! update time: 2025/8/11 17:02:20*/!function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=22)}([function(t,e,i){var n=i(23)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(17);function o(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}t.exports=function(t,e,i){return e&&o(t.prototype,e),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(t,e,i,n,o,s,a){try{var r=t[s](a),l=r.value}catch(t){return void i(t)}r.done?e(l):Promise.resolve(l).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,s){var a=t.apply(e,n);function r(t){i(a,o,s,r,l,"next",t)}function l(t){i(a,o,s,r,l,"throw",t)}r(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(14);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(e){return t.exports=i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(28),o=i(29),s=i(15),a=i(30);t.exports=function(t){return n(t)||o(t)||s(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(17);t.exports=function(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(11).default,o=i(12);t.exports=function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return o(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(18);function o(){return t.exports=o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var o=n(t,e);if(o){var s=Object.getOwnPropertyDescriptor(o,e);return s.get?s.get.call(arguments.length<3?t:i):s.value}},t.exports.__esModule=!0,t.exports.default=t.exports,o.apply(null,arguments)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(24),o=i(25),s=i(15),a=i(26);t.exports=function(t,e){return n(t)||o(t,e)||s(t,e)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(e){return t.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){throw new TypeError('"'+t+'" is read-only')},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(e,n){return t.exports=i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,i(e,n)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(16);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(11).default,o=i(27);t.exports=function(t){var e=o(t,"string");return"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(5);t.exports=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=n(t)););return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;
|
||
/**
|
||
* [js-md5]{@link https://github.com/emn178/js-md5}
|
||
*
|
||
* @namespace md5
|
||
* @version 0.7.3
|
||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||
* @copyright Chen, Yi-Cyuan 2014-2017
|
||
* @license MIT
|
||
*/!function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(33),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(e){return new Md5(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var i=OUTPUT_TYPES[e];t[i]=createOutputMethod(i)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"==typeof t)return crypto.createHash("md5").update(t,"utf8").digest("hex");if(null==t)throw ERROR;return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash("md5").update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod};function Md5(t){if(t)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(t){if(!this.finalized){var e,i=typeof t;if("string"!==i){if("object"!==i)throw ERROR;if(null===t)throw ERROR;if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw ERROR;e=!0}for(var n,o,s=0,a=t.length,r=this.blocks,l=this.buffer8;s<a;){if(this.hashed&&(this.hashed=!1,r[0]=r[16],r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),e)if(ARRAY_BUFFER)for(o=this.start;s<a&&o<64;++s)l[o++]=t[s];else for(o=this.start;s<a&&o<64;++s)r[o>>2]|=t[s]<<SHIFT[3&o++];else if(ARRAY_BUFFER)for(o=this.start;s<a&&o<64;++s)(n=t.charCodeAt(s))<128?l[o++]=n:n<2048?(l[o++]=192|n>>6,l[o++]=128|63&n):n<55296||n>=57344?(l[o++]=224|n>>12,l[o++]=128|n>>6&63,l[o++]=128|63&n):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++s)),l[o++]=240|n>>18,l[o++]=128|n>>12&63,l[o++]=128|n>>6&63,l[o++]=128|63&n);else for(o=this.start;s<a&&o<64;++s)(n=t.charCodeAt(s))<128?r[o>>2]|=n<<SHIFT[3&o++]:n<2048?(r[o>>2]|=(192|n>>6)<<SHIFT[3&o++],r[o>>2]|=(128|63&n)<<SHIFT[3&o++]):n<55296||n>=57344?(r[o>>2]|=(224|n>>12)<<SHIFT[3&o++],r[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],r[o>>2]|=(128|63&n)<<SHIFT[3&o++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++s)),r[o>>2]|=(240|n>>18)<<SHIFT[3&o++],r[o>>2]|=(128|n>>12&63)<<SHIFT[3&o++],r[o>>2]|=(128|n>>6&63)<<SHIFT[3&o++],r[o>>2]|=(128|63&n)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,e,i,n,o,s,a=this.blocks;this.first?e=((e=((t=((t=a[0]-680876937)<<7|t>>>25)-271733879<<0)^(i=((i=(-271733879^(n=((n=(-1732584194^2004318071&t)+a[1]-117830708)<<12|n>>>20)+t<<0)&(-271733879^t))+a[2]-1126478375)<<17|i>>>15)+n<<0)&(n^t))+a[3]-1316259209)<<22|e>>>10)+i<<0:(t=this.h0,e=this.h1,i=this.h2,e=((e+=((t=((t+=((n=this.h3)^e&(i^n))+a[0]-680876936)<<7|t>>>25)+e<<0)^(i=((i+=(e^(n=((n+=(i^t&(e^i))+a[1]-389564586)<<12|n>>>20)+t<<0)&(t^e))+a[2]+606105819)<<17|i>>>15)+n<<0)&(n^t))+a[3]-1044525330)<<22|e>>>10)+i<<0),e=((e+=((t=((t+=(n^e&(i^n))+a[4]-176418897)<<7|t>>>25)+e<<0)^(i=((i+=(e^(n=((n+=(i^t&(e^i))+a[5]+1200080426)<<12|n>>>20)+t<<0)&(t^e))+a[6]-1473231341)<<17|i>>>15)+n<<0)&(n^t))+a[7]-45705983)<<22|e>>>10)+i<<0,e=((e+=((t=((t+=(n^e&(i^n))+a[8]+1770035416)<<7|t>>>25)+e<<0)^(i=((i+=(e^(n=((n+=(i^t&(e^i))+a[9]-1958414417)<<12|n>>>20)+t<<0)&(t^e))+a[10]-42063)<<17|i>>>15)+n<<0)&(n^t))+a[11]-1990404162)<<22|e>>>10)+i<<0,e=((e+=((t=((t+=(n^e&(i^n))+a[12]+1804603682)<<7|t>>>25)+e<<0)^(i=((i+=(e^(n=((n+=(i^t&(e^i))+a[13]-40341101)<<12|n>>>20)+t<<0)&(t^e))+a[14]-1502002290)<<17|i>>>15)+n<<0)&(n^t))+a[15]+1236535329)<<22|e>>>10)+i<<0,e=((e+=((n=((n+=(e^i&((t=((t+=(i^n&(e^i))+a[1]-165796510)<<5|t>>>27)+e<<0)^e))+a[6]-1069501632)<<9|n>>>23)+t<<0)^t&((i=((i+=(t^e&(n^t))+a[11]+643717713)<<14|i>>>18)+n<<0)^n))+a[0]-373897302)<<20|e>>>12)+i<<0,e=((e+=((n=((n+=(e^i&((t=((t+=(i^n&(e^i))+a[5]-701558691)<<5|t>>>27)+e<<0)^e))+a[10]+38016083)<<9|n>>>23)+t<<0)^t&((i=((i+=(t^e&(n^t))+a[15]-660478335)<<14|i>>>18)+n<<0)^n))+a[4]-405537848)<<20|e>>>12)+i<<0,e=((e+=((n=((n+=(e^i&((t=((t+=(i^n&(e^i))+a[9]+568446438)<<5|t>>>27)+e<<0)^e))+a[14]-1019803690)<<9|n>>>23)+t<<0)^t&((i=((i+=(t^e&(n^t))+a[3]-187363961)<<14|i>>>18)+n<<0)^n))+a[8]+1163531501)<<20|e>>>12)+i<<0,e=((e+=((n=((n+=(e^i&((t=((t+=(i^n&(e^i))+a[13]-1444681467)<<5|t>>>27)+e<<0)^e))+a[2]-51403784)<<9|n>>>23)+t<<0)^t&((i=((i+=(t^e&(n^t))+a[7]+1735328473)<<14|i>>>18)+n<<0)^n))+a[12]-1926607734)<<20|e>>>12)+i<<0,e=((e+=((s=(n=((n+=((o=e^i)^(t=((t+=(o^n)+a[5]-378558)<<4|t>>>28)+e<<0))+a[8]-2022574463)<<11|n>>>21)+t<<0)^t)^(i=((i+=(s^e)+a[11]+1839030562)<<16|i>>>16)+n<<0))+a[14]-35309556)<<23|e>>>9)+i<<0,e=((e+=((s=(n=((n+=((o=e^i)^(t=((t+=(o^n)+a[1]-1530992060)<<4|t>>>28)+e<<0))+a[4]+1272893353)<<11|n>>>21)+t<<0)^t)^(i=((i+=(s^e)+a[7]-155497632)<<16|i>>>16)+n<<0))+a[10]-1094730640)<<23|e>>>9)+i<<0,e=((e+=((s=(n=((n+=((o=e^i)^(t=((t+=(o^n)+a[13]+681279174)<<4|t>>>28)+e<<0))+a[0]-358537222)<<11|n>>>21)+t<<0)^t)^(i=((i+=(s^e)+a[3]-722521979)<<16|i>>>16)+n<<0))+a[6]+76029189)<<23|e>>>9)+i<<0,e=((e+=((s=(n=((n+=((o=e^i)^(t=((t+=(o^n)+a[9]-640364487)<<4|t>>>28)+e<<0))+a[12]-421815835)<<11|n>>>21)+t<<0)^t)^(i=((i+=(s^e)+a[15]+530742520)<<16|i>>>16)+n<<0))+a[2]-995338651)<<23|e>>>9)+i<<0,e=((e+=((n=((n+=(e^((t=((t+=(i^(e|~n))+a[0]-198630844)<<6|t>>>26)+e<<0)|~i))+a[7]+1126891415)<<10|n>>>22)+t<<0)^((i=((i+=(t^(n|~e))+a[14]-1416354905)<<15|i>>>17)+n<<0)|~t))+a[5]-57434055)<<21|e>>>11)+i<<0,e=((e+=((n=((n+=(e^((t=((t+=(i^(e|~n))+a[12]+1700485571)<<6|t>>>26)+e<<0)|~i))+a[3]-1894986606)<<10|n>>>22)+t<<0)^((i=((i+=(t^(n|~e))+a[10]-1051523)<<15|i>>>17)+n<<0)|~t))+a[1]-2054922799)<<21|e>>>11)+i<<0,e=((e+=((n=((n+=(e^((t=((t+=(i^(e|~n))+a[8]+1873313359)<<6|t>>>26)+e<<0)|~i))+a[15]-30611744)<<10|n>>>22)+t<<0)^((i=((i+=(t^(n|~e))+a[6]-1560198380)<<15|i>>>17)+n<<0)|~t))+a[13]+1309151649)<<21|e>>>11)+i<<0,e=((e+=((n=((n+=(e^((t=((t+=(i^(e|~n))+a[4]-145523070)<<6|t>>>26)+e<<0)|~i))+a[11]-1120210379)<<10|n>>>22)+t<<0)^((i=((i+=(t^(n|~e))+a[2]+718787259)<<15|i>>>17)+n<<0)|~t))+a[9]-343485551)<<21|e>>>11)+i<<0,this.first?(this.h0=t+1732584193<<0,this.h1=e-271733879<<0,this.h2=i-1732584194<<0,this.h3=n+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+i<<0,this.h3=this.h3+n<<0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,n=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,i=this.h2,n=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,e,i,n="",o=this.array(),s=0;s<15;)t=o[s++],e=o[s++],i=o[s++],n+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|i>>>6)]+BASE64_ENCODE_CHAR[63&i];return t=o[s],n+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(31),__webpack_require__(32))},function(t,e,i){var n=i(18),o=i(7);function s(t,e,i,a){return(s="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,i,s){var a,r=n(t,e);if(r){if((a=Object.getOwnPropertyDescriptor(r,e)).set)return a.set.call(s,i),!0;if(!a.writable)return!1}if(a=Object.getOwnPropertyDescriptor(s,e)){if(!a.writable)return!1;a.value=i,Object.defineProperty(s,e,a)}else o(s,e,i);return!0})(t,e,i,a)}t.exports=function(t,e,i,n,o){if(!s(t,e,i,n||t)&&o)throw new TypeError("failed to set property");return i},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(5),o=i(14),s=i(34),a=i(35);function r(e){var i="function"==typeof Map?new Map:void 0;return t.exports=r=function(t){if(null===t||!s(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(t))return i.get(t);i.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o(e,t)},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){t.exports=i(39)},function(t,e,i){var n=i(11).default;function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=o=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var e,i={},s=Object.prototype,a=s.hasOwnProperty,r=Object.defineProperty||function(t,e,i){t[e]=i.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",p=l.toStringTag||"@@toStringTag";function h(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,i){return t[e]=i}}function d(t,e,i,n){var o=e&&e.prototype instanceof b?e:b,s=Object.create(o.prototype),a=new N(n||[]);return r(s,"_invoke",{value:M(t,i,a)}),s}function m(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}i.wrap=d;var f="suspendedStart",v="executing",g="completed",y={};function b(){}function C(){}function w(){}var k={};h(k,c,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(B([])));_&&_!==s&&a.call(_,c)&&(k=_);var E=w.prototype=b.prototype=Object.create(k);function S(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(o,s,r,l){var c=m(t[o],t,s);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==n(p)&&a.call(p,"__await")?e.resolve(p.__await).then((function(t){i("next",t,r,l)}),(function(t){i("throw",t,r,l)})):e.resolve(p).then((function(t){u.value=t,r(u)}),(function(t){return i("throw",t,r,l)}))}l(c.arg)}var o;r(this,"_invoke",{value:function(t,n){function s(){return new e((function(e,o){i(t,n,e,o)}))}return o=o?o.then(s,s):s()}})}function M(t,i,n){var o=f;return function(s,a){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===s)throw a;return{value:e,done:!0}}for(n.method=s,n.arg=a;;){var r=n.delegate;if(r){var l=P(r,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=m(t,i,n);if("normal"===c.type){if(o=n.done?g:"suspendedYield",c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=g,n.method="throw",n.arg=c.arg)}}}function P(t,i){var n=i.method,o=t.iterator[n];if(o===e)return i.delegate=null,"throw"===n&&t.iterator.return&&(i.method="return",i.arg=e,P(t,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var s=m(o,t.iterator,i.arg);if("throw"===s.type)return i.method="throw",i.arg=s.arg,i.delegate=null,y;var a=s.arg;return a?a.done?(i[t.resultName]=a.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,y):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function B(t){if(t||""===t){var i=t[c];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function i(){for(;++o<t.length;)if(a.call(t,o))return i.value=t[o],i.done=!1,i;return i.value=e,i.done=!0,i};return s.next=s}}throw new TypeError(n(t)+" is not iterable")}return C.prototype=w,r(E,"constructor",{value:w,configurable:!0}),r(w,"constructor",{value:C,configurable:!0}),C.displayName=h(w,p,"GeneratorFunction"),i.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,h(t,p,"GeneratorFunction")),t.prototype=Object.create(E),t},i.awrap=function(t){return{__await:t}},S(D.prototype),h(D.prototype,u,(function(){return this})),i.AsyncIterator=D,i.async=function(t,e,n,o,s){void 0===s&&(s=Promise);var a=new D(d(t,e,n,o),s);return i.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(E),h(E,p,"Generator"),h(E,c,(function(){return this})),h(E,"toString",(function(){return"[object Generator]"})),i.keys=function(t){var e=Object(t),i=[];for(var n in e)i.push(n);return i.reverse(),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},i.values=B,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var i in this)"t"===i.charAt(0)&&a.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function n(n,o){return r.type="throw",r.arg=t,i.next=n,o&&(i.method="next",i.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],r=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var l=a.call(s,"catchLoc"),c=a.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),T(i),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;T(i)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:B(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),y}},i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,o,s,a,r=[],l=!0,c=!1;try{if(s=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(r.push(n.value),r.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(c)throw o}}return r}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(11).default;t.exports=function(t,e){if("object"!=n(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(16);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var i,n,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function r(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var l,c=[],u=!1,p=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):p=-1,c.length&&d())}function d(){if(!u){var t=r(h);u=!0;for(var e=c.length;e;){for(l=c,c=[];++p<e;)l&&l[p].run();p=-1,e=c.length}l=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function f(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new m(t,e)),1!==c.length||u||r(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=f,o.addListener=f,o.once=f,o.off=f,o.removeListener=f,o.removeAllListeners=f,o.emit=f,o.prependListener=f,o.prependOnceListener=f,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){(function(e){t.exports=e}).call(this,{toUrlUndefined:!0})},function(t,e){t.exports=function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,i){var n=i(36),o=i(14);t.exports=function(t,e,i){if(n())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,e);var a=new(t.bind.apply(t,s));return i&&o(a,i.prototype),a},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(t.exports=i=function(){return!!e},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t){t.exports=JSON.parse("{}")},function(t){t.exports=JSON.parse('{"地震灾害":{"1":{"c":30,"m":85,"y":65,"k":0},"2":{"c":0,"m":95,"y":40,"k":0},"3":{"c":5,"m":55,"y":40,"k":0},"4":{"c":2,"m":20,"y":20,"k":0}},"洪水灾害":{"1":{"c":100,"m":70,"y":40,"k":0},"2":{"c":70,"m":50,"y":10,"k":0},"3":{"c":55,"m":30,"y":10,"k":0},"4":{"c":20,"m":10,"y":5,"k":0}},"干旱灾害":{"1":{"c":10,"m":15,"y":100,"k":10},"2":{"c":0,"m":5,"y":55,"k":0},"3":{"c":0,"m":2,"y":25,"k":0},"4":{"c":0,"m":0,"y":10,"k":0}},"雪灾灾害":{"1":{"c":100,"m":65,"y":40,"k":0},"2":{"c":100,"m":40,"y":15,"k":0},"3":{"c":65,"m":25,"y":10,"k":0},"4":{"c":18,"m":8,"y":8,"k":0}},"雷电、冰雹灾害":{"1":{"c":40,"m":45,"y":40,"k":0},"2":{"c":30,"m":30,"y":25,"k":0},"3":{"c":0,"m":0,"y":0,"k":16},"4":{"c":0,"m":0,"y":0,"k":0}},"高温灾害":{"1":{"c":20,"m":90,"y":65,"k":20},"2":{"c":20,"m":85,"y":100,"k":0},"3":{"c":0,"m":55,"y":80,"k":0},"4":{"c":0,"m":30,"y":85,"k":0}},"低温灾害":{"1":{"c":70,"m":70,"y":50,"k":0},"2":{"c":60,"m":50,"y":30,"k":0},"3":{"c":40,"m":35,"y":20,"k":0},"4":{"c":10,"m":10,"y":5,"k":0}},"台风灾害":{"1":{"c":95,"m":75,"y":75,"k":0},"2":{"c":75,"m":60,"y":65,"k":0},"3":{"c":40,"m":25,"y":30,"k":0},"4":{"c":25,"m":10,"y":15,"k":0}},"大风、沙尘暴灾害":{"1":{"c":0,"m":40,"y":100,"k":45},"2":{"c":0,"m":0,"y":100,"k":25},"3":{"c":0,"m":0,"y":60,"k":0},"4":{"c":0,"m":0,"y":25,"k":0}},"暴雨灾害":{"1":{"c":100,"m":70,"y":40,"k":0},"2":{"c":70,"m":50,"y":10,"k":0},"3":{"c":55,"m":30,"y":10,"k":0},"4":{"c":20,"m":10,"y":5,"k":0}},"自然灾害GDP综合风险图色彩样式":{"1":{"c":15,"m":100,"y":85,"k":0},"2":{"c":7,"m":50,"y":60,"k":0},"3":{"c":0,"m":5,"y":55,"k":0},"4":{"c":0,"m":2,"y":25,"k":0},"5":{"c":0,"m":0,"y":10,"k":0}},"自然灾害死亡人口综合风险图色彩样式":{"1":{"c":0,"m":100,"y":100,"k":25},"2":{"c":15,"m":100,"y":85,"k":0},"3":{"c":5,"m":50,"y":60,"k":0},"4":{"c":5,"m":35,"y":40,"k":0},"5":{"c":0,"m":15,"y":15,"k":0}},"自然灾害受灾人口综合风险图色彩样式":{"1":{"c":25,"m":58,"y":95,"k":0},"2":{"c":8,"m":45,"y":95,"k":0},"3":{"c":5,"m":30,"y":60,"k":0},"4":{"c":2,"m":20,"y":40,"k":0},"5":{"c":0,"m":10,"y":20,"k":0}},"自然灾害农作物综合风险图色彩样式":{"1":{"c":0,"m":40,"y":100,"k":45},"2":{"c":0,"m":0,"y":100,"k":45},"3":{"c":0,"m":0,"y":100,"k":25},"4":{"c":0,"m":0,"y":60,"k":0},"5":{"c":10,"m":5,"y":15,"k":0}},"自然灾害房屋综合风险图色彩样式":{"1":{"c":60,"m":90,"y":70,"k":0},"2":{"c":50,"m":90,"y":60,"k":0},"3":{"c":40,"m":80,"y":40,"k":0},"4":{"c":25,"m":45,"y":25,"k":0},"5":{"c":15,"m":25,"y":15,"k":0}},"自然灾害道路综合风险图色彩样式":{"1":{"c":55,"m":65,"y":75,"k":0},"2":{"c":45,"m":50,"y":60,"k":0},"3":{"c":20,"m":30,"y":40,"k":0},"4":{"c":7,"m":15,"y":35,"k":0},"5":{"c":0,"m":10,"y":25,"k":0}},"自然灾害减灾能力图色彩样式":{"1":{"c":90,"m":50,"y":95,"k":0},"2":{"c":70,"m":40,"y":80,"k":0},"3":{"c":50,"m":30,"y":65,"k":0},"4":{"c":35,"m":20,"y":50,"k":0},"5":{"c":10,"m":5,"y":35,"k":0}},"自然灾害综合防治区划图色彩样式":{"1":{"c":0,"m":90,"y":80,"k":0},"2":{"c":0,"m":50,"y":80,"k":0},"3":{"c":60,"m":0,"y":50,"k":25},"4":{"c":60,"m":0,"y":100,"k":0}}}')},function(t,e,i){"use strict";i.r(e);var n=i(3),o=i.n(n),s=i(0),a=i.n(s);var r="9e549c39c542fc9f835c2a5c260f8cc1",l="40ef4712c26360d01e397ebcb0d031ca";function c(){return u.apply(this,arguments)}function u(){return(u=o()(a.a.mark((function t(){var e,i,n,o=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:{},t.next=3,fetch((e.host||"")+"/yjearth4.0/api/v1/user/sign-in",{method:"post",body:JSON.stringify({username:e.username,password:e.password}),headers:{"Content-Type":"application/json"}});case 3:return i=t.sent,t.next=6,i.text();case 6:n=t.sent,0===(n=JSON.parse(n)).code&&(p(e.host),n.token?d(n.token):d(n.data.token));case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){localStorage.setItem(l,t||"")}function h(){return localStorage.getItem(l)||""}function d(t){localStorage.setItem(r,t)}function m(){return localStorage.getItem(r)}function f(){var t=document.querySelectorAll("script"),e="";return t.forEach((function(t){if(t.src.indexOf("YJEarth.min.js")>-1){var i=t.src.split("/");i.pop(),e=i.join("/")}})),e}var g=i(10),y=i.n(g),b=i(7),C=i.n(b),w=i(1),k=i.n(w),x=i(2),_=i.n(x);function E(t){document.addEventListener("keydown",M.bind(t),!1),document.addEventListener("keyup",O.bind(t),!1),t&&t.clock.onTick.addEventListener((function(){!function(t){if(!t.scene.screenSpaceCameraController.enableTilt)return;var e=t.camera,i=t.scene.globe.ellipsoid.cartesianToCartographic(e.position).height,n=i/20,o=n/5e5/Cesium.Math.toDegrees(e.pitch);S.moveForward&&e.rotate(e.right,-o);S.moveBackward&&e.rotate(e.right,o);S.moveLeft&&e.rotate(e.up,-o);S.moveRight&&e.rotate(e.up,o);S.moveUp&&e.moveUp(n);S.moveDown&&e.moveDown(n);S.lookUp&&e.lookUp();S.lookDown&&e.lookDown();S.lookLeft&&e.lookLeft();S.lookRight&&e.lookRight();S.twistLeft&&e.twistLeft();S.twistRight&&e.twistRight();if(S.zoomIn){var s=i/2;s<1&&(s=0),e.zoomIn(s)}if(S.zoomOut){var a=i/2;i+i>=5e7&&(a=5e7-i),e.zoomOut(a)}}(t)}))}var S={moveForward:!1,moveBackward:!1,moveLeft:!1,moveRight:!1,moveUp:!1,moveDown:!1,lookUp:!1,lookDown:!1,lookLeft:!1,lookRight:!1,twistLeft:!1,twistRight:!1,zoomIn:!1,zoomOut:!1};function D(t){switch(t){case 87:return"moveForward";case 83:return"moveBackward";case 68:return"moveRight";case 65:return"moveLeft";case 81:return"moveUp";case 69:return"moveDown";case 38:return"lookUp";case 40:return"lookDown";case 37:return"lookLeft";case 39:return"lookRight";case 96:return"twistLeft";case 110:return"twistRight";case 107:return"zoomIn";case 109:return"zoomOut";default:return}}function M(t){var e;if("input"===(e=document.activeElement).tagName.toLowerCase()&&"checkbox"!==e.type||"textarea"===e.tagName.toLowerCase()||"textarea"===e.getAttribute("role"));else if(this.trackedEntity);else if(this._firstPersonView);else if(this._disableKeyboardEvent);else if(t.ctrlKey&&t.altKey){if("v"===t.key||"V"===t.key){var i=this.camera;this._CAMERA_SHORTCUT_VIEW={orientation:{heading:i.heading,pitch:i.pitch,roll:i.roll},position:{x:i.position.x,y:i.position.y,z:i.position.z}},localStorage.setItem("CAMERA_SHORTCUT_VIEW",JSON.stringify(this._CAMERA_SHORTCUT_VIEW))}if("f"===t.key||"F"===t.key){var n=localStorage.getItem("CAMERA_SHORTCUT_VIEW");this._CAMERA_SHORTCUT_VIEW=JSON.parse(n),this._CAMERA_SHORTCUT_VIEW&&this._CAMERA_SHORTCUT_VIEW.position&&this._CAMERA_SHORTCUT_VIEW.orientation&&this.camera.flyTo({destination:this._CAMERA_SHORTCUT_VIEW.position,orientation:this._CAMERA_SHORTCUT_VIEW.orientation})}}else{var o=D(t.keyCode);void 0!==o&&(S[o]=!0)}}function O(t){var e=D(t.keyCode);void 0!==e&&(S[e]=!1)}var T=i(11),N=i.n(T),B=i(6),L=i.n(B),A=i(19),j=i.n(A),I=[{name:"GCS_WGS_1984",epsg:"EPSG:4326",def:"+proj=longlat +datum=WGS84 +no_defs"},{name:"GCS_China_Geodetic_Coordinate_System_2000",epsg:"EPSG:4490",def:"+proj=longlat +ellps=GRS80 +no_defs"},{name:"WGS 84 / UTM zone 1N",epsg:"EPSG:32601",def:"+proj=utm +zone=1 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 2N",epsg:"EPSG:32602",def:"+proj=utm +zone=2 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 3N",epsg:"EPSG:32603",def:"+proj=utm +zone=3 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 4N",epsg:"EPSG:32604",def:"+proj=utm +zone=4 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 5N",epsg:"EPSG:32605",def:"+proj=utm +zone=5 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 6N",epsg:"EPSG:32606",def:"+proj=utm +zone=6 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 7N",epsg:"EPSG:32607",def:"+proj=utm +zone=7 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 8N",epsg:"EPSG:32608",def:"+proj=utm +zone=8 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 9N",epsg:"EPSG:32609",def:"+proj=utm +zone=9 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 10N",epsg:"EPSG:32610",def:"+proj=utm +zone=10 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 11N",epsg:"EPSG:32611",def:"+proj=utm +zone=11 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 12N",epsg:"EPSG:32612",def:"+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 13N",epsg:"EPSG:32613",def:"+proj=utm +zone=13 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 14N",epsg:"EPSG:32614",def:"+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 15N",epsg:"EPSG:32615",def:"+proj=utm +zone=15 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 16N",epsg:"EPSG:32616",def:"+proj=utm +zone=16 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 17N",epsg:"EPSG:32617",def:"+proj=utm +zone=17 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 18N",epsg:"EPSG:32618",def:"+proj=utm +zone=18 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 19N",epsg:"EPSG:32619",def:"+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 20N",epsg:"EPSG:32620",def:"+proj=utm +zone=20 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 21N",epsg:"EPSG:32621",def:"+proj=utm +zone=21 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 22N",epsg:"EPSG:32622",def:"+proj=utm +zone=22 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 23N",epsg:"EPSG:32623",def:"+proj=utm +zone=23 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 24N",epsg:"EPSG:32624",def:"+proj=utm +zone=24 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 25N",epsg:"EPSG:32625",def:"+proj=utm +zone=25 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 26N",epsg:"EPSG:32626",def:"+proj=utm +zone=26 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 27N",epsg:"EPSG:32627",def:"+proj=utm +zone=27 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 28N",epsg:"EPSG:32628",def:"+proj=utm +zone=28 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 29N",epsg:"EPSG:32629",def:"+proj=utm +zone=29 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 30N",epsg:"EPSG:32630",def:"+proj=utm +zone=30 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 31N",epsg:"EPSG:32631",def:"+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 32N",epsg:"EPSG:32632",def:"+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 33N",epsg:"EPSG:32633",def:"+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 34N",epsg:"EPSG:32634",def:"+proj=utm +zone=34 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 35N",epsg:"EPSG:32635",def:"+proj=utm +zone=35 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 36N",epsg:"EPSG:32636",def:"+proj=utm +zone=36 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 37N",epsg:"EPSG:32637",def:"+proj=utm +zone=37 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 38N",epsg:"EPSG:32638",def:"+proj=utm +zone=38 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 39N",epsg:"EPSG:32639",def:"+proj=utm +zone=39 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 40N",epsg:"EPSG:32640",def:"+proj=utm +zone=40 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 41N",epsg:"EPSG:32641",def:"+proj=utm +zone=41 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 42N",epsg:"EPSG:32642",def:"+proj=utm +zone=42 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 43N",epsg:"EPSG:32643",def:"+proj=utm +zone=43 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 44N",epsg:"EPSG:32644",def:"+proj=utm +zone=44 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 45N",epsg:"EPSG:32645",def:"+proj=utm +zone=45 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 46N",epsg:"EPSG:32646",def:"+proj=utm +zone=46 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 47N",epsg:"EPSG:32647",def:"+proj=utm +zone=47 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 48N",epsg:"EPSG:32648",def:"+proj=utm +zone=48 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 49N",epsg:"EPSG:32649",def:"+proj=utm +zone=49 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 50N",epsg:"EPSG:32650",def:"+proj=utm +zone=50 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 51N",epsg:"EPSG:32651",def:"+proj=utm +zone=51 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 52N",epsg:"EPSG:32652",def:"+proj=utm +zone=52 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 53N",epsg:"EPSG:32653",def:"+proj=utm +zone=53 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 54N",epsg:"EPSG:32654",def:"+proj=utm +zone=54 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 55N",epsg:"EPSG:32655",def:"+proj=utm +zone=55 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 56N",epsg:"EPSG:32656",def:"+proj=utm +zone=56 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 57N",epsg:"EPSG:32657",def:"+proj=utm +zone=57 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 58N",epsg:"EPSG:32658",def:"+proj=utm +zone=58 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 59N",epsg:"EPSG:32659",def:"+proj=utm +zone=59 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 60N",epsg:"EPSG:32660",def:"+proj=utm +zone=60 +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 1S",epsg:"EPSG:32701",def:"+proj=utm +zone=1 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 2S",epsg:"EPSG:32702",def:"+proj=utm +zone=2 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 3S",epsg:"EPSG:32703",def:"+proj=utm +zone=3 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 4S",epsg:"EPSG:32704",def:"+proj=utm +zone=4 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 5S",epsg:"EPSG:32705",def:"+proj=utm +zone=5 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 6S",epsg:"EPSG:32706",def:"+proj=utm +zone=6 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 7S",epsg:"EPSG:32707",def:"+proj=utm +zone=7 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 8S",epsg:"EPSG:32708",def:"+proj=utm +zone=8 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 9S",epsg:"EPSG:32709",def:"+proj=utm +zone=9 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 10S",epsg:"EPSG:32710",def:"+proj=utm +zone=10 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 11S",epsg:"EPSG:32711",def:"+proj=utm +zone=11 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 12S",epsg:"EPSG:32712",def:"+proj=utm +zone=12 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 13S",epsg:"EPSG:32713",def:"+proj=utm +zone=13 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 14S",epsg:"EPSG:32714",def:"+proj=utm +zone=14 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 15S",epsg:"EPSG:32715",def:"+proj=utm +zone=15 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 16S",epsg:"EPSG:32716",def:"+proj=utm +zone=16 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 17S",epsg:"EPSG:32717",def:"+proj=utm +zone=17 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 18S",epsg:"EPSG:32718",def:"+proj=utm +zone=18 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 19S",epsg:"EPSG:32719",def:"+proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 20S",epsg:"EPSG:32720",def:"+proj=utm +zone=20 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 21S",epsg:"EPSG:32721",def:"+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 22S",epsg:"EPSG:32722",def:"+proj=utm +zone=22 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 23S",epsg:"EPSG:32723",def:"+proj=utm +zone=23 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 24S",epsg:"EPSG:32724",def:"+proj=utm +zone=24 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 25S",epsg:"EPSG:32725",def:"+proj=utm +zone=25 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 26S",epsg:"EPSG:32726",def:"+proj=utm +zone=26 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 27S",epsg:"EPSG:32727",def:"+proj=utm +zone=27 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 28S",epsg:"EPSG:32728",def:"+proj=utm +zone=28 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 29S",epsg:"EPSG:32729",def:"+proj=utm +zone=29 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 30S",epsg:"EPSG:32730",def:"+proj=utm +zone=30 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 31S",epsg:"EPSG:32731",def:"+proj=utm +zone=31 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 32S",epsg:"EPSG:32732",def:"+proj=utm +zone=32 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 33S",epsg:"EPSG:32733",def:"+proj=utm +zone=33 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 34S",epsg:"EPSG:32734",def:"+proj=utm +zone=34 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 35S",epsg:"EPSG:32735",def:"+proj=utm +zone=35 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 36S",epsg:"EPSG:32736",def:"+proj=utm +zone=36 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 37S",epsg:"EPSG:32737",def:"+proj=utm +zone=37 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 38S",epsg:"EPSG:32738",def:"+proj=utm +zone=38 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 39S",epsg:"EPSG:32739",def:"+proj=utm +zone=39 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 40S",epsg:"EPSG:32740",def:"+proj=utm +zone=40 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 41S",epsg:"EPSG:32741",def:"+proj=utm +zone=41 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 42S",epsg:"EPSG:32742",def:"+proj=utm +zone=42 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 43S",epsg:"EPSG:32743",def:"+proj=utm +zone=43 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 44S",epsg:"EPSG:32744",def:"+proj=utm +zone=44 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 45S",epsg:"EPSG:32745",def:"+proj=utm +zone=45 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 46S",epsg:"EPSG:32746",def:"+proj=utm +zone=46 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 47S",epsg:"EPSG:32747",def:"+proj=utm +zone=47 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 48S",epsg:"EPSG:32748",def:"+proj=utm +zone=48 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 49S",epsg:"EPSG:32749",def:"+proj=utm +zone=49 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 50S",epsg:"EPSG:32750",def:"+proj=utm +zone=50 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 51S",epsg:"EPSG:32751",def:"+proj=utm +zone=51 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 52S",epsg:"EPSG:32752",def:"+proj=utm +zone=52 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 53S",epsg:"EPSG:32753",def:"+proj=utm +zone=53 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 54S",epsg:"EPSG:32754",def:"+proj=utm +zone=54 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 55S",epsg:"EPSG:32755",def:"+proj=utm +zone=55 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 56S",epsg:"EPSG:32756",def:"+proj=utm +zone=56 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 57S",epsg:"EPSG:32757",def:"+proj=utm +zone=57 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 58S",epsg:"EPSG:32758",def:"+proj=utm +zone=58 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 59S",epsg:"EPSG:32759",def:"+proj=utm +zone=59 +south +datum=WGS84 +units=m +no_defs"},{name:"WGS 84 / UTM zone 60S",epsg:"EPSG:32760",def:"+proj=utm +zone=60 +south +datum=WGS84 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_13",epsg:"EPSG:4491",def:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_14",epsg:"EPSG:4492",def:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_15",epsg:"EPSG:4493",def:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_16",epsg:"EPSG:4494",def:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_17",epsg:"EPSG:4495",def:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_18",epsg:"EPSG:4496",def:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_19",epsg:"EPSG:4497",def:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_20",epsg:"EPSG:4498",def:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_21",epsg:"EPSG:4499",def:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_22",epsg:"EPSG:4500",def:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_Zone_23",epsg:"EPSG:4501",def:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_75E",epsg:"EPSG:4502",def:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_81E",epsg:"EPSG:4503",def:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_87E",epsg:"EPSG:4504",def:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_93E",epsg:"EPSG:4505",def:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_99E",epsg:"EPSG:4506",def:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_105E",epsg:"EPSG:4507",def:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_111E",epsg:"EPSG:4508",def:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_117E",epsg:"EPSG:4509",def:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_123E",epsg:"EPSG:4510",def:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_129E",epsg:"EPSG:4511",def:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_GK_CM_135E",epsg:"EPSG:4512",def:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_25",epsg:"EPSG:4513",def:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_26",epsg:"EPSG:4514",def:"+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_27",epsg:"EPSG:4515",def:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_28",epsg:"EPSG:4516",def:"+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_29",epsg:"EPSG:4517",def:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_30",epsg:"EPSG:4518",def:"+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_31",epsg:"EPSG:4519",def:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_32",epsg:"EPSG:4520",def:"+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_33",epsg:"EPSG:4521",def:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_34",epsg:"EPSG:4522",def:"+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_35",epsg:"EPSG:4523",def:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_36",epsg:"EPSG:4524",def:"+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_37",epsg:"EPSG:4525",def:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_38",epsg:"EPSG:4526",def:"+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_39",epsg:"EPSG:4527",def:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_40",epsg:"EPSG:4528",def:"+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_41",epsg:"EPSG:4529",def:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_42",epsg:"EPSG:4530",def:"+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_43",epsg:"EPSG:4531",def:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_44",epsg:"EPSG:4532",def:"+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_Zone_45",epsg:"EPSG:4533",def:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_75E",epsg:"EPSG:4534",def:"+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_78E",epsg:"EPSG:4535",def:"+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_81E",epsg:"EPSG:4536",def:"+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_84E",epsg:"EPSG:4537",def:"+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_87E",epsg:"EPSG:4538",def:"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_90E",epsg:"EPSG:4539",def:"+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_93E",epsg:"EPSG:4540",def:"+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_96E",epsg:"EPSG:4541",def:"+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_99E",epsg:"EPSG:4542",def:"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_102E",epsg:"EPSG:4543",def:"+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_105E",epsg:"EPSG:4544",def:"+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_108E",epsg:"EPSG:4545",def:"+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_111E",epsg:"EPSG:4546",def:"+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_114E",epsg:"EPSG:4547",def:"+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_117E",epsg:"EPSG:4548",def:"+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_120E",epsg:"EPSG:4549",def:"+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_123E",epsg:"EPSG:4550",def:"+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_126E",epsg:"EPSG:4551",def:"+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_129E",epsg:"EPSG:4552",def:"+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_132E",epsg:"EPSG:4553",def:"+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},{name:"CGCS2000_3_Degree_GK_CM_135E",epsg:"EPSG:4554",def:"+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"}],F=function(){return _()((function t(){k()(this,t),this.name_map=new Map,this.epsg_map=new Map,this.initProj()}),[{key:"initProj",value:function(){var t=this;I.forEach((function(e){proj4.defs(e.epsg,e.def),t.name_map.set(e.name,e),t.epsg_map.set(e.epsg,e)}))}},{key:"convert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n={points:[],code:0,message:""};if(!this.name_map.has(e)&&!this.epsg_map.has(e))return n.code=1,n.message="不支持的坐标系:"+e,n;if(!this.name_map.has(i)&&!this.epsg_map.has(i))return n.code=1,n.message="不支持的坐标系:"+i,n;var o=(this.name_map.get(e)||this.epsg_map.get(e)).epsg,s=(this.name_map.get(i)||this.epsg_map.get(i)).epsg,a=proj4.defs(o),r=proj4.defs(s);return t.forEach((function(t){var e=Number(t.x),i=Number(t.y),o=Number(t.z||0),s=proj4(a,r,[e,i]);n.points.push({x:Number(s[0].toFixed(10)),y:Number(s[1].toFixed(10)),z:o})})),n}},{key:"getAllProjection",value:function(){return Array.from(this.name_map.values())}},{key:"projectionIsExists",value:function(t){return this.name_map.has(t)||this.epsg_map.has(t)}},{key:"degreesToDMS",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function i(t){var e=t.toString(),i=e.indexOf(".");return-1!==i?e.length-i-1:0}function n(t){return Math.pow(10,t)}var o=Math.floor(t),s=n(i(t)),a=Math.floor((t-o)*s*60)/s,r=Math.floor(a),l=n(i(a)),c=Math.floor((a-r)*l)/l*60;return e?o+"°"+Number(a.toFixed(4))+"'":o+"°"+r+"'"+c.toFixed(2)+'"'}},{key:"dmsToDecimal",value:function(t,e){var i,n,o;if(e){var s=t.split("°"),a=s[1].split("'");i=s[0],n=a[0],console.log(i,n);var r=Math.pow(10,8),l=Number(i*r)+n*r/60;return Math.round(l)/r}var c=t.split("°"),u=c[1].split("'"),p=u[1].split('"');i=c[0],n=u[0],o=p[0],console.log(i,n,o);var h=Math.pow(10,8),d=Number(i*h)+n*h/60+o*h/3600;return Math.round(d)/h}}])}();function R(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function z(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?R(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var H,V,G=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];k()(this,t),this.container=e,this.options=z({},i),this.options.ismove=!0,!1===i.ismove&&(this.options.ismove=i.ismove),this.closeCallBack=i.closeCallBack,this._element={},this._element_style=void 0,this.only=n}),[{key:"init",value:(t=o()(a.a.mark((function t(){var e,i,n,o=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.only&&this.closeAll(),U.push(this),this.isDestroy=!1,this._element.body=document.createElement("div"),this._element.body.className="YJ-custom-base-dialog",this._element.body.style.top=this.options.top,this._element.body.style.bottom=this.options.bottom,this._element.body.style.left=this.options.left,this._element.body.style.right=this.options.right,this.container.appendChild(this._element.body),this._element.title=document.createElement("div"),this._element.title.className="title-box",this._element.title.innerHTML='<span class="title">'.concat(this.options.title||"","</span>")+'<span class="close-box"><span class="close"></span><i>✕</i></span>',this._element.body.appendChild(this._element.title),t.next=16,document.createElement("div");case 16:return this._element.content=t.sent,this._element.content.className="content",this._element.body.appendChild(this._element.content),t.next=21,document.createElement("div");case 21:return this._element.foot=t.sent,this._element.foot.className="foot",this._element.foot.innerHTML='\n <button class="close">关闭</button>\n ',this._element.body.appendChild(this._element.foot),t.next=27,document.createElement("div");case 27:for((e=t.sent).style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.backdropFilter="blur(2px)",e.style.zIndex="-999999",this._element.body.appendChild(e),this._element.body.getElementsByClassName("close-box")[0].addEventListener("click",(function(){o.close()})),i=this._element.body.getElementsByClassName("close"),n=0;n<i.length;n++)i[n].addEventListener("click",(function(){o.close()}));this.options.ismove&&this.moveDiv();case 41:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"close",value:function(){for(var t=document.getElementsByTagName("style"),e=t.length-1;e>=0;e--)t[e].dataset&&"YJ_style_dialog"===t[e].dataset.name&&document.getElementsByTagName("head")[0].removeChild(t[e]);this._element.body&&this._element.body.parentNode&&this.container.removeChild(this._element.body),this._element.body=null,this._element.title=null,this._element.content=null,this._element.foot=null,this._element_style=null,this.isDestroy=!0,this.closeCallBack&&(this.closeCallBack(),this.closeCallBack=null)}},{key:"closeAll",value:function(){for(var t=U.length-1;t>=0;t--)U[t].close(),U.splice(t,1)}},{key:"titleAppChild",value:function(t){this._element.title.appendChild(t)}},{key:"contentAppChild",value:function(t){this._element.content.appendChild(t)}},{key:"footAppChild",value:function(t,e){e?this._element.foot.insertBefore(t,e):this._element.foot.prepend(t)}},{key:"moveDiv",value:function(){var t=this,e=0,i=0,n=0,o=0,s=this._element.body,a=this;s.onmousedown=function(s){if("title-box"===s.toElement.className){var r=t._element.body.offsetHeight,l=t._element.body.offsetWidth;e=s.clientX,i=s.clientY;var c=window.getComputedStyle(t._element.body).left,u=window.getComputedStyle(t._element.body).top;n=1*c.substr(0,c.indexOf("px")),o=1*u.substr(0,u.indexOf("px"));var p=document.documentElement.clientHeight,h=document.documentElement.clientWidth;window.onmousemove=function(t){t.preventDefault();var s=t.clientX,c=t.clientY,u=s-(e-n),d=c-(i-o);u<0?u=0:u+l>h&&(u=h-l),d<=0?d=0:d+r>p&&(d=p-r),a._element.body.style.left=u+"px",a._element.body.style.top=d+"px",a._element.body.style.bottom="unset",a._element.body.style.right="unset"},document.onmouseup=function(t){window.onmousemove=null},window.ondragend=function(t){window.onmousemove=null}}},document.onmouseup=function(t){window.onmousemove=null},window.ondragend=function(t){window.onmousemove=null}}}]);var t}(),U=[],W=G,Y=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=null;return{that:Array.prototype.slice.call(t.querySelectorAll(e),0),stopPropagation:function(t){(t=t||window.event).stopPropagation?t.stopPropagation():t.cancelBubble=!0},hide:function(){Y(t,e).that.forEach((function(t){t.style.cssText+="display:none;"}))},show:function(i){void 0!==i?Y(t,e).that[i].style.cssText+="display:block;":Y(t,e).that.forEach((function(t){t.style.cssText+="display:block;"}))},legp_searchList:function(e){var i=[];return Y(t,"input[name="+e+"]").that.forEach((function(t){i.push(t.value)})),i},legp_search:function(o){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=Y(t,e).that[i];if(a){var r='<div class="cy_datalist"><i class="yj-custom-icon-arrow-down"></i>\n '.concat(s?'<input type="text" placeholder="输入或选择" autocomplete="off">':'<input type="text" class="datalist '.concat(i,'" readonly="readonly" placeholder="请选择" autocomplete="off">'),'\n <dl style="display: none;position: absolute;background: rgba(0, 0, 0, 0.5);color: rgba(var(--color-sdk-base-rgb), 1);border: 1px solid rgba(var(--color-sdk-base-rgb), 0.2);border-radius: 3px;margin: 2px 0px;max-height: 300px;overflow-x: hidden;white-space: nowrap; font-size: 12px;z-index: 8;">\n </dl>\n </div>');a.innerHTML=r,Y(t,".cy_datalist input").that[i].oninput=function(e){var s=this.value;if(Y(t,".cy_datalist dl").hide(),o.length>0){Y(t,".cy_datalist dl").show();var a=new RegExp(s),r=!1;Y(t,".cy_datalist dl").that[i].innerHTML="",o.forEach((function(e){a.test(e.name)&&(r=!0,Y(t,".cy_datalist dl").that[i].innerHTML+='<dd class="'+(n===e.value?"active":"")+'" style="margin: 0; padding: 5px 5px; color: #fff;cursor: pointer;" value="'+e.value+'">'+e.name+"</dd>")})),r||(Y(t,".cy_datalist dl").that[i].innerHTML='<dd style="padding: 10px 20px; color: #fff;">暂无数据</dd>'),l()}},Y(t,".cy_datalist input").that[i].onclick=function(e){Y(t,".cy_datalist dl").hide();var i=1*e.srcElement.classList[1];i=i||0,"none"===Y(t,".cy_datalist dl").that[i].style.display&&(0==o.length?this.innerHTML="暂无数据":Y(t,".cy_datalist dl").show(i),Y(t,".cy_datalist dl").that[i].innerHTML="",o.forEach((function(e){Y(t,".cy_datalist dl").that[i].innerHTML+='<dd class="'+(n===e.value?"active":"")+'" style="margin: 0; padding: 5px 5px; color: #fff;cursor: pointer;" value="'+e.value+'">'+e.name+"</dd>"})),l()),e.stopPropagation()},document.addEventListener("click",(function(){Y(t,".cy_datalist dl").hide()}))}function l(){Y(t,".cy_datalist dl dd").that.forEach((function(t){t.onclick=function(t){if(this&&this.attributes){var e=this.attributes.value.value;n=e,t.currentTarget.parentNode.previousElementSibling.value=e;var i=new Event("input",{bubbles:!0});t.currentTarget.parentNode.previousElementSibling.dispatchEvent(i)}}}))}},legp_searchActive:function(t){n=t}}},J=function(){var t=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d,m;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new F,H&&H.close&&(H.close(),H=null),t.next=4,new W(e.viewer._container,{title:"度分秒",left:"180px",top:"100px",closeCallBack:function(){i&&i()}});case 4:return H=t.sent,t.next=7,H.init();case 7:o='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col input-select-box">\n <span class="label" style="flex: 0 0 60px;">输入格式</span>\n <div class="input-select"></div>\n </div>\n </div>\n </div>\n <div class="div-item item" data-type="'.concat(0,'">\n <span class="custom-divider"></span>\n <p style="font-size: 16px;padding-bottom: 6px;margin-top: 10px;margin-bottom: 5px;">\n <span style="margin-right: 10px;">度</span>\n <span style="font-size: 12px;margin-bottom: 5px;color: #F16C55">例如116.6°, 39.9°</span>\n </p>\n <div class="row">\n <div class="col">\n <span class="label" style="flex: auto;">经度</span>\n <input class="input lng" type="number" min="-180" max="180" value="0" title="">\n </div>\n <div class="col" style="margin: 0;">\n <span class="label">纬度</span>\n <input class="input lat" type="number" min="-90" max="90" value="0" title="">\n </div>\n <div class="col" style="flex: 0 0 24px;">\n <i class="icon-copy-box" title="复制" data-clipboard-action="copy" data-clipboard-target=".input" style="cursor: pointer;">\n <svg class="icon-copy" style="margin: 4px;margin-bottom: 0px;"><use xlink:href="#yj-icon-copy"></use></svg>\n </i>\n <button class="convert" style="margin-left: 10px;">转 换</button>\n </div>\n </div>\n </div>\n <div class="div-item item" data-type="',1,'">\n <span class="custom-divider"></span>\n <p style="font-size: 16px;padding-bottom: 6px;margin-top: 10px;margin-bottom: 5px;">\n <span style="margin-right: 10px;">度分</span>\n <span style="font-size: 12px;margin-bottom: 5px;color: #F16C55">例如95°10.1702\', 49°12.4015\'</span>\n </p>\n <div class="row">\n <div class="col" style="flex-direction: column;">\n <div class="row" style="margin-bottom: 15px;">\n <span class="label">经度</span>\n <input class="input lng-dm-d" style="flex: 1;" type="number" min="-180" max="180" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lng-dm-m" style="flex: 1;" type="number" min="0" max="60" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <span class="top-line"></span>\n </div>\n <div class="row">\n <span class="label">纬度</span>\n <input class="input lat-dm-d" style="flex: 1;" type="number" min="-90" max="90" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lat-dm-m" style="flex: 1;" type="number" min="0" max="60" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <span class="bottom-line"></span>\n </div>\n </div>\n <div class="col" style="flex: 0 0 24px;margin: 0;">\n <i class="icon-copy-box" title="复制" data-clipboard-action="copy" data-clipboard-target=".input" style="cursor: pointer;position: relative;left: -30px;">\n <svg class="icon-copy" style="margin: 4px;margin-bottom: 0px;"><use xlink:href="#yj-icon-copy"></use></svg>\n </i>\n <button class="convert" style="margin-left: 10px;">转 换</button>\n </div>\n </div>\n </div>\n <div class="div-item item" data-type="',2,'">\n <span class="custom-divider"></span>\n <p style="font-size: 16px;padding-bottom: 6px;margin-top: 10px;margin-bottom: 5px;">\n <span style="margin-right: 10px;">度分秒</span>\n <span style="font-size: 12px;margin-bottom: 5px;color: #F16C55">例如11°18\'54.37", 39°13\'46.57"</span>\n </p>\n <div class="row">\n <div class="col" style="flex-direction: column;">\n <div class="row" style="margin-bottom: 15px;">\n <span class="label">经度</span>\n <input class="input lng-dms-d" style="flex: 1;" type="number" min="-180" max="180" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lng-dms-m" style="flex: 1;" type="number" min="0" max="60" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <input class="input lng-dms-s" style="flex: 1;" type="number" min="0" max="60" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">秒</span>\n <span class="top-line"></span>\n </div>\n <div class="row">\n <span class="label">纬度</span>\n <input class="input lat-dms-d" style="flex: 1;" type="number" min="-90" max="90" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lat-dms-m" style="flex: 1;" type="number" min="0" max="60" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <input class="input lat-dms-s" style="flex: 1;" type="number" min="0" max="60" value="0" title="">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">秒</span>\n <span class="bottom-line"></span>\n </div>\n </div>\n <div class="col" style="flex: 0 0 24px; margin: 0;">\n <i class="icon-copy-box" title="复制" data-clipboard-action="copy" data-clipboard-target=".input" style="cursor: pointer;position: relative;left: -30px;">\n <svg class="icon-copy" style="margin: 4px;margin-bottom: 0px;"><use xlink:href="#yj-icon-copy"></use></svg>\n </i>\n <button class="convert" style="margin-left: 10px;">转 换</button>\n </div>\n </div>\n </div>\n <span class="custom-divider" style="order: 10;margin-top: 12px;"></span>\n '),H._element.body.className=H._element.body.className+" proj-convert",(s=document.createElement("div")).style.width="460px",s.style.display="flex",s.style.flexDirection="column",s.innerHTML=o,H.contentAppChild(s),r=s.getElementsByClassName("item"),l=a.a.mark((function t(e){var i,o,l,c;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=r[e].getAttribute("data-type"),o=r[e].getElementsByClassName("convert")[0],l=r[e].getElementsByClassName("icon-copy-box")[0],(c=new ClipboardJS(l,{text:function(t){var n;switch(i){case 0:case"0":n=r[e].getElementsByClassName("lng")[0].value+"°,"+r[e].getElementsByClassName("lat")[0].value+"°";break;case 1:case"1":n=s.getElementsByClassName("lng-dm-d")[0].value+"°"+s.getElementsByClassName("lng-dm-m")[0].value+"',"+s.getElementsByClassName("lat-dm-d")[0].value+"°"+s.getElementsByClassName("lat-dm-m")[0].value+"'";break;case 2:case"2":n=s.getElementsByClassName("lng-dms-d")[0].value+"°"+s.getElementsByClassName("lng-dms-m")[0].value+"'"+s.getElementsByClassName("lng-dms-s")[0].value+'",'+s.getElementsByClassName("lat-dms-d")[0].value+"°"+s.getElementsByClassName("lat-dms-m")[0].value+"'"+s.getElementsByClassName("lat-dms-s")[0].value+'"'}return n}})).on("success",(function(t){window.ELEMENT&&window.ELEMENT.Message({message:"已复制到剪切板",type:"success",duration:1500})})),c.on("error",(function(t){window.ELEMENT&&window.ELEMENT.Message({message:"复制失败",type:"warning",duration:1500})})),o.addEventListener("click",(function(){var t,o,a,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_;switch(i){case 0:case"0":t=r[e].getElementsByClassName("lng")[0].value,o=r[e].getElementsByClassName("lat")[0].value,p=n.degreesToDMS(t,!0),h=n.degreesToDMS(o,!0),v=(f=p.split("°"))[1].split("'"),y=(g=h.split("°"))[1].split("'"),s.getElementsByClassName("lng-dm-d")[0].value=f[0],s.getElementsByClassName("lng-dm-m")[0].value=v[0],s.getElementsByClassName("lat-dm-d")[0].value=g[0],s.getElementsByClassName("lat-dm-m")[0].value=y[0],d=n.degreesToDMS(t),m=n.degreesToDMS(o),w=(C=(b=d.split("°"))[1].split("'"))[1].split('"'),_=(x=(k=m.split("°"))[1].split("'"))[1].split('"'),s.getElementsByClassName("lng-dms-d")[0].value=b[0],s.getElementsByClassName("lng-dms-m")[0].value=C[0],s.getElementsByClassName("lng-dms-s")[0].value=w[0],s.getElementsByClassName("lat-dms-d")[0].value=k[0],s.getElementsByClassName("lat-dms-m")[0].value=x[0],s.getElementsByClassName("lat-dms-s")[0].value=_[0];break;case 1:case"1":a=r[e].getElementsByClassName("lng-dm-d")[0].value,l=r[e].getElementsByClassName("lng-dm-m")[0].value,c=r[e].getElementsByClassName("lat-dm-d")[0].value,u=r[e].getElementsByClassName("lat-dm-m")[0].value,t=n.dmsToDecimal(a+"°"+l+"'",!0),o=n.dmsToDecimal(c+"°"+u+"'",!0),s.getElementsByClassName("lng")[0].value=t,s.getElementsByClassName("lat")[0].value=o,d=n.degreesToDMS(t),m=n.degreesToDMS(o),w=(C=(b=d.split("°"))[1].split("'"))[1].split('"'),_=(x=(k=m.split("°"))[1].split("'"))[1].split('"'),s.getElementsByClassName("lng-dms-d")[0].value=b[0],s.getElementsByClassName("lng-dms-m")[0].value=C[0],s.getElementsByClassName("lng-dms-s")[0].value=w[0],s.getElementsByClassName("lat-dms-d")[0].value=k[0],s.getElementsByClassName("lat-dms-m")[0].value=x[0],s.getElementsByClassName("lat-dms-s")[0].value=_[0];break;case 2:case"2":d=(a=r[e].getElementsByClassName("lng-dms-d")[0].value)+"°"+(l=r[e].getElementsByClassName("lng-dms-m")[0].value)+"'"+r[e].getElementsByClassName("lng-dms-s")[0].value+'"',m=(c=r[e].getElementsByClassName("lat-dms-d")[0].value)+"°"+(u=r[e].getElementsByClassName("lat-dms-m")[0].value)+"'"+r[e].getElementsByClassName("lat-dms-s")[0].value+'"',t=n.dmsToDecimal(d),o=n.dmsToDecimal(m),s.getElementsByClassName("lng")[0].value=t,s.getElementsByClassName("lat")[0].value=o,p=n.degreesToDMS(t,!0),h=n.degreesToDMS(o,!0),v=(f=p.split("°"))[1].split("'"),y=(g=h.split("°"))[1].split("'"),s.getElementsByClassName("lng-dm-d")[0].value=f[0],s.getElementsByClassName("lng-dm-m")[0].value=v[0],s.getElementsByClassName("lat-dm-d")[0].value=g[0],s.getElementsByClassName("lat-dm-m")[0].value=y[0]}window.ELEMENT&&window.ELEMENT.Message({message:"转换成功",type:"success",duration:1500});for(var E=0;E<r.length;E++)r[E].style.display="block"})),0==e?(r[e].style.order=0,r[e].style.display="block",o.style.display="inline-block"):(r[e].style.order=1,r[e].style.display="none",o.style.display="none");case 8:case"end":return t.stop()}}),t)})),c=0;case 18:if(!(c<r.length)){t.next=23;break}return t.delegateYield(l(c),"t0",20);case 20:c++,t.next=18;break;case 23:for(u=s.getElementsByTagName("input"),p=0;p<u.length;p++)u[p].addEventListener("blur",(function(t){t.target.value||(t.target.value=0);var e=Number(t.target.value);t.target.max&&e>Number(t.target.max)&&(e=Number(t.target.max)),t.target.min&&e<Number(t.target.min)&&(e=Number(t.target.min)),t.target.value=e}));h=[{name:"度",value:"度",key:0},{name:"度分",value:"度分",key:1},{name:"度分秒",value:"度分秒",key:2}],(d=Y(H._element.content.getElementsByClassName("input-select-box")[0],".input-select"))&&(d.legp_search(h),(m=H._element.content.getElementsByClassName("input-select")[0].getElementsByTagName("input")[0]).value=h[0].value,m.addEventListener("input",(function(){for(var t=0;t<h.length;t++)if(h[t].value===m.value){for(var e=0;e<r.length;e++){var i=r[e].getElementsByClassName("convert")[0];e==h[t].key?(r[e].style.order=0,r[e].style.display="block",i.style.display="inline-block"):(r[e].style.order=0===e?2:1,r[e].style.display="none",i.style.display="none")}break}})));case 28:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}(),q=function(){H&&H.close&&(H.close(),H=null)},X=function(){return _()((function t(e){k()(this,t),this.sdk=e,this.viewer=e.viewer,this.handler=new Cesium.ScreenSpaceEventHandler(this.viewer.canvas)}),[{key:"mouse_left",value:function(t){var e=this;this.handler&&this.handler.setInputAction((function(i){var n=e.getcartesian(i);n&&t(i,n)}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}},{key:"mouse_left_down",value:function(t){var e=this;this.handler&&this.handler.setInputAction((function(i){var n=e.getcartesian(i);n&&t(i,n)}),Cesium.ScreenSpaceEventType.LEFT_DOWN)}},{key:"mouse_left_up",value:function(t){var e=this;this.handler&&this.handler.setInputAction((function(i){var n=e.getcartesian(i);n&&t(i,n)}),Cesium.ScreenSpaceEventType.LEFT_UP)}},{key:"mouse_move",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=e.getcartesian(n);(o||i)&&t(n,o)}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)}},{key:"mouse_right",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=e.getcartesian(n);(o||i)&&t(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}},{key:"mouse_right_down",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=e.getcartesian(n);(o||i)&&t(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_DOWN)}},{key:"mouse_right_up",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.handler&&this.handler.setInputAction((function(n){var o=e.getcartesian(n);(o||i)&&t(n,o)}),Cesium.ScreenSpaceEventType.RIGHT_UP)}},{key:"mouse_wheel",value:function(t){this.handler&&this.handler.setInputAction((function(){t()}),Cesium.ScreenSpaceEventType.WHEEL)}},{key:"getcartesian",value:function(t){var e=t.position||t.endPosition;t.position1&&t.position2&&(e={x:(t.position1.x+t.position2.x)/2,y:(t.position1.y+t.position2.y)/2});var i=this.viewer.scene.pickPosition(e);if(!i){for(var n=this.viewer.camera.getPickRay(e),o=this.viewer.scene.drillPickFromRay(n,10),s={},a=0;a<o.length;a++)if(o[a].position){s=o[a];break}(i=s.position)||(i=this.viewer.scene.globe.pick(n,this.viewer.scene))}return i}},{key:"mouse_right_keyboard_ctrl",value:function(t){var e=this;this.handler&&this.handler.setInputAction((function(i){var n=e.getcartesian(i);n&&t(i,n)}),Cesium.ScreenSpaceEventType.RIGHT_CLICK,Cesium.KeyboardEventModifier.CTRL)}},{key:"gesture_pinck_start",value:function(t){var e=this;this.handler&&this.handler.setInputAction((function(i){var n=e.getcartesian(i);n&&t(i,n)}),Cesium.ScreenSpaceEventType.PINCH_START)}},{key:"gesture_pinck_start_keyboard_ctrl",value:function(t){var e=this;this.handler&&this.handler.setInputAction((function(i){var n=e.getcartesian(i);n&&t(i,n)}),Cesium.ScreenSpaceEventType.PINCH_START,Cesium.KeyboardEventModifier.CTRL)}},{key:"gesture_pinck_end",value:function(t){this.handler&&this.handler.setInputAction((function(e){t()}),Cesium.ScreenSpaceEventType.PINCH_END)}},{key:"gesture_pinck_move",value:function(t){this.handler&&this.handler.setInputAction((function(t){}),Cesium.ScreenSpaceEventType.PINCH_MOVE)}},{key:"destroy",value:function(){this.handler&&this.handler.destroy(),this.handler=null}}])}(),Z=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"左键开始,右键结束",i=arguments.length>1?arguments[1]:void 0;k()(this,t),this.point=void 0,this.text=e,this.div=void 0,this.mouse_type=0,this.position=new Cesium.Cartesian3,this.viewer=i.viewer,this.create_tip(this.viewer)}),[{key:"set_text",value:function(t){this.div.getElementsByTagName("p")[0].innerText=t}},{key:"get_mouse_style",value:function(t){var e="";switch(t){case 1:e="move.png";break;default:e="arrow.png"}return"url(lib/img/"+e+"),auto"}},{key:"create_tip",value:function(t){this.create_tooltip()}},{key:"setPosition",value:function(t,e,i){this.position=t,this.move_tooltip(e,i)}},{key:"destroy",value:function(){this.viewer.entities.remove(this.point),this.remove_tooltip()}},{key:"create_tooltip",value:function(){var t=new ai;this.div=document.createElement("div");this.div.setAttribute("style","position: absolute;z-index: 777;color: #ec131a;left:10px;top:0px;pointer-events: none;");var e=document.createElement("p");e.style.margin="0px",e.style.padding="0px",e.innerText=this.text,this.div.appendChild(e);var i=document.createElement("div");i.style.width="12px",i.style.height="12px",i.style.background="url(".concat(t.getSourceRootPath()+"/img/point.png",") 100% 100% no-repeat"),i.style.backgroundSize="100% 100%",i.style.position="absolute",i.style.left="-36px",i.style.top="-4px",this.div.style.display="none",this.div.appendChild(i),t=null,document.querySelector("body").appendChild(this.div)}},{key:"style_tip",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t._element.style.cursor=this.get_mouse_style(e)}},{key:"remove_tooltip",value:function(){document.querySelector("body").contains(this.div)&&document.querySelector("body").removeChild(this.div)}},{key:"move_tooltip",value:function(t,e){var i=0,n=0;if(this.div.style.display="block",this.viewer&&this.viewer._element){var o=this.viewer._element.getElementsByClassName("cesium-widget")[0].getElementsByTagName("canvas")[0];i=o.getBoundingClientRect().top+window.scrollY,n=o.getBoundingClientRect().left+window.scrollX}this.div.style.left=t+30+n+"px",this.div.style.top=e+i+"px"}}])}(),K=function(){var t=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new ai,o=new F,V&&V.close&&(V.close(),V=null),t.next=5,new W(e.viewer._container,{title:"投影转换",left:"180px",top:"100px",closeCallBack:function(){i&&i()}});case 5:return V=t.sent,t.next=8,V.init();case 8:'\n <span class="custom-divider"></span>\n <div style="width: 540px;display: flex;">\n <div class="row left" style="flex: 1;margin-bottom: 0;">\n <div style="margin: 10px 0;flex: 1;display: flex;align-items: center;flex: 1;justify-content: space-between;">\n <span class="lable-left-line">源坐标</span>\n <button class="btn pick" style="margin-left: 20px;"><svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>坐标拾取</button>\n </div>\n <div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">椭圆基准</span>\n <div class="datalist_left"></div>\n </div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">经度(x)</span>\n <input class="input left-x" type="number" title="">\n </div>\n <div style="display: flex;margin-bottom: 10px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">纬度(y)</span>\n <input class="input left-y" type="number" title="">\n </div>\n </div>\n </div>\n <div style="display: flex;flex-direction: column;justify-content: center;margin: 28px 15px 0 15px;">\n <button class="btn convert">坐标转换<i style="margin-top: 2px;margin-left: 5px;" class="el-icon-right"></i></button>\n </div>\n <div class="row right" style="flex: 1;margin-bottom: 0;">\n <div style="margin: 10px 0;height: 32px; display: flex;align-items: center;flex: 1;justify-content: space-between;">\n <span class="lable-left-line">目标坐标</span>\n <button class="btn copy" data-clipboard-action="copy" data-clipboard-target=".input" style="margin-left: 20px;"><svg class="icon-copy"><use xlink:href="#yj-icon-copy"></use></svg>复制</button>\n </div>\n <div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">椭圆基准</span>\n <div class="datalist_right"></div>\n </div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">经度(x)</span>\n <input class="input right-x" readonly="readonly">\n </div>\n <div style="display: flex;margin-bottom: 10px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">纬度(y)</span>\n <input class="input right-y" readonly="readonly">\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',(l=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div style="width: 540px;display: flex;">\n <div class="row left" style="flex: 1;margin-bottom: 0;">\n <div style="margin: 10px 0;flex: 1;display: flex;align-items: center;flex: 1;justify-content: space-between;">\n <span class="lable-left-line">源坐标</span>\n <button class="btn pick" style="margin-left: 20px;"><svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>坐标拾取</button>\n </div>\n <div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">椭圆基准</span>\n <div class="datalist_left"></div>\n </div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">经度(x)</span>\n <input class="input left-x" type="number" title="">\n </div>\n <div style="display: flex;margin-bottom: 10px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">纬度(y)</span>\n <input class="input left-y" type="number" title="">\n </div>\n </div>\n </div>\n <div style="display: flex;flex-direction: column;justify-content: center;margin: 28px 15px 0 15px;">\n <button class="btn convert">坐标转换<i style="margin-top: 2px;margin-left: 5px;" class="el-icon-right"></i></button>\n </div>\n <div class="row right" style="flex: 1;margin-bottom: 0;">\n <div style="margin: 10px 0;height: 32px; display: flex;align-items: center;flex: 1;justify-content: space-between;">\n <span class="lable-left-line">目标坐标</span>\n <button class="btn copy" data-clipboard-action="copy" data-clipboard-target=".input" style="margin-left: 20px;"><svg class="icon-copy"><use xlink:href="#yj-icon-copy"></use></svg>复制</button>\n </div>\n <div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">椭圆基准</span>\n <div class="datalist_right"></div>\n </div>\n <div style="display: flex;margin-bottom: 12px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">经度(x)</span>\n <input class="input right-x" readonly="readonly">\n </div>\n <div style="display: flex;margin-bottom: 10px;align-items: center;">\n <span class="label" style="flex: 0 0 60px;">纬度(y)</span>\n <input class="input right-y" readonly="readonly">\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',V.contentAppChild(l),c=[],u=0,o.epsg_map.forEach((function(t,e){u++,c.push({name:"".concat(u,". ").concat(e,"(").concat(t.name,")"),value:e})})),(p=Y(l.getElementsByClassName("left")[0],".datalist_left")).legp_search(c,!0),(h=Y(l.getElementsByClassName("right")[0],".datalist_right")).legp_search(c,!0),d=l.getElementsByClassName("pick")[0],m=l.getElementsByClassName("copy")[0],(f=l.getElementsByClassName("datalist_left")[0].getElementsByTagName("input")[0]).value=c[0].value,p.legp_searchActive(c[0].value),(v=l.getElementsByClassName("datalist_right")[0].getElementsByTagName("input")[0]).value=c[0].value,h.legp_searchActive(c[0].value),g=l.getElementsByClassName("convert")[0],y=l.getElementsByClassName("left-x")[0],b=l.getElementsByClassName("left-y")[0],C=l.getElementsByClassName("right-x")[0],w=l.getElementsByClassName("right-y")[0],d.addEventListener("click",(function(){s&&s.destroy(),r&&r.destroy(),s=new Z("左键选择起点坐标,右键取消",e),(r=new X(e)).mouse_move((function(t,e){s.setPosition(e,t.endPosition.x,t.endPosition.y)})),r.mouse_left((function(t,i){var a=n.cartesian3Towgs84(i,e.viewer);s&&s.destroy(),r&&r.destroy();var l=o.convert([{x:Number(a.lng),y:Number(a.lat)}],"EPSG:4326",f.value);0===l.code&&(y.value=l.points[0].x,b.value=l.points[0].y)})),r.mouse_right((function(t,e){s&&s.destroy(),r&&r.destroy()}))})),g.addEventListener("click",(function(){if(!y.value||!b.value)return C.value="",w.value="",void(window.ELEMENT&&window.ELEMENT.Message({message:"请输入源坐标",type:"warning",duration:1500}));var t=o.convert([{x:Number(y.value),y:Number(b.value)}],f.value,v.value);0===t.code?(C.value=t.points[0].x,w.value=t.points[0].y):window.ELEMENT&&window.ELEMENT.Message({message:t.message,type:"warning",duration:1500})})),new ClipboardJS(m,{text:function(t){if(C.value&&w.value){var e="".concat(C.value,",").concat(w.value);return e}C.value="",w.value="",window.ELEMENT&&window.ELEMENT.Message({message:"复制失败,目标坐标为空!",type:"warning",duration:1500})}}).on("success",(function(t){window.ELEMENT&&window.ELEMENT.Message({message:"已复制到剪切板",type:"success",duration:1500})}));case 36:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}(),$=function(){V&&V.close&&(V.close(),V=null)},Q=[new Map,new Map,new Map];Q[0].set("--color-sdk-base-rgb","0, 255, 255"),Q[0].set("--color-sdk-gradual","rgb(0, 255, 255) 6.25%, rgb(0, 200, 255) 100%"),Q[0].set("--color-sdk-bg-gradual","#00ffff33 0%, #00ffff00 100%"),Q[0].set("--color-sdk-text-shadow","rgba(20, 118, 255, 1)"),Q[1].set("--color-sdk-base-rgb","42, 200, 251"),Q[1].set("--color-sdk-gradual","rgb(42, 200, 251) 6.25%, rgb(42, 145, 251) 100%"),Q[1].set("--color-sdk-bg-gradual","#2ac8fb33 0%, #2ac8fb00 100%"),Q[1].set("--color-sdk-text-shadow","rgba(20, 63, 255, 1)"),Q[2].set("--color-sdk-base-rgb","187, 26, 41"),Q[2].set("--color-sdk-gradual","rgb(187, 26, 41) 6.25%, rgb(236, 20, 20) 100%"),Q[2].set("--color-sdk-bg-gradual","#bb1a2933 0%, #bb1a2900 100%"),Q[2].set("--color-sdk-text-shadow","rgba(246, 8, 30, 1)");var tt={};function et(t,e,i){if(t&&t.div_id){var n=le().sdkD,o=document.getElementById(t.div_id).getElementsByClassName("cesium-viewer")[0],s=new ai;tt[t.div_id]||(tt[t.div_id]={}),tt[t.div_id].mousedown&&document.removeEventListener("mousedown",tt[t.div_id].mousedown),tt[t.div_id].click&&document.removeEventListener("click",tt[t.div_id].click),tt[t.div_id].callBack||(tt[t.div_id].callBack=i),t!==n&&tt[t.div_id].mouseRightMenuEvent&&tt[t.div_id].mouseRightMenuEvent.destroy();var a=document.getElementById("custom-menu");a&&o.removeChild(a),tt[t.div_id].status=e,e&&(tt[t.div_id].mousedown=function(t){if(!(t.target.parentNode&&"custom-menu"==t.target.parentNode.id||t.target.parentNode&&t.target.parentNode.parentNode&&"custom-menu"==t.target.parentNode.parentNode.id)){var e=document.getElementById("custom-menu");e&&o.removeChild(e)}},document.addEventListener("mousedown",tt[t.div_id].mousedown),tt[t.div_id].click=function(t){if(!(t.target.parentNode&&"custom-menu"==t.target.parentNode.id||t.target.parentNode&&t.target.parentNode.parentNode&&"custom-menu"==t.target.parentNode.parentNode.id)){var e=document.getElementById("custom-menu");e&&o.removeChild(e)}},document.addEventListener("click",tt[t.div_id].click),tt[t.div_id].mouseRightMenuEvent=new X(t),tt[t.div_id].mouseRightMenuEvent.mouse_right((function(e,i){if(!YJ.Measure.GetMeasureStatus()&&!t.viewer.trackedEntity){var n=t.viewer.entities.getById("svg-control-points_0");if(!n||!n.show){var a=document.getElementById("custom-menu");a&&o.removeChild(a);var r,l=function(e){var i=t.viewer.scene.pick(e.position);if(i)if(i.id){if(i.id.type&&"vector"===i.id.type&&i.id.parentId)return{parentId:i.id.parentId,id:i.id.id};if(i.id.id)return i.id.id;if("string"==typeof i.id)return i.id}else if(i.primitive&&i.primitive.id)return i.primitive.id}(e);"[object Object]"===Object.prototype.toString.call(l)&&(r=l.id,l=l.parentId);var c="",u=t.entityMap.get(l);if(!u&&l){var p=l.split("-");p.splice(p.length-1,1),l=p.join("-"),u=t.entityMap.get(l)}u&&u.picking&&(c='\n <span class="divider" style="display: block;border-top: 1px solid #ddd;margin: 5px;"></span>\n <ul class="added" style="list-style: none;padding: 0;margin: 0;font-size: 12px;">\n <li style="padding: 3px 10px;cursor: pointer;">属性</li>\n </ul>\n ');var h=s.cartesian3Towgs84(i,t.viewer);(a=document.createElement("div")).id="custom-menu",a.style.position="absolute",a.style.width="110px",a.style.backgroundColor="#00000085",a.style.color="#ffffff",a.style.padding="6px 0",a.style.boxShadow="4px 4px 4px 0px rgba(0, 0, 0, 0.8)",a.innerHTML='\n <ul class="base" style="list-style: none;padding: 0;margin: 0;font-size: 12px;">\n <li style="padding: 3px 10px;cursor: pointer;">绕鼠标点旋转</li>\n </ul>\n '.concat(c,"\n "),o.appendChild(a);var d=e.position.x,m=e.position.y;e.position.x+a.offsetWidth>o.offsetWidth&&(d=e.position.x-a.offsetWidth),e.position.y+a.offsetHeight>o.offsetHeight&&(m=e.position.y-a.offsetHeight),a.style.left=d+"px",a.style.top=m+"px",a.addEventListener("contextmenu",(function(t){t.preventDefault()}));for(var f=a.getElementsByTagName("li"),v={},g=function(e){f[e].addEventListener("mouseover",(function(){f[e].style.backgroundColor="#5e5e5e"})),f[e].addEventListener("mouseout",(function(){f[e].style.backgroundColor="unset"})),f[e].addEventListener("click",(function(){var i="";switch(f[e].innerHTML){case"绕鼠标点旋转":v.position=h,i="rotateAround";break;case"属性":r?(v.id=r,v.parentId=u.options.id):v.id=u.options.id,i="attribute"}tt[t.div_id].callBack(i,v),o.removeChild(a)}))},y=0;y<f.length;y++)g(y)}}})))}}function it(t){return t&&t.div_id&&tt[t.div_id]?tt[t.div_id].status:void 0}var nt=null,ot=null,st=null,at=new Map,rt=new Map,lt=new Map;function ct(t,e){var i=e.scene.globe.ellipsoid,n=new Cesium.Cartesian3(t.x,t.y,t.z),o=i.cartesianToCartographic(n),s=Cesium.Math.toDegrees(o.latitude);return{lng:Cesium.Math.toDegrees(o.longitude),lat:s,alt:o.height<0?0:o.height}}function ut(t,e){e.endPosition&&(e.endPosition.y-=2);var i=e.position||e.endPosition,n=t.viewer.scene.pickPosition(i);if(!n){var o=t.viewer.camera.getPickRay(i);n=t.viewer.scene.globe.pick(o,t.viewer.scene)}return n}function pt(t,e){if(t&&t.viewer){var i=!0;(nt=new Cesium.ScreenSpaceEventHandler(t.viewer.canvas)).setInputAction((function(n){var o=t.viewer.scene.pickPosition(n.position);if(!o){var s=t.viewer.camera.getPickRay(n.position);o=t.viewer.scene.globe.pick(s,t.viewer.scene)}if(o){var a=ct(o,t.viewer);if(e&&e(a),i&&(i=!1,setTimeout((function(){i=!0}),600),!YJ.Measure.GetMeasureStatus()&&o)){for(var r=!1,l=at.size-1;l>=0;l--){var c=Array.from(at.keys())[l],u=at.get(c);if(u&&u.that)if("PolygonObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=3){for(var p=turf.point([a.lng,a.lat]),h=[],d=0;d<u.that.options.positions.length;d++)h.push([u.that.options.positions[d].lng,u.that.options.positions[d].lat]);h.push([u.that.options.positions[0].lng,u.that.options.positions[0].lat]);var m=turf.polygon([h]);if(turf.booleanPointInPolygon(p,m)){u.callback(n,u.that.options.id,ct(ut(t,n),t.viewer),u.that),r=!0;break}}}else if("AssembleObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=3){for(var f=u.that.computeAssemble(u.that.options.positions,!0),v=turf.point([a.lng,a.lat]),g=[],y=0;y<f.length;y+=2)g.push([f[y],f[y+1]]);var b=turf.polygon([g]);if(turf.booleanPointInPolygon(v,b)){u.callback(n,u.that.options.id,ct(ut(t,n),t.viewer),u.that),r=!0;break}}}else if("AttackArrowObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=3){for(var C=turf.point([a.lng,a.lat]),w=u.that.computeAttackArrow(u.that.options.positions),k=[],x=0;x<w.length;x++){var _=ct(w[x],t.viewer);k.push([_.lng,_.lat])}var E=turf.polygon([k]);if(turf.booleanPointInPolygon(C,E)){u.callback(n,u.that.options.id,ct(ut(t,n),t.viewer),u.that),r=!0;break}}}else if("PincerArrowObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=5){for(var S=turf.point([a.lng,a.lat]),D=u.that.computePincerArrow(u.that.options.positions),M=[],P=0;P<D.length;P++){var O=ct(D[P],t.viewer);M.push([O.lng,O.lat])}var T=ct(D[0],t.viewer);M.push([T.lng,T.lat]);var N=turf.polygon([M]);if(turf.booleanPointInPolygon(S,N)){u.callback(n,u.that.options.id,ct(ut(t,n),t.viewer),u.that),r=!0;break}}}else if("CircleObject"===u.that.type){if(u.that.picking){var B=turf.point([a.lng,a.lat]);if(u.that.options.center&&u.that.options.radius){var L=[u.that.options.center.lng,u.that.options.center.lat],A=u.that.options.radius/1e3,j=turf.circle(L,A,{steps:360,units:"kilometers"});if(turf.booleanPointInPolygon(B,j)){u.callback(n,u.that.options.id,ct(ut(t,n),t.viewer),u.that),r=!0;break}}}}else if("SectorObject"===u.that.type&&u.that.picking){var I=turf.point([a.lng,a.lat]);if(u.that.options.center&&u.that.options.radius&&u.that.options.startAngle&&u.that.options.endAngle){for(var F=u.that.calSector(u.that.options.center,u.that.options.radius,u.that.options.startAngle,u.that.options.endAngle,void 0,!0),R=[],z=0;z<F.length;z++)R.push([F[z].lng,F[z].lat]);var H=turf.polygon([R]);if(turf.booleanPointInPolygon(I,H)){u.callback(n,u.that.options.id,ct(ut(t,n),t.viewer),u.that),r=!0;break}}}}if(!r){var V=t.viewer.scene.pick(n.position);if(V){if(V.id){var G;if(V.id.type&&"vector"===V.id.type&&V.id.parentId){var U=at.get(V.id.parentId);if(U.that.picking&&U.that.geojson)for(var W=0;W<U.that.geojson.features.length;W++)U.that.geojson.features[W].id===V.id._id&&U.callback(n,U.that.geojson.features[W].id,ct(ut(t,n),t.viewer),U.that)}else if("string"==typeof V.id.id){var Y=V.id.id.split("-");Y.splice(Y.length-1,1),G=Y.join("-")}if(V.id.properties&&V.id.properties.id&&at.has(V.id.properties.id._value)){var J=at.get(V.id.properties.id._value);J.that.picking&&J.callback(n,V.id.properties.id._value,ct(ut(t,n),t.viewer),J.that)}else if(at.has(V.id.id)){var q=at.get(V.id.id);q.that.picking&&q.callback(n,V.id.id,ct(ut(t,n),t.viewer),q.that)}else if(G&&at.has(G)){var X=at.get(G);X.that.picking&&X.callback(n,G,ct(ut(t,n),t.viewer),X.that)}else if(V.primitive&&"string"==typeof V.id&&at.has(V.id)){var Z=at.get(V.id);Z.callback(n,V.id,ct(ut(t,n),t.viewer),Z.that)}}else if(V.primitive&&V.primitive.id&&at.has(V.primitive.id)){var K=at.get(V.primitive.id);K.that.picking&&("bim"===K.that.type?YJ.Global.getBimPickStatus(t)&&K.callback(n,V.primitive,ct(ut(t,n),t.viewer),K.that):K.callback(n,V.primitive.id,ct(ut(t,n),t.viewer),K.that))}if(V.content&&(!V.primitive||!V.primitive.id)&&at.has(V.content.tileset.id)){var $=at.get(V.content.tileset.id);$.that.picking&&("bim"===$.that.type?YJ.Global.getBimPickStatus(t)&&$.callback(n,V.content.tileset,ct(ut(t,n),t.viewer),$.that):$.callback(n,V.content.tileset.id,ct(ut(t,n),t.viewer),$.that))}}}}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}}function ht(t){nt.destroy(),nt=null}function dt(t,e,i){at.set(t,{callback:e,that:i})}function mt(t,e,i){rt.set(t,{callback:e,that:i})}function ft(t,e,i){lt.set(t,{callback:e,that:i})}function vt(){if(nt)return!0}function gt(){if(ot)return!0}function yt(){if(st)return!0}var bt,Ct=new Map,wt=new Map,kt=new Map;function xt(t,e){var i=e.scene.globe.ellipsoid,n=new Cesium.Cartesian3(t.x,t.y,t.z),o=i.cartesianToCartographic(n),s=Cesium.Math.toDegrees(o.latitude);return{lng:Cesium.Math.toDegrees(o.longitude),lat:s,alt:o.height<0?0:o.height}}function _t(t,e){e.endPosition&&(e.endPosition.y-=2);var i=e.position||e.endPosition,n=t.viewer.scene.pickPosition(i);if(!n){var o=t.viewer.camera.getPickRay(i);n=t.viewer.scene.globe.pick(o,t.viewer.scene)}return n}function Et(t,e){if(t&&t.viewer){var i=!0;new Cesium.ScreenSpaceEventHandler(t.viewer.canvas).setInputAction((function(n){var o=t.viewer.scene.pickPosition(n.position);if(!o){var s=t.viewer.camera.getPickRay(n.position);o=t.viewer.scene.globe.pick(s,t.viewer.scene)}if(o){var a=xt(o,t.viewer);if(e&&e(a),i&&(i=!1,setTimeout((function(){i=!0}),600),!YJ.Measure.GetMeasureStatus()&&o)){for(var r=!1,l=Ct.size-1;l>=0;l--){var c=Array.from(Ct.keys())[l],u=Ct.get(c);if(u&&u.that)if("PolygonObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=3){for(var p=turf.point([a.lng,a.lat]),h=[],d=0;d<u.that.options.positions.length;d++)h.push([u.that.options.positions[d].lng,u.that.options.positions[d].lat]);h.push([u.that.options.positions[0].lng,u.that.options.positions[0].lat]);var m=turf.polygon([h]);if(turf.booleanPointInPolygon(p,m)){u.callback(n,u.that.options.id,xt(_t(t,n),t.viewer),u.that),r=!0;break}}}else if("AssembleObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=3){for(var f=u.that.computeAssemble(u.that.options.positions,!0),v=turf.point([a.lng,a.lat]),g=[],y=0;y<f.length;y+=2)g.push([f[y],f[y+1]]);var b=turf.polygon([g]);if(turf.booleanPointInPolygon(v,b)){u.callback(n,u.that.options.id,xt(_t(t,n),t.viewer),u.that),r=!0;break}}}else if("AttackArrowObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=3){for(var C=turf.point([a.lng,a.lat]),w=u.that.computeAttackArrow(u.that.options.positions),k=[],x=0;x<w.length;x++){var _=xt(w[x],t.viewer);k.push([_.lng,_.lat])}var E=turf.polygon([k]);if(turf.booleanPointInPolygon(C,E)){u.callback(n,u.that.options.id,xt(_t(t,n),t.viewer),u.that),r=!0;break}}}else if("PincerArrowObject"===u.that.type){if(u.that.picking&&u.that.options.positions&&u.that.options.positions.length>=5){for(var S=turf.point([a.lng,a.lat]),D=u.that.computePincerArrow(u.that.options.positions),M=[],P=0;P<D.length;P++){var O=xt(D[P],t.viewer);M.push([O.lng,O.lat])}var T=xt(D[0],t.viewer);M.push([T.lng,T.lat]);var N=turf.polygon([M]);if(turf.booleanPointInPolygon(S,N)){u.callback(n,u.that.options.id,xt(_t(t,n),t.viewer),u.that),r=!0;break}}}else if("CircleObject"===u.that.type){if(u.that.picking){var B=turf.point([a.lng,a.lat]);if(u.that.options.center&&u.that.options.radius){var L=[u.that.options.center.lng,u.that.options.center.lat],A=u.that.options.radius/1e3,j=turf.circle(L,A,{steps:360,units:"kilometers"});if(turf.booleanPointInPolygon(B,j)){u.callback(n,u.that.options.id,xt(_t(t,n),t.viewer),u.that),r=!0;break}}}}else if("SectorObject"===u.that.type&&u.that.picking){var I=turf.point([a.lng,a.lat]);if(u.that.options.center&&u.that.options.radius&&u.that.options.startAngle&&u.that.options.endAngle){for(var F=u.that.calSector(u.that.options.center,u.that.options.radius,u.that.options.startAngle,u.that.options.endAngle,void 0,!0),R=[],z=0;z<F.length;z++)R.push([F[z].lng,F[z].lat]);var H=turf.polygon([R]);if(turf.booleanPointInPolygon(I,H)){u.callback(n,u.that.options.id,xt(_t(t,n),t.viewer),u.that),r=!0;break}}}}if(!r){var V=t.viewer.scene.pick(n.position);if(V){if(V.id){var G;if(V.id.type&&"vector"===V.id.type&&V.id.parentId){var U=Ct.get(V.id.parentId);if(U.that.picking&&U.that.geojson)for(var W=0;W<U.that.geojson.features.length;W++)U.that.geojson.features[W].id===V.id._id&&U.callback(n,U.that.geojson.features[W].id,xt(_t(t,n),t.viewer),U.that)}else if("string"==typeof V.id.id){var Y=V.id.id.split("-");Y.splice(Y.length-1,1),G=Y.join("-")}if(V.id.properties&&V.id.properties.id&&Ct.has(V.id.properties.id._value)){var J=Ct.get(V.id.properties.id._value);J.that.picking&&J.callback(n,V.id.properties.id._value,xt(_t(t,n),t.viewer),J.that)}else if(Ct.has(V.id.id)){var q=Ct.get(V.id.id);q.that.picking&&q.callback(n,V.id.id,xt(_t(t,n),t.viewer),q.that)}else if(G&&Ct.has(G)){var X=Ct.get(G);X.that.picking&&X.callback(n,G,xt(_t(t,n),t.viewer),X.that)}else if(V.primitive&&"string"==typeof V.id&&Ct.has(V.id)){var Z=Ct.get(V.id);Z.callback(n,V.id,xt(_t(t,n),t.viewer),Z.that)}}else if(V.primitive&&V.primitive.id&&Ct.has(V.primitive.id)){var K=Ct.get(V.primitive.id);K.that.picking&&("bim"===K.that.type?YJ.Global.getBimPickStatus(t)&&K.callback(n,V.primitive,xt(_t(t,n),t.viewer),K.that):K.callback(n,V.primitive.id,xt(_t(t,n),t.viewer),K.that))}if(V.content&&(!V.primitive||!V.primitive.id)&&Ct.has(V.content.tileset.id)){var $=Ct.get(V.content.tileset.id);$.that.picking&&("bim"===$.that.type?YJ.Global.getBimPickStatus(t)&&$.callback(n,V.content.tileset,xt(_t(t,n),t.viewer),$.that):$.callback(n,V.content.tileset.id,xt(_t(t,n),t.viewer),$.that))}}}}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}}function St(t){t&&t.viewer&&new Cesium.ScreenSpaceEventHandler(t.viewer.canvas).setInputAction((function(e){if(!YJ.Measure.GetMeasureStatus()){var i,n=t.viewer.scene.pick(e.position);if(n&&n.id)if(n.id.type&&"vector"===n.id.type&&n.id.parentId){var o=wt.get(n.id.parentId);if(o.that.picking&&o.that.geojson)for(var s=0;s<o.that.geojson.features.length;s++)o.that.geojson.features[s].id===n.id._id&&o.callback(e,o.that.geojson.features[s].id,xt(_t(t,e),t.viewer),o.that)}else if(i="string"==typeof n.id?n.id:n.id.id,wt.has(i)){var a=wt.get(i);if(a.that.picking){var r=_t(t,e);if(!r)return;a.callback(e,i,xt(r,t.viewer),a.that)}}if(n&&n.content&&wt.has(n.content.tileset.id)){var l=wt.get(n.content.tileset.id);if(l.that.picking)if("bim"===l.that.type){if(YJ.Global.getBimPickStatus(t)){var c=_t(t,e);if(!c)return;l.callback(e,n.getProperty("id"),xt(c,t.viewer),l.that)}}else{var u=_t(t,e);if(!u)return;l.callback(e,n.content.tileset.id,xt(u,t.viewer),l.that)}}}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)}function Dt(t){new Cesium.ScreenSpaceEventHandler(t.viewer.canvas).setInputAction((function(e){t.viewer.scene.pick(e.endPosition)}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)}var Mt=!1,Pt="1:100万";function Ot(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){bt||(bt=new ai),(Mt=!!e)?Tt(t,Pt):Lt(t);var i=Me();i&&(Mt?Tt(t,Pt):Lt(i));var n=le().sdkD;n&&t!==n&&Ot(n,e)}}function Tt(t,e){Pt=e,Mt&&Bt(t);var i=Me();return i&&Mt&&Bt(i),new Promise(function(){var t=o()(a.a.mark((function t(e,i){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:setTimeout((function(){e()}),1e3);case 1:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}())}function Nt(){return Mt}function Bt(t){Lt(t);var e,i,n=t.viewer.camera.positionCartographic,o={position:{lng:Cesium.Math.toDegrees(n.longitude),lat:Cesium.Math.toDegrees(n.latitude),alt:n.height}},s=t.viewer;switch(Pt){case"1:100万":o.position.alt=16e6;break;case"1:50万":o.position.alt=5e6;break;case"1:25万":o.position.alt=23e5;break;case"1:10万":o.position.alt=68e4;break;case"1:5万":o.position.alt=385e3;break;case"1:2.5万":o.position.alt=18e4;break;case"1:1万":o.position.alt=9e4;break;case"1:5000":o.position.alt=46e3}for(var a=0;a<s.scene.primitives._primitives.length;a++)if("SheetIndexGridPrimitives"===s.scene.primitives._primitives[a].name){e=s.scene.primitives._primitives[a];for(var r=0;r<e._primitives.length;r++)if("SheetIndexLabelCollection"===e._primitives[r].name){i=e._primitives[r];break}break}e||((e=new Cesium.PrimitiveCollection).name="SheetIndexGridPrimitives",s.scene.primitives.add(e)),i||((i=new Cesium.LabelCollection).name="SheetIndexLabelCollection");var l=0,c=null;function u(t){i.removeAll(),e.removeAll(),(i=new Cesium.LabelCollection).name="SheetIndexLabelCollection",e.add(i);var n,o,s,a=h();switch(t){case"1:100万":n=6,o=4,s=new Cesium.NearFarScalar(2e7,1,8e7,0);break;case"1:50万":n=3,o=2,s=new Cesium.NearFarScalar(5e6,1,3e7,0);break;case"1:25万":n=1.5,o=1,s=new Cesium.NearFarScalar(23e5,1,2e7,0);break;case"1:10万":n=.5,o=1/3,s=new Cesium.NearFarScalar(68e4,1,5e6,0);break;case"1:5万":n=.25,o=1/6,s=new Cesium.NearFarScalar(385e3,1,24e5,0);break;case"1:2.5万":n=.125,o=1/12,s=new Cesium.NearFarScalar(18e4,1,12e5,0);break;case"1:1万":n=.0625,o=1/24,s=new Cesium.NearFarScalar(9e4,1,7e5,0);break;case"1:5000":n=.03125,o=1/48,s=new Cesium.NearFarScalar(46e3,1,3e5,0)}var r=Math.floor((180+Cesium.Math.toDegrees(a.west))/n)*n-180,l=Math.floor((88+Cesium.Math.toDegrees(a.south))/o)*o-88,u=Math.ceil((180+Cesium.Math.toDegrees(a.east))/n)*n-180,d=Math.ceil((88+Cesium.Math.toDegrees(a.north))/o)*o-88;if(r>u&&(u+=360),c={minLng:r,minLat:l,maxLng:u,maxLat:d},l<-88&&(l=-88),d>88&&(d=88),(c.maxLng-c.minLng)/n*((c.maxLat-c.minLat)/o)>7e3)c=null;else{for(var m=r;m<=u;m+=n){for(var f=[],v=[],g=l;Math.floor(1e9*g)/1e9<=d;g+=o/2)v.push([m,g]),f.push(Cesium.Cartesian3.fromDegrees(m,g,8848));88!=d&&d+o/2>=88&&f.push(Cesium.Cartesian3.fromDegrees(m,88,8848));var y=new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:f,width:1,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,arcType:Cesium.ArcType.RHUMB})});if(e.add(new Cesium.Primitive({geometryInstances:y,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.fromCssColorString("#fcfc00")})})})),m<u)for(var b=l;b<d;b+=o){var C={lng:m+n/2,lat:b+o/2};if(C.lat>d)break;var w=p(C.lng,C.lat,t);i.add({position:Cesium.Cartesian3.fromDegrees(C.lng,C.lat,8848),text:w,font:"16px Inter, sans-serif",fillColor:Cesium.Color.fromCssColorString("#fcfc00"),pixelOffset:new Cesium.Cartesian2(0,0),showBackground:!1,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,scale:1,distanceDisplayCondition:new Cesium.DistanceDisplayCondition(0,8e7),scaleByDistance:s})}}for(var k=l;Math.floor(1e9*k)/1e9<=d;k+=o){for(var x=[],_=[],E=r;E<=u;E+=n/2)_.push([E,k]),x.push(Cesium.Cartesian3.fromDegrees(E,k,8848));var S=new Cesium.GeometryInstance({geometry:new Cesium.PolylineGeometry({positions:x,width:1,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,arcType:Cesium.ArcType.RHUMB})});e.add(new Cesium.Primitive({geometryInstances:S,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.fromCssColorString("#fcfc00")})})}))}}}function p(t,e,i){var n,o;switch(i){case"1:100万":n=6,o=4;break;case"1:50万":n=3,o=2;break;case"1:25万":n=1.5,o=1;break;case"1:10万":n=.5,o=1/3;break;case"1:5万":n=.25,o=1/6;break;case"1:2.5万":n=.125,o=1/12;break;case"1:1万":n=.0625,o=1/24;break;case"1:5000":n=.03125,o=1/48}e=Math.max(-88,Math.min(88,e));var s,a=t,r=e=Math.abs(e),l=Math.floor(a/6+31),c="ABCDEFGHIJKLMNOPQRSTUV".charAt(Math.floor(r/4+1)-1),u={"1:100万":"","1:50万":"B","1:25万":"C","1:10万":"D","1:5万":"E","1:2.5万":"F","1:1万":"G","1:5000":"H"}[i];if(!u&&"1:100万"!==i)throw new Error("不支持的比例尺,请使用: 1:100万, 1:50万, 1:25万, 1:10万, 1:5万, 1:2.5万, 1:1万, 1:5000");s=c+l;var p=("000"+(Math.floor((4*Math.ceil(r/4)-r)/o)+1)).slice(-3),h=a-6*Math.floor(a/6),d=("000"+(Math.floor(h/n)+1)).slice(-3);switch(i){case"1:100万":return s;case"1:50万":case"1:25万":case"1:10万":case"1:5万":case"1:2.5万":case"1:1万":case"1:5000":break;default:throw new Error("不支持的比例尺")}return s+u+p+d}function h(){var t=s.camera.computeViewRectangle();if(2==s.scene.mode){var e=s.scene.canvas,i=new Cesium.Cartesian2(0,0),n=new Cesium.Cartesian2(e.clientWidth,e.clientHeight),o=s.scene.globe.ellipsoid,a=s.camera.pickEllipsoid(i,o),r=s.camera.pickEllipsoid(n,o);if(!a){var l=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,{x:0,y:0,z:6356755});i.y=l.y+5,a=s.camera.pickEllipsoid(i,o)}if(!r){var c=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,{x:0,y:0,z:-6356755});n.y=c.y-5,r=s.camera.pickEllipsoid(n,o)}var u=s.scene.globe.ellipsoid.cartesianToCartographic(a),p=s.scene.globe.ellipsoid.cartesianToCartographic(r);return t=(n.y-i.y)/(n.x-i.x)<=.49998752339363695?new Cesium.Rectangle(Cesium.Math.toRadians(-180),Cesium.Math.toRadians(-90),Cesium.Math.toRadians(180),Cesium.Math.toRadians(90)):new Cesium.Rectangle(u.longitude,p.latitude,p.longitude,u.latitude)}return t}e.postRenderEvent=function(){var i=t.viewer.camera.positionCartographic.height;switch(Pt){case"1:100万":o.position.alt=16e6;break;case"1:50万":o.position.alt=5e6;break;case"1:25万":o.position.alt=23e5;break;case"1:10万":o.position.alt=68e4;break;case"1:5万":o.position.alt=385e3;break;case"1:2.5万":o.position.alt=18e4;break;case"1:1万":o.position.alt=9e4;break;case"1:5000":o.position.alt=46e3}if(i>5*o.position.alt)return c=null,void e.removeAll();var n=!1,s=h(),a=Cesium.Math.toDegrees(s.west),r=Cesium.Math.toDegrees(s.south),p=Cesium.Math.toDegrees(s.east);a>p&&(p+=360),s={minLng:a,minLat:r,maxLng:p,maxLat:Cesium.Math.toDegrees(s.north)},c?(c.minLng>s.minLng||c.minLat>s.minLat||c.maxLng<s.maxLng||c.maxLat<s.maxLat)&&Cesium.Math.toDegrees(t.viewer.camera.pitch)<0&&(n=!0):u(Pt),n?++l>=50&&(u(Pt),n=!1):l=0},o.complete=function(){s.scene.postRender.addEventListener(e.postRenderEvent)},ze(t,o,.5)}function Lt(t){for(var e,i,n=t.viewer,o=0;o<n.scene.primitives._primitives.length;o++)if("SheetIndexGridPrimitives"===n.scene.primitives._primitives[o].name){e=n.scene.primitives._primitives[o];for(var s=0;s<e._primitives.length;s++)if("SheetIndexLabelCollection"===e._primitives[s].name){i=e._primitives[s];break}break}i&&i.removeAll(),e&&e.removeAll(),e&&n.scene.postRender.removeEventListener(e.postRenderEvent)}function At(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function jt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?At(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):At(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function It(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ft(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ft(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var Rt,zt,Ht,Vt,Gt,Ut,Wt,Yt={},Jt=[],qt=new Map;function Xt(){return(Xt=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:!0,Rt||(Kt(e),ve(e));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Zt(){if(!1,zt){Qt(-1,void 0,!0);var t=zt.viewer._element.getElementsByClassName("YJ-custom-slider")[0],e=zt.viewer._element.getElementsByClassName("YJ-custom-checkbox-left")[0],i=zt.viewer._element.getElementsByClassName("YJ-custom-checkbox-right")[0];t&&(zt.viewer._element.removeChild(t),zt.viewer._element.removeChild(e),zt.viewer._element.removeChild(i)),zt.viewer.scene.preRender.removeEventListener(ae,Yt),zt.viewer.imageryLayers.layerAdded.removeEventListener(ee),zt.viewer.imageryLayers.layerMoved.removeEventListener(ie),zt.viewer.imageryLayers.layerRemoved.removeEventListener(ne),zt.viewer.imageryLayers.layerShownOrHidden.removeEventListener(oe);for(var n=0;n<Jt.length;n++)Jt[n].destroy();if(Rt){var o=zt.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0].getElementsByClassName("cesium-widget")[1];zt.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0].removeChild(o),Jt=[],Rt=null,Ht=null,Yt={}}var s=zt.viewer._element.getElementsByClassName("cesium-widget")[0],a=s.getElementsByTagName("canvas")[0];s.style.width="100%",a.style.width="100%",zt=null}}function Kt(t){return $t.apply(this,arguments)}function $t(){return($t=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m,f,v;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v=function(t){var i,n,o=It(qt);try{for(o.s();!(n=o.n()).done;){var s=y()(n.value,2),a=s[0],r=s[1];r?r.P&&r.D?i=0:(r.P&&(i=-1),r.D&&(i=1)):i=-1,e.entityMap.get(a)&&Qt(i,a)}}catch(t){o.e(t)}finally{o.f()}},f=function(t){if(e.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0]===t.target||e.viewer._element.getElementsByClassName("cesium-widget")[0].getElementsByTagName("canvas")[0]===t.target||e.viewer._element.getElementsByClassName("cesium-widget")[1].getElementsByTagName("canvas")[0]===t.target){var s=t.offsetX;t.offsetX<60&&(s=60),t.target.width-t.offsetX<60&&(s=t.target.width-60),i.style.left=s/e.viewer._element.scrollWidth*100+"%",u.style.width=s/e.viewer._element.scrollWidth*100+"%",p.style.width=100/(s/e.viewer._element.scrollWidth)+"%",d.style.width=100*(1-s/e.viewer._element.scrollWidth)+"%",m.style.width=100/(1-s/e.viewer._element.scrollWidth)+"%",n.style.left="calc(".concat(s/e.viewer._element.scrollWidth*100,"% - 50px)"),o.style.right="calc(".concat(100*(1-s/e.viewer._element.scrollWidth),"% - 50px)")}},e.entityMap.forEach((function(t,e){t.type&&"TrajectoryMotion"==t.type&&t.viewFollow&&(t.viewFollow=!1)})),i=e.viewer._element.getElementsByClassName("YJ-custom-slider")[0],n=e.viewer._element.getElementsByClassName("YJ-custom-checkbox-left")[0],o=e.viewer._element.getElementsByClassName("YJ-custom-checkbox-right")[0],i&&(e.viewer._element.removeChild(i),e.viewer._element.removeChild(n),e.viewer._element.removeChild(o)),(i=document.createElement("div")).className="YJ-custom-slider",i.style.position="absolute",i.style.left="50%",i.style.top="0px",(n=document.createElement("input")).className="YJ-custom-checkbox-left",n.type="checkbox",n.style.position="absolute",n.style.left="calc(50% - 50px)",(o=document.createElement("input")).className="YJ-custom-checkbox-right",o.type="checkbox",o.style.position="absolute",o.style.right="calc(50% - 50px)",Vt&&0!=Vt.length||(n.style.display="none",o.style.display="none"),e.viewer._element.appendChild(n),e.viewer._element.appendChild(o),s=0,r=0,Vt)for(l=0;l<Vt.length;l++)(c=qt.get(Vt[l]))&&(c.P&&s++,c.D&&r++);return zt=e,s||r||s++,n.checked=!!s,o.checked=!!r,n.addEventListener("change",(function(t){t.target.checked||o.checked||(o.checked=!0);for(var e=0;e<Vt.length;e++){var i=qt.get(Vt[e]);(i=i||{}).P=t.target.checked,i.D=o.checked,qt.set(Vt[e],i)}v()})),o.addEventListener("change",(function(t){t.target.checked||n.checked||(n.checked=!0);for(var e=0;e<Vt.length;e++){var i=qt.get(Vt[e]);(i=i||{}).P=n.checked,i.D=t.target.checked,qt.set(Vt[e],i)}v()})),i.addEventListener("mousedown",(function(){e.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0].style.cursor="e-resize",document.body.addEventListener("mousemove",f),i.addEventListener("mouseup",(function(){e.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0].style.cursor="unset",document.body.removeEventListener("mousemove",f)}))})),e.viewer._element.appendChild(i),u=e.viewer._element.getElementsByClassName("cesium-widget")[0],p=u.getElementsByTagName("canvas")[0],u.style.width="50%",u.style.left="0px",u.style.overflow="hidden",p.style.width="200%",Ht=0,h=new ai,t.next=46,new YJ.YJEarth(e.div_id);case 46:if(Rt=t.sent,!vt()){t.next=50;break}return t.next=50,new Et(Rt);case 50:if(!gt()){t.next=53;break}return t.next=53,new St(Rt);case 53:if(!yt()){t.next=56;break}return t.next=56,new Dt(Rt);case 56:return it(e)&&et(Rt,!0),Rt.viewer._element.style.display="none",(d=document.createElement("div")).className="cesium-widget cesium-widget-split",d.style.width="50%",d.style.position="absolute",d.style.right="0px",d.style.overflow="hidden",(m=Rt.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0].getElementsByTagName("canvas")[0]).style.width="200%",m.style.position="absolute",m.style.right="0px",d.appendChild(m),e.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0].appendChild(d),document.getElementById(e.div_id).removeChild(Rt.viewer._element),t.next=73,se();case 73:Yt={sdks:[e,Rt],tools:h},v(),e.viewer.scene.preRender.addEventListener(ae,Yt),e.viewer.imageryLayers.layerMoved.addEventListener(ie),Ze(e)&&Xe(Rt,!0),$e(e)&&Ke(Rt,!0),Nt()&&Ot(Rt,!0);case 80:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qt(t,e){return te.apply(this,arguments)}function te(){return(te=o()(a.a.mark((function t(e,i){var n,s,r,l,c,u,p,h,d,m,f,v,g=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v=function(){return(v=o()(a.a.mark((function t(i,o){var s,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D,M,P,O,T;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s={},(c=r.get(i))||c.show){t.next=4;break}return t.abrupt("return");case 4:if(!(u=l&&l.get(i))){t.next=42;break}t.t0=e,t.next=null===t.t0||void 0===t.t0||0===t.t0||"0"===t.t0?9:1===t.t0||"1"===t.t0?21:-1===t.t0||"-1"===t.t0?32:40;break;case 9:if(s.P=!0,s.D=!0,"TrajectoryMotion"===c.type)p=function(t){if(c.options.state=t,cancelAnimationFrame(c._requestAnimationFrameEventId),c.editObj&&(c.editObj.destroy(),c.editObj=null),c.TweenAnimate)if(clearTimeout(c.TweenAnimate.timeout),t)c.lineEdit=!1,c.TweenAnimate.isPlaying()?c.TweenAnimate.timeout=setTimeout((function(){c.TweenAnimate.resume()}),c.options.delay):c.TweenAnimate.delay(c.delay).start();else{var e=jt({},c.sdk.viewer.camera._position);c._requestAnimationFrameEventId=requestAnimationFrame((function t(){c.firstPersonView&&c.sdk.viewer.camera.setView({destination:jt({},e),orientation:{heading:c.sdk.viewer.camera.heading,pitch:c.sdk.viewer.camera.pitch,roll:c.sdk.viewer.camera.roll}}),c._requestAnimationFrameEventId=requestAnimationFrame(t)})),c.TweenAnimate.pause()}else if(t){var i=c.renewLinePositions(c.options.line.positions);c.modelMove(i)}},c.entity&&c.modelShow&&!c.firstPersonView&&(c.entity.show=!0),c.line&&c.lineShow&&(c.line.show=!0),c.realTimeLine&&c.realTimeRoute&&(c.realTimeLine.show=!0),c.TweenAnimate&&((h=c.state)&&p(!1),u.setMovePositionByDistance(c.TweenAnimate._object.distance),p(h));else if("vector"===c.type){if(c.entity)if(o)for(d=0;d<c.entity.entities.values.length;d++)c.entity.entities.values[d].id===o&&(c.entity.entities.values[d].show=!1!==c.entity.entities.values[d]._customShow);else for(m=0;m<c.entity.entities.values.length;m++)c.entity.entities.values[m].show=!1!==c.entity.entities.values[m]._customShow}else c.entity&&(c.entity.show=!0);if("PincerArrowObject"===c.type&&c.TweenAnimate&&!c.TweenAnimate._isPaused&&c.setSpreadProgressByTime(c.TweenAnimate._object.distance1/c.TweenAnimate._valuesEnd.distance1*c.spreadTime),"AttackArrowObject"!==c.type&&"StraightArrowObject"!==c.type||c.TweenAnimate&&!c.TweenAnimate._isPaused&&c.setSpreadProgressByTime(c.TweenAnimate._object.distance/c.TweenAnimate._valuesEnd.distance*c.spreadTime),"GroundSvg"===c.type&&c.text&&(c.text.show=c.textShow,u.textShow=c.textShow),c.label&&c.labelShow&&(c.labelShow=!0),u.label&&(u.label.options.ground=!1),"vector"===u.type){if(u.entity)if(o)for(f=0;f<u.entity.entities.values.length;f++)u.entity.entities.values[f].id===o&&(u.entity.entities.values[f].show=!1!==c.entity.entities.values[f]._customShow);else for(v=0;v<u.entity.entities.values.length;v++)u.entity.entities.values[v].show=!1!==c.entity.entities.values[v]._customShow}else u.show=!0;return"TrajectoryMotion"===u.type&&(u.firstPersonView=c.firstPersonView),"Explosion"===u.type&&(u.entity.imgIndex=c.entity.imgIndex),t.abrupt("break",40);case 21:if(s.P=!1,s.D=!0,"TrajectoryMotion"===c.type)c.entity&&(c.entity.show=!1),c.line&&(c.line.show=!1),c.realTimeLine&&(c.realTimeLine.show=!1);else if("vector"===c.type){if(c.entity)if(o)for(y=0;y<c.entity.entities.values.length;y++)c.entity.entities.values[y].id===o&&(c.entity.entities.values[y].show=!1);else for(g=0;g<c.entity.entities.values.length;g++)c.entity.entities.values[g].show=!1}else c.entity&&(c.entity.show=!1);if("PincerArrowObject"===c.type&&c.TweenAnimate&&!c.TweenAnimate._isPaused&&c.setSpreadProgressByTime(c.TweenAnimate._object.distance1/c.TweenAnimate._valuesEnd.distance1*c.spreadTime),"AttackArrowObject"!==c.type&&"StraightArrowObject"!==c.type||c.TweenAnimate&&!c.TweenAnimate._isPaused&&c.setSpreadProgressByTime(c.TweenAnimate._object.distance/c.TweenAnimate._valuesEnd.distance*c.spreadTime),"GroundSvg"===c.type&&c.text&&(c.text.show=!1,u.textShow=c.textShow),c.label&&(c.label.entity.show=!1),u.label&&(u.label.options.ground=!1),"vector"===u.type){if(u.entity)if(o)for(b=0;b<u.entity.entities.values.length;b++)u.entity.entities.values[b].id===o&&(u.entity.entities.values[b].show=!1!==c.entity.entities.values[b]._customShow);else for(C=0;C<u.entity.entities.values.length;C++)u.entity.entities.values[C].show=!1!==c.entity.entities.values[C]._customShow}else u.show=!0;return"TrajectoryMotion"===u.type&&(u.firstPersonView=c.firstPersonView),t.abrupt("break",40);case 32:if(s.P=!0,s.D=!1,"TrajectoryMotion"===c.type)c.entity&&c.modelShow&&!c.firstPersonView&&(c.entity.show=!0),c.line&&c.lineShow&&(c.line.show=!0),c.realTimeLine&&c.realTimeRoute&&(c.realTimeLine.show=!0);else if("vector"===c.type){if(c.entity)if(o)for(w=0;w<c.entity.entities.values.length;w++)c.entity.entities.values[w].id===o&&(c.entity.entities.values[w].show=!1!==c.entity.entities.values[w]._customShow);else for(k=0;k<c.entity.entities.values.length;k++)c.entity.entities.values[k].show=!1!==c.entity.entities.values[k]._customShow}else c.entity&&(c.entity.show=!0);if("GroundSvg"===c.type&&c.text&&(c.text.show=c.textShow,u.textShow=!1),c.label&&c.labelShow&&(c.label.entity.show=!0),u.label&&(u.label.options.ground=!1),"terrain"===c.type)u.show=!0;else if("vector"===u.type){if(u.entity)if(o)for(x=0;x<u.entity.entities.values.length;x++)u.entity.entities.values[x].id===o&&u.entity.entities.values[x].id===o&&(u.entity.entities.values[x].show=!1);else for(_=0;_<u.entity.entities.values.length;_++)u.entity.entities.values[_].show=!1}else u.show=!1;return t.abrupt("break",40);case 40:t.next=120;break;case 42:E=Yt.tools.deepCopyObj(c.options),t.t1=e,t.next=null===t.t1||void 0===t.t1||0===t.t1||"0"===t.t1?46:1===t.t1||"1"===t.t1?75:-1===t.t1||"-1"===t.t1?100:120;break;case 46:return s.P=!0,s.D=!0,E.show=!0,"layer"===c.type&&(E.layer_index=c.layer_index),t.next=52,new c.constructor(Rt,E);case 52:if(S=t.sent,c.onClick&&(S.onClick=c.onClick),c.onRightClick&&(S.onRightClick=c.onRightClick),c.onMouseMove&&(S.onMouseMove=c.onMouseMove),"TrajectoryMotion"!==c.type){t.next=63;break}c.entity&&c.modelShow&&!c.firstPersonView&&(c.entity.show=!0),c.line&&c.lineShow&&(c.line.show=!0),c.realTimeLine&&c.realTimeRoute&&(c.realTimeLine.show=!0),c.TweenAnimate&&((D=c.state)&&(c.state=!1),S.setMovePositionByDistance(c.TweenAnimate._object.distance),c.state=D),t.next=72;break;case 63:if("glb"===S.type||!S.on){t.next=67;break}return"vector"===S.type&&(S.data=c.data),t.next=67,S.on();case 67:"Explosion"===S.type&&(S.entity.imgIndex=c.entity.imgIndex),"PincerArrowObject"===S.type&&c.TweenAnimate&&!c.TweenAnimate._isPaused&&S.setSpreadProgressByTime(c.TweenAnimate._object.distance1/c.TweenAnimate._valuesEnd.distance1*c.spreadTime),"AttackArrowObject"!==S.type&&"StraightArrowObject"!==S.type||c.TweenAnimate&&!c.TweenAnimate._isPaused&&S.setSpreadProgressByTime(c.TweenAnimate._object.distance/c.TweenAnimate._valuesEnd.distance*c.spreadTime),"vector"===c.type&&S.load((function(){if(S.entity)if(o)for(var t=0;t<S.entity.entities.values.length;t++)S.entity.entities.values[t].id===o&&(S.entity.entities.values[t].show=!1!==c.entity.entities.values[t]._customShow);else for(var e=0;e<S.entity.entities.values.length;e++)S.entity.entities.values[e].show=!1!==c.entity.entities.values[e]._customShow})),c.entity&&(c.entity.show=!0);case 72:return"GroundSvg"===c.type&&c.text&&(c.text.show=c.textShow,S.textShow=c.textShow),c.label&&c.labelShow&&(c.label.entity.show=!0),t.abrupt("break",120);case 75:return s.P=!1,s.D=!0,E.show=!0,"layer"===c.type&&(E.layer_index=c.layer_index),t.next=81,new c.constructor(Rt,E);case 81:if(S=t.sent,c.onClick&&(S.onClick=c.onClick),c.onRightClick&&(S.onRightClick=c.onRightClick),c.onMouseMove&&(S.onMouseMove=c.onMouseMove),"TrajectoryMotion"!==c.type){t.next=92;break}c.entity&&c.modelShow&&(c.entity.show=!1),c.line&&c.lineShow&&(c.line.show=!1),c.realTimeLine&&c.realTimeRoute&&(c.realTimeLine.show=!1),c.TweenAnimate&&((M=c.state)&&(c.state=!1),S.setMovePositionByDistance(c.TweenAnimate._object.distance),c.state=M),t.next=97;break;case 92:if("glb"===S.type||!S.on){t.next=96;break}if("vector"===c.type&&(S.data=c.data,c.entity))for(P=0;P<c.entity.entities.values.length;P++)c.entity.entities.values[P].show=!1;return t.next=96,S.on();case 96:if("vector"===c.type){if(S.entity)if(o)for(O=0;O<S.entity.entities.values.length;O++)S.entity.entities.values[O].id===o&&(S.entity.entities.values[O].show=!1!==c.entity.entities.values[O]._customShow);else for(T=0;T<S.entity.entities.values.length;T++)S.entity.entities.values[T].show=!1!==c.entity.entities.values[T]._customShow}else c.entity&&(c.entity.show=!1);case 97:return"GroundSvg"===c.type&&c.text&&(c.text.show=!1,S.textShow=c.textShow),c.label&&(c.label.entity.show=!1),t.abrupt("break",120);case 100:if(s.P=!0,s.D=!1,"TrajectoryMotion"!==c.type){t.next=108;break}c.entity&&c.modelShow&&!c.firstPersonView&&(c.entity.show=!0),c.line&&c.lineShow&&(c.line.show=!0),c.realTimeLine&&c.realTimeRoute&&(c.realTimeLine.show=!0),t.next=117;break;case 108:if(c.entity&&(c.entity.show=!0),"terrain"!==c.type){t.next=117;break}return E.show=!0,t.next=113,new c.constructor(Rt,E);case 113:S=t.sent,c.onClick&&(S.onClick=c.onClick),c.onRightClick&&(S.onRightClick=c.onRightClick),c.onMouseMove&&(S.onMouseMove=c.onMouseMove);case 117:return"GroundSvg"===c.type&&c.text&&(c.text.show=c.textShow,S.textShow=!1),c.label&&c.labelShow&&(c.label.entity.show=!0),t.abrupt("break",120);case 120:n||qt.set(i,s);case 121:case"end":return t.stop()}}),t)})))).apply(this,arguments)},f=function(t,e){return v.apply(this,arguments)},n=g.length>2&&void 0!==g[2]&&g[2],s=g.length>3?g[3]:void 0,zt){t.next=6;break}return t.abrupt("return");case 6:if(r=zt.entityMap,l=Rt&&Rt.entityMap,!i){t.next=15;break}if((c=r.get(i))&&c.show){t.next=12;break}return t.abrupt("return");case 12:f(i,s),t.next=35;break;case 15:u=It(zt.entityMap),t.prev=16,u.s();case 18:if((p=u.n()).done){t.next=27;break}if(h=y()(p.value,2),d=h[0],(m=h[1])&&m.show){t.next=24;break}return t.abrupt("continue",25);case 24:f(d,s);case 25:t.next=18;break;case 27:t.next=32;break;case 29:t.prev=29,t.t0=t.catch(16),u.e(t.t0);case 32:return t.prev=32,u.f(),t.finish(32);case 35:if(!n){t.next=37;break}return t.abrupt("return");case 37:case"end":return t.stop()}}),t,null,[[16,29,32,35]])})))).apply(this,arguments)}function ee(t,e){Rt.viewer.imageryLayers.addImageryProvider(t.imageryProvider,e)}function ie(t,e,i){for(var n,o=0;o<Rt.viewer.imageryLayers._layers.length;o++)if(Rt.viewer.imageryLayers._layers[o]._id===t._id){n=Rt.viewer.imageryLayers._layers[o];break}n&&(0===e?Rt.viewer.imageryLayers.lowerToBottom(n):e===Rt.viewer.imageryLayers._layers.length-1?Rt.viewer.imageryLayers.raiseToTop(n):e<i?e<Rt.viewer.imageryLayers._layers.length-1&&Rt.viewer.imageryLayers.lower(n):Rt.viewer.imageryLayers.raise(n))}function ne(t,e){var i=Rt.viewer.imageryLayers._layers[e];i&&Rt.viewer.imageryLayers.remove(i)}function oe(t,e,i){var n=Rt.viewer.imageryLayers._layers[e];n&&(n.show=i)}function se(){var t=new Cesium.ScreenSpaceEventHandler(zt.viewer._element.getElementsByClassName("cesium-widget")[0]);t.setInputAction((function(){Ht=0}),Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction((function(){Ht=0}),Cesium.ScreenSpaceEventType.RIGHT_DOWN),t.setInputAction((function(){Ht=0}),Cesium.ScreenSpaceEventType.WHEEL),Jt.push(t);var e=document.getElementById("distanceLegendDiv");function i(t){Ht=0}e.addEventListener("mousemove",i),Jt.push({destroy:function(){e.removeEventListener("mousemove",i)}});var n=new Cesium.ScreenSpaceEventHandler(zt.viewer._element.getElementsByClassName("cesium-widget")[1]);n.setInputAction((function(){Ht=1,Je(zt)}),Cesium.ScreenSpaceEventType.LEFT_DOWN),n.setInputAction((function(){Ht=1,Je(zt)}),Cesium.ScreenSpaceEventType.RIGHT_DOWN),n.setInputAction((function(){Ht=1,Je(zt)}),Cesium.ScreenSpaceEventType.WHEEL),Jt.push(n)}function ae(){var t,e=this.sdks[Ht];0===Ht?t=this.sdks[1]:1===Ht&&(t=this.sdks[0]);var i=e.viewer.camera.position;t.viewer.camera.setView({destination:i,orientation:{heading:e.viewer.camera.heading,pitch:e.viewer.camera.pitch,roll:e.viewer.camera.roll}})}function re(t,e,i){if(zt&&Rt&&t===zt&&e){var n=qt.get(e),o=zt.entityMap.get(e),s=Rt.entityMap.get(e);if(o){var a;if(n)n.P&&n.D?a=0:(n.P&&(a=-1),n.D&&(a=1));else{var r=t.viewer._element.getElementsByClassName("YJ-custom-checkbox-left")[0],l=t.viewer._element.getElementsByClassName("YJ-custom-checkbox-right")[0];"none"===r.style.display||"none"===l.style.display?a=-1:r.checked&&l.checked?a=0:(r.checked&&(a=-1),l.checked&&(a=1))}if(s)s.options=JSON.parse(JSON.stringify(o.options)),s.originalOptions=JSON.parse(JSON.stringify(o.options)),o.oldData&&(s.oldData=JSON.parse(JSON.stringify(o.oldData))),"TrajectoryMotion"===s.type&&(s.height=s.options.height),s.reset&&s.reset(),o.show?Qt(a,e,!1,i):s.show=!1;else{Qt(-1,e,!1,i)}}else s&&s.remove()}}function le(){return{sdkP:zt,sdkD:Rt}}function ce(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return ue(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ue(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var pe={},he=[];function de(t){return me.apply(this,arguments)}function me(){return(me=o()(a.a.mark((function t(e){var i,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Ut=e,Wt=0,i=new ai,t.next=5,new YJ.YJEarth(e.div_id);case 5:return(n=t.sent).viewer._element.className="cesium-viewer 2d",Ot(n,Nt()),Ge(n,{compass:!1,info:!1,frame:!1}),n.viewer.scene.mode=Cesium.SceneMode.SCENE2D,t.next=12,n;case 12:return Gt=t.sent,Oe(),pe={sdks:[e,n],tools:i},t.next=17,Se(e,0,pe);case 17:return t.next=19,Se(n,1,pe);case 19:return t.next=21,be(e);case 21:for(e.viewer.scene.preRender.addEventListener(De,pe),e.viewer.imageryLayers.layerAdded.addEventListener(we),e.viewer.imageryLayers.layerMoved.addEventListener(ke),e.viewer.imageryLayers.layerRemoved.addEventListener(xe),e.viewer.imageryLayers.layerShownOrHidden.addEventListener(_e),(o=L()(e.viewer.imageryLayers._layers)).sort((function(t,e){return t._layerIndex-e._layerIndex})),Gt.viewer.imageryLayers.removeAll(),s=0;s<o.length;s++)Gt.viewer.imageryLayers.addImageryProvider(o[s].imageryProvider,o[s]._layerIndex).show=o[s].show;Ze(e)&&Xe(n,!0),$e(e)&&Ke(n,!0);case 32:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fe(){return(fe=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Gt||(de(e),Zt());case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ve(t){t.viewer.scene.preRender.removeEventListener(De,pe),t.viewer.imageryLayers.layerAdded.removeEventListener(we),t.viewer.imageryLayers.layerMoved.removeEventListener(ke),t.viewer.imageryLayers.layerRemoved.removeEventListener(xe),t.viewer.imageryLayers.layerShownOrHidden.removeEventListener(_e);for(var e=0;e<he.length;e++)he[e].destroy();Gt&&(Gt.destroy(),he=[],Gt=null,Ut=null,Wt=null,pe={}),t.entityMap.forEach((function(t,e){t.showView=void 0}))}function ge(t,e,i){return ye.apply(this,arguments)}function ye(){return(ye=o()(a.a.mark((function t(e,i,n){var o,s,r,l,c,u,p,h,d,m,f,v,g,b,C;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e&&e.viewer&&e.viewer._element&&"cesium-viewer 2d"===e.viewer._element.className)){t.next=2;break}return t.abrupt("return");case 2:if(Ut&&Gt){t.next=4;break}return t.abrupt("return");case 4:if(o=Ut.entityMap,!i){t.next=38;break}if(!(s=o.get(i))){t.next=32;break}if(!(r=Gt.entityMap.get(i))){t.next=12;break}return t.next=12,r.remove();case 12:if(l=pe.tools.deepCopyObj(s.options),"BillboardObject"===s.type&&(l.heightReference=1),"PolygonObject"===s.type&&(l.heightMode=0,l.height=0),s.type&&("tileset"===s.type||"bim"===s.type||"glb"===s.type||"layer"===s.type)){t.next=30;break}return 3==s.showView&&(l.show=!1),t.next=19,new s.constructor(Gt,l);case 19:if((c=t.sent).onClick=s.onClick,c.onRightClick=s.onRightClick,c.onMouseMove=s.onMouseMove,"TrajectoryMotion"===s.type&&(s.firstPersonView=!1,s.TweenAnimate?((u=s.state)&&(s.state=!1),c.state?c.setMovePositionByDistance(Number(s.TweenAnimate._object.distance.toFixed(8))):setTimeout((function(){c.setMovePositionByDistance(Number(s.TweenAnimate._object.distance.toFixed(8))+1e-8),setTimeout((function(){c.setMovePositionByDistance(Number(s.TweenAnimate._object.distance.toFixed(8))+2e-8)}),500)}),500),s.state=u):setTimeout((function(){c.setMovePositionByDistance(1e-8),setTimeout((function(){c.setMovePositionByDistance(2e-8)}),500)}),500),s.viewFollow&&(c.viewFollow=!0)),"AttackArrowObject"!==s.type&&"StraightArrowObject"!==s.type||s.spreadState&&s.TweenAnimate&&s.TweenAnimate._object&&c.setSpreadProgressByTime(s.TweenAnimate._object.distance/s.TweenAnimate._valuesEnd.distance*s.spreadTime),"PincerArrowObject"===s.type&&s.spreadState&&s.TweenAnimate&&s.TweenAnimate._object&&c.setSpreadProgressByTime(s.TweenAnimate._object.distance1/s.TweenAnimate._valuesEnd.distance1*s.spreadTime),!c.on||"glb"===c.type){t.next=30;break}return"vector"===c.type&&(c.data=s.data,c.load((function(){if(c.entity)for(var t=0;t<c.entity.entities.values.length;t++)c.entity.entities.values[t].show=!1!==s.entity.entities.values[t]._customShow}))),t.next=30,c.on();case 30:t.next=36;break;case 32:if(!(p=Gt.entityMap.get(i))){t.next=36;break}return t.next=36,p.remove();case 36:t.next=73;break;case 38:h=ce(Gt.entityMap),t.prev=39,h.s();case 41:if((d=h.n()).done){t.next=49;break}if(m=y()(d.value,2),f=m[0],m[1],!(v=Gt.entityMap.get(f))){t.next=47;break}return t.next=47,v.remove();case 47:t.next=41;break;case 49:t.next=54;break;case 51:t.prev=51,t.t0=t.catch(39),h.e(t.t0);case 54:return t.prev=54,h.f(),t.finish(54);case 57:g=ce(o),t.prev=58,C=a.a.mark((function t(){var e,i,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=y()(b.value,2),e[0],"BillboardObject"===(i=e[1]).type&&(i.options.heightReference=1),n=pe.tools.deepCopyObj(i.options),i.type&&("tileset"===i.type||"bim"===i.type||"glb"===i.type||"layer"===i.type)){t.next=17;break}return t.next=6,new i.constructor(Gt,n);case 6:if((o=t.sent).onClick=i.onClick,o.onRightClick=i.onRightClick,o.onMouseMove=i.onMouseMove,"TrajectoryMotion"===i.type&&(i.firstPersonView=!1,i.TweenAnimate?((s=i.state)&&(i.state=!1),o.state?o.setMovePositionByDistance(Number(i.TweenAnimate._object.distance.toFixed(8))):setTimeout((function(){o.setMovePositionByDistance(Number(i.TweenAnimate._object.distance.toFixed(8))+1e-9),setTimeout((function(){o.setMovePositionByDistance(Number(i.TweenAnimate._object.distance.toFixed(8))+2e-9)}),1500)}),1500),i.state=s):setTimeout((function(){o.setMovePositionByDistance(1e-9),setTimeout((function(){o.setMovePositionByDistance(2e-9)}),1500)}),1500),i.viewFollow&&(o.viewFollow=!0)),"AttackArrowObject"!==i.type&&"StraightArrowObject"!==i.type||i.spreadState&&i.TweenAnimate&&i.TweenAnimate._object&&o.setSpreadProgressByTime(i.TweenAnimate._object.distance/i.TweenAnimate._valuesEnd.distance*i.spreadTime),"PincerArrowObject"===i.type&&i.spreadState&&i.TweenAnimate&&i.TweenAnimate._object&&o.setSpreadProgressByTime(i.TweenAnimate._object.distance1/i.TweenAnimate._valuesEnd.distance1*i.spreadTime),!o.on||"glb"===i.type){t.next=17;break}return"vector"===o.type&&(o.data=i.data,o.load((function(){if(o.entity)for(var t=0;t<o.entity.entities.values.length;t++)o.entity.entities.values[t].show=!1!==i.entity.entities.values[t]._customShow}))),t.next=17,o.on();case 17:case"end":return t.stop()}}),t)})),g.s();case 61:if((b=g.n()).done){t.next=65;break}return t.delegateYield(C(),"t1",63);case 63:t.next=61;break;case 65:t.next=70;break;case 67:t.prev=67,t.t2=t.catch(58),g.e(t.t2);case 70:return t.prev=70,g.f(),t.finish(70);case 73:case"end":return t.stop()}}),t,null,[[39,51,54,57],[58,67,70,73]])})))).apply(this,arguments)}function be(t,e,i){return Ce.apply(this,arguments)}function Ce(){return(Ce=o()(a.a.mark((function t(e,i,n){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ge(e,i,n);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function we(t,e){Gt.viewer.imageryLayers.addImageryProvider(t.imageryProvider,e)}function ke(t,e,i){var n=Gt.viewer.imageryLayers._layers[i];n&&(0===e?Gt.viewer.imageryLayers.lowerToBottom(n):e===Ut.viewer.imageryLayers._layers.length-1?Gt.viewer.imageryLayers.raiseToTop(n):e<i?Gt.viewer.imageryLayers.lower(n):Gt.viewer.imageryLayers.raise(n))}function xe(t,e){var i=Gt.viewer.imageryLayers._layers[e];i&&Gt.viewer.imageryLayers.remove(i)}function _e(t,e,i){var n=Gt.viewer.imageryLayers._layers[e];n&&(n.show=i)}function Ee(){return(Ee=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ut){t.next=2;break}return t.abrupt("return");case 2:if(Gt){for(i=Gt.viewer.scene.primitives._primitives,n=Ut.viewer.scene.primitives._primitives,o=i.length-1;o>=1;o--){for(s=!1,r=n.length-1;r>=1;r--)n[r].id&&i[r].id&&n[r].id===i[o].id&&(s=!0);s||Gt.viewer.scene.primitives.remove(i[o])}for(l=n.length-1;l>=1;l--){for(c=!1,u=i.length-1;u>=1;u--)n[l].id&&i[l].id&&n[l].id===i[u].id&&(c=!0,i[u].show=n[l].show,i[u].startColor=n[l].startColor,i[u].endColor=n[l].endColor,i[u].minimumSpeed=n[l].minimumSpeed,i[u].maximumSpeed=n[l].maximumSpeed,i[u].minimumParticleLife=n[l].minimumParticleLife,i[u].maximumParticleLife=n[l].maximumParticleLife,i[u].startScale=n[l].startScale,i[u].endScale=n[l].endScale,i[u].emissionRate=n[l].emissionRate,i[u].particleSize=n[l].particleSize,i[u].modelMatrix=n[l].modelMatrix);c||Gt.viewer.scene.primitives.add(n[l])}}case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Se(t,e,i){var n=new Cesium.ScreenSpaceEventHandler(t.viewer.canvas);n.setInputAction((function(){Wt=e}),Cesium.ScreenSpaceEventType.LEFT_DOWN),n.setInputAction((function(){Wt=e}),Cesium.ScreenSpaceEventType.RIGHT_DOWN),n.setInputAction((function(){Wt=e}),Cesium.ScreenSpaceEventType.WHEEL),he.push(n)}function De(){var t,e=this.sdks[Wt];if(0===Wt?t=this.sdks[1]:1===Wt&&(t=this.sdks[0]),2===e.viewer.scene.mode)if(this.sdks[0].viewer.trackedEntity){var i=e.viewer.camera.positionCartographic.height;t.viewer.camera.lookAt(Cesium.Cartesian3.fromRadians(e.viewer.camera.positionCartographic.longitude,e.viewer.camera.positionCartographic.latitude,0),new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(-90),i))}else{this.sdks[1].viewer.trackedEntity&&(this.sdks[1].viewer.entities.remove(this.sdks[1].viewer.trackedEntity),this.sdks[1].viewer.trackedEntity=null);var n=this.tools.cartesian3Towgs84(Cesium.Cartesian3.fromRadians(e.viewer.camera.positionCartographic.longitude,e.viewer.camera.positionCartographic.latitude,e.viewer.camera.positionCartographic.height),e.viewer);t.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt)})}else{var o=e.viewer.camera.pickEllipsoid(new Cesium.Cartesian2(e.viewer.canvas.clientWidth/2,e.viewer.canvas.clientHeight/(2-(90+e.viewer.camera.pitch/(Cesium.Math.PI/180))/110)));o||(o=e.viewer.camera.positionWC);var s=this.tools.cartesian3Towgs84(e.viewer.camera.positionWC,e.viewer).alt,a=this.tools.cartesian3Towgs84(o,e.viewer);t.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(a.lng,a.lat,s)})}}function Me(){return Gt}function Pe(){return Ut}function Oe(){Gt&&Gt.viewer.entities.add({show:!1,polygon:{hierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray([100,50,100.0001,50,100.0001,50.0001]))}})}function Te(){return{sdkP:Ut,sdkD:Gt}}function Ne(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Be(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Be(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Be(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var Le,Ae="EPSG:4326",je=!1,Ie={},Fe={},Re={};function ze(t,e){return He.apply(this,arguments)}function He(){return(He=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=u.length>2&&void 0!==u[2]?u[2]:3,o=new ai(e),r=i.orientation,!i.position){t.next=13;break}if(0===i.position.alt||i.position.alt){t.next=8;break}return t.next=7,o.getClampToHeight(i.position);case 7:i.position.alt=t.sent;case 8:l=0,r||(l=500),s=Cesium.Cartesian3.fromDegrees(i.position.lng,i.position.lat,i.position.alt+l),t.next=15;break;case 13:c=o.cal_envelope(i.positions),s=new Cesium.Rectangle(Cesium.Math.toRadians(c[3][0]),Cesium.Math.toRadians(c[3][1]),Cesium.Math.toRadians(c[1][0]),Cesium.Math.toRadians(c[1][1]));case 15:Je(e),e.viewer.camera.flyTo({destination:s,duration:n,orientation:r,complete:i.complete});case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ve(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t&&t.viewer){var i=t.viewer;i.scene.screenSpaceCameraController.enableRotate=e,i.scene.screenSpaceCameraController.enableTranslate=e,i.scene.screenSpaceCameraController.enableZoom=e,i.scene.screenSpaceCameraController.enableTilt=e,i.scene.screenSpaceCameraController.enableLook=e}}function Ge(t,e){if(t&&t.viewer){Fe[t.viewer._element.className]||(Fe[t.viewer._element.className]={}),Fe[t.viewer._element.className].event&&Fe[t.viewer._element.className].event.destroy();var i=new ai(t),n=t.viewer._element,s=t.proj,r=function(){switch(l){case"compass":var r=n.getElementsByClassName("compass")[0],c=n.getElementsByClassName("navigation-controls")[0];e[l]?(r&&(r.style.display="block"),c&&(c.style.display="flex")):(r&&(r.style.display="none"),c&&(c.style.display="none"));break;case"legend":var u=n.getElementsByClassName("distance-legend")[0];e[l]?u&&(u.parentNode.style.display="block"):u&&(u.parentNode.style.display="none");break;case"info":var p=n.getElementsByClassName("cesium-info")[0];if(e[l]){var h=function(){var e=o()(a.a.mark((function e(){var n,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Le){e.next=2;break}return e.abrupt("return");case 2:n=i.cartesian3Towgs84(Le,t.viewer),"EPSG:4326"===Ae?p.innerHTML="\n <span>经度:</span><span>".concat(Number(n.lng.toFixed(6)),"° </span>\n <span>纬度:</span><span>").concat(Number(n.lat.toFixed(6)),"° </span>\n <span>海拔高度:</span><span>").concat(Number(n.alt.toFixed(2)),"米</span>\n "):(o=s.convert([{x:n.lng,y:n.lat,z:n.alt}],"EPSG:4326",Ae),p.innerHTML="\n <span>x:</span><span>".concat(Number(o.points[0].x.toFixed(6)),'</span>\n <span style="margin-left: 5px;">y:</span><span>').concat(Number(o.points[0].y.toFixed(6)),'</span>\n <span style="margin-left: 5px;">z:</span><span>').concat(Number(o.points[0].z.toFixed(6)),"</span>\n "));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();p?(h(),p.style.display="block"):((p=document.createElement("div")).className="cesium-info",p.style.position="absolute",p.style.bottom="32px",p.style.right="240px",p.style["font-size"]="14px",p.style["background-color"]="rgba(47,53,60,.8)",p.style.color="#fff",p.style.padding="4px 10px",p.style["border-radius"]="18px",p.innerHTML="EPSG:4326"===Ae?"\n <span>经度:</span><span>-</span>\n <span>纬度:</span><span>-</span>\n <span>海拔高度:</span><span>-</span>\n ":"\n <span>x:</span><span>-</span>\n <span>y:</span><span>-</span>\n <span>z:</span><span>-</span>\n ",t.viewer._element.appendChild(p));var d=new X(t);Fe[t.viewer._element.className].event=d;d.mouse_move((function(t,e){Le=e,h()}))}else p&&(p.style.display="none");break;case"frame":e[l]?(t.viewer.scene.debugShowFramesPerSecond=!0,setTimeout((function(){var e=t.viewer._element.getElementsByClassName("cesium-viewer-cesiumWidgetContainer")[0],i=e.getElementsByClassName("cesium-performanceDisplay-defaultContainer")[0];i&&e.appendChild(i)}),50)):t.viewer.scene.debugShowFramesPerSecond=!1}};for(var l in e)r()}}function Ue(t,e){e=e?"billboard_default_url_"+e:"billboard_default_url";var i=h();t.startsWith("http")||(t.includes(":")||i&&(t=new URL(t,i).href));localStorage.setItem(e,t)}function We(t){return t=t?"billboard_default_url_"+t:"billboard_default_url",localStorage.getItem(t)}function Ye(){return je}function Je(t){t&&t.viewer&&Re[t.viewer._element.className]&&(Re[t.viewer._element.className].animate&&TWEEN.remove(Re[t.viewer._element.className].animate),Re[t.viewer._element.className].event&&Re[t.viewer._element.className].event.destroy(),Ve(t,!0),t.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY))}function qe(t){if(t&&t.entityMap){var e,i=Ne(t.entityMap);try{for(i.s();!(e=i.n()).done;){var n=y()(e.value,2),o=(n[0],n[1]);"TrajectoryMotion"===o.type&&o.viewFollow&&(o.viewFollow=!1)}}catch(t){i.e(t)}finally{i.f()}}}function Xe(t,e){if(t){var i,n=le().sdkD;n&&t!==n&&Xe(n,e);for(var o=0;o<t.viewer.imageryLayers._layers.length;o++)if(t.viewer.imageryLayers._layers[o]._imageryProvider&&t.viewer.imageryLayers._layers[o]._imageryProvider._type&&"flw"===t.viewer.imageryLayers._layers[o]._imageryProvider._type){i=t.viewer.imageryLayers._layers[o];break}i&&t.viewer.imageryLayers.remove(i),e&&t.viewer.imageryLayers.addImageryProvider(new Cesium.TileCoordinatesImageryProviderFlw({tileWidth:128,tileHeight:128}))}}function Ze(t){for(var e=!1,i=0;i<t.viewer.imageryLayers._layers.length;i++)if(t.viewer.imageryLayers._layers[i]._imageryProvider&&t.viewer.imageryLayers._layers[i]._imageryProvider._type&&"flw"===t.viewer.imageryLayers._layers[i]._imageryProvider._type){e=!0;break}return e}function Ke(t,e){if(t){var i,n=le().sdkD;n&&t!==n&&Ke(n,e);for(var o=0;o<t.viewer.imageryLayers._layers.length;o++)if(t.viewer.imageryLayers._layers[o]._imageryProvider&&t.viewer.imageryLayers._layers[o]._imageryProvider._type&&"jww"===t.viewer.imageryLayers._layers[o]._imageryProvider._type){i=t.viewer.imageryLayers._layers[o];break}i&&t.viewer.imageryLayers.remove(i),e&&t.viewer.imageryLayers.addImageryProvider(new Cesium.TileCoordinatesImageryProviderJww)}}function $e(t){for(var e=!1,i=0;i<t.viewer.imageryLayers._layers.length;i++)if(t.viewer.imageryLayers._layers[i]._imageryProvider&&t.viewer.imageryLayers._layers[i]._imageryProvider._type&&"jww"===t.viewer.imageryLayers._layers[i]._imageryProvider._type){e=!0;break}return e}function Qe(){return Ae}function ti(){var t=localStorage.getItem("ManageIndexexDBState");return"false"!==t&&Boolean(t)}function ei(t){"boolean"==typeof t?(Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.SetManageIndexexDBState(t),localStorage.setItem("ManageIndexexDBState",t)):console.error("参数必须为boolean")}function ii(t){!function(t){Wt=t}(t),function(t){Ht=t}(t)}function ni(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return oi(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?oi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function oi(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function si(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var ai=function(){return _()((function t(e,i){k()(this,t),this.sdk=e,this.sdk&&(this.name_map=this.sdk.proj.name_map,this.epsg_map=this.sdk.proj.epsg_map,this.convert=this.sdk.proj.convert,this.getAllProjection=this.sdk.proj.getAllProjection,this.projectionIsExists=this.sdk.proj.projectionIsExists,this.degreesToDMS=this.sdk.proj.degreesToDMS,this.dmsToDecimal=this.sdk.proj.dmsToDecimal),this.options=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?si(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):si(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},i)}),[{key:"POST",get:function(){return"POST"}},{key:"GET",get:function(){return"GET"}},{key:"degreesToRadians",value:function(t){return turf.degreesToRadians(Number(t))}},{key:"radiansToDegrees",value:function(t){return turf.radiansToDegrees(Number(t))}},{key:"randomString",value:function(t){return Cesium.createGuid()}},{key:"getSourceRootPath",value:function(){var t=document.querySelectorAll("script"),e="";return t.forEach((function(t){if(t.src&&t.src.indexOf("YJEarth.min.js")>-1){var i=t.src.split("/");i.pop(),e=i.join("/")}})),e}},{key:"cartesian3Towgs84",value:function(t,e){var i=e.scene.globe.ellipsoid,n=new Cesium.Cartesian3(t.x,t.y,t.z),o=i.cartesianToCartographic(n),s=Cesium.Math.toDegrees(o.latitude);return{lng:Cesium.Math.toDegrees(o.longitude),lat:s,alt:o.height<0?0:o.height}}},{key:"computeDistance",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D,M,P,O=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=O.length>0&&void 0!==O[0]?O[0]:[],i=O.length>1&&void 0!==O[1]?O[1]:2,n=O.length>2&&void 0!==O[2]?O[2]:"空间长度",!(e.length<2)){t.next=7;break}return t.abrupt("return",0);case 7:o=0,t.t0=n,t.next="空间长度"===t.t0?11:"投影长度"===t.t0?13:"地表长度"===t.t0?15:48;break;case 11:for(s=0;s<e.length-1;s++)r=Cesium.Cartesian3.fromDegrees(e[s].lng,e[s].lat,e[s].alt),l=Cesium.Cartesian3.fromDegrees(e[s+1].lng,e[s+1].lat,e[s+1].alt),c=Cesium.Cartesian3.distance(r,l),o+=c;return t.abrupt("break",49);case 13:for(u=0;u<e.length-1;u++)p=Cesium.Cartesian3.fromDegrees(e[u].lng,e[u].lat,0),h=Cesium.Cartesian3.fromDegrees(e[u+1].lng,e[u+1].lat,0),d=Cesium.Cartesian3.distance(p,h),o+=d;return t.abrupt("break",49);case 15:f=[],e.forEach((function(t){f.push([t.lng,t.lat,t.alt])})),v=turf.lineString(f),g=1e3*turf.length(v),m=g>20?g/20:g,y=this.chunkLine(e,m),b=[],y.forEach((function(t,e){0===e?b=L()(t.geometry.coordinates):b.push(t.geometry.coordinates[1])})),C=[],w=ni(b),t.prev=25,w.s();case 27:if((k=w.n()).done){t.next=37;break}return x=k.value,_=b.indexOf(x),t.next=32,this.sampleHeight({lng:x[0],lat:x[1],alt:0},_);case 32:(E=t.sent).position.alt=E.position.alt<0?0:E.position.alt,C.push(E);case 35:t.next=27;break;case 37:t.next=42;break;case 39:t.prev=39,t.t1=t.catch(25),w.e(t.t1);case 42:return t.prev=42,w.f(),t.finish(42);case 45:for(C.length,S=0;S<C.length-1;S++)D=Cesium.Cartesian3.fromDegrees(C[S].position.lng,C[S].position.lat,0),M=Cesium.Cartesian3.fromDegrees(C[S+1].position.lng,C[S+1].position.lat,0),P=Cesium.Cartesian3.distance(D,M),o+=P;return t.abrupt("break",49);case 48:return t.abrupt("break",49);case 49:return t.abrupt("return",o.toFixed(i));case 50:case"end":return t.stop()}}),t,this,[[25,39,42,45]])}))),function(){return i.apply(this,arguments)})},{key:"computeDistance2",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t.length<2)return 0;var n=0;if(i){var o=[];t.forEach((function(t){o.push([t.lng,t.lat,t.alt])}));var s=turf.lineString(o);n=1e3*turf.length(s)}else for(var a=0;a<t.length-1;a++){var r=Cesium.Cartesian3.fromDegrees(t[a].lng,t[a].lat,t[a].alt),l=Cesium.Cartesian3.fromDegrees(t[a+1].lng,t[a+1].lat,t[a+1].alt),c=Cesium.Cartesian3.distance(r,l);n+=c}return n.toFixed(e)}},{key:"sampleHeight",value:(e=o()(a.a.mark((function t(e,i){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sampleHeightMostDetailed([e]);case 2:return n=t.sent,e.alt=n[0].height,t.abrupt("return",{position:e,index:i});case 5:case"end":return t.stop()}}),t,this)}))),function(t,i){return e.apply(this,arguments)})},{key:"computeArea",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(t.length<3)return 0;var i=[];t.forEach((function(t){i.push([t.lng,t.lat])})),i.push(i[0]);var n=turf.polygon([i]),o=turf.tesselate(n);return Number(turf.area(o).toFixed(e))}},{key:"computeSignedArea",value:function(t,e){for(var i=[],n=[],o=0;o<e.length;o++)i.push(e[o].lng,e[o].lat),n.push([e[o].lng,e[o].lat]);var s,a=turf.lineString(n),r=turf.bbox(a),l=Cesium.Math.toRadians(r[2]-r[0]),c=Cesium.Math.toRadians(r[3]-r[1]);s=l>c?l/10:c/10;var u=new Cesium.PolygonGeometry.fromPositions({positions:Cesium.Cartesian3.fromDegreesArray(i),vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:s}),p=new Cesium.PolygonGeometry.createGeometry(u);if(!p||!p.attributes||!p.attributes.position)return 0;var h=p.indices,d=p.attributes.position.values;function m(e,i){var n=new Cesium.Cartesian3(d[3*i],d[3*i+1],d[3*i+2]);return t.scene.clampToHeight(n)||n}for(var f=0,v=0;v<h.length;v+=3){var g=m(0,h[v]),y=m(0,h[v+1]),b=m(0,h[v+2]),C=Cesium.Cartesian3.subtract(g,y,new Cesium.Cartesian3),w=Cesium.Cartesian3.subtract(b,y,new Cesium.Cartesian3),k=Cesium.Cartesian3.cross(C,w,C);f+=.5*Cesium.Cartesian3.magnitude(k)}return Number(f.toFixed(2))}},{key:"createCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{steps:360};Number(e)<=0&&(e=.01);var n=[Number(t.lng),Number(t.lat)],o=turf.circle(n,e/1e3,i).geometry.coordinates[0],s=[];return o.forEach((function(t){s=s.concat(t)})),s}},{key:"createEllipse",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{granularity:.1,semiMinorAxis:10,semiMajorAxis:20,bearing:0,height:0};e.granularity||(e.granularity=.1),e.height||(e.height=0),e.semiMinorAxis||(e.semiMinorAxis=1e-5),e.semiMajorAxis||(e.semiMajorAxis=1e-5);var i=new Cesium.EllipseOutlineGeometry({center:Cesium.Cartesian3.fromDegrees(Number(t.lng),Number(t.lat)),semiMajorAxis:Number(e.semiMajorAxis),semiMinorAxis:Number(e.semiMinorAxis),height:Number(e.height),granularity:Cesium.Math.toRadians(e.granularity),rotation:Cesium.Math.toRadians(e.bearing)}),n=Cesium.EllipseOutlineGeometry.createGeometry(i);if(!n||!n.attributes||!n.attributes.position)return[];for(var o=n.attributes.position.values,s=[],a=0;a<o.length;a+=3){var r=new Cesium.Cartesian3(o[a],o[a+1],o[a+2]);s.push(r)}return s}},{key:"rhumbBearing",value:function(t,e){var i=turf.point([t.lng,t.lat]),n=turf.point([e.lng,e.lat]);return turf.rhumbBearing(i,n)}},{key:"computeCenter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=[];t.forEach((function(t){e.push(turf.point([t.lng,t.lat]))}));var i=turf.featureCollection(e),n=turf.center(i).geometry.coordinates;return{lng:n[0],lat:n[1]}}},{key:"computeMidpoint",value:function(t,e){var i=turf.point([t.lng,t.lat]),n=turf.point([e.lng,e.lat]),o=turf.midpoint(i,n).geometry.coordinates;return{lng:o[0],lat:o[1]}}},{key:"computeAttackArrow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.computeArrow(t,0)}},{key:"computePincerArrow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.computeArrow(t)}},{key:"computeArrow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t.length<3)return[];for(var i,n=[],o=0;o<t.length;o++)n.push([t[o].lng,t[o].lat]);i=e?xp.algorithm.doubleArrow(n):xp.algorithm.tailedAttackArrow(n);var s=JSON.stringify(i.polygonalPoint).indexOf("null"),a=[];return-1===s&&(a=i.polygonalPoint),a}},{key:"computeAssemble",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.length<2)return[];t.length;var i=new Array;if(t.forEach((function(t){i.push([t.lng,t.lat])})),2===i.length){var n=P.PlotUtils.mid(i[0],i[1]),o=P.PlotUtils.distance(i[0],n)/.9,s=P.PlotUtils.getThirdPoint(i[0],n,P.Constants.HALF_PI,o,!0);i=[i[0],s,i[1]]}var a=P.PlotUtils.mid(i[0],i[2]);i.push(a,i[0],i[1]);for(var r=[],l=void 0,c=void 0,u=void 0,p=[],h=0;h<i.length-2;h++){l=i[h],c=i[h+1],u=i[h+2];var d=P.PlotUtils.getBisectorNormals(.4,l,c,u);r=r.concat(d)}var m=r.length;r=[r[m-1]].concat(r.slice(0,m-1));for(var f=0;f<i.length-2;f++){l=i[f],c=i[f+1],p=p.concat(L()(l));for(var v=0;v<=P.Constants.FITTING_COUNT;v++){var g=P.PlotUtils.getCubicValue(v/P.Constants.FITTING_COUNT,l,r[2*f],r[2*f+1],c);p=p.concat(L()(g))}p=p.concat(L()(c))}return e?p:Cesium.Cartesian3.fromDegreesArray(p)}},{key:"computeStraightArrow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.length<2)return[];var i=[t[0].lng,t[0].lat],n=[t[1].lng,t[1].lat];if(t[0].lng===t[1].lng&&t[0].lat===t[1].lat){if(e)return[t[0],t[0],t[0]];var o=Cesium.Cartesian3.fromDegrees(t[0].lng,t[0].lat);return[o,o,o]}for(var s,a=[],r=0;r<t.length;r++)a.push([t[r].lng,t[r].lat]);if(s=xp.algorithm.fineArrow(i,n),e){for(var l=[],c=0;c<s.length;c++){var u=this.cartesian3Towgs84(s[c],this.sdk.viewer);l.push(u.lng,u.lat)}return l}return s}},{key:"getMaterial",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#2ab0c2",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="",s={7:10,8:3,9:4,10:4,11:4,12:2};switch(i&&(s[e+""]?i.polyline.width=i.polyline.oriWidth+s[e+""]:i.polyline.width=i.polyline.oriWidth),Number(e)){case 1:o=new Cesium.PolylineDashMaterialProperty({color:Cesium.Color.fromCssColorString(t),dashLength:10});break;case 2:o=new Cesium.PolylineGlowMaterialProperty({glowPower:.2,color:Cesium.Color.fromCssColorString(t)});break;case 3:o=new Cesium.PolylineFlowMaterialProperty({color:t,speed:n.rotate?n.speed:0-n.speed,rotate:n.rotate});break;case 4:o=new Cesium.PolylineFlowMultMaterialProperty({color:t,speed:n.rotate?n.speed:0-n.speed,rotate:n.rotate});break;case 5:case 6:var a,r=this;o=new Cesium.FlowDashedLineFlowMaterialProperty({color:t,uType:5==e?0:1,speed:n.rotate?n.speed:0-n.speed,space:n.space,scale:new Cesium.CallbackProperty((function(){var t=i.polyline.positions.getValue();if(!Cesium.defined(t))return 1;for(var e=0,n=0;n<t.length-1;++n)e+=Cesium.Cartesian3.distance(t[n],t[n+1]);var o=new Cesium.Cartesian2(0,r.sdk.viewer.canvas.clientHeight),s=new Cesium.Cartesian2(r.sdk.viewer.canvas.clientWidth/2,r.sdk.viewer.canvas.clientHeight),l=r.sdk.viewer.scene.pickPosition(o),c=r.sdk.viewer.scene.pickPosition(s);if(l&&c){var u=Cesium.Cartesian3.distance(l,c);a=2*u/e}return a}))});break;case 7:case 8:case 9:case 10:case 11:case 12:var l={color:t,image:this.getSourceRootPath()+"/img/arrow/".concat(e-6,".png"),space:n.space,speed:n.speed};l.speed=n.rotate?l.speed:0-l.speed,this.getFlowTexture(this,l,i);break;default:o=Cesium.Color.fromCssColorString(t)}return o}},{key:"getFlowTexture",value:function(t,e,i){var n=document.createElement("canvas"),o=n.getContext("2d"),s=new Image;s.src=e.image,s.onload=function(){e.space=Math.max(.1,e.space),e.speed>0||0==e.speed?(n.width=s.width*(e.space+1),n.height=s.height,o.drawImage(s,s.width*(e.space/2),0)):(o.clearRect(0,0,n.width,n.height),n.width=s.width*(e.space+1),n.height=s.height,o.save(),o.translate(n.width/2,n.height/2),o.rotate(Math.PI),o.translate(-n.width/2,-n.height/2),o.drawImage(s,s.width*(e.space/2),0),o.restore());var a=0,r=0;i.polyline.material=new Cesium.LineTextureMaterialProperty({color:e.color,image:n,speed:e.speed,repeat:new Cesium.CallbackProperty((function(){var o=i.polyline.positions.getValue(t.sdk.viewer.clock.currentTime);if(!Cesium.defined(o))return new Cesium.Cartesian2(1,1);for(var s=0,l=0;l<o.length-1;++l)s+=Cesium.Cartesian3.distance(o[l],o[l+1]);var c,u=s/i.polyline.width.getValue(),p=t.sdk.viewer.camera.positionCartographic.height,h=new Cesium.BoundingSphere(new Cesium.Cartesian3(-1e6,0,0),5e5),d=t.sdk.viewer.canvas.clientWidth,m=t.sdk.viewer.canvas.clientHeight,f=t.sdk.viewer.scene.camera.getPixelSize(h,d,m);if(f>700){var v=(u*=f/p/(e.space*(n.width/n.height*5)+1))/i.polyline.oriRepeat;i.polyline.oriSpeed=v,i.polyline.oriRepeatX=u,a=v,r=u,c=new Cesium.Cartesian2(u,v||1)}else c=new Cesium.Cartesian2(r||i.polyline.oriRepeatX,a||i.polyline.oriSpeed);return c}))});var l=t.getSceenLine(i,e,n);l&&(i.polyline.oriRepeat=l)}}},{key:"getSceenLine",value:function(t,e,i){var n=new Cesium.Cartesian2(0,this.sdk.viewer.canvas.clientHeight),o=new Cesium.Cartesian2(this.sdk.viewer.canvas.clientWidth/2,this.sdk.viewer.canvas.clientHeight),s=this.sdk.viewer.scene.pickPosition(n),a=this.sdk.viewer.scene.pickPosition(o),r=Cesium.Cartesian3.distance(s,a)/t.polyline.width.getValue(),l=this.sdk.viewer.camera.positionCartographic.height,c=new Cesium.BoundingSphere(new Cesium.Cartesian3(-1e6,0,0),5e5),u=this.sdk.viewer.canvas.clientWidth,p=this.sdk.viewer.canvas.clientHeight,h=this.sdk.viewer.scene.camera.getPixelSize(c,u,p);return h>700?r*=h/l/(e.space*(i.width/i.height*5)+1):r=void 0,r}},{key:"create_arrow1_picture",value:function(t){var e=new fabric.Canvas("canvas");e.width=150,e.height=75;var i=t,n=new fabric.Polygon([{x:e.width,y:e.height/2},{x:e.width-35,y:e.height},{x:e.width-35,y:e.height-20},{x:e.width/2,y:e.height-20},{x:e.width/2,y:20},{x:e.width-35,y:20},{x:e.width-35,y:0}],{fill:i});return e.add(n),e.toDataURL()}},{key:"create_arrow2_picture",value:function(t){var e=new fabric.Canvas("canvas");e.width=75,e.height=75;var i=t,n=new fabric.Polygon([{x:e.width,y:e.height/2},{x:e.width-35,y:e.height},{x:e.width-35-40,y:e.height},{x:e.width-40,y:e.height/2},{x:e.width-35-40,y:0},{x:e.width-35,y:0}],{fill:i});return e.add(n),e.toDataURL()}},{key:"sampleHeightMostDetailed",value:function(t){var e=[];return t.forEach((function(t){e.push(new Cesium.Cartographic.fromDegrees(t.lng,t.lat))})),this.sdk.viewer.scene.sampleHeightMostDetailed(e)}},{key:"flyHome",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(ii(0),Je(this.sdk),qe(this.sdk),this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE){var e=this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE.destination,i=this.sdk.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE.orientation;this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),orientation:{heading:Cesium.Math.toRadians(i.heading||0),pitch:Cesium.Math.toRadians(i.pitch||0),roll:Cesium.Math.toRadians(i.roll||0)},duration:t})}else this.sdk.viewer.camera.flyHome(t)}},{key:"setPickStatus",value:function(){}},{key:"create_point_buffer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{steps:10},n=turf.point([Number(t.lng),Number(t.lat)]),o=turf.buffer(n,Number(e)/1e3,i);return o.geometry.coordinates}},{key:"create_line_buffer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(1===t.length)return this.create_point_buffer(t[0],e);if(0===t.length)return!1;var i=[];t.forEach((function(t){i.push([Number(t.lng),Number(t.lat)])}));var n=turf.lineString(i),o=turf.buffer(n,Number(e)/1e3);return o.geometry.coordinates}},{key:"create_area_buffer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(1===t.length)return this.create_point_buffer(t[0],e);if(0===t.length)return!1;if(2===t.length)return this.create_line_buffer(t,e);var i=[];t.forEach((function(t){i.push([Number(t.lng),Number(t.lat)])})),i.push(i[0]);var n=turf.polygon([i]),o=turf.buffer(n,Number(e)/1e3);return o.geometry.coordinates}},{key:"cal_envelope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!(t.length<2)){var e=[];t.forEach((function(t){e.push(turf.point([t.lng,t.lat]))}));var i=turf.featureCollection(e);return turf.envelope(i).geometry.coordinates[0]}console.error("坐标数量不能少于2个")}},{key:"chunkLine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t.length<2)return[];var i=[];t.forEach((function(t){i.push([t.lng,t.lat])}));var n=turf.lineString(i),o=turf.lineChunk(n,e/1e3),s=new Map;return o.features.forEach((function(t){t.geometry.coordinates.forEach((function(t){var e=t.join(","),i={lng:t[0],lat:t[1]};s.set(e,i)}))})),o.features}},{key:"billboardAnimation",value:function(t,e){var i=e.id,n=e.offset,o=void 0===n?10:n,s=(e.times,t.entities.getById(i));if(s){var a=Math.PI,r=a/60,l=0,c=this.cartesian3Towgs84(s.position.getValue(),t),u=setInterval((function(){l+=r;var t=o*Math.sin(l)+c.alt;l>a&&(l=0),s.position=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,t)}),30);setTimeout((function(){clearInterval(u),s.position=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt)}),3e3)}}},{key:"calSector",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:25,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:45,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:360,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=turf.point([t.lng,t.lat]),r=turf.sector(a,e/1e3,i,n,{steps:o}).geometry.coordinates,l=[];return r.forEach((function(t){t.forEach((function(t){var e;e=s?{lng:t[0],lat:t[1]}:Cesium.Cartesian3.fromDegrees(t[0],t[1]),l.push(e)}))})),l}},{key:"getClampToHeight",value:(t=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=c.length>1&&void 0!==c[1]?c[1]:[],this.sdk&&this.sdk.viewer){t.next=3;break}return t.abrupt("return",0);case 3:return n=new Cesium.Cartesian3.fromDegrees(e.lng,e.lat),t.prev=4,t.next=7,this.sdk.viewer.scene.clampToHeight(n,i);case 7:if(t.t0=t.sent,t.t0){t.next=10;break}t.t0=n;case 10:o=t.t0,t.next=16;break;case 13:t.prev=13,t.t1=t.catch(4),o=n;case 16:return t.next=18,this.cartesian3Towgs84(o,this.sdk.viewer).alt;case 18:if(s=t.sent,r=0,t.prev=20,!this.sdk.viewer.scene.terrainProvider.availability){t.next=26;break}return t.next=24,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(e.lng,e.lat)]);case 24:(l=t.sent)[0].height&&(r=l[0].height);case 26:t.next=31;break;case 28:t.prev=28,t.t2=t.catch(20),r=0;case 31:if(!(s>r)){t.next=35;break}return t.abrupt("return",Number(s.toFixed(2)));case 35:return t.abrupt("return",Number(r.toFixed(2)));case 36:case"end":return t.stop()}}),t,this,[[4,13],[20,28]])}))),function(e){return t.apply(this,arguments)})},{key:"deepCopyObj",value:function(t){var e=null;if("object"==N()(t)&&null!==t)for(var i in e=t instanceof Array?[]:{},t)"earth"!=i&&"Dialog"!=i&&(e[i]=this.deepCopyObj(t[i]));else e=t;return e}},{key:"projConvert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t?J(this.sdk,e):q()}},{key:"projectionConvert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t?K(this.sdk,e):$()}},{key:"exportExcel",value:function(t){var e="<Row>";for(var i in t[0])e+='<Cell><Data ss:Type="String">'.concat(i,"</Data></Cell>");e+="</Row>";for(var n,o='<Worksheet ss:Name="{nameWS}"><Table><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="240"/>{rows}</Table></Worksheet>',s=function(t,e){return t.replace(/{(\w+)}/g,(function(t,i){return e[i]}))},a="",r="",l=0;l<t.length;l++){for(var c in 0==l&&(r+=e),r+="<Row>",t[l])r+=s('<Cell><Data ss:Type="{nameType}">{data}</Data></Cell>',{nameType:"String",data:t[l][c]});r+="</Row>",l>0&&l/6e4%1==0&&(a+=s(o,{rows:r,nameWS:"Sheet"+l}),r="",r+=e)}a+=s(o,{rows:r,nameWS:"Sheet"}),r="",n=s('<?xml version="1.0"?><?mso-application progid="Excel.Sheet"?><Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"><DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"><Author>Axel Richter</Author><Created>{created}</Created></DocumentProperties><Styles><Style ss:ID="Currency"><NumberFormat ss:Format="Currency"></NumberFormat></Style><Style ss:ID="Date"><NumberFormat ss:Format="Medium Date"></NumberFormat></Style></Styles>{worksheets}</Workbook>',{created:(new Date).getTime(),worksheets:a});var u,p=document.createElement("A");p.href="data:application/vnd.ms-excel;base64,"+(u=n,window.btoa(unescape(encodeURIComponent(u)))),p.download="矢量数据导出.xls",p.target="_blank",document.body.appendChild(p),p.click(),document.body.removeChild(p)}},{key:"decompressGzip",value:function(t){var e=pako.inflate(t);return(new TextDecoder).decode(e)}},{key:"cmykToRgb",value:function(t){var e=t.c,i=t.m,n=t.y,o=t.k,s={r:0,g:0,b:0};return s.c=e/100,s.m=i/100,s.y=n/100,s.k=o/100,s.r=1-Math.min(1,s.c*(1-s.k)+s.k),s.g=1-Math.min(1,s.m*(1-s.k)+s.k),s.b=1-Math.min(1,s.y*(1-s.k)+s.k),s.r=Math.round(255*s.r),s.g=Math.round(255*s.g),s.b=Math.round(255*s.b),"rgb(".concat(s.r,", ").concat(s.g,", ").concat(s.b,")")}},{key:"convertPxToRem",value:function(t,e){var i=parseFloat(getComputedStyle(document.documentElement).fontSize),n=[],o=[];if(e){n=document.getElementById(t.div_id).querySelectorAll(e);for(var s=0;s<n.length;s++){var a;(a=o).push.apply(a,[n[s]].concat(L()(n[s].querySelectorAll("*"))))}}else o=document.getElementById(t.div_id).querySelectorAll("*");o.forEach((function(t){var e=t.style;Array.from(e).filter((function(t){return"string"==typeof t&&t.endsWith("px")})).forEach((function(n){var o=parseFloat(e[n])/i;t.style[n]="".concat(o,"rem")}))}))}},{key:"isConvex",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length,i=0,n=0,o=0;o<e;++o){var s=t[(o+1)%e].lng-t[o].lng,a=t[(o+2)%e].lng-t[(o+1)%e].lng,r=t[(o+1)%e].lat-t[o].lat,l=t[(o+2)%e].lat-t[(o+1)%e].lat;if(0!=(n=s*l-a*r)){if(n>0&&i<0||n<0&&i>0)return!1;i=n}}return!0}},{key:"getDateTimeString",value:function(){var t=new Date,e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0"),r=String(t.getMilliseconds()).padStart(3,"0");return"".concat(e).concat(i).concat(n).concat(o).concat(s).concat(a).concat(r)}},{key:"replaceHost",value:function(t,e){var i=t;if(!t||!e)return t;try{if(t.startsWith("http")){var n=/^[^@]+@/;n.test(t)&&(t=t.replace(n,"")),/^[a-z]+:\/\//i.test(t)||(t="http://"+t);var o=new URL(t),s=new URL(e),a=o.hostname,r=o.port;return a.startsWith("[")&&a.endsWith("]")&&(a=a.slice(1,-1)),"localhost"!==a&&"127.0.0.1"!==a||55110===parseInt(r,10)||(o.port=s.port,o.protocol=s.protocol,i=o.toString()),i}return t.includes(":")||this.options.host&&(i=new URL(t,this.options.host).href),i}catch(t){return i}}}],[{key:"_md5",value:function(t){return j()(t).toUpperCase()}}]);var t,e,i}();function ri(t,e){var i=t.viewer;if(i)for(var n=0;n<i.dataSources._dataSources.length;n++)if("sdk-dataSource1"===i.dataSources._dataSources[n].name){i.dataSources._dataSources[n].entities.add(e);break}}function li(t,e){for(var i=0;i<t.dataSources._dataSources.length;i++)if("sdk-dataSource1"===t.dataSources._dataSources[i].name){t.dataSources._dataSources[i].entities.remove(e);break}}function ci(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._definitionChanged=new Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this.color=t.color,this.duration=t.duration,this.fltr=t.fltr,this.image=t.image,this._time=(new Date).getTime()}Object.defineProperties(t.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},repeat:Cesium.createPropertyDescriptor("repeat"),color:Cesium.createPropertyDescriptor("color")}),t.prototype.getType=function(t){return"PolylineTrailLink"},t.prototype.getValue=function(t,e){return Cesium.defined(e)||(e={}),e.color=Cesium.Property.getValueOrClonedDefault(this._color,t,Cesium.Color.BROWN,e.color),this.image?e.image=this.image:e.image=Cesium.Material.PolylineTrailLinkImage,this.duration&&(e.time=((new Date).getTime()-this._time)%this.duration/this.duration),!1===this.fltr?e.fltr=this.fltr:e.fltr=!0,e},t.prototype.equals=function(e){return this===e||e instanceof t&&Cesium.Property.equals(this._color,e._color)},Cesium.PolylineTrailLinkMaterialProperty=t,Cesium.Material.PolylineTrailLinkType="PolylineTrailLink",Cesium.Material.PolylineTrailLinkImage=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#fa2020",e=512,i=32,n=new fabric.Canvas("canvas",{width:e,height:i}),o=new fabric.Rect({width:e,height:i}),s=new fabric.Gradient({type:"linear",gradientUnits:"pixels",coords:{x1:0,y1:0,x2:e,y2:0},colorStops:[{offset:.01,color:"rgba(246,241,241,0)"},{offset:1,color:t}]});return o.set("fill",s),n.add(o),n.toDataURL()}(),Cesium.Material.PolylineTrailLinkSource="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material =czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image,vec2(fract(st.t - time), st.t));\n vec4 fragColor;\n fragColor.rgb = color.rgb / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n material.alpha = colorImage.a * color.a;\n material.diffuse = (colorImage.rgb+color.rgb)/2.0;\n material.emission = fragColor.rgb;\n return material;\n }",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineTrailLinkType,{fabric:{type:Cesium.Material.PolylineTrailLinkType,uniforms:{color:new Cesium.Color(1,1,1,1),image:Cesium.Material.PolylineTrailLinkImage,time:0},source:Cesium.Material.PolylineTrailLinkSource},translucent:function(t){return!0}})}function ui(){var t,e,i,n,o,s,a;ci(),t=new ai,"undefined"!=typeof Cesium&&function(e){e.CustomMaterialSource=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(e.Color,e.defaultValue),o=Object.defineProperties,s=e.Event,a=e.createPropertyDescriptor,r=e.Property,l=e.Material,c=i.MaterialType||"wallType"+parseInt(1e3*Math.random()),u={color:new e.Color(1,1,1,1),image:i.image||t.getSourceRootPath()+"/img/material/arrow.png",time:i.time||0,repeat:new e.Cartesian2(100,100),fltr:!i.fltr&&!1!==i.fltr||i.fltr,is2D:!!i.is2D,isTranslucent:!i.isTranslucent&&!1!==i.isTranslucent||i.isTranslucent};if(this.code="",i.repeats)for(var p=e.Property.getValueOrDefault(i.repeats),h=0;h<p.length;h++)0!==h&&(this.code+="else "),u["repeat"+(h+1)]=new e.Cartesian2(p[h][1]*(p.length+3*(p.length-1)),p[h][2]),this.code+="if(materialInput.st.s < ".concat(p[h][0],") {\n repeat0 = repeat").concat(h+1,";\n }");function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n(t,n.EMPTY_OBJECT),this._definitionChanged=new s,this._color=void 0,this._colorSubscription=void 0,this._repeat=void 0,this._repeats=void 0,this._repeatSubscription=void 0,this.image=t.image,this.is2D=!!t.is2D,this.color=new e.Color.fromCssColorString(t.color||"rgba(4,253,231,0.87)"),this.repeat=t.repeat,this.repeats=t.repeats,this.duration=t.duration||0===t.duration?t.duration:1e3,this.fltr=!t.fltr&&!1!==t.fltr||t.fltr,this._time=(new Date).getTime()}return o(d.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},repeat:e.createPropertyDescriptor("repeat"),color:a("color")}),d.prototype.getType=function(t){return c},d.prototype.getValue=function(t,i){if(e.defined(i)||(i={}),i.color=e.Property.getValueOrClonedDefault(this._color,t,e.Color.WHITE,i.color),i.time=this.duration?e.getTimestamp()%this.duration/this.duration:0,i.image=this.image,i.is2D=!!this.is2D,this.repeat&&(i.repeat=e.Property.getValueOrDefault(this.repeat)),this.repeats)for(var n=e.Property.getValueOrDefault(this.repeats),o=0;o<n.length;o++)i["repeat"+(o+1)]=new e.Cartesian2(n[o][1]*(n.length+3*(n.length-1)),n[o][2]);return i},d.prototype.equals=function(t){return this===t||t instanceof d&&r.equals(this._color,t._color)&&r.equals(this.repeat,t._repeat)&&r.equals(this.repeats,t._repeats)},l._materialCache.addMaterial(c,{fabric:{type:c,uniforms:u,source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n // vec2 repeat1 = materialInput.st.s < 0.5 ? vec2(100.0, 1.0) : vec2(200.0, 1.0);\n vec2 repeat0 = repeat;\n "+this.code+";\n vec2 st = repeat0 * materialInput.st;\n float f = -1.0;\n if(fltr==true) { f = 1.0; } \n vec4 colorImage = texture(image, vec2(fract(st.s - (time * f)), st.t));\n if(isTranslucent) {\n material.alpha = colorImage.a * color.a;\n }\n else {\n material.alpha = 1.0;\n }\n material.diffuse = colorImage.rgb*color.rgb*0.0;\n material.emission = colorImage.rgb*color.rgb * 1.4;\n return material;\n }",components:{specular:10,diffuse:"vec3(1.0)"}},translucent:function(t){return t.uniforms.isTranslucent}}),new d(i)}}(Cesium),e=function(){function t(e){k()(this,t),this._definitionChanged=new Cesium.Event,this._color=void 0,this._speed=void 0,this.color=e.color,this.speed=e.speed,this.transparency=e.transparency}return _()(t,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(t){return Cesium.Material.RadarScanMaterialType}},{key:"getValue",value:function(t,e){return Cesium.defined(e)||(e={}),e.color=Cesium.Property.getValueOrDefault(this._color,t,Cesium.Color.RED,e.color),e.speed=Cesium.Property.getValueOrDefault(this._speed,t,10,e.speed),e.transparency=this.transparency,e.frameNumber=Cesium.getTimestamp(),e}},{key:"equals",value:function(e){return this===e||e instanceof t&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e._speed)&&Cesium.Property.equals(this.transparency,e.transparency)}}])}(),Object.defineProperties(e.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),transparency:Cesium.createPropertyDescriptor("transparency")}),Cesium.RadarScanMaterialProperty=e,Cesium.Material.RadarScanMaterialProperty="RadarScanMaterialProperty",Cesium.Material.RadarScanMaterialType="RadarScanMaterialType",Cesium.Material.RadarScanMaterialSource="\n uniform vec4 color;\n uniform float speed;\n uniform float transparency;\n uniform float frameNumber;\n \n #define PI 3.14159265359\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 scrPt = st * 2.0 - 1.0;\n float time = frameNumber * speed / 30000.0 ;\n vec3 col = vec3(0.0);\n mat2 rot;\n float theta = -time * 1.0 * PI - 2.2;\n float cosTheta, sinTheta;\n cosTheta = cos(theta);\n sinTheta = sin(theta);\n rot[0][0] = cosTheta;\n rot[0][1] = -sinTheta;\n rot[1][0] = sinTheta;\n rot[1][1] = cosTheta;\n vec2 scrPtRot = rot * scrPt;\n float angle = 1.0 - (atan(scrPtRot.y, scrPtRot.x) / 6.2831 + 0.5);\n float falloff = length(scrPtRot);\n material.alpha = pow(length(col + vec3(.5)),5.0) * transparency * 0.6;\n material.diffuse = (0.5 + pow(angle, 2.0) * falloff ) * color.rgb ;\n return material;\n }\n \n ",Cesium.Material._materialCache.addMaterial(Cesium.Material.RadarScanMaterialType,{fabric:{type:Cesium.Material.RadarScanMaterialType,uniforms:{color:new Cesium.Color(1,0,0,1),speed:10,transparency:1,frameNumber:Cesium.getTimestamp()},source:Cesium.Material.RadarScanMaterialSource},translucent:function(t){return!0}}),new ai,"undefined"!=typeof Cesium&&function(t){t.CustomColorMaterialSource=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=(t.Color,t.defaultValue),n=Object.defineProperties,o=t.Event,s=t.createPropertyDescriptor,a=t.Property,r=t.Material,l=e.MaterialType||"wallType"+parseInt(1e3*Math.random());function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=i(e,i.EMPTY_OBJECT),this._definitionChanged=new o,this._color=void 0,this.color=new t.Color.fromCssColorString(e.color||"rgba(4,253,231,0.87)")}return n(c.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:s("color")}),c.prototype.getType=function(t){return l},c.prototype.getValue=function(e,i){return t.defined(i)||(i={}),i.color=t.Property.getValueOrClonedDefault(this._color,e,t.Color.WHITE,i.color),i},c.prototype.equals=function(t){return this===t||t instanceof c&&a.equals(this._color,t._color)},r._materialCache.addMaterial(l,{fabric:{type:l,uniforms:{color:new t.Color(1,1,1,1)},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.alpha = color.a;\n \n material.diffuse = color.rgb*0.0;\n material.emission = color.rgb;\n return material;\n }",components:{specular:1,diffuse:"vec3(0.0)"}},translucent:function(t){return!0}}),new c(e)}}(Cesium),function(){var t=new ai;"undefined"!=typeof Cesium&&function(e){e.CustomImageMaterialSource=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(e.Color,e.defaultValue),o=Object.defineProperties,s=e.Event,a=e.createPropertyDescriptor,r=e.Property,l=e.Material,c=i.MaterialType||"wallType"+parseInt(1e3*Math.random());function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n(t,n.EMPTY_OBJECT),this._definitionChanged=new s,this._color=void 0,this._colorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=t.image,this.color=new e.Color.fromCssColorString(t.color||"rgba(4,253,231,0.87)"),this.repeat=t.repeat}return o(u.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},repeat:e.createPropertyDescriptor("repeat"),color:a("color")}),u.prototype.getType=function(t){return c},u.prototype.getValue=function(t,i){return e.defined(i)||(i={}),i.color=e.Property.getValueOrClonedDefault(this._color,t,e.Color.WHITE,i.color),i.image=this.image,i.repeat=e.Property.getValueOrDefault(this.repeat),i},u.prototype.equals=function(t){return this===t||t instanceof u&&r.equals(this._color,t._color)&&r.equals(this.repeat,t._repeat)},l._materialCache.addMaterial(c,{fabric:{type:c,uniforms:{color:new e.Color(1,1,1,1),image:i.image||t.getSourceRootPath()+"/img/material/arrow.png",repeat:new e.Cartesian2(100,100)},source:"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = repeat * materialInput.st;\n vec4 colorImage = texture(image, st);\n \n material.diffuse = colorImage.rgb * 0.0;\n material.emission = colorImage.rgb * 0.3;\n return material;\n }"}}),new u(i)}}(Cesium)}(),i=function(){function t(e){k()(this,t),this._definitionChanged=new Cesium.Event,this._color=void 0,this._duration=void 0,this.color=new Cesium.Color.fromCssColorString(e.color||"rgba(255,255,255,1)"),this.duration=e.duration||10,this.lineBackAlpha=e.lineBackAlpha||.05}return _()(t,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(t){return Cesium.Material.FlowLineMaterialType}},{key:"getValue",value:function(t,e){return Cesium.defined(e)||(e={}),e.color=Cesium.Property.getValueOrDefault(this._color,t,Cesium.Color.RED,e.color),e.duration=Cesium.Property.getValueOrDefault(this._duration,t,10,e.duration),e.lineBackAlpha=this.lineBackAlpha,e.frameNumber=Cesium.getTimestamp(),e}},{key:"equals",value:function(e){return this===e||e instanceof t&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._duration,e.duration)&&Cesium.Property.equals(this.lineBackAlpha,e.lineBackAlpha)}}])}(),Object.defineProperties(i.prototype,{color:Cesium.createPropertyDescriptor("color"),duration:Cesium.createPropertyDescriptor("duration"),transparency:Cesium.createPropertyDescriptor("lineBackAlpha")}),Cesium.FlowLineMaterialProperty=i,Cesium.Material.FlowLineMaterialProperty="FlowLineMaterialProperty",Cesium.Material.FlowLineMaterialType="FlowLineMaterialType",Cesium.Material.FlowLineMaterialSource="\n uniform vec4 color;\n uniform float duration;\n uniform float lineBackAlpha;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n //生成默认的基础材质\n czm_material material = czm_getDefaultMaterial(materialInput);\n //获取st(uv)\n vec2 st = materialInput.st;\n //获取当前帧数,10秒内变化0-1\n float time = fract(czm_frameNumber / (60.0*duration));\n //长度1/10\n time = time * (1.0 + 0.1);\n //平滑过渡函数\n float alpha = smoothstep(time-0.1,time,st.s) * step(-time,-st.s);\n //光带轨迹(不会完全透明)\n alpha += lineBackAlpha;\n material.alpha = alpha;\n material.diffuse = color.rgb;\n return material;\n }\n ",Cesium.Material._materialCache.addMaterial(Cesium.Material.FlowLineMaterialType,{fabric:{type:Cesium.Material.FlowLineMaterialType,uniforms:{color:new Cesium.Color(1,1,1,1),duration:10,lineBackAlpha:.05},source:Cesium.Material.FlowLineMaterialSource},translucent:function(t){return!0}}),n=function(){function t(e){k()(this,t),this._definitionChanged=new Cesium.Event,this._color=void 0,this._speed=void 0,this._rotate=void 0,this.color=new Cesium.Color.fromCssColorString(e.color||"rgba(255,255,255,1)"),this.speed=null!=e.speed?e.speed:1,this.lineBackAlpha=e.lineBackAlpha||.05,this.rotate=e.rotate}return _()(t,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(t){return Cesium.Material.PolylineFlowMaterialType}},{key:"getValue",value:function(t,e){return Cesium.defined(e)||(e={}),e.color=Cesium.Property.getValueOrDefault(this._color,t,Cesium.Color.RED,e.color),e.speed=Cesium.Property.getValueOrDefault(this._speed,t,10,e.speed),e.rotate=Cesium.Property.getValueOrDefault(this._rotate,t,!0,e.rotate),e.lineBackAlpha=this.lineBackAlpha,e.frameTime=Cesium.getTimestamp(),e}},{key:"equals",value:function(e){return this===e||e instanceof t&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e.speed)&&Cesium.Property.equals(this.lineBackAlpha,e.lineBackAlpha)}}])}(),Object.defineProperties(n.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),rotate:Cesium.createPropertyDescriptor("rotate"),transparency:Cesium.createPropertyDescriptor("lineBackAlpha")}),Cesium.PolylineFlowMaterialProperty=n,Cesium.Material.PolylineFlowMaterialProperty="PolylineFlowMaterialProperty",Cesium.Material.PolylineFlowMaterialType="PolylineFlowMaterialType",Cesium.Material.PolylineFlowMaterialSource="\n uniform vec4 color;\n uniform float speed;\n uniform float lineBackAlpha;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n //生成默认的基础材质\n czm_material material = czm_getDefaultMaterial(materialInput);\n //获取st(uv)\n vec2 st = materialInput.st;\n //获取当前帧数,10秒内变化0-1\n // float time = fract(czm_frameNumber * speed / 60.0);\n // float time = fract(abs(speed) * czm_frameNumber * 0.01);\n float time = fract(frameTime / 1000.0 / abs(speed));\n //长度1/10\n // time = time * (1.0 + 0.1);\n float staticAlpha = rotate?smoothstep(0.0,1.0, 1.0-st.s) * step(-1.0,-(1.0-st.s)):smoothstep(0.0,1.0, st.s) * step(-1.0,-st.s);\n\n //平滑过渡函数\n float alpha1 = smoothstep(time-0.1,time,1.0-st.s) * step(-time,- (1.0-st.s));\n float alpha2 = smoothstep(time-0.1,time,st.s) * step(-time,- st.s);\n float alpha =(speed== 0.0)? staticAlpha:(speed < 0.0)?alpha2:alpha1;\n //光带轨迹(不会完全透明)\n alpha += lineBackAlpha;\n material.alpha = alpha;\n material.diffuse = color.rgb;\n return material;\n }\n ",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineFlowMaterialType,{fabric:{type:Cesium.Material.PolylineFlowMaterialType,uniforms:{color:new Cesium.Color(1,1,1,1),speed:.1,rotate:!0,frameTime:Cesium.getTimestamp(),lineBackAlpha:.05},source:Cesium.Material.PolylineFlowMaterialSource},translucent:function(t){return!0}}),o=function(){function t(e){k()(this,t),this._definitionChanged=new Cesium.Event,this._color=void 0,this._speed=void 0,this._rotate=void 0,this.color=new Cesium.Color.fromCssColorString(e.color||"rgba(255,255,255,1)"),this.speed=null!=e.speed?e.speed:1,this.lineBackAlpha=e.lineBackAlpha||.05,this.rotate=e.rotate}return _()(t,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(t){return Cesium.Material.PolylineFlowMultMaterialType}},{key:"getValue",value:function(t,e){return Cesium.defined(e)||(e={}),e.color=Cesium.Property.getValueOrDefault(this._color,t,Cesium.Color.RED,e.color),e.speed=Cesium.Property.getValueOrDefault(this._speed,t,10,e.speed),e.rotate=Cesium.Property.getValueOrDefault(this._rotate,t,!0,e.rotate),e.lineBackAlpha=this.lineBackAlpha,e.frameTime=Cesium.getTimestamp(),e}},{key:"equals",value:function(e){return this===e||e instanceof t&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e.speed)&&Cesium.Property.equals(this._rotate,e.rotate)&&Cesium.Property.equals(this.lineBackAlpha,e.lineBackAlpha)}}])}(),Object.defineProperties(o.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),rotate:Cesium.createPropertyDescriptor("rotate"),transparency:Cesium.createPropertyDescriptor("lineBackAlpha")}),Cesium.PolylineFlowMultMaterialProperty=o,Cesium.Material.PolylineFlowMultMaterialProperty="PolylineFlowMultMaterialProperty",Cesium.Material.PolylineFlowMultMaterialType="PolylineFlowMultMaterialType",Cesium.Material.PolylineFlowMaterialSource="\n uniform vec4 color;\n uniform float speed;\n uniform float lineBackAlpha;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n\n // 基础时间轴(控制主光带)\n float baseTime = fract(czm_frameNumber * speed / 60.0) * 1.1;\n\n // 高频时间轴(控制高光点)\n // float highlightTime = fract(czm_frameNumber * speed * 3.0 / 60.0);\n // float highlightTime = fract(abs(speed) * czm_frameNumber * 0.01);\n float highlightTime = fract(frameTime / 1000.0 / abs(speed));\n float highlightSpacing = 0.3; // 高光点间隔\n\n // 主光带透明度计算\n float mainAlpha = smoothstep(baseTime-0.1, baseTime, st.s) * step(-baseTime, -st.s);\n\n // 多高光点计算(3个周期性光斑)\n float highlight11 = smoothstep(highlightTime-0.05, highlightTime, st.s) *\n step(-highlightTime, -st.s) *\n (1.0 - smoothstep(0.0, highlightSpacing, abs(st.s - highlightTime)));\n\n float highlight21 = smoothstep(highlightTime+highlightSpacing-0.05,\n highlightTime+highlightSpacing, st.s) *\n step(-(highlightTime+highlightSpacing), -st.s) *\n (1.0 - smoothstep(0.0, highlightSpacing, abs(st.s - (highlightTime+highlightSpacing))));\n\n float highlight31 = smoothstep(highlightTime+2.0*highlightSpacing-0.05,\n highlightTime+2.0*highlightSpacing, st.s) *\n step(-(highlightTime+2.0*highlightSpacing), -st.s) *\n (1.0 - smoothstep(0.0, highlightSpacing, abs(st.s - (highlightTime+2.0*highlightSpacing))));\n\n\n float highlight12 = smoothstep(highlightTime-0.05, highlightTime, 1.0 - st.s) *\n step(-highlightTime, -(1.0-st.s)) *\n (1.0 - smoothstep(0.0, highlightSpacing, abs(1.0 - st.s - highlightTime)));\n\n float highlight22 = smoothstep(highlightTime+highlightSpacing-0.05,\n highlightTime+highlightSpacing, 1.0 - st.s) *\n step(-(highlightTime+highlightSpacing),-(1.0 - st.s)) *\n (1.0 - smoothstep(0.0, highlightSpacing, abs(1.0-st.s - (highlightTime+highlightSpacing))));\n\n float highlight32 = smoothstep(highlightTime+2.0*highlightSpacing-0.05,\n highlightTime+2.0*highlightSpacing, 1.0 - st.s) *\n step(-(highlightTime+2.0*highlightSpacing), -(1.0-st.s)) *\n (1.0 - smoothstep(0.0, highlightSpacing, abs(1.0 - st.s - (highlightTime+2.0*highlightSpacing))));\n\n\n float highlight1 = !rotate?highlight11:highlight12;\n float highlight2 = !rotate?highlight21:highlight22;\n float highlight3 = !rotate?highlight31:highlight32;\n // 合并效果\n // material.alpha = mainAlpha * 0.7 +\n // (highlight1 + highlight2 + highlight3) * 0.5 +\n // lineBackAlpha;\n material.alpha = (highlight1 + highlight2 + highlight3) * 0.5 +\n lineBackAlpha;\n material.diffuse = color.rgb; // 高光区变亮\n return material;\n }\n ",Cesium.Material._materialCache.addMaterial(Cesium.Material.PolylineFlowMultMaterialType,{fabric:{type:Cesium.Material.PolylineFlowMultMaterialType,uniforms:{color:new Cesium.Color(1,1,1,1),speed:.1,rotate:!0,frameTime:Cesium.getTimestamp(),lineBackAlpha:.05},source:Cesium.Material.PolylineFlowMaterialSource},translucent:function(t){return!0}}),s=function(){function t(e){k()(this,t),this._definitionChanged=new Cesium.Event,this._color=void 0,this._speed=void 0,this._uType=void 0,this._space=void 0,this._dashSize=void 0,this._scale=void 0,this.color=new Cesium.Color.fromCssColorString(e.color||"rgba(255,255,255,1)"),this.speed=null!=e.speed?e.speed:1,this.space=e.space||0,this.dashSize=e.dashSize||.03,this.uType=void 0===e.uType?1:e.uType,this.lineBackAlpha=e.lineBackAlpha||.05,this.scale=e.scale||1}return _()(t,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(t){return Cesium.Material.FlowDashedLineMaterialType}},{key:"getValue",value:function(t,e){return Cesium.defined(e)||(e={}),e.color=Cesium.Property.getValueOrDefault(this._color,t,Cesium.Color.RED,e.color),e.speed=Cesium.Property.getValueOrDefault(this._speed,t,10,e.speed),e.space=Cesium.Property.getValueOrDefault(this._space,t,10,e.space),e.dashSize=Cesium.Property.getValueOrDefault(this._dashSize,t,10,e.dashSize),e.uType=Cesium.Property.getValueOrDefault(this._uType,t,1,e.uType),e.scale=Cesium.Property.getValueOrDefault(this._scale,t,1,e.scale),e.lineBackAlpha=this.lineBackAlpha,e.frameNumber=Cesium.getTimestamp(),e}},{key:"equals",value:function(e){return this===e||e instanceof t&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._speed,e.speed)&&Cesium.Property.equals(this._uType,e.uType)&&Cesium.Property.equals(this._lineBackAlpha,e.lineBackAlpha)&&Cesium.Property.equals(this._scale,e.scale)}}])}(),Object.defineProperties(s.prototype,{color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),space:Cesium.createPropertyDescriptor("space"),dashSize:Cesium.createPropertyDescriptor("dashSize"),uType:Cesium.createPropertyDescriptor("uType"),transparency:Cesium.createPropertyDescriptor("lineBackAlpha"),scale:Cesium.createPropertyDescriptor("scale")}),Cesium.FlowDashedLineFlowMaterialProperty=s,Cesium.Material.FlowDashedLineFlowMaterialProperty="FlowDashedLineFlowMaterialProperty",Cesium.Material.FlowDashedLineMaterialType="FlowDashedLineMaterialType",Cesium.Material.FlowDashedLineMaterialSource="\n uniform vec4 color;\n uniform float speed;\n // uniform int uType;\n uniform float lineBackAlpha;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n\n float dashSize = 0.1;\n float gapSize = space;\n // speed现在表示完成一次完整动画循环的秒数\n float progress = speed==0.0 ? 0.0 : fract(frameNumber / 1000.0 / speed * scale);\n float pattern = fract(st.x / dashSize * (1.0 + gapSize) + progress / dashSize * (1.0 + gapSize));\n float dash1 = step(0.0, pattern) - step(1.0/(1.0 + gapSize), pattern);\n float dash2 = smoothstep(0.0, 0.2, pattern) -\n smoothstep(1.0/(1.0 + gapSize),\n 1.0/(1.0 + gapSize) + 0.2,\n pattern);\n float dash = (float(uType) != 1.0)?dash1:dash2;\n material.alpha = dash;\n material.diffuse = color.rgb;\n return material;\n }\n ",Cesium.Material._materialCache.addMaterial(Cesium.Material.FlowDashedLineMaterialType,{fabric:{type:Cesium.Material.FlowDashedLineMaterialType,uniforms:{color:new Cesium.Color(1,1,1,1),speed:1,space:0,scale:1,dashSize:.03,frameNumber:Cesium.getTimestamp(),uType:1,lineBackAlpha:.05},source:Cesium.Material.FlowDashedLineMaterialSource},translucent:function(t){return!0}}),a=function(){function t(e){k()(this,t),this._definitionChanged=new Cesium.Event,this._image=void 0,this._color=void 0,this._speed=void 0,this._repeat=void 0,this.image=e.image||"",this.color=new Cesium.Color.fromCssColorString(e.color||"rgba(255,255,255,1)"),this.speed=null!=e.speed?e.speed:1,this.repeat=e.repeat||new Cesium.Cartesian2(1,1)}return _()(t,[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(t){return Cesium.Material.LineTextureMaterialType}},{key:"getValue",value:function(t,e){return Cesium.defined(e)||(e={}),e.image=Cesium.Property.getValueOrDefault(this._image,t,"",e.image),e.color=Cesium.Property.getValueOrDefault(this._color,t,Cesium.Color.RED,e.color),e.speed=Cesium.Property.getValueOrDefault(this._speed,t,1,e.speed),e.repeat=Cesium.Property.getValueOrDefault(this._repeat,t,new Cesium.Cartesian2(1,1),e.repeat),e.frameNumber=Cesium.getTimestamp(),e}},{key:"equals",value:function(e){return this===e||e instanceof t&&Cesium.Property.equals(this._image,e._image)&&Cesium.Property.equals(this._color,e._color)&&Cesium.Property.equals(this._imageW,e._imageW)&&Cesium.Property.equals(this._speed,e._speed)}}])}(),Object.defineProperties(a.prototype,{image:Cesium.createPropertyDescriptor("image"),color:Cesium.createPropertyDescriptor("color"),speed:Cesium.createPropertyDescriptor("speed"),repeat:Cesium.createPropertyDescriptor("repeat")}),Cesium.LineTextureMaterialProperty=a,Cesium.Material.LineTextureMaterialProperty="LineTextureMaterialProperty",Cesium.Material.LineTextureMaterialType="LineTextureMaterialType",Cesium.Material.LineTextureMaterialSource="\n uniform vec4 color;\n uniform sampler2D image;\n uniform float speed;\n // uniform float repeat;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n st.s *= repeat.x; // 关键:通过repeat控制纹理密度\n // vec4 colorImage = texture2D(image, vec2(fract(st.s + speed*czm_frameNumber* 0.01), st.t));\n vec4 colorImage = speed==0.0?texture2D(image, vec2(fract(st.s), st.t)):texture2D(image, vec2(fract(st.s + frameNumber / 1000.0 / speed * repeat.x / repeat.y ), st.t));\n material.alpha = colorImage.a * color.a;\n material.diffuse = color.rgb;\n return material;\n }\n ",Cesium.Material._materialCache.addMaterial(Cesium.Material.LineTextureMaterialType,{fabric:{type:Cesium.Material.LineTextureMaterialType,uniforms:{color:new Cesium.Color(1,1,1,1),image:"",repeat:new Cesium.Cartesian2(1,1),speed:1,frameNumber:Cesium.getTimestamp(),uTime:1},source:Cesium.Material.LineTextureMaterialSource},translucent:function(t){return!0}})}var pi=function(){return _()((function t(e,i){k()(this,t),this.dom=e,this.playerUrl=i.url,this.init()}),[{key:"init",value:function(){this.flvPlayer=flvjs.createPlayer({type:"flv",url:this.playerUrl,isLive:!0,hasAudio:!1,hasVideo:!0},{enableWorker:!0,enableStashBuffer:!1,stashInitialSize:128}),this.flvPlayer.attachMediaElement(this.dom),this.flvPlayer.load()}},{key:"on",value:function(t,e,i){this.flvPlayer.on(flvjs[t][e],i)}},{key:"destroy",value:function(){this.flvPlayer.destroy(),this.flvPlayer=null}}])}(),hi=function(){return _()((function t(e,i){k()(this,t),this.dom=e,this.url=i.url,this.init()}),[{key:"init",value:function(){this.player=new Jessibuca({container:this.dom,decoder:this.getSourceRootPath()+"/3rdparty/jessibuca/decoder.js",timeout:30,heartTimeout:30,heartTimeoutReplay:!1,loadingTimeout:30,loadingTimeoutReplay:!1,wasmDecodeErrorReplay:!1,videoBuffer:.2,isResize:!1,text:"",loadingText:"",useMSE:!1,debug:!0,showBandwidth:!1,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,recorder:!1},forceNoOffscreen:!1,isNotMute:!1}),this.player.play(this.url)}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"destroy",value:function(){this.player.destroy(),this.player=null}},{key:"getSourceRootPath",value:function(){var t=document.querySelectorAll("script"),e="";return t.forEach((function(t){if(t.src&&t.src.indexOf("YJEarth.min.js")>-1){var i=t.src.split("/");i.pop(),e=i.join("/")}})),e}}])}();function di(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function mi(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var fi=/^[og]\s*(.+)?/,vi=/^mtllib /,gi=/^usemtl /,yi=/^usemap /,bi=/\s+/,Ci={red:1,green:1,blue:1,alpha:1};function wi(){var t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,e){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=t,void(this.object.fromDeclaration=!1!==e);var i=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:!1!==e,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(t,e){var i=this._finalize(!1);i&&(i.inherited||i.groupCount<=0)&&this.materials.splice(i.index,1);var n={index:this.materials.length,name:t||"",mtllib:Array.isArray(e)&&e.length>0?e[e.length-1]:"",smooth:void 0!==i?i.smooth:this.smooth,groupStart:void 0!==i?i.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(t){var e={index:"number"==typeof t?t:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return e.clone=this.clone.bind(e),e}};return this.materials.push(n),n},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(t){var e=this.currentMaterial();if(e&&-1===e.groupEnd&&(e.groupEnd=this.geometry.vertices.length/3,e.groupCount=e.groupEnd-e.groupStart,e.inherited=!1),t&&this.materials.length>1)for(var i=this.materials.length-1;i>=0;i--)this.materials[i].groupCount<=0&&this.materials.splice(i,1);return t&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),e}},i&&i.name&&"function"==typeof i.clone){var n=i.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(t,e){var i=parseInt(t,10);return 3*(i>=0?i-1:i+e/3)},parseNormalIndex:function(t,e){var i=parseInt(t,10);return 3*(i>=0?i-1:i+e/3)},parseUVIndex:function(t,e){var i=parseInt(t,10);return 2*(i>=0?i-1:i+e/2)},addVertex:function(t,e,i){var n=this.vertices,o=this.object.geometry.vertices;o.push(n[t+0],n[t+1],n[t+2]),o.push(n[e+0],n[e+1],n[e+2]),o.push(n[i+0],n[i+1],n[i+2])},addVertexPoint:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addVertexLine:function(t){var e=this.vertices;this.object.geometry.vertices.push(e[t+0],e[t+1],e[t+2])},addNormal:function(t,e,i){var n=this.normals,o=this.object.geometry.normals;o.push(n[t+0],n[t+1],n[t+2]),o.push(n[e+0],n[e+1],n[e+2]),o.push(n[i+0],n[i+1],n[i+2])},addFaceNormal:function(t,e,i){console.warn("addFaceNormal")},addColor:function(t,e,i){var n=this.colors,o=this.object.geometry.colors;void 0!==n[t]&&o.push(n[t+0],n[t+1],n[t+2]),void 0!==n[e]&&o.push(n[e+0],n[e+1],n[e+2]),void 0!==n[i]&&o.push(n[i+0],n[i+1],n[i+2])},addUV:function(t,e,i){var n=this.uvs,o=this.object.geometry.uvs;o.push(n[t+0],n[t+1]),o.push(n[e+0],n[e+1]),o.push(n[i+0],n[i+1])},addDefaultUV:function(){var t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){var e=this.uvs;this.object.geometry.uvs.push(e[t+0],e[t+1])},addFace:function(t,e,i,n,o,s,a,r,l){var c=this.vertices.length,u=this.parseVertexIndex(t,c),p=this.parseVertexIndex(e,c),h=this.parseVertexIndex(i,c);if(this.addVertex(u,p,h),this.addColor(u,p,h),void 0!==a&&""!==a){var d=this.normals.length;u=this.parseNormalIndex(a,d),p=this.parseNormalIndex(r,d),h=this.parseNormalIndex(l,d),this.addNormal(u,p,h)}else this.addFaceNormal(u,p,h);if(void 0!==n&&""!==n){var m=this.uvs.length;u=this.parseUVIndex(n,m),p=this.parseUVIndex(o,m),h=this.parseUVIndex(s,m),this.addUV(u,p,h),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";for(var e=this.vertices.length,i=0,n=t.length;i<n;i++){var o=this.parseVertexIndex(t[i],e);this.addVertexPoint(o),this.addColor(o)}},addLineGeometry:function(t,e){this.object.geometry.type="Line";for(var i=this.vertices.length,n=this.uvs.length,o=0,s=t.length;o<s;o++)this.addVertexLine(this.parseVertexIndex(t[o],i));for(var a=0,r=e.length;a<r;a++)this.addUVLine(this.parseUVIndex(e[a],n))}};return t.startObject("",!1),t}var ki=function(){return _()((function t(e){k()(this,t),this.context=e}),[{key:"Load",value:function(t,e,i){var n=this;this.host=i,this.videoId=e;var o=t.substr(t.lastIndexOf("/")+1);return o=o.substring(0,o.lastIndexOf(".")),Cesium.Resource.fetchText(t).then((function(e){return n.Parse(e,t.substring(0,t.lastIndexOf("/")+1),o)}))}},{key:"Parse",value:function(t,e,i){var n=new wi;-1!==t.indexOf("\r\n")&&(t=t.replace(/\r\n/g,"\n")),-1!==t.indexOf("\\\n")&&(t=t.replace(/\\\n/g,""));for(var o=t.split("\n"),s=[],a=0,r=o.length;a<r;a++){var l=o[a].trimStart();if(0!==l.length){var c=l.charAt(0);if("#"!==c)if("v"===c){var u=l.split(bi);switch(u[0]){case"v":n.vertices.push(parseFloat(u[1]),parseFloat(u[2]),parseFloat(u[3])),u.length>=7?(Cesium.Color.fromBytes(parseFloat(u[4]),parseFloat(u[5]),parseFloat(u[6]),1,Ci),n.colors.push(Ci.red,Ci.green,Ci.blue)):n.colors.push(void 0,void 0,void 0);break;case"vn":n.normals.push(parseFloat(u[1]),parseFloat(u[2]),parseFloat(u[3]));break;case"vt":n.uvs.push(parseFloat(u[1]),parseFloat(u[2]))}}else if("f"===c){for(var p=l.slice(1).trim().split(bi),h=[],d=0,m=p.length;d<m;d++){var f=p[d];if(f.length>0){var v=f.split("/");h.push(v)}}for(var g=h[0],y=1,b=h.length-1;y<b;y++){var C=h[y],w=h[y+1];n.addFace(g[0],C[0],w[0],g[1],C[1],w[1],g[2],C[2],w[2])}}else if("l"===c){var k=l.substring(1).trim().split(" "),x=[],_=[];if(-1===l.indexOf("/"))x=k;else for(var E=0,S=k.length;E<S;E++){var D=k[E].split("/");""!==D[0]&&x.push(D[0]),""!==D[1]&&_.push(D[1])}n.addLineGeometry(x,_)}else if("p"===c){var M=l.slice(1).trim().split(" ");n.addPointGeometry(M)}else if(null!==(s=fi.exec(l))){(" "+s[0].slice(1).trim()).slice(1);n.startObject(i)}else if(gi.test(l))n.object.startMaterial(l.substring(7).trim(),n.materialLibraries);else if(vi.test(l))n.materialLibraries.push(l.substring(7).trim());else if(yi.test(l))console.warn('Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===c){if((s=l.split(" ")).length>1){var P=s[1].trim().toLowerCase();n.object.smooth="0"!==P&&"off"!==P}else n.object.smooth=!0;var O=n.object.currentMaterial();O&&(O.smooth=n.object.smooth)}else{if("\0"===l)continue;console.warn('Unexpected line: "'+l+'"')}}}n.finalize();var T=new Si(this.context,this.hls,this.videoId,this.host,i);if(!0===!(1===n.objects.length&&0===n.objects[0].geometry.vertices.length))for(var N=0,B=n.objects.length;N<B;N++){var L=n.objects[N],A=L.geometry,j=L.materials;if(0!==A.vertices.length){for(var I=new _i(this.context,A),F=0,R=j.length;F<R;F++){var z=j[F],H=z.name+"_"+z.smooth+"_",V=n.materials[H];z.mtllib=i+".mtl",void 0===V&&((V=new xi(this.context,A,e,z.mtllib)).name=z.name,V.flatShading=!z.smooth,n.materials[H]=V),I.setMaterial(V)}I.name=L.name,T.add(I)}}return T}}])}(),xi=function(){return _()((function t(e,i,n,s){var r=this;k()(this,t),this.context=e,this.ready=!1;var l=document.createElement("canvas");l.width=512,l.height=512,this.canvas=l;var c=Cesium.Resource.fetchText(n+s).then(function(){var t=o()(a.a.mark((function t(e){var i,o,l,c,u,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=[],o=e.split("\n"),l=0,c=o.length;case 3:if(!(l<c)){t.next=20;break}if(0!==(u=o[l].trimStart()).length){t.next=7;break}return t.abrupt("continue",17);case 7:if("map_Kd"!==u.split(" ")[0]){t.next=17;break}return u.split(" ")[1],p=s.replace(".mtl","_result.jpg"),t.t0=i,t.next=14,r.loadTexture(n+p);case 14:t.t1=t.sent,t.t2={diffusemap:t.t1},t.t0.push.call(t.t0,t.t2);case 17:l++,t.next=3;break;case 20:return t.abrupt("return",Promise.all(i));case 21:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),u="attribute vec3 position;\n",p="",h="",d=!1,m=!1,f=!1;i.normals.length>0&&(d=!0),i.colors.length>0&&(m=!0),!0===i.hasUVIndices&&(f=!0),d&&(u+="attribute vec3 normal;\n",u+="varying vec3 v_normal;\n",p+="varying vec3 v_normal;\n",h+="v_normal = normal;\n"),m&&(u+="attribute vec3 color;\n",u+="varying vec2 v_color;\n",p+="varying vec2 v_color;\n",h+="v_color = color;\n"),f&&(u+="attribute vec2 uv;\n",u+="varying vec2 v_uv;\n",p+="varying vec2 v_uv;\n",h+="v_uv = uv;\n"),u+="\n void main() {\n gl_Position = czm_modelViewProjection * vec4(position, 1.);\n ".concat(h,"\n }\n "),p+="\n\t\tuniform sampler2D colorTexture;\n void main() {\n\t\t\t vec4 color = texture2D(colorTexture, v_uv);\n\t\t\t\t\t\tgl_FragColor = color;\n }\n ",this.program=Cesium.ShaderProgram.fromCache({context:e,vertexShaderSource:u,fragmentShaderSource:p}),this.uniformMap={};var v=this;c.then((function(t){for(var e=function(){var e=t[i].diffusemap;r.uniformMap.colorTexture=function(){return e}},i=0;i<t.length;i++)e();v.ready=!0}))}),[{key:"updateColorTexture",value:function(t,e,i){if(this.ready){var n=this.uniformMap.colorTexture();if(t.playing&&t.timeupdate&&(e!==n.width||i!==n.height)){n.destroy(),this.canvas.width=1280,this.canvas.height=960,this.canvas.getContext("2d").drawImage(t.dom,0,0,1280,960,0,0,this.canvas.width,this.canvas.height);var o=new Cesium.Texture({context:this.context,source:this.canvas});this.uniformMap.colorTexture=function(){return o}}}}},{key:"setCommand",value:function(t){t.shaderProgram=this.program,t.uniformMap=this.uniformMap}},{key:"loadTexture",value:function(t){var e=this;return Cesium.Resource.fetchImage(t).then((function(t){return e.canvas.width=t.width,e.canvas.height=t.height,e.canvas.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,e.canvas.width,e.canvas.height),new Cesium.Texture({context:e.context,source:e.canvas,sampler:Cesium.Sampler.NEAREST})}))}}])}(),_i=function(){return _()((function t(e,i){k()(this,t),this.lastState=!1,this.name=void 0,this.geometry=i;var n=[],o=0;this.material=void 0;var s=Cesium.Buffer.createVertexBuffer({context:e,typedArray:Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT,i.vertices),usage:Cesium.BufferUsage.STATIC_DRAW});if(n.push({index:o,enabled:!0,vertexBuffer:s,componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,normalize:!1}),i.normals.length>0){o++;var a=Cesium.Buffer.createVertexBuffer({context:e,typedArray:Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT,i.normals),usage:Cesium.BufferUsage.STATIC_DRAW});n.push({index:o,enabled:!0,vertexBuffer:a,componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,normalize:!1})}if(i.colors.length>0){o++;var r=Cesium.Buffer.createVertexBuffer({context:e,typedArray:Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT,i.colors),usage:Cesium.BufferUsage.STATIC_DRAW});n.push({index:o,enabled:!0,vertexBuffer:r,componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,normalize:!1})}if(!0===i.hasUVIndices){o++;var l=Cesium.Buffer.createVertexBuffer({context:e,typedArray:Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT,i.uvs),usage:Cesium.BufferUsage.STATIC_DRAW});n.push({index:o,enabled:!0,vertexBuffer:l,componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1})}var c=new Cesium.VertexArray({context:e,attributes:n}),u=Cesium.RenderState.fromCache({cull:{enabled:!1},depthMask:!0,depthTest:{enabled:!0}});this.drawCommand=new Cesium.DrawCommand({owner:this,primitiveType:Cesium.PrimitiveType.TRIANGLES,vertexArray:c,renderState:u,pass:Cesium.Pass.OPAQUE})}),[{key:"setMaterial",value:function(t){this.material=t,t.setCommand(this.drawCommand)}},{key:"update",value:function(t){Cesium.defined(this.material)&&this.material.ready&&t.commandList.push(this.drawCommand)}},{key:"updateVideo",value:function(t,e,i){var n=!1;if(Cesium.defined(this.material)&&this.material.ready)if(i.computeVisibility(this.drawCommand.boundingVolume)>=0&&this.material.ready){var o=t.distanceToBoundingSphere(this.drawCommand.boundingVolume),s=e.width,a=e.height;o>=20&&o<100?(s=e.width/2,a=e.height/2):o>=100&&(s=e.width/10,a=e.height/10),n=!0,this.material.updateColorTexture(e,Math.floor(s),Math.floor(a))}else n=!1;this.lastState=n}}])}(),Ei=new WeakMap,Si=function(){return _()((function t(e,i,n,o,s){k()(this,t),di(this,Ei,!0),this.context=e,this.videoId=n,this.host=o,this._modelMatrix=Cesium.Matrix4.IDENTITY,this.parent=null,this.children=[],this.video={dom:null,playing:!1,timeupdate:!1,width:0,height:0,tracks:null},this.time=0,this.name=s}),[{key:"show",get:function(){return e=this,(t=Ei).get(mi(t,e));var t,e},set:function(t){var e,i,n;"boolean"==typeof t?(i=this,n=t,(e=Ei).set(mi(e,i),n),t?this.video.player&&this.video.player.getVueInstance().play():this.video.player&&this.video.player.getVueInstance().pause()):console.error("参数必须为boolean")}},{key:"requestVideoResource",value:function(){var t=this,e="",i=(e=this.host.endsWith("yjearth4.0")?this.host:this.host+"/yjearth4.0")+"/videoFusion/"+this.videoId;return fetch(i,{method:"get",headers:{"Content-Type":"application/json"}}).then(function(){var i=o()(a.a.mark((function i(n){var s;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,n.text();case 2:if(s=i.sent,s=JSON.parse(s),![0,200].includes(s.code)){i.next=13;break}if(!s.data.deviceCode.length){i.next=9;break}return i.abrupt("return",fetch(e+"/videoFusion/vide/stream",{method:"post",body:JSON.stringify({type:"flv",deviceCode:s.data.deviceCode}),headers:{"Content-Type":"application/json"}}).then(function(){var e=o()(a.a.mark((function e(i){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.text();case 2:if(n=e.sent,n=JSON.parse(n),![0,200].includes(n.code)){e.next=9;break}return n.data.url.length?(t.video.player.url=n.data.url,t.setFlvVideo(n.data.url)):console.warn("地址不存在"),e.abrupt("return");case 9:return console.warn(n.msg||n.message),e.abrupt("return");case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 9:console.warn("设备不存在");case 10:return i.abrupt("return");case 13:return console.warn(s.msg||s.message),i.abrupt("return");case 15:case"end":return i.stop()}}),i)})));return function(t){return i.apply(this,arguments)}}())}},{key:"modelMatrix",get:function(){return this._modelMatrix},set:function(t){this._modelMatrix=t.clone(),this.updateModelMatrix()}},{key:"updateModelMatrix",value:function(){for(var t=0;t<this.children.length;t++){var e=this.children[t];e.drawCommand.modelMatrix=this._modelMatrix;var i=Cesium.BoundingSphere.fromVertices(e.geometry.vertices),n=Cesium.Matrix4.multiplyByTranslation(this._modelMatrix,i.center,new Cesium.Matrix4);i.center=Cesium.Matrix4.getTranslation(n,new Cesium.Cartesian3),e.drawCommand.boundingVolume=i}}},{key:"setPosition",value:function(t){Cesium.Matrix4.multiplyByTranslation(this._modelMatrix,t,this._modelMatrix),this.updateModelMatrix()}},{key:"add",value:function(t){t.parent=this,this.children.push(t)}},{key:"update",value:function(t){if(this.show)for(var e=0;e<this.children.length;e++){this.children[e].update(t)}}},{key:"setVideo",value:function(t){var e=this;if(this.video.playing=!1,this.video.timeupdate=!1,t){/^.+\.m3u8$/.test(t);var i="video_"+Cesium.createGuid(),n=document.createElement("div");n.setAttribute("id",i),n.style.display="none",this.video.parentDom=n;var o=this,s=new WasmPlayer(null,n,(function(t){if("play"===t){var e=n.getElementsByTagName("video")[0],i=n.getElementsByTagName("canvas")[0];if(e&&i)setTimeout((function(){s.play()}),1e3);else if(e){o.video.dom=e,o.video.width=e.videoWidth,o.video.height=e.videoHeight,o.video.playing=!0;for(var a=new Cesium.Texture({context:o.context,source:e}),r=0;r<o.children.length;r++){o.children[r].material.uniformMap.colorTexture=function(){return o.video.width=e.videoWidth,o.video.height=e.videoHeight,a.destroy(),a=new Cesium.Texture({context:o.context,source:e})}}}else if(i){o.video.dom=i,o.video.width=i.width,o.video.height=i.height,o.video.playing=!0;for(var l=new Cesium.Texture({context:o.context,source:i}),c=0;c<o.children.length;c++){o.children[c].material.uniformMap.colorTexture=function(){return i.width==o.video.width&&i.height==o.video.height||(console.log("resize texture"),l.destroy(),l=new Cesium.Texture({context:o.context,source:i})),o.video.width=i.width,o.video.height=i.height,l.destroy(),l=new Cesium.Texture({context:o.context,source:i})}}}}}));s.play(t,1),this.video.player=s,n.getElementsByTagName("video")[0].addEventListener("loadeddata",(function(){e.loaded=!0}))}}},{key:"setFlvVideo3",value:function(t){if(this.video.playing=!1,this.video.timeupdate=!1,this.video.url=t,t){var e="video_"+Cesium.createGuid(),i=document.createElement("video");i.setAttribute("id",e);var n=this,o=new pi(i,{url:t});this.video.player=o,o.on("Events","MEDIA_INFO",(function(t){})),o.flvPlayer.play().then((function(){n.video.dom=i,n.video.width=i.videoWidth,n.video.height=i.videoHeight,n.video.playing=!0;for(var t=new Cesium.Texture({context:n.context,source:i}),e=0;e<n.children.length;e++){n.children[e].material.uniformMap.colorTexture=function(){return n.video.width=i.videoWidth,n.video.height=i.videoHeight,t.destroy(),t=new Cesium.Texture({context:n.context,source:i})}}}))}}},{key:"setFlvVideo2",value:function(t){if(this.video.playing=!1,this.video.timeupdate=!1,this.video.url=t,t){var e="video_"+Cesium.createGuid(),i=document.createElement("div");i.setAttribute("id",e),i.style.display="none";var n=this,o=new hi(i,{url:t});this.video.player=o,this.video.player.player.on("play",(function(t){console.log("1111111111");var e=i.getElementsByTagName("canvas")[0];i.innerHTML="",n.video.dom=e,n.video.width=e.width,n.video.height=e.height,n.video.playing=!0;for(var o=new Cesium.Texture({context:n.context,source:e}),s=0;s<n.children.length;s++){n.children[s].material.uniformMap.colorTexture=function(){return n.video.width=e.width,n.video.height=e.height,o.copyFrom({source:e}),o}}}))}}},{key:"setFlvVideo",value:function(t){var e=this;if(this.video.playing=!1,this.video.timeupdate=!1,this.video.url=t,t){var i=this,n="video_"+Cesium.createGuid(),o=document.getElementById("yj-sdk-live-player-box");o||((o=document.createElement("div")).setAttribute("id","yj-sdk-live-player-box"),o.style.display="none",document.body.appendChild(o));var s=document.createElement("live-player");s.setAttribute("id",n),s.setAttribute("video-url",this.video.url),s.setAttribute("live",!0),s.style.display="none",o.appendChild(s),this.video.player=s,s.addEventListener("play",(function(t){console.log("播放成功",e.video.url,e.name);var n=s.getElementsByTagName("video")[0];i.video.dom=n,i.video.width=n.width,i.video.height=n.height,i.video.playing=!0;for(var o=new Cesium.Texture({context:i.context,source:n}),a=0;a<i.children.length;a++){i.children[a].material.uniformMap.colorTexture=function(){return i.video.width=n.width,i.video.height=n.height,o.copyFrom({source:n}),o}}}))}}},{key:"isDestroyed",value:function(){return!1}},{key:"destroy",value:function(){this.video.player&&(this.video.player.setAttribute("video-url",null),document.getElementById("yj-sdk-live-player-box").removeChild(this.video.player),this.video.player=null)}}])}(),Di=ki,Mi=["icon-py","icon-edit","icon-add","icon-add2","icon-minus","icon-play","icon-pause","icon-updateheight","icon-draw","icon-positions","icon-reset","icon-xj","icon-yj","icon-zj","icon-close","icon-query","icon-route","icon-copy","icon-load","icon-rubric","icon-pen","icon-cross","icom-confirm"];function Pi(){var t=document.createElement("svg");t.xmlns="http://www.w3.org/2000/svg",t.style.width=0,t.style.height=0,t.style.position="absolute",t.style.overflow="hidden",document.body.appendChild(t);for(var e=new DOMParser,i=function(){var i=Mi[n];fetch(Cesium.buildModuleUrl("../custom/img/".concat(i,".svg"))).then((function(t){return t.text()})).then((function(n){var o=e.parseFromString(n,"text/xml").getElementsByTagName("svg")[0];o&&(o.id="yj-"+i,t.appendChild(o))}))},n=0;n<Mi.length;n++)i()}var Oi=_()((function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k()(this,t);var n,o,s,a,r,l=this,c={el:i.el,size:"mini",isLog:!1,disabled:i.disabled||!1,alpha:!1,clickDefineColor:p,hasClear:!0,openPickerAni:"opacity",defaultColor:i.defaultColor,pickerInputChange:f,startMainCallback:function(t){l.colorPicker&&(l.colorPicker.picker.style.opacity=0),setTimeout((function(){u()}),0)}};function u(){if(l.colorPicker&&l.colorPicker.picker){var t=!1,e=l.colorPicker.box,c=l.colorPicker.picker,u=e.getBoundingClientRect().x,m=e.getBoundingClientRect().y,v=0;c.style.left=u+"px",c.style.minWidth="325px";var g=c.getElementsByClassName("ew-alpha-slider-bar")[0];g&&(g.parentNode.style.width="16px",g.parentNode.removeChild(g));var y=document.createElement("div");y.className="icon-pen-box",y.innerHTML='<svg class="icon-pen"><use xlink:href="#yj-icon-pen"></use></svg>',y.style.display="none",y.style.cursor="unset";var b=l.colorPicker.pickerInput;b.parentNode.insertBefore(y,b),b.style.width="188px",b.style.display="none";var C=document.createElement("div"),w=document.createElement("div");w.className="row",w.style.margin="6px 0 0 0",w.innerHTML='\n <div class="col">R</div>\n <div class="col">G</div>\n <div class="col">B</div>\n <div class="col" style="flex: 0 0 92px;"></div>\n ';var k=document.createElement("div");k.className="row",k.innerHTML='\n <div class="col">\n <input type="number" step="1" min="0" max="255">\n </div>\n <div class="col">\n <input type="number" step="1" min="0" max="255">\n </div>\n <div class="col">\n <input type="number" step="1" min="0" max="255">\n </div>\n ',C.appendChild(w),C.appendChild(k);var x=k.getElementsByTagName("input");x[0].style.width="72px",x[1].style.width="72px",x[2].style.width="72px",n=x[0],o=x[1],s=x[2];var _=c.getElementsByClassName("ew-color-dropbtns")[0];if(c.insertBefore(C,_),i.alpha){x[0].style.width="52px",x[1].style.width="52px",x[2].style.width="52px";var E=document.createElement("div");E.className="input-number input-number-unit color-alpha",E.innerHTML='\n <input class="input" type="number" title="" step="0.01" min="0" max="1">\n <span class="arrow"></span>',b.parentNode.insertBefore(E,b.nextSibling),b.style.width="106px",E.style.width="66px",E.style.margin="0 6px 0 0",a=E.getElementsByClassName("input")[0],w.innerHTML='\n <div class="col">R</div>\n <div class="col">G</div>\n <div class="col">B</div>\n <div class="col">A</div>\n <div class="col" style="flex: 0 0 106px;"></div>\n ',k.appendChild(E),a.addEventListener("blur",(function(t){var e=t.target.value;(t.target.value||"undefined"!==t.target.dataset.null&&""!==t.target.dataset.null&&!Boolean(t.target.dataset.null))&&(e=Number(e),t.target.max&&e>Number(t.target.max)&&(e=Number(t.target.max)),t.target.min&&e<Number(t.target.min)&&(e=Number(t.target.min)),t.target.dataset.min&&e<Number(t.target.dataset.min)&&(e=Number(t.target.dataset.min)),a.value=parseInt(100*e)/100)})),l.pickAlphaInputValue||0===l.pickAlphaInputValue||"0"===l.pickAlphaInputValue?a.value=parseInt(100*l.pickAlphaInputValue)/100:a.value=r?parseInt(100*r.alpha)/100:1,l.pickAlphaInputValue=a.value,e.style.background=Cesium.Color.fromCssColorString(l.colorPicker.config.defaultColor||"#ffffff").withAlpha(a.value).toCssColorString()}else r=r?r.withAlpha(1):"",e.style.background=Cesium.Color.fromCssColorString(l.colorPicker.config.defaultColor||"#ffffff").toCssColorString();var S=c.getElementsByClassName("ew-color-dropbtngroup")[0];k.appendChild(S);var D=c.getElementsByClassName("ew-pre-define-color-container")[0];if(D){var M=localStorage.getItem("custom-color");M=M?JSON.parse(M):{};var P=document.createElement("span");P.className="custom-divider",P.style.margin="10px 0";var O=document.createElement("span");O.className="custom-divider",D.parentNode.insertBefore(P,D),D.parentNode.insertBefore(O,D.nextSibling);var T=document.createElement("div");T.className="yj-pre-collect-color-container",O.parentNode.insertBefore(T,O.nextSibling);var N=document.createElement("div");N.innerHTML='<svg class="icon-add2"><use xlink:href="#yj-icon-add2"></use></svg>',N.className="yj-pre-collect-color add";var B=document.createElement("div");B.innerHTML='<svg class="icon-minus" style="display: unset;"><use xlink:href="#yj-icon-minus"></use></svg><svg class="icon-confirm" style="display: none;"><use xlink:href="#yj-icom-confirm"></use></svg>',B.className="yj-pre-collect-color subtract";var L=B.getElementsByClassName("icon-minus")[0],A=B.getElementsByClassName("icon-confirm")[0];T.appendChild(N),T.appendChild(B);var j=[],I=function(t){var e=document.createElement("div");e.className="yj-pre-collect-color",e.setAttribute("tabindex","0"),e.setAttribute("color-box-id",l.colorPicker.uid);var i=document.createElement("div");i.className="yj-pre-define-color-item",e.appendChild(i),i.className="yj-pre-define-color-item";var n=Cesium.Color.fromCssColorString(M[t]).toCssHexString();i.style.backgroundColor=n,i.addEventListener("click",(function(t){l.colorPicker.updateColor(t),e.className="yj-pre-collect-color yj-pre-collect-color-active",p(n)})),e.addEventListener("blur",(function(t){e.className="yj-pre-collect-color"}));var o=document.createElement("div");o.className="yj-pre-define-color-item subtract-btn",o.innerHTML='<svg class="icon-cross"><use xlink:href="#yj-icon-cross"></use></svg>',o.style.display="none",e.appendChild(o),T.appendChild(e),o.addEventListener("click",(function(){delete M[t],localStorage.setItem("custom-color",JSON.stringify(M)),T.removeChild(e)})),j.push(o)};for(var F in M)I(F);N.addEventListener("click",(function(){if(t){t=!1;for(var e=0;e<j.length;e++)j[e].style.display="none"}var i=document.createElement("div");i.className="yj-pre-collect-color",i.setAttribute("tabindex","0"),i.setAttribute("color-box-id",l.colorPicker.uid);var n=document.createElement("div");n.className="yj-pre-define-color-item",i.appendChild(n);var o=d(h(l.colorPicker.hsba)),s=Cesium.Color.fromCssColorString(o||"#ffffff");a&&(s=s.withAlpha(a.value));var r=s.toCssHexString();n.style.backgroundColor=r,n.addEventListener("click",(function(t){l.colorPicker.updateColor(t),i.className="yj-pre-collect-color yj-pre-collect-color-active",p(r)})),i.addEventListener("blur",(function(t){i.className="yj-pre-collect-color"})),T.appendChild(i);var c=document.createElement("div");c.className="yj-pre-define-color-item subtract-btn",c.innerHTML='<svg class="icon-cross"><use xlink:href="#yj-icon-cross"></use></svg>',c.style.display="none",i.appendChild(c),j.push(c);var u=Cesium.createGuid();M[u]=r,localStorage.setItem("custom-color",JSON.stringify(M)),c.addEventListener("click",(function(){delete M[u],localStorage.setItem("custom-color",JSON.stringify(M)),T.removeChild(i)}))})),B.addEventListener("click",(function(){if(t=!t){L.style.display="none",A.style.display="unset";for(var e=0;e<j.length;e++)j[e].style.display="block"}else{L.style.display="unset",A.style.display="none";for(var i=0;i<j.length;i++)j[i].style.display="none"}}))}v=c.offsetHeight,"none"===c.style.display&&(c.style.display="block",v=c.offsetHeight,c.style.display="none"),m+e.offsetHeight+4+v>window.innerHeight?c.style.top=m-v+"px":c.style.top=m+e.offsetHeight+4+"px",l.colorPicker.pancelTop=parseFloat(c.style.top)-2,f(Cesium.Color.fromCssColorString(l.colorPicker.config.defaultColor||"#ffffff").toCssHexString())}}function p(t){if(a){var e=Cesium.Color.fromCssColorString(t);a.value=parseInt(100*e.alpha)/100}}function h(t){var e,i,n,o=t.a,s=Math.round(t.h),a=Math.round(255*t.s/100),r=Math.round(255*t.b/100);if(0===a)e=i=n=r;else{var l=(255-a)*r/255,c=s%60*(r-l)/60;360===s?(e=r,i=n=0):s<60?(e=r,i=l+c,n=l):s<120?(e=r-c,i=r,n=l):s<180?(e=l,i=r,n=l+c):s<240?(e=l,i=r-c,n=r):s<300?(e=l+c,i=l,n=r):s<360?(e=r,i=l,n=r-c):e=i=n=0}return"rgba("+Math.round(e)+","+Math.round(i)+","+Math.round(n)+","+o+")"}function d(t){var e={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"};if(/rgba?/.test(t)){var i=t.replace(/rgba?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n="";return i[3],i.map((function(t,i){i<=2&&(n+=function(t){t=Math.min(Math.round(t),255);var i=Math.floor(t/16),n=t%16;return""+(e[i]||i)+(e[n]||n)}(t))})),"#"+n}}function m(t,e){var i=t.toLowerCase(),n=t.length,o=[];i=Cesium.Color.fromCssColorString(i).toCssHexString().substring(0,7);if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(i)){if(4===n){for(var s="#",a=1;a<n;a++){var r=i.slice(a,a+1);s+=r.concat(r)}i=s}for(var l=1,c=i.length;l<c;l+=2)o.push(parseInt("0X"+i.slice(l,l+2),16));return o}}function f(t){if(l.colorPicker&&l.colorPicker.pickerInput){var e=m(t||l.colorPicker.pickerInput.value);n.value=e[0],o.value=e[1],s.value=e[2]}}this.el=i.el,i.sure&&(c.sure=function(t){var n=Cesium.Color.fromCssColorString(t);a&&(n=n.withAlpha(a.value),e.pickAlphaInputValue=a.value),t=n.toCssHexString(),"function"==typeof i.sure&&i.sure(t),u()}),i.clear&&(c.clear=function(){a&&(a.value=e.pickAlphaInputValue=1),e.colorPicker.config.defaultColor="",u(),"function"==typeof i.clear&&i.clear()}),c.defaultColor&&(r=Cesium.Color.fromCssColorString(c.defaultColor)),c.predefineColor=["rgba(255, 255, 255, 1)","rgba(255, 0, 0, 1)","rgba(208, 132, 209, 1)","rgba(100, 182, 217, 1)","rgba(42, 130, 228, 1)","rgba(214, 36, 36, 1)","rgba(252, 222, 111, 1)","rgba(67, 207, 124, 1)","rgba(176, 243, 143, 1)","rgba(121, 72, 234, 1)","rgba(255, 195, 0, 1)","rgba(0, 186, 173, 1)","rgba(165, 214, 63, 1)","rgba(0, 0, 0, 1)","rgba(46, 47, 51, 1)","rgba(172, 51, 193, 1)","rgba(130, 21, 21, 1)","rgba(255, 87, 51, 1)","rgba(255, 140, 0, 1)","rgba(125, 191, 255, 1)"],this.colorPicker=new ewPlugins("colorpicker",c),u()}));window.YJColorPicker=Oi;var Ti=Oi;function Ni(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Bi(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Bi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Bi(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Li(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ai(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Li(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Li(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ji(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Ii(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Fi=new WeakMap,Ri=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,t),ji(this,Fi,void 0),this.div_id=e,this.entityMap=new Map,this._entityZIndex=0,this.viewer=null,this.options=Ai({},i),ei(ti()),this.proj=new F,this.init(),Pi()}),[{key:"addIncetance",value:function(t,e){this.entityMap.set(t,e)}},{key:"getIncetance",value:function(t){return this.entityMap.get(t)}},{key:"removeIncetance",value:function(t){this.entityMap.delete(t),function(t){at.delete(t)}(t),function(t){rt.delete(t)}(t),function(t){lt.delete(t)}(t),re(this,t)}},{key:"setDefaultView",value:function(t){t?(this.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE={destination:t.destination||{},orientation:t.orientation||{}},Je(this),qe(this),this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(t.destination.lng,t.destination.lat,t.destination.alt),orientation:{heading:Cesium.Math.toRadians(t.orientation.heading||0),pitch:Cesium.Math.toRadians(t.orientation.pitch||0),roll:Cesium.Math.toRadians(t.orientation.roll||0)},duration:0})):(this.viewer.CAMERA_DEFAULT_VIEW_RECTANGLE=void 0,Cesium.Camera.DEFAULT_VIEW_RECTANGLE=Cesium.Rectangle.fromDegrees(89.5,10.4,110.4,61.2),this.viewer.camera.setView({destination:Cesium.Camera.DEFAULT_VIEW_RECTANGLE}))}},{key:"init",value:function(){var t=this,e=new Cesium.Ellipsoid(6378137,6378137,6356752.314140356),i=new Cesium.GeographicProjection(e),n=this;this.options={imageryProvider:new Cesium.TileMapServiceImageryProvider({url:Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII")}),baseLayerPicker:!1,geocoder:!1,animation:!1,fullscreenButton:!1,navigationHelpButton:!1,homeButton:!1,infoBox:!1,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,shouldAnimate:!0,mapProjection:i},Number(Cesium.VERSION.split(".")[1])>=107?this.options.baseLayer=Cesium.ImageryLayer.fromProviderAsync(Cesium.TileMapServiceImageryProvider.fromUrl(Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"))):this.options.imageryProvider=new Cesium.TileMapServiceImageryProvider({url:Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII")}),this.options.contextOptions={webgl:{alpha:!0,depth:!0,stencil:!0,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!0,failIfMajorPerformanceCaveat:!0},requestWebgl2:!0},Cesium.RequestScheduler.maximumRequests=500,this.viewer=new Cesium.Viewer(this.div_id,this.options),this.viewer.scene.imageryLayers._layers[0].notes="default-base-map",this.viewer._shadows=this.viewer.shadows,this.viewer.scene.screenSpaceCameraController.maximumZoomDistance=5e7,this.viewer.scene.globe.translucency.enabled=!0;var o=new ai;this.viewer.scene.skyBox=new Cesium.SkyBox({sources:{negativeX:o.getSourceRootPath()+"/img/skyBox/2/tycho2t3_80_mx.jpg",negativeY:o.getSourceRootPath()+"/img/skyBox/2/tycho2t3_80_my.jpg",negativeZ:o.getSourceRootPath()+"/img/skyBox/2/tycho2t3_80_mz.jpg",positiveX:o.getSourceRootPath()+"/img/skyBox/2/tycho2t3_80_px.jpg",positiveY:o.getSourceRootPath()+"/img/skyBox/2/tycho2t3_80_py.jpg",positiveZ:o.getSourceRootPath()+"/img/skyBox/2/tycho2t3_80_pz.jpg"}}),ui();for(var s=[{name:"思源黑体",value:"SourceHanSansTi",url:o.getSourceRootPath()+"/custom/fonts/SourceHanSansCN-Medium.otf",format:"opentype"},{name:"庞门正道标题体",value:"PMZDBTTi",url:o.getSourceRootPath()+"/custom/fonts/PangMenZhengDaoBiaoTiTi-1.ttf",format:"truetype"},{name:"数黑体",value:"AlimamaShuHeiTi",url:o.getSourceRootPath()+"/custom/fonts/AlimamaShuHeiTi-Bold.ttf",format:"truetype"}],a=0;a<s.length;a++){var r=new FontFace(s[a].value,"url('".concat(s[a].url,"') format('").concat(s[a].format,"')"));r.load(),document.fonts.add(r)}document.fonts.ready.then((function(){var e,i=Ni(t.entityMap);try{for(i.s();!(e=i.n()).done;){var n=y()(e.value,2),o=(n[0],n[1]);"labelFontFamily"in o&&(o.labelFontFamily=o.labelFontFamily)}}catch(t){i.e(t)}finally{i.f()}})),this.setDefaultView(),Cesium.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhZmM5ODNkYy0yMTIzLTQxNzktOTE1Yy1mN2QxNmFkMjgyMTUiLCJpZCI6Mjk0NzIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1OTIyMjkxMTJ9.9oYggi4kZgcapD2BkEGF8kG8tTuVkF33FdwxB2JKXeA",this.viewer.scene.globe.depthTestAgainstTerrain=!0,this.viewer.scene.screenSpaceCameraController.zoomEventTypes=[Cesium.CameraEventType.WHEEL,Cesium.CameraEventType.PINCH],this.viewer.scene.screenSpaceCameraController.tiltEventTypes=[Cesium.CameraEventType.PINCH,Cesium.CameraEventType.RIGHT_DRAG],this.viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),Cesium.FeatureDetection.supportsImageRenderingPixelated()&&(this.viewer.resolutionScale=window.devicePixelRatio),this.viewer.scene.fxaa=!0,this.viewer.scene.postProcessStages.fxaa.enabled=!0,this.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!0,function(t){var e=new ai,i=new Cesium.CustomDataSource("sdk-dataSource1");t.dataSources.add(i).then((function(t){var i;t.clustering.enabled=!1,t.clustering.pixelRange=15,t.clustering.minimumClusterSize=2;for(var n=new Cesium.PinBuilder,o=(n.fromText("50+",Cesium.Color.RED,48).toDataURL(),n.fromText("40+",Cesium.Color.ORANGE,48).toDataURL(),n.fromText("30+",Cesium.Color.YELLOW,48).toDataURL(),n.fromText("20+",Cesium.Color.GREEN,48).toDataURL(),n.fromText("10+",Cesium.Color.BLUE,48).toDataURL(),new Array(8)),s=0;s<o.length;++s)o[s]=n.fromText(""+(s+2),Cesium.Color.VIOLET,48).toDataURL();!function(){Cesium.defined(i)?(i(),i=void 0):i=t.clustering.clusterEvent.addEventListener((function(t,i){i.billboard.show=!0,i.billboard.id=i.label.id,i.billboard.verticalOrigin=Cesium.VerticalOrigin.BOTTOM,i.billboard.image=e.getSourceRootPath()+"/img/cluster.png",i.billboard.disableDepthTestDistance=Ye()?void 0:Number.POSITIVE_INFINITY,i.label.verticalOrigin=Cesium.VerticalOrigin.CENTER,i.label.font="18px Arial,sans-serif",i.label.disableDepthTestDistance=Ye()?void 0:Number.POSITIVE_INFINITY,i.label.style=Cesium.LabelStyle.FILL,i.label.showBackground=!0,i.label.backgroundColor=Cesium.Color.WHITE.withAlpha(0),t.length>=1e3?(i.billboard.scale=1.5,i.label.pixelOffset=new Cesium.Cartesian2(-28,-46)):t.length>=100?(i.billboard.scale=1.25,i.label.pixelOffset=new Cesium.Cartesian2(-21,-40)):t.length>=50?(i.billboard.scale=1.1,i.label.pixelOffset=new Cesium.Cartesian2(-16,-36)):t.length>=40?(i.billboard.scale=1.05,i.label.pixelOffset=new Cesium.Cartesian2(-16,-34)):t.length>=30?(i.billboard.scale=1,i.label.pixelOffset=new Cesium.Cartesian2(-16,-32)):t.length>=20?(i.billboard.scale=.95,i.label.pixelOffset=new Cesium.Cartesian2(-16,-30)):t.length>=10?(i.billboard.scale=.9,i.label.pixelOffset=new Cesium.Cartesian2(-16,-28)):(i.billboard.scale=.8,i.label.pixelOffset=new Cesium.Cartesian2(-11,-25))}));var n=t.clustering.pixelRange;t.clustering.pixelRange=0,t.clustering.pixelRange=n}();var a={pixelRange:15,minimumClusterSize:2};function r(e){Cesium.knockout.getObservable(a,e).subscribe((function(i){t.clustering[e]=i}))}Cesium.knockout.track(a),r("pixelRange"),r("minimumClusterSize")}))}(this.viewer),E(this.viewer);Cesium.viewerCesiumNavigationMixin(this.viewer,{resetTooltip:"重置视图",zoomInTitle:"缩小",zoomOutTitle:"放大"});setTimeout((function(){var e=document.getElementsByClassName("compass-outer-ring")[0],i=document.getElementsByClassName("navigation-controls")[0];e.addEventListener("mousedown",(function(){Je(t),qe(t)})),i.addEventListener("mousedown",(function(){Je(t),qe(t)}))}),0),this.viewer.imageryLayers.layerAdded.addEventListener((function(){for(var e=0;e<t.viewer.imageryLayers._layers.length;e++)t.viewer.imageryLayers._layers[e]._imageryProvider&&t.viewer.imageryLayers._layers[e]._imageryProvider._type&&("flw"===t.viewer.imageryLayers._layers[e]._imageryProvider._type||"jww"===t.viewer.imageryLayers._layers[e]._imageryProvider._type)&&t.viewer.imageryLayers.raiseToTop(t.viewer.imageryLayers._layers[e])})),function t(){(function(t,e,i){t.set(Ii(t,e),i)})(Fi,n,requestAnimationFrame(t)),e=1,n.viewer&&2===n.viewer.scene.mode&&(e=10),n.viewer.shadows?n.viewer.scene.light=new Cesium.SunLight:n.viewer.trackedEntity&&n.viewer.trackedEntity.position?(e=1,n.viewer.scene.light=new Cesium.DirectionalLight({direction:Cesium.Cartesian3.negate(n.viewer.trackedEntity.position._value,new Cesium.Cartesian3(-1,-1,-1)),intensity:e})):(e=n.viewer&&2===n.viewer.scene.mode?30:1,n.viewer.scene.light=new Cesium.DirectionalLight({direction:Cesium.Cartesian3.negate(n.viewer.scene.camera.position,new Cesium.Cartesian3(-1,-1,-1)),intensity:e})),TWEEN.update();var e}(),n.viewer.entities.add(new Cesium.Entity({name:"solve-bug",position:{x:0,y:0,z:0},billboard:{scale:0,image:o.getSourceRootPath()+"/img/point.png",color:Cesium.Color.WHITE.withAlpha(0)}})),n.viewer.entities.add(new Cesium.Entity({name:"solve-bug",position:{x:0,y:0,z:1e8},billboard:{scale:0,image:o.getSourceRootPath()+"/img/point.png",color:Cesium.Color.WHITE.withAlpha(0)}}))}},{key:"destroy",value:function(){var t,e;cancelAnimationFrame((e=this,(t=Fi).get(Ii(t,e))));var i,n=Ni(this.entityMap);try{for(n.s();!(i=n.n()).done;){var o=y()(i.value,2);o[0];o[1].remove()}}catch(t){n.e(t)}finally{n.f()}this.viewer&&(this.viewer.entities&&this.viewer.entities.removeAll(),this.viewer.destroy&&this.viewer.destroy()),this.viewer=null}}])}();function zi(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Hi(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?zi(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):zi(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Vi=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,t),this.sdk=e,this.primitives={building:[],unit:[],dth:[]},this.options=Hi({},i),this.options.host=this.options.host||h(),this.temporaryDth=[],this.dth={},this.PickBuildingEvent=new Cesium.Event,this.initEvents(),this.activeBuilding}),[{key:"PickCallback",value:function(t,e){this.PickBuildingEvent.addEventListener(e,t)}},{key:"initEvents",value:function(){var t=this;new Cesium.ScreenSpaceEventHandler(this.sdk.viewer.scene.canvas).setInputAction((function(e){if(!YJ.Measure.GetMeasureStatus()&&t.isActivate){var i=t.sdk.viewer.scene.pick(e.position);if(i){if(i.primitive&&i.primitive instanceof Cesium.ClassificationPrimitive&&i.id&&("yj-dth-dth"==i.id.type||"yj-dth-highlight"==i.id.type))return void t.getIDBypickFeature(i);if(i.primitive&&i.primitive instanceof Cesium.ClassificationPrimitive&&i.id&&"yj-dth-unit"==i.id.type)return t.highlightPrimitive&&t.sdk.viewer.scene.primitives.remove(t.highlightPrimitive),void t.handlePickEvent(i.id)}t.highlightPrimitive&&t.sdk.viewer.scene.primitives.remove(t.highlightPrimitive);var n=t.sdk.viewer.scene.pickPosition(e.position);if(n){var o=Cesium.Cartographic.fromCartesian(n),s=[Cesium.Math.toDegrees(o.longitude),Cesium.Math.toDegrees(o.latitude)];t.queryByPoint(s,o.height)}}}),Cesium.ScreenSpaceEventType.LEFT_CLICK);var e=this.sdk.viewer.entities.getOrCreateEntity("yj-dth-cover-label");e.show=!1;var i,n=0,o=this;function s(t){var i=o.sdk.viewer.scene.pick(t.endPosition);if(i){var n="";if(i.primitive&&i.primitive instanceof Cesium.ClassificationPrimitive&&i.id&&("yj-dth-dth"===i.id.type||"yj-dth-highlight"===i.id.type))n=i.id.build_info.name+" - "+i.id.unit_info.name+" - "+i.id.room_num;else if(i.primitive&&i.primitive instanceof Cesium.ClassificationPrimitive&&i.id&&"yj-dth-unit"===i.id.type)i.id.build_info.name&&(n=i.id.build_info.name+" - "+i.id.name);else{if(!(i.primitive&&i.primitive instanceof Cesium.ClassificationPrimitive&&i.id&&"yj-dth-build"===i.id.type))return i.primitive&&i.primitive.id&&i.primitive.id.id&&"yj-dth-cover-label"===i.primitive.id.id?void(e.position=o.sdk.viewer.scene.pickPosition(t.endPosition)):void(e.show=!1);i.id.name&&(n=i.id.name)}n&&(e.position=o.sdk.viewer.scene.pickPosition(t.endPosition),e.label=new Cesium.LabelGraphics({text:n,font:"20px Helvetica",pixelOffset:{x:0,y:-30},fillColor:Cesium.Color.fromCssColorString("#ffffff"),outlineColor:Cesium.Color.BLACK,outlineWidth:1,showBackground:!0,backgroundColor:Cesium.Color.fromCssColorString("#000000").withAlpha(.8),style:Cesium.LabelStyle.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY}),e.show=!0)}}new Cesium.ScreenSpaceEventHandler(this.sdk.viewer.scene.canvas).setInputAction((function(t){if(!YJ.Measure.GetMeasureStatus())try{var e=Date.now();if(e-n<100)return clearTimeout(i),void(i=setTimeout((function(){s(t)}),100));clearTimeout(i),n=e,s(t)}catch(t){}}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)}},{key:"queryByUserInfo",value:function(t){this.queryByPoint([t.position.lng,t.position.lat],t.position.alt,t.id)}},{key:"queryByPoint",value:(s=o()(a.a.mark((function t(e){var i,n,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="",i=this.options.host.endsWith("yjearth4.0")?this.options.host+"/api/v1/dth/build/query_by_point":this.options.host+"/yjearth4.0/api/v1/dth/build/query_by_point",i+="?point="+JSON.stringify({lng:e[0],lat:e[1]}),t.next=5,fetch(i,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}});case 5:if(200!==(n=t.sent).status){t.next=11;break}return t.next=9,n.json();case 9:200===(o=t.sent).code||0===o.code?this.processQueryByPointResults(o.data):window.ELEMENT&&window.ELEMENT.Message({message:o.msg||o.message,type:"warning",duration:1500});case 11:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"processQueryByPointResults",value:(n=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=p.length>2&&void 0!==p[2]?p[2]:{heading:0,pitch:-90,roll:0},e.build_info&&this.handlePickEvent(e),this.clearAllDthPrimitive(),this.clearAllUnitPrimitive(),this.activeBuilding&&(this.clearBuildingPrimitive(this.activeBuilding),this.activeBuilding=null),!e.build_info){t.next=26;break}if(o=JSON.parse(e.build_info.range),e.dan_yuan.length>0)for(s=0;s<e.dan_yuan.length;s++)e.dan_yuan[s].children.length>0?this.addDthPrimitive(e.dan_yuan[s].children,e.build_info,e.dan_yuan[s]):this.addUnitPrimitive([e.dan_yuan[s]],e.build_info,e.dan_yuan[s]);else this.activeBuilding=e.build_info.ID||e.build_info.id,this.addBuildingPrimitive([e.build_info]);if(!i){t.next=26;break}if(e.info&&e.info.dan_yuan&&(o=JSON.parse(e.info.dan_yuan.range)),!e.info||!e.info.hu){t.next=25;break}for(o=JSON.parse(e.info.hu.range),r=0;r<o.length;r++)o[r].alt=e.info.hu.bottom;l=0;case 14:if(!(l<this.primitives.dth.length)){t.next=25;break}return t.next=17,this.primitives.dth[l].readyPromise;case 17:if((c=this.primitives.dth[l]._primitiveOptions.geometryInstances[0].id).ID!==e.info.hu.ID||c.room_num!==e.info.hu.room_num){t.next=22;break}return u={id:Hi(Hi({},e.info.hu),{},{build_info:Hi({},e.build_info),unit_info:e.info.dan_yuan}),primitive:this.primitives.dth[l]},this.getIDBypickFeature(u),t.abrupt("break",25);case 22:l++,t.next=14;break;case 25:this.flyTo(o,n);case 26:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"addBuildingPrimitive",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i=0;i<e.length;i++){for(n=[],o=0,s=JSON.parse(e[i].range),r=0;r<s.length;r++)o<s[r].alt&&(o=s[r].alt),n.push(s[r].lng,s[r].lat,0);l=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(n)),extrudedHeight:1e8}),this.primitives.building.push(this.sdk.viewer.scene.primitives.add(new Cesium.ClassificationPrimitive({geometryInstances:new Cesium.GeometryInstance({id:Hi({type:"yj-dth-build"},e[i]),geometry:Cesium.PolygonGeometry.createGeometry(l),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString("rgb(255, 235, 59, 0.4)")),show:new Cesium.ShowGeometryInstanceAttribute(!0)}}),classificationType:Cesium.ClassificationType.CESIUM_3D_TILE})))}case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"clearBuildingPrimitive",value:function(t){for(var e=this.primitives.building.length-1;e>=0;e--)if(t===this.primitives.building[e]._primitiveOptions.geometryInstances[0].id.ID||t===this.primitives.building[e]._primitiveOptions.geometryInstances[0].id.id){this.sdk.viewer.scene.primitives.remove(this.primitives.building[e]),this.primitives.building.splice(e,1);break}}},{key:"clearAllBuildingPrimitive",value:function(){for(var t=this.primitives.building.length-1;t>=0;t--)this.sdk.viewer.scene.primitives.remove(this.primitives.building[t]);this.primitives.building=[]}},{key:"addUnitPrimitive",value:(e=o()(a.a.mark((function t(e,i,n){var o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o=0;o<e.length;o++){for(s=[],r=0,l=JSON.parse(e[o].range),c=0;c<l.length;c++)r<l[c].alt&&(r=l[c].alt),s.push(l[c].lng,l[c].lat,0);u=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(s)),extrudedHeight:1e8}),this.primitives.unit.push(this.sdk.viewer.scene.primitives.add(new Cesium.ClassificationPrimitive({geometryInstances:new Cesium.GeometryInstance({id:Hi(Hi({type:"yj-dth-unit"},e[o]),{},{build_info:Hi({},i),unit_info:Hi({},n)}),geometry:Cesium.PolygonGeometry.createGeometry(u),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString("rgb(255, 235, 59, 0.4)")),show:new Cesium.ShowGeometryInstanceAttribute(!0)}}),classificationType:Cesium.ClassificationType.CESIUM_3D_TILE}))),this.primitives.unit.push(this.sdk.viewer.scene.primitives.add(new Cesium.GroundPolylinePrimitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.GroundPolylineGeometry({positions:Cesium.Cartesian3.fromDegreesArrayHeights(s),width:2}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString("#00ff0a").withAlpha(.8))}}),appearance:new Cesium.PolylineColorAppearance})))}case 1:case"end":return t.stop()}}),t,this)}))),function(t,i,n){return e.apply(this,arguments)})},{key:"clearUnitPrimitive",value:function(t){for(var e=this.primitives.building.length-1;e>=0;e--)if(t===this.primitives.building[e]._primitiveOptions.geometryInstances[0].id.ID||t===this.primitives.building[e]._primitiveOptions.geometryInstances[0].id.id){this.sdk.viewer.scene.primitives.remove(this.primitives.unit[e]),this.primitives.unit.splice(e,1);break}}},{key:"clearAllUnitPrimitive",value:function(){for(var t=this.primitives.unit.length-1;t>=0;t--)this.sdk.viewer.scene.primitives.remove(this.primitives.unit[t]);this.primitives.unit=[]}},{key:"addDthPrimitive",value:function(t,e,i){for(var n=0;n<t.length;n++){for(var o=JSON.parse(t[n].range),s=[],a=0;a<o.length;a++)s.push(o[a].lng,o[a].lat,t[n].bottom+.3);var r=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,extrudedHeight:t[n].height+t[n].bottom}),l=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,extrudedHeight:t[n].bottom});this.primitives.dth.push(this.sdk.viewer.scene.primitives.add(new Cesium.ClassificationPrimitive({geometryInstances:new Cesium.GeometryInstance({id:Hi(Hi({type:"yj-dth-dth"},t[n]),{},{build_info:Hi({},e),unit_info:Hi({},i)}),geometry:Cesium.PolygonGeometry.createGeometry(r),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString("rgb(0, 64, 255, 0.4)")),show:new Cesium.ShowGeometryInstanceAttribute(!0)}}),classificationType:Cesium.ClassificationType.CESIUM_3D_TILE}))),this.primitives.dth.push(this.sdk.viewer.scene.primitives.add(new Cesium.ClassificationPrimitive({geometryInstances:new Cesium.GeometryInstance({id:Hi({type:"yj-dth-dth-border"},t[n]),geometry:Cesium.PolygonGeometry.createGeometry(l),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString("rgb(0, 0, 0, 1)")),show:new Cesium.ShowGeometryInstanceAttribute(!0)}}),classificationType:Cesium.ClassificationType.CESIUM_3D_TILE})))}}},{key:"clearDthPrimitive",value:function(t){for(var e=this.primitives.dth.length-1;e>=0;e--)t!==this.primitives.dth[e]._primitiveOptions.geometryInstances[0].id.ID&&t!==this.primitives.dth[e]._primitiveOptions.geometryInstances[0].id.id||(this.sdk.viewer.scene.primitives.remove(this.primitives.dth[e]),this.primitives.dth.splice(e,1))}},{key:"clearAllDthPrimitive",value:function(){this.highlightPrimitive&&this.sdk.viewer.scene.primitives.remove(this.highlightPrimitive);for(var t=this.primitives.dth.length-1;t>=0;t--)this.sdk.viewer.scene.primitives.remove(this.primitives.dth[t]);this.primitives.dth=[]}},{key:"getIDBypickFeature",value:function(t){this.clickHighlightPrimitive&&(this.clickHighlightPrimitive.show=!0),this.highlightPrimitive&&this.sdk.viewer.scene.primitives.remove(this.highlightPrimitive),this.highlightPrimitive=this.sdk.viewer.scene.primitives.add(new Cesium.ClassificationPrimitive({geometryInstances:new Cesium.GeometryInstance({id:Hi(Hi({},t.id),{},{type:"yj-dth-highlight"}),geometry:t.primitive._primitiveOptions.geometryInstances[0].geometry,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString("#ff9800").withAlpha(.8)),show:new Cesium.ShowGeometryInstanceAttribute(!0)}}),classificationType:Cesium.ClassificationType.CESIUM_3D_TILE})),this.highlightPrimitive.readyPromise.then((function(){t.primitive.show=!1})),this.clickHighlightPrimitive=t.primitive;var e=t.id.range;"string"==typeof t.id.range&&(e=JSON.parse(t.id.range)),this.getHilightArea(e),this.handlePickEvent(t.id)}},{key:"handlePickEvent",value:function(t){this.PickBuildingEvent.raiseEvent(t)}},{key:"getHilightArea",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=[];t.forEach((function(t){i.push([t.lng,t.lat])})),i.push(i[0]);var n=turf.polygon([i]),o=turf.buffer(n,Number(e)/1e3);return o.geometry.coordinates}},{key:"flyTo",value:(t=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=u.length>1&&void 0!==u[1]?u[1]:{heading:0,pitch:-90,roll:0},n=new YJ.Tools(this.sdk),o=0,s=[],r=0;case 5:if(!(r<e.length)){t.next=18;break}if(!e[r].alt){t.next=10;break}o=e[r].alt,t.next=13;break;case 10:return t.next=12,n.getClampToHeight(e[r]);case 12:o=t.sent;case 13:l=Cesium.Cartesian3.fromDegrees(e[r].lng,e[r].lat,o),s.push(l.x,l.y,l.z);case 15:r++,t.next=5;break;case 18:return t.next=20,Cesium.BoundingSphere.fromVertices(s);case 20:c=t.sent,this.sdk.viewer.camera.flyToBoundingSphere(c,{offset:{heading:Cesium.Math.toRadians(i.heading||0),pitch:Cesium.Math.toRadians(i.pitch||0===i.pitch?i.pitch:-90),roll:Cesium.Math.toRadians(i.roll||0)}});case 22:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"activate",value:function(){this.isActivate=!0}},{key:"deactivate",value:function(){this.isActivate=!1}}]);var t,e,i,n,s}(),Gi=function(){return _()((function t(){k()(this,t),this.start()}),[{key:"start",value:function(){var t=this;navigator.mediaDevices.getDisplayMedia({video:!0}).then((function(e){t.mediaRecorder=new MediaRecorder(e,{mimeType:"video/webm"});var i=[];t.mediaRecorder.addEventListener("dataavailable",(function(t){i.push(t.data)})),t.mediaRecorder.addEventListener("stop",o()(a.a.mark((function t(){var e,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=new Blob(i,{type:"video/mp4"}),n={suggestedName:"视频录制.mp4",types:[{description:"文件类型",accept:{"video/mp4":[".mp4"]}}],excludeAcceptAllOption:!0},t.next=5,window.showSaveFilePicker(n);case 5:return o=t.sent,t.next=8,o.createWritable();case 8:return(s=t.sent).write(e),t.next=12,s.close();case 12:YJ.Global.ScreenRecord.screenRecord=null,t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.info("文件保存失败:",t.t0);case 18:case"end":return t.stop()}}),t,null,[[0,15]])})))),t.mediaRecorder.start()})).catch((function(t){console.info("取消录屏"),console.info(t),YJ.Global.ScreenRecord.screenRecord=null}))}}])}();var Ui=i(8),Wi=i.n(Ui),Yi=i(5),Ji=i.n(Yi),qi=i(4),Xi=i.n(qi);function Zi(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Ki=function(t){function e(t,i,n,o){var s;return k()(this,e),(s=Zi(this,e,[t.viewer._container,n,o])).sdk=t,s.viewer=t.viewer,s.info=i,s._init(),s}return Xi()(e,t),_()(e,[{key:"_init",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.init();case 2:return t.next=4,this._attribute();case 4:if(this.options.confirmCallBack&&((e=document.createElement("button")).className="confirm",e.innerHTML="确认",this.footAppChild(e),e.addEventListener("click",(function(){p.options.confirmCallBack&&p.options.confirmCallBack(p.info)}))),this.options.removeCallBack&&((i=document.createElement("button")).className="delete",i.innerHTML="删除",this.footAppChild(i),i.addEventListener("click",(function(){p.close(),p.options.removeCallBack&&p.options.removeCallBack()}))),this.options.rotateCallBack&&((n=document.createElement("button")).className="rotate",n.innerHTML="旋转",this.footAppChild(n),n.addEventListener("click",(function(){p.options.rotateCallBack&&p.options.rotateCallBack()}))),(this.options.translationalCallBack||this.options.updateHeightCallBack||this.options.secondaryEditCallBack)&&((o=document.createElement("div")).style.position="absolute",o.style.left="24px",o.style.flet="0",o.style.display="flex",this.footAppChild(o),this.options.updateHeightCallBack&&((s=document.createElement("button")).innerHTML='<svg class="icon-updateheigh"><use xlink:href="#yj-icon-updateheight"></use></svg>更新高程',s.style.width="auto",s.addEventListener("click",(function(){p.options.updateHeightCallBack()})),o.appendChild(s)),this.options.secondaryEditCallBack&&((r=document.createElement("button")).className="secondaryEdit",r.innerHTML='<svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>二次编辑',this.options.updateHeightCallBack&&(r.style.marginLeft="10px"),o.appendChild(r),r.addEventListener("click",(function(){p.options.secondaryEditCallBack&&p.options.secondaryEditCallBack()}))),this.options.translationalCallBack&&((l=document.createElement("button")).className="translational",l.innerHTML='<svg class="icon-py"><use xlink:href="#yj-icon-py"></use></svg>平移',(this.options.updateHeightCallBack||this.options.secondaryEditCallBack)&&(l.style.marginLeft="10px"),o.appendChild(l),l.addEventListener("click",(function(){p.options.translationalCallBack&&p.options.translationalCallBack()})))),this.options.addFootElm)for(c=0;c<this.options.addFootElm.length;c++)(u=document.createElement(this.options.addFootElm[c].tagName)).className=this.options.addFootElm[c].className,u.innerHTML=this.options.addFootElm[c].innerHTML,this.options.addFootElm[c].event&&2==this.options.addFootElm[c].event.length&&u.addEventListener(this.options.addFootElm[c].event[0],this.options.addFootElm[c].event[1]),this.footAppChild(u);case 9:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_attribute",value:function(){var t=this._element.content.getElementsByClassName("attribute")[0];if(t&&0!==t.length)for(var e=t.getElementsByClassName("attribute-select")[0].getElementsByTagName("option"),i=e.length-1;i>=0;i--)for(var n in this.info.attribute)if(e[i].value===n){this.info.attribute[n].disabled&&(e[i].disabled=!0);break}}}]);var i}(W);function $i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Qi(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?$i(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$i(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var tn=new ai;function en(){return(en=o()(a.a.mark((function t(e,i,n,s){var r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D,M,P,O,T,N,B,L,A,j,I,F,R,z,H,V,G,U,W,J,q,X,Z,K,$,Q,tt,et,it,nt,ot,st,at,rt,lt,ct,ut,pt,ht,dt,mt,ft,vt,gt,yt;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return yt=function(){var t,e=document.createElement("canvas"),i=e.getContext("2d"),o=new Image;o.src=s,o.onload=function(){if(!h){var s=Qi({},v),a=JSON.parse(JSON.stringify(y)),l=Qi({},b),c=Qi({},g);c.width=g.width/L.width*o.width;var u=m/L.width*o.width,p=u;if(c.show&&d&&d.complete&&(p+=c.width),e.width=o.width+2*p,e.height=o.height+2*p,i.clearRect(0,0,e.width,e.height),i.rect(0,0,e.width,e.height),i.fillStyle="#ffffff",i.fill(),i.drawImage(o,p,p,o.width,o.height),s.show){var f=s.text,C=Math.max(5,s.height*o.height*.5);i.font="".concat(C,"px serif"),i.fillStyle=s.bgColor||"#5d5d5d",i.fillRect(p,p,e.width-2*p,s.height*o.height),i.fillStyle=s.color||"white",i.textAlign="center",i.textBaseline="middle",i.fillText(f,e.width/2,s.height*o.height/2+p)}for(var w=function(t){if(a[t].show)if("text"in a[t])i.font="".concat(o.height*a[t].height,"px serif"),i.fillStyle=a[t].color||"white",i.textAlign="left",i.textBaseline="bottom",a[t].width=i.measureText(a[t].text).width/o.height,i.fillText(a[t].text,o.width*a[t].x+p,o.height*a[t].y+p);else if("url"in a[t])if(y[t].svg&&y[t].svg.complete)i.drawImage(y[t].svg,o.width*a[t].x+p,o.height*a[t].y+p,o.height*a[t].width,o.height*a[t].height);else{var e=new Image;e.src=tn.getSourceRootPath()+a[t].url,e.onload=function(){a[t].svg=e,i.drawImage(e,o.width*a[t].x+p,o.height*a[t].y+p,o.height*a[t].width,o.height*a[t].height)}}},k=0;k<a.length;k++)w(k);if(l.show){!function(){if(!n)return;var e=Cesium.Math.toDegrees(n.west),i=Cesium.Math.toDegrees(n.east),s=Cesium.Math.toDegrees(n.north),a=(Cesium.Math.toDegrees(n.south),turf.point([e,s])),r=turf.point([i,s]),l=turf.distance(a,r,{units:"kilometers"});t=1e3*l/o.width}();var x=o.width*l.x+p,_=o.height*l.y+p,E="m",S=.08*o.width*.12,D=.08*o.width/l.cell,M=Math.round(t*D),P=M+"";if(M<10);else{M=Number(P[0]);for(var O=0;O<P.length-1;O++)M*=10;D=M/t}l.width=D*l.cell,l.height=.2*l.width,M>=1e3&&(E="㎞",M=Math.round(M/1e3));var T=_;i.beginPath(),i.moveTo(x,T),i.lineTo(x+l.width,T),i.strokeStyle=l.color,i.lineWidth=.01*l.width,i.stroke();for(var N=0,B=0;B<=l.cell;B++)N=x+B*D,i.beginPath(),i.moveTo(N,T-.1*l.width),i.lineTo(N,T),i.strokeStyle=l.color,i.lineWidth=.01*l.width,i.stroke(),i.font="".concat(S,"px Arial"),i.fillStyle=l.color,i.textAlign="center",i.textBaseline="bottom",i.fillText(B*M,N,T-.1*l.width);i.font="".concat(S,"px Arial"),i.fillStyle=l.color,i.textAlign="left",i.textBaseline="bottom",i.fillText(E,N+1.2*S,T-.1*l.width)}c.show&&d&&d.complete&&(A(i,d,u,u,c.width,"top",1),A(i,d,e.width-c.width-u,u,c.width,"right",1),A(i,d,e.width-c.width-u,e.height-c.width-u,c.width,"bottom",1),A(i,d,u,e.height-c.width-u,c.width,"left",1)),e.toBlob((function(t){var e=URL.createObjectURL(t),i=document.createElement("a");i.href=e,i.download="高清出图-".concat(gt(),".png"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}),"image/png",.95),r=!1,G.innerHTML="打印"}function A(t,i,n,o,s,a){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;switch(t.save(),t.translate(n+s/2,o+s/2),a){case"right":t.rotate(Math.PI/2);break;case"bottom":t.rotate(Math.PI);break;case"left":t.rotate(3*Math.PI/2)}t.beginPath(),t.moveTo(-s*r/2,-s/2),"top"===a||"bottom"===a?(t.lineTo(e.width-2*u-s/2,-s/2),t.lineTo(e.width-2*(u+s)+s/2,s/2)):(t.lineTo(e.height-2*u-s/2,-s/2),t.lineTo(e.height-2*(u+s)+s/2,s/2)),t.lineTo(s*r/2,s/2),t.closePath(),t.clip();var l,p=i.width/i.height*s;t.drawImage(i,-s/2,-s/2,p,s),l="top"===a||"bottom"===a?Math.ceil((e.width-2*u-2*c.width)/c.width):Math.ceil((e.height-2*u-2*c.width)/c.width),l++;for(var h=1;h<=l;h++)t.drawImage(i,-s/2+p*h,-s/2,p,s);t.restore()}}},gt=function(){var t=new Date,e=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0"),r=String(t.getMilliseconds()).padStart(3,"0");return"".concat(e).concat(i).concat(n).concat(o).concat(s).concat(a).concat(r)},vt=function(){if(n){var t=Cesium.Math.toDegrees(n.west),e=Cesium.Math.toDegrees(n.east),i=Cesium.Math.toDegrees(n.north),o=(Cesium.Math.toDegrees(n.south),turf.point([t,i])),s=turf.point([e,i]),a=turf.distance(o,s,{units:"kilometers"});p=1e3*a/L.width}},ft=function(t){var e=m;g.show&&d&&d.complete&&(e+=g.width);var i=.005*N.height;if(B.strokeStyle="red",B.lineWidth=.002*N.height,"text"in t)B.strokeRect(L.width*t.x+e,L.height*t.y+e-L.height*t.height,L.height*t.width,L.height*t.height);else if("url"in t)B.strokeRect(L.width*t.x+e,L.height*t.y+e,L.height*t.width,L.height*t.height);else if(t===b)return void B.strokeRect(L.width*t.x+e-.2*b.width,L.height*t.y+e-t.height-.5*b.height,t.width+.6*b.width,t.height+b.height);var n=ht(t,e);B.fillStyle="red",n.forEach((function(t){B.beginPath(),B.arc(t.x,t.y,i,0,2*Math.PI),B.fill()}))},mt=function(t,e,i,n,o,s){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;switch(t.save(),t.translate(i+o/2,n+o/2),s){case"right":t.rotate(Math.PI/2);break;case"bottom":t.rotate(Math.PI);break;case"left":t.rotate(3*Math.PI/2)}t.beginPath(),t.moveTo(-o*a/2,-o/2),"top"===s||"bottom"===s?(t.lineTo(N.width-2*m-o/2,-o/2),t.lineTo(N.width-2*(m+o)+o/2,o/2)):(t.lineTo(N.height-2*m-o/2,-o/2),t.lineTo(N.height-2*(m+o)+o/2,o/2)),t.lineTo(o*a/2,o/2),t.closePath(),t.clip();var r,l=e.width/e.height*o;t.drawImage(e,-o/2,-o/2,l,o),r="top"===s||"bottom"===s?Math.ceil((N.width-2*m-2*g.width)/g.width):Math.ceil((N.height-2*m-2*g.width)/g.width),r++;for(var c=1;c<=r;c++)t.drawImage(e,-o/2+l*c,-o/2,l,o);t.restore()},dt=function(){if(!h){var t=m;if(g.show&&d&&d.complete&&(t+=g.width),N.width=L.width+2*t,N.height=L.height+2*t,B.clearRect(0,0,N.width,N.height),B.rect(0,0,N.width,N.height),B.fillStyle="#ffffff",B.fill(),B.drawImage(L,t,t,L.width,L.height),v.show){var e=v.text,i=Math.max(5,v.height*L.height*.5);B.font="".concat(i,"px serif"),B.fillStyle=v.bgColor||"#5d5d5d",B.fillRect(t,t,N.width-2*t,v.height*L.height),B.fillStyle=v.color||"white",B.textAlign="center",B.textBaseline="middle",B.fillText(e,N.width/2,v.height*L.height/2+t)}for(var n=function(e){if(y[e].show)if("text"in y[e])B.font="".concat(L.height*y[e].height,"px serif"),B.fillStyle=y[e].color||"white",B.textAlign="left",B.textBaseline="bottom",y[e].width=B.measureText(y[e].text).width/L.height,B.fillText(y[e].text,L.width*y[e].x+t,L.height*y[e].y+t),y[e].isSelected&&ft(y[e]);else if("url"in y[e])if(y[e].svg&&y[e].svg.complete)B.drawImage(y[e].svg,L.width*y[e].x+t,L.height*y[e].y+t,L.height*y[e].width,L.height*y[e].height),y[e].isSelected&&ft(y[e]);else{var i=new Image;i.src=tn.getSourceRootPath()+y[e].url,i.onload=function(){y[e].svg=i,B.drawImage(i,L.width*y[e].x+t,L.height*y[e].y+t,L.height*y[e].width,L.height*y[e].height),y[e].isSelected&&ft(y[e])}}},o=0;o<y.length;o++)n(o);if(b.show){var s=m;g.show&&d&&d.complete&&(s+=g.width);var a=L.width*b.x+s,r=L.height*b.y+s,l="m",c=.08*L.width*.12,u=.08*L.width/b.cell,f=Math.round(p*u),C=f+"";if(f<10);else{f=Number(C[0]);for(var w=0;w<C.length-1;w++)f*=10;u=f/p}b.width=u*b.cell,b.height=.2*b.width,f>=1e3&&(l="㎞",f=Math.round(f/1e3));var k=r;B.beginPath(),B.moveTo(a,k),B.lineTo(a+b.width,k),B.strokeStyle=b.color,B.lineWidth=.01*b.width,B.stroke();for(var x=0,_=0;_<=b.cell;_++)x=a+_*u,B.beginPath(),B.moveTo(x,k-.1*b.width),B.lineTo(x,k),B.strokeStyle=b.color,B.lineWidth=.01*b.width,B.stroke(),B.font="".concat(c,"px Arial"),B.fillStyle=b.color,B.textAlign="center",B.textBaseline="bottom",B.fillText(_*f,x,k-.1*b.width);B.font="".concat(c,"px Arial"),B.fillStyle=b.color,B.textAlign="left",B.textBaseline="bottom",B.fillText(l,x+1.2*c,k-.1*b.width),b.isSelected&&ft(b)}g.show&&d&&d.complete&&(mt(B,d,m,m,g.width,"top",1),mt(B,d,N.width-g.width-m,m,g.width,"right",1),mt(B,d,N.width-g.width-m,N.height-g.width-m,g.width,"bottom",1),mt(B,d,m,N.height-g.width-m,g.width,"left",1))}},ht=function(t,e){var i=t.x*L.width+e,n=t.y*L.height+e,o=t.width*L.height,s=t.height*L.height;return"text"in t?[{x:i,y:n-s},{x:i+o,y:n-s},{x:i,y:n},{x:i+o,y:n}]:[{x:i,y:n},{x:i+o,y:n},{x:i,y:n+s},{x:i+o,y:n+s}]},pt=function(t){var e,i=N.getBoundingClientRect(),n=i.width,o=i.height,s=N.width,a=N.height,r=(n-s*(e=s/a>n/o?n/s:o/a))/2;return(t.clientX-i.left-r)/e},ut=function(t){var e,i=N.getBoundingClientRect(),n=i.width,o=i.height,s=N.width,a=N.height,r=(e=s/a>n/o?n/s:o/a,(o-a*e)/2);return(t.clientY-i.top-r)/e},q=function(t){var e,i;if(g.color=t||"#000000",new YJColorPicker({el:w.getElementsByClassName("border-color")[0],size:"mini",alpha:!1,defaultColor:g.color,disabled:!1,openPickerAni:"opacity",sure:function(t){q(t)},clear:function(){q("rgba(0,0,0,1)")}}),t){e=f.replace(/fill="[^"]+"/g,'fill="'.concat(t,'"'))}else e=f;i="data:image/svg+xml;base64,"+btoa(Array.from((new TextEncoder).encode(e),(function(t){return String.fromCharCode(t)})).join("")),(d=new Image).setAttribute("crossOrigin","anonymous"),d.src=i,d.onload=function(){g.show&&dt()}},J=function(t){g.url=t,g.url&&((d=new Image).setAttribute("crossOrigin","anonymous"),g.url.endsWith("svg")?fetch(tn.getSourceRootPath()+g.url).then(function(){var t=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.ok){t.next=5;break}return t.next=3,e.text();case 3:f=t.sent,q(g.color);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()):(d.src=tn.getSourceRootPath()+g.url,d.onload=function(){g.show&&dt()}))},W=function(t){u=t,l=[{name:"模板一",value:"模板一",id:"1",margin:.03,title:{text:"标题一",height:.05,bgColor:"#5d5d5d",color:"#ffffff",show:!0},border:{show:!1,url:"/custom/img/map-border1.svg",width:.01,color:""},plottingScale:{cell:2,color:"#ffffff",show:!0,isSelected:!1,x:.87,y:.97},data:[{text:"",x:.02,y:.93,isSelected:!1,show:!0,color:"#ffffff",height:.03},{text:"",x:.02,y:.97,isSelected:!1,show:!0,color:"#ffffff",height:.03},{x:.02,y:.1,show:!1,isSelected:!1,url:"/custom/img/icon-compass1.svg",width:.1,height:.1}]},{name:"模板二",value:"模板二",id:"2",margin:.03,border:{show:!0,url:"/custom/img/map-border2.svg",width:.01},title:{text:"标题二",height:.05,bgColor:"#5d5d5d",color:"#ffffff",show:!0},plottingScale:{cell:2,color:"#ffffff",show:!0,isSelected:!1,x:.02,y:.97},data:[{text:"",x:.88,y:.93,isSelected:!1,show:!0,color:"#ffffff",height:.03},{text:"",x:.87,y:.97,isSelected:!1,show:!0,color:"#ffffff",height:.03},{x:.91,y:.1,show:!0,isSelected:!1,url:"/custom/img/icon-compass4.svg",width:.1,height:.1}]}];for(var e=0;e<l.length;e++)if(l[e].id===u){v=l[e].title||v,m=l[e].margin||0==l[e].margin?l[e].margin:m,y=l[e].data||y,(g=l[e].border||g).color=g.color||"#000000",b=l[e].plottingScale||b;break}U(),dt()},U=function(){if(!h){m*=L.width,Z=L.height/140,_.value=v.text,E.checked=v.show,S.value=y[1].text,D.checked=y[1].show,M.checked=y[2].show;for(var t=0;t<C.length;t++)C[t]===y[2].url&&(P[t].checked=!0);O.checked=b.show,g.width=L.width*g.width;var e=m;g.show&&d&&d.complete&&(e+=g.width),N.width=L.width+2*e,N.height=L.height+2*e,F&&(F.checked=y[0].show),I&&(y[0].text?I.setValue(y[0].text):(I.nowBtn&&I.nowBtn(),y[0].text=I.getValue())),z&&R&&H&&(R.value=g.url,z.legp_searchActive(g.url),H.style.backgroundImage="url(".concat(tn.getSourceRootPath()+g.url,")")),T.checked=g.show,d=null,g&&g.url&&J(g.url)}},r=!1,l=[{name:"模板一",value:"模板一",id:"1",margin:.03,title:{text:"标题一",height:.05,bgColor:"#5d5d5d",color:"#ffffff",show:!0},border:{show:!1,url:"/custom/img/map-border1.svg",width:.01,color:""},plottingScale:{cell:2,color:"#ffffff",show:!0,isSelected:!1,x:.87,y:.97},data:[{text:"",x:.02,y:.93,isSelected:!1,show:!0,color:"#ffffff",height:.03},{text:"",x:.02,y:.97,isSelected:!1,show:!0,color:"#ffffff",height:.03},{x:.02,y:.1,show:!1,isSelected:!1,url:"/custom/img/icon-compass1.svg",width:.1,height:.1}]},{name:"模板二",value:"模板二",id:"2",margin:.03,border:{show:!0,url:"/custom/img/map-border2.svg",width:.01},title:{text:"标题二",height:.05,bgColor:"#5d5d5d",color:"#ffffff",show:!0},plottingScale:{cell:2,color:"#ffffff",show:!0,isSelected:!1,x:.02,y:.97},data:[{text:"",x:.88,y:.93,isSelected:!1,show:!0,color:"#ffffff",height:.03},{text:"",x:.87,y:.97,isSelected:!1,show:!0,color:"#ffffff",height:.03},{x:.91,y:.1,show:!0,isSelected:!1,url:"/custom/img/icon-compass4.svg",width:.1,height:.1}]}],u="1",h=!0,m=0,v={text:"标题",height:40,bgColor:"#5d5d5d",color:"#ffffff",show:!0},g={show:!0,url:tn.getSourceRootPath()+"/custom/img/map-border1.svg",width:20},y=[{text:"",x:10,y:100,height:24,fontSize:24,isSelected:!1,show:!0,color:"#ffffff"},{text:"-",x:10,y:100,height:24,fontSize:24,isSelected:!1,show:!0,color:"#ffffff"},{x:10,y:100,width:100,height:100,show:!1,isSelected:!1,url:tn.getSourceRootPath()+"/custom/img/icon-compass1.svg"}],b={cell:2,color:"#ffffff",show:!0,isSelected:!1,x:10,y:100,width:100},C=["/custom/img/icon-compass1.svg","/custom/img/icon-compass2.svg","/custom/img/icon-compass3.svg","/custom/img/icon-compass4.svg"],c&&(c.close(),c=null),t.next=26,new Ki(e,{},{title:"地图打印",left:"5%",top:"10%",ismove:!1});case 26:(c=t.sent)._element.body.className=c._element.body.className+" map-print",(w=document.createElement("div")).innerHTML='\n <div class="left">\n <div class="div-item">\n <div class="title">图件信息</div>\n <div class="row" style="align-items: flex-start;">\n <div class="col template-box">\n <span class="label" style="flex: 0 0 56px;">模板</span>\n <div class="template" style="width: 213px;"></div>\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label" style="flex: 0 0 56px;">标题</span>\n <input class="title-input" type="text">\n <input class="title-checkbox" type="checkbox" style="margin-left: 15px;">\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label" style="flex: 0 0 56px;">制图日期</span>\n <input class="print-date" type="text" placeholder="YYYY-MM-DD" readonly>\n <input class="print-date-checkbox" type="checkbox" style="margin-left: 15px;">\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label" style="flex: 0 0 56px;">制图单位</span>\n <input class="unit-input" type="text">\n <input class="unit-checkbox" type="checkbox" style="margin-left: 15px;">\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col map-border-box">\n <span class="label" style="flex: 0 0 56px;">图框</span>\n <div class="map-border" style="width: 173px;"></div>\n <div class="border-color" style="margin-top: 3px;margin-left: 12px;"></div>\n <input class="map-border-checkbox" type="checkbox" style="margin-left: 15px;">\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="title">地图要素</div>\n <div class="row" style="align-items: flex-start;">\n <div class="col" style="align-items: flex-start;">\n <span class="label" style="flex: 0 0 56px;margin-top: 9px;">指北针</span>\n <input class="compass-checkbox" type="checkbox" style="margin-top: 11px;">\n <div class="row">\n <div class="col" style="margin-left: 10px;flex-wrap: wrap;">\n '.concat(function(){for(var t="",e=0;e<C.length;e++){var i=tn.getSourceRootPath()+C[e];t+='<div style="display: flex;align-items: center;">\n <input class="compass-radio" type="radio" name="option">\n <img src="'.concat(i,'" alt="" style="width: 38px; height: 38px; margin: 0 5px;">\n </div>')}return t}(),'\n </div>\n </div>\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col" style="align-items: flex-start;">\n <span class="label" style="flex: 0 0 56px;margin-top: 9px;">比例尺</span>\n <input class="plotting-scale-checkbox" type="checkbox" style="margin-top: 11px;">\n </div>\n </div>\n </div>\n </div>\n <div class="right">\n <div class="map-img-box">\n\n </div>\n </div>\n '),c.contentAppChild(w),k=w.getElementsByClassName("left")[0],x=w.getElementsByClassName("right")[0],_=k.getElementsByClassName("title-input")[0],E=k.getElementsByClassName("title-checkbox")[0],S=k.getElementsByClassName("unit-input")[0],D=k.getElementsByClassName("unit-checkbox")[0],M=k.getElementsByClassName("compass-checkbox")[0],P=k.getElementsByClassName("compass-radio"),O=k.getElementsByClassName("plotting-scale-checkbox")[0],T=k.getElementsByClassName("map-border-checkbox")[0],N=document.createElement("canvas"),B=N.getContext("2d"),x.appendChild(N),(L=new Image).src=i,L.onload=function(){h=!1,vt(),W(u)},_.value=v.text,E.checked=v.show,_.addEventListener("input",(function(){v.text=this.value,L.complete&&dt()})),E.addEventListener("change",(function(){v.show=this.checked,L.complete&&dt()})),S.value=y[1].text,D.checked=y[1].show,S.addEventListener("input",(function(){y[1].text=this.value,L&&L.complete&&dt()})),D.addEventListener("change",(function(){y[1].show=this.checked,L&&L.complete&&dt()})),M.checked=y[2].show,M.addEventListener("change",(function(){y[2].show=this.checked,L&&L.complete&&dt()})),A=a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:P[e].addEventListener("change",(function(){this.checked&&(y[2].svg=null,y[2].url=C[e],L&&L.complete&&dt())}));case 1:case"end":return t.stop()}}),t)})),j=0;case 59:if(!(j<P.length)){t.next=64;break}return t.delegateYield(A(j),"t0",61);case 61:j++,t.next=59;break;case 64:O.checked=b.show,O.addEventListener("change",(function(){b.show=this.checked,L&&L.complete&&dt()})),T.checked=g.show,T.addEventListener("change",(function(){g.show=this.checked,d&&d.complete&&dt()})),new YJColorPicker({el:w.getElementsByClassName("border-color")[0],size:"mini",alpha:!1,defaultColor:g.color,disabled:!1,openPickerAni:"opacity",sure:function(t){q(t)},clear:function(){q("rgba(0,0,0,1)")}}),setTimeout((function(){V=c._element.foot.getElementsByClassName("close")[0],(G=document.createElement("button")).className="export",G.innerHTML="打印",k.appendChild(V),k.appendChild(G),G.addEventListener("click",(function(){r||(r=!0,G.innerHTML='<span style="position: absolute;width:100%;height:100%;top: 0;left: 0;border-radius: 3px;background-color: #6f89848f;"><svg class="icon-load"><use xlink:href="#yj-icon-load"></use></svg></span>打印',yt())}));var t=w.getElementsByClassName("print-date")[0];(F=w.getElementsByClassName("print-date-checkbox")[0]).checked=y[0].show,F.addEventListener("change",(function(){y[0].show=this.checked,L.complete&&dt()})),I=jeDate(t,{format:"YYYY-MM-DD",isinitVal:!0,isClear:!1,donefun:function(t){y[0].text=t.val,L.complete&&dt()}}),y[0].text?I.setValue(y[0].text):(I.nowBtn&&I.nowBtn(),y[0].text=I.getValue(),dt());var e=Y(c._element.content.getElementsByClassName("template-box")[0],".template");if(e){e.legp_search(l);for(var i=c._element.content.getElementsByClassName("template")[0].getElementsByTagName("input")[0],n=0;n<l.length;n++)if(l[n].id==u){i.value=l[n].value,e.legp_searchActive(l[n].value);break}i.addEventListener("input",(function(){for(var t=0;t<l.length;t++)if(l[t].value===i.value){W(l[t].id);break}}))}var o=[{name:'<span style="background-image: url('.concat(tn.getSourceRootPath(),'/custom/img/map-border1.svg);background-size: auto 100%;background-repeat: repeat-x;"></span>'),value:"/custom/img/map-border1.svg",key:0},{name:'<span style="background-image: url('.concat(tn.getSourceRootPath(),'/custom/img/map-border2.svg);background-size: auto 100%;background-repeat: repeat-x;"></span>'),value:"/custom/img/map-border2.svg",key:1},{name:'<span style="background-image: url('.concat(tn.getSourceRootPath(),'/custom/img/map-border3.svg);background-size: auto 100%;background-repeat: repeat-x;"></span>'),value:"/custom/img/map-border3.svg",key:2},{name:'<span style="background-image: url('.concat(tn.getSourceRootPath(),'/custom/img/map-border4.svg);background-size: auto 100%;background-repeat: repeat-x;"></span>'),value:"/custom/img/map-border4.svg",key:3},{name:'<span style="background-image: url('.concat(tn.getSourceRootPath(),'/custom/img/map-border5.svg);background-size: auto 100%;background-repeat: repeat-x;"></span>'),value:"/custom/img/map-border5.svg",key:4},{name:'<span style="background-image: url('.concat(tn.getSourceRootPath(),'/custom/img/map-border6.svg);background-size: auto 100%;background-repeat: repeat-x;"></span>'),value:"/custom/img/map-border6.svg",key:5}];if(z=Y(c._element.content.getElementsByClassName("map-border-box")[0],".map-border")){z.legp_search(o),(H=document.createElement("span")).className="icon icon-active",H.style.width="calc(100% - 40px)",H.style.height="calc(100% - 12px)",H.style.position="absolute",H.style.top="6px",H.style.left="10px",H.style.pointerEvents="none",H.style.backgroundImage="url(".concat(tn.getSourceRootPath()+g.url,")"),H.style.backgroundSize="auto 100%",H.style.backgroundRepeat="repeat-x",c._element.content.getElementsByClassName("map-border")[0].getElementsByClassName("cy_datalist")[0].appendChild(H),(R=c._element.content.getElementsByClassName("map-border")[0].getElementsByTagName("input")[0]).style.fontSize=0,R.style.color="transparent";for(var s=0;s<o.length;s++)if(o[s].value==g.url){R.value=o[s].value,z.legp_searchActive(o[s].value);break}R.addEventListener("input",(function(){for(var t=0;t<o.length;t++)if(o[t].value===R.value){H.style.backgroundImage="url(".concat(tn.getSourceRootPath()+o[t].value,")"),J(o[t].value);break}}))}}),0),X=!1,Z=5,K=null,$=!1,Q=!1,tt=null,N.addEventListener("mousedown",(function(t){var e=pt(t),i=ut(t),n=m;if(g.show&&d&&d.complete&&(n+=g.width),v.show&&i>=v.height*L.height+n-Z&&i<=v.height*L.height+n+Z){X=!0;for(var o=0;o<y.length;o++)y[o].isSelected=!1;return K=null,$=!1,Q=!1,void(tt=null)}if(K&&K!==b){var s=.005*N.height;ht(K,n).forEach((function(t,n){e>=t.x-s&&e<=t.x+s&&i>=t.y-s&&i<=t.y+s&&(Q=!0,$=!1,tt=n,et=e,it=i,rt=K.width*L.height,lt=K.height*L.height,"text"in K&&(rt=K.width*L.height,ct=K.height))}))}if(!Q){for(var a=0;a<y.length;a++)y[a].isSelected=!1;b.isSelected=!1,K=null,$=!1,Q=!1,tt=null;for(var r=y.length-1;r>=0;r--)if(y[r].show){if("text"in y[r]&&e>=L.width*y[r].x+n&&e<=L.width*y[r].x+n+L.height*y[r].width&&i>=L.height*y[r].y+n-L.height*y[r].height&&i<=L.height*y[r].y+n){K=y[r],y[r].isSelected=!0,$=!0,et=e,it=i,nt=L.height*y[r].y-L.height*y[r].height,ot=L.width*y[r].x+L.height*y[r].width,st=L.width*y[r].x+n,at=L.height*y[r].y+n,dt();break}if("url"in y[r]&&y[r].svg&&y[r].svg.complete&&y[r].show&&e>=L.width*y[r].x+n&&e<=L.width*y[r].x+n+L.height*y[r].width&&i>=L.height*y[r].y+n&&i<=L.height*y[r].y+n+L.height*y[r].height){K=y[r],y[r].isSelected=!0,$=!0,et=e,it=i,nt=L.height*y[r].y+L.height*y[r].height,ot=L.width*y[r].x+L.height*y[r].width,st=L.width*y[r].x+n,at=L.height*y[r].y+n,dt();break}}b.show&&e>=L.width*b.x+n-.2*b.width&&e<=L.width*b.x+n-.2*b.width+b.width+.6*b.width&&i>=L.height*b.y+n-b.height-.5*b.height&&i<=L.height*b.y+n-.5*b.height+b.height&&(K=b,b.isSelected=!0,$=!0,et=e,it=i,nt=L.height*b.y+n+b.height,ot=L.width*b.x+n+b.width,st=L.width*b.x+n,at=L.height*b.y+n,dt()),K||dt()}})),N.addEventListener("mousemove",(function(t){var e=m;g.show&&d&&d.complete&&(e+=g.width);var i=pt(t),n=ut(t);if(!(i<0||n<0||i>N.width||n>N.height)){if(v.show){var o=m;g.show&&d&&d.complete&&(o+=g.width),n>=v.height*L.height+o-Z&&n<=v.height*L.height+o+Z?N.style.cursor="n-resize":N.style.cursor="default",X&&(v.height=Math.min(Math.max(n-o,30)/L.height,1),dt())}if($){var s=i-et,a=n-it;K.x=(st+s-e)/L.width,K.y=(at+a-e)/L.height,dt()}if(Q){var r,l=i-et,c=n-it;switch(tt){case 0:"text"in K?(r=(rt-l)/rt,K.height=Math.max(10/L.height,ct*r),K.x=(ot-K.width*L.height)/L.width):"url"in K&&(K.x=(ot-K.width*L.height)/L.width,K.y=(nt-K.height*L.height)/L.height,K.width=Math.max(10,rt-l)/L.height,K.height=Math.max(10,lt-c)/L.height);break;case 1:"text"in K?(r=(rt+l)/rt,K.height=Math.max(10/L.height,ct*r)):"url"in K&&(K.width=Math.max(10,rt+l)/L.height,K.height=Math.max(10,lt-c)/L.height,K.y=(nt-K.height*L.height)/L.height);break;case 2:"text"in K?(r=(rt-l)/rt,K.height=Math.max(10/L.height,ct*r),K.x=(ot-K.width*L.height)/L.width,K.y=(nt+K.height*L.height)/L.height):"url"in K&&(K.x=(ot-K.width*L.height)/L.width,K.width=Math.max(10,rt-l)/L.height,K.height=Math.max(10,lt+c)/L.height);break;case 3:"text"in K?(r=(rt+l)/rt,K.height=Math.max(10/L.height,ct*r),K.y=(nt+K.height*L.height)/L.height):"url"in K&&(K.width=Math.max(10,rt+l)/L.height,K.height=Math.max(10,lt+c)/L.height)}dt()}}})),document.addEventListener("mouseup",(function(){X=!1;g.show&&d&&d.complete&&g.width;for(var t=0;t<y.length;t++)y[t].show&&y[t].isSelected&&(nt=L.height*y[t].y-L.height*y[t].height,ot=L.width*y[t].x+L.height*y[t].width,"url"in y[t]&&(nt=L.height*y[t].y+L.height*y[t].height,ot=L.width*y[t].x+L.height*y[t].width),st=y[t].x,at=y[t].y);b.show&&b.isSelected&&(nt=b.y+b.height,ot=b.x+b.width,st=b.x,at=b.y),$=!1,Q=!1,tt=null}));case 79:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var nn=function(t,e,i,n){return en.apply(this,arguments)};var on;function sn(){return(sn=o()(a.a.mark((function t(e){var i,n,o=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=o.length>1&&void 0!==o[1]?o[1]:function(){},n=e.viewer.canvas.toDataURL(),i&&i(n);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function an(){return(an=o()(a.a.mark((function t(e){var i,n,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,x,E,S=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S.length>1&&void 0!==S[1]?S[1]:{},S.length>2&&void 0!==S[2]?S[2]:function(){},e){t.next=4;break}return t.abrupt("return");case 4:return Zt(),ve(e),on&&(on.close(),on=null),i=e.viewer.scene.screenSpaceCameraController.enableTranslate,n=e.viewer.scene.screenSpaceCameraController.enableTilt,s=e.viewer.scene.screenSpaceCameraController.enableLook,r=1,m=new ai,t.next=14,new Ki(e,{},{title:"高清出图",left:"180px",top:"100px",confirmCallBack:function(t){d&&(d.desist(),d=null),c&&(c.style.width="0%"),p&&(p.style.left="0%"),u&&(u.style.width="0%"),h&&(h.innerHTML="0%"),d=new E},closeCallBack:function(){e.viewer.scene.screenSpaceCameraController.enableTranslate=i,e.viewer.scene.screenSpaceCameraController.enableTilt=n,e.viewer.scene.screenSpaceCameraController.enableLook=s,e.viewer._element.getElementsByClassName("compass")[0].style.pointerEvents="auto",d&&(d.desist(),d=null),on=void 0}});case 14:for((on=t.sent)._element.body.className=on._element.body.className+" screenShotHD",(f=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row text" style="align-items: flex-start;">\n <div class="col">\n <span>当前窗口长宽:<span class="input-width">'.concat(e.viewer.canvas.width,'</span>*<span class="input-height">').concat(e.viewer.canvas.height,'</span>像素</span>\n </div>\n </div>\n <div class="row scale-box" style="align-items: flex-start;">\n <div class="col">\n <span class="label">图片大小</span>\n <div class="input input-select scale"></div>\n <span>倍窗口</span>\n </div>\n </div>\n <div class="row text" style="align-items: flex-start;">\n <div class="col">\n <span>输出图片长宽:<span class="output-width">').concat(e.viewer.canvas.width*r,'</span>*<span class="output-height">').concat(e.viewer.canvas.height*r,'</span>像素</span>\n </div>\n </div>\n <div class="row" style="align-items: flex-start; margin-bottom: 20px;">\n <div class="col">\n <span class="label">输出进度</span>\n <div class="range-box">\n <div class="range-bg">\n <div class="range-process-box">\n <div class="range-process"></div>\n </div>\n </div>\n <div class="range-node-box">\n <span class="range-node-text">0%</span>\n <span class="range-node-text">100%</span>\n <div class="range-node-active"><span class="range-node-active-text">0%</span></div>\n </div>\n <input class="progress-input" type="range" max="100" min="0" step="0.01">\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n '),on.contentAppChild(f),e.viewer.scene.screenSpaceCameraController.enableTranslate=!1,e.viewer.scene.screenSpaceCameraController.enableTilt=!1,e.viewer.scene.screenSpaceCameraController.enableLook=!1,e.viewer._element.getElementsByClassName("compass")[0].style.pointerEvents="none",(v=e.viewer.camera.pickEllipsoid(new Cesium.Cartesian2(e.viewer.canvas.clientWidth/2,e.viewer.canvas.clientHeight/2)))||(v=e.viewer.camera.pickEllipsoid(new Cesium.Cartesian2(e.viewer.canvas.clientWidth/2,e.viewer.canvas.clientHeight/(2-(90+e.viewer.camera.pitch/(Cesium.Math.PI/180))/110))))||(v=e.viewer.camera.position),g=m.cartesian3Towgs84(e.viewer.camera.position,e.viewer).alt,y=m.cartesian3Towgs84(v,e.viewer),e.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(y.lng,y.lat,g),orientation:{heading:0,pitch:Cesium.Math.toRadians(-90),roll:0},duration:1}),b=[],C=1;C<=10;C++)b.push({name:C,value:C});c=document.getElementsByClassName("progress-input")[0],u=document.getElementsByClassName("range-process")[0],p=f.getElementsByClassName("range-node-active")[0],h=f.getElementsByClassName("range-node-active-text")[0],(w=Y(on._element.content.getElementsByClassName("scale-box")[0],".scale"))&&(w.legp_search(b),x=on._element.content.getElementsByClassName("scale")[0].getElementsByTagName("input")[0],r=b[0].value,w.legp_searchActive(b[0].value),x.value=b[0].value,x.addEventListener("input",(function(){for(var t=0;t<b.length;t++)if(b[t].value==x.value){r=b[t].value,on._element.content.getElementsByClassName("output-width")[0].innerHTML=e.viewer.canvas.width*r,on._element.content.getElementsByClassName("output-height")[0].innerHTML=e.viewer.canvas.height*r;break}}))),E=function(){return _()((function t(){k()(this,t),this.state=!1,this.start()}),[{key:"start",value:function(){if(e.viewer.scene.imageryLayers._layers.length<=1)return this.error="未加载底图!",window.ELEMENT&&window.ELEMENT.Message({message:this.error,type:"warning",duration:1500}),void console.warn(this.error);for(var t=!1,i=0;i<e.viewer.scene.imageryLayers._layers.length;i++){var n=e.viewer.scene.imageryLayers._layers[i];!n||!n.show||n.notes&&"default-base-map"===n.notes||(t=!0)}if(!t)return this.error="未加载底图!",window.ELEMENT&&window.ELEMENT.Message({message:this.error,type:"warning",duration:1500}),void console.warn(this.error);var s=0;this.state=!0;var c=this;!function t(e){var i=2*e;i<=r&&(s++,t(i))}(1),s+=1;var d=e.viewer.camera.pickEllipsoid(new Cesium.Cartesian2(e.viewer.canvas.width/2,e.viewer.canvas.height/(2-(90+e.viewer.camera.pitch/(Cesium.Math.PI/180))/110)));d||(d=e.viewer.camera.position);for(var f,v,g=m.cartesian3Towgs84(e.viewer.camera.position,e.viewer).alt,y=(f=g,v=-40467.74,Math.round(v+80955.31/(1+Math.pow(f/91610.74,7096758e-11)))+1),b=e.viewer.camera.computeViewRectangle(),C={},w=0,k=0,x=0;x<e.viewer.scene.imageryLayers._layers.length;x++){var _=e.viewer.scene.imageryLayers._layers[x];_&&_.show&&_.imageryProvider&&_.imageryProvider.url&&Cesium.Rectangle.intersection(b,_.imageryProvider.rectangle)&&(!_.notes||"default-base-map"!==_.notes)&&w++}var E=100/w,S=!1;!function t(i,n){var d=e.viewer.scene.imageryLayers._layers[i];if(!d)return void(S||(c.error="当前范围内未找到底图数据!",window.ELEMENT&&window.ELEMENT.Message({message:c.error,type:"warning",duration:1500}),console.warn(c.error)));if(!d.show||!d.imageryProvider||!d.imageryProvider.url||!Cesium.Rectangle.intersection(b,d.imageryProvider.rectangle)||d.notes&&"default-base-map"===d.notes){var m=i+=1;return void t(m,n)}S=!0,k++,C[i]={value:0};var f,v=0,g=d.imageryProvider;l||0===l?f=l:((f=y+s-1)>g.maximumLevel&&(f=g.maximumLevel),f<g.minimumLevel&&(f=g.minimumLevel));function x(){var s=g.tilingScheme.positionToTileXY(Cesium.Rectangle.northwest(b),f),l=g.tilingScheme.positionToTileXY(Cesium.Rectangle.southeast(b),f);if(!s||!l){return window.ELEMENT&&window.ELEMENT.Message({message:"超出地球范围!",type:"warning",duration:1500}),void console.warn("超出地球范围!")}var d=g.tilingScheme.getNumberOfXTilesAtLevel(f),m=(g.tilingScheme.getNumberOfYTilesAtLevel(f),s.x),y=s.y,x=l.x,_=l.y,S=(x-m+1)*(_-y+1),D=document.createElement("canvas");D.width=256*(x-m+1),D.height=256*(_-y+1);var M=D.getContext("2d"),P=g.tilingScheme.tileXYToRectangle(x,_,f),O=g.tilingScheme.tileXYToRectangle(m,y,f),T=new Cesium.Rectangle(O.west,P.south,P.east,O.north),N=b,B=N.west-T.west,L=T.east-N.east,A=T.north-N.north,j=N.south-T.south,I=B/(T.east-T.west);I===1/0&&(I=0);var F=L/(T.east-T.west);F===1/0&&(F=0);var R=A/(T.north-T.south);R===1/0&&(R=0);var z=j/(T.north-T.south);z===1/0&&(z=0);var H=D.width*I,V=D.height*R,G=D.width*F,U=D.height*z;D.width=D.width-H-G,D.height=D.height-V-U,0==D.width&&(D.width=1),0==D.height&&(D.height=1);for(var W=_,Y=[],J=_;J>=y;J--)for(var q=x;q>=m;q--)Y.push({x:q,y:J});var X={count:0},Z=0,K=-1,$={count:0},Q=0;function tt(){$.count=0,Q=0;for(var t=30*++K;t<30*(K+1);t++){if(t>=Y.length)return;et(t)}}function et(t){if(c.state)try{var e=Y[t].x;e<0&&(e+=d);var i,n=new Image;n.setAttribute("crossOrigin","anonymous"),n.onload=o()(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M.drawImage(n,256*(Y[t].x-m)-parseFloat(H.toFixed(0)),256*(Y[t].y-y)-parseFloat(V.toFixed(0)),256,256),v++,X.count++,$.count++;case 4:case"end":return e.stop()}}),e)}))),n.onerror=function(){v++,X.count++,$.count++},i=-1!==g.url.indexOf("{x}")&&-1!==g.url.indexOf("{y}")&&-1!==g.url.indexOf("{z}")?g.url.replace(/\{x\}/g,e).replace(/\{y\}/g,Y[t].y).replace(/\{z\}/g,f):-1!==g.url.indexOf("{TileMatrix}")&&-1!==g.url.indexOf("{TileRow}")&&-1!==g.url.indexOf("{TileCol}")?g.url.replace(/\{TileCol\}/g,e).replace(/\{TileRow\}/g,Y[t].y).replace(/\{TileMatrix\}/g,f):g._layer&&g._style&&g._tileMatrixSetID&&g._format?g.url+"&tilematrix=".concat(f,"&layer=").concat(g._layer,"&style=").concat(g._style,"&tilerow=").concat(W,"&tilecol=").concat(e,"&tilematrixset=").concat(g._tileMatrixSetID,"&format=").concat(g._format):g.url+"tile/".concat(f,"/").concat(Y[t].y,"/").concat(e),n.src=i}catch(t){v++,X.count++,$.count++}}Object.defineProperty($,"count",{get:function(){return Q},set:function(t){(Q=t)>=30&&tt()}}),Object.defineProperty(X,"count",{get:function(){return Z},set:function(o){Z=o,C[i].value=v/S*E;var s=0;for(var a in C)s+=C[a].value;if(u.style.width=.99*s+"%",p.style.left=.99*s+"%",h.innerHTML=Math.floor(.99*s*100)/100+"%",Z===(x-m+1)*(_-y+1)){var l=D.getContext("2d"),d=D.cloneNode(!0),f=d.getContext("2d"),g=l.getImageData(0,0,D.width,D.height);if(f.putImageData(g,0,0),D.width=e.viewer.canvas.width*r,D.height=e.viewer.canvas.height*r,l.drawImage(d,0,0,D.width,D.height),n){if(n.getContext("2d").drawImage(D,0,0),k!=w){var M=i+=1;return void t(M,n)}var P=n.toDataURL("image/jpeg",.95),O=document.createElement("canvas"),T=O.getContext("2d");O.width=n.width/r,O.height=n.height/r,T.drawImage(n,0,0,O.width,O.height),nn(e,O.toDataURL("image/jpeg",.95),b,P),u.style.width="100%",p.style.left="100%",h.innerHTML="100%",c.state=!1}else{if(k!=w){var N=i+=1;return void t(N,D)}var B=D.toDataURL("image/jpeg",.95),L=document.createElement("canvas"),A=L.getContext("2d");L.width=D.width/r,L.height=D.height/r,A.drawImage(D,0,0,L.width,L.height),nn(e,L.toDataURL("image/jpeg",.95),b,B),u.style.width="100%",p.style.left="100%",h.innerHTML="100%",c.state=!1}}}}),g._readyError?X.count=(x-m+1)*(_-y+1):tt()}if(g._readyError)return C[i]={value:E},void x();g.readyPromise.then((function(){x()})).catch((function(t){g._readyError=!0,C[i]={value:E},x()}))}(0)}},{key:"desist",value:function(){this.state=!1}}])}();case 37:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var rn=i(13),ln=i.n(rn);function cn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return un(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?un(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function un(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var pn=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){var i=this;this.element={};for(var n=function(){if(!e[o]||!e[o].attributes)return 1;var n,s={input:[],change:[],blur:[],click:[]},a=!1,r=[],l=cn(e[o].attributes);try{var c=function(){var l=n.value;switch(l.name){case"@model":a=!0,"checkbox"==e[o].type?(s.change.push((function(e){t[l.value]=e.target.checked})),e[o].checked=t[l.value]):("number"==e[o].type?(s.input.push((function(t){if(t.target.value||0===t.target.value){var e=t.target.value;e=Number(e),"."==t.data||"-"==t.data&&!t.target.value||(t.target.max&&e>Number(t.target.max)&&(e=Number(t.target.max)),t.target.min&&e<Number(t.target.min)&&(e=Number(t.target.min)),t.target.dataset.min&&e<Number(t.target.dataset.min)&&(e=Number(t.target.dataset.min)))}})),s.blur.push((function(e){var i=e.target.value;(e.target.value||"undefined"!==e.target.dataset.null&&""!==e.target.dataset.null&&!Boolean(e.target.dataset.null))&&(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),e.target.dataset.min&&i<Number(e.target.dataset.min)&&(i=Number(e.target.dataset.min))),t[l.value]=i}))):s.input.push((function(e){t[l.value]=e.target.value})),"IMG"==e[o].nodeName?e[o].src=t[l.value]:e[o].value=t[l.value]),i.element[l.value]?i.element[l.value].push(e[o]):i.element[l.value]=[e[o]],r.push(l.name);break;case"@click":a=!0,s.click.push((function(e){"function"==typeof t[l.value]&&t[l.value](e)})),r.push(l.name)}};for(l.s();!(n=l.n()).done;)c()}catch(t){l.e(t)}finally{l.f()}for(var u=0;u<r.length;u++)e[o].attributes.removeNamedItem(r[u]);if(a){var p=function(t){s[t].length>0&&e[o].addEventListener(t,(function(e){for(var i=0;i<s[t].length;i++)s[t][i](e)}))};for(var h in s)p(h)}},o=0;o<e.length;o++)n()}}])}();C()(pn,"event",{});var hn=pn,dn=function(){return _()((function t(e,i,n){k()(this,t);for(var o=document.getElementById(e),s=o.getElementsByTagName("DIV-cy-tab-pane"),a='<div class="DIV-cy-tab-top">',r='<div class="DIV-cy-tab-content">',l=0,c=0;c<s.length;c++){var u=!1;if(n&&n.tabHide&&Array.isArray(n.tabHide))for(var p=0;p<n.tabHide.length;p++)if(s[c].getAttribute("label")===n.tabHide[p]){u=!0;break}if(!u){var h="display: none;",d="";0==l&&(h="",d="is-active"),a=a+'\n <div class="DIV-cy-tab-pane-title">\n <div class="DIV-cy-tab-pane-title-p '+d+'" tabindex="'+l+'"><span>'+s[c].getAttribute("label")+"</span></div>\n </div>\n ",r=r+'<div class="DIV-cy-tab-content-pane '.concat(s[c].className,'" style="')+h+'">'+s[c].innerHTML+"</div>",l++}}a+="</div>",r+="</div>";var m=document.createElement("div");m.setAttribute("id",e),m.setAttribute("class","DIV-cy-tabs"),m.innerHTML=a+r,o.parentNode.insertBefore(m,o),o.parentNode.removeChild(o);for(var f=m.getElementsByClassName("DIV-cy-tab-pane-title-p"),v=0;v<f.length;v++)f[v].addEventListener("click",(function(t){var e=t.target.getAttribute("tabindex"),n=m.getElementsByClassName("DIV-cy-tab-content-pane");i&&i(e);for(var o=0;o<n.length;o++)o===parseInt(e)?(n[o].style.display="",f[o].className="DIV-cy-tab-pane-title-p is-active"):(n[o].style.display="none",f[o].className="DIV-cy-tab-pane-title-p");n[parseInt(e)].style.display=""}));this.clickTabCallBack=i}),[{key:"clickTabCallBack",value:function(){this.clickTabCallBack&&this.clickTabCallBack()}}])}();function mn(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function fn(t,e,i){return t.set(gn(t,e),i),i}function vn(t,e){return t.get(gn(t,e))}function gn(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var yn=new WeakMap,bn=new WeakMap,Cn=new WeakMap,wn=new(function(){return _()((function t(){k()(this,t),mn(this,yn,void 0),mn(this,bn,void 0),mn(this,Cn,void 0),this.richTextBox=document.createElement("div"),this.richTextBox.className="richText-box",this.richTextBox.style.position="absolute",this.richTextBox.style.width="60%",this.richTextBox.style.height="70%",this.richTextBox.style.backgroundColor="#ffffff",this.richTextBox.style.zIndex="999999",this.richTextBox.style.left="20%",this.richTextBox.style.top="15%",this.richTextBox.style.display="flex",this.richTextBox.style.flexDirection="column",this.uploadImageServer,this.uploadVideoServer}),[{key:"open",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=this;this.title=i,this.objectId=t,document.body.getElementsByClassName("richText-box")[0]&&document.body.removeChild(this.richTextBox),this.editor=null;var r='\n <div class="richText-box-mask"></div>\n <div class="richText-content">\n <div class="richText-header">\n <p>'.concat(i,'</P>\n <i class="close">✕</i>\n </div>\n <div id="toolbar-container"></div>\n <div id="editor-container"></div>\n <div class="richText-footer">\n <button class="primary">确认</button>\n <button class="cancel">取消</button>\n </div>\n </div>\n ');this.richTextBox.innerHTML=r,document.body.appendChild(this.richTextBox);var l=window.wangEditor,c=l.createEditor,u=l.createToolbar,p={placeholder:"请输入正文...",MENU_CONF:{uploadImage:{fieldName:"file",maxFileSize:52428800,base64LimitSize:52428800,server:this.uploadImageServer},uploadVideo:{maxFileSize:524288e3,server:this.uploadVideoServer,allowedFileTypes:["video/mp4","video/mp3","video/ogg","video/webm","video/avi"],customUpload:function(t,e){return o()(a.a.mark((function i(){var n;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,s.upload(t);case 2:n=i.sent,e((s.host=s.host||h())+"/"+n);case 4:case"end":return i.stop()}}),i)})))()}}},onChange:function(t){t.getHtml()}};this.editor=c({selector:"#editor-container",html:"<p><br></p>",config:p,mode:"default"});var d={excludeKeys:["emotion","insertImage","insertVideo"]};u({editor:this.editor,selector:"#toolbar-container",config:d,mode:"default"});this.editor.on("fullScreen",(function(){console.log("fullScreen")})),this.editor.setHtml(n);var m=this.richTextBox.getElementsByClassName("close")[0],f=this.richTextBox.getElementsByClassName("primary")[0],v=this.richTextBox.getElementsByClassName("cancel")[0];m.addEventListener("click",(function(){e.close()})),f.addEventListener("click",(function(){var t=e.editor.getHtml();e.primaryCallBack(t),e.close()})),v.addEventListener("click",(function(){e.close()}))}},{key:"close",value:function(){document.body.getElementsByClassName("richText-box")[0]&&document.body.removeChild(this.richTextBox),this.editor=null}},{key:"upload",value:(t=o()(a.a.mark((function t(e){var i,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="",this.host=this.host||h(),i=this.host.endsWith("yjearth4.0")?this.host+"/api/v1/richText/upload":this.host+"/yjearth4.0/api/v1/richText/upload",(n=new FormData).append("file",e),t.next=7,fetch(i,{method:"post",body:n,headers:{token:m(),Authorization:"Bearer "+m()}});case 7:if(200!==(o=t.sent).status){t.next=14;break}return t.next=11,o.json();case 11:if(200!==(s=t.sent).code&&0!==s.code){t.next=14;break}return t.abrupt("return",s.data.url);case 14:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"customUploadVideo",get:function(){return vn(yn,this)},set:function(t){fn(yn,this,t)}},{key:"customUploadContent",get:function(){return vn(bn,this)},set:function(t){fn(bn,this,t)}},{key:"primaryCallBack",get:function(){return vn(Cn,this)},set:function(t){fn(Cn,this,t)}}]);var t}());function kn(t,e,i,n,o){var s=Math.ceil(e/i)||1;!function i(){var a,r="<li class='list-items' pagenumber=1>1</li>",l="<li class='list-items' pagenumber=".concat(s,">").concat(s,"</li>"),c="<li class='list-items btnGoLeft'>...</li>",u="<li class='list-items btnGoRight'>...</li>",p="<div style='line-height:20px;' class='pageTips'>共 ".concat(e," 条</div > ");if(a="<li class='list-items lbl btnPrev'>‹</li>",s<=6)for(var h=1;h<=s;h++)a+="<li class='list-items' pagenumber=".concat(h,">").concat(h,"</li>");else if(n<=4){for(var d=1;d<=5;d++)a+="<li class='list-items' pagenumber=".concat(d,">").concat(d,"</li>");a+=u,a+=l}else if(n>s-3){a+=r,a+=c;for(var m=s-4;m<=s;m++)a+="<li class='list-items' pagenumber=".concat(m,">").concat(m,"</li>")}else{a+=r,a+=c;for(var f=n-1;f<=n+1;f++)a+="<li class='list-items' pagenumber=".concat(f,">").concat(f,"</li>");a+=u,a+=l}a+="<li class='list-items lbr btnNext'>›</li>",a+=p,t.innerHTML=a,t.querySelector("li[pagenumber='"+n+"']").classList.add("active"),t.querySelectorAll("li[pagenumber]").forEach((function(e){e.onclick=function(){n=Number(this.innerHTML),t.querySelector("li[pagenumber='"+n+"']").classList.add("active"),a="",i(),o&&o(n)}})),t.getElementsByClassName("btnPrev")[0].addEventListener("click",(function(){n>1&&(n--,a="",i(),o&&o(n))})),t.getElementsByClassName("btnNext")[0].addEventListener("click",(function(){n<s&&(n++,a="",i(),o&&o(n))}));var v=t.getElementsByClassName("btnGoLeft")[0];v&&(v.addEventListener("mouseenter",(function(){this.innerHTML="<"})),v.addEventListener("mouseleave",(function(){this.innerHTML="..."})),v.addEventListener("click",(function(){n>10&&(n-=10,a="",i(),o&&o(n))})));var g=t.getElementsByClassName("btnGoRight")[0];g&&(g.addEventListener("mouseenter",(function(){this.innerHTML=">"})),g.addEventListener("mouseleave",(function(){this.innerHTML="..."})),g.addEventListener("click",(function(){n<s-10&&(n+=10,a="",i(),o&&o(n))})))}()}function xn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function _n(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?xn(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xn(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function En(t){var e=h();t.cameraSelect=function(n){if(!t.attributeSelect)return;for(var o=!1,s=0;s<t.attributeSelect.length;s++)if("camera"===t.attributeSelect[s].key){o=!0;break}if(!o)return;var a,r=n;if(n=n&&"object"!==N()(n)?n:1,!(t._DialogObject&&t._DialogObject._element&&t._DialogObject._element.content))return;var l=t._DialogObject._element.content.getElementsByClassName("pagination")[0];if(a=t._DialogObject._element.content.getElementsByClassName("attribute-content-camera")[0],!l)return;if(!a)return;kn(l,1,10,1);var c="",u={cameraName:t.cameraName,page:n,pageSize:5},p=new URLSearchParams(u).toString();c=e.endsWith("yjearth4.0")?"".concat(e,"/api/v1/cameraData/list?").concat(p):"".concat(e,"/yjearth4.0/api/v1/cameraData/list?").concat(p);if(fetch(c,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then((function(e){200===e.status&&e.json().then((function(e){if(200===e.code||0===e.code){if(!(t._DialogObject&&t._DialogObject._element&&t._DialogObject._element.content&&a))return;var o=a.getElementsByClassName("pagination")[0],s=t._DialogObject._element.content.getElementsByClassName("camera-table")[0],r=s.getElementsByClassName("table-body")[0];if(r.innerHTML="",e.rows&&(e.data={list:L()(e.rows),total:e.total}),e.data){if(e.data.list&&e.data.list.length>0){kn(o,e.data.total,5,1,(function(e){t.cameraSelect(e)})),s.getElementsByClassName("table-empty")[0].style.display="none",r.style.display="inline-flex";for(var l=[],c=function(n){var o='\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="'.concat("ID"in e.data.list[n]?e.data.list[n].ID:e.data.list[n].id,'">\n <span>绑定</span>\n </div>\n <div class="td">').concat(e.data.list[n].cameraName,'</div>\n <div class="td center" style="width: 80px; flex: 0 80px; min-width: 80px;">').concat(i[e.data.list[n].type],'</div>\n <div class="td center" style="width: 126px; flex: 0 126px;min-width: 126px;">').concat(e.data.list[n].ip,'</div>\n <div class="td center" style="width: 80px; flex: 0 80px;min-width: 80px;">').concat(e.data.list[n].port,'</div>\n <div class="td center" style="width: 80px; flex: 0 80px;min-width: 80px;">').concat(e.data.list[n].userName,'</div>\n <div class="td center">').concat(e.data.list[n].passWord||e.data.list[n].password,"</div>\n </div>"),s=document.createRange().createContextualFragment(o),a=s.querySelector('input[type="checkbox"]');l.push(a),a.addEventListener("change",(function(){if(a.checked){t.attributeCamera=[],t.attributeCamera.push(e.data.list[n]);for(var i=0;i<l.length;i++)l[i]!==a&&(l[i].checked=!1)}else{var o=t.attributeCamera.filter((function(t){return"ID"in e.data.list[n]?t.ID!==e.data.list[n].ID:t.id!==e.data.list[n].id}));t.attributeCamera=o}})),r.appendChild(s);for(var c=0;c<t.attributeCamera.length;c++)if("ID"in e.data.list[n]?t.attributeCamera[c].ID===e.data.list[n].ID:t.attributeCamera[c].id===e.data.list[n].id){a.checked=!0;break}},u=0;u<e.data.list.length;u++)c(u)}e.data&&e.data.total&&kn(o,e.data.total,5,n,(function(e){t.cameraSelect(e)}))}else kn(o,1,5,1),s.getElementsByClassName("table-empty")[0].style.display="flex",r.style.display="none"}else console.error(e.message)}))})),!r){var h=new URLSearchParams({page:1,pageSize:99999999}).toString();c=e.endsWith("yjearth4.0")?"".concat(e,"/api/v1/cameraData/list?").concat(h):"".concat(e,"/yjearth4.0/api/v1/cameraData/list?").concat(h),fetch(c,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then((function(e){200===e.status&&e.json().then((function(e){if(200===e.code||0===e.code){if(!(t._DialogObject&&t._DialogObject._element&&t._DialogObject._element.content&&a))return;if(e.rows&&(e.data={list:L()(e.rows),total:e.total}),e.data)if(e.data.list)for(var i=t.attributeCamera.length-1;i>=0;i--){for(var n=!1,o=0;o<e.data.list.length;o++){if("ID"in e.data.list[o]&&t.attributeCamera[i].ID===e.data.list[o].ID){n=!0;break}if("id"in e.data.list[o]&&t.attributeCamera[i].id===e.data.list[o].id){n=!0;break}}n||t.attributeCamera.splice(i,1)}else t.attributeCamera=[];else t.attributeCamera=[]}else console.error(e.message)}))}))}},t.ISCSelect=function(i){if(!t.attributeSelect)return;for(var n=!1,o=0;o<t.attributeSelect.length;o++)if("isc"===t.attributeSelect[o].key){n=!0;break}if(!n)return;var s;if(i=i&&"object"!==N()(i)?i:1,!(t._DialogObject&&t._DialogObject._element&&t._DialogObject._element.content))return;var a=t._DialogObject._element.content.getElementsByClassName("pagination")[0];if(s=t._DialogObject._element.content.getElementsByClassName("attribute-content-isc")[0],!a)return;if(!s)return;kn(a,1,10,1);var r="",l=new URLSearchParams({page:i,page_size:5}).toString();r=e.endsWith("yjearth4.0")?"".concat(e,"/api/v1/isc/list?").concat(l):"".concat(e,"/yjearth4.0/api/v1/isc/list?").concat(l);fetch(r,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then((function(e){200===e.status&&e.json().then((function(e){if(200===e.code||0===e.code){if(!(t._DialogObject&&t._DialogObject._element&&t._DialogObject._element.content&&s))return;var n=s.getElementsByClassName("pagination")[0],o=t._DialogObject._element.content.getElementsByClassName("isc-table")[0],a=o.getElementsByClassName("table-body")[0];if(a.innerHTML="",e.rows&&(e.data={list:L()(e.rows),total:e.total}),e.data){if(e.data.list&&e.data.list.length>0){kn(n,e.data.total,5,1,(function(e){t.ISCSelect(e)})),o.getElementsByClassName("table-empty")[0].style.display="none",a.style.display="flex";for(var r=function(i){var n='\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="'.concat("ID"in e.data.list[i]?e.data.list[i].ID:e.data.list[i].id,'">\n <span>绑定</span>\n </div>\n <div class="td">').concat(e.data.list[i].name,'</div>\n <div class="td center" style="width: 180px; flex: 0 180px; min-width: 180px;">').concat(e.data.list[i].status?"在线":"离线","</div>\n </div>"),o=document.createRange().createContextualFragment(n),s=o.querySelector('input[type="checkbox"]');s.addEventListener("change",(function(){if(s.checked)t.attributeISC.push(e.data.list[i]);else{var n=t.attributeISC.filter((function(t){return"ID"in e.data.list[i]?t.ID!==e.data.list[i].ID:t.id!==e.data.list[i].id}));t.attributeISC=n}})),a.appendChild(o);for(var r=0;r<t.attributeISC.length;r++)if("ID"in e.data.list[i]?t.attributeISC[r].ID===e.data.list[i].ID:t.attributeISC[r].id===e.data.list[i].id){s.checked=!0;break}},l=0;l<e.data.list.length;l++)r(l)}e.data&&e.data.total&&kn(n,e.data.total,5,i,(function(e){t.ISCSelect(e)}))}else kn(n,1,5,1),o.getElementsByClassName("table-empty")[0].style.display="flex",a.style.display="none"}else console.error(e.message)}))}))},t.goodsSelect=function(i){if(!t.attributeSelect)return;for(var n=!1,o=0;o<t.attributeSelect.length;o++)if("goods"===t.attributeSelect[o].key){n=!0;break}if(!n)return;var s;if(i=i&&"object"!==N()(i)?i:1,!(t._DialogObject&&t._DialogObject._element&&t._DialogObject._element.content))return;var a=t._DialogObject._element.content.getElementsByClassName("pagination")[0];if(s=t._DialogObject._element.content.getElementsByClassName("attribute-content-goods")[0],!a)return;if(!s)return;var r="",l=new URLSearchParams({page:i,page_size:999999}).toString();r=e.endsWith("yjearth4.0")?"".concat(e,"/api/v1/goods/list?").concat(l):"".concat(e,"/yjearth4.0/api/v1/goods/list?").concat(l);fetch(r,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then((function(e){200===e.status&&e.json().then((function(e){if(200===e.code||0===e.code){if(!(t._DialogObject&&t._DialogObject._element&&t._DialogObject._element.content&&s))return;s.getElementsByClassName("pagination")[0];var i=t._DialogObject._element.content.getElementsByClassName("goods-table")[0],n=i.getElementsByClassName("table-body")[0];if(n.innerHTML="",e.rows&&(e.data={list:L()(e.rows),total:e.total}),e.data){if(e.data.list&&e.data.list.length>0){t._allGoodsList=e.data.list;for(var o=t.attributeGoods.length-1;o>=0;o--){for(var a=!1,r=0;r<e.data.list.length;r++)if("ID"in e.data.list[r]){if(e.data.list[r].ID===t.attributeGoods[o].ID){a=!0;break}}else if("id"in e.data.list[r]&&e.data.list[r].id===t.attributeGoods[o].id){a=!0;break}a||t.attributeGoods.splice(o,1)}i.getElementsByClassName("table-empty")[0].style.display="none",n.style.display="block",n.style.maxHeight="150px";for(var l=function(i){var o='\n <div class="tr">\n <div class="td" style="width: 60px; flex: 0 60px;min-width: 60px;">\n '.concat(i+1,'\n </div>\n <div class="td" style="flex: 0 0 280px;">').concat(e.data.list[i].name,'</div>\n <div class="td"><input class="input" type="number" title="" min="0" max="999999999"></div>\n </div>'),s=document.createRange().createContextualFragment(o),a=s.querySelector('input[type="number"]');a.value=0;for(var r=0;r<t.attributeGoods.length;r++)"ID"in e.data.list[i]?e.data.list[i].ID===t.attributeGoods[r].ID&&(a.value=t.attributeGoods[r].cnt,t.attributeGoods[r].name=e.data.list[i].name):"id"in e.data.list[i]&&e.data.list[i].id===t.attributeGoods[r].id&&(a.value=t.attributeGoods[r].cnt);a.addEventListener("blur",(function(n){var o=Number(n.target.value);a.value=o;for(var s=!1,r=t.attributeGoods.length-1;r>=0;r--)if("ID"in e.data.list[i]){if(e.data.list[i].ID===t.attributeGoods[r].ID){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}}else if("id"in e.data.list[i]&&e.data.list[i].id===t.attributeGoods[r].id){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}if(!s){if(!o)return;var l={name:e.data.list[i].name,cnt:o};"ID"in e.data.list[i]?l.ID=e.data.list[i].ID:"id"in e.data.list[i]&&(l.id=e.data.list[i].id),t.attributeGoods.push(_n({},l))}})),a.addEventListener("input",(function(n){if(n.data&&isNaN(Number(n.data)))"."!=n.data&&(a.value=Number(a.value));else{var o=Number(n.target.value);n.target.max&&o>Number(n.target.max)&&(o=Number(n.target.max)),n.target.min&&o<Number(n.target.min)&&(o=Number(n.target.min)),a.value=o;for(var s=!1,r=t.attributeGoods.length-1;r>=0;r--)if("ID"in e.data.list[i]){if(e.data.list[i].ID===t.attributeGoods[r].ID){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}}else if("id"in e.data.list[i]&&e.data.list[i].id===t.attributeGoods[r].id){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}if(!s){if(!o)return;var l={name:e.data.list[i].name,cnt:o};"ID"in e.data.list[i]?l.ID=e.data.list[i].ID:"id"in e.data.list[i]&&(l.id=e.data.list[i].id),t.attributeGoods.push(_n({},l))}}})),n.appendChild(s)},c=0;c<e.data.list.length;c++)l(c)}e.data&&e.data.total}else i.getElementsByClassName("table-empty")[0].style.display="flex",n.style.display="none"}else console.error(e.message)}))}))},t.goodsFilter=function(){var e=[];if(t._allGoodsList&&t._allGoodsList.length){var i=t._DialogObject._element.content.getElementsByClassName("goods-select-input")[0].value;e=t._allGoodsList.filter((function(t){return-1!==t.name.indexOf(i)}))}var n=t._DialogObject._element.content.getElementsByClassName("goods-table")[0],o=n.getElementsByClassName("table-body")[0];if(o.innerHTML="",e.length>0){n.getElementsByClassName("table-empty")[0].style.display="none",o.style.display="block",o.style.maxHeight="150px";for(var s=function(i){var n='\n <div class="tr">\n <div class="td" style="width: 60px; flex: 0 60px;min-width: 60px;">\n '.concat(i+1,'\n </div>\n <div class="td" style="flex: 0 0 280px;">').concat(e[i].name,'</div>\n <div class="td"><input class="input" type="number" title="" min="0" max="999999999"></div>\n </div>'),s=document.createRange().createContextualFragment(n),a=s.querySelector('input[type="number"]');a.value=0;for(var r=0;r<t.attributeGoods.length;r++)"ID"in e[i]?e[i].ID===t.attributeGoods[r].ID&&(a.value=t.attributeGoods[r].cnt):"id"in e[i]&&e[i].id===t.attributeGoods[r].id&&(a.value=t.attributeGoods[r].cnt);a.addEventListener("blur",(function(n){var o=Number(n.target.value);a.value=o;for(var s=!1,r=t.attributeGoods.length-1;r>=0;r--)if("ID"in e[i]){if(e[i].ID===t.attributeGoods[r].ID){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}}else if("id"in e[i]&&e[i].id===t.attributeGoods[r].id){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}if(!s){if(!o)return;var l={name:e[i].name,cnt:o};"ID"in e[i]?l.ID=e[i].ID:"id"in e[i]&&(l.id=e[i].id),t.attributeGoods.push(_n({},l))}})),a.addEventListener("input",(function(n){if(n.data&&isNaN(Number(n.data)))"."!=n.data&&(a.value=Number(a.value));else{var o=Number(n.target.value);n.target.max&&o>Number(n.target.max)&&(o=Number(n.target.max)),n.target.min&&o<Number(n.target.min)&&(o=Number(n.target.min)),a.value=o;for(var s=!1,r=t.attributeGoods.length-1;r>=0;r--)if("ID"in e[i]){if(e[i].ID===t.attributeGoods[r].ID){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}}else if("id"in e[i]&&e[i].id===t.attributeGoods[r].id){s=!0,o?t.attributeGoods[r].cnt=o:t.attributeGoods.splice(r,1);break}if(!s){if(!o)return;var l={name:e[i].name,cnt:o};"ID"in e[i]?l.ID=e[i].ID:"id"in e[i]&&(l.id=e[i].id),t.attributeGoods.push(_n({},l))}}})),o.appendChild(s)},a=0;a<e.length;a++)s(a)}else n.getElementsByClassName("table-empty")[0].style.display="flex",o.style.display="none"},t.cameraName="",t.ISCName="";var i={1:"海康",2:"大华"};return'<div class="attribute">\n <div class="row">\n <div class="col attribute-select-box">\n <span class="label" style="line-height: 32px;">内容类型</span>\n <div class="input input-select attribute-select"></div>\n </div>\n </div>\n <div class="attribute-content attribute-content-richText">\n <div class="row">\n <div class="col">\n <span class="label">编辑内容</span>\n <button @click="openRichTextEditor">打开文本编辑器</button>\n </div>\n </div>\n </div>\n <div class="row attribute-content attribute-content-link">\n <div class="col">\n <span class="label">添加链接</span>\n <div style="flex: 1;position: relative;">\n <input class="input link_add" type="text">\n <i class="link_add_btn" @click="_addLink"></i>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-link">\n <div class="table">\n <div class="table-head">\n <div class="tr">\n <div class="th">名称</div>\n <div class="th">链接</div>\n <div class="th">操作</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-camera">\n <div class="row">\n <div class="col">\n <span class="label">编辑内容</span>\n <input class="input" type="text" @model="cameraName" style="width: 100px;">\n <button class="select btn" @click="cameraSelect">搜索</button>\n </div>\n </div>\n <div>\n <div class="table camera-table">\n <div class="table-head">\n <div class="tr">\n <div class="th">操作</div>\n <div class="th">设备名称</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">设备类型</div>\n <div class="th" style="width: 126px; flex: 0 126px;min-width: 126px;">设备IP</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">设备端口</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">用户名</div>\n <div class="th">密码</div>\n </div>\n </div>\n <div class="table-body" style="display:none;">\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="2">\n <span>绑定</span>\n </div>\n <div class="td">设备名称</div>\n <div class="td">设备类型</div>\n <div class="td">设备IP</div>\n <div class="td">设备端口</div>\n <div class="td">用户名</div>\n <div class="td">密码</div>\n </div>\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class=""row>\n <ul class="pagination"></ul>\n </div>\n </div>\n <div class="attribute-content attribute-content-isc">\n \x3c!-- <div class="row">\n <div class="col">\n <span class="label">编辑内容</span>\n <input class="input" type="text" @model="ISCName" style="width: 100px;">\n <button class="select btn" @click="ISCSelect">搜索</button>\n </div>\n </div> --\x3e\n <div>\n <div class="table isc-table">\n <div class="table-head">\n <div class="tr">\n <div class="th" style="width: 74px; flex: 0 74px;min-width: 74px;">操作</div>\n <div class="th">设备名称</div>\n <div class="th" style="width: 180px; flex: 0 180px; min-width: 180px;">设备状态</div>\n </div>\n </div>\n <div class="table-body" style="display:none;">\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="2">\n <span>绑定</span>\n </div>\n <div class="td">设备名称</div>\n <div class="td" style="width: 180px; flex: 0 180px; min-width: 180px;">设备状态</div>\n </div>\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class=""row>\n <ul class="pagination"></ul>\n </div>\n </div>\n <div class="row attribute-content attribute-content-vr">\n <div class="col">\n <span class="label">添加链接</span>\n <div style="flex: 1;position: relative;">\n <input class="input vr_add" type="text">\n <i class="vr_add_btn" @click="_addRr"></i>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-vr">\n <div class="table">\n <div class="table-head">\n <div class="tr">\n <div class="th">名称</div>\n <div class="th">链接</div>\n <div class="th">操作</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-goods">\n <div>\n <div class="row">\n <div class="col">\n <span class="label">编辑内容</span>\n <input class="input goods-select-input" type="text" style="width: 180px;margin-right: 10px;">\n <button class="select btn" @click="goodsFilter">搜索</button>\n </div>\n </div>\n <div class="table goods-table">\n <div class="table-head">\n <div class="tr">\n <div class="th" style="width: 60px; flex: 0 60px;min-width: 60px;">序号</div>\n <div class="th" style="flex: 0 0 280px;">名称</div>\n <div class="th">数量</div>\n </div>\n </div>\n <div class="table-body" style="display:none;">\n <div class="tr">\n <div class="td" style="width: 60px; flex: 0 60px;min-width: 60px;">序号</div>\n <div class="td" style="flex: 0 0 280px;">名称</div>\n <div class="td">数量</div>\n </div>\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n </div>\n </div>'}function Sn(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="flex: unset;">名称</span>\n <input class="input" type="text" @model="labelText">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div style="width: 46%;">\n <div class="row">\n <p class="lable-left-line">WGS84坐标</p>\n </div>\n <div class="row" style="margin-bottom: 5px;">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n </div>\n <div class="row" style="margin-bottom: 5px;">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">海拔高度</span>\n <div class="input-number input-number-unit-1 alt-box">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div style="width: 50%;">\n <div class="row coordinate-select-box">\n <div class="lable-left-line">转换坐标选择\n <div class="input input-select coordinate-select" style="margin-left: 20px;"></div>\n </div>\n </div>\n <div class="row" style="margin-bottom: 5px;">\n <div class="col">\n <span class="label">X轴:</span>\n <input style="border: none;background: none;" class="input convert-x" readonly="readonly">\n </div>\n </div>\n <div class="row" style="margin-bottom: 5px;">\n <div class="col">\n <span class="label">Y轴:</span>\n <input style="border: none;background: none;" class="input convert-y" readonly="readonly">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">Z轴:</span>\n <input style="border: none;background: none;" class="input convert-z" readonly="readonly">\n </div>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col" style="flex: 0 0 120px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="scaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="near">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="far">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <DIV-cy-tabs id="point-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col height-box">\n <span class="label" style="flex: 0 0 56px;">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="YJ-custom-checkbox-box" style="display: flex;align-items: center;cursor: pointer;">\n <input type="checkbox" class="YJ-custom-checkbox">\n <span style="margin-left: 10px; margin-bottom: 1px;user-select: none;">小数格式</span>\n </div>\n </div>\n <div class="col">\n <div class="YJ-custom-checkbox-box" style="display: flex;align-items: center;cursor: pointer;">\n <input type="checkbox" class="YJ-custom-checkbox">\n <span style="margin-left: 10px; margin-bottom: 1px;user-select: none;">度分格式</span>\n </div>\n </div>\n <div class="col">\n <div class="YJ-custom-checkbox-box" style="display: flex;align-items: center;cursor: pointer;">\n <input type="checkbox" class="YJ-custom-checkbox">\n <span style="margin-left: 10px; margin-bottom: 1px;user-select: none;">度分秒格式</span>\n </div>\n </div>\n <div class="col">\n </div>\n </div>\n <div class="row">\n <div style="flex: 1;">\n <div class="proj-input-box">\n <div class="row">\n <div class="col">\n <span style="flex: 0 0 40px;">经度</span>\n <input class="input lng" readonly="readonly">\n </div>\n <div class="col">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span style="flex: 0 0 40px;">纬度</span>\n <input class="input lat" readonly="readonly">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <div class="proj-input-box" style="width: 56%;">\n <div class="row">\n <div class="col" style="flex-direction: column;">\n <div class="row" style="margin-bottom: 15px;">\n <span style="flex: 0 0 40px;">经度</span>\n <input class="input lng-dm-d" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lng-dm-m" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <span class="top-line"></span>\n </div>\n <div class="row">\n <span style="flex: 0 0 40px;">纬度</span>\n <input class="input lat-dm-d" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lat-dm-m" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <span class="bottom-line"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="proj-input-box" style="width: 70%;">\n <div class="row">\n <div class="col" style="flex-direction: column;">\n <div class="row" style="margin-bottom: 15px;">\n <span style="flex: 0 0 40px;">经度</span>\n <input class="input lng-dms-d" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lng-dms-m" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <input class="input lng-dms-s" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">秒</span>\n <span class="top-line"></span>\n </div>\n <div class="row">\n <span style="flex: 0 0 40px;">纬度</span>\n <input class="input lat-dms-d" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">度</span>\n <input class="input lat-dms-m" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">分</span>\n <input class="input lat-dms-s" style="flex: 1;" readonly="readonly">\n <span class="label" style="flex: 0 0 14px;margin: 0 10px;">秒</span>\n <span class="bottom-line"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n <div>\n <h4>图标设置</h4>\n <div class="row" style="margin-bottom: 10px;">\n <div class="col" style="flex: 0 0 80px;">\n <span class="label" style="flex: none;">显隐</span>\n <input class="btn-switch" type="checkbox" @model="billboardShow">\n </div>\n <div class="col" style="flex: 0 0 90px;">\n <span class="label" style="flex: none;">图标</span>\n <div class="image-box" @click="clickChangeImage">\n <img class="image" src="" alt="" @model="billboardImage">\n </div>\n </div>\n <div class="col" style="flex: 0 0 90px;">\n <span class="label" style="flex: none;">默认图标</span>\n <div class="image-box" @click="clickChangeDefaultImage">\n <img class="image" src="" alt="" @model="billboardDefaultImage">\n </div>\n </div>\n <div class="col">\n <span class="label">图标倍数</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0.1" max="99" @model="billboardScale">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div>\n <h4>文字设置</h4>\n <div class="row">\n <div class="col" style="flex: 0 0 80px;">\n <span class="label" style="flex: none;">显隐</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">文字大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize" style="width: 70px;">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">文字颜色</span>\n <div class="labelColor"></div>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n \x3c!-- <DIV-cy-tab-pane label="效果">\n <div>\n <div class="row">\n <div class="col">\n <span class="label">扩散</span>\n <input class="btn-switch" type="checkbox" @model="diffuseShow">\n </div>\n <div class="col">\n <span class="label">半径</span>\n <input class="input" type="number" title="" min="0" max="9999999" @model="diffuseRadius">\n </div>\n <div class="col">\n <span class="label">时间</span>\n <input class="input" type="number" title="" min="100" max="99999" @model="diffuseDuration">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="diffuseColor"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">雷达</span>\n <input class="btn-switch" type="checkbox" @model="scanShow">\n </div>\n <div class="col">\n <span class="label">半径</span>\n <input class="input" type="number" title="" min="0" max="9999999" @model="scanRadius">\n </div>\n <div class="col">\n <span class="label">时间</span>\n <input class="input" type="number" title="" min="100" max="99999" @model="scanDuration">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="scanColor"></div>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>--\x3e\n\x3c!-- <DIV-cy-tab-pane label="灯光控制">--\x3e\n\x3c!-- <div>--\x3e\n\x3c!-- <div class="row">--\x3e\n\x3c!-- <div class="col">--\x3e\n\x3c!-- <span class="label">指令</span>--\x3e\n\x3c!-- <input class="input" type="text" @model="instruct">--\x3e\n\x3c!-- <button class="primary" @click="instructSubmit">提交</button>--\x3e\n\x3c!-- </div>--\x3e\n\x3c!-- </div>--\x3e\n\x3c!-- </div>--\x3e\n\x3c!-- </DIV-cy-tab-pane>--\x3e\n\x3c!-- <DIV-cy-tab-pane label="设置操作点">--\x3e\n\x3c!-- <div>--\x3e\n\x3c!-- <div class="row">--\x3e\n\x3c!-- <div class="col">--\x3e\n\x3c!-- <span class="label">设置操作点</span>--\x3e\n\x3c!-- <input class="input" type="text" @model="operatingPoint">--\x3e\n\x3c!-- <button class="primary" @click="operatingPointSubmit">提交</button>--\x3e\n\x3c!-- </div>--\x3e\n\x3c!-- </div>--\x3e\n\x3c!-- </div>--\x3e\n\x3c!-- </DIV-cy-tab-pane>--\x3e\n </DIV-cy-tabs>\n </div>\n <span class="custom-divider"></span>\n ')}function Dn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Mn(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Dn(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Dn(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Pn(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function On(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Tn(t,e,i){return t.set(Bn(t,e),i),i}function Nn(t,e){return t.get(Bn(t,e))}function Bn(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Ln=new WeakMap,An=new WeakMap,jn=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),On(i=Pn(this,e,[t,n]),Ln,void 0),On(i,An,void 0),t&&t.viewer?(i.sdk=t,i.viewer=t.viewer,i.options=Mn({},n),i.options.id=n.id||i.randomString(),i.entity=null,i.clickCallBack=null,i.rightClickCallBack=null,i.picking=!0,i.options.host=i.options.host||h(),i.setDefaultValue(),i):Wi()(i)}return Xi()(e,t),_()(e,[{key:"showView",get:function(){return Nn(Ln,this)},set:function(t){var e=Te().sdkD;e||(t=0),(Nn(Ln,this)||this.show)&&(this.sdk!==e?(Tn(Ln,this,2!=t&&3!=t?0:t),this.isShowView=!0,Nn(Ln,this)?this.show=2!=t:this.show=!0):Tn(Ln,this,0))}},{key:"name",get:function(){return this.options.name},set:function(t){this.options.name=t,this.label&&(this.label.text=t),this._elms.name&&this._elms.name.forEach((function(e){e.value=t}))}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.isShowView||(this.options.show=t,this.originalOptions&&(this.originalOptions.show=t)),this.showView&&3!=this.showView?(this.entity&&(this.entity.show=!1),this.options.label&&this.options.label.show&&this.label&&(this.label.show=!1)):(this.entity&&(this.entity.show=this.options.show),this.options.label&&this.options.label.show&&this.label&&(this.label.show=this.options.show)),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=this.options.show),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this.isShowView=!1):console.error("参数必须为boolean")}},{key:"attributeSelect",get:function(){return[{name:"富文本",value:"富文本",key:"richText"},{name:"链接",value:"链接",key:"link"}]}},{key:"display",value:function(){this.show=!0}},{key:"hide",value:function(){this.show=!1}},{key:"flicker",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,i=arguments.length>1?arguments[1]:void 0;this.flickerAnimate&&TWEEN.remove(this.flickerAnimate),this.flickerAnimate=new TWEEN.Tween({degree:1}).to({degree:0},e/2).easing(TWEEN.Easing.Linear.None).repeat(i||0===i?2*i-1:1/0).yoyo(!0).onUpdate(function(){var e=o()(a.a.mark((function e(i,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.sdk.viewer){e.next=3;break}return TWEEN.remove(t.flickerAnimate),e.abrupt("return");case 3:t.show&&(1===i.degree&&(t.entity&&(t.entity.show=!0),t.labelShow&&t.label&&(t.label.show=!0),t.text&&t.text&&(t.text.show=!0)),0===i.degree&&(t.entity&&(t.entity.show=!1),t.labelShow&&t.label&&(t.label.show=!1),t.text&&t.text&&(t.text.show=!1)));case 4:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()).onComplete((function(e){TWEEN.remove(t.flickerAnimate),t.flickerAnimate=void 0})).start()}},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Mn({},this.options.position):this.options.positions?l=Mn({},this.options.positions[0]):this.options.line&&this.options.line.positions?l=Mn({},this.options.line.positions[0]):this.options.center?l=Mn({},this.options.center):this.options.start?l=Mn({},this.options.start):this.geojson?(c=turf.bbox(this.geojson),l={lng:c[0],lat:c[1]}):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=26;break;case 25:this.sdk.viewer.flyTo(this.entity,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-60),roll:Cesium.Math.toRadians(0)}});case 26:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sdk.removeIncetance(this.options.id);case 2:this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),be(this.sdk,this.options.id),re(this.sdk,this.options.id);case 6:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"onClick",get:function(){return this.clickCallBack},set:function(t){if(t&&"function"!=typeof t)console.error("val:",t,"不是一个function");else{var e=le().sdkD;e&&this.sdk===e?null==this.clickCallBack&&this.options&&this.options.id&&function(t,e,i){Ct.set(t,{callback:e,that:i})}(this.options.id,this.leftClickCB,this):null==this.clickCallBack&&this.options&&this.options.id&&dt(this.options.id,this.leftClickCB,this),this.clickCallBack=t}}},{key:"onRightClick",get:function(){return this.rightClickCallBack},set:function(t){if(t&&"function"!=typeof t)console.error("val:",t,"不是一个function");else{var e=le().sdkD;e&&this.sdk===e?null==this.rightClickCallBack&&this.entity&&this.entity.id&&function(t,e,i){wt.set(t,{callback:e,that:i})}(this.entity.id,this.rightClickCB,this):null==this.rightClickCallBack&&this.entity&&this.entity.id&&mt(this.entity.id,this.rightClickCB,this),this.rightClickCallBack=t}}},{key:"onMouseMove",get:function(){return this.mouseMoveCallBack},set:function(t){if(t&&"function"!=typeof t)console.error("val:",t,"不是一个function");else{var e=le().sdkD;e&&this.sdk===e?null==this.mouseMoveCallBack&&this.entity&&this.entity.id&&function(t,e,i){kt.set(t,{callback:e,that:i})}(this.entity.id,this.mouseMoveCB,this):null==this.mouseMoveCallBack&&this.entity&&this.entity.id&&ft(this.entity.id,this.mouseMoveCB,this),this.mouseMoveCallBack=t}}},{key:"customView",get:function(){return this.options.customView}},{key:"setCustomView",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=4;break}this.options.customView=e,t.next=16;break;case 4:if(i=this.sdk.viewer.camera,n=this.cartesian3Towgs84(i.position,this.sdk.viewer),o={lng:0,lat:0},s=Mn({},n),this.options.position?o=Mn({},this.options.position):this.options.positions?o=Mn({},this.options.positions[0]):this.options.line&&this.options.line.positions?o=Mn({},this.options.line.positions[0]):this.options.center?o=Mn({},this.options.center):this.options.start?o=Mn({},this.options.start):this.geojson?(r=turf.bbox(this.geojson),o={lng:r[0],lat:r[1]}):(this.options.hasOwnProperty("lng")&&(o.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(o.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(o.alt=this.options.alt)),o.hasOwnProperty("alt")){t.next=13;break}return t.next=12,this.getClampToHeight(o);case 12:o.alt=t.sent;case 13:s={lng:n.lng-o.lng,lat:n.lat-o.lat,alt:n.alt-o.alt},this.options.customView={orientation:{heading:Cesium.Math.toDegrees(i.heading),pitch:Cesium.Math.toDegrees(i.pitch),roll:Cesium.Math.toDegrees(i.roll)},relativePosition:s},this.originalOptions&&(this.originalOptions.customView=this.options.customView);case 16:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"resetCustomView",value:function(){this.options.customView=void 0}},{key:"edit",value:function(){}},{key:"leftClickCB",value:function(t,e,i,n){n.clickCallBack&&"function"==typeof n.clickCallBack&&n.clickCallBack(t,e,i)}},{key:"rightClickCB",value:function(t,e,i,n){n.rightClickCallBack&&"function"==typeof n.rightClickCallBack&&n.rightClickCallBack(t,e,i)}},{key:"mouseMoveCB",value:function(t,e,i,n){n.mouseMoveCallBack&&"function"==typeof n.mouseMoveCallBack&&n.mouseMoveCallBack(t,e,i)}},{key:"getGuid",value:function(){return Cesium.createGuid()}},{key:"setDefaultValue",value:function(){var t,e,i;this.options.id=null!==(t=this.options.id)&&void 0!==t?t:this.getGuid(),this.options.show=null===(e=this.options.show)||void 0===e||e,this.options.name=null!==(i=this.options.name)&&void 0!==i?i:"未命名对象"}},{key:"start",value:function(){}},{key:"end",value:function(){}}]);var i,n,s}(ai);function In(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">透明度</span>\n <input type="range" min="0" max="1" step="0.01" @model="transparency">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">波纹层数</span>\n <div class="input-number input-number-unit">\n <input class="input" type="number" title="" min="1" max="10" @model="count">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lat">\n </div>\n <div class="col">\n <span class="label">扩散速度</span>\n <div class="input-number input-number-unit">\n <input class="input" type="number" title="" min="0" max="20" @model="speed">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col input-radius-unit-box" style="margin: 0;">\n <span class="label">半径单位</span>\n <div class="input-radius-unit"></div>\n </div>\n <div class="col" style="margin: 0;">\n </div>\n <div class="col" style="margin: 0;">\n </div>\n </div>\n <div class="row circle-content-box">\n <div class="col">\n <span class="label"></span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lat">\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="circle-diffuse-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}var Fn=[{name:"黑体",value:"黑体",font:"SimHei",key:"0"},{name:"思源黑体",value:"思源黑体",font:"SourceHanSansTi",key:"1"},{name:"庞门正道标题体",value:"庞门正道标题体",font:"PMZDBTTi",key:"2"},{name:"数黑体",value:"数黑体",font:"AlimamaShuHeiTi",key:"3"}];function Rn(){return Fn}function zn(t){for(var e=0;e<Fn.length;e++)if(Fn[e].key==t)return Fn[e].font}function Hn(t){for(var e=0;e<Fn.length;e++)if(Fn[e].key==t)return Fn[e].name}function Vn(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Gn(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Un(t,e){return t.get(Wn(t,e))}function Wn(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Yn=new WeakMap,Jn=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;k()(this,e),Gn(i=Vn(this,e,[t,n]),Yn,void 0),i.model=o,i.options.near=n.near||0===n.near?n.near:2e3,i.options.far=n.far||0===n.far?n.far:1e5,i.options.scaleByDistance=n.scaleByDistance||!1,i.options.show=!n.show&&!1!==n.show||n.show,i.options.text=n.text;for(var s=i.options.text.split("\n"),a=0;a<s.length;a++)s[a].length>40&&(s[a]=s[a].slice(0,40-s[a].length));return s.length>10&&s.splice(10-s.length),i.options.text=s.join("\n"),i.options.fontFamily=n.fontFamily||0,i.font=zn(i.options.fontFamily)||"SimHei",i.options.fontSize=n.fontSize||20,i.options.lineWidth=n.lineWidth||4,i.options.lineColor=n.lineColor||"#00ffff80",i.options.color=n.color||"#ffffff",i.options.ground=!n.ground&&!1!==n.ground||n.ground,i.options.pixelOffset=n.pixelOffset||0===n.pixelOffset?n.pixelOffset:20,i.options.backgroundColor=n.backgroundColor||["#00ffff80","#00ffff80"],i.event=new X(i.sdk),i.entity,i.create(i.options.position),i.picking=!0,i}return Xi()(e,t),_()(e,[{key:"create",value:(i=o()(a.a.mark((function t(){var e,i,n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this,this.options.position[2]||0===this.options.position[2]){t.next=5;break}return t.next=4,this.getClampToHeight({lng:this.options.position[0],lat:this.options.position[1]});case 4:this.options.position[2]=t.sent;case 5:this.originalOptions=qn(this.options),i=this.options.id+"-label",(n=this.sdk.viewer.entities.getById(i))&&this.sdk.viewer.entities.remove(n),this.entity=this.sdk.viewer.entities.add({show:this.options.show,id:this.options.id+"-label",position:new Cesium.CallbackProperty((function(){if(e.model){if(e.model.isMove){var t=e.model.customScale.x;e.model.customScale.y>t&&(t=e.model.customScale.y),e.model.customScale.z>t&&(t=e.model.customScale.z);for(var i=Cesium.Cartesian3.fromDegrees(e.options.position[0],e.options.position[1],e.options.position[2]+2*(e.model.originalBoundingSphereRadius||1)*(t||.01)),n=Cesium.Cartesian3.fromDegrees(e.options.position[0],e.options.position[1],e.options.position[2]-2*(e.model.originalBoundingSphereRadius||1)*(t||.01)),o=Cesium.Cartesian3.subtract(n,i,new Cesium.Cartesian3),s=Cesium.Cartesian3.normalize(o,o),a=new Cesium.Ray(i,s),r=e.viewer.scene.drillPickFromRay(a,5),l=0;l<r.length;l++)if(r[l].object&&r[l].object.id&&r[l].object.id===e.model.id){var c=e.cartesian3Towgs84(r[l].position,e.sdk.viewer);e.options.position[0]=c.lng,e.options.position[1]=c.lat,e.options.position[2]=c.alt;break}}return Cesium.Cartesian3.fromDegrees(e.options.position[0],e.options.position[1],e.options.position[2])}var u;return(u=Cesium.Cartesian3).fromDegrees.apply(u,L()(e.options.position))}),!1),billboard:{image:this.getcanvas(),verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:Number.POSITIVE_INFINITY}),!1),scaleByDistance:this.options.scaleByDistance?new Cesium.NearFarScalar(this.options.near,1,this.options.far,0):void 0,pixelOffsetScaleByDistance:this.options.scaleByDistance?new Cesium.NearFarScalar(this.options.near,1,this.options.far,0):void 0}});case 10:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"position",get:function(){return this.options.position},set:function(t){var e=this;if(this.options.position=t,t[2]||0===t[2])this.options.position=L()(t);else{var i=L()(this.sdk.viewer.entities.values);this.getClampToHeight({lng:t[0],lat:t[1]},i).then((function(i){t[2]=i,e.options.position=L()(t)}))}}},{key:"show",get:function(){return this.options.show},set:function(t){var e=this;if(this.options.show=t,this.entity)if(this.entity.show=t,this.model){var i=this.model.customScale.x;this.model.customScale.y>i&&(i=this.model.customScale.y),this.model.customScale.z>i&&(i=this.model.customScale.z);for(var n=Cesium.Cartesian3.fromDegrees(this.options.position[0],this.options.position[1],this.options.position[2]+2*(this.model.originalBoundingSphereRadius||1)*(i||.01)),o=Cesium.Cartesian3.fromDegrees(this.options.position[0],this.options.position[1],this.options.position[2]-2*(this.model.originalBoundingSphereRadius||1)*(i||.01)),s=Cesium.Cartesian3.subtract(o,n,new Cesium.Cartesian3),a=Cesium.Cartesian3.normalize(s,s),r=new Cesium.Ray(n,a),l=this.viewer.scene.drillPickFromRay(r,5),c=0;c<l.length;c++)if(l[c].object&&l[c].object.id&&l[c].object.id===this.model.id){var u=this.cartesian3Towgs84(l[c].position,this.sdk.viewer);this.options.position[0]=u.lng,this.options.position[1]=u.lat,this.options.position[2]=u.alt;break}}else if(this.options.ground){var p=L()(this.sdk.viewer.entities.values);this.getClampToHeight({lng:this.options.position[0],lat:this.options.position[1]},p).then((function(t){e.options.position[2]=t}))}}},{key:"text",get:function(){return this.options.text},set:function(t){this.options.text=t;for(var e=this.options.text.split("\n"),i=0;i<e.length;i++)e[i].length>40&&(e[i]=e[i].slice(0,40-e[i].length));e.length>10&&e.splice(10-e.length),this.options.text=e.join("\n"),this.entity&&this.updateBillboardImage()}},{key:"color",get:function(){return this.options.color},set:function(t){this.options.color=t,this.entity&&(this.entity.billboard.image=this.getcanvas())}},{key:"scaleByDistance",get:function(){return this.options.scaleByDistance},set:function(t){this.options.scaleByDistance=t,this.entity&&(this.options.scaleByDistance?(this.entity.billboard.scaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0),this.entity.billboard.pixelOffsetScaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0)):(this.entity.billboard.scaleByDistance=void 0,this.entity.billboard.pixelOffsetScaleByDistance=void 0))}},{key:"near",get:function(){return this.options.near},set:function(t){var e=t;e>this.far&&(e=this.far),this.options.near=e,this.entity&&(this.options.scaleByDistance?(this.entity.billboard.scaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0),this.entity.billboard.pixelOffsetScaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0)):(this.entity.billboard.scaleByDistance=void 0,this.entity.billboard.pixelOffsetScaleByDistance=void 0))}},{key:"far",get:function(){return this.options.far},set:function(t){var e=t;e<this.near&&(e=this.near),this.options.far=e,this.entity&&(this.options.scaleByDistance?(this.entity.billboard.scaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0),this.entity.billboard.pixelOffsetScaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0)):(this.entity.billboard.scaleByDistance=void 0,this.entity.billboard.pixelOffsetScaleByDistance=void 0))}},{key:"fontSize",get:function(){return this.options.fontSize},set:function(t){this.options.fontSize=Number(t),this.entity&&this.updateBillboardImage()}},{key:"fontFamily",get:function(){return this.options.fontFamily},set:function(t){this.options.fontFamily=t||0,this.font=zn(this.options.fontFamily)||"SimHei",this.updateBillboardImage()}},{key:"lineWidth",get:function(){return this.options.lineWidth},set:function(t){this.options.lineWidth=Number(t)||0===Number(t)?Number(t):4,this.entity&&this.updateBillboardImage()}},{key:"pixelOffset",get:function(){return this.options.pixelOffset},set:function(t){this.options.pixelOffset=Number(t),this.entity&&this.updateBillboardImage()}},{key:"updateBillboardImage",value:function(){var t,e,i,n=this;clearTimeout(Un(Yn,this)),t=Yn,e=this,i=setTimeout((function(){clearTimeout(Un(Yn,n)),n.entity.billboard.image=n.getcanvas()}),500),t.set(Wn(t,e),i)}},{key:"lineColor",get:function(){return this.options.pixelOffset},set:function(t){this.options.lineColor=t||"#00ffff80",this.entity&&(this.entity.billboard.image=this.getcanvas())}},{key:"backgroundColor",get:function(){return this.options.backgroundColor},set:function(t){this.options.backgroundColor=t,this.entity&&(this.entity.billboard.image=this.getcanvas())}},{key:"ground",get:function(){return this.options.ground},set:function(t){this.options.ground=t}},{key:"getcanvas",value:function(){var t=document.createElement("canvas"),e=t.getContext("2d");e.font=this.options.fontSize+"px "+this.font;for(var i=this.options.text.split("\n"),n=0,o=0,s=0;s<i.length;s++){var a=i[s],r=e.measureText(a).width;r>n&&(n=r),o+=this.options.fontSize}o=o+20+5*(i.length-1),(n+=30)<this.options.lineWidth&&(n=this.options.lineWidth),t.width=n,t.height=this.options.pixelOffset+o;var l=e.createLinearGradient(0,0,n,o+20);l.addColorStop(0,this.options.backgroundColor[0]),l.addColorStop(1,this.options.backgroundColor[1]),e.fillStyle=l,e.fillRect(0,0,n,o),e.fillStyle=this.options.color,e.font=this.options.fontSize+"px "+this.font;for(var c=0,u=0;u<i.length;u++){var p=e.measureText(i[u]).width;c<p&&(c=p)}for(var h=(n-(c+=30))/2,d=0;d<i.length;d++){var m=i[d];this.options.fontSize<10?e.fillText(m,15+h,this.options.fontSize*(d+1)+10+5*d):e.fillText(m,15+h,this.options.fontSize*(d+1)+100/this.options.fontSize+5*d)}e.strokeStyle=this.options.lineColor,e.setLineDash([4,4]),e.lineWidth=this.options.lineWidth,e.beginPath(),e.moveTo(n/2,o),e.lineTo(n/2,o+this.options.pixelOffset),e.stroke(),e.closePath();var f=document.createElement("canvas"),v=f.getContext("2d");return f.width=t.width+10,f.height=t.height+10,v.drawImage(t,5,5),f}},{key:"remove",value:function(){this.sdk.viewer.entities.remove(this.entity),this.entity=null}},{key:"flicker",value:function(){}}]);var i}(jn),qn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=null;if("object"==N()(t)&&null!==t)for(var i in e=t instanceof Array?[]:{},t)e[i]=qn(t[i]);else e=t;return e},Xn=function(){return _()((function t(e){k()(this,t),t.prototype.hasOwnProperty("color")||Object.defineProperties(t.prototype,{color:Cesium.createPropertyDescriptor("color")}),t.prototype.hasOwnProperty("speed")||Object.defineProperties(t.prototype,{speed:Cesium.createPropertyDescriptor("speed")}),t.prototype.hasOwnProperty("transparency")||Object.defineProperties(t.prototype,{transparency:Cesium.createPropertyDescriptor("transparency")}),t.prototype.hasOwnProperty("count")||Object.defineProperties(t.prototype,{count:Cesium.createPropertyDescriptor("count")}),t.prototype.hasOwnProperty("gradient")||Object.defineProperties(t.prototype,{gradient:Cesium.createPropertyDescriptor("gradient")}),this._definitionChanged=new Cesium.Event,this._speed=void 0,this.id=e.id,this.color=e.color||new Cesium.Color(1,1,1,1),this.colors=e.colors||{},this.speed=e.speed,this.transparency=e.transparency,this.count=e.count,this.gradient=e.gradient;var i="",n=[];for(var o in this.colors)Object.hasOwnProperty.call(this.colors,o)&&n.push(o);n.sort((function(t,e){return e-t}));for(var s=0;s<n.length;s++){var a=this.colors[n[s]];i+="\n if(dis < float(".concat(Number(n[s])/2,")) {\n material.diffuse = 1.5 * vec4(").concat(a.red,",").concat(a.green,",").concat(a.blue,",").concat(a.alpha,").rgb;\n }\n ")}this._source="\n uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n uniform float transparency;\n uniform float frameNumber;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(frameNumber * speed / 30000.0);\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n }else {\n ".concat(i,"\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 99; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n }\n else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient))) * transparency;\n }\n }\n }\n }\n return material;\n }\n "),this._CircleRippleMaterialType="CircleRippleMaterialType"+this.id,Cesium.Material._materialCache.addMaterial(this._CircleRippleMaterialType,{fabric:{type:this._CircleRippleMaterialType,uniforms:{color:new Cesium.Color(1,0,0,1),speed:3,transparency:1,count:4,gradient:.2,frameNumber:Cesium.getTimestamp()},source:this._source},translucent:function(t){return!0}})}),[{key:"isConstant",get:function(){return!1}},{key:"definitionChanged",get:function(){return this._definitionChanged}},{key:"getType",value:function(t){return this._CircleRippleMaterialType}},{key:"getValue",value:function(t,e){return Cesium.defined(e)||(e={}),e.color=Cesium.Property.getValueOrDefault(this._color,t,Cesium.Color.RED,e.color),e.speed=Cesium.Property.getValueOrDefault(this._speed,t,10,e.speed),e.transparency=this.transparency,e.count=this.count,e.gradient=this.gradient,e.frameNumber=Cesium.getTimestamp(),e}},{key:"equals",value:function(t){return this===t||t instanceof CircleRippleMaterialProperty&&Cesium.Property.equals(this._color,t._color)&&Cesium.Property.equals(this._speed,t._speed)&&Cesium.Property.equals(this.count,t.count)&&Cesium.Property.equals(this.transparency,t.transparency)&&Cesium.Property.equals(this.gradient,t.gradient)}}])}();function Zn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Kn(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Zn(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Zn(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function $n(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Qn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Qn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Qn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function to(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var eo=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};k()(this,e),(i=to(this,e,[t,n])).options.lng=n.lng,i.options.lat=n.lat,i.options.color=n.color||"#1FA8E3",i.options.colors=n.colors||[],i.options.transparency=n.transparency||0===n.transparency?n.transparency:1,i.options.transparency>1&&(i.options.transparency=1),i.options.speed=n.speed||0===n.speed?n.speed:5,i.options.count=n.count||0===n.count?n.count:3,n.count||0===n.count?(i.options.count=n.count,n.count>99&&(i.options.count=99)):i.options.count=3,i.options.circle=n.circle||[{radius:10}];for(var s=0;s<i.options.circle.length;s++)i.options.circle[s].radius>999999&&(i.options.circle[s].radius=999999);i.options.show=!n.show&&!1!==n.show||n.show,i.event=new X(i.sdk),i.options.positionEditin=!1,n.label=n.label||{},i._elms={},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.instruct=n.instruct||"",i.options.operatingPoint=n.operatingPoint||"",i.options.attribute=n.attribute||{},i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.ISC=i.options.attribute.ISC||{},i.options.attribute.ISC.content=i.options.attribute.ISC.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText";for(var a=0,r=0;r<i.options.circle.length;r++)Number(i.options.circle[r].radius)>a&&(a=Number(i.options.circle[r].radius));return i._radius=a,i.Dialog=o,i._EventBinding=new hn,i.sdk.addIncetance(i.options.id,i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"CircleDiffuse"}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.isShowView||(this.options.show=t),this.showView&&3!=this.showView?(this.entity.show=!1,this.options.label.show&&(this.label.show=!1)):(this.entity.show=this.options.show,this.options.label.show&&(this.label.show=this.options.show)),this.isShowView=!1,be(this.sdk,this.options.id),re(this.sdk,this.options.id),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t)):console.error("参数必须为boolean")}},{key:"positionEditing",get:function(){return this.options.positionEditing},set:function(t){var e=this;this.sdk&&this.sdk.viewer&&this.entity&&(this.options.positionEditing=t,!0===t?(this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1,this.lastOptions={lng:this.options.lng,lat:this.options.lat},this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.lastOptions=void 0,e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=t.lng,e.lat=t.lat,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.lastOptions=void 0,e.positionEditing=!1}}))}))):(setTimeout((function(){e.picking=!0}),500),this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){}))),this.tip&&this.tip.destroy(),this.lastOptions&&(this.lng=this.lastOptions.lng,this.lat=this.lastOptions.lat),this.lastOptions=void 0))}},{key:"lng",get:function(){return this.options.lng},set:function(t){this.options.lng=t,this.label.position=[t,this.lat],this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.lat},set:function(t){this.options.lat=t,this.label.position=[this.lng,t],this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"radius",get:function(){return this._radius}},{key:"circle",get:function(){return this.options.circle},set:function(t){console.log(t),this.options.circle=t||[{radius:10}];for(var e=0;e<this.options.circle.length;e++)this.options.circle[e].radius>999999&&(this.options.circle[e].radius=999999);this._createCircleElm()}},{key:"speed",get:function(){return this.options.speed},set:function(t){this.options.speed=t,e.create(this),this._elms.speed&&this._elms.speed.forEach((function(e){e.value=t}))}},{key:"transparency",get:function(){return this.options.transparency},set:function(t){this.options.transparency=t>1?1:t,e.create(this),this._elms.transparency&&this._elms.transparency.forEach((function(e){e.value=t}))}},{key:"count",get:function(){return this.options.count},set:function(t){this.options.count=t>99?99:t,e.create(this),this._elms.count&&this._elms.count.forEach((function(e){e.value=t}))}},{key:"colors",get:function(){return this.options.colors},set:function(t){this.options.colors=t,e.create(this)}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,!this.show||this.showView&&3!=this.showView?this.label.show=!1:this.label.show=t,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=$n(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=$n(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeISC",get:function(){return this.options.attribute.ISC.content},set:function(t){this.options.attribute.ISC.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=$n(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=$n(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"flyTo",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Kn({},this.options.position):this.options.positions?l=Kn({},this.options.positions[0]):this.options.center?l=Kn({},this.options.center):this.options.start?l=Kn({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=27;break;case 23:return t.next=25,this.getClampToHeight({lng:this.options.lng,lat:this.options.lat});case 25:c=t.sent,this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat,6*this.radius+c),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)},duration:1});case 27:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"edit",value:(s=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=28;break}return t.next=6,new Ki(this.sdk,this.options,{title:"扩散光波属性",left:"180px",top:"100px",confirmCallBack:function(t){c.name=c.name.trim(),c.name||(c.name="未命名对象"),c.options.label.position={lng:c.label.position[0],lat:c.label.position[1],alt:c.label.position[2]},c.originalOptions=c.deepCopyObj(c.options),c._DialogObject.close(),c.Dialog.confirmCallBack&&c.Dialog.confirmCallBack(c.originalOptions),be(c.sdk,c.options.id),re(c.sdk,c.options.id)},resetCallBack:function(){c.reset(),c.Dialog.resetCallBack&&c.Dialog.resetCallBack()},removeCallBack:function(){c.Dialog.removeCallBack&&c.Dialog.removeCallBack()},closeCallBack:function(){c.reset(),c.positionEditing=!1,c.Dialog.closeCallBack&&c.Dialog.closeCallBack()},showCallBack:function(t){c.options.show=t,c.originalOptions.show=t,c.show=t,c.Dialog.showCallBack&&c.Dialog.showCallBack()},translationalCallBack:function(){c.positionEditing=!c.positionEditing}},!0);case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" circle-ciffuse",(i=document.createElement("div")).innerHTML=In(this),this._DialogObject.contentAppChild(i),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,this.attributeISC=this.options.attribute.ISC.content,this._createCircleElm(),new dn("circle-diffuse-edit-tabs",void 0,this.sdk),n=new YJColorPicker({el:i.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){c.labelColor=t},clear:function(){c.labelColor="rgba(255,255,255,1)"}}),o=new YJColorPicker({el:i.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){c.labelLineColor=t},clear:function(){c.labelLineColor="rgba(255,255,255,1)"}}),s=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){c.labelBackgroundColorStart=t},clear:function(){c.labelBackgroundColorStart="rgba(255,255,255,1)"}}),r=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){c.labelBackgroundColorEnd=t},clear:function(){c.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),l=i.getElementsByTagName("*"),this._EventBinding.on(this,l),this._elms=this._EventBinding.element,this._elms.labelColor=[n],this._elms.labelLineColor=[o],this._elms.labelBackgroundColorStart=[s],this._elms.labelBackgroundColorEnd=[r],setTimeout((function(){c.attributeLink=c.options.attribute.link.content,c.attributeVr=c.options.attribute.vr.content,c.ISCSelect&&c.ISCSelect(),c.goodsSelect&&c.goodsSelect(),c.cameraSelect&&c.cameraSelect();var t=Y(c._DialogObject._element.content.getElementsByClassName("input-radius-unit-box")[0],".input-radius-unit");if(t){t.legp_search([{name:"米",value:"米"},{name:"千米",value:"千米"}]);var e=c._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0];e.value="米",e.addEventListener("input",(function(){var t=c._DialogObject._element.content.getElementsByClassName("circle-content-box")[0].getElementsByClassName("input-number");switch(e.value){case"米":for(var i=0;i<t.length;i++){var n=t[i].getElementsByClassName("unit")[0],o=t[i].getElementsByTagName("input")[0];"km"===n.innerHTML&&(n.innerHTML="m",o.value=Math.floor(1e3*o.value*100)/100)}break;case"千米":for(var s=0;s<t.length;s++){var a=t[s].getElementsByClassName("unit")[0],r=t[s].getElementsByTagName("input")[0];"m"===a.innerHTML&&(a.innerHTML="km",r.value=Math.floor(1e5*Number((r.value/1e3).toFixed(5)))/1e5)}}}))}var i=c.attributeSelect,n=c._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(n){var o=Y(n,".attribute-select");o.legp_search(i);for(var s=c._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],a=0;a<i.length;a++)if(i[a].key===c.options.attributeType){s.value=i[a].value,o.legp_searchActive(i[a].value);break}s.addEventListener("input",(function(){for(var t=0;t<i.length;t++)if(i[t].value===s.value){c.attributeType=i[t].key;break}}))}var r=Rn(),l=Y(c._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(l){l.legp_search(r);var u=c._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];u.value=r[c.labelFontFamily].value;for(var p=0;p<r.length;p++)if(r[p].value==u.value){l.legp_searchActive(r[p].value);break}u.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===u.value){c.labelFontFamily=r[t].key;break}})),c._elms.labelFontFamily=[u]}}),0);case 28:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"reset",value:function(){if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.lng=this.originalOptions.lng,this.lat=this.originalOptions.lat,this.color=this.originalOptions.color,this.duration=this.originalOptions.duration,this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.attributeISC=this.options.attribute.ISC.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect();for(var t=0,i=0;i<this.options.circle.length;i++)Number(this.options.circle[i].radius)>t&&(t=Number(this.options.circle[i].radius));this._radius=t,e.create(this)}}},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.label.remove(),this.entity&&this.sdk.viewer.entities.remove(this.entity),this.entity2&&this.sdk.viewer.entities.remove(this.entity2),this.entity=null,this.entity2=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),t.next=10,this.sdk.removeIncetance(this.options.id);case 10:return t.next=12,be(this.sdk,this.options.id);case 12:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"_createCircleElm",value:function(){var t=this;if(this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content){var i=this._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0],n=i?i.value:"米",o=this._DialogObject._element.content.getElementsByClassName("circle-content-box")[0];o.innerHTML="";for(var s=function(i){var s=document.createElement("div");s.className="row";var a="",r='<button class="circle-minus"><svg class="icon-minus"><use xlink:href="#yj-icon-minus"></use></svg></button>';0===i&&i===t.options.circle.length-1&&(r=""),i===t.options.circle.length-1&&(a='<button class="circle-add" style="margin-left: 5px;"><svg class="icon-add2"><use xlink:href="#yj-icon-add2"></use></svg></button>'),s.innerHTML='\n <div class="col">\n <span class="label">半径</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="999999" style="width: 130px;">\n <span class="unit">'.concat("米"===n?"m":"km",'</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col" style="flex-direction: row-reverse;">\n <div class="color"></div>\n <span class="label">扩散颜色</span>\n </div>\n <div class="col" style="flex-direction: row-reverse;">\n ').concat(a,"\n ").concat(r,"\n </div>\n ");var l=s.getElementsByClassName("input")[0];l.value=t.options.circle[i].radius/("米"===n?1:1e3),l.addEventListener("input",(function(n){var o=t._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value;if(n.target.value||0===n.target.value){var s=n.target.value;if(s=Number(s),"."!=n.data&&("-"!=n.data||n.target.value)&&(!n.target.max&&!n.target.min||s<=Number(n.target.max)/("米"===o?1:1e3)&&s>=Number(n.target.min))){s="米"===o?Math.floor(100*s)/100:Math.floor(1e5*s)/1e5,t.options.circle[i].radius=s*("米"===o?1:1e3);for(var a=0,r=0;r<t.options.circle.length;r++)Number(t.options.circle[r].radius)>a&&(a=Number(t.options.circle[r].radius));t._radius=a,e.create(t)}}})),l.addEventListener("blur",(function(n){var o=t._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value;if(n.target.value||0===n.target.value){var s=n.target.value;s=Number(s),n.target.max&&s>Number(n.target.max)/("米"===o?1:1e3)&&(s=Number(n.target.max)/("米"===o?1:1e3)),n.target.min&&s<Number(n.target.min)&&(s=Number(n.target.min)),s="米"===o?Math.floor(100*s)/100:Math.floor(1e5*s)/1e5,t.options.circle[i].radius=s*("米"===o?1:1e3);for(var a=0,r=0;r<t.options.circle.length;r++)Number(t.options.circle[r].radius)>a&&(a=Number(t.options.circle[r].radius));t._radius=a,l.value=s,e.create(t)}}));new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!1,defaultColor:t.options.circle[i].color||t.options.color,disabled:!1,openPickerAni:"opacity",sure:function(n){t.options.circle[i].color=n,e.create(t)},clear:function(){t.options.circle[i].color="rgba(255,255,255,1)",e.create(t)}});var c=s.getElementsByClassName("circle-minus")[0];c&&c.addEventListener("click",(function(){t.options.circle.splice(i,1);for(var n=0,o=0;o<t.options.circle.length;o++)Number(t.options.circle[o].radius)>n&&(n=Number(t.options.circle[o].radius));t._radius=n,e.create(t),t._createCircleElm()}));var u=s.getElementsByClassName("circle-add")[0];u&&u.addEventListener("click",(function(){t.options.circle.push({radius:0,color:"rgba(255,255,255,1)"});for(var i=0,n=0;n<t.options.circle.length;n++)Number(t.options.circle[n].radius)>i&&(i=Number(t.options.circle[n].radius));t._radius=i,e.create(t),t._createCircleElm()})),o.appendChild(s)},a=0;a<this.options.circle.length;a++)s(a)}}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=document.getElementById(e.domid),n=Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat);this.sdk.viewer.scene.postRender.addEventListener((function(o){if("block"===i.style.display||""===i.style.display){var s=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);s&&(i.style.left=(s.x+e.x).toFixed(0)+"px",i.style.top=(s.y+e.y).toFixed(0)+"px")}}))}}],[{key:"create",value:function(t){for(var i={},n=0;n<t.options.circle.length;n++)i[t.options.circle[n].radius/t.radius]=Cesium.Color.fromCssColorString(t.options.circle[n].color||t.options.color);var o=t.sdk._entityZIndex;t.entity?(o=t.entity.ellipse.zIndex._value,t.sdk.viewer.entities.remove(t.entity),t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,position:new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegrees(t.options.lng,t.options.lat)}),!1),name:"波纹圆",ellipse:{semiMinorAxis:new Cesium.CallbackProperty((function(){return t.radius}),!1),semiMajorAxis:new Cesium.CallbackProperty((function(){return t.radius}),!1),material:new Xn({id:t.options.id,colors:i,transparency:t.options.transparency,speed:t.options.speed,count:t.options.count,gradient:.2}),zIndex:o}})):(t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,position:new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegrees(t.options.lng,t.options.lat)}),!1),name:"波纹圆",ellipse:{semiMinorAxis:new Cesium.CallbackProperty((function(){return t.radius}),!1),semiMajorAxis:new Cesium.CallbackProperty((function(){return t.radius}),!1),material:new Xn({id:t.options.id,colors:i,transparency:t.options.transparency,speed:t.options.speed,count:t.options.count,gradient:.2}),zIndex:o}}),t.options.show&&Qt(0,t.options.id),t.sdk._entityZIndex++,"cesium-viewer 2d"===t.sdk.viewer._element.className&&(t.entity.ellipse.height=1e6),e.createLabel(t),be(t.sdk,t.options.id))}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.options.label.position){t.next=5;break}return t.next=3,e.getClampToHeight({lng:e.options.lng,lat:e.options.lat});case 3:i=t.sent,e.options.label.position={lng:e.options.lng,lat:e.options.lat,alt:i};case 5:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:!0});case 6:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})}]);var i,n,s,r}(jn);function io(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">扫描颜色</span>\n <div class="color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">扫描半径</span>\n <div class="input-number input-number-unit-2 input-radius">\n <input class="input" type="number" title="" data-min="0.1" max="999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <div class="input-radius-unit-box" style="flex: 0 0 60px;">\n <div class="input-radius-unit"></div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n <div class="col">\n <span class="label">扫描速度</span>\n <input class="input" type="number" title="" min="0" max="100" @model="speed">\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="radar-scan-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function no(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function oo(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?no(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):no(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function so(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return ao(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ao(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function ao(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function ro(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var lo=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=ro(this,e,[t,n])).options.lng=n.lng,i.options.lat=n.lat,i.options.color=n.color||"#FFEB3B",i.options.radius=n.radius||10,i.options.radius>999999&&(i.options.radius=999999),i.options.speed=n.speed||0===n.speed?n.speed:20,i.options.show=!n.show&&!1!==n.show||n.show,i.event=new X(i.sdk),i.options.positionEditin=!1,n.label=n.label||{},i._elms={},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.instruct=n.instruct||"",i.options.operatingPoint=n.operatingPoint||"",i.options.attribute=n.attribute||{},i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera=i.options.attribute.camera.content||[],i.options.attribute.ISC=i.options.attribute.ISC||{},i.options.attribute.ISC.content=i.options.attribute.ISC.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.Dialog=o,i._EventBinding=new hn,i.sdk.addIncetance(i.options.id,i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.isShowView||(this.options.show=t),this.showView&&3!=this.showView?(this.entity.show=!1,this.options.label.show&&this.label&&(this.label.show=!1)):(this.entity.show=this.options.show,this.options.label.show&&this.label&&(this.label.show=this.options.show)),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this.isShowView=!1):console.error("参数必须为boolean")}},{key:"positionEditing",get:function(){return this.options.positionEditing},set:function(t){var e=this;!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity&&(this.options.positionEditing=t,!0===t?(this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1,this.lastOptions={lng:this.options.lng,lat:this.options.lat},this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.lastOptions=void 0,e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=t.lng,e.lat=t.lat,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.lastOptions=void 0,e.positionEditing=!1}}))}))):(setTimeout((function(){e.picking=!0}),500),this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){}))),this.tip&&this.tip.destroy(),this.lastOptions&&(this.lng=this.lastOptions.lng,this.lat=this.lastOptions.lat),this.lastOptions=void 0))}},{key:"lng",get:function(){return this.options.lng},set:function(t){this.options.lng=t,this.label.position=[t,this.lat],this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.lat},set:function(t){this.options.lat=t,this.label.position=[this.lng,t],this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"radius",get:function(){return this.options.radius},set:function(t){var e=Number(t.toFixed(2));(e>999999&&(e=999999),e<.1&&(e=.1),this.options.radius=e,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content)&&("千米"===this._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value&&(e=Number((e/1e3).toFixed(5))));this._elms.radius&&this._elms.radius.forEach((function(t){t.value=e}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){this.options.speed=t,this.changeMaterial(),this._elms.speed&&this._elms.speed.forEach((function(e){e.value=t}))}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t,this.changeMaterial(),this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,!this.show||this.showView&&3!=this.showView?this.label.show=!1:this.label.show=t,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=so(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=so(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeISC",get:function(){return this.options.attribute.ISC.content},set:function(t){this.options.attribute.ISC.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=so(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=so(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"flyTo",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=oo({},this.options.position):this.options.positions?l=oo({},this.options.positions[0]):this.options.center?l=oo({},this.options.center):this.options.start?l=oo({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=27;break;case 23:return t.next=25,this.getClampToHeight({lng:this.options.lng,lat:this.options.lat});case 25:c=t.sent,this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat,6*this.options.radius+c),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)},duration:1});case 27:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"edit",value:(s=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=34;break}return t.next=6,new Ki(this.sdk,this.options,{title:"雷达光波属性",left:"180px",top:"100px",confirmCallBack:function(t){p.name=p.name.trim(),p.name||(p.name="未命名对象"),p.options.label.position={lng:p.label.position[0],lat:p.label.position[1],alt:p.label.position[2]},p.originalOptions=p.deepCopyObj(p.options),p._DialogObject.close(),p.Dialog.confirmCallBack&&p.Dialog.confirmCallBack(p.originalOptions),be(p.sdk,p.options.id),re(p.sdk,p.options.id)},resetCallBack:function(){p.reset(),p.Dialog.resetCallBack&&p.Dialog.resetCallBack()},removeCallBack:function(){p.Dialog.removeCallBack&&p.Dialog.removeCallBack()},closeCallBack:function(){p.reset(),p.positionEditing=!1,p.Dialog.closeCallBack&&p.Dialog.closeCallBack()},showCallBack:function(t){p.options.show=t,p.originalOptions.show=t,p.show=t,p.Dialog.showCallBack&&p.Dialog.showCallBack()},translationalCallBack:function(){p.positionEditing=!p.positionEditing}},!0);case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" radar-scan",(i=document.createElement("div")).innerHTML=io(this),this._DialogObject.contentAppChild(i),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,this.attributeISC=this.options.attribute.ISC.content,new dn("radar-scan-edit-tabs",void 0,this.sdk),n=new YJColorPicker({el:i.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){p.color=t},clear:function(){p.color="rgba(255,255,255,1)"}}),o=new YJColorPicker({el:i.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelColor=t},clear:function(){p.labelColor="rgba(255,255,255,1)"}}),s=new YJColorPicker({el:i.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelLineColor=t},clear:function(){p.labelLineColor="rgba(255,255,255,1)"}}),r=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelBackgroundColorStart=t},clear:function(){p.labelBackgroundColorStart="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelBackgroundColorEnd=t},clear:function(){p.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),c=i.getElementsByTagName("*"),this._EventBinding.on(this,c),this._elms=this._EventBinding.element,this._elms.color=[n],this._elms.labelColor=[o],this._elms.labelLineColor=[s],this._elms.labelBackgroundColorStart=[r],this._elms.labelBackgroundColorEnd=[l],(u=this._DialogObject._element.content.getElementsByClassName("input-radius")[0].getElementsByTagName("input")[0]).value=this.options.radius,this._elms.radius=[u],u.addEventListener("input",(function(t){var e=p._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value;if(t.target.value||0===t.target.value){var i=t.target.value;i=Number(i),"."==t.data||"-"==t.data&&!t.target.value||(!t.target.max&&!t.target.min||i<=Number(t.target.max)/("米"===e?1:1e3)&&i>=Number(t.target.min))&&(p.radius=i*("米"===e?1:1e3))}})),u.addEventListener("blur",(function(t){var e=p._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value;if(t.target.value||0===t.target.value){var i=t.target.value;i=Number(i),t.target.max&&i>Number(t.target.max)/("米"===e?1:1e3)&&(i=Number(t.target.max)/("米"===e?1:1e3)),t.target.min&&i<Number(t.target.min)&&(i=Number(t.target.min)),p.radius=Number((i*("米"===e?1:1e3)).toFixed(2))}})),setTimeout((function(){p.attributeLink=p.options.attribute.link.content,p.attributeVr=p.options.attribute.vr.content,p.ISCSelect&&p.ISCSelect(),p.goodsSelect&&p.goodsSelect(),p.cameraSelect&&p.cameraSelect();var t=p.attributeSelect,e=p._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=e.getElementsByTagName("input")[0],o=0;o<t.length;o++)if(t[o].key===p.options.attributeType){n.value=t[o].value,i.legp_searchActive(t[o].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){p.attributeType=t[e].key;break}}))}var s=[{name:"米",value:"米"},{name:"千米",value:"千米"}],a=p._DialogObject._element.content.getElementsByClassName("input-radius-unit-box")[0];if(a){Y(a,".input-radius-unit").legp_search(s);var r=p._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0];r.value=s[0].value,r.addEventListener("input",(function(){var t=p._DialogObject._element.content.getElementsByClassName("input-radius")[0],e=t.getElementsByClassName("unit")[0],i=t.getElementsByClassName("input")[0];switch(r.value){case"米":"km"===e.innerHTML&&(e.innerHTML="m",i.value=Number((1e3*i.value).toFixed(2)));break;case"千米":"m"===e.innerHTML&&(e.innerHTML="km",i.value=Number((i.value/1e3).toFixed(5)))}}))}var l=Rn(),c=Y(p._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(c){c.legp_search(l);var u=p._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];u.value=l[p.labelFontFamily].value;for(var h=0;h<l.length;h++)if(l[h].value==u.value){c.legp_searchActive(l[h].value);break}u.addEventListener("input",(function(){for(var t=0;t<l.length;t++)if(l[t].value===u.value){p.labelFontFamily=l[t].key;break}})),p._elms.labelFontFamily=[u]}}),0);case 34:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.lng=this.originalOptions.lng,this.lat=this.originalOptions.lat,this.color=this.originalOptions.color,this.radius=this.originalOptions.radius,this.duration=this.originalOptions.duration,this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.attributeISC=this.options.attribute.ISC.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect())}},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.label.remove(),this.entity&&this.sdk.viewer.entities.remove(this.entity),this.entity2&&this.sdk.viewer.entities.remove(this.entity2),this.entity=null,this.entity2=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),t.next=10,this.sdk.removeIncetance(this.options.id);case 10:return t.next=12,be(this.sdk,this.options.id);case 12:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"changeMaterial",value:function(){var t=function(t){if(/^#/.test(t)){var e=t.replace("#",""),i=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16),s=parseInt(e.substring(6,8),16);s||0===s?s/=255:s=1,t="rgba(".concat(i,",").concat(n,",").concat(o,",").concat(s,")")}var a=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);return a?[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),a[4]?parseFloat(a[4]):1]:null}(this.options.color),e="rgba(".concat(t[0],",").concat(t[1],",").concat(t[2],",1)");this.entity&&(this.entity.ellipse.material=new Cesium.RadarScanMaterialProperty({color:Cesium.Color.fromCssColorString(e),transparency:t[3],speed:this.options.speed}))}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=document.getElementById(e.domid),n=Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat);this.sdk.viewer.scene.postRender.addEventListener((function(o){if("block"===i.style.display||""===i.style.display){var s=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);s&&(i.style.left=(s.x+e.x).toFixed(0)+"px",i.style.top=(s.y+e.y).toFixed(0)+"px")}}))}}],[{key:"create",value:function(t){var i=function(t){if(/^#/.test(t)){var e=t.replace("#",""),i=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16),s=parseInt(e.substring(6,8),16);s||0===s?s/=255:s=1,t="rgba(".concat(i,",").concat(n,",").concat(o,",").concat(s,")")}var a=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);return a?[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),a[4]?parseFloat(a[4]):1]:null}(t.options.color),n="rgba(".concat(i[0],",").concat(i[1],",").concat(i[2],",1)");t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,position:new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegrees(t.options.lng,t.options.lat)}),!1),name:"雷达扫描",ellipse:{semiMinorAxis:new Cesium.CallbackProperty((function(){return t.options.radius}),!1),semiMajorAxis:new Cesium.CallbackProperty((function(){return t.options.radius}),!1),material:new Cesium.RadarScanMaterialProperty({color:Cesium.Color.fromCssColorString(n),transparency:i[3],speed:t.options.speed}),zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,"cesium-viewer 2d"===t.sdk.viewer._element.className&&(t.entity.ellipse.height=1e6),e.createLabel(t),be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getClampToHeight({lng:e.options.lng,lat:e.options.lat});case 2:i=t.sent,e.options.label.position||(e.options.label.position={lng:e.options.lng,lat:e.options.lat,alt:i}),e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:!0});case 5:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"createBy2D",value:function(t){t.entity=new Cesium.EntityCollection;var i=0,n=r(t.options,t.options.radius,i),o=(new Date).getTime();t.viewer.clock.onTick.addEventListener((function(){var e=(new Date).getTime(),s=t.options.duration?360/t.options.duration:0,a=(e-o)*s;o=e,i+=a,n=r(t.options,t.options.radius,i)}));var s=t.sdk.viewer.entities.add({show:t.options.show,polyline:{positions:new Cesium.CallbackProperty((function(){var e=t.createCircle({lng:t.options.lng,lat:t.options.lat},t.options.radius);return Cesium.Cartesian3.fromDegreesArray(e)}),!1),width:2,material:Cesium.Color.fromCssColorString(t.options.color),clampToGround:!0}}),a=t.sdk.viewer.entities.add({show:t.options.show,polyline:{positions:new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegreesArray(n)}),!1),width:2,material:Cesium.Color.fromCssColorString(t.options.color),clampToGround:!0}});function r(t,e,i){var n=t.lng,o=t.lat,s=Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(n,o,0)),a=e*Math.cos(i*Math.PI/180),r=e*Math.sin(i*Math.PI/180),l=Cesium.Cartesian3.fromElements(a,r,0),c=Cesium.Matrix4.multiplyByPoint(s,l,new Cesium.Cartesian3),u=Cesium.Cartographic.fromCartesian(c);return[n,o,Cesium.Math.toDegrees(u.longitude),Cesium.Math.toDegrees(u.latitude)]}t.entity.add(s),t.entity.add(a),t.sdk.viewer.entities.add(t.entity),e.createLabel(t),be(t.sdk,t.options.id)}}]);var i,n,s,r}(jn);function co(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return uo(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?uo(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function uo(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function po(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ho(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?po(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):po(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function mo(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var fo=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=mo(this,e,[t,n])).options.near=n.near||0===n.near?n.near:2e3,i.options.far=n.far||0===n.far?n.far:1e5,i.options.scaleByDistance=!n.scaleByDistance&&!1!==n.scaleByDistance||n.scaleByDistance,i.options.show=!n.show&&!1!==n.show||n.show,i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:3,i.options.billboard=n.billboard=n.billboard||{},i.options.billboard.isSelect=n.billboard.isSelect||!1,i.options.billboard.show=!n.billboard.show&&!1!==n.billboard.show||n.billboard.show,i.options.billboard.image=n.billboard.image||We(n.billboard.defaultImage)||i.getSourceRootPath()+"/img/A-ablu-blank.png",i.options.billboard.defaultImage=n.billboard.defaultImage,i.options.billboard.scale=n.billboard.scale||0===n.billboard.scale?n.billboard.scale:3,n.label=n.label||{},i.options.label=n.label||{},i.options.label.text=n.label.text||i.options.name,i.options.name=i.options.label.text,i.options.label.show=!n.label.show&&!1!==n.label.show||n.label.show,i.options.label.fontFamily=n.label.fontFamily||0,i.options.label.fontSize=n.label.fontSize||39,i.options.label.color=n.label.color||"#00ffff",i.options.positions=n.positions=n.positions||{},i.options.positions.lng=Number(Number(n.positions.lng||0).toFixed(8)),i.options.positions.lat=Number(Number(n.positions.lat||0).toFixed(8)),i.options.positions.alt=Number(Number(n.positions.alt||0).toFixed(2)),i.options.instruct=n.instruct||"",i.options.operatingPoint=n.operatingPoint||"",i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.ISC=i.options.attribute.ISC||{},i.options.attribute.ISC.content=i.options.attribute.ISC.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.options.coordinate=n.coordinate||"",i.operate={},i._elms={},i.previous={positions:ho({},i.options.positions)},i.entity,i._proj=i.sdk.proj,i.sdk.addIncetance(i.options.id,i),e.create(i),i.picking=!0,i.Dialog=o,i._EventBinding=new hn,i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"BillboardObject"}},{key:"selectBillboard",value:function(){var t=this;this.sdk.viewer.screenSpaceEventHandler.setInputAction((function(e){var i=t.sdk.viewer.scene.pick(e.position);Cesium.defined(i)&&i.id&&"airportBillboard"===i.id.id?t.entity.billboard&&(t.entity.billboard.color=Cesium.Color.YELLOW):t.entity.billboard&&(t.entity.billboard.color=Cesium.Color.WHITE)}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}},{key:"attributeSelect",get:function(){return[{name:"富文本",value:"富文本",key:"richText"},{name:"链接",value:"链接",key:"link"},{name:"IP摄像头",value:"IP摄像头",key:"camera"},{name:"全景图",value:"全景图",key:"vr"},{name:"物资",value:"物资",key:"goods"}]}},{key:"show",get:function(){return this.options.show},set:function(t){this.isShowView||(this.options.show=t,this.originalOptions.show=t),this.showView&&3!=this.showView?this.entity&&(this.entity.show=!1):this.entity&&(this.entity.show=this.options.show),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=this.options.show),this.isShowView=!1}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var e;this.options.heightMode=t||0,this.options.heightMode=t||0==t?t:3;var i,n="";switch(this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&(i=this._DialogObject._element.content.getElementsByClassName("alt-box")[0]),this.options.heightMode){case"0":case 0:i&&(i.className="input-number input-number-unit-1 alt-box"),this._elms.height&&(this._elms.height.style.display="flex"),e=Cesium.HeightReference.NONE,n="海拔高度";break;case"1":case 1:i&&(i.className="input-number input-number-unit-1 alt-box"),this._elms.height&&(this._elms.height.style.display="flex"),e=Cesium.HeightReference.NONE,n="相对地表";break;case"2":case 2:i&&(i.className="input-number input-number-unit-1 alt-box disabled"),n="依附地表",i&&(i.className="input-number input-number-unit-1 alt-box disabled"),n="依附地表",e=Cesium.HeightReference.CLAMP_TO_GROUND,this._elms.height&&(this._elms.height.style.display="none");break;case"3":case 3:i&&(i.className="input-number input-number-unit-1 alt-box disabled"),this._elms.height&&(this._elms.height.style.display="none"),e=Cesium.HeightReference.NONE,n="依附模型"}this.entity&&(this.entity.billboard.heightReference=e,this.entity.label.heightReference=e),this._elms.heightMode&&(this._elms.heightMode.value=n)}},{key:"labelText",get:function(){return this.options.label.text},set:function(t){this.options.label.text=t,this.options.name=t,this.entity&&(this.entity.label.text=t+""),this._elms.labelText&&this._elms.labelText.forEach((function(e){e.value=t}))}},{key:"lng",get:function(){return this.options.positions.lng},set:function(t){this.options.positions.lng=Number(Number(t).toFixed(8)),this.renewPoint(),this.coordinate=this.options.coordinate,this._projConvert&&this._projConvert(),this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.positions.lat},set:function(t){this.options.positions.lat=Number(Number(t).toFixed(8)),this.renewPoint(),this.coordinate=this.options.coordinate,this._projConvert&&this._projConvert(),this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.positions.alt},set:function(t){var e=this;if(this.options.positions.alt=Number(Number(t).toFixed(2)),this.renewPoint(),this.coordinate=this.options.coordinate,this._elms.alt&&this._elms.alt.forEach((function(t){t.value=e.options.positions.alt})),this._elms.height){var i=this._elms.height.getElementsByClassName("height")[0];if(i)switch(this._elms.heightMode.value){case"海拔高度":i.value=this.options.positions.alt;break;case"相对地表":this.sdk.viewer.scene.terrainProvider.availability?Cesium.sampleTerrainMostDetailed(this.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(this.options.positions.lng,this.options.positions.lat)]).then((function(t){i.value=Number((e.options.positions.alt-t[0].height).toFixed(2))})):i.value=Number(Number(this.options.positions.alt).toFixed(2));break;case"依附地表":case"依附地表":break;case"依附模型":this.updateHeight()}}}},{key:"near",get:function(){return this.options.near},set:function(t){var e=t;e>this.far&&(e=this.far),this.options.near=e,this.renewPoint(),this._elms.near&&this._elms.near.forEach((function(t){t.value=e}))}},{key:"far",get:function(){return this.options.far},set:function(t){var e=t;e<this.near&&(e=this.near),this.options.far=e,this.renewPoint(),this._elms.far&&this._elms.far.forEach((function(t){t.value=e}))}},{key:"scaleByDistance",get:function(){return this.options.scaleByDistance},set:function(t){this.options.scaleByDistance=t,this.renewPoint(),this._elms.scaleByDistance&&this._elms.scaleByDistance.forEach((function(e){e.checked=t}))}},{key:"billboardShow",get:function(){return this.options.billboard.show},set:function(t){this.options.billboard.show=t,this.entity&&(this.entity.billboard.color=this.options.billboard.show?void 0:new Cesium.Color(1,1,1,0)),this._elms.billboardShow&&this._elms.billboardShow.forEach((function(e){e.value=t}))}},{key:"billboardImage",get:function(){var t=this.options.billboard.image;t&&!t.startsWith("http")&&(t.includes(":")||this.options.host&&(t=new URL(t,this.options.host).href));return t},set:function(t){var e=this;this.options.billboard.image=this.replaceHost(t,this.options.host);var i=this.options.billboard.image||We(this.options.billboard.defaultImage)||this.getSourceRootPath()+"/img/A-ablu-blank.png";this._elms.billboardImage&&this._elms.billboardImage.forEach((function(t){t.src=i}));var n;if(e.entity.billboard.image&&e.entity.billboard.image.getVa,i&&i.endsWith("gif")){!0;var o=document.createElement("img");o.setAttribute("rel:animated_src",i),o.setAttribute("rel:auto_play","1"),document.createElement("div").appendChild(o);var s=Cesium.createGuid();n=new SuperGif({gif:o}),this._superGif=n,this._superGif.id=s;var a=36,r=0;e._frameImages=[],n.load((function(t){if(404==t){return document.createElement("canvas"),ln()("canvas"),l.width=0,l.height=0,a=0,e.entity.billboard.imgWidth=0,e.entity.billboard.imgHeight=0,e.entity&&(e.entity.billboard.image=l),e.entity.billboard.height=new Cesium.CallbackProperty((function(){return 0}),!1),e.entity.label.pixelOffset=new Cesium.CallbackProperty((function(){return new Cesium.Cartesian2(0,0)}),!1),void(a=36)}if(e._superGif.id==s){for(var i=n.get_length(),o=1;o<=i;o++)n.move_to(o),e._frameImages.push(n.get_canvas().toDataURL());var l=n.get_canvas(),c=l.width,u=l.height;a=u*(31/c),e.entity.billboard.imgWidth=c,e.entity.billboard.imgHeight=u,e.entity&&(e.entity.billboard.image=new Cesium.CallbackProperty((function(){var t=e._frameImages[r];return r=r>=e._frameImages.length-1?0:r+1,t}),!1)),e.entity.billboard.height=new Cesium.CallbackProperty((function(){return a}),!1),e.entity.label.pixelOffset=new Cesium.CallbackProperty((function(){return e.options.billboard.show?new Cesium.Cartesian2(0,-a*e.options.billboard.scale-e.options.label.fontSize/2-5):new Cesium.Cartesian2(0,-e.options.label.fontSize/2-5)}),!1)}}))}else{var l=new Image;l.src=i;var c=36,u=document.createElement("canvas");l.onload=function(){var t=l.width/l.height;l.width=100,l.height=100/t;var i=l.width,n=l.height,o=u.getContext("2d",{willReadFrequently:!0});u.width=i,u.height=n,o.drawImage(l,0,0,i,n),c=n*(31/i),e.entity.billboard.imgWidth=i,e.entity.billboard.imgHeight=n,e.entity&&(e.entity.billboard.image=u),e.entity.billboard.height=new Cesium.CallbackProperty((function(){return c}),!1),e.entity.label.pixelOffset=new Cesium.CallbackProperty((function(){return e.options.billboard.show?new Cesium.Cartesian2(0,-c*e.options.billboard.scale-e.options.label.fontSize/2-5):new Cesium.Cartesian2(0,-e.options.label.fontSize/2-5)}),!1),c=n*(31/i)},l.onerror=function(t){u.width=0,u.height=0,c=0,e.entity.billboard.imgWidth=0,e.entity.billboard.imgHeight=0,e.entity&&(e.entity.billboard.image=u),e.entity.billboard.height=new Cesium.CallbackProperty((function(){return 0}),!1),e.entity.label.pixelOffset=new Cesium.CallbackProperty((function(){return new Cesium.Cartesian2(0,0)}),!1),c=36}}}},{key:"billboardScale",get:function(){return this.options.billboard.scale},set:function(t){this.options.billboard.scale=t,this.renewPoint(),this._elms.billboardScale&&this._elms.billboardScale.forEach((function(e){e.value=t}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.entity&&(this.entity.label.show=t),this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.value=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.renewPoint();var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.renewPoint(),this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t||"#00ffff",this.renewPoint(),this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.label.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(0,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=co(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=co(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeISC",get:function(){return this.options.attribute.ISC.content},set:function(t){this.options.attribute.ISC.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=co(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=co(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"billboardDefaultImage",get:function(){return We(this.options.billboard.defaultImage)||this.getSourceRootPath()+"/img/A-ablu-blank.png"},set:function(t){var e=this.replaceHost(t,this.options.host);Ue(e,this.options.billboard.defaultImage),this._elms.billboardDefaultImage&&this._elms.billboardDefaultImage.forEach((function(t){t.src=e}))}},{key:"coordinate",get:function(){return this.options.coordinate},set:function(t){this.options.coordinate=t;var e=this._proj.convert([{x:this.options.positions.lng,y:this.options.positions.lat,z:this.options.positions.alt}],"EPSG:4326",t).points;this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&e[0]&&(this._DialogObject._element.content.getElementsByClassName("convert-x")[0].value=e[0].x,this._DialogObject._element.content.getElementsByClassName("convert-y")[0].value=e[0].y,this._DialogObject._element.content.getElementsByClassName("convert-z")[0].value=e[0].z),this._elms.coordinate&&this._elms.coordinate.forEach((function(e){e.value=t}))}},{key:"edit",value:(l=o()(a.a.mark((function t(){var e,i,n,s,r,l,c,u,p,h,d=this,m=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=m.length>0&&void 0!==m[0]&&m[0],i=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=41;break}return t.next=7,new Ki(this.sdk,this.options,{title:"点属性",left:"180px",top:"100px",confirmCallBack:function(t){d.labelText=d.labelText.trim(),d.labelText||(d.labelText="未命名对象"),d.originalOptions=d.deepCopyObj(d.options),d._DialogObject.close();var e=d.deepCopyObj(d.options);e.host="",d.Dialog.confirmCallBack&&d.Dialog.confirmCallBack(e),be(d.sdk,d.options.id),re(d.sdk,d.options.id)},resetCallBack:function(){d.reset(),d.Dialog.resetCallBack&&d.Dialog.resetCallBack()},removeCallBack:function(){d.Dialog.removeCallBack&&d.Dialog.removeCallBack()},closeCallBack:function(){d.positionEditing=!1,setTimeout((function(){d.reset(),d.Dialog.closeCallBack&&d.Dialog.closeCallBack()}),0)},showCallBack:function(t){d.show=t,d.Dialog.showCallBack&&d.Dialog.showCallBack()},translationalCallBack:function(){d.positionEditing=!d.positionEditing},updateHeightCallBack:function(){d.updateHeight()}},!0);case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" billboard-object",(n=document.createElement("div")).innerHTML=Sn(this),this._DialogObject.contentAppChild(n),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,this.attributeISC=this.options.attribute.ISC.content,new dn("point-object-edit-tabs",void 0,this.sdk),s=new YJColorPicker({el:n.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){d.labelColor=t},clear:function(){d.labelColor="rgba(255,255,255,1)"}}),r=n.getElementsByTagName("*"),this._EventBinding.on(this,r),this._elms=this._EventBinding.element,this._elms.labelColor=[s],setTimeout(o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,m,f,v,g,b,C,w,k,x,_,E,S,D,M;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d.attributeLink=d.options.attribute.link.content,d.attributeVr=d.options.attribute.vr.content,d.cameraSelect&&d.cameraSelect(),d.ISCSelect&&d.ISCSelect(),d.goodsSelect&&d.goodsSelect(),e=d.attributeSelect,!(i=d._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0])){t.next=21;break}(n=Y(i,".attribute-select")).legp_search(e),o=d._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],s=0;case 12:if(!(s<e.length)){t.next=20;break}if(e[s].key!==d.options.attributeType){t.next=17;break}return o.value=e[s].value,n.legp_searchActive(e[s].value),t.abrupt("break",20);case 17:s++,t.next=12;break;case 20:o.addEventListener("input",(function(){for(var t=0;t<e.length;t++)if(e[t].value===o.value){d.attributeType=e[t].key;break}}));case 21:if(r=[],d.epsg_map.forEach((function(t,e){r.push({name:"".concat(t.name,"(").concat(t.epsg,")"),value:e})})),!(l=Y(d._DialogObject._element.content.getElementsByClassName("coordinate-select-box")[0],".coordinate-select"))){t.next=38;break}l.legp_search(r),c=d._DialogObject._element.content.getElementsByClassName("coordinate-select")[0].getElementsByTagName("input")[0],d.coordinate?d.coordinate=d.coordinate:d.coordinate=r[0].value,c.value=d.coordinate,u=0;case 30:if(!(u<r.length)){t.next=37;break}if(r[u].value!==r.value){t.next=34;break}return l.legp_searchActive(r[u].value),t.abrupt("break",37);case 34:u++,t.next=30;break;case 37:c.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===c.value){d.coordinate=r[t].value;break}}));case 38:p=document.getElementsByClassName("height-box")[0],h=p.getElementsByClassName("height")[0],m=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附地表",value:"依附地表",key:"2"},{name:"依附模型",value:"依附模型",key:"3"}],f=d.heightMode,t.t0=f,t.next=0===t.t0||"0"===t.t0?45:1===t.t0||"1"===t.t0?47:2===t.t0||"2"===t.t0||3===t.t0||"3"===t.t0?49:54;break;case 45:return h.value=d.alt,t.abrupt("break",54);case 47:return d.sdk.viewer.scene.terrainProvider.availability?Cesium.sampleTerrainMostDetailed(d.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(d.options.positions.lng,d.options.positions.lat)]).then((function(t){h.value=Number((d.alt-Number(t[0].height.toFixed(2))).toFixed(2))})):h.value=Number(d.alt.toFixed(2)),t.abrupt("break",54);case 49:v=[],g=co(d.sdk.entityMap);try{for(g.s();!(b=g.n()).done;)(C=y()(b.value,2))[0],"RadarScanStereoscopic"===(w=C[1]).type&&w.entity&&v.push(w.entity)}catch(t){g.e(t)}finally{g.f()}return d.getClampToHeight(d.options.positions,v).then((function(t){d.alt=Number(t.toFixed(2)),h.value=d.alt})),t.abrupt("break",54);case 54:if(!(k=Y(d._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode"))){t.next=72;break}k.legp_search(m),(x=d._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0]).value=m[d.heightMode].value,_=0;case 60:if(!(_<m.length)){t.next=67;break}if(m[_].value!=x.value){t.next=64;break}return k.legp_searchActive(m[_].value),t.abrupt("break",67);case 64:_++,t.next=60;break;case 67:x.addEventListener("input",(function(){for(var t=0;t<m.length;t++)if(m[t].value===x.value){switch(f=m[t].key){case 0:case"0":d.alt=Number(h.value),p.style.display="flex",d.heightMode=0;break;case 1:case"1":d.sdk.viewer.scene.terrainProvider.availability?Cesium.sampleTerrainMostDetailed(d.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(d.options.positions.lng,d.options.positions.lat)]).then((function(t){d.alt=Number(h.value)+Number(t[0].height.toFixed(2))})):d.alt=Number(h.value),p.style.display="flex",d.heightMode=1;break;case 2:case"2":d.heightMode=2;break;case 3:case"3":var e,i=[],n=co(d.sdk.entityMap);try{for(n.s();!(e=n.n()).done;){var o=y()(e.value,2),s=(o[0],o[1]);"RadarScanStereoscopic"===s.type&&s.entity&&i.push(s.entity)}}catch(t){n.e(t)}finally{n.f()}d.getClampToHeight(d.options.positions,i).then((function(t){d.alt=Number(t.toFixed(2))})),d.heightMode=3}break}})),h.addEventListener("input",(function(){switch(f){case 0:case"0":d.options.positions.alt=Number(Number(h.value).toFixed(2));break;case 1:case"1":d.sdk.viewer.scene.terrainProvider.availability?Cesium.sampleTerrainMostDetailed(d.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(d.options.positions.lng,d.options.positions.lat)]).then((function(t){d.alt=Number(h.value)+Number(t[0].height.toFixed(2))})):d.alt=Number(h.value)}d.renewPoint(),d.coordinate=d.options.coordinate,d._elms.alt&&d._elms.alt.forEach((function(t){t.value=d.options.positions.alt}))})),d._elms.height=p,d._elms.heightMode=x,d.heightMode=d.heightMode;case 72:if(E=Rn(),!(S=Y(d._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select"))){t.next=88;break}S.legp_search(E),(D=d._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0]).value=E[d.labelFontFamily].value,M=0;case 79:if(!(M<E.length)){t.next=86;break}if(E[M].value!=D.value){t.next=83;break}return S.legp_searchActive(E[M].value),t.abrupt("break",86);case 83:M++,t.next=79;break;case 86:D.addEventListener("input",(function(){for(var t=0;t<E.length;t++)if(E[t].value===D.value){d.labelFontFamily=E[t].key;break}})),d._elms.labelFontFamily=[D];case 88:case"end":return t.stop()}}),t)}))),0),l=n.getElementsByClassName("lng")[0],c=n.getElementsByClassName("lat")[0],l.value=this.lng,c.value=this.lat,this._elms.lng.push(l),this._elms.lat.push(c),u=this._DialogObject._element.content.getElementsByClassName("YJ-custom-checkbox-box"),p=this._DialogObject._element.content.getElementsByClassName("YJ-custom-checkbox"),h=this._DialogObject._element.content.getElementsByClassName("proj-input-box"),p[0].checked=!0,h[1].style.display="none",h[2].style.display="none",u[0].addEventListener("click",(function(){p[0].checked=!0,h[0].style.display="block",p[1].checked=!1,h[1].style.display="none",p[2].checked=!1,h[2].style.display="none"})),u[1].addEventListener("click",(function(){p[1].checked=!0,h[1].style.display="block",p[0].checked=!1,h[0].style.display="none",p[2].checked=!1,h[2].style.display="none"})),u[2].addEventListener("click",(function(){p[2].checked=!0,h[2].style.display="block",p[0].checked=!1,h[0].style.display="none",p[1].checked=!1,h[1].style.display="none"})),i._projConvert=function(){var t,e,o,s,a,r,l,c,u,p,h,m,f,v,g,y;d._DialogObject&&!d._DialogObject.isDestroy&&(t=i.lng,e=i.lat,o=i._proj.degreesToDMS(t,!0),s=i._proj.degreesToDMS(e,!0),c=(l=o.split("°"))[1].split("'"),p=(u=s.split("°"))[1].split("'"),n.getElementsByClassName("lng-dm-d")[0].value=l[0],n.getElementsByClassName("lng-dm-m")[0].value=c[0],n.getElementsByClassName("lat-dm-d")[0].value=u[0],n.getElementsByClassName("lat-dm-m")[0].value=p[0],a=i._proj.degreesToDMS(t),r=i._proj.degreesToDMS(e),f=(m=(h=a.split("°"))[1].split("'"))[1].split('"'),y=(g=(v=r.split("°"))[1].split("'"))[1].split('"'),n.getElementsByClassName("lng-dms-d")[0].value=h[0],n.getElementsByClassName("lng-dms-m")[0].value=m[0],n.getElementsByClassName("lng-dms-s")[0].value=f[0],n.getElementsByClassName("lat-dms-d")[0].value=v[0],n.getElementsByClassName("lat-dms-m")[0].value=g[0],n.getElementsByClassName("lat-dms-s")[0].value=y[0])},i._projConvert(),t.next=41;break;case 41:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"renewPoint",value:function(){var t=this,e=zn(this.labelFontFamily)||"Helvetica";this.entity&&(this.entity.position=Cesium.Cartesian3.fromDegrees(this.options.positions.lng,this.options.positions.lat,this.options.positions.alt),this.options.scaleByDistance?(this.entity.billboard.scaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0),this.entity.billboard.pixelOffsetScaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0),this.entity.label.scaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0),this.entity.label.pixelOffsetScaleByDistance=new Cesium.NearFarScalar(this.options.near,1,this.options.far,0)):(this.entity.billboard.scaleByDistance=void 0,this.entity.billboard.pixelOffsetScaleByDistance=void 0,this.entity.label.scaleByDistance=void 0,this.entity.label.pixelOffsetScaleByDistance=void 0),this.entity.label.pixelOffset=new Cesium.CallbackProperty((function(){if(t.options.billboard.show){var e=t.entity.billboard.imgHeight?t.entity.billboard.imgHeight*(31/t.entity.billboard.imgWidth):0;return new Cesium.Cartesian2(0,-e*t.options.billboard.scale-t.options.label.fontSize/2-5)}return new Cesium.Cartesian2(0,-t.options.label.fontSize/2-5)}),!1),this.entity.label.font=this.options.label.fontSize+"px "+e,this.entity.label.fillColor=Cesium.Color.fromCssColorString(this.options.label.color),this.entity.billboard.scale=this.options.billboard.scale)}},{key:"reset",value:function(){this.entity&&(this.options=this.deepCopyObj(this.originalOptions),this.near=this.originalOptions.near,this.far=this.originalOptions.far,this.scaleByDistance=this.originalOptions.scaleByDistance,this.billboardShow=this.originalOptions.billboard.show,this.billboardImage=this.originalOptions.billboard.image,this.billboardScale=this.originalOptions.billboard.scale,this.labelText=this.originalOptions.label.text,this.labelShow=this.originalOptions.label.show,this.labelFontSize=this.originalOptions.label.fontSize,this.labelColor=this.originalOptions.label.color,this.lng=this.originalOptions.positions.lng,this.lat=this.originalOptions.positions.lat,this.alt=this.originalOptions.positions.alt,this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.attributeISC=this.options.attribute.ISC.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect())}},{key:"remove",value:(r=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,li(this.sdk.viewer,this.entity);case 2:if(this.entity=null,this.sdk.viewer&&this.sdk.viewer.entities){t.next=5;break}return t.abrupt("return");case 5:return this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),t.next=10,this.sdk.removeIncetance(this.options.id);case 10:return t.next=12,be(this.sdk,this.options.id);case 12:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"clickChangeImage",value:function(){this.Dialog.clickChangeImage&&this.Dialog.clickChangeImage()}},{key:"clickChangeDefaultImage",value:function(){this.Dialog.clickChangeDefaultImage&&this.Dialog.clickChangeDefaultImage()}},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"updateHeight",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.sdk&&this.sdk.viewer&&this.sdk.viewer.scene){t.next=2;break}return t.abrupt("return");case 2:n=new Cesium.Cartesian3.fromDegrees(this.options.positions.lng,this.options.positions.lat,0),o=new Cesium.Cartesian3.fromDegrees(this.options.positions.lng,this.options.positions.lat,1e13),s=[],r=co(this.sdk.entityMap);try{for(r.s();!(l=r.n()).done;)(c=y()(l.value,2))[0],"RadarScanStereoscopic"===(u=c[1]).type&&u.entity&&s.push(u.entity)}catch(t){r.e(t)}finally{r.f()}return t.next=9,this.sdk.viewer.scene.clampToHeightMostDetailed([n],s);case 9:(p=t.sent)&&p[0]&&(e=this.cartesian3Towgs84(p[0],this.sdk.viewer).alt),h=Cesium.Cartesian3.subtract(n,o,new Cesium.Cartesian3),d=Cesium.Cartesian3.normalize(h,new Cesium.Cartesian3),m=new Cesium.Ray(o,d),f={},v=this.sdk.viewer.scene.drillPickFromRay(m),g=v.length-1;case 17:if(!(g>=0)){t.next=24;break}if(!v[g].position){t.next=21;break}return f=v[g],t.abrupt("break",24);case 21:g--,t.next=17;break;case 24:return f&&f.position&&(i=this.cartesian3Towgs84(f.position,this.sdk.viewer).alt),t.prev=25,t.next=28,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.terrainProvider,[Cesium.Cartographic.fromDegrees(this.options.positions.lng,this.options.positions.lat)]);case 28:b=t.sent,t.next=33;break;case 31:t.prev=31,t.t0=t.catch(25);case 33:if((void 0===i||i<b[0].height)&&b&&(i=b[0].height),(void 0===e||e<i)&&(e=i),void 0===e){t.next=53;break}if(this.options.positions.alt=Number(Number(e).toFixed(2)),this._elms.alt&&this._elms.alt.forEach((function(t){t.value=w.options.positions.alt})),this.renewPoint(),this.coordinate=this.options.coordinate,!this._elms.height){t.next=53;break}if(!(C=this._elms.height.getElementsByClassName("height")[0])){t.next=53;break}t.t1=this._elms.heightMode.value,t.next="海拔高度"===t.t1?46:"相对地表"===t.t1?48:"依附地表"===t.t1?50:"依附模型"===t.t1?51:53;break;case 46:return C.value=this.options.positions.alt,t.abrupt("break",53);case 48:return this.sdk.viewer.scene.terrainProvider.availability?Cesium.sampleTerrainMostDetailed(this.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(this.options.positions.lng,this.options.positions.lat)]).then((function(t){C.value=Number((w.options.positions.alt-t[0].height).toFixed(2))})):C.value=this.options.positions.alt,t.abrupt("break",53);case 50:return t.abrupt("break",53);case 51:return C.value=this.options.positions.alt,t.abrupt("break",53);case 53:case"end":return t.stop()}}),t,this,[[25,31]])}))),function(){return s.apply(this,arguments)})},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,b,C,w=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=w.length>0&&void 0!==w[0]?w[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=26;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=ho({},this.options.position):this.options.positions?l=ho({},this.options.positions):this.options.center?l=ho({},this.options.center):this.options.start?l=ho({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=19;break}c=[],u=co(this.sdk.entityMap);try{for(u.s();!(p=u.n()).done;)(h=y()(p.value,2))[0],"RadarScanStereoscopic"===(d=h[1]).type&&d.entity&&c.push(d.entity)}catch(t){u.e(t)}finally{u.f()}return t.next=18,this.getClampToHeight(l,c);case 18:l.alt=t.sent;case 19:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=33;break;case 26:m=[],f=co(this.sdk.entityMap);try{for(f.s();!(v=f.n()).done;)(g=y()(v.value,2))[0],"RadarScanStereoscopic"===(b=g[1]).type&&b.entity&&m.push(b.entity)}catch(t){f.e(t)}finally{f.f()}return t.next=31,this.getClampToHeight(this.options.positions,m);case 31:C=t.sent,this.sdk.viewer.camera.flyTo({orientation:e.orientation,destination:Cesium.Cartesian3.fromDegrees(this.options.positions.lng,this.options.positions.lat,C+(e.height||500))});case 33:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"setPosition",value:function(t){this.options.positions.lng=t.position.lng,this.options.positions.lat=t.position.lat,this.options.positions.alt=t.position.alt,this.renewPoint()}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(this.sdk&&this.sdk.viewer&&this.entity)if(this.operate.positionEditing=t,this.event&&this.event.destroy(),this.event=new X(this.sdk),!0===t){this.picking=!1,this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.previous={positions:ho({},this.options.positions)};var i=function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.alt=n.alt,e.previous={positions:ho({},e.options.positions)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.entity.position=new Cesium.CallbackProperty((function(){return i}),!1),e.positionEditing=!1};this.event.mouse_move((function(t,i){e.entity.position=new Cesium.CallbackProperty((function(){return i}),!1),e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left(i),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,n){var o=new Date;e.event.gesture_pinck_end((function(){var s=new Date;t.position1.x,t.position2.x,t.position1.y,t.position2.y;s-o>=500?e.positionEditing=!1:i(0,n)}))}))}else this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){})),this.event.destroy(),this.event=null),this.tip&&this.tip.destroy(),this.lng=this.previous.positions.lng,this.lat=this.previous.positions.lat,this.alt=this.previous.positions.alt,this.renewPoint()}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=document.getElementById(e.domid),n=Cesium.Cartesian3.fromDegrees(this.options.positions.lng,this.options.positions.lat);this.sdk.viewer.scene.postRender.addEventListener((function(o){if("block"===i.style.display||""===i.style.display){var s=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);s&&(i.style.left=(s.x+e.x).toFixed(0)+"px",i.style.top=(s.y+e.y).toFixed(0)+"px")}}))}},{key:"setCustomView",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=4;break}this.options.customView=e,t.next=19;break;case 4:if(i=this.sdk.viewer.camera,n=this.cartesian3Towgs84(i.position,this.sdk.viewer),o={lng:0,lat:0},s=ho({},n),this.options.positions?o=ho({},this.options.positions):(this.options.hasOwnProperty("lng")&&(o.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(o.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(o.alt=this.options.alt)),o.hasOwnProperty("alt")){t.next=16;break}r=[],l=co(this.sdk.entityMap);try{for(l.s();!(c=l.n()).done;)(u=y()(c.value,2))[0],"RadarScanStereoscopic"===(p=u[1]).type&&p.entity&&r.push(p.entity)}catch(t){l.e(t)}finally{l.f()}return t.next=15,this.getClampToHeight(o,r);case 15:o.alt=t.sent;case 16:s={lng:n.lng-o.lng,lat:n.lat-o.lat,alt:n.alt-o.alt},this.options.customView={orientation:{heading:Cesium.Math.toDegrees(i.heading),pitch:Cesium.Math.toDegrees(i.pitch),roll:Cesium.Math.toDegrees(i.roll)},relativePosition:s},this.originalOptions&&(this.originalOptions.customView=this.options.customView);case 19:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})}],[{key:"create",value:function(t){var e,i,n=36,o=t.options.positions;t.originalOptions=t.deepCopyObj(t.options);var s,a=!1,r=0,l=zn(t.labelFontFamily)||"Helvetica",c=t.replaceHost(t.options.billboard.image,t.options.host);if(t._frameImages=[],c&&c.endsWith("gif")){switch(a=!0,t.options.heightMode){case 2:case"2":i=Cesium.HeightReference.CLAMP_TO_GROUND}var u=document.createElement("img");u.setAttribute("rel:animated_src",c),u.setAttribute("rel:auto_play","1"),document.createElement("div").appendChild(u);var p=Cesium.createGuid();s=new SuperGif({gif:u}),t._superGif=s,t._superGif.id=p,s.load((function(i){if(404==i)return(e=document.createElement("canvas")).width=0,e.height=0,n=0,void(t.entity&&(t.entity.billboard.imgWidth=0,t.entity.billboard.imgHeight=0,t.entity.billboard.image=e,ri(t.sdk,t.entity)));if(t._superGif.id==p){for(var o=s.get_length(),a=1;a<=o;a++)s.move_to(a),t._frameImages.push(s.get_canvas().toDataURL());var l=(e=s.get_canvas()).width,c=e.height;n=c*(31/l),t.entity&&(t.entity.billboard.imgWidth=l,t.entity.billboard.imgHeight=c,t.entity.billboard.image=new Cesium.CallbackProperty((function(){var e=t._frameImages[r];return r=r>=t._frameImages.length-1?0:r+1,e}),!1),ri(t.sdk,t.entity))}}))}else{var h=new Image;switch(h.src=c||t.getSourceRootPath()+"/img/A-ablu-blank.png",t.options.heightMode){case 2:case"2":i=Cesium.HeightReference.CLAMP_TO_GROUND}e=document.createElement("canvas"),h.onload=function(){var i=h.width/h.height;h.width=100,h.height=100/i;var o=h.width,s=h.height,a=e.getContext("2d",{willReadFrequently:!0});e.width=o,e.height=s,a.drawImage(h,0,0,o,s),n=s*(31/o),t.entity&&(t.entity.billboard.imgWidth=o,t.entity.billboard.imgHeight=s,t.entity.billboard.image=e,ri(t.sdk,t.entity))},h.onerror=function(i){e.width=0,e.height=0,n=0,t.entity&&(t.entity.billboard.imgWidth=0,t.entity.billboard.imgHeight=0,t.entity.billboard.image=e,ri(t.sdk,t.entity))}}t.entity=new Cesium.Entity({show:t.options.show,id:t.options.id,position:Cesium.Cartesian3.fromDegrees(o.lng,o.lat,o.alt),billboard:{image:a?new Cesium.CallbackProperty((function(){var e=t._frameImages[r];return r=r>=t._frameImages.length-1?0:r+1,e}),!1):e,scale:t.options.billboard.scale,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:Number.POSITIVE_INFINITY}),!1),heightReference:i,color:t.options.billboard.show?void 0:new Cesium.Color(1,1,1,0),width:31,height:new Cesium.CallbackProperty((function(){return n}),!1),verticalOrigin:Cesium.VerticalOrigin.BOTTOM},label:{show:t.options.label.show,text:t.options.label.text,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:Number.POSITIVE_INFINITY}),!1),heightReference:i,font:t.options.label.fontSize+"px "+l,fillColor:Cesium.Color.fromCssColorString(t.options.label.color),pixelOffset:new Cesium.CallbackProperty((function(){return t.options.billboard.show?new Cesium.Cartesian2(0,-n*t.options.billboard.scale-t.options.label.fontSize/2-5):new Cesium.Cartesian2(0,-t.options.label.fontSize/2-5)}),!1),outlineColor:Cesium.Color.BLACK,outlineWidth:1,style:Cesium.LabelStyle.FILL_AND_OUTLINE}}),t.entity.billboard.imgWidth=31,t.entity.billboard.imgHeight=36,t.entity.position=Cesium.Cartesian3.fromDegrees(o.lng,o.lat,o.alt),3==t.options.heightMode&&t.updateHeight(),t.renewPoint(),be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id),t.options.billboard.isSelect&&t.selectBillboard()}}]);var i,n,s,r,l}(jn);function vo(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="polygon-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">描边颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">描边宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function go(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function yo(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?go(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):go(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function bo(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Co(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Co(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Co(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function wo(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var ko=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),(i=wo(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"rgba(255, 0, 0, 0.5)",i.options.show=!n.show&&!1!==n.show||n.show,i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.positions=n.positions||[],i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",i.entity,i.event=new X(i.sdk),i.operate={},i._elms={},i.Dialog=o,i.nodePoints=[],n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",!i.options.positions||i.options.positions.length<3)i._error="多边形最少需要三个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500});else{if(!i.options.height&&0!==i.options.height){for(var s=i.options.positions[0].alt,a=1;a<i.options.positions.length;a++)s<i.options.positions[a].alt&&(s=i.options.positions[a].alt);i.options.height=s}i.sdk.addIncetance(i.options.id,i),i._zIndex=i.sdk.entityMap.size,e.create(i)}return i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"PolygonObject"}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon&&this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(this.heightMode=0,i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,0.5)"}});e._elms.color[i]=n}))}}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){i.options.positions;var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.height},set:function(t){var e,i=this;!t||isNaN(Number(t))?this.options.height=0:this.options.height=Number(Number(t).toFixed(2)),e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.height}))}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(this.options.line.color),this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.line.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,0,0,0.5)"}});e._elms.lineColor[i]=n})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){this.options.line.width=t||0===t?t:3,this.entity.polyline.width=this.options.line.width,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(e){e.value=t}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td center">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td center">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td center">\n <button style="margin-right: 5px;" @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td center">\n <button style="margin-right: 5px;" @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=bo(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=bo(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=bo(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=bo(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(l=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=32;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];for(var i=function(i){var o=document.createElement("div");o.className="tr",o.innerHTML='\n <div class="td">'.concat(i+1,'</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ');var s=o.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.positions[i].lng.toFixed(8),s.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.positions[i].lng.toFixed(8);var l=o.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.positions[i].lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.positions[i].lat.toFixed(8);var p=o.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),s.addEventListener("dblclick",(function(){s.innerHTML="",r.value=Number(n.options.positions[i].lng.toFixed(8)),s.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.positions[i].lng.toFixed(8)),s.innerHTML="",s.appendChild(a)})),r.addEventListener("input",(function(){n.options.positions[i].lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.positions[i].lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.positions[i].lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.positions[i].lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.positions[i].lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.positions[i].lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(o)},o=0;o<n.options.positions.length;o++)i(o)},t.next=7,new Ki(this.sdk,this.options,{title:"面属性",left:"180px",top:"100px",confirmCallBack:function(t){m.name=m.name.trim(),m.name||(m.name="未命名对象"),m.options.label.position={lng:m.label.position[0],lat:m.label.position[1],alt:m.label.position[2]},m.originalOptions=m.deepCopyObj(m.options),console.log("000000000000",m.options.label.scaleByDistance),m._DialogObject.close(),m.Dialog.confirmCallBack&&m.Dialog.confirmCallBack(m.originalOptions),be(m.sdk,m.options.id),re(m.sdk,m.options.id)},resetCallBack:function(){m.reset(),m.Dialog.resetCallBack&&m.Dialog.resetCallBack()},removeCallBack:function(){m.Dialog.removeCallBack&&m.Dialog.removeCallBack()},closeCallBack:function(){m.previous=null,m.reset(),m.positionEditing=!1,m.Dialog.closeCallBack&&m.Dialog.closeCallBack();for(var t=0;t<m.nodePoints.length;t++)m.sdk.viewer.entities.remove(m.nodePoints[t]);m.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),m.event&&m.event.destroy(),m.tip&&m.tip.destroy()},showCallBack:function(t){m.options.show=t,m.originalOptions.show=t,m.show=t,m.Dialog.showCallBack&&m.Dialog.showCallBack()},translationalCallBack:function(){m.positionEditing=!m.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(m,(function(){o()}))}});case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" polygon",(s=document.createElement("div")).innerHTML=vo(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("polygon-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){m.color=t},clear:function(){m.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.lineColor=t},clear:function(){m.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelColor=t},clear:function(){m.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelLineColor=t},clear:function(){m.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelBackgroundColorStart=t},clear:function(){m.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelBackgroundColorEnd=t},clear:function(){m.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],setTimeout((function(){m.attributeLink=m.options.attribute.link.content,m.attributeVr=m.options.attribute.vr.content,m.cameraSelect&&m.cameraSelect(),m.goodsSelect&&m.goodsSelect();var t=m.attributeSelect,i=m._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(i){var n=Y(i,".attribute-select");n.legp_search(t);for(var s=m._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],a=0;a<t.length;a++)if(t[a].key===m.options.attributeType){s.value=t[a].value,n.legp_searchActive(t[a].value);break}s.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===s.value){m.attributeType=t[e].key;break}}))}var r=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],l=Y(m._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(l){l.legp_search(r);var c=m._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];c.value=m.options["area-unit"];for(var u=0;u<r.length;u++)if(r[u].value===c.value){l.legp_searchActive(r[u].value);break}c.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===c.value){m.areaUnit=r[t].value;break}}))}var p=m._DialogObject._element.content.getElementsByClassName("height-box")[0],h=p.getElementsByClassName("height")[0],d=m._DialogObject._element.content.getElementsByClassName("height-confirm")[0];h.value=10,2==m.heightMode?(p&&(p.className="input-number input-number-unit-1 height-box disabled"),d&&d.setAttribute("disabled","disabled")):(p&&(p.className="input-number input-number-unit-1 height-box"),d&&d.removeAttribute("disabled"));var f=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],v=Y(m._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode");if(v){v.legp_search(f);for(var g=m._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],y=0;y<f.length;y++)if(f[y].key==m.heightMode){g.value=f[y].value,v.legp_searchActive(f[y].value);break}g.addEventListener("input",(function(){for(var t=0;t<f.length;t++)if(f[t].value===g.value){m.heightMode=f[t].key;break}})),h.addEventListener("input",(function(){m.heightMode})),m._elms.height=h,m._elms.heightBox=p,m._elms.heightMode=g,m._elms.heightConfirm=d,m._elms.heightModeObject=v,d.addEventListener("click",(function(){m.operate.positionEditing?(m.positionEditing=!1,m.height=m.height+Number(h.value)):(e.closeNodeEdit(m),m.heightMode=m.heightMode,setTimeout((function(){m.height=m.height+Number(h.value)}),100))}))}var b=Rn(),C=Y(m._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(C){C.legp_search(b);var w=m._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];w.value=b[m.labelFontFamily].value;for(var k=0;k<b.length;k++)if(b[k].value==w.value){C.legp_searchActive(b[k].value);break}w.addEventListener("input",(function(){for(var t=0;t<b.length;t++)if(b[t].value===w.value){m.labelFontFamily=b[t].key;break}})),m._elms.labelFontFamily=[w]}o()}),0),t.next=33;break;case 32:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 33:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"reset",value:function(){if(this.entity||this._DialogObject){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lineColor=this.originalOptions.line.color,this.lineWidth=this.originalOptions.line.width,this.area=this.originalOptions.area,this.height=this.originalOptions.height,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeVr=this.options.attribute.vr.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect(),this.heightMode=this.options.heightMode;var t=this.options.positions,e=[[]],i=[];if(this.options.height||0===this.options.height){for(var n=0;n<t.length;n++)i.push(t[n].lng,t[n].lat,this.options.height),e[0].push([t[n].lng,t[n].lat]);e[0].push([t[0].lng,t[0].lat]),this.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i)}else{for(var o=0;o<t.length;o++)i.push(t[o].lng,t[o].lat),e[0].push([t[o].lng,t[o].lat]);e[0].push([t[0].lng,t[0].lat]),this.positions=Cesium.Cartesian3.fromDegreesArray(i)}this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(this.positions),this.entity.polyline.positions=[].concat(L()(this.positions),[this.positions[0],this.positions[1]])}}},{key:"flyTo",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=v.length>0&&void 0!==v[0]?v[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=yo({},this.options.position):this.options.positions?l=yo({},this.options.positions[0]):this.options.center?l=yo({},this.options.center):this.options.start?l=yo({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=51;break;case 25:c=[],t.t0=this.heightMode,t.next=0===t.t0||"0"===t.t0?29:1===t.t0||"1"===t.t0?31:2===t.t0||"2"===t.t0?33:35;break;case 29:case 31:return u=!1,t.abrupt("break",35);case 33:return u=!0,t.abrupt("break",35);case 35:if(!u){t.next=48;break}p=0;case 37:if(!(p<this.options.positions.length)){t.next=46;break}return t.next=40,this.getClampToHeight(this.options.positions[p]);case 40:h=t.sent,d=Cesium.Cartesian3.fromDegrees(this.options.positions[p].lng,this.options.positions[p].lat,h),c.push(d.x,d.y,d.z);case 43:p++,t.next=37;break;case 46:t.next=49;break;case 48:if(this.positions)for(m=0;m<this.positions.length;m++)c.push(this.positions[m].x,this.positions[m].y,this.positions[m].z);case 49:f=Cesium.BoundingSphere.fromVertices(c),this.sdk.viewer.camera.flyToBoundingSphere(f,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 51:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.sdk.viewer.entities.remove(this.entity),this.label&&this.label.remove(),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var i=this;if(e.closeNodeEdit(this),!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity){var n=this;if(this.event&&this.event.destroy(),this.event=new X(this.sdk),this.operate.positionEditing=t,!0===t){var o;this.previous={positions:L()(this.positions)},this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1;for(var s=[],a=L()(this.positions),r=this.deepCopyObj(this.options.positions),l=[],c=[],u=0;u<a.length;u++){var p=this.cartesian3Towgs84(a[u],this.sdk.viewer);s.push([p.lng,p.lat])}var h=this.cartesian3Towgs84(a[0],this.sdk.viewer);s.push([h.lng,h.lat]);for(var d=turf.polygon([s]),m=turf.centroid(d),f=(o=Cesium.Cartesian3).fromDegrees.apply(o,L()(m.geometry.coordinates)),v=0;v<a.length;v++)c.push({x:f.x-a[v].x,y:f.y-a[v].y,z:f.z-a[v].z});var g=[],y=function(t,e){i.cartesian3Towgs84(e,i.sdk.viewer);i.event.mouse_move((function(){})),i.event.mouse_left((function(){})),i.event.mouse_right((function(){})),g=[];for(var o=0;o<c.length;o++){var s={x:e.x-c[o].x,y:e.y-c[o].y,z:e.z-c[o].z};g.push(s),i.options.positions[o]=i.cartesian3Towgs84(s,i.sdk.viewer),n._elms.lng&&n._elms.lng[o]&&(n._elms.lng[o].innerHTML=i.options.positions[o].lng.toFixed(8)),n._elms.lat&&n._elms.lat[o]&&(n._elms.lat[o].innerHTML=i.options.positions[o].lat.toFixed(8))}i.previous=null,l=[],i.heightMode=i.heightMode};this.event.mouse_move((function(t,e){var n=i.cartesian3Towgs84(e,i.sdk.viewer);g=[];for(var o=0;o<c.length;o++){var s={x:e.x-c[o].x,y:e.y-c[o].y,z:e.z-c[o].z};g.push(s),r[o]=i.cartesian3Towgs84(s,i.sdk.viewer)}for(var a=!1,u=[],p=0;p<r.length;p++)u.push([r[p].lng,r[p].lat]);u.push([r[0].lng,r[0].lat]);var h=0,d=turf.polygon([u]),m=turf.centroid(d);switch(i.options.heightMode){case"0":case 0:a=!1;break;case"1":case 1:h=i.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(m.geometry.coordinates[0],m.geometry.coordinates[1])),a=!1;break;case"2":case 2:a=!0}if(l=[],a){for(var f=0;f<r.length;f++)l.push(r[f].lng,r[f].lat);i.positions=Cesium.Cartesian3.fromDegreesArray(l);var v=L()(i.sdk.viewer.entities.values);i.getClampToHeight({lng:n.lng,lat:n.lat},v).then((function(t){i.label.position=[n.lng,n.lat,t]}))}else{for(var y=0;y<r.length;y++)l.push(r[y].lng,r[y].lat,i.height+h);i.positions=Cesium.Cartesian3.fromDegreesArrayHeights(l),i.label.position=[n.lng,n.lat,i.height+h]}i.tip.setPosition(e,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left(y),this.event.mouse_right((function(t,e){i.heightMode=i.heightMode})),this.event.gesture_pinck_start((function(t,e){var n=new Date;t.position1.x,t.position2.x,t.position1.y,t.position2.y;i.event.gesture_pinck_end((function(){new Date-n>=500?i.positionEditing=!1:y(0,e)}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(n.positions)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(n.positions),[n.positions[0],n.positions[1]])}),!1)}else{this.previous?this.positions=L()(this.previous.positions):this.previous={positions:L()(this.positions)},this.sdk&&this.sdk.viewer&&this.label&&this.label.entity||(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.destroy()),this.tip&&this.tip.destroy();for(var b=[[]],C=0;C<this.previous.positions.length;C++){var w=this.cartesian3Towgs84(this.previous.positions[C],this.sdk.viewer);b[0].push([w.lng,w.lat])}var k=this.cartesian3Towgs84(this.previous.positions[0],this.sdk.viewer);b[0].push([k.lng,k.lat]);var x=turf.polygon(b),_=turf.centroid(x),E=!1,S=0;switch(this.options.heightMode){case"0":case 0:E=!1;break;case"1":case 1:S=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(_.geometry.coordinates[0],_.geometry.coordinates[1])),E=!1;break;case"2":case 2:E=!0}this.label.position=E?[_.geometry.coordinates[0],_.geometry.coordinates[1]]:[_.geometry.coordinates[0],_.geometry.coordinates[1],this.height+S],this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(n.previous.positions),this.entity.polyline.positions=[].concat(L()(n.previous.positions),[n.previous.positions[0],n.previous.positions[1]])}}}},{key:"setPosition",value:function(t){for(var e,i=this,n=Cesium.Cartesian3.fromDegrees(t.position.lng,t.position.lat,t.position.alt),o=L()(this.positions),s=[],a=[],r=0;r<o.length;r++){var l=this.cartesian3Towgs84(o[r],this.sdk.viewer);s.push([l.lng,l.lat])}var c=this.cartesian3Towgs84(o[0],this.sdk.viewer);s.push([c.lng,c.lat]);for(var u=turf.polygon([s]),p=turf.centroid(u),h=(e=Cesium.Cartesian3).fromDegrees.apply(e,L()(p.geometry.coordinates)),d=0;d<o.length;d++)a.push({x:h.x-o[d].x,y:h.y-o[d].y,z:h.z-o[d].z});for(var m=[],f=0;f<a.length;f++)m.push({x:n.x-a[f].x,y:n.y-a[f].y,z:n.z-a[f].z});var v=!1,g=0;switch(this.options.heightMode){case"0":case 0:v=!1;break;case"1":case 1:g=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(p.geometry.coordinates[0],p.geometry.coordinates[1])),v=!1;break;case"2":case 2:v=!0}if(v){var y=L()(this.sdk.viewer.entities.values);this.getClampToHeight({lng:t.position.lng,lat:t.position.lat},y).then((function(e){i.label.position=[t.position.lng,t.position.lat,e]}))}else this.label.position=[t.position.lng,t.position.lat,t.position.alt+g];this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return m.length>0?new Cesium.PolygonHierarchy(m):new Cesium.PolygonHierarchy(o)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return m.length>0?[].concat(m,[m[0],m[1]]):[].concat(L()(o),[o[0],o[1]])}),!1)}},{key:"renewPositions",value:function(){var t=this;if(!this._error){for(var e=!1,i=[],n=this.options.positions,o=0;o<n.length;o++)i.push([n[o].lng,n[o].lat]);i.push([n[0].lng,n[0].lat]);var s=0,a=turf.polygon([i]),r=turf.centroid(a);switch(this.options.heightMode){case"0":case 0:e=!1;break;case"1":case 1:s=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(r.geometry.coordinates[0],r.geometry.coordinates[1]))||0,e=!1;break;case"2":case 2:e=!0}var l=[];if(e||0!=this.nodePoints.length){for(var c=0;c<n.length;c++)l.push(n[c].lng,n[c].lat);this.positions=Cesium.Cartesian3.fromDegreesArray(l),setTimeout((function(){if(t.sdk.viewer){var e=L()(t.sdk.viewer.entities.values);t.getClampToHeight({lng:r.geometry.coordinates[0],lat:r.geometry.coordinates[1]},e).then((function(e){t.label&&(t.label.position=[r.geometry.coordinates[0],r.geometry.coordinates[1],e])}))}}),100)}else{for(var u=0;u<n.length;u++)l.push(n[u].lng,n[u].lat,this.height+s);this.positions=Cesium.Cartesian3.fromDegreesArrayHeights(l),this.label&&(this.label.position=[r.geometry.coordinates[0],r.geometry.coordinates[1],this.height+s])}return this.options.areaByMeter=this.computeArea(n),this.areaUnit=this.areaUnit,l}}},{key:"setDIV",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p=this,h=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for((e=h.length>0&&void 0!==h[0]?h[0]:{domid:"",x:10,y:10}).x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10,i=[[]],n=0;n<this.options.positions.length;n++)i[0].push([this.options.positions[n].lng,this.options.positions[n].lat]);if(i[0].push([this.options.positions[0].lng,this.options.positions[0].lat]),o=turf.polygon(i),s=turf.pointOnFeature(o),ground){t.next=12;break}r=this.options.height,t.next=16;break;case 12:return l=L()(this.sdk.viewer.entities.values),t.next=15,this.getClampToHeight({lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1]},l);case 15:r=t.sent;case 16:c=document.getElementById(e.domid),u=Cesium.Cartesian3.fromDegrees(s.geometry.coordinates[0],s.geometry.coordinates[1],r),this.sdk.viewer.scene.postRender.addEventListener((function(t){if("block"===c.style.display||""===c.style.display){var i=p.sdk.viewer.scene.cartesianToCanvasCoordinates(u);i&&(c.style.left=(i.x+e.x).toFixed(0)+"px",c.style.top=(i.y+e.y).toFixed(0)+"px")}}));case 19:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],[{key:"create",value:function(t){var i;i=2==t.heightMode,t.renewPositions();var n=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(t.options.heightMode=0,i=!1,n=new Cesium.CustomColorMaterialSource({color:t.options.color})),t.entity=t.sdk.viewer.entities.add({show:t.options.show,id:t.options.id,polygon:{hierarchy:new Cesium.PolygonHierarchy(t.positions),perPositionHeight:!i,material:n,zIndex:t.sdk._entityZIndex},polyline:C()(C()({positions:[].concat(L()(t.positions),[t.positions[0],t.positions[1]]),width:t.options.line.width,arcType:Cesium.ArcType.NONE,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!i},"arcType",i?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE),"zIndex",t.sdk._entityZIndex)}),t.sdk._entityZIndex++,e.createLabel(t),be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i=[[]],n=0;n<e.options.positions.length;n++)i[0].push([e.options.positions[n].lng,e.options.positions[n].lat]);i[0].push([e.options.positions[0].lng,e.options.positions[0].lat]),o=turf.polygon(i),s=turf.pointOnFeature(o),r=0,t.t0=e.heightMode,t.next=0===t.t0||"0"===t.t0?9:1===t.t0||"1"===t.t0?11:2===t.t0||"2"===t.t0?14:16;break;case 9:return l=!1,t.abrupt("break",16);case 11:for(c=0;c<i.length;c++)r=e.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(i[c].lng,i[c].lat));return l=!1,t.abrupt("break",16);case 14:return l=!0,t.abrupt("break",16);case 16:if(l){t.next=20;break}r=e.options.height+r,t.next=24;break;case 20:return u=L()(e.sdk.viewer.entities.values),t.next=23,e.getClampToHeight({lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1]},u);case 23:r=t.sent;case 24:e.options.label.position||(e.options.label.position={lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1],alt:r}),e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:l});case 26:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=bo(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.positionEditing=!1,setTimeout((function(){if(YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n,s=function(){var e=o()(a.a.mark((function e(){var i,n,o,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=L()(t.sdk.viewer.entities.values),n=0;case 2:if(!(n<t.options.positions.length)){e.next=11;break}return e.next=5,t.getClampToHeight(t.options.positions[n],i);case 5:o=e.sent,s=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:n,position:Cesium.Cartesian3.fromDegrees(t.options.positions[n].lng,t.options.positions[n].lat,o),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.push(s);case 8:n++,e.next=2;break;case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();YJ.Measure.SetMeasureStatus(!0),t.picking=!1,t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];for(var r=[],l=[],c=0;c<t.options.positions.length;c++)l.push(t.options.positions[c].lng,t.options.positions[c].lat);r=Cesium.Cartesian3.fromDegreesArray(l);var u=!1,p=function(){var e=o()(a.a.mark((function e(o,s){var l,c,p,h,d,m,f,v,g,y,b;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=32;break}return t.options.positions[i.index]=t.cartesian3Towgs84(s,t.sdk.viewer),n=t.options.positions[i.index],u=!0,e.next=6,t.getClampToHeight(t.options.positions[i.index]);case 6:for(l=e.sent,c=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",position:Cesium.Cartesian3.fromDegrees(t.options.positions[i.index].lng,t.options.positions[i.index].lat,l),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.splice(i.index,0,c),t.options.positions.splice(i.index,0,t.options.positions[i.index]),p=t.options.positions,h=[],d=0;d<p.length;d++)h.push(p[d].lng,p[d].lat);if(t.positions=Cesium.Cartesian3.fromDegreesArray(h),r=Cesium.Cartesian3.fromDegreesArray(h),m=L()(t.sdk.viewer.entities.values),t.options.positions.length<3)t.getClampToHeight({lng:t.options.positions[0].lng,lat:t.options.positions[0].lat},m).then((function(e){t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,e]}));else{for(f=[[]],v=0;v<t.options.positions.length;v++)f[0].push([t.options.positions[v].lng,t.options.positions[v].lat]);f[0].push([t.options.positions[0].lng,t.options.positions[0].lat]),g=turf.polygon(f),y=turf.centroid(g),t.getClampToHeight({lng:y.geometry.coordinates[0],lat:y.geometry.coordinates[1]},m).then((function(e){t.label.position=[y.geometry.coordinates[0],y.geometry.coordinates[1],e]}))}t.options.areaByMeter=t.computeArea(t.options.positions),e.t0=t.options["area-unit"],e.next="平方米"===e.t0?21:"平方千米"===e.t0?23:"亩"===e.t0?25:"公顷"===e.t0?27:29;break;case 21:return t.area=t.options.areaByMeter,e.abrupt("break",30);case 23:return t.area=Number((t.options.areaByMeter/1e6).toFixed(8)),e.abrupt("break",30);case 25:return t.area=Number((t.options.areaByMeter/666.6666667).toFixed(4)),e.abrupt("break",30);case 27:return t.area=Number((t.options.areaByMeter/1e4).toFixed(6)),e.abrupt("break",30);case 29:t.area=t.options.areaByMeter;case 30:e.next=34;break;case 32:(b=t.sdk.viewer.scene.pick(o.position))&&b.id&&b.id.name&&"node-secondary-edit-point"===b.id.name&&(i=b.id,t.nodePoints.splice(b.id.index,1),t.sdk.viewer.entities.remove(b.id),t.tip.set_text("左键开始,右键结束,CTRL+右键撤销"),n=t.cartesian3Towgs84(i.position.getValue(),t.sdk.viewer));case 34:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}(),h=function(o,s){i&&(t.options.positions[i.index]=n,u&&t.options.positions.splice(i.index,1),e(null,t.options.positions)),YJ.Measure.SetMeasureStatus(!1),t.event.destroy(),t.tip.destroy(),t.heightMode=t.heightMode};t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(r)}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){return r.length>=3?[].concat(L()(r),[r[0],r[1],r[2]]):r}),!1);var d=L()(t.sdk.viewer.entities.values);if(t.options.positions.length<3)t.getClampToHeight({lng:t.options.positions[0].lng,lat:t.options.positions[0].lat},d).then((function(e){t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,e]}));else{for(var m=[[]],f=0;f<t.options.positions.length;f++)m[0].push([t.options.positions[f].lng,t.options.positions[f].lat]);m[0].push([t.options.positions[0].lng,t.options.positions[0].lat]);var v=turf.polygon(m),g=turf.centroid(v);t.getClampToHeight({lng:g.geometry.coordinates[0],lat:g.geometry.coordinates[1]},d).then((function(e){t.label.position=[g.geometry.coordinates[0],g.geometry.coordinates[1],e]}))}setTimeout((function(){t.event.mouse_left(p),t.event.mouse_right(h),t.event.mouse_move((function(e,n){if(i){t.options.positions[i.index]=t.cartesian3Towgs84(n,t.sdk.viewer);for(var o=t.options.positions,s=[],a=0;a<o.length;a++)s.push(o[a].lng,o[a].lat);t.positions=Cesium.Cartesian3.fromDegreesArray(s),r=Cesium.Cartesian3.fromDegreesArray(s);var l=L()(t.sdk.viewer.entities.values);if(t.options.positions.length<3)t.getClampToHeight({lng:t.options.positions[0].lng,lat:t.options.positions[0].lat},l).then((function(e){t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,e]}));else{for(var c=[[]],u=0;u<t.options.positions.length;u++)c[0].push([t.options.positions[u].lng,t.options.positions[u].lat]);c[0].push([t.options.positions[0].lng,t.options.positions[0].lat]);var p=turf.polygon(c),h=turf.centroid(p);t.getClampToHeight({lng:h.geometry.coordinates[0],lat:h.geometry.coordinates[1]},l).then((function(e){t.label.position=[h.geometry.coordinates[0],h.geometry.coordinates[1],e]}))}}t.tip.setPosition(n,e.endPosition.x,e.endPosition.y)})),t.event.mouse_right_keyboard_ctrl((function(e,n){i&&(t.options.positions.pop(),t.sdk.viewer.entities.remove(t.nodePoints[t.nodePoints.length-1]),i.index===t.options.positions.length&&(t.nodePoints[i.index-1]?i=t.nodePoints[i.index-1]:i.index=0),t.nodePoints.pop())})),t.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?h():p(o,i)}))})),s()}),200)}}),50)}},{key:"closeNodeEdit",value:function(t){if(t.sdk&&t.sdk.viewer){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}}}]);var i,n,s,r,l}(jn);function xo(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 56%;">\n <div>\n <div class="row">\n <div class="col input-select-unit-box">\n <div class="input-select-unit"></div>\n <input class="input input-text" readonly="readonly" type="text" style="flex: 0 0 130px;" @model="length">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="polyline-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">应用</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="线条风格">\n <div class="row">\n <div class="col">\n <span class="label">线条颜色</span>\n <div class="color"></div>\n </div>\n <div class="col" style="flex: 0 0 33%;">\n <span class="label">线条宽度</span>\n <div class="input-number input-number-unit-1" style="width: 80px;">\n <input class="input" type="number" title="" min="1" max="999" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col input-select-line-type-box" style="flex: 0 0 37%;">\n <span class="label">线条形式</span>\n <div class="input-select-line-type"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">首尾相连</span>\n <input class="btn-switch" type="checkbox" @model="noseToTail">\n </div>\n <div class="col" style="flex: 0 0 33%;">\n <span class="label">线段圆滑</span>\n <input class="btn-switch" type="checkbox" @model="smooth">\n </div>\n <div class="col" style="flex: 0 0 37%;">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">线段缓冲</span>\n <input class="btn-switch" type="checkbox" @model="extend">\n </div>\n <div class="col" style="flex: 0 0 33%;">\n <span class="label">缓冲宽度</span>\n <div class="input-number input-number-unit-1" style="width: 80px;">\n <input class="input" type="number" title="" min="0" data-min="0.01" max="999999" @model="extendWidth">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col" style="flex: 0 0 37%;">\n <span class="label">缓冲颜色</span>\n <div class="extendColor"></div>\n </div>\n </div>\n <div class="row" id="dashTextureDom">\n <div class="col">\n <span class="label">首尾反向</span>\n <input class="btn-switch" type="checkbox" @model="rotate">\n </div>\n <div class="col" style="flex: 0 0 33%;">\n <span class="label">流动速率</span>\n <div class="input-number input-number-unit-1" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="999999" step="1" @model="speed">\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col" style="flex: 0 0 37%;">\n <span class="label lineSpace">线条间距</span>\n <div class="input-number input-number-unit-1 lineSpace" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="4.5" step="0.1" @model="space">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n \x3c!-- <DIV-cy-tab-pane label="灯光控制">--\x3e\n \x3c!-- <div>--\x3e\n \x3c!-- <div class="row">--\x3e\n \x3c!-- <div class="col">--\x3e\n \x3c!-- <span class="label">指令</span>--\x3e\n \x3c!-- <input class="input" type="text" @model="instruct">--\x3e\n \x3c!-- <button class="primary" @click="instructSubmit">提交</button>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </DIV-cy-tab-pane>--\x3e\n \x3c!-- <DIV-cy-tab-pane label="设置操作点">--\x3e\n \x3c!-- <div>--\x3e\n \x3c!-- <div class="row">--\x3e\n \x3c!-- <div class="col">--\x3e\n \x3c!-- <span class="label">设置操作点</span>--\x3e\n \x3c!-- <input class="input" type="text" @model="operatingPoint">--\x3e\n \x3c!-- <button class="primary" @click="operatingPointSubmit">提交</button>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </DIV-cy-tab-pane>--\x3e\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function _o(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Eo(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Eo(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Eo(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var So=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[];if(!e[o]||!e[o].attributes)return 1;var r,l=_o(e[o].attributes);try{var c=function(){var l=r.value;switch(l.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[l.value]=e.target.checked})),e[o].checked=t[l.value]):(n.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max),e.target.value=i),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min),e.target.value=i),e.target.dataset.min&&i<Number(e.target.dataset.min)&&(i=Number(e.target.dataset.min)),t[l.value]=i):t[l.value]=i})),"IMG"==e[o].nodeName?e[o].src=t[l.value]:e[o].value=t[l.value]),i.element[l.value]?i.element[l.value].push(e[o]):i.element[l.value]=[e[o]],a.push(l.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t[l.value]&&t[l.value](e)})),a.push(l.name);break;case"@change":s=!0,n.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[l.value]&&t[l.value](e,i)}))}};for(l.s();!(r=l.n()).done;)c()}catch(t){l.e(t)}finally{l.f()}for(var u=0;u<a.length;u++)e[o].attributes.removeNamedItem(a[u]);if(s){var p="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(p="change"),e[o].addEventListener(p,(function(t){for(var e=0;e<n.length;e++)n[e](t)}))}},o=0;o<e.length;o++)n()}}])}();C()(So,"event",{});var Do=new So;function Mo(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Po(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Mo(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Mo(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Oo=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,t),this.sdk=e,this.viwer=this.sdk.viewer,this.options=i,this.options.position=i.position||{},this.options.rotate=i.rotate||{},this.options.position.lng=this.options.position.lng||0,this.options.position.lat=this.options.position.lat||0,this.options.position.alt=this.options.position.alt||0,this.options.rotate.x=this.options.rotate.x||0,this.options.rotate.y=this.options.rotate.y||0,this.options.rotate.z=this.options.rotate.z||0,this.activeAxis,this.activeCircle,this.activeModelParam,this.origin,this.rayX,this.rayY,this.rayZ,this.arrow={},this.activeState,this.coordArrows=[],this.coordCircles=[],this.MapEvent=new X(this.sdk)}),[{key:"position",get:function(){return this.options.position},set:function(t){this.options.position=t,this.againArrow(),this.againCircle()}},{key:"rotate",get:function(){return this.options.rotate},set:function(t){this.options.rotate=t}},{key:"initParam",value:function(){return this._params={tx:this.options.position.lng,ty:this.options.position.lat,tz:this.options.position.alt,rx:this.options.rotate.x,ry:this.options.rotate.y,rz:this.options.rotate.z},Po(Po({},this.options.position),this.options.rotate)}},{key:"editTranslational",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:w=function(t){if(e.activeAxis){var i=t.startPosition.y-t.endPosition.y,n={x:t.endPosition.x-y.x,y:t.endPosition.y-y.y},o=r.camera.getPickRay(n),s=r.scene.globe.pick(o,r.scene),a=new Cesium.Cartesian3,l=Cesium.Transforms.eastNorthUpToFixedFrame(r.camera.position);Cesium.Matrix4.inverse(l,l),Cesium.Matrix4.multiplyByPoint(l,s,a),Cesium.Cartesian3.normalize(a,a);var c=e.initParam(),u=90+Cesium.Math.toDegrees(Math.asin(a.z)),p=Cesium.Cartographic.fromCartesian(r.camera.position).height,h=e.activeModelParam.alt,d=p/Math.cos(Cesium.Math.toRadians(u));new Cesium.EllipsoidGeodesic(Cesium.Cartographic.fromCartesian(s),Cesium.Cartographic.fromCartesian(r.camera.position)),s=Cesium.Ray.getPoint(o,d*(1-h/p));var m=Cesium.Cartographic.fromCartesian(s),f=Cesium.Math.toDegrees(m.longitude),v=Cesium.Math.toDegrees(m.latitude);switch(e.activeAxis._name){case"model_edit_xAxis":e._params.tx=f,e._params.ty=e.activeModelParam.lat,e._params.tz=h,e.origin=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);var g=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng-.001,c.lat,c.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),k=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng,c.lat-.001,c.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),x=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt-1),new Cesium.Cartesian3),new Cesium.Cartesian3);e.rayX=new Cesium.Ray(e.origin,g),e.rayY=new Cesium.Ray(e.origin,k),e.rayZ=new Cesium.Ray(e.origin,x);break;case"model_edit_yAxis":e._params.tx=e.activeModelParam.lng,e._params.ty=v,e._params.tz=h,e.origin=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);var _=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng-.001,c.lat,c.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),E=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng,c.lat-.001,c.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),S=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt-1),new Cesium.Cartesian3),new Cesium.Cartesian3);e.rayX=new Cesium.Ray(e.origin,_),e.rayY=new Cesium.Ray(e.origin,E),e.rayZ=new Cesium.Ray(e.origin,S);break;case"model_edit_zAxis":e.activeModelParam.alt+=Cesium.Cartesian3.distance(r.camera.position,Cesium.Cartesian3.fromDegrees(e.options.position.lng,e.options.position.lat,e.options.position.alt))/4300*i*3,e._params.tx=e.activeModelParam.lng,e._params.ty=e.activeModelParam.lat,e._params.tz=e.activeModelParam.alt,e.origin=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,e.activeModelParam.alt);var D=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng-.001,c.lat,e.activeModelParam.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),M=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng,c.lat-.001,e.activeModelParam.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),P=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(c.lng,c.lat,e.activeModelParam.alt-1),new Cesium.Cartesian3),new Cesium.Cartesian3);e.rayX=new Cesium.Ray(e.origin,D),e.rayY=new Cesium.Ray(e.origin,M),e.rayZ=new Cesium.Ray(e.origin,P)}e.updateModel(e._params.tx,e._params.ty,e._params.tz,e._params.rx,e._params.ry,e._params.rz),e.againArrow()}else{var O=Date.now();if(O-b<100)return clearTimeout(C),void(C=setTimeout((function(){w(t)}),100));clearTimeout(C),b=O;for(var T=e.coordArrows,N=0;N<T.length;N++)if(T[N].getGeometryInstanceAttributes)switch(T[N]._name){case"model_edit_xAxis":T[N].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.RED}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_yAxis":T[N].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.LIME}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_zAxis":T[N].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.BLUE}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}})}for(var B=e.viwer.scene.drillPick(t.endPosition,10),L=B.length-1;L>=0;L--){var A=B[L];if(A&&A.primitive&&A.id)switch(A.primitive._name){case"model_edit_xAxis":case"model_edit_yAxis":case"model_edit_zAxis":return void(A.primitive.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.YELLOW}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}))}}}},this.destroy(),this.activeState="translational",this.MapEvent=new X(this.sdk),e=this,i=this.initParam(),n=i.lng,o=i.lat,s=i.alt,r=this.viwer,this.origin=Cesium.Cartesian3.fromDegrees(n,o,s),l=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(this.origin,Cesium.Cartesian3.fromDegrees(n-.001,o,s),new Cesium.Cartesian3),new Cesium.Cartesian3),c=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(this.origin,Cesium.Cartesian3.fromDegrees(n,o-.001,s),new Cesium.Cartesian3),new Cesium.Cartesian3),u=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(this.origin,Cesium.Cartesian3.fromDegrees(n,o,s-1),new Cesium.Cartesian3),new Cesium.Cartesian3),this.rayX=new Cesium.Ray(this.origin,l),this.rayY=new Cesium.Ray(this.origin,c),this.rayZ=new Cesium.Ray(this.origin,u),this.arrow.positionX=Cesium.Ray.getPoint(this.rayX,0),this.arrow.positionY=Cesium.Ray.getPoint(this.rayY,0),this.arrow.positionZ=Cesium.Ray.getPoint(this.rayZ,0),p=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(n,o,s)),h=r.camera.position,d=Cesium.Cartesian3.distance(h,this.origin),m=d/15,Cesium.Matrix4.multiplyByScale(p,new Cesium.Cartesian3(m,m,m),p),f=this.createAxisArrow("model_edit_xAxis",[new Cesium.Cartesian3(0,.001,0),new Cesium.Cartesian3(1,0,0)],p,Cesium.Color.RED),v=this.createAxisArrow("model_edit_yAxis",[new Cesium.Cartesian3(0,.001,0),new Cesium.Cartesian3(0,1,0)],p,Cesium.Color.LIME),g=this.createAxisArrow("model_edit_zAxis",[new Cesium.Cartesian3(0,.001,0),new Cesium.Cartesian3(0,0,1)],p,Cesium.Color.BLUE),this.viwer.scene.primitives.add(f),this.viwer.scene.primitives.add(v),this.viwer.scene.primitives.add(g),this.againArrow(),this.viwer.camera.percentageChanged=.001,this.viwer.camera.changed.addEventListener(this.againArrow,{_that:this}),y={x:0,y:0},b=0,this.MapEvent.mouse_move((function(t,e){w(t)})),this.MapEvent.mouse_left_down((function(t,i){var n=r.scene.cartesianToCanvasCoordinates(k.origin);y.x=t.position.x-Math.floor(n.x),y.y=t.position.y-Math.floor(n.y);for(var o=r.scene.drillPick(t.position,10),s=o.length-1;s>=0;s--){var a=o[s];if(a&&a.primitive&&a.primitive._name)if(e.activeAxis)e.activeAxis=null,e.activeModelParam=null,e.controllerCallBack;else switch(a.primitive._name){case"model_edit_xAxis":case"model_edit_yAxis":case"model_edit_zAxis":return r.scene.screenSpaceCameraController.enableRotate=!1,e.activeAxis=a.primitive,e.activeModelParam=e.initParam(),void(a.primitive.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.YELLOW}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}))}}})),this.MapEvent.mouse_left_up((function(t){r.scene.screenSpaceCameraController.enableRotate=!0;for(var i=0;i<e.coordArrows.length;i++)switch(e.coordArrows[i]._name){case"model_edit_xAxis":e.coordArrows[i].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.RED}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_yAxis":e.coordArrows[i].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.LIME}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_zAxis":e.coordArrows[i].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.BLUE}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}})}e.activeAxis&&(e.activeAxis=null,e.activeModelParam=null,e.controllerCallBack)}));case 42:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"againArrow",value:function(){var t=this._that||this;if(t.origin){t.initParam(),t.origin=new Cesium.Cartesian3.fromDegrees(t._params.tx,t._params.ty,t._params.tz);for(var e=t.viwer.camera.position,i=Cesium.Cartesian3.distance(e,t.origin)/15,n=Cesium.Transforms.eastNorthUpToFixedFrame(t.origin),o=t.coordArrows,s=0;s<o.length;s++)switch(o[s]._name){case"model_edit_xAxis":case"model_edit_yAxis":case"model_edit_zAxis":Cesium.Matrix4.multiplyByScale(n,new Cesium.Cartesian3(i,i,i),o[s].modelMatrix)}}}},{key:"againCircle",value:function(){var t=this._that||this;if(t.origin){t.initParam(),t.origin=new Cesium.Cartesian3.fromDegrees(t._params.tx,t._params.ty,t._params.tz);for(var e=t.viwer.camera.position,i=Cesium.Cartesian3.distance(e,t.origin)/15,n=Cesium.Transforms.eastNorthUpToFixedFrame(t.origin),o=t.coordCircles,s=0;s<o.length;s++)switch(o[s]._name){case"model_edit_zCircle":case"model_edit_yCircle":case"model_edit_xCircle":var a=i/20;Cesium.Matrix4.multiplyByScale(n,new Cesium.Cartesian3(a,a,a),o[s].modelMatrix),o[s]._radius=i}}}},{key:"editRtation",value:(e=o()(a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.destroy(),this.activeState="rtation",this.MapEvent=new X(this.sdk),e=this.initParam(),this.origin=Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),this.createCircle(e.lng,e.lat,e.alt,20),this.viwer.camera.percentageChanged=.001,this.viwer.camera.changed.addEventListener(this.againCircle,{_that:this});case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"createCircle",value:(t=o()(a.a.mark((function t(e,i,n,o){var s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D,M,P;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(P=function(t){if(r.activeCircle){var e=0,i=0,n=0;if(!Cesium.SceneTransforms.wgs84ToWindowCoordinates(l.scene,s.ciclkPosition))return;var o=t.startPosition.y-t.endPosition.y,a=t.startPosition.x-t.endPosition.x;switch(r.activeCircle._name){case"model_edit_xCircle":i=1*a;break;case"model_edit_yCircle":e=1*o;break;case"model_edit_zCircle":n=1*a}r._params.rx-=e,r._params.rx>360&&(r._params.rx=1),r._params.rx<0&&(r._params.rx=360),Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(r._params.rx)),r._params.ry-=i,r._params.ry>360&&(r._params.ry=1),r._params.ry<0&&(r._params.ry=360),r._params.rz-=n,r._params.rz>360&&(r._params.rz=1),r._params.rz<0&&(r._params.rz=360),r.updateModel(r._params.tx,r._params.ty,r._params.tz,r._params.rx,r._params.ry,r._params.rz)}else{var c=Date.now();if(c-D<100)return clearTimeout(M),void(M=setTimeout((function(){P(t)}),100));clearTimeout(M),D=c;for(var u=s.coordCircles,p=0;p<u.length;p++)if(u[p].getGeometryInstanceAttributes){var h=u[p].getGeometryInstanceAttributes(u[p]._name);switch(u[p]._name){case"model_edit_zCircle":h.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED).value;break;case"model_edit_yCircle":h.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE).value;break;case"model_edit_xCircle":h.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.LIME).value}}for(var d=l.scene.drillPick(t.endPosition,10),m=0;m<d.length;m++){var f=d[m];if(f&&f.primitive&&f.id){var v=f.primitive.getGeometryInstanceAttributes(f.id);switch(f.primitive._name){case"model_edit_zCircle":case"model_edit_yCircle":case"model_edit_xCircle":return void(v.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.YELLOW).value)}}}}},s=this._that||this,r=this,l=this.viwer,c=[],u=0;u<=360;u+=3)p=Math.sin(Cesium.Math.toRadians(u)),h=Math.cos(Cesium.Math.toRadians(u)),d=o*h,m=o*p,c.push(new Cesium.Cartesian3(d,m,0));return f=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(e,i,n)),v=l.camera.position,g=Cesium.Cartesian3.distance(v,this.origin),b=(y=g/15)/o,Cesium.Matrix4.multiplyByScale(f,new Cesium.Cartesian3(b,b,b),f),t.next=14,this.createAxisSphere("model_edit_zCircle",c,f,Cesium.Color.RED,y);case 14:return C=t.sent,l.scene.primitives.add(C),t.next=18,this.createAxisSphere("model_edit_yCircle",c,f,Cesium.Color.BLUE,y);case 18:return w=t.sent,l.scene.primitives.add(w),k=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(90)),x=Cesium.Matrix4.fromRotationTranslation(k),Cesium.Matrix4.multiply(w.geometryInstances.modelMatrix,x,w.geometryInstances.modelMatrix),t.next=25,this.createAxisSphere("model_edit_xCircle",c,f,Cesium.Color.LIME,y);case 25:_=t.sent,l.scene.primitives.add(_),E=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(90)),S=Cesium.Matrix4.fromRotationTranslation(E),Cesium.Matrix4.multiply(_.geometryInstances.modelMatrix,S,_.geometryInstances.modelMatrix),D=0,this.MapEvent.mouse_move((function(t){P(t)})),this.MapEvent.mouse_left_down((function(t){var e=l.scene.pickPosition(t.position);s.ciclkPosition=e;for(var i=l.scene.drillPick(t.position,10),n=0;n<i.length;n++){var o=i[n];if(o&&o.primitive&&o.id)switch(o.primitive._name){case"model_edit_xCircle":case"model_edit_yCircle":case"model_edit_zCircle":return l.scene.screenSpaceCameraController.enableRotate=!1,o.primitive.getGeometryInstanceAttributes(o.primitive._name).color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.YELLOW).value,r.activeCircle=o.primitive,void(r.activeModelParam=r.initParam())}}r.activeCircle=null,r.activeModelParam=null,l.scene.screenSpaceCameraController.enableRotate=!0})),this.MapEvent.mouse_left_up((function(t){l.scene.screenSpaceCameraController.enableRotate=!0;var e=r.coordCircles;r.activeCircle=null,r.activeModelParam=null;for(var i=0;i<e.length;i++)if(e[i].getGeometryInstanceAttributes){var n=e[i].getGeometryInstanceAttributes(e[i]._name);switch(e[i]._name){case"model_edit_zCircle":n.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED).value;break;case"model_edit_yCircle":n.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE).value;break;case"model_edit_xCircle":n.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.LIME).value}}}));case 34:case"end":return t.stop()}}),t,this)}))),function(e,i,n,o){return t.apply(this,arguments)})},{key:"updateModel",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;this._params.tx=t=parseFloat(parseFloat(t).toFixed(8)),this._params.ty=e=parseFloat(parseFloat(e).toFixed(8)),this._params.tz=i=parseFloat(parseFloat(i).toFixed(2)),this._params.rx=n=parseFloat(n),this._params.ry=o=parseFloat(o),this._params.rz=s=parseFloat(s),this.options.position.lng=t,this.options.position.lat=e,this.options.position.alt=i,this.options.rotate={x:n,y:o,z:s},this.controllerCallBack}},{key:"controllerCallBack",get:function(){this._controllerCallBack&&this._controllerCallBack(this.options,!this.activeAxis)},set:function(t){this._controllerCallBack=t}},{key:"createAxisArrow",value:function(t,e,i,n){var o=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({id:t,geometry:new Cesium.PolylineGeometry({positions:e,width:20}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(n)}}),releaseGeometryInstances:!1,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:n}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}),modelMatrix:i});return o._name=t,this.coordArrows.push(o),o}},{key:"createAxisCircular",value:function(t,e,i,n){var o=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.EllipseGeometry({center:{x:1,y:1,z:1},semiMinorAxis:5e5,semiMajorAxis:1e6,rotation:Cesium.Math.PI_OVER_FOUR,vertexFormat:Cesium.VertexFormat.POSITION_AND_ST})}),releaseGeometryInstances:!1,appearance:new Cesium.EllipsoidSurfaceAppearance({material:new Cesium.Material({fabric:{type:"Color",uniforms:{color:Cesium.Color.YELLOW}}})}),modelMatrix:i});return o._name=t,this.coordArrows.push(o),o}},{key:"createAxisSphere",value:function(t,e,i,n,o){var s=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({id:t,geometry:new Cesium.PolylineGeometry({positions:e,width:5}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(n)}}),releaseGeometryInstances:!1,appearance:new Cesium.PolylineColorAppearance({translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}),modelMatrix:i});return s._radius=o,s._name=t,this.coordCircles.push(s),s}},{key:"removeCoordArrows",value:function(){for(var t=0;t<this.coordArrows.length;t++)this.viwer.scene.primitives.remove(this.coordArrows[t]);this.coordArrows=[]}},{key:"removeCoordCircle",value:function(){for(var t=0;t<this.coordCircles.length;t++)this.viwer.scene.primitives.remove(this.coordCircles[t]);this.coordCircles=[]}},{key:"removeAllTools",value:function(){this.removeCoordArrows(),this.removeCoordCircle()}},{key:"destroy",value:function(){this.removeAllTools(),this.activeAxis=void 0,this.activeState=void 0,this.MapEvent&&this.MapEvent.destroy(),this.viwer.camera.changed.removeEventListener(this.againArrow),this.viwer.camera.changed.removeEventListener(this.againCircle)}},{key:"getActiveState",value:function(){return this.activeState}},{key:"update",value:function(){this.againArrow(),this.againCircle()}}]);var t,e,i}();function To(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function No(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?To(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):To(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Bo(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Lo(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Lo(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Lo(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Ao(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function jo(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Io(t,e){return t.get(Fo(t,e))}function Fo(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Ro=new WeakMap,zo=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),jo(i=Ao(this,e,[t,n]),Ro,void 0),i.options.name=n.name||"未命名对象",i.options.width=n.width||0===n.width?n.width:3,i.options.color=n.color||"#ff0000",i.options.type=n.type?Number(n.type):0,i.options["nose-to-tail"]=n["nose-to-tail"]||!1,i.options.smooth=n.smooth||!1,i.options.extend=n.extend||!1,i.options.rotate=n.rotate||!0,i.options.space=n.space||1,i.options.speed=n.speed||10,i.options.dashSize=n.dashSize||.03,i.options["length-unit"]=n["length-unit"]||"米",i.options["fit-length-unit"]=n["fit-length-unit"]||"米",i.options["words-name"]=n["words-name"]||"空间长度",i.options["extend-width"]=n["extend-width"]||0===n["extend-width"]?n["extend-width"]:10,i.options["extend-color"]=n["extend-color"]||"rgba(255,255,80,0.3)",i.options.show=!n.show&&!1!==n.show||n.show,i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i._elms=[],n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.instruct=n.instruct||"",i.options.operatingPoint=n.operatingPoint||"",i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.operate={},i.nodePoints=[],i.unitNum=0,i.Dialog=o,!i.options.positions||i.options.positions.length<2)i._error="线段最少需要两个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500});else{for(var s=0;s<i.options.positions.length;s++)i.options.positions[s].lng=Number(Number(i.options.positions[s].lng).toFixed(8)),i.options.positions[s].lat=Number(Number(i.options.positions[s].lat).toFixed(8)),i.options.positions[s].alt=Number(Number(i.options.positions[s].alt).toFixed(2));i.sdk.addIncetance(i.options.id,i),e.create(i)}return i}return Xi()(e,t),_()(e,[{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t||"#ff0000",this.entity.polyline.material=this.getMaterial(this.options.color,this.options.type,this.entity,this.options),this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,1)"}});e._elms.color[i]=n}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){this.options.speed=0!==t?100*Math.pow(t,-1):0,this.entity.polyline.material=this.getMaterial(this.options.color,this.options.type,this.entity,this.options)}},{key:"dashSize",get:function(){return this.options.dashSize},set:function(t){this.options.dashSize=t,this.entity.polyline.material=this.getMaterial(this.options.color,this.options.type,this.entity,this.options)}},{key:"rotate",get:function(){return this.options.rotate},set:function(t){this.options.rotate=t,e.closeNodeEdit(this),this._elms.rotate&&this._elms.rotate.forEach((function(e){e.checked=t})),this.options.rotate=t,this.entity.polyline.material=this.getMaterial(this.options.color,this.options.type,this.entity,this.options)}},{key:"space",get:function(){return this.options.space},set:function(t){this.options.space=t,this.entity.polyline.material=this.getMaterial(this.options.color,this.options.type,this.entity,this.options)}},{key:"length",get:function(){return this.options.length},set:function(t){this.options.length=t,this._elms.length&&this._elms.length.forEach((function(e){e.value=t}))}},{key:"fitLength",get:function(){return this.options.fitLength},set:function(t){this.options.fitLength=t,this._elms.fitLength&&this._elms.fitLength.forEach((function(e){e.value=t}))}},{key:"lengthUnit",get:function(){return this.options["length-unit"]},set:function(t){if(this.unitNum++,this.options["length-unit"]=t,this._elms.lengthUnit&&this._elms.lengthUnit.forEach((function(e){e.value=t})),Io(Ro,this)&&Io(Ro,this).legp_searchActive(t),this.options.lengthByMeter)if(this.unitNum>2)switch(t){case"米":this.length=this.noseToTail?this.options.fitLengthByMeter:this.options.lengthByMeter;break;case"千米":this.length=this.noseToTail?(this.options.fitLengthByMeter/1e3).toFixed(5):(this.options.lengthByMeter/1e3).toFixed(5);break;default:this.length=this.noseToTail?this.options.fitLengthByMeter:this.options.lengthByMeter}else{var e=this.noseToTail?this.options.fitLengthByMeter:this.options.lengthByMeter;this.lengthUnit=e>1e3||1e3==e?"千米":"米"}}},{key:"wordsName",get:function(){return this.options["words-name"]},set:function(t){this.options["words-name"]=t,this._elms.wordsName&&this._elms.wordsName.forEach((function(e){e.value=t}));var e=this;if(this.noseToTail)this.renewPositions(this.options.positions);else this.computeDistance(this.options.positions,2,t).then((function(t){e.options.lengthByMeter=t,e.lengthUnit=e.options["length-unit"]}))}},{key:"fitLengthUnit",get:function(){return this.options["fit-length-unit"]},set:function(t){if(this.options["fit-length-unit"]=t,this._elms.fitLengthUnit&&this._elms.fitLengthUnit.forEach((function(e){e.value=t})),this.options.fitLengthByMeter)switch(t){case"米":this.fitLength=this.options.fitLengthByMeter;break;case"千米":this.fitLength=Number((this.options.fitLengthByMeter/1e3).toFixed(5));break;default:this.fitLength=this.options.fitLengthByMeter}}},{key:"lineWidth",get:function(){return this.options.width},set:function(t){var e=this;this.options.width=t||0==t?t:3,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(t){t.value=e.options.width})),this.entity&&this.entity.polyline&&(this.entity.polyline.width=this.entity.polyline.width+t-this.entity.polyline.oriWidth,this.entity.polyline.oriWidth=this.options.width)}},{key:"lineType",get:function(){return this.options.type},set:function(t){var e=this,i=[{name:'<i class="icon line"></i>实线',value:"实线",key:0,icon:"line"},{name:'<i class="icon dash-line"></i>虚线',value:"虚线",key:1,icon:"dash-line"},{name:'<i class="icon light-line"></i>泛光',value:"泛光",key:2,icon:"light-line"},{name:'<i class="icon tail-line"></i>尾迹光线',value:"尾迹光线",key:3,icon:"tail-line"},{name:'<i class="icon mult-tail-line"></i>多尾迹光线',value:"多尾迹光线",key:4,icon:"mult-tail-line"},{name:'<i class="icon flow-dash-line1"></i>流动虚线1',value:"流动虚线1",key:5,icon:"flow-dash-line1"},{name:'<i class="icon flow-dash-line2"></i>流动虚线2',value:"流动虚线2",key:6,icon:"flow-dash-line2"},{name:'<i class="icon pic-line1"></i>流动箭头1',value:"流动箭头1",key:7,icon:"pic-line1"},{name:'<i class="icon pic-line2"></i>流动箭头2',value:"流动箭头2",key:8,icon:"pic-line2"},{name:'<i class="icon pic-line3"></i>流动箭头3',value:"流动箭头3",key:9,icon:"pic-line3"},{name:'<i class="icon pic-line4"></i>流动箭头4',value:"流动箭头4",key:10,icon:"pic-line4"},{name:'<i class="icon pic-line5"></i>流动箭头5',value:"流动箭头5",key:11,icon:"pic-line5"},{name:'<i class="icon pic-line6"></i>流动箭头6',value:"流动箭头6",key:12,icon:"pic-line6"}];this.options.type=Number(t);for(var n=function(n){if(i[n].key===Number(t))return e._elms.lineType&&e._elms.lineType.forEach((function(t){t.value=i[n].value,2<t.value&&t.value<13?document.getElementById("dashTextureDom")&&(document.getElementById("dashTextureDom").style.display="flex"):document.getElementById("dashTextureDom")&&(document.getElementById("dashTextureDom").style.display="none"),2<t.value&&t.value<5?(document.getElementsByClassName("lineSpace")[0]&&(document.getElementsByClassName("lineSpace")[0].style.display="none"),document.getElementsByClassName("lineSpace")[1]&&(document.getElementsByClassName("lineSpace")[1].style.display="none")):(document.getElementsByClassName("lineSpace")[0]&&(document.getElementsByClassName("lineSpace")[0].style.display="flex"),document.getElementsByClassName("lineSpace")[1]&&(document.getElementsByClassName("lineSpace")[1].style.display="flex"))})),1},o=0;o<i.length&&!n(o);o++);this.entity&&this.entity.polyline&&(this.entity.polyline.material=this.getMaterial(this.options.color,this.options.type,this.entity,this.options))}},{key:"noseToTail",get:function(){return this.options["nose-to-tail"]},set:function(t){if(this.options["nose-to-tail"]=t,e.closeNodeEdit(this),this._elms.noseToTail&&this._elms.noseToTail.forEach((function(e){e.checked=t})),this.entity){var i=this.renewPositions(this.options.positions);this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i),this.renewPolygon(i)}this.lengthUnit=this.options["length-unit"]}},{key:"smooth",get:function(){return this.options.smooth},set:function(t){if(this.options.smooth=t,e.closeNodeEdit(this),this._elms.smooth&&this._elms.smooth.forEach((function(e){e.checked=t})),this.entity){var i=this.renewPositions(this.options.positions);this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i),this.renewPolygon(i)}}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.positionEditing=!1,this.options.heightMode=t||0==t?t:2;var n="";e.closeNodeEdit(this);var o=!1,s=!1,a=this.renewPositions(this.options.positions);switch(this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(a),this.renewPolygon(a),this.options.heightMode){case"0":case 0:this.entity.polyline.clampToGround=o,this.extend=!1,n="海拔高度";break;case"1":case 1:this.entity.polyline.clampToGround=o,this.extend=!1,n="相对地表";break;case"2":case 2:o=!0,s=!0,this.entity.polyline.clampToGround=o,n="依附模型"}this._elms.heightMode&&(this._elms.heightMode.value=n),this._elms.heightModeObject&&this._elms.heightModeObject.legp_searchActive(n),s?(this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),this._elms.heightConfirm&&this._elms.heightConfirm.setAttribute("disabled","disabled")):(this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box"),this._elms.heightConfirm&&this._elms.heightConfirm.removeAttribute("disabled")),setTimeout((function(){o?(i.label.ground=o,i._elms.heightMode&&(i._elms.heightMode.value="依附模型"),i.label.position=[i.options.positions[0].lng,i.options.positions[0].lat]):(i.label.ground=o,i.label.position=[i.options.positions[0].lng,i.options.positions[0].lat,a[2]],i.options.label.position={lng:i.options.positions[0].lng,lat:i.options.positions[0].lat,alt:a[2]})}),0)}},{key:"extend",get:function(){return this.options.extend},set:function(t){if(this.options.extend=t,e.closeNodeEdit(this),t&&(this.heightMode=2),this._elms.extend&&this._elms.extend.forEach((function(e){e.checked=t})),this.entity)if(this.options.extend){var i=this.renewPositions(this.options.positions);this.renewPolygon(i)}else this.entity.polygon=void 0}},{key:"extendWidth",get:function(){return this.options["extend-width"]},set:function(t){this.options["extend-width"]=t,this.heightMode=this.heightMode,this._elms.extendWidth&&this._elms.extendWidth.forEach((function(e){e.value=t}));var e=this.renewPositions(this.options.positions);this.renewPolygon(e)}},{key:"extendColor",get:function(){return this.options["extend-color"]},set:function(t){var e=this;this.options["extend-color"]=t,this._elms.extendColor&&this._elms.extendColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.extendColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.extendColor=t},clear:function(){e.extendColor="rgba(255,255,255,1)"}});e._elms.extendColor[i]=n})),this.entity&&this.entity.polygon&&(this.entity.polygon.material=Cesium.Color.fromCssColorString(this.options["extend-color"]))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){var e=this;this.options.label.show=t,this.show?(this.label.show=t,setTimeout((function(){e.label.position=[e.options.positions[0].lng,e.options.positions[0].lat,e.options.positions[0].alt]}),0)):this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t;var i=this;this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,n){new YJColorPicker(C()({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)",e.labelBackgroundColorStart=color}},"clear",(function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"})));e._elms.labelBackgroundColorStart[n]=i.labelBackgroundColorStartPicker}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Bo(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Bo(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Bo(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Bo(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"judgeLine",value:function(t,e){if(!t.polyline.oriRepeat){var i={color:e.color,image:this.getSourceRootPath()+"/img/arrow/1.png",space:e.space,speed:e.speed};i.speed=e.rotate?i.speed:0-i.speed;var n=document.createElement("canvas"),o=(n.getContext("2d"),new Image);o.src=i.image;var s=this;o.onload=function(){n.width=o.width*(i.space+1),n.height=o.height;var e=s.getSceenLine(t,i,n);e&&(t.polyline.oriRepeat=e);var a=t.polyline.positions.getValue(s.sdk.viewer.clock.currentTime);if(!Cesium.defined(a))return new Cesium.Cartesian2(1,1);for(var r=0,l=0;l<a.length-1;++l)r+=Cesium.Cartesian3.distance(a[l],a[l+1]);var c=r/t.polyline.width.getValue(),u=s.sdk.viewer.camera.positionCartographic.height,p=new Cesium.BoundingSphere(new Cesium.Cartesian3(-1e6,0,0),5e5),h=s.sdk.viewer.canvas.clientWidth,d=s.sdk.viewer.canvas.clientHeight,m=(c*=s.sdk.viewer.scene.camera.getPixelSize(p,h,d)/u/(i.space*(n.width/n.height*5)+1))/t.polyline.oriRepeat;t.polyline.oriSpeed=m,t.polyline.oriRepeatX=c}}}},{key:"getSceenLine",value:function(t,e,i){var n=new Cesium.Cartesian2(0,this.sdk.viewer.canvas.clientHeight),o=new Cesium.Cartesian2(this.sdk.viewer.canvas.clientWidth/2,this.sdk.viewer.canvas.clientHeight),s=this.sdk.viewer.scene.pickPosition(n),a=this.sdk.viewer.scene.pickPosition(o);console.log(s,a);var r=Cesium.Cartesian3.distance(s,a)/t.polyline.width.getValue(),l=this.sdk.viewer.camera.positionCartographic.height,c=new Cesium.BoundingSphere(new Cesium.Cartesian3(-1e6,0,0),5e5),u=this.sdk.viewer.canvas.clientWidth,p=this.sdk.viewer.canvas.clientHeight,h=this.sdk.viewer.scene.camera.getPixelSize(c,u,p);return h>700?r*=h/l/(e.space*(i.width/i.height*5)+1):r=void 0,r}},{key:"edit",value:(l=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=32;break}return o=function(t){"2"!==t&&2!==t||(2<n.options.type&&n.options.type<13?document.getElementById("dashTextureDom")&&(document.getElementById("dashTextureDom").style.display="flex"):document.getElementById("dashTextureDom")&&(document.getElementById("dashTextureDom").style.display="none"))},t.next=7,new Ki(this.sdk,this.options,{title:"线属性",left:"180px",top:"100px",confirmCallBack:function(t){d.name=d.name.trim(),d.name||(d.name="未命名对象"),d.options.label.position={lng:d.label.position[0],lat:d.label.position[1],alt:d.label.position[2]},d.originalOptions=d.deepCopyObj(d.options),d._DialogObject.close(),d.Dialog.confirmCallBack&&d.Dialog.confirmCallBack(d.originalOptions),be(d.sdk,d.options.id),re(d.sdk,d.options.id)},resetCallBack:function(){d.reset(),d.Dialog.resetCallBack&&d.Dialog.resetCallBack()},removeCallBack:function(){d.Dialog.removeCallBack&&d.Dialog.removeCallBack()},closeCallBack:function(){d.reset(),d.Dialog.closeCallBack&&d.Dialog.closeCallBack();for(var t=0;t<d.nodePoints.length;t++)d.sdk.viewer.entities.remove(d.nodePoints[t]);d.nodePoints=[],d.positionEditing=!1,YJ.Measure.SetMeasureStatus(!1),d.event&&d.event.destroy(),d.tip&&d.tip.destroy()},showCallBack:function(t){d.options.show=t,d.originalOptions.show=t,d.show=t,d.Dialog.showCallBack&&d.Dialog.showCallBack()},translationalCallBack:function(){d.positionEditing=!d.positionEditing},secondaryEditCallBack:function(){d.positionEditing=!1,d.noseToTail=!1,d.heightMode=0,e.nodeEdit(d)}});case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" polyline",(s=document.createElement("div")).innerHTML=xo(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,new dn("polyline-object-edit-tabs",o,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){d.color=t},clear:function(){d.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){d.labelColor=t},clear:function(){d.labelColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("extendColor")[0],size:"mini",alpha:!0,defaultColor:this.extendColor,disabled:!1,openPickerAni:"opacity",sure:function(t){d.extendColor=t},clear:function(){d.extendColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){d.labelLineColor=t},clear:function(){d.labelLineColor="rgba(255,255,255,1)"}}),n.labelBackgroundColorStartPicker=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){d.labelBackgroundColorStart=t},clear:function(){d.labelBackgroundColorStart="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){d.labelBackgroundColorEnd=t},clear:function(){d.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),h=s.getElementsByTagName("*"),Do.on(this,h),this._elms=Do.element,this._elms.color=[r],this._elms.labelColor=[l],this._elms.extendColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[n.labelBackgroundColorStartPicker],this._elms.labelBackgroundColorEnd=[p],setTimeout((function(){d.attributeLink=d.options.attribute.link.content,d.attributeVr=d.options.attribute.vr.content,d.cameraSelect&&d.cameraSelect(),d.goodsSelect&&d.goodsSelect();var t=d.attributeSelect,i=d._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(i){var n=Y(i,".attribute-select");n.legp_search(t);for(var o=d._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],a=0;a<t.length;a++)if(t[a].key===d.options.attributeType){o.value=t[a].value,n.legp_searchActive(t[a].value);break}o.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===o.value){d.attributeType=t[e].key;break}}))}var r=[{name:"空间长度",value:"空间长度"},{name:"投影长度",value:"投影长度"},{name:"地表长度",value:"地表长度"}],l=Y(d._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(l){l.legp_search(r);var c=d._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];d._elms.wordsName=[c],c.value=d.options["words-name"];for(var u=0;u<r.length;u++)if(r[u].value===c.value){l.legp_searchActive(r[u].value);break}c.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===c.value){d.wordsName=r[t].value;break}}))}var p,h,m,f=[{name:"米",value:"米"},{name:"千米",value:"千米"}],v=Y(d._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit",1);if(h=d,m=v,(p=Ro).set(Fo(p,h),m),v){v.legp_search(f);var g=d._DialogObject._element.content.getElementsByClassName("input-select-unit")[1].getElementsByTagName("input")[0];d._elms.lengthUnit=[g],g.value=d.options["length-unit"];for(var y=0;y<f.length;y++)if(f[y].value===g.value){v.legp_searchActive(f[y].value);break}g.addEventListener("input",(function(){for(var t=0;t<f.length;t++)if(f[t].value===g.value){d.lengthUnit=f[t].value;break}}))}var b=[{name:'<i class="icon line"></i>实线',value:"实线",key:0,icon:"line"},{name:'<i class="icon dash-line"></i>虚线',value:"虚线",key:1,icon:"dash-line"},{name:'<i class="icon light-line"></i>泛光',value:"泛光",key:2,icon:"light-line"},{name:'<i class="icon tail-line"></i>尾迹光线',value:"尾迹光线",key:3,icon:"tail-line"},{name:'<i class="icon mult-tail-line"></i>多尾迹光线',value:"多尾迹光线",key:4,icon:"mult-tail-line"},{name:'<i class="icon flow-dash-line1"></i>流动虚线1',value:"流动虚线1",key:5,icon:"flow-dash-line1"},{name:'<i class="icon flow-dash-line2"></i>流动虚线2',value:"流动虚线2",key:6,icon:"flow-dash-line2"},{name:'<i class="icon pic-line1"></i>流动箭头1',value:"流动箭头1",key:7,icon:"pic-line1"},{name:'<i class="icon pic-line2"></i>流动箭头2',value:"流动箭头2",key:8,icon:"pic-line2"},{name:'<i class="icon pic-line3"></i>流动箭头3',value:"流动箭头3",key:9,icon:"pic-line3"},{name:'<i class="icon pic-line4"></i>流动箭头4',value:"流动箭头4",key:10,icon:"pic-line4"},{name:'<i class="icon pic-line5"></i>流动箭头5',value:"流动箭头5",key:11,icon:"pic-line5"},{name:'<i class="icon pic-line6"></i>流动箭头6',value:"流动箭头6",key:12,icon:"pic-line6"}],C=Y(d._DialogObject._element.content.getElementsByClassName("input-select-line-type-box")[0],".input-select-line-type");if(C){C.legp_search(b);var w=document.createElement("i");w.className="icon icon-active",d._DialogObject._element.content.getElementsByClassName("input-select-line-type")[0].getElementsByClassName("cy_datalist")[0].appendChild(w);var k=d._DialogObject._element.content.getElementsByClassName("input-select-line-type")[0].getElementsByTagName("input")[0];d._elms.lineType=[k];for(var x=0;x<b.length;x++)if(b[x].key===d.options.type){C.legp_searchActive(b[x].value),k.value=b[x].value,w.className="icon icon-active ".concat(b[x].icon);break}k.addEventListener("input",(function(){for(var t=0;t<b.length;t++)if(b[t].value===k.value){d.lineType=b[t].key,w.className="icon icon-active ".concat(b[t].icon),2<d.lineType&&d.lineType<13?document.getElementById("dashTextureDom")&&(document.getElementById("dashTextureDom").style.display="flex"):document.getElementById("dashTextureDom")&&(document.getElementById("dashTextureDom").style.display="none"),2<d.lineType&&d.lineType<5?(document.getElementsByClassName("lineSpace")[0]&&(document.getElementsByClassName("lineSpace")[0].style.display="none"),document.getElementsByClassName("lineSpace")[1]&&(document.getElementsByClassName("lineSpace")[1].style.display="none")):(document.getElementsByClassName("lineSpace")[0]&&(document.getElementsByClassName("lineSpace")[0].style.display="flex"),document.getElementsByClassName("lineSpace")[1]&&(document.getElementsByClassName("lineSpace")[1].style.display="flex"));break}}))}var _=d._DialogObject._element.content.getElementsByClassName("height-box")[0],E=_.getElementsByClassName("height")[0],S=d._DialogObject._element.content.getElementsByClassName("height-confirm")[0];E.value=10,2==d.heightMode?(_&&(_.className="input-number input-number-unit-1 height-box disabled"),S&&S.setAttribute("disabled","disabled")):(_&&(_.className="input-number input-number-unit-1 height-box"),S&&S.removeAttribute("disabled"));var D=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],M=Y(d._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode");if(M){M.legp_search(D);for(var P=d._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],O=0;O<D.length;O++)if(D[O].key==d.heightMode){P.value=D[O].value,M.legp_searchActive(D[O].value);break}P.addEventListener("input",(function(){for(var t=0;t<D.length;t++)if(D[t].value===P.value){d.heightMode=D[t].key;break}})),E.addEventListener("input",(function(){d.heightMode})),d._elms.height=E,d._elms.heightBox=_,d._elms.heightMode=P,d._elms.heightConfirm=S,d._elms.heightModeObject=M,S.addEventListener("click",(function(){d.positionEditing=!1;for(var t=0;t<d.options.positions.length;t++)d.options.positions[t].alt=Number((d.options.positions[t].alt+Number(E.value)).toFixed(2)),d._elms.alt[t].innerHTML=d.options.positions[t].alt;var i=d.renewPositions(d.options.positions);d.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i),d.positionEditing=!1,e.closeNodeEdit(d)}))}var T=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];d._elms.lng=[],d._elms.lngInput=[],d._elms.lat=[],d._elms.latInput=[],d._elms.alt=[],d._elms.altInput=[];for(var N=function(t){var i=document.createElement("div");i.className="tr",i.innerHTML='\n <div class="td">'.concat(t+1,'</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ');var n=i.getElementsByClassName("lng")[0],o=document.createElement("span");o.innerHTML=d.options.positions[t].lng.toFixed(8),n.appendChild(o);var s=document.createElement("input");s.className="input",s.type="number",s.title="",s.min=-180,s.max=180,s.value=d.options.positions[t].lng.toFixed(8);var a=i.getElementsByClassName("lat")[0],r=document.createElement("span");r.innerHTML=d.options.positions[t].lat.toFixed(8),a.appendChild(r);var l=document.createElement("input");l.className="input",l.type="number",l.title="",l.min=-90,l.max=90,l.value=d.options.positions[t].lat.toFixed(8);var c=i.getElementsByClassName("alt")[0],u=document.createElement("span");u.innerHTML=d.options.positions[t].alt.toFixed(2),c.appendChild(u);var p=document.createElement("input");p.className="input",p.type="number",p.title="",p.min=-9999999,p.max=999999999,p.value=d.options.positions[t].alt.toFixed(2),n.addEventListener("dblclick",(function(){n.innerHTML="",s.value=Number(d.options.positions[t].lng.toFixed(8)),n.appendChild(s),s.focus(),d.positionEditing=!1,e.closeNodeEdit(d)})),s.addEventListener("blur",(function(){s.value=Number(d.options.positions[t].lng.toFixed(8)),n.innerHTML="",n.appendChild(o)})),s.addEventListener("input",(function(){d.options.positions[t].lng=Number(Number(s.value).toFixed(8)),o.innerHTML=d.options.positions[t].lng.toFixed(8);var e=d.renewPositions(d.options.positions);d.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(e),d.label.position=[d.options.positions[0].lng,d.options.positions[0].lat,e[2]]})),a.addEventListener("dblclick",(function(){a.innerHTML="",l.value=Number(d.options.positions[t].lat.toFixed(8)),a.appendChild(l),l.focus(),d.positionEditing=!1,e.closeNodeEdit(d)})),l.addEventListener("blur",(function(){l.value=Number(d.options.positions[t].lat.toFixed(8)),a.innerHTML="",a.appendChild(r)})),l.addEventListener("input",(function(){d.options.positions[t].lat=Number(Number(l.value).toFixed(8)),r.innerHTML=d.options.positions[t].lat.toFixed(8);var e=d.renewPositions(d.options.positions);d.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(e),d.label.position=[d.options.positions[0].lng,d.options.positions[0].lat,e[2]]})),c.addEventListener("dblclick",(function(){2!=d.heightMode&&(c.innerHTML="",p.value=Number(d.options.positions[t].alt.toFixed(2)),c.appendChild(p),p.focus(),d.positionEditing=!1,e.closeNodeEdit(d))})),p.addEventListener("blur",(function(){p.value=Number(d.options.positions[t].alt.toFixed(2)),c.innerHTML="",c.appendChild(u)})),p.addEventListener("input",(function(){d.options.positions[t].alt=Number(Number(p.value).toFixed(2)),u.innerHTML=d.options.positions[t].alt.toFixed(2);var e=d.renewPositions(d.options.positions);d.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(e),d.label.position=[d.options.positions[0].lng,d.options.positions[0].lat,e[2]]})),d._elms.lng.push(o),d._elms.lngInput.push(s),d._elms.lat.push(r),d._elms.latInput.push(l),d._elms.alt.push(u),d._elms.altInput.push(p),T.appendChild(i)},B=0;B<d.options.positions.length;B++)N(B);var L=Rn(),A=Y(d._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(A){A.legp_search(L);var j=d._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];j.value=L[d.labelFontFamily].value;for(var I=0;I<L.length;I++)if(L[I].value==j.value){A.legp_searchActive(L[I].value);break}j.addEventListener("input",(function(){for(var t=0;t<L.length;t++)if(L[t].value===j.value){d.labelFontFamily=L[t].key;break}})),d._elms.labelFontFamily=[j]}}),0),t.next=33;break;case 32:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 33:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"smoothHandle",value:function(t){for(var e=[],i=[],n=[],o=0;o<t.length;o++)n.push(t[o].lng,t[o].lat,t[o].alt),i.push(o/(t.length-1));for(var s=new Cesium.CatmullRomSpline({times:i,points:Cesium.Cartesian3.fromDegreesArrayHeights(n)}),a=20*t.length,r=0;r<=a;r++){var l=s.evaluate(r/a);e.push(this.cartesian3Towgs84(l,this.sdk.viewer))}return e}},{key:"renewPositions",value:function(t){var e=this;if(!this._error){var i,n=JSON.parse(JSON.stringify(t));switch(this.heightMode){case 0:case"0":!1;break;case 1:case"1":for(var o=0;o<n.length;o++){var s=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(n[o].lng,n[o].lat));n[o].alt=Number(s?(n[o].alt+Number(s)).toFixed(2):n[o].alt.toFixed(2))}!1;break;case 2:case"2":!0}var a=[];if(i=this.options["nose-to-tail"]&&"false"!==this.options["nose-to-tail"]?[].concat(L()(n),[n[0]]):L()(n),this.options.smooth&&"false"!==this.options.smooth){i=this.smoothHandle(i);for(var r=0;r<i.length;r++)a.push(i[r].lng,i[r].lat,i[r].alt)}else for(var l=0;l<i.length;l++)a.push(i[l].lng,i[l].lat,i[l].alt);if(this.options["nose-to-tail"]&&"false"!==this.options["nose-to-tail"]||this.options.smooth&&"false"!==this.options.smooth){for(var c=[],u=0;u<a.length;u+=3)c.push({lng:a[u],lat:a[u+1],alt:a[u+2]});var p=this;this.computeDistance(c,2,this.options["words-name"]).then((function(t){p.options.fitLengthByMeter=t,p.lengthUnit=p.options["length-unit"]}))}else{var h=this;this.computeDistance(n,2,this.options["words-name"]).then((function(t){h.options.fitLengthByMeter=t,h.lengthUnit=h.options["length-unit"]}))}var d=this;return this.computeDistance(n,2,this.options["words-name"]).then((function(t){d.options.lengthByMeter=t,d.lengthUnit=e.options["length-unit"]})),a}}},{key:"renewPolygon",value:function(t){var e=[];if(this.options.extend&&"false"!==this.options.extend){for(var i=[],n=0;n<t.length;n+=3)e.push([t[n],t[n+1]]);for(var o=turf.lineString(e),s=turf.buffer(o,this.options["extend-width"]/1e3,{units:"kilometers"}),a=0;a<s.geometry.coordinates[0].length;a++)i.push(s.geometry.coordinates[0][a][0],s.geometry.coordinates[0][a][1]);for(var r=[],l=1;l<s.geometry.coordinates.length;l++){for(var c=[],u=0;u<s.geometry.coordinates[l].length;u++)c.push(s.geometry.coordinates[l][u][0],s.geometry.coordinates[l][u][1]);r.push({positions:Cesium.Cartesian3.fromDegreesArray(c)})}this.entity.polygon=new Cesium.PolygonGraphics({hierarchy:{positions:Cesium.Cartesian3.fromDegreesArray(i),holes:r},material:Cesium.Color.fromCssColorString(this.options["extend-color"])})}else this.entity.polygon=void 0}},{key:"reset",value:(r=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.entity){t.next=2;break}return t.abrupt("return");case 2:this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lineWidth=this.originalOptions.width,this.lineType=this.originalOptions.type,this.noseToTail=this.originalOptions["nose-to-tail"],this.smooth=this.originalOptions.smooth,this.extend=this.originalOptions.extend,this.extendWidth=this.originalOptions["extend-width"],this.extendColor=this.originalOptions["extend-color"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.rotate=this.originalOptions.rotate,this.speed=this.originalOptions.speed,this.dashSize=this.originalOptions.dashSize,this.space=this.originalOptions.space,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect(),this.heightMode=this.options.heightMode;case 34:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接"+(this.options.attribute.link.content.length+1),url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接"+(this.options.attribute.link.content.length+1),url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图"+(this.options.attribute.vr.content.length+1),url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图"+(this.options.attribute.vr.content.length+1),url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=y.length>0&&void 0!==y[0]?y[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=No({},this.options.position):this.options.positions?l=No({},this.options.positions[0]):this.options.center?l=No({},this.options.center):this.options.start?l=No({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=43;break;case 25:c=[],t.t0=this.options.heightMode,t.next="0"===t.t0||0===t.t0?29:"1"===t.t0||1===t.t0?31:"2"===t.t0||2===t.t0?36:41;break;case 29:for(p=0;p<this.options.positions.length;p++)h=Cesium.Cartesian3.fromDegrees(this.options.positions[p].lng,this.options.positions[p].lat,this.options.positions[p].alt),c.push(h.x,h.y,h.z);return t.abrupt("break",41);case 31:return t.next=33,this.getClampToHeight(this.options.positions[0]);case 33:for(u=t.sent,d=0;d<this.options.positions.length;d++)m=Cesium.Cartesian3.fromDegrees(this.options.positions[d].lng,this.options.positions[d].lat,u+this.options.positions[d].alt),c.push(m.x,m.y,m.z);return t.abrupt("break",41);case 36:return t.next=38,this.getClampToHeight(this.options.positions[0]);case 38:for(u=t.sent,f=0;f<this.options.positions.length;f++)v=Cesium.Cartesian3.fromDegrees(this.options.positions[f].lng,this.options.positions[f].lat,u),c.push(v.x,v.y,v.z);return t.abrupt("break",41);case 41:g=Cesium.BoundingSphere.fromVertices(c),this.sdk.viewer.camera.flyToBoundingSphere(g,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 43:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label&&this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var i=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity)if(this.operate.positionEditing=t,!0===t){e.closeNodeEdit(this),this.event&&this.event.destroy(),this.event=new X(this.sdk),this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1;var n=JSON.parse(JSON.stringify(this.options.positions));this.previous={positions:L()(this.options.positions)};for(var o=0;o<n.length;o++)n[o]=Cesium.Cartesian3.fromDegrees(n[o].lng,n[o].lat,n[o].alt);for(var s=n[Math.floor(n.length/2)],a=[],r=0;r<n.length;r++)s.x,n[r].x,a.push({x:s.x-n[r].x,y:s.y-n[r].y,z:s.z-n[r].z});var l=[];this.event.mouse_move((function(t,e){l=[];for(var n=0;n<a.length;n++){var o={x:e.x-a[n].x,y:e.y-a[n].y,z:e.z-a[n].z};l.push(o)}var s=i.cartesian3Towgs84(l[0],i.sdk.viewer);i.label.position=[s.lng,s.lat,s.alt],i.options.label.position={lng:s.lng,lat:s.lat,alt:s.alt},i.tip.setPosition(e,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,e){i.event.mouse_move((function(){})),i.event.mouse_left((function(){})),i.event.mouse_right((function(){})),l=[];for(var n=0;n<a.length;n++)l.push({x:e.x-a[n].x,y:e.y-a[n].y,z:e.z-a[n].z});for(var o=[],s=0;s<l.length;s++){var r=i.cartesian3Towgs84(l[s],i.sdk.viewer);r.alt=i.options.positions[s].alt,o.push(r),i._elms.lng&&(i._elms.lng[s].innerHTML=r.lng.toFixed(8)),i._elms.lngInput&&(i._elms.lngInput[s].value=r.lng.toFixed(8)),i._elms.lat&&(i._elms.lat[s].innerHTML=r.lat.toFixed(8)),i._elms.latInput&&(i._elms.latInput[s].value=r.lat.toFixed(8)),i._elms.alt&&(i._elms.alt[s].innerHTML=r.alt.toFixed(2)),i._elms.altInput&&(i._elms.altInput[s].value=r.alt.toFixed(2))}i.options.positions=o,i.previous.positions=o;var c=i.renewPositions(i.options.positions);i.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(c),i.renewPolygon(c),i.positionEditing=!1})),this.event.mouse_right((function(t,e){i.event.mouse_move((function(){})),i.event.mouse_left((function(){})),i.event.mouse_right((function(){})),i.positionEditing=!1})),this.event.gesture_pinck_start((function(t,e){var n=new Date;i.event.gesture_pinck_end((function(){var o=new Date,s={position:{x:(t.position1.x+t.position2.x)/2,y:(t.position1.y+t.position2.y)/2}};o-n>=500?(i.event.mouse_move((function(){})),i.event.mouse_left((function(){})),i.event.mouse_right((function(){})),i.positionEditing=!1):leftEvent(s,e)}))})),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return l.length>0?l:n}),!1)}else{this.sdk&&this.sdk.viewer&&this.label&&this.label.entity||(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.destroy()),this.tip&&this.tip.destroy();var c=this.renewPositions(this.options.positions);switch(this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(c),this.renewPolygon(c),this.heightMode){case 0:case"0":case 1:case"1":this.label.position=[this.options.positions[0].lng,this.options.positions[0].lat,c[2]],this.options.label.position={lng:this.options.positions[0].lng,lat:this.options.positions[0].lat,alt:c[2]}}}}},{key:"setDIV",value:function(){var t,e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};i.x=i.x||0===i.x?i.x:10,i.y=i.y||0===i.y?i.y:10;for(var n=[],o=0;o<this.options.positions.length;o++)n.push([this.options.positions[o].lng,this.options.positions[o].lat]);var s=turf.lineString(n),a=turf.length(s,{units:"kilometers"}),r=turf.lineSliceAlong(s,0,a/2,{units:"kilometers"}),l=document.getElementById(i.domid),c=(t=Cesium.Cartesian3).fromDegrees.apply(t,L()(r.geometry.coordinates[r.geometry.coordinates.length-1]));this.sdk.viewer.scene.postRender.addEventListener((function(t){if("block"===l.style.display||""===l.style.display){var n=e.sdk.viewer.scene.cartesianToCanvasCoordinates(c);n&&(l.style.left=(n.x+i.x).toFixed(0)+"px",l.style.top=(n.y+i.y).toFixed(0)+"px")}}))}}],[{key:"createLabel",value:(i=o()(a.a.mark((function t(e){var i,n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.options.heightMode,t.next="0"===t.t0||0===t.t0?3:"1"===t.t0||1===t.t0?6:"2"===t.t0||2===t.t0?13:18;break;case 3:return n=!1,i=e.options.positions[0].alt,t.abrupt("break",18);case 6:return n=!1,t.next=9,e.getClampToHeight({lng:e.options.positions[0].lng,lat:e.options.positions[0].lat});case 9:return t.t1=t.sent,t.t2=e.options.positions[0].alt,i=t.t1+t.t2,t.abrupt("break",18);case 13:return n=!0,t.next=16,e.getClampToHeight({lng:e.options.positions[0].lng,lat:e.options.positions[0].lat});case 16:return i=t.sent,t.abrupt("break",18);case 18:e.options.label.position||(e.options.label.position={lng:e.options.positions[0].lng,lat:e.options.positions[0].lat,alt:i}),e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:n});case 20:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"create",value:function(t){var i;i=2==t.heightMode;var n=t.options.positions,o=t.renewPositions(n);t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,polyline:{positions:Cesium.Cartesian3.fromDegreesArrayHeights(o),width:t.options.width,clampToGround:i,zIndex:t.sdk._entityZIndex}}),t.entity.polyline.oriWidth=t.options.width,t.judgeLine(t.entity,t.options),t.entity.polyline.material=t.getMaterial(t.options.color,t.options.type,t.entity,t.options),t.sdk._entityZIndex++,e.createLabel(t),t.renewPolygon(o),t.computeDistance(n,2,t.options["words-name"]).then((function(e){t.options.lengthByMeter=e,t.lengthUnit=t.options["length-unit"],be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}));t.sdk.viewer.scene}},{key:"nodeEdit",value:function(t){if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus());else{var i;e.closeNodeEdit(t),YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.ControllerObject=new Oo(t.sdk),t.event.mouse_left((function(e,n){var o=t.sdk.viewer.scene.pick(e.position);o&&o.id&&o.id.name&&"node-secondary-edit-point"===o.id.name&&(i=o.id,t.ControllerObject.position=t.options.positions[i.index],t.ControllerObject.editTranslational(),t.tip&&t.tip.destroy(),t.ControllerObject.controllerCallBack=function(e){0===i.index&&(t.label.position=[e.position.lng,e.position.lat,e.position.alt],t.options.label.position={lng:e.position.lng,lat:e.position.lat,alt:e.position.alt}),t.options.positions[i.index]=e.position,t._elms.lng&&(t._elms.lng[i.index].innerHTML=e.position.lng.toFixed(8)),t._elms.lngInput&&(t._elms.lngInput[i.index].value=e.position.lng.toFixed(8)),t._elms.lat&&(t._elms.lat[i.index].innerHTML=e.position.lat.toFixed(8)),t._elms.latInput&&(t._elms.latInput[i.index].value=e.position.lat.toFixed(8)),t._elms.alt&&(t._elms.alt[i.index].innerHTML=e.position.alt.toFixed(2)),t._elms.altInput&&(t._elms.altInput[i.index].value=e.position.alt.toFixed(2)),i.position=Cesium.Cartesian3.fromDegrees(e.position.lng,e.position.lat,e.position.alt)})})),t.event.mouse_right((function(e,i){for(var n=0;n<t.nodePoints.length;n++)t.sdk.viewer.entities.remove(t.nodePoints[n]);t.nodePoints=[],t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null,t.ControllerObject.destroy();var o=t.renewPositions(t.options.positions);t.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(o),YJ.Measure.SetMeasureStatus(!1)})),t.event.mouse_move((function(e,i){t.tip.setPosition(i,e.endPosition.x,e.endPosition.y)})),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){var e=t.renewPositions(t.options.positions);return Cesium.Cartesian3.fromDegreesArrayHeights(e)}),!1);for(var n=0;n<t.options.positions.length;n++){var o=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:n,position:Cesium.Cartesian3.fromDegrees(t.options.positions[n].lng,t.options.positions[n].lat,t.options.positions[n].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.push(o)}}}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.ControllerObject&&t.ControllerObject.destroy(),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[]}}]);var i,n,s,r,l}(jn);function Ho(t,e){var i=document.createElement("a");i.download=e,i.style.display="none";var n=new Blob([t]);i.href=URL.createObjectURL(n),document.body.appendChild(i),i.click(),document.body.removeChild(i)}var Vo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new Cesium.EntityCollection;if(t.forEach((function(t){(t instanceof fo||t instanceof ko||t instanceof eo||t instanceof zo)&&e.add(t.entity)})),e.values.length){var i=Cesium.exportKml({entities:e});i.then((function(t){Ho(t.kml,(new Date).getTime()+".kml")}))}else console.error("允许导出为kml的对象为空")},Go={yingguangse:new Map,gonganlan:new Map,hong:new Map};Go.yingguangse.set("--color-sdk-base","#00ffff"),Go.yingguangse.set("--color-sdk-auxiliary","#004242"),Go.yingguangse.set("--color-sdk-auxiliary-public","#ffffff"),Go.yingguangse.set("--color-sdk-warning-0","#1BF8C3"),Go.yingguangse.set("--color-sdk-warning-1","#F16C55"),Go.yingguangse.set("--color-sdk-warning-2","#FFA145"),Go.yingguangse.set("--color-sdk-warning-3","#FFDF53"),Go.yingguangse.set("--color-sdk-text-head","#FFFFFF"),Go.yingguangse.set("--color-sdk-text-head-1","#E6F7FF"),Go.yingguangse.set("--color-sdk-text-head-2","#ADF1FF"),Go.yingguangse.set("--color-sdk-gradual","#00ffff 6.25%, #00ffff 100%"),Go.yingguangse.set("--color-sdk-bg-gradual","#00ffff33 0%, #00ffff00 100%");var Uo,Wo,Yo,Jo=null,qo=0,Xo=0,Zo=function(){var t=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return C=function(t){var i=u.getElementsByClassName("tr");i.length>0&&(i[i.length-1].querySelector("input[name='time']").disabled=void 0);var n=u.getElementsByClassName("tr active")[0];n&&(n.className="tr");var o=document.createElement("div");o.className="tr active",o.innerHTML='\n <div class="td" style="justify-content: center;">视点'.concat(d+1,'</div>\n <div class="td">\n <input class="input time" type="number" title="" min="0" max="999.99" step="0.01" name="time" value="').concat(t.duration,'">\n </div>\n <div class="td action">\n <button class="play">播放</span>\n <button class="delete">删除</span>\n </div>\n '),o.addEventListener("click",(function(t){if(t.target.parentNode===o){var e=u.getElementsByClassName("tr active")[0];e&&(e.className="tr"),o.className="tr active";for(var n=0;n<i.length;n++)if(i[n]===o){l=n+1;break}}})),o.addEventListener("dblclick",(function(t){if(t.target.parentNode===o)for(var e=0;e<i.length;e++)if(i[e]===o){s.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(m[e].position.lng,m[e].position.lat,m[e].position.alt),orientation:m[e].orientation,duration:1});break}}));var a=o.getElementsByClassName("play")[0],r=o.getElementsByClassName("delete")[0],c=o.querySelector("input[name='time']");a.addEventListener("click",(function(){for(var t=0;t<i.length;t++)i[t]===r.parentNode.parentNode&&$o(e,m,t)})),r.addEventListener("click",(function(t){for(var e=0;e<i.length;e++)if(i[e]===r.parentNode.parentNode){if(m.splice(e,1),m[m.length-1]&&(m[m.length-1].duration=0),u.removeChild(o),l>e+1?(l--,i[l-1].className="tr active"):l==e+1&&(i.length==e&&(l-=1),0!=i.length&&(i[l-1].className="tr active")),i.length>0){var n=i[i.length-1].querySelector("input[name='time']");n.disabled="disabled",n.value=0}break}})),c.addEventListener("input",(function(e){y.checked=!1,t.duration=Number(c.value),t.duration<0&&(t.duration=0)})),c.addEventListener("blur",(function(){c.value=Number(Number(c.value).toFixed(2)),c.value<0&&(c.value=0)})),u.insertBefore(o,i[l]),l++,i[i.length-1].querySelector("input[name='time']").disabled="disabled"},i=w.length>1&&void 0!==w[1]?w[1]:{},n=w.length>2&&void 0!==w[2]?w[2]:{},o=i.name||"漫游路径",i.points||(i.points=[]),i.repeat&&(qo=Number(i.repeat)),s=e.viewer,r=new ai(e),l=0,Jo&&Jo.close&&(Jo.close(),Jo=null),t.next=12,new W(s._container,{title:"飞行漫游",left:"180px",top:"100px",closeCallBack:function(){Qo({viewer:s})}});case 12:return Jo=t.sent,t.next=15,Jo.init();case 15:for((c=document.createElement("div")).className="fly-roam",c.innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" type="text" name="name">\n </div>\n <div class="col"></div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <input type="checkbox" name="isTotalTime" style="width: 16px; line-height: 15px; height: 15px; cursor: pointer; width: auto; margin-right: 5px;">\n <span class="label">设置总时长</span>\n <div class="input-number input-number-unit-3">\n <input class="input total-time" type="number" title="" min="0" max="999999.99" step="0.01" name="totalTime" value="0">\n <span class="unit" style="top: 6px;">秒(s)</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <input type="checkbox" name="repeat" style="width: 16px; line-height: 15px; height: 15px; cursor: pointer; width: auto; margin-right: 5px;">\n <span class="label">是否循环播放</span>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <button class="add-point"><svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点</button>\n </div>\n <div class="col">\n <button class="modify-point"><svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>调整视点</button>\n </div>\n <div class="col">\n <button class="afreshPlay"><svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>播放</button>\n </div>\n <div class="col">\n <button class="cease"><svg class="icon-pause"><use xlink:href="#yj-icon-pause"></use></svg>结束</button>\n </div>\n </div>\n <div class="table">\n <div class="table-head">\n <div class="tr">\n <div class="th">序号</div>\n <div class="th">时长(s)</div>\n <div class="th">操作</div>\n </div>\n </div>\n <div class="table-body">\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',Jo.contentAppChild(c),c.getElementsByTagName("*"),u=c.getElementsByClassName("table-body")[0],p=c.getElementsByClassName("table-empty")[0],h={set:function(t,e,i){return t[e]=i,t.length>0?p.style.display="none":p.style.display="flex",!0}},d=0,m=new Proxy([],h),d=0;d<i.points.length;d++)m.push(i.points[d]),C(i.points[d]);(f=c.querySelector("input[name='name']")).value=o,f.addEventListener("input",(function(){o=f.value})),(v=document.createElement("button")).innerHTML="保存",v.addEventListener("click",(function(){o||(o="漫游路径",f.value=o);var t=[];m.map((function(e){t.push(e)})),n.clickSavePath&&n.clickSavePath({name:o,points:t,repeat:qo+""})})),Jo.footAppChild(v),c.getElementsByClassName("cease")[0].addEventListener("click",(function(){s.camera.cancelFlight()})),c.getElementsByClassName("afreshPlay")[0].addEventListener("click",(function(){m.length>0&&$o(e,m,0)})),c.getElementsByClassName("add-point")[0].addEventListener("click",(function(){var t={duration:0,position:r.cartesian3Towgs84(s.camera.position,s),orientation:{heading:s.camera.heading,pitch:s.camera.pitch,roll:s.camera.roll}};m.splice(l,0,t),C(t),d++})),c.getElementsByClassName("modify-point")[0].addEventListener("click",(function(){if(l){var t=r.cartesian3Towgs84(s.camera.position,s);m[l-1].position=t,m[l-1].orientation={heading:s.camera.heading,pitch:s.camera.pitch,roll:s.camera.roll}}})),g=c.querySelector("input[name='totalTime']"),y=c.querySelector("input[name='isTotalTime']"),b=c.querySelector("input[name='repeat']"),y.addEventListener("change",(function(){var t=u.getElementsByClassName("tr");if(y.checked&&t.length>0){for(var e=Number((Number(g.value)/(t.length-1)).toFixed(2)),i=0;i<t.length-1;i++)m[i].duration=e,t[i].querySelector("input[name='time']").value=e;t[t.length-1].querySelector("input[name='time']").value=0}})),g.addEventListener("blur",(function(){var t=u.getElementsByClassName("tr");if(g.value=Number(g.value),g.value<0&&(g.value=0),y.checked&&t.length>0){for(var e=Number((Number(g.value)/(t.length-1)).toFixed(2)),i=0;i<t.length-1;i++)m[i].duration=e,t[i].querySelector("input[name='time']").value=e;t[t.length-1].querySelector("input[name='time']").value=0}})),b.checked=qo===1/0,b.addEventListener("change",(function(){qo=b.checked?1/0:0,Xo=qo,n.changeRepeatStateCallBack&&n.changeRepeatStateCallBack(b.checked)}));case 48:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ko=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;Uo&&Uo.destroy(),(Uo=new Cesium.ScreenSpaceEventHandler(t.viewer.canvas)).setInputAction((function(e){Qo(t)}),Cesium.ScreenSpaceEventType.RIGHT_CLICK);var s,r=t.viewer;r.camera.cancelFlight(),Je(t),qe(t),r.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(e[i].position.lng,e[i].position.lat,e[i].position.alt),orientation:e[i].orientation,duration:n?e[i-1].duration:.5,maximumHeight:e[i].position.alt,complete:(s=o()(a.a.mark((function n(){return a.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:++i<=e.length-1?Ko(t,e,i,!0):Xo&&e.length>1?(Xo--,Ko(t,e,0)):Uo&&Uo.destroy();case 3:case"end":return n.stop()}}),n)}))),function(){return s.apply(this,arguments)}),easingFunction:n?Cesium.EasingFunction.LINEAR_NONE:Cesium.EasingFunction.EXPONENTIAL_OUT})},$o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;Xo=qo,Ko(t,e,i,n)},Qo=function(t){t&&t.viewer&&t.viewer.camera.cancelFlight(),Uo&&Uo.destroy()},ts=null,es=null,is=null,ns=null,os="uniform sampler2D colorTexture;//输入的场景渲染照片\n varying vec2 v_textureCoordinates;\n uniform float tiltAngle;\n uniform float rainSize;\n uniform float rainWidth;\n uniform float rainSpeed;\n\n float hash(float x){\n return fract(sin(x*133.3)*13.13);\n }\n void main(void){\n float time = czm_frameNumber / rainSpeed;\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n float a= tiltAngle;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*rainSize+1.;\n float v=1.-sin(hash(floor(uv.x*rainWidth))*2.);\n float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*20.;\n c*=v*b; //屏幕上雨的颜色\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); //将雨和三维场景融合\n }",ss="uniform sampler2D colorTexture;\n varying vec2 v_textureCoordinates;\n uniform float snowSize;\n uniform float snowSpeed;\n \n float snow(vec2 uv,float scale)\n {\n float time = czm_frameNumber / snowSpeed;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01*snowSize);\n return k*w;\n }\n void main(void){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n //float c=smoothstep(1.,0.3,clamp(uv.y*.3+.8,0.,.75));\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c));\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5);\n }\n ",as="\n uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n uniform float visibility;\n uniform vec4 fogColor;\n varying vec2 v_textureCoordinates;\n void main(void)\n {\n vec4 origcolor = texture2D(colorTexture, v_textureCoordinates);\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 depthcolor = texture2D(depthTexture, v_textureCoordinates);\n float f = visibility * (depthcolor.r - 0.3) / 0.2;\n if (f < 0.0) f = 0.0;\n else if (f > 1.0) f = 1.0;\n gl_FragColor = mix(origcolor, fogColor, f);\n }\n ";var rs,ls,cs,us={},ps=void 0,hs=void 0,ds=!1,ms={};function fs(){if(this.sdk&&this.sdk.viewer){(hs=this.sdk.viewer.camera.pickEllipsoid(new Cesium.Cartesian2(this.sdk.viewer.canvas.clientWidth/2,this.sdk.viewer.canvas.clientHeight/(2-(90+this.sdk.viewer.camera.pitch/(Cesium.Math.PI/180))/110))))||(hs=this.sdk.viewer.camera.position);var t=Wo.cartesian3Towgs84(this.sdk.viewer.camera.position,this.sdk.viewer).alt,e=Wo.cartesian3Towgs84(hs,this.sdk.viewer);t>9e6&&(t=9e6),t<1e5?(this.entity.billboard.show=!0,this.entity.rectangle.show=!1):(this.entity.billboard.show=!1,this.entity.rectangle.show=!0),ps=new Cesium.Rectangle(Cesium.Math.toRadians(e.lng-t/12e4),Cesium.Math.toRadians(e.lat-t/28e4),Cesium.Math.toRadians(e.lng+t/12e4),Cesium.Math.toRadians(e.lat+t/28e4))}}function vs(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var gs,ys,bs=null,Cs=null,ws=null,ks=null,xs=!1,_s=10,Es="#ffd000",Ss=!0,Ds=2.5,Ms="#43cf7c",Ps=!0,Os=1.8,Ts="#ff0000",Ns=!1,Bs=1,Ls="#64b6d9",As=!1,js=1,Is="#d084d1";function Fs(){if(ys){var t=ys.viewer.camera.positionCartographic;Cesium.Math.toDegrees(t.height)<1e6?ys.viewer.scene.globe.material||!0!==xs||zs(ys):Hs(ys)}}function Rs(){return(Rs=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m=function(t){var e=t.target.value;return(t.target.value||"undefined"!==t.target.dataset.null&&""!==t.target.dataset.null&&!Boolean(t.target.dataset.null))&&(e=Number(e),t.target.max&&e>Number(t.target.max)&&(e=Number(t.target.max)),t.target.min&&e<Number(t.target.min)&&(e=Number(t.target.min)),t.target.dataset.min&&e<Number(t.target.dataset.min)&&(e=Number(t.target.dataset.min))),e},ys=e,e&&!bs){t.next=4;break}return t.abrupt("return");case 4:return Cs||Vs(),gs||(gs=new ai(e)),t.next=8,new Ki(e,{},{title:"全局等高线",left:"180px",top:"100px",closeCallBack:function(){bs=null}});case 8:(bs=t.sent)._element.body.className=bs._element.body.className+" contour",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col" style="flex: 0 0 120px;">\n <span class="label">等高线</span>\n <input class="btn-switch show" type="checkbox">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label">等高距</span>\n <div class="input-number input-number-unit-1">\n <input class="input equal-height-distance" type="number" title="" min="1" max="1000">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col input-select-unit-box" style="flex: 0 0 60px;">\n </div>\n <div class="col input-select-unit-box" style="flex: 0 0 157px;">\n <span class="label">选中线颜色</span>\n <div class="active-color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col" style="flex: 0 0 120px;">\n <span class="label">计曲线</span>\n <input class="btn-switch index-contour-switch" type="checkbox">\n </div>\n <div class="col input-select-unit-box" style="flex: 0 0 120px;">\n <span class="label">计曲线颜色</span>\n <div class="index-contour-color"></div>\n </div>\n <div class="col input-select-unit-box">\n <span class="label">计曲线宽度</span>\n <div class="input-number input-number-unit-1">\n <input class="input index-contour-width" type="number" title="" step="0.1" min="1" max="10">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col" style="flex: 0 0 120px;">\n <span class="label">首曲线</span>\n <input class="btn-switch intermediate-contour-switch" type="checkbox">\n </div>\n <div class="col input-select-unit-box" style="flex: 0 0 120px;">\n <span class="label">首曲线颜色</span>\n <div class="intermediate-contour-color"></div>\n </div>\n <div class="col input-select-unit-box">\n <span class="label">首曲线宽度</span>\n <div class="input-number input-number-unit-1">\n <input class="input intermediate-contour-width" type="number" step="0.1" title="" min="1" max="10">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col" style="flex: 0 0 120px;">\n <span class="label">间曲线</span>\n <input class="btn-switch halfInterval-contour-switch" type="checkbox">\n </div>\n <div class="col input-select-unit-box" style="flex: 0 0 120px;">\n <span class="label">间曲线颜色</span>\n <div class="halfInterval-contour-color"></div>\n </div>\n <div class="col input-select-unit-box">\n <span class="label">间曲线宽度</span>\n <div class="input-number input-number-unit-1">\n <input class="input halfInterval-contour-width" type="number" title="" min="1" max="10">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col" style="flex: 0 0 120px;">\n <span class="label">助曲线</span>\n <input class="btn-switch supplementary-contour-switch" type="checkbox">\n </div>\n <div class="col input-select-unit-box" style="flex: 0 0 120px;">\n <span class="label">助曲线颜色</span>\n <div class="supplementary-contour-color"></div>\n </div>\n <div class="col input-select-unit-box">\n <span class="label">助曲线宽度</span>\n <div class="input-number input-number-unit-1">\n <input class="input supplementary-contour-width" type="number" title="" min="1" max="10">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n ',bs.contentAppChild(i),e.viewer.scene.postRender.removeEventListener(Fs),e.viewer.scene.postRender.addEventListener(Fs),(n=i.getElementsByClassName("show")[0]).checked=xs,n.addEventListener("change",(function(t){if(t.target.checked){if(xs=!0,e.viewer.camera.positionCartographic.height>16360){var i=e.viewer.camera.positionCartographic,n={position:{lng:Cesium.Math.toDegrees(i.longitude),lat:Cesium.Math.toDegrees(i.latitude),alt:16360}};ze(e,n,.5)}zs(e)}else xs=!1,Hs(e)})),(o=i.getElementsByClassName("equal-height-distance")[0]).value=_s,o.addEventListener("blur",(function(t){var e=m(t);_s=e,o.value=e,Cs&&(Cs.uniforms.spacing=5*_s)})),new Ti({el:i.getElementsByClassName("active-color")[0],size:"mini",alpha:!0,defaultColor:Es,disabled:!1,openPickerAni:"opacity",sure:function(t){Es=t,Cs&&(Cs.uniforms.activeColor=Cesium.Color.fromCssColorString(Es))},clear:function(){Es="rgba(255,255,255,1)",Cs&&(Cs.uniforms.activeColor=Cesium.Color.fromCssColorString(Es))}}),(s=i.getElementsByClassName("index-contour-switch")[0]).checked=Ss,s.addEventListener("change",(function(t){Ss=t.target.checked,Cs&&(Cs.uniforms.indexContourShow=Ss)})),new Ti({el:i.getElementsByClassName("index-contour-color")[0],size:"mini",alpha:!0,defaultColor:Ms,disabled:!1,openPickerAni:"opacity",sure:function(t){Ms=t,Cs&&(Cs.uniforms.indexContourColor=Cesium.Color.fromCssColorString(Ms))},clear:function(){Ms="rgba(255,255,255,1)",Cs&&(Cs.uniforms.indexContourColor=Cesium.Color.fromCssColorString(Ms))}}),(r=i.getElementsByClassName("index-contour-width")[0]).value=Ds,r.addEventListener("blur",(function(t){var e=m(t);Ds=e,r.value=e,Cs&&(Cs.uniforms.indexContourWidth=Ds)})),(l=i.getElementsByClassName("intermediate-contour-switch")[0]).checked=Ps,l.addEventListener("change",(function(t){Ps=t.target.checked,Cs&&(Cs.uniforms.intermediateContourShow=Ps)})),new Ti({el:i.getElementsByClassName("intermediate-contour-color")[0],size:"mini",alpha:!0,defaultColor:Ts,disabled:!1,openPickerAni:"opacity",sure:function(t){Ts=t,Cs&&(Cs.uniforms.intermediateContourColor=Cesium.Color.fromCssColorString(Ts))},clear:function(){Ts="rgba(255,255,255,1)",Cs&&(Cs.uniforms.intermediateContourColor=Cesium.Color.fromCssColorString(Ts))}}),(c=i.getElementsByClassName("intermediate-contour-width")[0]).value=Os,c.addEventListener("blur",(function(t){var e=m(t);Os=e,c.value=e,Cs&&(Cs.uniforms.intermediateContourWidth=Os)})),(u=i.getElementsByClassName("halfInterval-contour-switch")[0]).checked=Ns,u.addEventListener("change",(function(t){Ns=t.target.checked,Cs&&(Cs.uniforms.halfIntervalContourShow=Ns)})),new Ti({el:i.getElementsByClassName("halfInterval-contour-color")[0],size:"mini",alpha:!0,defaultColor:Ls,disabled:!1,openPickerAni:"opacity",sure:function(t){Ls=t,Cs&&(Cs.uniforms.halfIntervalContourColor=Cesium.Color.fromCssColorString(Ls))},clear:function(){Ls="rgba(255,255,255,1)",Cs&&(Cs.uniforms.halfIntervalContourColor=Cesium.Color.fromCssColorString(Ls))}}),(p=i.getElementsByClassName("halfInterval-contour-width")[0]).value=Bs,p.addEventListener("blur",(function(t){var e=m(t);Bs=e,p.value=e,Cs&&(Cs.uniforms.halfIntervalContourWidth=Bs)})),(h=i.getElementsByClassName("supplementary-contour-switch")[0]).checked=As,h.addEventListener("change",(function(t){As=t.target.checked,Cs&&(Cs.uniforms.supplementaryContourShow=As)})),new Ti({el:i.getElementsByClassName("supplementary-contour-color")[0],size:"mini",alpha:!0,defaultColor:Is,disabled:!1,openPickerAni:"opacity",sure:function(t){Is=t,Cs&&(Cs.uniforms.supplementaryContourColor=Cesium.Color.fromCssColorString(Is))},clear:function(){Is="rgba(255,255,255,1)",Cs&&(Cs.uniforms.supplementaryContourColor=Cesium.Color.fromCssColorString(Is))}}),(d=i.getElementsByClassName("supplementary-contour-width")[0]).value=js,d.addEventListener("blur",(function(t){var e=m(t);js=e,d.value=e,Cs&&(Cs.uniforms.supplementaryContourWidth=js)}));case 50:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function zs(t){var e=t.viewer.camera.positionCartographic;Cesium.Math.toDegrees(e.height)>1e6||(ws&&ws.destroy(),t.viewer.container.getElementsByClassName("YJ-customize-active-height-elm")[0]||t.viewer.container.appendChild(ks),(ws=new Cesium.ScreenSpaceEventHandler(t.viewer.canvas)).setInputAction((function(e){var i=t.viewer.scene.pickPosition(e.endPosition);if(i){var n=0,o=0;if(t.viewer&&t.viewer._element){var s=t.viewer._element.getElementsByClassName("cesium-widget")[0].getElementsByTagName("canvas")[0];n=s.getBoundingClientRect().top+window.scrollY,o=s.getBoundingClientRect().left+window.scrollX}ks.style.left=e.endPosition.x-50+o+"px",ks.style.top=e.endPosition.y-40+n+"px",ks.style.display="block";var a=gs.cartesian3Towgs84(i,t.viewer),r=Math.floor(a.alt/Cs.uniforms.spacing)*Cs.uniforms.spacing,l=a.alt-r,c=Cs.uniforms.spacing/(Cs.uniforms.secondaryLinesCount+1),u=Math.floor(l/c)*c+r;a.alt<0&&(a.alt=0),a.alt-u>c/2&&(u+=c),Cs.uniforms.mouseHeight=a.alt,Cs.uniforms.mousePosition=i,ks.innerHTML="".concat(u.toFixed(0))}else ks.style.display="none"}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.viewer.scene.globe.material=Cs)}function Hs(t){ws&&(ws.destroy(),ws=null),t.viewer.container.getElementsByClassName("YJ-customize-active-height-elm")[0]&&(ks.style.display="none",t.viewer.container.removeChild(ks)),t.viewer.scene.globe.material=null}function Vs(){Cesium.Material._materialCache._materials.ElevationContour.fabric.source="\nuniform vec4 activeColor; // 选中颜色\nuniform float spacing; // 等高距\n\n// 计曲线\nuniform bool indexContourShow;\nuniform float indexContourWidth;\nuniform vec4 indexContourColor;\n// 首曲线\nuniform bool intermediateContourShow;\nuniform float intermediateContourWidth;\nuniform vec4 intermediateContourColor;\n// 间曲线\nuniform bool halfIntervalContourShow;\nuniform float halfIntervalContourWidth;\nuniform vec4 halfIntervalContourColor;\n// 助曲线\nuniform bool supplementaryContourShow;\nuniform float supplementaryContourWidth;\nuniform vec4 supplementaryContourColor;\n\nuniform float mouseHeight;\n\nuniform float secondaryLinesCount; // 0=无次线, 1=1条次线, 2=2条次线...\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // 主等高线计算\n float distanceToMainContour = mod(materialInput.height, spacing);\n \n // 抗锯齿计算\n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n float dxc = abs(dFdx(materialInput.height));\n float dyc = abs(dFdy(materialInput.height));\n float dFMain = max(dxc, dyc) * czm_pixelRatio * indexContourWidth;\n#else\n float dFMain = czm_pixelRatio * indexContourWidth;\n#endif\n\n bool isMainContour = distanceToMainContour < dFMain;\n bool isSecondaryContour = false;\n float dFSecondary = 0.0;\n float secondarySpacing = 0.0;\n bool isHalfInterval = false;\n bool isIntermediate= false;\n\n // 计算当前高度所属的等高线高度\n float mainContourHeight = floor(materialInput.height / spacing) * spacing;\n float secondaryContourHeight = floor(materialInput.height / spacing * (secondaryLinesCount + 1.0)) * spacing / (secondaryLinesCount + 1.0);\n \n // 计算次线在两条主等高线之间的相对位置\n float relativeHeight = materialInput.height - mainContourHeight;\n float normalizedPosition = relativeHeight / spacing;\n \n // 计算次线索引(从主等高线开始计数)\n float lineIndex = floor(normalizedPosition * (secondaryLinesCount + 1.0));\n\n // 只有当存在次线时才计算次线\n if(secondaryLinesCount > 0.0) {\n float secondaryLinesWidth = supplementaryContourWidth;\n secondarySpacing = spacing / (secondaryLinesCount + 1.0);\n float distanceToSecondaryContour = mod(materialInput.height, secondarySpacing);\n \n // 确保次线不会与主线重叠\n float minDistanceToMain = min(distanceToMainContour, spacing - distanceToMainContour);\n bool notCloseToMain = minDistanceToMain > dFMain * 2.0; // 2倍线宽缓冲\n\n\n if (lineIndex > 0.0 && lineIndex < secondaryLinesCount) {\n // 使用mod函数检查余数是否接近0(考虑浮点数精度问题)\n isHalfInterval = abs(mod(lineIndex, 2.0)) < 0.01;\n if(isHalfInterval) {\n secondaryLinesWidth = halfIntervalContourWidth;\n }\n // 使用mod函数检查余数是否接近0(考虑浮点数精度问题)\n isIntermediate = abs(mod(lineIndex, 4.0)) < 0.01;\n if(isIntermediate) {\n secondaryLinesWidth = intermediateContourWidth;\n }\n }\n\n\n\n\n\n\n\n\n \n#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))\n dFSecondary = max(dxc, dyc) * czm_pixelRatio * secondaryLinesWidth;\n#else\n dFSecondary = czm_pixelRatio * secondaryLinesWidth;\n#endif\n\n isSecondaryContour = (distanceToSecondaryContour < dFSecondary) && notCloseToMain;\n }\n\n // 高亮判断\n bool shouldHighlight = false;\n if(isMainContour && abs(mainContourHeight - mouseHeight) < 0.5 * (spacing/(secondaryLinesCount+1.0))) {\n shouldHighlight = true;\n } else if(isSecondaryContour && abs(secondaryContourHeight - mouseHeight) < 0.5 * (spacing/(secondaryLinesCount+1.0))) {\n shouldHighlight = true;\n }\n\n // 颜色输出\n vec4 outColor;\n if(shouldHighlight) {\n outColor = czm_gammaCorrect(vec4(activeColor.rgb, activeColor.a));\n } else if(isMainContour) {\n float a = indexContourColor.a;\n if(!indexContourShow) {\n a = 0.0;\n }\n outColor = czm_gammaCorrect(vec4(indexContourColor.rgb, a));\n } else if(isSecondaryContour) {\n float a = supplementaryContourColor.a;\n if(!supplementaryContourShow) {\n a = 0.0;\n }\n outColor = czm_gammaCorrect(vec4(supplementaryContourColor.rgb, a));\n if(isHalfInterval) {\n float a = halfIntervalContourColor.a;\n if(!halfIntervalContourShow) {\n a = 0.0;\n }\n outColor = czm_gammaCorrect(vec4(halfIntervalContourColor.rgb, a));\n }\n if(isIntermediate) {\n float a = intermediateContourColor.a;\n if(!intermediateContourShow) {\n a = 0.0;\n }\n outColor = czm_gammaCorrect(vec4(intermediateContourColor.rgb, a));\n }\n } else {\n outColor = vec4(0.0);\n }\n\n if(materialInput.height<0.0) {\n outColor = vec4(0.0);\n }\n\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n return material;\n}\n",Cs=new Cesium.Material({fabric:{type:"ElevationContour",uniforms:{spacing:50,activeColor:Cesium.Color.fromCssColorString(Es),mouseHeight:-1e5,mousePosition:new Cesium.Cartesian3(0,0,0),secondaryLinesCount:19,cameraHeight:0,indexContourShow:Ss,indexContourWidth:Ds,indexContourColor:Cesium.Color.fromCssColorString(Ms),intermediateContourShow:Ps,intermediateContourWidth:Os,intermediateContourColor:Cesium.Color.fromCssColorString(Ts),halfIntervalContourShow:Ns,halfIntervalContourWidth:Bs,halfIntervalContourColor:Cesium.Color.fromCssColorString(Ls),supplementaryContourShow:As,supplementaryContourWidth:js,supplementaryContourColor:Cesium.Color.fromCssColorString(Is)}}})}function Gs(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Us(t,e,i){return t.set(Ys(t,e),i),i}function Ws(t,e){return t.get(Ys(t,e))}function Ys(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}(ks=document.createElement("div")).className="YJ-customize-active-height-elm",ks.style.position="absolute",ks.style.left="10px",ks.style.top="10px",ks.style.width="100px",ks.style.textAlign="center",ks.style.pointerEvents="none",ks.style.color="#ff0000",ks.style.display="none";var Js=new WeakMap,qs=new WeakMap,Xs=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;k()(this,t),Gs(this,Js,null),Gs(this,qs,{bgimg:null,img1:null,img2:null,img3:null,img4:null}),this.sdk=e,this.options=i,this.data={},this._webSocketCallback=n,this._tools=new ai(this.sdk),this.requestResource()}),[{key:"requestResource",value:function(){var t=this;this.options.host=this.options.host||h();var e;e=this.options.host+"/yjearth4.0/api/v1/gps/state",this.reconnecting=new ReconnectingWebSocket("ws://"+e,[],{maxReconnectAttempts:8}),this.reconnecting.onopen=function(e){t.reconnecting.onmessage=function(){var e=o()(a.a.mark((function e(i){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.data=JSON.parse(i.data),!t.data||!t.data.rmc){e.next=7;break}return e.next=4,t._tools.getClampToHeight(t.data.rmc);case 4:n=e.sent,t.position=new Cesium.Cartesian3.fromDegrees(t.data.rmc.lng,t.data.rmc.lat,n),t.create();case 7:t._webSocketCallback&&t._webSocketCallback(t.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}},{key:"create",value:function(){var t=this;if(this.getcanvas(),this.data&&this.data.rmc&&!this.entity){this.entity=new Cesium.CustomDataSource,this.sdk.viewer.dataSources.add(this.entity);var e=new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return t.position}),!1),billboard:{image:this._tools.getSourceRootPath()+"/img/locate2.png",scale:1,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:1e8}),!1),width:31,height:36,pixelOffset:new Cesium.Cartesian2(0,-15)}}),i=new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return t.position}),!1),billboard:{image:new Cesium.CallbackProperty((function(){return t.lableCanvas})),scale:1,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:1e8}),!1),width:220,height:140,pixelOffset:new Cesium.Cartesian2(0,-110)}});this.entity.entities.add(e),this.entity.entities.add(i)}}},{key:"loaded",value:function(t){var e;Object.defineProperty(this,"data",{get:function(){return e},set:function(i){e=i,t&&(t(),t=void 0)}})}},{key:"getcanvas",value:function(){var t=this,e=[{images:this._tools.getSourceRootPath()+"/img/bubble/lng.png",text:"经度:"+parseFloat(this.data.rmc.lng.toFixed(10))},{images:this._tools.getSourceRootPath()+"/img/bubble/lat.png",text:"纬度:"+parseFloat(this.data.rmc.lat.toFixed(10))},{images:this._tools.getSourceRootPath()+"/img/bubble/h.png",text:"海拔:"+parseFloat(this.data.rmc.alt.toFixed(10))},{images:this._tools.getSourceRootPath()+"/img/bubble/satellite.png",text:"卫星:"+this.data.satellites||!1}];if(Ws(Js,this)){var i=Ws(Js,this).getContext("2d");i.clearRect(0,0,Ws(Js,this).width,Ws(Js,this).height),i.drawImage(Ws(qs,this).bgimg,0,0,Ws(Js,this).width,Ws(Js,this).height);var n=0;e.forEach((function(o,s){i.drawImage(Ws(qs,t)["img"+(s+1)],12,12+26*s),i.fillStyle="#fff",i.font="16px Arial",i.fillText(o.text,44,28+26*s),++n===e.length&&(t.lableCanvas=Ws(Js,t).toDataURL())}))}else{Us(Js,this,document.createElement("canvas"));var o=Ws(Js,this).getContext("2d");Ws(Js,this).width=220,Ws(Js,this).height=140;var s=new Image;Ws(qs,this).bgimg=s,s.src=this._tools.getSourceRootPath()+"/img/bubble/bubble.png";var a=0;s.onload=function(){o.drawImage(s,0,0,Ws(Js,t).width,Ws(Js,t).height),e.forEach((function(i,n){var s=new Image;Ws(qs,t)["img"+(n+1)]=s,s.src=i.images,s.onload=function(){o.drawImage(s,12,12+26*n),o.fillStyle="#fff",o.font="16px Arial",o.fillText(i.text,44,28+26*n),++a===e.length&&(t.lableCanvas=Ws(Js,t).toDataURL())}}))}}}},{key:"flyTo",value:(t=o()(a.a.mark((function t(){var e,i,n=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=n.length>0&&void 0!==n[0]?n[0]:{},!this.data||!this.data.rmc){t.next=9;break}return t.next=4,this._tools.getClampToHeight(this.data.rmc);case 4:i=t.sent,ii(0),Je(this.sdk),qe(this.sdk),this.sdk.viewer.camera.flyTo({orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)},destination:Cesium.Cartesian3.fromDegrees(this.data.rmc.lng,this.data.rmc.lat,i+(e.height||500))});case 9:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"remove",value:function(){Us(Js,this,null),Us(qs,this,{}),this.reconnecting&&this.reconnecting.close(),this.sdk.viewer.dataSources.remove(this.entity),this.entity=null}},{key:"flicker",value:function(){}}]);var t}();var Zs=i(9),Ks=i.n(Zs);function $s(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Qs=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return k()(this,e),(i=$s(this,e,[t,n])).viewer=t.viewer,i.entityHasCreated=!1,i.event=null,i.tip=null,i.points_ids=[],i.color=n.color||"rgba(185,14,14,0.58)",i._is2D=o,i._sdk2D=Me(),i}return Xi()(e,t),_()(e,[{key:"create_point",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.viewer,i=this.randomString();return e.entities.add(new Cesium.Entity({id:i,position:t,billboard:{image:this.getSourceRootPath()+"/img/point.png",color:Cesium.Color.WHITE.withAlpha(.99)}})),i}},{key:"remove_entity",value:function(t){this.viewer.entities.removeById(t),!this._is2D&&this._sdk2D&&this._sdk2D.viewer&&this._sdk2D.viewer.entities&&this._sdk2D.viewer.entities.removeById(t)}},{key:"start",value:function(){}},{key:"end",value:function(){var t=this;YJ.Measure.SetMeasureStatus(!1),this.entityHasCreated=!1,this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy(),this.tip&&this.tip.destroy(),this.points_ids.forEach((function(e){t.remove_entity(e)}))}}])}(ai);function ta(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ea(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ta(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ta(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ia(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var na=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=ia(this,e,[t,n])).color=n.color||"rgba(255,0,0,0.5)",i.polygonHasCreated=!1,i}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i,n,o,s,a,r=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var l;this.polygonHasCreated=!1,(i=e,n="start",o=this,s=3,a=Ks()(Ji()(1&s?i.prototype:i),n,o),2&s&&"function"==typeof a?function(t){return a.apply(o,t)}:a)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键结束;CTRL+右键撤销",this.sdk),this.event=new X(this.sdk),this.positions=[],this.points_ids=[];var c=[],u=[];this.event.mouse_left((function(t,i){if("2D"!==l){if(l="3D",r.positions=c.concat(ea({},i)),r.tip.setPosition(i,t.position.x,t.position.y),!r.polygonHasCreated){var n=e.create_polygon(r);r.points_ids.push(n)}c.push(i),u.push(r.cartesian3Towgs84(i,r.viewer)),r.points_ids.push(r.create_point(i))}})),this.event.mouse_right((function(e,i){"2D"!==l&&(t(null,u),r.end())})),this.event.mouse_move((function(t,e){"2D"!==l&&(r.positions=c.concat(ea({},e)),r.tip.setPosition(e,t.endPosition.x,t.endPosition.y))})),this.event.mouse_right_keyboard_ctrl((function(t,e){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),u.pop())})),this.event.gesture_pinck_start_keyboard_ctrl((function(){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),u.pop(),r.positions=c.concat(cartesian))})),this.event.gesture_pinck_start((function(i,n){if("2D"!==l){var o=new Date;r.event.gesture_pinck_end((function(){if(new Date-o>=500)t(null,u),r.end();else{if(r.tip.setPosition(n,(i.position1.x+i.position2.x)/2,(i.position1.y+i.position2.y)/2),!r.polygonHasCreated){var s=e.create_polygon(r);r.points_ids.push(s)}c.push(n),u.push(r.cartesian3Towgs84(n,r.viewer)),r.points_ids.push(r.create_point(n)),r.positions=c.concat(n)}}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(t,i){if("3D"!==l){if(l="2D",r.positions=c.concat(ea({},i)),r.tip.setPosition(i,t.position.x+r.viewer.canvas.width,t.position.y),!r.polygonHasCreated){var n=e.create_polygon(r,r._sdk2D.viewer);r.points_ids.push(n)}c.push(i),u.push(r.cartesian3Towgs84(i,r.viewer)),r.points_ids.push(r.create_point(i,r._sdk2D.viewer))}})),this.event2D.mouse_right((function(e,i){"3D"!==l&&(t(null,u),r.end())})),this.event2D.mouse_move((function(t,e){"3D"!==l&&(r.positions=c.concat(ea({},e)),r.tip.setPosition(e,t.endPosition.x+r.viewer.canvas.width,t.endPosition.y))})),this.event2D.mouse_right_keyboard_ctrl((function(t,e){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),u.pop())})),this.event2D.gesture_pinck_start_keyboard_ctrl((function(){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),u.pop(),r.positions=c.concat(cartesian))})),this.event2D.gesture_pinck_start((function(i,n){if("3D"!==l){var o=new Date;r.event2D.gesture_pinck_end((function(){if(new Date-o>=500)t(null,u),r.end();else{if(r.tip.setPosition(n,(i.position1.x+i.position2.x)/2+r.viewer.canvas.width,(i.position1.y+i.position2.y)/2),!r.polygonHasCreated){var s=e.create_polygon(r,r._sdk2D.viewer);r.points_ids.push(s)}c.push(n),u.push(r.cartesian3Towgs84(n,r.viewer)),r.points_ids.push(r.create_point(n,r._sdk2D.viewer)),r.positions=c.concat(n)}}))}})))}}}],[{key:"create_polygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.viewer;t.polygonHasCreated=!0;var i=t.randomString();return e.entities.add(new Cesium.Entity({id:i,polygon:{classificationType:Cesium.ClassificationType.BOTH,hierarchy:new Cesium.CallbackProperty((function(e){return new Cesium.PolygonHierarchy(t.positions)})),material:Cesium.Color.fromCssColorString(t.color),zIndex:99999999},polyline:{positions:new Cesium.CallbackProperty((function(e){return t.positions.concat(t.positions[0])})),width:3,material:Cesium.Color.fromCssColorString(t.color).withAlpha(1),clampToGround:!0,zIndex:99999999}})),i}}])}(Qs),oa=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};k()(this,t),this.sdk=e,this.viewer=e.viewer,this.height=i.height||70,this.maxHeigh=-1e6,this.precision=i.precision||125,this.Dialog=n,this.result={allArea:"",cutArea:"",cutVolume:"",fillArea:"",fillVolume:"",noArea:""},this.entities=[],this.Draw=new na(this.sdk),YJ.Analysis.AnalysesResults.push(this),t.EditBox(this)}),[{key:"create",value:function(){var t=this;this.clean(),this.Draw.start((function(e,i){if(!i||i.length<3){return console.warn("最少需要三个坐标!"),void(window.ELEMENT&&window.ELEMENT.Message({message:"最少需要三个坐标!",type:"warning",duration:1500}))}for(var n=[],o=0;o<i.length;o++)n.push(i[o].lng,i[o].lat,i[o].alt);t.positions=Cesium.Cartesian3.fromDegreesArrayHeights(n),t.createPolygonGeo(t.positions),t.result=t.VolumeAnalysis(),t.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1}))}},{key:"createPolygonGeo",value:function(t){var e=Math.PI/Math.pow(2,11);e/=this.precision;var i=new Cesium.PolygonGeometry.fromPositions({positions:t,vertexFormat:Cesium.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:e});this.geom=new Cesium.PolygonGeometry.createGeometry(i)}},{key:"VolumeAnalysis",value:function(){var t=0,e=0,i=0,n=0,o=0,s=this.geom.indices;if(this.geom&&this.geom.attributes&&this.geom.attributes.position){for(var a=this.geom.attributes.position.values,r=0;r<s.length;r+=3){var l=this.returnPosition(a,s[r]),c=this.returnPosition(a,s[r+1]),u=this.returnPosition(a,s[r+2]),p=this.viewer.entities.add({name:"三角面",polygon:{hierarchy:[l.heightPos,c.heightPos,u.heightPos],perPositionHeight:!0,material:Cesium.Color.fromRandom(),extrudedHeight:this.height,outline:!0,outlineColor:Cesium.Color.BLACK}});this.entities.push(p);var h=this.computeArea4Triangle(l.noHeightPos,c.noHeightPos,u.noHeightPos),d=(l.height+c.height+u.height)/3;if(d<this.height)i+=h,n+=h*(this.height-d);else if(d==this.height)o+=h;else{t+=h,e+=h*(d-this.height)}}var m=t+i+o;return this.result.allArea=m,this.result.cutArea=t,this.result.cutVolume=e,this.result.fillArea=i,this.result.fillVolume=n,this.result.noArea=o,this.result}}},{key:"computeCentroid4Polygon",value:function(t){for(var e=[],i=[],n=0,o=0,s=0;s<t.length;s++){var a=Cesium.Cartographic.fromCartesian(t[s]);n+=a.longitude,o+=a.latitude,e.push(a.longitude),i.push(a.latitude)}var r=n/t.length,l=o/t.length,c=new Cesium.Cartographic(r,l);return Cesium.Cartesian3.fromRadians(c.longitude,c.latitude,this.maxHeigh+30)}},{key:"computeArea4Triangle",value:function(t,e,i){var n=Cesium.Cartesian3.distance(t,e),o=Cesium.Cartesian3.distance(e,i),s=Cesium.Cartesian3.distance(i,t),a=(n+o+s)/2;return Math.sqrt(a*(a-n)*(a-o)*(a-s))}},{key:"returnPosition",value:function(t,e){var i=new Cesium.Cartesian3(t[3*e],t[3*e+1],t[3*e+2]),n=Cesium.Cartographic.fromCartesian(i),o=this.viewer.scene.sampleHeightSupported?this.viewer.scene.sampleHeight(n):this.viewer.scene.globe.getHeight(n);return o>this.maxHeigh&&(this.maxHeigh=o),{heightPos:Cesium.Cartesian3.fromRadians(n.longitude,n.latitude,o),noHeightPos:Cesium.Cartesian3.fromRadians(n.longitude,n.latitude,0),height:o}}},{key:"clean",value:function(){this.Draw&&this.Draw.end();for(var t=0;t<this.entities.length;t++)this.viewer.entities.remove(this.entities[t])}},{key:"destroy",value:function(){this.clean(),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null)}}],[{key:"EditBox",value:(t=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e._DialogObject&&e._DialogObject.close&&(e._DialogObject.close(),e._DialogObject=null),t.next=3,new W(e.sdk.viewer._container,{title:"土方分析",left:"180px",top:"100px",closeCallBack:function(){e.clean(),e.Dialog.closeCallBack&&e.Dialog.closeCallBack()}});case 3:return e._DialogObject=t.sent,t.next=6,e._DialogObject.init();case 6:(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 70px;">绘制分析区域</span>\n <button class="draw-btn"><svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>开始绘制</button>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">基准高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-999999" max="999999" name="height">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">精度</span>\n <div class="input-number input-number-unit">\n <input class="input" type="number" title="" min="1" max="1250" name="precision">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 74px;">总分析面积:</span>\n <span class="text-number" name="allArea">0</span>\n <span class="unit text-number">m²</span>\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 90px;">无须填挖面积:</span>\n <span class="text-number" name="noArea">0</span>\n <span class="unit text-number">m²</span>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 74px;">填方面积:</span>\n <span class="text-number" name="fillArea">0</span>\n <span class="unit text-number">m²</span>\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 90px;">挖方面积:</span>\n <span class="text-number" name="cutArea">0</span>\n <span class="unit text-number">m²</span>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 74px;">填方体积:</span>\n <span class="text-number" name="fillVolume">0</span>\n <span class="unit text-number">m³</span>\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 90px;">挖方体积:</span>\n <span class="text-number" name="cutVolume">0</span>\n <span class="unit text-number">m³</span>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',e._DialogObject.contentAppChild(i),e._DialogObject._element.body.className=e._DialogObject._element.body.className+" cut-fill",(n=i.querySelector("input[name='height']")).value=e.height,n.addEventListener("blur",(function(t){var i=t.target.value;"."==t.data||"-"==t.data&&!t.target.value||(i=Number(i),t.target.max&&i>Number(t.target.max)&&(i=Number(t.target.max)),t.target.min&&i<Number(t.target.min)&&(i=Number(t.target.min)),n.value=i,e.height=n.value)})),(o=i.querySelector("input[name='precision']")).value=e.precision,o.addEventListener("blur",(function(t){var i=Number(t.target.value);t.target.max&&i>Number(t.target.max)&&(i=Number(t.target.max)),t.target.min&&i<Number(t.target.min)&&(i=Number(t.target.min)),o.value=i,e.precision=o.value})),(s=i.querySelector("span[name='allArea']")).innerHTML=e.result.allArea||0,Object.defineProperty(e.result,"allArea",{get:function(){return s.innerHTML},set:function(t){s.innerHTML=Number(t.toFixed(4))}}),(r=i.querySelector("span[name='fillArea']")).innerHTML=e.result.fillArea||0,Object.defineProperty(e.result,"fillArea",{get:function(){return r.innerHTML},set:function(t){r.innerHTML=Number(t.toFixed(4))}}),(l=i.querySelector("span[name='fillVolume']")).innerHTML=e.result.fillVolume||0,Object.defineProperty(e.result,"fillVolume",{get:function(){return l.innerHTML},set:function(t){l.innerHTML=Number(t.toFixed(4))}}),(c=i.querySelector("span[name='cutArea']")).innerHTML=e.result.cutArea||0,Object.defineProperty(e.result,"cutArea",{get:function(){return c.innerHTML},set:function(t){c.innerHTML=Number(t.toFixed(4))}}),(u=i.querySelector("span[name='cutVolume']")).innerHTML=e.result.cutVolume||0,Object.defineProperty(e.result,"cutVolume",{get:function(){return u.innerHTML},set:function(t){u.innerHTML=Number(t.toFixed(4))}}),(p=i.querySelector("span[name='noArea']")).innerHTML=e.result.noArea||0,Object.defineProperty(e.result,"noArea",{get:function(){return p.innerHTML},set:function(t){p.innerHTML=Number(t.toFixed(4))}}),i.getElementsByClassName("draw-btn")[0].addEventListener("click",(function(){e.create()}));case 36:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]);var t}();function sa(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return aa(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?aa(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function ra(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var la=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=ra(this,e,[t,n])).sdk=t,i.options={},i.options.name=n.name,i.options.risingSpeed=1,i.options.minWaterLevel=0,i.options.maxWaterLevel=0,i.options.waterVolume=0,i.currentWaterLaver,i.color="#00d9ff66",i.Dialog=o,i.Draw=new na(i.sdk),i.positions,i.status=!0,i.area=0,i._elms={},YJ.Analysis.AnalysesResults.push(i),e.EditBox(i),i}return Xi()(e,t),_()(e,[{key:"move",value:function(){var t=this;this.TweenAnimate&&TWEEN.remove(this.TweenAnimate);var e=(this.options.maxWaterLevel-this.options.minWaterLevel)/this.options.risingSpeed*1e3;this.TweenAnimate=new TWEEN.Tween({waterLevel:this.options.minWaterLevel}).to({waterLevel:this.options.maxWaterLevel},e).delay(this.delay).easing(TWEEN.Easing.Linear.None).onUpdate(function(){var e=o()(a.a.mark((function e(i,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.currentWaterLaver=i.waterLevel;case 1:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()).start();var i=this._DialogObject._element.body,n=i.getElementsByClassName("pause")[0];i.getElementsByClassName("start")[0].style.display="none",n.style.display="flex"}},{key:"restart",value:function(){var t=this;this.currentWaterLaver=this.options.minWaterLevel;var e=!1;this.TweenAnimate&&(e=this.TweenAnimate._isPaused,TWEEN.remove(this.TweenAnimate));var i=(this.options.maxWaterLevel-this.options.minWaterLevel)/this.options.risingSpeed*1e3;this.TweenAnimate=new TWEEN.Tween({waterLevel:this.options.minWaterLevel}).to({waterLevel:this.options.maxWaterLevel},i).delay(this.delay).easing(TWEEN.Easing.Linear.None).onUpdate(function(){var e=o()(a.a.mark((function e(i,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.currentWaterLaver=i.waterLevel;case 1:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()).start(),e&&this.pause()}},{key:"start",value:function(){this.TweenAnimate&&this.TweenAnimate.resume()}},{key:"pause",value:function(){this.TweenAnimate&&this.TweenAnimate.pause()}},{key:"calculateVolumeHeight",value:function(){that.options.maxWaterLevel}},{key:"flyTo",value:function(){if(this.positions&&0!==this.positions.length){Je(this.sdk),qe(this.sdk);for(var t=[],e=0;e<this.positions.length;e++){var i=Cesium.Cartesian3.fromDegrees(this.positions[e].lng,this.positions[e].lat,this.options.maxWaterLevel);t.push(i.x,i.y,i.z)}var n=Cesium.BoundingSphere.fromVertices(t);this.sdk.viewer.camera.flyToBoundingSphere(n,{offset:{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}})}}},{key:"destroy",value:function(){this.TweenAnimate&&TWEEN.remove(this.TweenAnimate),this.Draw.end(),this.sdk.viewer.entities.remove(this.entity),this.entity=null}}],[{key:"create",value:function(t){t.Draw.start((function(e,i){if(!i||i.length<3){return console.warn("至少需要三个坐标!"),void(window.ELEMENT&&window.ELEMENT.Message({message:"至少需要三个坐标!",type:"warning",duration:1500}))}if(t.destroy(),!i||0==i.length)return t.positions=[],t._positions=[],t.options.minWaterLevel=0,t.options.maxWaterLevel=0,t.options.waterVolume=0,void(t.area=0);var n=[];t.positions=i,t._positions=i,t.options.minWaterLevel=i[0].alt;for(var o=0;o<i.length;o++)t.options.minWaterLevel>i[o].alt&&(t.options.minWaterLevel=i[o].alt),n.push(i[o].lng,i[o].lat);var s=Cesium.Cartesian3.fromDegreesArray(n);t.currentWaterLaver=t.options.minWaterLevel,t.entity=t.sdk.viewer.entities.add({polygon:{hierarchy:new Cesium.PolygonHierarchy(s),height:new Cesium.CallbackProperty((function(){return t.options.minWaterLevel}),!1),extrudedHeight:new Cesium.CallbackProperty((function(){return t.currentWaterLaver}),!1),material:Cesium.Color.fromCssColorString(t.color)}}),t.area=t.computeArea(i),t.TweenAnimate&&(TWEEN.remove(t.TweenAnimate),t.TweenAnimate=null);var a=t._DialogObject._element.body,r=a.getElementsByClassName("pause")[0];a.getElementsByClassName("start")[0].style.display="flex",r.style.display="none"}))}},{key:"EditBox",value:(i=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i._DialogObject&&i._DialogObject.close&&(i._DialogObject.close(),i._DialogObject=null),t.next=3,new W(i.sdk.viewer._container,{title:"淹没分析",left:"180px",top:"100px",closeCallBack:function(){i.destroy(),i.Dialog.closeCallBack&&i.Dialog.closeCallBack()}});case 3:return i._DialogObject=t.sent,t.next=6,i._DialogObject.init();case 6:i._DialogObject._element.body.className=i._DialogObject._element.body.className+" submerge",(n=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">水量</span>\n <div class="input-number input-number-unit-3">\n <input class="input" type="number" title="" name="waterVolume">\n <span class="unit">m³</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最小水位</span>\n <div class="input-number input-number-unit-3">\n <input class="input" type="number" title="" name="minWaterLevel">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">水面面积</span>\n <div class="input-number input-number-unit-3">\n <input class="input area" type="number" readonly="readonly" type="text">\n <span class="unit">㎡</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最大水位</span>\n <div class="input-number input-number-unit-3">\n <input class="input" type="number" title="" name="maxWaterLevel">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row subtitle-box">\n <span class="subtitle">上升速度</span>\n </div>\n <div class="row">\n <div class="col">\n <input type="range" max="50" min="0" step="0.01" name="risingSpeed">\n <div class="input-number input-number-unit-3" style="flex: 0 0 110px;margin-left: 10px;">\n <input class="input" type="number" title="" name="risingSpeed">\n <span class="unit">m/s</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col operate-btn-box">\n <button class="draw"><svg class="icon-draw"><use xlink:href="#yj-icon-draw"></use></svg>绘制范围</button>\n <button class="flyto"><svg class="icon-positions"><use xlink:href="#yj-icon-positions"></use></svg>定位</button>\n <button class="reset"><svg class="icon-reset"><use xlink:href="#yj-icon-reset"></use></svg>重置</button>\n <button class="analog"><svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>开始模拟</button>\n <button class="pause" style="margin-right: 0px;"><svg class="icon-pause"><use xlink:href="#yj-icon-pause"></use></svg>暂停</button>\n <button class="start" style="display: none;margin-right: 0px;"><svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>播放</button>\n </div>\n </div>\n </div>\n \n <div class="table">\n <div class="table-head">\n <div class="tr">\n <div class="th">序号</div>\n <div class="th">经度</div>\n <div class="th">纬度</div>\n <div class="th">高程</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n <span class="custom-divider" style="margin-top: 20px;"></span>\n ',i._DialogObject.contentAppChild(n),(o=document.createElement("button")).className="el-button",o.innerHTML="暂停",o.style.width="80px",n.getElementsByClassName("draw")[0].addEventListener("click",(function(){e.create(i)})),n.getElementsByClassName("analog")[0].addEventListener("click",(function(){i.move()})),n.getElementsByClassName("flyto")[0].addEventListener("click",(function(){i.flyTo()})),n.getElementsByClassName("reset")[0].addEventListener("click",(function(){i.restart()})),s=n.getElementsByClassName("pause")[0],r=n.getElementsByClassName("start")[0],s.addEventListener("click",(function(){i.pause(),s.style.display="none",r.style.display="flex"})),r.addEventListener("click",(function(){i.start(),r.style.display="none",s.style.display="flex"})),(l=n.querySelectorAll("input[name='risingSpeed']"))[0].value=i.options.risingSpeed,l[1].value=i.options.risingSpeed,l[0].addEventListener("input",(function(t){i.options.risingSpeed=Number(t.target.value)})),l[1].addEventListener("input",(function(t){if("."!=t.data){var e=Number(t.target.value),n=Number(l[0].max),o=Number(l[0].min);i.options.risingSpeed=e>n?n:e<o?o:Math.floor(100*e)/100}})),Object.defineProperty(i.options,"risingSpeed",{get:function(){return l[0].value},set:function(t){l[0].value=t,l[1].value=t}}),i.waterLevel=i.options.maxWaterLevel-i.options.minWaterLevel,(c=n.querySelector("input[name='minWaterLevel']")).value=i.options.minWaterLevel,c.addEventListener("input",(function(t){if("."!=t.data){var e=Number(t.target.value);e>999999999&&(e=999999999),e<0&&(e=0),i.options.minWaterLevel=Math.floor(1e4*e)/1e4,i.options.maxWaterLevel=i.options.minWaterLevel+i.waterLevel}})),Object.defineProperty(i.options,"minWaterLevel",{get:function(){return Number(c.value)},set:function(t){c.value=Math.floor(1e4*Number(t))/1e4}}),(u=n.querySelector("input[name='maxWaterLevel']")).value=i.options.maxWaterLevel,u.addEventListener("input",(function(t){if("."!=t.data){var e=Number(t.target.value);e>999999999&&(e=999999999),e<0&&(e=0),e<i.options.minWaterLevel?i.options.maxWaterLevel=i.options.minWaterLevel:i.options.maxWaterLevel=Math.floor(1e4*e)/1e4,i.waterLevel=i.options.maxWaterLevel-i.options.minWaterLevel,i.options.waterVolume=Number((i.waterLevel*i.area).toFixed(4))}})),Object.defineProperty(i.options,"maxWaterLevel",{get:function(){return Number(u.value)},set:function(t){isNaN(t)&&(t=0),u.value=Math.floor(1e4*Number(t))/1e4}}),(p=n.querySelector("input[name='waterVolume']")).value=i.options.waterVolume,p.addEventListener("input",(function(t){if("."!=t.data){var e=Number(t.target.value);e>99999999999999&&(e=99999999999999),e<0&&(e=0),i.options.waterVolume=Math.floor(1e4*e)/1e4,i.area&&(i.waterLevel=Number((i.options.waterVolume/i.area).toFixed(4)),i.options.maxWaterLevel=i.options.minWaterLevel+i.waterLevel)}})),Object.defineProperty(i.options,"waterVolume",{get:function(){return Number(p.value)},set:function(t){p.value=t}}),(h=n.getElementsByClassName("area")[0]).value=i.area,Object.defineProperty(i,"area",{get:function(){return Number(h.value)},set:function(t){h.value=t,i.waterLevel=Number((i.options.waterVolume/i.area).toFixed(4)),i.options.maxWaterLevel=i.options.minWaterLevel+i.waterLevel}}),d=n.getElementsByClassName("table-body")[0],m=n.getElementsByClassName("table-empty")[0],Object.defineProperty(i,"positions",{get:function(){return i._positions},set:function(t){if(t&&t.length>0){m.style.display="none";for(var e="",i=0;i<t.length;i++)e+='<div class="tr">\n <div class="td">'.concat(i+1,'</div>\n <div class="td">').concat(Number(t[i].lng.toFixed(10)),'</div>\n <div class="td">').concat(Number(t[i].lat.toFixed(10)),'</div>\n <div class="td">').concat(Number(t[i].alt.toFixed(4)),"</div>\n </div>");d.innerHTML=e}else d.innerHTML="",m.style.display="flex"}});case 51:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=sa(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type&&(i=Number(i)),t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}}]);var i}(ai);function ca(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ua(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ca(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ca(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function pa(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var ha=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=pa(this,e,[t,n])).viewer=t.viewer,i.options={},i.options.viewPosition=n.viewPosition,i.options.viewPositionEnd=n.viewPositionEnd,i.options.horizontalViewAngle=n.horizontalViewAngle||0===n.horizontalViewAngle?n.horizontalViewAngle:90,i.options.verticalViewAngle=n.verticalViewAngle||0===n.verticalViewAngle?n.verticalViewAngle:60,i.options.visibleAreaColor=n.visibleAreaColor||"#008000",i.options.invisibleAreaColor=n.invisibleAreaColor||"#FF0000",i._elms={},i.viewPointHeight=n.viewPointHeight,i.ids=[],i.Dialog=o,i._EventBinding=new hn,i.html=null,YJ.Analysis.AnalysesResults.push(i),e.edit(i),i}return Xi()(e,t),_()(e,[{key:"viewPointHeight",get:function(){return this.options.viewPointHeight},set:function(t){var e=Math.floor(10*Number(t))/10;isNaN(e)&&(e=1.8),e<0&&(e=0),this.options.viewPointHeight=e,this._elms.viewPointHeight&&this._elms.viewPointHeight.forEach((function(t){t.value=e}))}},{key:"viewPosition",get:function(){return this.options.viewPosition},set:function(t){this.options.viewPosition=t,this.ids[0]&&(this.viewer.entities.getById(this.ids[0]).position=new Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt)),this.update()}},{key:"viewPositionEnd",get:function(){return this.options.viewPositionEnd},set:function(t){this.options.viewPositionEnd=t,this.ids[1]&&(this.viewer.entities.getById(this.ids[1]).position=new Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt)),this.update()}},{key:"horizontalViewAngle",get:function(){return this.options.horizontalViewAngle},set:function(t){if(this.options.horizontalViewAngle=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content){var e=this._DialogObject._element.content;e.querySelector("input[name='horizontalViewAngle']").value=t,e.getElementsByClassName("range-node-active")[0].getElementsByClassName("range-node-active-text")[0].innerHTML=t+"°",e.getElementsByClassName("range-process")[0].style.width=t/180*100+"%"}this.update()}},{key:"visibleAreaColor",get:function(){return this.options.visibleAreaColor},set:function(t){this.options.visibleAreaColor=t,this.update()}},{key:"invisibleAreaColor",get:function(){return this.options.invisibleAreaColor},set:function(t){this.options.invisibleAreaColor=t,this.update()}},{key:"verticalViewAngle",get:function(){return this.options.verticalViewAngle},set:function(t){this.options.verticalViewAngle=t,this.update()}},{key:"viewDistance",get:function(){var t=Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),e=Cesium.Cartesian3.fromDegrees(this.options.viewPositionEnd.lng,this.options.viewPositionEnd.lat,this.options.viewPositionEnd.alt);return Cesium.Cartesian3.distance(t,e)}},{key:"viewHeading",get:function(){var t,e,i,n,o=Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),s=Cesium.Cartesian3.fromDegrees(this.options.viewPositionEnd.lng,this.options.viewPositionEnd.lat,this.options.viewPositionEnd.alt);return t=o,e=s,i=new Cesium.Cartesian3,n=Cesium.Transforms.eastNorthUpToFixedFrame(t),Cesium.Matrix4.inverse(n,n),Cesium.Matrix4.multiplyByPoint(n,e,i),Cesium.Cartesian3.normalize(i,i),Cesium.Math.toDegrees(Math.atan2(i.x,i.y))}},{key:"viewPitch",get:function(){var t,e,i,n,o=Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),s=Cesium.Cartesian3.fromDegrees(this.options.viewPositionEnd.lng,this.options.viewPositionEnd.lat,this.options.viewPositionEnd.alt);return t=o,e=s,i=new Cesium.Cartesian3,n=Cesium.Transforms.eastNorthUpToFixedFrame(t),Cesium.Matrix4.inverse(n,n),Cesium.Matrix4.multiplyByPoint(n,e,i),Cesium.Cartesian3.normalize(i,i),Cesium.Math.toDegrees(Math.asin(i.z))}},{key:"add",value:function(){this.createLightCamera(),this.createShadowMap(),this.createPostStage(),this.drawSketch(),e.getcanvas(this)}},{key:"update",value:function(){this.clear(),this.add()}},{key:"clear",value:function(){YJ.Measure.SetMeasureStatus(!1),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),this.tip=null,this.event=null,this.sketch&&(this.viewer.entities.removeById(this.sketch.id),this.sketch=null),this.frustumOutline&&(this.viewer.entities.removeById(this.frustumOutline.id),this.frustumOutline=null),this.postStage&&(this.viewer.scene.postProcessStages.remove(this.postStage),this.postStage=null)}},{key:"destroy",value:function(){var t=this;this.clear(),this.editevent&&this.editevent.destroy(),this.ControllerObject&&this.ControllerObject.destroy(),this.ids.forEach((function(e){t.viewer.entities.removeById(e)})),this.ids=[],this.viewBillboardPrimitive&&this.viewer.scene.primitives.remove(this.viewBillboardPrimitive),this.viewBillboardPrimitive=null,this.options.viewPosition=null,this.options.viewPositionEnd=null,YJ.Measure.SetMeasureStatus(!1),this._originalShadowMap&&(this.viewer.scene.shadowMap=this._originalShadowMap,this._originalShadowMap=null),this.viewer.shadows=this.viewer._shadows}},{key:"nodeEdit",value:function(){var t,e=this;YJ.Measure.GetMeasureStatus()?console.log("上一次测量未结束"):(this.editevent&&this.editevent.destroy(),this.ids.forEach((function(t){e.viewer.entities.getById(t).show=!0})),YJ.Measure.SetMeasureStatus(!0),this.editevent=new X(this.sdk),this.editevent.mouse_left((function(i,n){var o=e.viewer.scene.pick(i.position);o&&o.id&&o.id.id&&-1!=e.ids.indexOf(o.id.id)&&(!t||t.id!=o.id.id)&&(t=o.id,e.viewer.entities.getById(e.ids[0]).position=new Cesium.Cartesian3.fromDegrees(e.viewPosition.lng,e.viewPosition.lat,e.viewPosition.alt),e.viewer.entities.getById(e.ids[1]).position=new Cesium.Cartesian3.fromDegrees(e.viewPositionEnd.lng,e.viewPositionEnd.lat,e.viewPositionEnd.alt),e.ControllerObject&&e.ControllerObject.destroy(),e.ControllerObject=new Oo(e.sdk,{position:ua({},e.cartesian3Towgs84(t.position._value,e.sdk.viewer))}),e.ControllerObject.controllerCallBack=function(i,n){i.position.alt<0&&(i.position.alt=0),t.position=new Cesium.Cartesian3.fromDegrees(i.position.lng,i.position.lat,i.position.alt),n&&(0==e.ids.indexOf(o.id.id)?e.viewPosition=i.position:e.viewPositionEnd=i.position,YJ.Measure.SetMeasureStatus(!0))},e.ControllerObject.editTranslational())})),this.editevent.mouse_right((function(i,n){YJ.Measure.SetMeasureStatus(!1),e.editevent&&e.editevent.destroy(),e.ControllerObject&&e.ControllerObject.destroy(),e.ids.forEach((function(t){e.viewer.entities.getById(t).show=!1})),t=null})),this.editevent.mouse_move((function(t,e){})),this.editevent.gesture_pinck_start((function(i,n){var o=new Date;e.editevent.gesture_pinck_end((function(){new Date-o>=500&&(YJ.Measure.SetMeasureStatus(!1),e.editevent&&e.editevent.destroy(),e.ControllerObject&&e.ControllerObject.destroy(),e.ids.forEach((function(t){e.viewer.entities.getById(t).show=!1})),t=null)}))})))}},{key:"createLightCamera",value:function(){if(this.options.viewPosition){this.lightCamera=new Cesium.Camera(this.viewer.scene),this.lightCamera.position=Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),this.lightCamera.frustum.near=.001*this.viewDistance,this.lightCamera.frustum.far=this.viewDistance;var t=Cesium.Math.toRadians(this.horizontalViewAngle),e=Cesium.Math.toRadians(this.verticalViewAngle),i=this.viewDistance*Math.tan(t/2)*2/(this.viewDistance*Math.tan(e/2)*2);this.lightCamera.frustum.aspectRatio=i,this.lightCamera.frustum.fov=t>e?t:e,this.lightCamera.setView({destination:Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),orientation:{heading:Cesium.Math.toRadians(this.viewHeading||0),pitch:Cesium.Math.toRadians(this.viewPitch||0),roll:0}})}}},{key:"createShadowMap",value:function(){this.shadowMap=new Cesium.ShadowMap({context:this.viewer.scene.context,lightCamera:this.lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this.viewDistance,cascadesEnabled:!1,size:2048,softShadows:!0,normalOffset:!1,fromLightSource:!1}),this._originalShadowMap||(this._originalShadowMap=this.viewer.scene.shadowMap),this.viewer.scene.shadowMap=this.shadowMap}},{key:"createPostStage",value:function(){var t=this;Number(Cesium.VERSION.split(".")[1])>=102&&ln()("fs");var e=new Cesium.PostProcessStage({fragmentShader:"\n #define USE_CUBE_MAP_SHADOW true\n uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n varying vec2 v_textureCoordinates;\n uniform mat4 camera_projection_matrix;\n uniform mat4 camera_view_matrix;\n uniform samplerCube shadowMap_textureCube;\n uniform mat4 shadowMap_matrix;\n uniform vec4 shadowMap_lightPositionEC;\n uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\n uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\n uniform float helsing_viewDistance;\n uniform vec4 helsing_visibleAreaColor;\n uniform vec4 helsing_invisibleAreaColor;\n\n struct zx_shadowParameters\n {\n vec3 texCoords;\n float depthBias;\n float depth;\n float nDotL;\n vec2 texelStepSize;\n float normalShadingSmooth;\n float darkness;\n };\n\n float czm_shadowVisibility(samplerCube shadowMap, zx_shadowParameters shadowParameters)\n {\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n }\n\n vec4 getPositionEC(){\n return czm_windowToEyeCoordinates(gl_FragCoord);\n }\n\n vec3 getNormalEC(){\n return vec3(1.);\n }\n\n vec4 toEye(in vec2 uv,in float depth){\n vec2 xy=vec2((uv.x*2.-1.),(uv.y*2.-1.));\n vec4 posInCamera=czm_inverseProjection*vec4(xy,depth,1.);\n posInCamera=posInCamera/posInCamera.w;\n return posInCamera;\n }\n\n vec3 pointProjectOnPlane(in vec3 planeNormal,in vec3 planeOrigin,in vec3 point){\n vec3 v01=point-planeOrigin;\n float d=dot(planeNormal,v01);\n return(point-planeNormal*d);\n }\n\n float getDepth(in vec4 depth){\n float z_window=czm_unpackDepth(depth);\n z_window=czm_reverseLogDepth(z_window);\n float n_range=czm_depthRange.near;\n float f_range=czm_depthRange.far;\n return(2.*z_window-n_range-f_range)/(f_range-n_range);\n }\n\n float shadow(in vec4 positionEC){\n vec3 normalEC=getNormalEC();\n zx_shadowParameters shadowParameters;\n shadowParameters.texelStepSize=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\n shadowParameters.depthBias=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\n shadowParameters.normalShadingSmooth=shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\n shadowParameters.darkness=shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\n vec3 directionEC=positionEC.xyz-shadowMap_lightPositionEC.xyz;\n float distance=length(directionEC);\n directionEC=normalize(directionEC);\n float radius=shadowMap_lightPositionEC.w;\n if(distance>radius)\n {\n return 2.0;\n }\n vec3 directionWC=czm_inverseViewRotation*directionEC;\n shadowParameters.depth=distance/radius-0.0003;\n shadowParameters.nDotL=clamp(dot(normalEC,-directionEC),0.,1.);\n shadowParameters.texCoords=directionWC;\n float visibility=czm_shadowVisibility(shadowMap_textureCube,shadowParameters);\n return visibility;\n }\n\n bool visible(in vec4 result)\n {\n result.x/=result.w;\n result.y/=result.w;\n result.z/=result.w;\n return result.x>=-1.&&result.x<=1.\n &&result.y>=-1.&&result.y<=1.\n &&result.z>=-1.&&result.z<=1.;\n }\n\n void main(){\n // 釉色 = 结构二维(颜色纹理, 纹理坐标)\n gl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n // 深度 = 获取深度(结构二维(深度纹理, 纹理坐标))\n float depth = getDepth(texture2D(depthTexture, v_textureCoordinates));\n // 视角 = (纹理坐标, 深度)\n vec4 viewPos = toEye(v_textureCoordinates, depth);\n // 世界坐标\n vec4 wordPos = czm_inverseView * viewPos;\n // 虚拟相机中坐标\n vec4 vcPos = camera_view_matrix * wordPos;\n float near = .001 * helsing_viewDistance;\n float dis = length(vcPos.xyz);\n if(dis > near && dis < helsing_viewDistance){\n // 透视投影\n vec4 posInEye = camera_projection_matrix * vcPos;\n // 可视区颜色\n // vec4 helsing_visibleAreaColor=vec4(0.,1.,0.,.5);\n // vec4 helsing_invisibleAreaColor=vec4(1.,0.,0.,.5);\n if(visible(posInEye)){\n float vis = shadow(viewPos);\n if(vis > 0.3){\n gl_FragColor = mix(gl_FragColor,helsing_visibleAreaColor,.5);\n } else{\n gl_FragColor = mix(gl_FragColor,helsing_invisibleAreaColor,.5);\n }\n }\n }\n }",uniforms:{shadowMap_textureCube:function(){return t.shadowMap.update(Reflect.get(t.viewer.scene,"_frameState")),Reflect.get(t.shadowMap,"_shadowMapTexture")},shadowMap_matrix:function(){return t.shadowMap.update(Reflect.get(t.viewer.scene,"_frameState")),Reflect.get(t.shadowMap,"_shadowMapMatrix")},shadowMap_lightPositionEC:function(){return t.shadowMap.update(Reflect.get(t.viewer.scene,"_frameState")),Reflect.get(t.shadowMap,"_lightPositionEC")},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){t.shadowMap.update(Reflect.get(t.viewer.scene,"_frameState"));var e=t.shadowMap._pointBias;return Cesium.Cartesian4.fromElements(e.normalOffsetScale,t.shadowMap._distance,t.shadowMap.maximumDistance,0,new Cesium.Cartesian4)},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){t.shadowMap.update(Reflect.get(t.viewer.scene,"_frameState"));var e=t.shadowMap._pointBias,i=new Cesium.Cartesian2;return i.x=1/t.shadowMap._textureSize.x,i.y=1/t.shadowMap._textureSize.y,Cesium.Cartesian4.fromElements(i.x,i.y,e.depthBias,e.normalShadingSmooth,new Cesium.Cartesian4)},camera_projection_matrix:this.lightCamera.frustum.projectionMatrix,camera_view_matrix:this.lightCamera.viewMatrix,helsing_viewDistance:function(){return t.viewDistance},helsing_visibleAreaColor:Cesium.Color.fromCssColorString(this.visibleAreaColor),helsing_invisibleAreaColor:Cesium.Color.fromCssColorString(this.invisibleAreaColor)}});this.postStage=this.viewer.scene.postProcessStages.add(e)}},{key:"drawFrustumOutline",value:function(){var t=new Cesium.Cartesian3,e=new Cesium.Matrix3,i=new Cesium.Quaternion,n=(this.lightCamera.positionWC,this.lightCamera.directionWC),o=this.lightCamera.upWC,s=this.lightCamera.rightWC;s=Cesium.Cartesian3.negate(s,t);var a=e;Cesium.Matrix3.setColumn(a,0,s,a),Cesium.Matrix3.setColumn(a,1,o,a),Cesium.Matrix3.setColumn(a,2,n,a);var r=Cesium.Quaternion.fromRotationMatrix(a,i),l=new Cesium.GeometryInstance({geometry:new Cesium.FrustumOutlineGeometry({frustum:this.lightCamera.frustum,origin:Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),orientation:r}),id:Math.random().toString(36).substr(2),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.YELLOWGREEN),show:new Cesium.ShowGeometryInstanceAttribute(!0)}});this.frustumOutline=this.viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances:[l],appearance:new Cesium.PerInstanceColorAppearance({flat:!0,translucent:!1})}))}},{key:"drawSketch",value:function(){this.sketch=this.viewer.entities.add({name:"sketch",position:Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),orientation:Cesium.Transforms.headingPitchRollQuaternion(Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),Cesium.HeadingPitchRoll.fromDegrees(this.viewHeading-90,this.viewPitch,0)),ellipsoid:{radii:new Cesium.Cartesian3(this.viewDistance,this.viewDistance,this.viewDistance),minimumClock:Cesium.Math.toRadians(-this.horizontalViewAngle/2),maximumClock:Cesium.Math.toRadians(this.horizontalViewAngle/2),minimumCone:Cesium.Math.toRadians(90-this.verticalViewAngle/2),maximumCone:Cesium.Math.toRadians(90+this.verticalViewAngle/2),fill:!1,outline:!0,subdivisions:256,stackPartitions:64,slicePartitions:64,outlineColor:Cesium.Color.YELLOWGREEN}}),this.frustumOutline=this.viewer.entities.add({name:"sketch",position:Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),orientation:Cesium.Transforms.headingPitchRollQuaternion(Cesium.Cartesian3.fromDegrees(this.options.viewPosition.lng,this.options.viewPosition.lat,this.options.viewPosition.alt+this.viewPointHeight),Cesium.HeadingPitchRoll.fromDegrees(this.viewHeading-90,this.viewPitch,0)),ellipsoid:{radii:new Cesium.Cartesian3(this.viewDistance,this.viewDistance,this.viewDistance),innerRadii:new Cesium.Cartesian3(1e-4,1e-4,1e-4),minimumClock:Cesium.Math.toRadians(-this.horizontalViewAngle/2),maximumClock:Cesium.Math.toRadians(this.horizontalViewAngle/2),minimumCone:Cesium.Math.toRadians(90-this.verticalViewAngle/2),maximumCone:Cesium.Math.toRadians(90+this.verticalViewAngle/2),fill:!1,outline:!0,subdivisions:256,stackPartitions:1,slicePartitions:1,outlineColor:Cesium.Color.YELLOWGREEN}})}}],[{key:"create",value:function(t){t.destroy();var i=0;function n(){t.ids.forEach((function(e){t.viewer.entities.getById(e).show=!1})),YJ.Measure.SetMeasureStatus(!1),t.tip.destroy(),t.event.destroy(),t.tip=null,t.event=null}YJ.Measure.GetMeasureStatus()?console.log("上一次测量未结束"):(t.event=new X(t.sdk),t.tip=new Z("左键选择观测点位置,右键取消",t.sdk),YJ.Measure.SetMeasureStatus(!0),t.event.mouse_left((function(o,s){t.viewPosition||(t.options.viewPosition=t.cartesian3Towgs84(s,t.viewer),t.ids.push(e.create_point(t,s)),t.tip.set_text("左键选择最远观测点位置,右键取消")),2===++i&&(t.options.viewPositionEnd=t.cartesian3Towgs84(s,t.viewer),t.ids.push(e.create_point(t,s)),n(),t.update())})),t.event.mouse_move((function(e,i){t.tip.setPosition(i,e.endPosition.x,e.endPosition.y)})),t.event.mouse_right((function(e,i){t.ids.forEach((function(e){t.viewer.entities.removeById(e)})),t.ids=[],n()})),t.event.gesture_pinck_start((function(e,i){var o=new Date;t.event.gesture_pinck_end((function(){new Date-o>=500&&(t.ids.forEach((function(e){t.viewer.entities.removeById(e)})),t.ids=[],n())}))})))}},{key:"create_point",value:function(t,e){var i=t.randomString(),n=t.cartesian3Towgs84(e,t.viewer),o={id:i,position:Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}};return t.viewer.entities.add(new Cesium.Entity(o)),i}},{key:"edit",value:(i=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i._DialogObject&&i._DialogObject.close&&(i._DialogObject.close(),i._DialogObject=null),t.next=3,new W(i.sdk.viewer._container,{title:"可视域分析",left:"180px",top:"100px",closeCallBack:function(){i.Dialog.closeCallBack&&i.Dialog.closeCallBack(),YJ.Measure.SetMeasureStatus(!1),i.editevent&&i.editevent.destroy(),i.ControllerObject&&i.ControllerObject.destroy(),i.ids.forEach((function(t){i.viewer.entities.removeById(t)}))}});case 3:return i._DialogObject=t.sent,t.next=6,i._DialogObject.init();case 6:i._DialogObject._element.body.className=i._DialogObject._element.body.className+" view-shed",(n=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">位置拾取(起点、终点)</span>\n <button class="edit"><svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>拾取</button>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="margin-bottom: 25px;">\n <div class="col">\n <span class="label">视点高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="999999" step="0.1" @model="viewPointHeight">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n </div>\n </div>\n <div class="row subtitle-box">\n <span class="subtitle">视域夹角</span>\n </div>\n <div class="row"> \n <div class="col">\n <div class="range-box">\n <div class="range-bg">\n <div class="range-process-box">\n <div class="range-process"></div>\n </div>\n </div>\n <div class="range-node-box">\n <span class="range-node-text">0°</span>\n <span class="range-node-text">45°</span>\n <span class="range-node-text">90°</span>\n <span class="range-node-text">135°</span>\n <span class="range-node-text">180°</span>\n <div class="range-node-active"><span class="range-node-active-text">0°</span></div>\n </div>\n <input type="range" max="180" min="0" step="1" name="horizontalViewAngle">\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',i._DialogObject.contentAppChild(n),i._DialogObject._element.body.getElementsByClassName("edit")[0].addEventListener("click",(function(){i.nodeEdit()})),(o=document.createElement("button")).innerHTML="绘制",o.addEventListener("click",(function(){e.create(i)})),i._DialogObject.footAppChild(o),i.html=n,s=n.getElementsByTagName("*"),i._EventBinding.on(i,s),i._elms=i._EventBinding.element,(r=n.querySelector("input[name='horizontalViewAngle']")).value=i.options.horizontalViewAngle,l=n.getElementsByClassName("range-node-active")[0],c=l.getElementsByClassName("range-node-active-text")[0],u=n.getElementsByClassName("range-process")[0],p=i.horizontalViewAngle/180*100,l.style.left=p+"%",u.style.width=p+"%",c.innerHTML=i.horizontalViewAngle+"°",r.addEventListener("input",(function(){var t=r.value/180*100;l.style.left=t+"%",u.style.width=t+"%",c.innerHTML=r.value+"°"})),r.addEventListener("change",(function(){clearTimeout(h),h=setTimeout((function(){i.horizontalViewAngle=r.value}),300)}));case 31:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getcanvas",value:function(t){if(t.viewPosition){t.viewBillboardPrimitive&&(t.viewer.scene.primitives.remove(t.viewBillboardPrimitive),t.viewBillboardPrimitive=null);var e=document.createElement("canvas"),i=e.getContext("2d");e.width=220,e.height=180,e.style.background="#000000";var n=new Image,o=[{images:t.getSourceRootPath()+"/img/bubble/lng.png",text:"经度:"+parseFloat(t.viewPosition.lng.toFixed(10))+"°"},{images:t.getSourceRootPath()+"/img/bubble/lat.png",text:"纬度:"+parseFloat(t.viewPosition.lat.toFixed(10))+"°"},{images:t.getSourceRootPath()+"/img/bubble/h.png",text:"高度:"+Number((parseFloat(t.viewPosition.alt.toFixed(2))+Number(t.viewPointHeight)).toFixed(2))+" m"},{images:t.getSourceRootPath()+"/img/bubble/heading.png",text:"偏航角:"+parseFloat(t.viewHeading.toFixed(10))+"°"},{images:t.getSourceRootPath()+"/img/bubble/pitch.png",text:"俯仰角:"+parseFloat(t.viewPitch.toFixed(10))+"°"}];n.src=t.getSourceRootPath()+"/img/bubble/bubble.png";var s=0;n.onload=function(){i.drawImage(n,0,0,e.width,e.height),o.forEach((function(n,a){var r=new Image;r.src=n.images,r.onload=function(){i.drawImage(r,12,12+26*a),i.fillStyle="#fff",i.font="12px Arial",i.fillText(n.text,44,28+26*a),++s===o.length&&(t.viewBillboardPrimitive=t.viewer.scene.primitives.add(new Cesium.BillboardCollection),t.viewBillboardPrimitive.add({position:Cesium.Cartesian3.fromDegrees(t.viewPosition.lng,t.viewPosition.lat,t.viewPosition.alt+t.viewPointHeight),image:e,width:200,height:180,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}))}}))}}}}]);var i}(ai);function da(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return ma(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ma(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function ma(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function fa(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function va(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function ga(t,e){return t.get(ya(t,e))}function ya(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var ba=new WeakMap,Ca=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),va(i=fa(this,e,[t,n]),ba,new Map),i.viewer=t.viewer,i.options={},i.options.visibleAreaColor=n.visibleAreaColor||"#008000",i.options.invisibleAreaColor=n.invisibleAreaColor||"#FF0000",i.ids=[],i.primitives=[],i.viewpointPrimitive=null,i._elms={},i.precision=n.precision,i.viewPointHeight=n.viewPointHeight,i.Dialog=o,i._EventBinding=new hn,i.html=null,YJ.Analysis.AnalysesResults.push(i),e.edit(i),i}return Xi()(e,t),_()(e,[{key:"viewPointHeight",get:function(){return this.options.viewPointHeight},set:function(t){var e=Math.floor(10*Number(t))/10;isNaN(e)&&(e=1.8),e<0&&(e=0),this.options.viewPointHeight=e,this._elms.viewPointHeight&&this._elms.viewPointHeight.forEach((function(t){t.value=e}))}},{key:"precision",get:function(){return this.options.precision},set:function(t){var e=Math.floor(Number(t));isNaN(e)?e=20:e<1&&(e=1),this.options.precision=e,this._elms.precision&&this._elms.precision.forEach((function(t){t.value=e}))}},{key:"analyse",value:function(){var t=this,i=[this.center.lng,this.center.lat],n=this.radius/1e3,o=turf.circle(i,n,{steps:180,units:"kilometers",properties:{foo:"bar"}});this.viewpointPrimitive||(this.viewpointPrimitive=this.viewer.scene.primitives.add(new Cesium.PointPrimitiveCollection)),this.viewBillboardPrimitive||(this.viewBillboardPrimitive=this.viewer.scene.primitives.add(new Cesium.BillboardCollection));for(var s=[],a=n/this.precision,r=1;r<o.geometry.coordinates[0].length;r++){for(var l=turf.lineString([i,o.geometry.coordinates[0][r]]),c=[],u=1;u<=this.precision;u++){var p=turf.lineSliceAlong(l,0,a*u,{units:"kilometers"});c.push([p.geometry.coordinates[1][0],p.geometry.coordinates[1][1]])}s.push(c)}var h=Cesium.Cartesian3.fromDegrees(this.center.lng,this.center.lat,this.center.alt+this.viewPointHeight);e.getcanvas(this).then((function(e){return t.viewBillboardPrimitive.add({position:h,image:e,width:200,height:140,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY})})),this.viewpointPrimitive.add({position:h,color:Cesium.Color.AQUA.withAlpha(1),pixelSize:6});var d=0,m=this,f=this.randomString(),v=setInterval((function(){if(d>=s.length){var e=ga(ba,t).get(f);e&&clearInterval(e.event)}else!function(t){for(var e=[],n=t,o=0;o<s[n].length;o++){var a=s[n][o],r=void 0,l=void 0,c=s[n][o-1];n==s.length-1?(r=s[0][o],l=s[0][o-1]):(r=s[n+1][o],l=s[n+1][o-1]),0==o&&(l=[].concat(i),c=[]);for(var u=[(a[0]+l[0])/2,(a[1]+l[1])/2],p=Cesium.Cartographic.fromDegrees(u[0],u[1]),d=m.viewer.scene.globe.getHeight(p),f=Cesium.Cartesian3.fromDegrees(u[0],u[1],d),v=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(f,h,new Cesium.Cartesian3),new Cesium.Cartesian3),g=new Cesium.Ray(h,v),y=m.viewer.scene.drillPickFromRay(g,m.primitives),b=void 0,C=0;C<y.length;C++)if(y[C].position){b=y[C];break}var w=Cesium.Color.LIME;b&&Math.abs(b.position.x-f.x)>.01&&Math.abs(b.position.y-f.y)>.01&&Math.abs(b.position.z-f.z)>.01&&(w=Cesium.Color.RED);var k=new Cesium.GroundPolylineGeometry({positions:Cesium.Cartesian3.fromDegreesArray([].concat(L()(a),L()(r),L()(l),L()(c),L()(a))),width:2}),x=new Cesium.GeometryInstance({geometry:k,name:"ViewershedPolygon",attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(w),show:new Cesium.ShowGeometryInstanceAttribute(!0)}});e.push(x)}m.primitives.push(m.viewer.scene.primitives.add(new Cesium.GroundPolylinePrimitive({geometryInstances:e,appearance:new Cesium.PolylineColorAppearance})))}(d),d+=1}),0);ga(ba,this).set(f,{event:v})}},{key:"destroy",value:function(){var t,e,i,n,o=da(ga(ba,this));try{for(o.s();!(t=o.n()).done;){var s=y()(t.value,2),a=(s[0],s[1]);clearInterval(a.event)}}catch(t){o.e(t)}finally{o.f()}e=ba,i=this,n=new Map,e.set(ya(e,i),n);for(var r=0;r<this.primitives.length;r++)this.viewer.scene.primitives.remove(this.primitives[r]);this.primitives=[],this.viewpointPrimitive&&(this.viewer.scene.primitives.remove(this.viewpointPrimitive),this.viewpointPrimitive=null),this.viewBillboardPrimitive&&(this.viewer.scene.primitives.remove(this.viewBillboardPrimitive),this.viewBillboardPrimitive=null),YJ.Measure.SetMeasureStatus(!1)}}],[{key:"create",value:function(t){YJ.Measure.GetMeasureStatus()?console.log("上一次测量未结束"):(t._DialogObject&&t._DialogObject.close&&(t._DialogObject.close(),t._DialogObject=null),new YJ.Draw.DrawCircle(t.sdk).start(function(){var e=o()(a.a.mark((function e(i,n){var o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:return t.radius=n.radius,e.next=5,Cesium.sampleTerrainMostDetailed(t.sdk.viewer.terrainProvider,[Cesium.Cartographic.fromDegrees(n.center.lng,n.center.lat)]);case 5:return o=e.sent,t.center={lng:n.center.lng,lat:n.center.lat,alt:o[0].height},e.next=9,t.analyse();case 9:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()))}},{key:"edit",value:(i=o()(a.a.mark((function t(i){var n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i._DialogObject&&i._DialogObject.close&&(i._DialogObject.close(),i._DialogObject=null),t.next=3,new W(i.sdk.viewer._container,{title:"圆形视域分析",left:"180px",top:"100px",closeCallBack:function(){i.Dialog.closeCallBack&&i.Dialog.closeCallBack(),YJ.Measure.SetMeasureStatus(!1)}});case 3:return i._DialogObject=t.sent,t.next=6,i._DialogObject.init();case 6:i._DialogObject._element.body.className=i._DialogObject._element.body.className+" circle-view-shed",(n=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">视点高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="999999" step="0.1" @model="viewPointHeight">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">采样精度</span>\n <input class="input" type="number" title="" min="1" max="100" step="1" @model="precision">\n </div>\n </div>\n </div>\n ',i._DialogObject.contentAppChild(n),(o=document.createElement("button")).innerHTML="绘制",o.addEventListener("click",(function(){i.viewer.terrainProvider.availability?e.create(i):window.ELEMENT&&window.ELEMENT.Message({message:"未加载地形数据!",type:"warning",duration:1500})})),i._DialogObject.footAppChild(o),s=n.getElementsByTagName("*"),i._EventBinding.on(i,s),i._elms=i._EventBinding.element;case 17:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getcanvas",value:function(t){var e=document.createElement("canvas"),i=e.getContext("2d");e.width=220,e.height=140,e.style.background="#000000";var n=new Image,s=[{images:t.getSourceRootPath()+"/img/bubble/lng.png",text:"经度:"+parseFloat(t.center.lng.toFixed(10))+"°"},{images:t.getSourceRootPath()+"/img/bubble/lat.png",text:"纬度:"+parseFloat(t.center.lat.toFixed(10))+"°"},{images:t.getSourceRootPath()+"/img/bubble/h.png",text:"视高:"+t.viewPointHeight+" m"},{images:t.getSourceRootPath()+"/img/bubble/radius.png",text:"半径:"+t.radius+" m"}];n.src=t.getSourceRootPath()+"/img/bubble/bubble.png";var r=0;return new Promise(function(){var t=o()(a.a.mark((function t(o,l){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.onload=function(){i.drawImage(n,0,0,e.width,e.height),s.forEach((function(t,n){var a=new Image;a.src=t.images,a.onload=function(){i.drawImage(a,12,12+26*n),i.fillStyle="#fff",i.font="12px Arial",i.fillText(t.text,44,28+26*n),++r===s.length&&o(e)}}))};case 1:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}())}}]);var i}(ai);function wa(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ka(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?wa(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):wa(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function xa(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var _a=function(t){function e(t){var i;return k()(this,e),(i=xa(this,e,[t])).viewer=t.viewer,i.viewer.terrainProvider.availability?(i.event,i.result=[],i.handler=void 0,i.toolTip="",YJ.Analysis.AnalysesResults.push(i),i.Draw=new na(i.sdk),i.createNew4Num(50),i):(i.error="未加载地形数据!",window.ELEMENT&&window.ELEMENT.Message({message:"未加载地形数据!",type:"warning",duration:1500}),Wi()(i))}return Xi()(e,t),_()(e,[{key:"createNew4Distance",value:function(t){var e=this,i=200*(t=t||.1)>35?35:200*t;this.arrowWidth=i<15?15:i;this.viewer;this.Draw.start((function(i,n){if(!n||n.length<=2)window.ELEMENT&&window.ELEMENT.Message({message:"至少拥有三个坐标位置!",type:"warning",duration:1500});else{for(var o=[],s=1e4,a=1e4,r=-1e4,l=-1e3,c=0;c<n.length;c++){var u=n[c],p=u.lng,h=u.lat;o.push([p,h]),s=p<s?p:s,a=h<a?h:a,r=p>r?p:r,l=h>l?h:l}o.push(o[0]);var d=[s,a,r,l],m=turf.polygon([o]),f=turf.squareGrid(d,t,{mask:m});e.createEllipse(f)}}))}},{key:"createNew4Num",value:function(t){var e=this,i=t;this.Draw.start((function(t,n){if(!n||n.length<=2)console.warn("至少拥有三个坐标位置!");else{for(var o=[],s=1e4,a=1e4,r=-1e4,l=-1e3,c=0;c<n.length;c++){var u=n[c],p=u.lng,h=u.lat;o.push([p,h]),s=p<s?p:s,a=h<a?h:a,r=p>r?p:r,l=h>l?h:l}o.push(o[0]);var d=[s,a,r,l],m=r-s,f=l-a;f=f>m?f:m;var v=turf.polygon([o]),g=turf.area(v);g>5e12?i-=25:g>1e12?i-=20:g>5e11?i-=15:g>1e11?i-=10:g>6e10&&(i-=5);var y=f/i,b=2e3*y>35?35:2e3*y;e.arrowWidth=b<15?15:b;var C=turf.squareGrid(d,y,{units:"degrees",mask:v});e.createEllipse(C)}}))}},{key:"createEllipse",value:function(t){for(var e=[],i=0;i<t.features.length;i++){var n=t.features[i].geometry.coordinates[0],o=[(n[0][0]+n[2][0])/2,(n[0][1]+n[2][1])/2],s=Cesium.Cartographic.fromDegrees(o[0],o[1]);e.push(s);for(var a=0;a<n.length;a++){var r=n[a],l=Cesium.Cartographic.fromDegrees(r[0],r[1]);e.push(l);var c=n[a+1];if(c){var u=[(r[0]+c[0])/2,(r[1]+c[1])/2],p=Cesium.Cartographic.fromDegrees(u[0],u[1]);e.push(p)}}}var h=this,d=Math.floor(e.length/3)+"";d=10*Number(d.substring(0,d.length-1));var m=0,f=e.slice(m*d,(m+1)*d);f.length>0&&function t(i){Cesium.sampleTerrainMostDetailed(h.viewer.scene.terrainProvider,i).then((function(i){m++;var n=e.slice(m*d,(m+1)*d);n.length>0&&t(n);var o=[],s=i.reduce((function(t,e,i,n){var s=10*i,a=s+10,r=n.slice(s,a);return 0!=r.length&&(o[i]=r),o}),[]);h.calculateSlope(s)}))}(f)}},{key:"createPolygonInsrance",value:function(t,e,i){for(var n=[],o=1;o<t.length-1;o++){var s=t[o];n.push(Cesium.Cartographic.toCartesian(s))}var a=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(n)});return new Cesium.GeometryInstance({id:{type:"SlopeAspect",value:i},geometry:a,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString(e)),show:new Cesium.ShowGeometryInstanceAttribute(!0)}})}},{key:"createArrowInstance",value:function(t,e,i,n,o){var s=new Cesium.Cartographic((t.longitude+e.longitude)/2,(t.latitude+e.latitude)/2,(t.height+e.height)/2),a=new Cesium.Cartographic((i.longitude+e.longitude)/2,(i.latitude+e.latitude)/2,(i.height+e.height)/2),r=n>0?[Cesium.Cartographic.toCartesian(s),Cesium.Cartographic.toCartesian(a)]:[Cesium.Cartographic.toCartesian(a),Cesium.Cartographic.toCartesian(s)];return new Cesium.GeometryInstance({id:{type:"SlopeAspect",value:o},geometry:new Cesium.GroundPolylineGeometry({positions:r,width:this.arrowWidth}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE.withAlpha(.6)),show:new Cesium.ShowGeometryInstanceAttribute(!0)}})}},{key:"calculateSlope",value:function(t){for(var e=this,i=[],n=[],o=0;o<t.length;o++){for(var s=t[o],a=s[0],r=0,l=0,c=1;c<s.length-1;c++){var u=s[c].height-a.height;Math.abs(u)>r&&(r=u,l=c)}var p=new Cesium.Cartographic(a.longitude,a.latitude,0),h=new Cesium.Cartographic(s[l].longitude,s[l].latitude,0),d=Cesium.Cartesian3.distance(Cesium.Cartographic.toCartesian(p),Cesium.Cartographic.toCartesian(h)),m=Math.abs(r/d),f=this.calculateSlopeColor(m,.4),v=this.createPolygonInsrance(s,f,m);n.push(v);var g=l>4?s[l-4]:s[l+4],y=s[l],b=this.createArrowInstance(y,a,g,r,m);i.push(b)}var C=this.viewer.scene.primitives.add(new Cesium.GroundPrimitive({geometryInstances:n,appearance:new Cesium.PerInstanceColorAppearance({translucent:!0,closed:!1})})),w=this.viewer.scene.primitives.add(new Cesium.GroundPolylinePrimitive({geometryInstances:i,appearance:new Cesium.PolylineMaterialAppearance({material:new Cesium.Material({fabric:{type:"PolylineArrow",uniforms:{color:new Cesium.Color(1,1,0,.8)}}})})}));this.result.push(w,C),this.event=new X(this.sdk);var k=function(t,i){var n=document.getElementById("SlopeAspect-box");n||((n=document.createElement("div")).id="SlopeAspect-box",n.style.pointerEvents="none",n.style.display="none",n.style.position="absolute",n.style.background="#333333",n.style.color="#fff",n.style.color="#fff",n.style.padding="5px",n.style.fontSize="12px",n.style.borderRadius="5px",n.style.transform="translate(-50%, -10px)",n.innerHTML='\n <div class="value">坡度:</div>\n <span style="\n position: absolute;\n border: 4px solid;\n border-color: #fff0 #fff0 #333333 #333333;\n transform: rotate(-45deg);\n left: calc(50% - 5px);\n "></span>\n ',document.body.appendChild(n));var o=n.getElementsByClassName("value")[0],s=ka({},t.position),a=e.sdk.viewer.scene.pick(s);if(a&&a.id&&a.id.type&&"SlopeAspect"===a.id.type){var r=0,l=0;if(e.sdk.viewer&&e.sdk.viewer._element){var c=e.sdk.viewer._element.getElementsByClassName("cesium-widget")[0].getElementsByTagName("canvas")[0];r=c.getBoundingClientRect().top+window.scrollY,l=c.getBoundingClientRect().left+window.scrollX}n.style.display="block",n.style.left=s.x+2+l+"px",n.style.top=s.y-20+r+"px",o.innerHTML="坡度:"+Number(Cesium.Math.toDegrees(a.id.value||0).toFixed(2))+"°"}else n.style.display="none"};this.event.mouse_move((function(t,e){var i={position:ka({},t.endPosition)};k(i)})),this.event.mouse_left(k),this._camera={position:this.sdk.viewer.camera.position,heading:this.sdk.viewer.camera.heading,pitch:this.sdk.viewer.camera.pitch,roll:this.sdk.viewer.camera.roll},this.sdk.viewer.scene.preRender.addEventListener(this._watchEvent,this)}},{key:"_watchEvent",value:function(){if(this._camera.position.x.toFixed(8)!==this.sdk.viewer.camera.position.x.toFixed(8)||this._camera.position.y.toFixed(8)!==this.sdk.viewer.camera.position.y.toFixed(8)||this._camera.position.z.toFixed(8)!==this.sdk.viewer.camera.position.z.toFixed(8)||this._camera.heading.toFixed(8)!==this.sdk.viewer.camera.heading.toFixed(8)||this._camera.pitch.toFixed(8)!==this.sdk.viewer.camera.pitch.toFixed(8)||this._camera.roll.toFixed(8)!==this.sdk.viewer.camera.roll.toFixed(8)){var t=document.getElementById("SlopeAspect-box");t&&(t.style.display="none")}this._camera={position:this.sdk.viewer.camera.position,heading:this.sdk.viewer.camera.heading,pitch:this.sdk.viewer.camera.pitch,roll:this.sdk.viewer.camera.roll}}},{key:"calculateSlopeColor",value:function(t,e){return t<.00872686779075879?"rgba(85,182,43,"+e+")":t<.03492076949174773?"rgba(135,211,43,"+e+")":t<.08748866352592401?"rgba(204,244,44,"+e+")":t<.2679491924311227?"rgba(245,233,44,"+e+")":t<.7002075382097097?"rgba(255,138,43,"+e+")":t<1.4281480067421144?"rgba(255,84,43,"+e+")":"rgba(255,32,43,"+e+")"}},{key:"destroy",value:function(){var t=this;this.result&&this.result.forEach((function(e){t.viewer.scene.primitives.remove(e)})),this.result=[],this.sdk.viewer.scene.preRender.removeEventListener(this._watchEvent,this)}}])}(ai);function Ea(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Sa=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),window.addEventListener("resize",(function(){i.echartsObject&&i.echartsObject.resize()})),(i=Ea(this,e,[t])).viewer=t.viewer,i.Dialog=n,YJ.Analysis.AnalysesResults.push(i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"clean",value:function(){this.end(),this._currentId=null,this.entityHasCreated=!1,this.polyline&&this.viewer.entities.remove(this.polyline),this.tipEntity&&this.viewer.entities.remove(this.tipEntity),this.polyline=null,this.tipEntity=null}},{key:"destroy",value:function(){this.clean(),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null)}}],[{key:"create",value:function(t){var i=this;this._currentId=Cesium.createGuid();var n=this._currentId;if(t.clean(),YJ.Measure.GetMeasureStatus())console.warn("上一次测量未结束");else{YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("左键确定,右键取消",t.sdk),t.event=new X(t.sdk),t.positions=[],t.points_ids=[];var s=[];t.event.mouse_left(function(){var r=o()(a.a.mark((function o(r,l){var c;return a.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:try{t.entityHasCreated||e.create_polyline(t),s.push(l),t.points_ids.push(t.create_point(l)),2==s.length&&(t.end(),c=[],s.forEach((function(e){c.push(t.cartesian3Towgs84(e,t.viewer))})),e.interPoints(t).then((function(o){i._currentId&&i._currentId===n&&(t._DialogObject?e.initEcharts(t,o):e.edit(t,o))})))}catch(t){console.log(t)}case 1:case"end":return o.stop()}}),o)})));return function(t,e){return r.apply(this,arguments)}}()),t.event.mouse_right((function(e,i){s=[],t.clean()})),t.event.mouse_move((function(e,i){t.positions=s.concat(i),t.tip.setPosition(i,e.endPosition.x,e.endPosition.y)})),t.event.gesture_pinck_start((function(e,i){var n=new Date;t.event.gesture_pinck_end((function(){if(new Date-n>=500){s=[],t.end()}}))}))}}},{key:"create_polyline",value:function(t){t.entityHasCreated=!0;var e=t.randomString();return t.polyline=t.viewer.entities.add(new Cesium.Entity({id:e,polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions}),!1),width:5,material:Cesium.Color.fromCssColorString(t.color),clampToGround:!0,zIndex:99999999}})),e}},{key:"interPoints",value:(n=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D,M;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i=e.viewer,n=e.positions,o=[],s=[],r=0;r<n.length;r++)l=n[r],c=i.scene.globe.ellipsoid.cartesianToCartographic(l),o.push(c),u=e.cartesian3Towgs84(l,i),s.push(u);return p=[],t.next=8,e.getClampToHeight({lng:s[0].lng,lat:s[0].lat});case 8:h=t.sent,p.push({position:{lng:s[0].lng,lat:s[0].lat,height:h},distance:0}),d=0;case 11:if(!(d<o.length-1)){t.next=42;break}m=turf.lineString([[s[d].lng,s[d].lat],[s[d+1].lng,s[d+1].lat]]),f=turf.length(m,{units:"kilometers"}),v=o[d],g=o[d+1],y=1e7*Math.abs(v.longitude-g.longitude),b=1e7*Math.abs(v.latitude-g.latitude),y>b&&(b=y),(C=parseInt(b/2))>150&&(C=150),C<2&&(C=2),w=f/(C-1),k=0;case 24:if(!(k<C-1)){t.next=39;break}return x=k*w,_=(k+1)*w,t.next=29,turf.lineSliceAlong(m,x,_,{units:"kilometers"});case 29:return E=t.sent,S=E.geometry.coordinates[E.geometry.coordinates.length-1][0],D=E.geometry.coordinates[E.geometry.coordinates.length-1][1],t.next=34,e.getClampToHeight({lng:S,lat:D});case 34:M=t.sent,p.push({position:{lng:S,lat:D,height:M},distance:1e3*_});case 36:k++,t.next=24;break;case 39:d++,t.next=11;break;case 42:return t.abrupt("return",p);case 43:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"edit",value:(i=o()(a.a.mark((function t(i,n){var o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i._DialogObject&&i._DialogObject.close&&(i._DialogObject.close(),i._DialogObject=null),t.next=3,new W(i.sdk.viewer._container,{title:"剖面分析",left:"180px",top:"100px",closeCallBack:function(){i.clean(),i.Dialog.closeCallBack&&i.Dialog.closeCallBack()}});case 3:return i._DialogObject=t.sent,t.next=6,i._DialogObject.init();case 6:i._DialogObject._element.body.className=i._DialogObject._element.body.className+" profile",(o=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="profile-echarts"></div>\n ',i._DialogObject.contentAppChild(o),(s=document.createElement("button")).innerHTML='<svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>重新绘制',s.style.width="auto",s.addEventListener("click",(function(){e.create(i),e.initEcharts(i)})),i._DialogObject.footAppChild(s),e.initEcharts(i,n);case 16:case"end":return t.stop()}}),t)}))),function(t,e){return i.apply(this,arguments)})},{key:"initEcharts",value:function(t,e){var i,n=[],o=[],s=e;if(s){for(var a=s[s.length-1].distance,r=Math.ceil(a),l=0;l<s.length;l++){var c=s[l];if(void 0!==c.position.height){var u=[c.distance.toFixed(2),c.position.height.toFixed(2)];n.push(u);var p=[c.position.lng,c.position.lat];o.push(p)}}var h={show:!0,pixelSize:10,color:Cesium.Color.GREEN,outlineColor:Cesium.Color.SKYBLUE,outlineWidth:3,disableDepthTestDistance:Number.POSITIVE_INFINITY},d=t._DialogObject._element.content.getElementsByClassName("profile-echarts")[0];t.echartsObject=echarts.init(d),i={tooltip:{trigger:"axis",textStyle:{align:"left"},formatter:function(e){var i=o[e[0].dataIndex],n=e[0].data;return t.tipEntity?t.tipEntity.position=Cesium.Cartesian3.fromDegrees(i[0],i[1],Number(n[1])):t.tipEntity=t.sdk.viewer.entities.add({position:Cesium.Cartesian3.fromDegrees(i[0],i[1],Number(n[1])),point:h}),"距离:"+n[0]+"m<br>高度:"+n[1]+"m<br>坐标:"+i[0].toFixed(5)+","+i[1].toFixed(5)}},grid:{top:40,bottom:20,left:55,right:30},calculable:!0,xAxis:[{type:"value",max:r,scale:!0,axisLabel:{color:"#ffffff"},axisLine:{lineStyle:{color:"#ffffff"}}}],yAxis:[{type:"value",scale:!0,axisLabel:{color:"#ffffff"},axisLine:{lineStyle:{color:"#ffffff"}}}],series:[{name:"ProfileLine",type:"line",data:n,smooth:!0,itemStyle:{normal:{color:"#39FDA1"}},lineStyle:{normal:{width:3,color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"rgba(85,254,139,1)"},{offset:.5,color:"rgba(7,252,202,1)"},{offset:1,color:"rgba(14,245,210,1)"}],globalCoord:!1}}},areaStyle:{normal:{color:new echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(102,153,255,1)"},{offset:.8,color:"rgba(102,153,255,0.08)"},{offset:1,color:"rgba(9,173,208,0.15)"}],!1),shadowColor:"rgba(14,245,210,1)",shadowBlur:20}},markPoint:{data:[{type:"max",name:"最高点",label:{color:"#ffffff"}},{type:"min",name:"最低点",label:{color:"#ffffff"}}]}}]}}else{var m=t._DialogObject._element.content.getElementsByClassName("profile-echarts")[0];t.echartsObject=echarts.init(m),i={tooltip:{trigger:"axis",textStyle:{align:"left"}},grid:{top:40,bottom:20,left:55,right:30},calculable:!0,xAxis:[{type:"value",scale:!0,axisLabel:{color:"#ffffff"},axisLine:{lineStyle:{color:"#ffffff"}}}],yAxis:[{type:"value",scale:!0,axisLabel:{color:"#ffffff"},axisLine:{lineStyle:{color:"#ffffff"}}}],series:[{name:"ProfileLine",type:"line",data:[],smooth:!0,itemStyle:{normal:{color:"#39FDA1"}},lineStyle:{normal:{width:3,color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"rgba(85,254,139,1)"},{offset:.5,color:"rgba(7,252,202,1)"},{offset:1,color:"rgba(14,245,210,1)"}],globalCoord:!1}}},areaStyle:{normal:{color:new echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(102,153,255,1)"},{offset:.8,color:"rgba(102,153,255,0.08)"},{offset:1,color:"rgba(9,173,208,0.15)"}],!1),shadowColor:"rgba(14,245,210,1)",shadowBlur:20}},markPoint:{data:[{type:"max",name:"最高点",label:{color:"#ffffff"}},{type:"min",name:"最低点",label:{color:"#ffffff"}}]}}]}}t.echartsObject.setOption(i)}}]);var i,n}(Qs);function Da(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Ma=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=Da(this,e,[t,n])).viewer=t.viewer,i.resultObject={viewPoint:void 0,targetPoints:[],targetPoint:void 0,objectExclude:[],entities:[]},i.options={},i._elms={},i.viewPointHeight=n.viewPointHeight,i.Dialog=o,i._EventBinding=new hn,YJ.Analysis.AnalysesResults.push(i),e.edit(i),i}return Xi()(e,t),_()(e,[{key:"viewPointHeight",get:function(){return this.options.viewPointHeight},set:function(t){var e=Math.floor(10*Number(t))/10;isNaN(e)&&(e=1.8),e<0&&(e=0),this.options.viewPointHeight=e,this._elms.viewPointHeight&&this._elms.viewPointHeight.forEach((function(t){t.value=e}))}},{key:"destroy",value:function(){var t=this;this.resultObject.entities.forEach((function(e){t.viewer.entities.remove(e)})),this.resultObject={viewPoint:void 0,targetPoints:[],targetPoint:void 0,objectExclude:[],entities:[]},this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),this.tip=null,this.event=null,YJ.Measure.SetMeasureStatus(!1)}}],[{key:"create",value:function(t){if(YJ.Measure.GetMeasureStatus())console.log("上一次测量未结束");else{t._DialogObject&&t._DialogObject.close&&(t._DialogObject.close(),t._DialogObject=null),t.event=new X(t.sdk),t.tip=new Z("左键点击创建视角起点",t.sdk),YJ.Measure.SetMeasureStatus(!0);t.event.mouse_left(function(){var i=o()(a.a.mark((function i(n,o){var s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t.tip.set_text("左键创建视角终点,右键结束通视分析"),t.resultObject.viewPoint){i.next=15;break}return s=t.cartesian3Towgs84(o,t.viewer),i.next=5,Cesium.sampleTerrainMostDetailed(t.sdk.viewer.terrainProvider,[Cesium.Cartographic.fromDegrees(s.lng,s.lat)]);case 5:(r=i.sent)[0].height>s.alt&&(s.alt=r[0].height),s.alt=s.alt+t.viewPointHeight,l=Cesium.Cartesian3.fromDegrees(s.lng,s.lat,s.alt),t.resultObject.viewPoint=l,c=t.viewer.entities.add({position:l,point:{color:Cesium.Color.YELLOW,pixelSize:5}}),t.resultObject.objectExclude.push(c),t.resultObject.entities.push(c),i.next=32;break;case 15:t.resultObject.targetPoint=o,u=t.viewer.entities.add({position:o,point:{color:Cesium.Color.YELLOW,pixelSize:5}}),t.resultObject.objectExclude.push(u),t.resultObject.entities.push(u),p=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(t.resultObject.targetPoint,t.resultObject.viewPoint,new Cesium.Cartesian3),new Cesium.Cartesian3),h=new Cesium.Ray(t.resultObject.viewPoint,p),d=t.viewer.scene.drillPickFromRay(h),m={},f=0;case 24:if(!(f<d.length)){i.next=31;break}if(!d[f].position){i.next=28;break}return m=d[f],i.abrupt("break",31);case 28:f++,i.next=24;break;case 31:m&&(v=e.distance(t.resultObject.viewPoint,t.resultObject.targetPoint),g=e.distance(t.resultObject.viewPoint,m.position||o),y=e.distance(m.position||o,t.resultObject.targetPoint),v>g?(b=t.viewer.entities.add({polyline:{positions:[t.resultObject.viewPoint,m.position],material:Cesium.Color.GREEN,width:3,zIndex:99999999}}),t.resultObject.entities.push(b),C=t.viewer.entities.add({polyline:{positions:[m.position,t.resultObject.targetPoint],material:Cesium.Color.RED,width:3,zIndex:99999999}}),t.resultObject.entities.push(C),t.resultObject.targetPoints.push({targetPoint:o,visual:!1,distance:[v,g,y]})):(w=t.viewer.entities.add({polyline:{positions:[t.resultObject.viewPoint,t.resultObject.targetPoint],material:Cesium.Color.GREEN,width:3,zIndex:99999999}}),t.resultObject.entities.push(w),t.resultObject.targetPoints.push({targetPoint:o,visual:!0,distance:[v,g,y]})));case 32:case"end":return i.stop()}}),i)})));return function(t,e){return i.apply(this,arguments)}}()),t.event.mouse_move((function(e,i){t.tip.setPosition(i,e.endPosition.x,e.endPosition.y)})),t.event.mouse_right((function(t,e){i()})),t.event.gesture_pinck_start((function(e,n){var o=new Date;t.event.gesture_pinck_end((function(){new Date-o>=500&&i()}))}))}function i(){YJ.Measure.SetMeasureStatus(!1),t.tip.destroy(),t.event.destroy(),t.tip=null,t.event=null}}},{key:"edit",value:(i=o()(a.a.mark((function t(i){var n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i._DialogObject&&i._DialogObject.close&&(i._DialogObject.close(),i._DialogObject=null),t.next=3,new W(i.sdk.viewer._container,{title:"多点视线分析",left:"180px",top:"100px",closeCallBack:function(){i.Dialog.closeCallBack&&i.Dialog.closeCallBack(),YJ.Measure.SetMeasureStatus(!1)}});case 3:return i._DialogObject=t.sent,t.next=6,i._DialogObject.init();case 6:i._DialogObject._element.body.className=i._DialogObject._element.body.className+" visibility",(n=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">视点高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="999999" step="0.1" @model="viewPointHeight">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n ',i._DialogObject.contentAppChild(n),(o=document.createElement("button")).innerHTML="绘制",o.addEventListener("click",(function(){e.create(i)})),i._DialogObject.footAppChild(o),s=n.getElementsByTagName("*"),i._EventBinding.on(i,s),i._elms=i._EventBinding.element;case 17:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"distance",value:function(t,e){var i=Cesium.Cartographic.fromCartesian(t),n=Cesium.Cartographic.fromCartesian(e),o=new Cesium.EllipsoidGeodesic;o.setEndPoints(i,n);var s=o.surfaceDistance;return s=Math.sqrt(Math.pow(s,2)+Math.pow(n.height-i.height,2))}}]);var i}(ai),Pa=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,t),this.viewer=e.viewer;var n=this.viewer.terrainProvider.availability;if(!n)return this.error="未加载地形数据!",window.ELEMENT&&window.ELEMENT.Message({message:"未加载地形数据!",type:"warning",duration:1500}),void console.warn(this.error);this.positions=i.positions,this.interfaceNum=i.interfaceNum||25,this.colorFill=i.colorFill||["#8CEA00","#B7FF4A","#FFFF37","#FFE66F","#FFD1A4","#FFCBB3","#FFBD9D","#FFAD86","#FF9D6F","#FF8F59","#FF8040","#FF5809","#F75000","#D94600","#BB3D00","#A23400","#842B00","#642100","#4D0000","#2F0000"],this.countorLineList=Cesium.defaultValue(i.countorLineList,[]),YJ.Analysis.AnalysesResults.push(this),this.createNewLine()}return _()(t,[{key:"type",get:function(){return"ContourAnalysis"}},{key:"createNewLine",value:function(){t.interpolatePoint(this)}},{key:"getObjectIndex",value:function(t,e){for(var i=0;i<t.length;i++)if(t[i]>e)return i}},{key:"clear",value:function(t){if(t){this.viewer.dataSources.remove(t);var e=this.countorLineList.indexOf(t);this.countorLineList.splice(e,1)}}},{key:"destroy",value:function(){var t=this;this.countorLineList.forEach((function(e){t.viewer.dataSources.remove(e)})),this.countorLineList=[]}}],[{key:"interpolatePoint",value:function(t){for(var e=t.positions,i=[],n={minX:360,maxX:-360,minY:180,maxY:-180},o=0;o<e.length;o++){var s=Cesium.Cartesian3.fromDegrees(e[o].lng,e[o].lat,e[o].alt),a=t.viewer.scene.globe.ellipsoid.cartesianToCartographic(s),r=Cesium.Math.toDegrees(a.latitude),l=Cesium.Math.toDegrees(a.longitude);n.maxY=Math.max(r,n.maxY),n.minY=Math.min(r,n.minY),n.maxX=Math.max(l,n.maxX),n.minX=Math.min(l,n.minX);var c={type:"Feature",properties:{},geometry:{type:"Point",coordinates:[l,r]}};i.push(c)}var u={type:"FeatureCollection",features:i};turf.featureEach(u,(function(t){t.properties.height=0}));var p=turf.point([n.minX,n.minY]),h=turf.point([n.maxX,n.maxY]),d=turf.rhumbDistance(p,h,{units:"kilometers"}),m=turf.interpolate(u,d/t.interfaceNum,{gridType:"points",property:"height",units:"kilometers"}),f=1e7,v=-1e8;turf.featureEach(m,(function(e){var i=e.geometry.coordinates,n=Cesium.Cartographic.fromDegrees(i[0],i[1]),o=t.viewer.scene.globe.getHeight(n);v=Math.max(o,v),f=Math.min(o,f),e.properties.height=o}));for(var g=[],y=t.colorFill.length-1,b=(v-f)/y,C=0;C<y+1;C++)g.push(Math.ceil(f+b*C));var w=turf.isolines(m,g,{zProperty:"height"});function k(e){for(var i=new ai,n=e.positions,o=n._value.length,s=[],a=0;a<o;a++){var r=i.cartesian3Towgs84(n._value[a],t.viewer);s.push([r.lng,r.lat])}var l=turf.lineString(s),c=turf.length(l,{units:"kilometers"}),u=turf.along(l,c/2,{units:"kilometers"});return Cesium.Cartesian3.fromDegrees(u.geometry.coordinates[0],u.geometry.coordinates[1],0)}Cesium.GeoJsonDataSource.load(w,{clampToGround:!0}).then((function(e){console.log(e),t.countorLine=e,t.countorLineList.push(e),t.viewer.dataSources.add(e);for(var i=e.entities.values,n=0;n<i.length;n++){var o=i[n],s=k(o.polyline);o.position=s;var a=t.getObjectIndex(g,o.properties.height._value);a&&(o.polyline.material=Cesium.Color.fromCssColorString(t.colorFill[a-1]))}}))}}])}();function Oa(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ta(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Oa(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Oa(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Na(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Ba=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=Na(this,e,[t,o])).viewer=t.viewer,n.tiles3d=i,n.options=Ta({},o),n.options.regionsType=n.options.regionsType||!1,YJ.Analysis.SectionResults.push(n),n.Planes=[],e.start(n),n}return Xi()(e,t),_()(e,[{key:"regionsType",get:function(){return this.options.regionsType},set:function(t){this.options.regionsType=t,this.Planes.length>0&&(this.Planes=[],e.planeCollection(this))}},{key:"destroy",value:function(){this.Planes=[],this.tiles3d.clippingPlanes&&(this.tiles3d.clippingPlanes.enabled=!1,this.tiles3d.clippingPlanes.removeAll())}}],[{key:"start",value:function(t){var i=t.options.positions||[];if(!t.isConvex(i))return window.ELEMENT&&window.ELEMENT.Message({message:"不支持凹多边形",type:"warning",duration:1500}),void console.log("不支持凹多边形");t.inverseTransform=function(t){var e,i=t.root.transform;e=i&&i.equals(Cesium.Matrix4.IDENTITY)||!i?Cesium.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center):Cesium.Matrix4.fromArray(t.root.transform);return Cesium.Matrix4.inverseTransformation(e,new Cesium.Matrix4)}(t.tiles3d),t.Planes=[];var n=[];if(i.length>0){for(var o=0;o<i.length;o++)n.push([i[o].lng,i[o].lat]);n.push([i[0].lng,i[0].lat]),t.isClockwise=turf.booleanClockwise(turf.lineString(n))}e.planeCollection(t)}},{key:"planeCollection",value:function(t){var e=t.options.positions||[];if(t.regionsType==t.isClockwise)for(var i=0;i<e.length;i++)i===e.length-1?t.Planes.push(a(e[i],e[0],t.inverseTransform)):t.Planes.push(a(e[i],e[i+1],t.inverseTransform));else for(var n=e.length-1;n>=0;n--)0===n?t.Planes.push(a(e[n],e[e.length-1],t.inverseTransform)):t.Planes.push(a(e[n],e[n-1],t.inverseTransform));if(t.tiles3d.clippingPlanes){t.tiles3d.clippingPlanes.removeAll();for(var o=0;o<t.Planes.length;o++)t.tiles3d.clippingPlanes.add(t.Planes[o]);t.tiles3d.clippingPlanes.enabled=!0}else{var s=new Cesium.ClippingPlaneCollection({planes:t.Planes,enabled:!0,unionClippingRegions:t.regionsType,edgeColor:Cesium.Color.WHITE,edgeWidth:1});t.tiles3d.clippingPlanes=s}function a(t,e,i){var n=r(t,i),o=r(e,i),s=new Cesium.Cartesian3(0,0,10),a=Cesium.Cartesian3.subtract(o,n,new Cesium.Cartesian3),l=Cesium.Cartesian3.cross(a,s,new Cesium.Cartesian3);l=Cesium.Cartesian3.normalize(l,l);var c=Cesium.Plane.fromPointNormal(n,l);return Cesium.ClippingPlane.fromPlane(c)}function r(t,e){var i=Cesium.Cartesian3.fromDegrees(t.lng,t.lat);return Cesium.Matrix4.multiplyByPoint(e,i,new Cesium.Cartesian3(0,0,0))}}}])}(ai);function La(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Aa=[],ja=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,e),(i=La(this,e,[t])).viewer=t.viewer,i.options=n||{},i.options.height=i.options.height||0===i.options.height?i.options.height:10,i.options.show=!i.options.show&&!1!==i.options.show||i.options.show,i.bottomImg=i.getSourceRootPath()+"/img/excavationregion_top.jpg",i.wallImg=i.getSourceRootPath()+"/img/excavationregion_side.jpg",i.splitNum=Cesium.defaultValue(n.splitNum,50),i.Draw=new na(i.sdk),i.bottomMaterial=Cesium.Material.fromType("Color",{color:Cesium.Color.fromAlpha(Cesium.Color.fromCssColorString("#735d4f"))}),i.wallMaterial=Cesium.Material.fromType("Color",{color:Cesium.Color.fromAlpha(Cesium.Color.fromCssColorString("#976b4e"))});var o=new Image,s=new Image;return o.src=i.bottomImg,s.src=i.wallImg,o.crossOrigin="Anonymous",s.crossOrigin="Anonymous",o.onload=function(){var t=document.createElement("canvas");t.width=o.width,t.height=o.height,t.getContext("2d").drawImage(o,0,0,o.width,o.height);var e=t.toDataURL("image/jpg");i.bottomMaterial=new Cesium.Material({fabric:{type:"Image",uniforms:{image:e}}}),i.bottomSurface&&(i.bottomSurface.appearance.material=i.bottomMaterial)},s.onload=function(){var t=document.createElement("canvas");t.width=s.width,t.height=s.height,t.getContext("2d").drawImage(s,0,0,s.width,s.height);var e=t.toDataURL("image/jpg");i.wallMaterial=new Cesium.Material({fabric:{type:"Image",uniforms:{image:e}}}),i.wellWall&&(i.wellWall.appearance.material=i.wallMaterial)},i.init(),i}return Xi()(e,t),_()(e,[{key:"show",get:function(){return this.options.show},set:function(t){this.options.show=t,this.switchExcavate(t)}},{key:"height",get:function(){return this.options.height},set:function(t){this.options.height=t}},{key:"init",value:function(){e.edit(this,!0)}},{key:"startCreate",value:function(){var t=this;this.Draw.start((function(e,i){if(i&&!(i.length<=2))return t.isConvex(i)?void t.updateData(i):(window.ELEMENT&&window.ELEMENT.Message({message:"不支持凹多边形",type:"warning",duration:1500}),void console.log("不支持凹多边形"));window.ELEMENT&&window.ELEMENT.Message({message:"至少拥有三个坐标位置!",type:"warning",duration:1500})}))}},{key:"updateData",value:function(t){var e=this.viewer;this.clear();for(var i=[],n=[],o=0;o<t.length;o++)n.push([t[o].lng,t[o].lat]);n.push([t[0].lng,t[0].lat]);var s=turf.lineString(n),a=turf.booleanClockwise(s);this.excavateMinHeight=9999;for(var r=0;r<t.length;++r){var l=(r+1)%t.length,c=Cesium.Cartesian3.fromDegrees(t[r].lng,t[r].lat,t[r].alt),u=Cesium.Cartesian3.fromDegrees(t[l].lng,t[l].lat,t[l].alt),p=Cesium.Cartesian3.midpoint(c,u,new Cesium.Cartesian3),h=Cesium.Cartographic.fromCartesian(c),d=e.scene.globe.getHeight(h)||h.height;d<this.excavateMinHeight&&(this.excavateMinHeight=d);var m=Cesium.Cartesian3.normalize(p,new Cesium.Cartesian3),f=a?Cesium.Cartesian3.subtract(c,p,new Cesium.Cartesian3):Cesium.Cartesian3.subtract(u,p,new Cesium.Cartesian3);f=Cesium.Cartesian3.normalize(f,f);var v=Cesium.Cartesian3.cross(f,m,new Cesium.Cartesian3);v=Cesium.Cartesian3.normalize(v,v);var g=new Cesium.Plane(v,0),y=Cesium.Plane.getPointDistance(g,p);i.push(new Cesium.ClippingPlane(v,y))}this.viewer.scene.globe.clippingPlanes=new Cesium.ClippingPlaneCollection({planes:i,edgeWidth:1,edgeColor:Cesium.Color.WHITE,enabled:!0}),this.prepareWell(t),this.createWell(this.wellData)}},{key:"clear",value:function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.primitives.remove(this.bottomSurface),this.viewer.scene.primitives.remove(this.wellWall),this.viewer.scene.render());for(var t=Aa.length-1;t>=0;t--)this.viewer.scene.primitives.remove(Aa[t]);Aa=[],this.Draw&&this.Draw.end()}},{key:"destroy",value:function(){this.clear()}},{key:"prepareWell",value:function(t){for(var e=t.length,i=this.excavateMinHeight-this.height,n=[],o=[],s=[],a=0;a<e;a++){var r=a==e-1?0:a+1,l=[Cesium.Cartographic.fromDegrees(t[a].lng,t[a].lat,t[a].alt).longitude,Cesium.Cartographic.fromDegrees(t[a].lng,t[a].lat,t[a].alt).latitude],c=[Cesium.Cartographic.fromDegrees(t[r].lng,t[r].lat,t[r].alt).longitude,Cesium.Cartographic.fromDegrees(t[r].lng,t[r].lat,t[r].alt).latitude];0==a&&(s.push(new Cesium.Cartographic(l[0],l[1])),o.push(Cesium.Cartesian3.fromRadians(l[0],l[1],i)),n.push(Cesium.Cartesian3.fromRadians(l[0],l[1],0)));for(var u=1;u<=this.splitNum;u++){var p=Cesium.Math.lerp(l[0],c[0],u/this.splitNum),h=Cesium.Math.lerp(l[1],c[1],u/this.splitNum);a==e-1&&u==this.splitNum||(s.push(new Cesium.Cartographic(p,h)),o.push(Cesium.Cartesian3.fromRadians(p,h,i)),n.push(Cesium.Cartesian3.fromRadians(p,h,0)))}}this.wellData={lerp_pos:s,bottom_pos:o,no_height_top:n}}},{key:"createWell",value:function(t){var e=this;this.viewer.terrainProvider._layers?(this.createBottomSurface(t.bottom_pos),Cesium.sampleTerrainMostDetailed(this.viewer.terrainProvider,t.lerp_pos).then((function(i){for(var n=[],o=0;o<i.length;o++){var s=i[o],a=Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height);n.push(a)}e.createWellWall(t.bottom_pos,n)}))):(this.createBottomSurface(t.bottom_pos),this.createWellWall(t.bottom_pos,t.no_height_top))}},{key:"ellipsoidToDegree",value:function(t){var e=new Cesium.Cartesian3(t.x,t.y,t.z),i=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(e);return{longitude:Cesium.Math.toDegrees(i.longitude),latitude:Cesium.Math.toDegrees(i.latitude),altitude:i.height}}},{key:"createBottomSurface",value:function(t){if(t.length){for(var e=this.getMinHeight(t),i=[],n=0;n<t.length;n++){var o=this.ellipsoidToDegree(t[n]);i.push(o.longitude,o.latitude,e)}var s=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(i)),perPositionHeight:!0}),a=new Cesium.MaterialAppearance({translucent:!1,flat:!0,material:this.bottomMaterial});this.bottomSurface=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:Cesium.PolygonGeometry.createGeometry(s)}),appearance:a,asynchronous:!1}),Aa.push(this.bottomSurface),this.viewer.scene.primitives.add(this.bottomSurface)}}},{key:"createWellWall",value:function(t,e){for(var i=this.getMinHeight(t),n=[],o=[],s=0;s<e.length;s++)n.push(this.ellipsoidToDegree(e[s]).altitude),o.push(i);var a=new Cesium.WallGeometry({positions:e,maximumHeights:n,minimumHeights:o}),r=Cesium.WallGeometry.createGeometry(a),l=new Cesium.MaterialAppearance({translucent:!1,flat:!0,material:this.wallMaterial});this.wellWall=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:r,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.GREY)},id:"PitWall"}),appearance:l,asynchronous:!1}),Aa.push(this.wellWall),this.viewer.scene.primitives.add(this.wellWall)}},{key:"getMinHeight",value:function(t){for(var e=5e6,i=null,n=0;n<t.length;n++){var o=t[n].z;o<e&&(e=o,i=this.ellipsoidToDegree(t[n]))}return i.altitude}},{key:"switchExcavate",value:function(t){t?(this.viewer.scene.globe.material=null,this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)}},{key:"updateExcavateDepth",value:function(t){if(this.viewer.scene.primitives.remove(this.bottomSurface),this.viewer.scene.primitives.remove(this.wellWall),this.wellData){for(var e=this.wellData.lerp_pos,i=[],n=0;n<e.length;n++)i.push(Cesium.Cartesian3.fromRadians(e[n].longitude,e[n].latitude,this.excavateMinHeight-t));this.wellData.bottom_pos=i,this.createWell(this.wellData)}}}],[{key:"edit",value:(i=o()(a.a.mark((function t(e,i){var n,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e._DialogObject&&e._DialogObject.close&&(e._DialogObject.close(),e._DialogObject=null),!i){t.next=21;break}return t.next=4,new W(e.sdk.viewer._container,{title:"地形开挖",closeCallBack:function(){}});case 4:return e._DialogObject=t.sent,t.next=7,e._DialogObject.init();case 7:e._DialogObject._element.body.className=e._DialogObject._element.body.className+" terrain-excavation",(n=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 70px;">挖掘高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="5000000" name="height">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">绘制开挖区域</span>\n <button class="start-excavation"><svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>绘制</button>\n </div>\n <div class="col">\n <span class="label">清除开挖区域</span>\n <button class="clean-excavation"><svg class="icon-close"><use xlink:href="#yj-icon-close"></use></svg>清除</button>\n </div>\n </div>\n </div>\n ',e._DialogObject.contentAppChild(n),n.getElementsByClassName("start-excavation")[0].addEventListener("click",(function(){e.startCreate()})),n.getElementsByClassName("clean-excavation")[0].addEventListener("click",(function(){e.clear()})),(o=n.querySelector("input[name='height']")).value=e.height,o.addEventListener("change",(function(t){var i=t.target.value;(i=Number(i))<.01&&(i=.01,t.target.value=i,e.height=i)})),o.addEventListener("blur",(function(t){var i=t.target.value;i=Number(i),t.target.max&&i>Number(t.target.max)&&(i=Number(t.target.max)),i<.01&&(i=.01),t.target.value=i,e.height=i})),t.next=22;break;case 21:e._DialogObject&&e._DialogObject.close&&(e._DialogObject.close(),e._DialogObject=null);case 22:case"end":return t.stop()}}),t)}))),function(t,e){return i.apply(this,arguments)})}]);var i}(ai);function Ia(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Fa(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ia(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ia(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ra(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var za={},Ha=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(k()(this,e),n=Ra(this,e,[t]),C()(n,"getUniqueArray",(function(t){return t.filter((function(t,e,i){return i.indexOf(t,0)===e}))})),!i||!n.sdk||!n.sdk.viewer)return Wi()(n);if(n.options=Fa({},o),n.options.id=o.id||n.randomString(),n.options.name=o.name||"压平面",n.options.positions=o.positions||[],n.options.show=!o.show&&!1!==o.show||o.show,n.tileset=i,n.Dialog=s,!n.options.height&&0!==n.options.height){for(var a=n.options.positions[0].alt,r=0;r<n.options.positions.length;r++)a>n.options.positions[r].alt&&(a=n.options.positions[r].alt);n.options.height=a}return za[n.tileset.id]?za[n.tileset.id].push(Fa({},n.options)):za[n.tileset.id]=[Fa({},n.options)],n.center=i.boundingSphere.center.clone(),n.center84=n.cartesian3Towgs84(n.center,n.sdk.viewer),n.matrix=Cesium.Transforms.eastNorthUpToFixedFrame(n.center.clone()),n.localMatrix=Cesium.Matrix4.inverse(n.matrix,new Cesium.Matrix4),n.addFlat(),n}return Xi()(e,t),_()(e,[{key:"show",get:function(){return this.options.show},set:function(t){this.options.show=t;for(var e=0;e<za[this.tileset.id].length;e++)za[this.tileset.id][e].id==this.options.id&&(za[this.tileset.id][e].show=t);this.addFlat()}},{key:"height",get:function(){return this.options.height},set:function(t){this.options.height=Number(t);for(var e=0;e<za[this.tileset.id].length;e++)za[this.tileset.id][e].id==this.options.id&&(za[this.tileset.id][e].height=Number(t));this.addFlat()}},{key:"name",get:function(){return this.options.name},set:function(t){this.options.name=t;for(var e=0;e<za[this.tileset.id].length;e++)za[this.tileset.id][e].id==this.options.id&&(za[this.tileset.id][e].name=t)}},{key:"addFlat",value:function(){for(var t=this,e=[],i=0;i<za[this.tileset.id].length;i++){var n=za[this.tileset.id][i];if(n.show){for(var o=n.positions,s=n.height,a=[],r=0;r<o.length;r++)a.push(o[r].lng,o[r].lat);za[this.tileset.id][i].flatHeight=s-this.center84.alt;var l=this.cartesiansToLocal(Cesium.Cartesian3.fromDegreesArray(a));e.push(l)}}for(var c=this.getIsinPolygonFun(e),u="",p=function(){var i=e[h],n=i.length,o="";i.forEach((function(t,e){o+="points_".concat(n,"[").concat(e,"] = vec2(").concat(t[0],", ").concat(t[1],");\n")})),u+="\n ".concat(o,"\n if(isPointInPolygon_").concat(n,"(position2D)){\n vec4 tileset_local_position_transformed = vec4(tileset_local_position.x, tileset_local_position.y, ground_z + ").concat(za[t.tileset.id][h].flatHeight,", 1.0);\n vec4 model_local_position_transformed = czm_inverseModel * u_tileset_localToWorldMatrix * tileset_local_position_transformed;\n\n vsOutput.positionMC.xy = model_local_position_transformed.xy;\n vsOutput.positionMC.z = model_local_position_transformed.z+ modelMC.z*0.002;\n return;\n }")},h=0;h<e.length;h++)p();this.updateShader(c,u)}},{key:"remove",value:function(){var t=this;za[this.tileset.id]=za[this.tileset.id].filter((function(e){return e.id!=t.options.id}));for(var e=[],i=0;i<za[this.tileset.id].length;i++){var n=za[this.tileset.id][i];if(n.show){for(var o=n.positions,s=n.height,a=[],r=0;r<o.length;r++)a.push(o[r].lng,o[r].lat);za[this.tileset.id][i].flatHeight=s-this.center84.alt;var l=this.cartesiansToLocal(Cesium.Cartesian3.fromDegreesArray(a));e.push(l)}}for(var c=this.getIsinPolygonFun(e),u="",p=function(){var i=e[h],n=i.length,o="";i.forEach((function(t,e){o+="points_".concat(n,"[").concat(e,"] = vec2(").concat(t[0],", ").concat(t[1],");\n")})),u+="\n ".concat(o,"\n if(isPointInPolygon_").concat(n,"(position2D)){\n vec4 tileset_local_position_transformed = vec4(tileset_local_position.x, tileset_local_position.y, ground_z + ").concat(za[t.tileset.id][h].flatHeight,", 1.0);\n vec4 model_local_position_transformed = czm_inverseModel * u_tileset_localToWorldMatrix * tileset_local_position_transformed;\n vsOutput.positionMC.xy = model_local_position_transformed.xy;\n vsOutput.positionMC.z = model_local_position_transformed.z+ modelMC.z*0.002;\n return;\n }")},h=0;h<e.length;h++)p();this.updateShader(c,u)}},{key:"getIsinPolygonFun",value:function(t){var e=t.map((function(t){return t.length})),i=this.getUniqueArray(e),n="";return i.forEach((function(t){n+="\n vec2 points_".concat(t,"[").concat(t,"];\n bool isPointInPolygon_").concat(t,"(vec2 point){\n int nCross = 0; // 交点数\n const int n = ").concat(t,"; \n for(int i = 0; i < n; i++){\n vec2 p1 = points_").concat(t,"[i];\n vec2 p2 = points_").concat(t,"[int(mod(float(i+1),float(n)))];\n if(p1[1] == p2[1]){\n continue;\n }\n if(point[1] < min(p1[1], p2[1])){\n continue;\n }\n if(point[1] >= max(p1[1], p2[1])){\n continue;\n }\n float x = p1[0] + ((point[1] - p1[1]) * (p2[0] - p1[0])) / (p2[1] - p1[1]);\n if(x > point[0]){\n nCross++;\n }\n }\n return int(mod(float(nCross), float(2))) == 1;\n }\n ")})),n}},{key:"updateShader",value:function(t,e){var i=new Cesium.CustomShader({uniforms:{u_tileset_localToWorldMatrix:{type:Cesium.UniformType.MAT4,value:this.matrix},u_tileset_worldToLocalMatrix:{type:Cesium.UniformType.MAT4,value:this.localMatrix},u_flatHeight:{type:Cesium.UniformType.FLOAT,value:this.flatHeight}},vertexShaderText:"\n // 所有isPointInPolygon函数\n ".concat(t,"\n void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput){\n vec3 modelMC = vsInput.attributes.positionMC;\n vec4 model_local_position = vec4(modelMC.x, modelMC.y, modelMC.z, 1.0);\n vec4 tileset_local_position = u_tileset_worldToLocalMatrix * czm_model * model_local_position;\n vec2 position2D = vec2(tileset_local_position.x,tileset_local_position.y);\n float ground_z = 0.0;\n // 多个多边形区域\n ").concat(e,"\n }")});this.tileset.customShader=i,this.sdk.viewer.scene.requestRender()}},{key:"cartesiansToLocal",value:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],o=Cesium.Matrix4.multiplyByPoint(this.localMatrix,n.clone(),new Cesium.Cartesian3);e.push([o.x,o.y])}return e}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=22;break}if(e={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},i=this.options.customView.relativePosition.lng,n=this.options.customView.relativePosition.lat,o=this.options.customView.relativePosition.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),r={lng:0,lat:0},this.options.position?r=Fa({},this.options.position):this.options.positions?r=Fa({},this.options.positions[0]):this.options.line&&this.options.line.positions?r=Fa({},this.options.line.positions[0]):this.options.center?r=Fa({},this.options.center):this.options.start?r=Fa({},this.options.start):(this.options.hasOwnProperty("lng")&&(r.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(r.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(r.alt=this.options.alt)),r.hasOwnProperty("alt")){t.next=15;break}return t.next=14,this.getClampToHeight(r);case 14:r.alt=t.sent;case 15:i=this.options.customView.relativePosition.lng+r.lng,n=this.options.customView.relativePosition.lat+r.lat,o=this.options.customView.relativePosition.alt+r.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),this.sdk.viewer.camera.flyTo({destination:s,orientation:e}),t.next=26;break;case 22:for(l=[],c=0;c<this.options.positions.length;c++)u=Cesium.Cartesian3.fromDegrees(this.options.positions[c].lng,this.options.positions[c].lat,this.center84.alt),l.push(u.x,u.y,u.z);p=Cesium.BoundingSphere.fromVertices(l),this.sdk.viewer.camera.flyToBoundingSphere(p,{offset:{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 26:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"edit",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=23;break}return this.originalOptions=this.deepCopyObj(this.options),t.next=4,new W(this.sdk.viewer._container,{title:"压平面属性",left:"180px",top:"100px",removeCallBack:function(){r.Dialog.removeCallBack&&r.Dialog.removeCallBack()},closeCallBack:function(){r.reset(),r.Dialog.closeCallBack&&r.Dialog.closeCallBack()}});case 4:return this._DialogObject=t.sent,t.next=7,this._DialogObject.init();case 7:(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="width: 56px;flex: 0 0 56px;">名称</span>\n <input class="input input-name">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label" style="width: 56px;flex: 0 0 56px;">压平高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input flat-height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n ',this._DialogObject.contentAppChild(i),(n=i.getElementsByClassName("input-name")[0]).value=this.options.name,n.addEventListener("input",(function(){r.name=n.value})),(o=i.getElementsByClassName("flat-height")[0]).value=this.options.height,o.addEventListener("input",(function(){r.height=Number(o.value),r.addFlat()})),(s=document.createElement("button")).className="btn",s.innerHTML="确认",this._DialogObject.footAppChild(s),s.addEventListener("click",(function(){r.options.name||(r.options.name="压平面"),r.originalOptions=r.deepCopyObj(r.options),r._DialogObject.close(),r.Dialog.confirmCallBack&&r.Dialog.confirmCallBack(r.options)})),t.next=24;break;case 23:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 24:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"reset",value:function(){this.options=this.deepCopyObj(this.originalOptions),this.name=this.options.name,this.height=this.options.height,this.addFlat()}},{key:"flatEdit",value:function(t){if(t){for(var e=that.options.positions,i=[],n=0;n<e.length;n++)i.push(e[n].lng,e[n].lat,za[this.tileset.id]);that.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i)}}},{key:"flicker",value:function(){}}]);var i,n}(jn);function Va(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ga(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Va(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Va(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ua(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Wa=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{text:"左键开始,右键结束;"};return k()(this,e),(i=Ua(this,e,[t,n])).options=Ga({},n),i.event=new X(t),i.tip=new Z(n.text,t),i.viewer=t.viewer,i.defaultColor="rgba(246,49,49,0.55)",i.ids=[],YJ.Measure.Measures.push(i),i._isDestroy=!1,i}return Xi()(e,t),_()(e,[{key:"start",value:function(){this.setPickStatus(!1),YJ.Measure.SetMeasureStatus(!0)}},{key:"destroy",value:function(){var t=this;this._isDestroy=!0,this.end(),this.ids.forEach((function(e){t.remove_entity(e)}))}},{key:"end",value:function(){YJ.Measure.SetMeasureStatus(!1),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),this.tip=null,this.event=null}},{key:"create_point",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.randomString(),n=this.cartesian3Towgs84(t,this.viewer);return this.viewer.entities.add(new Cesium.Entity({id:i,position:Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt),billboard:{show:e,image:this.getSourceRootPath()+"/img/point.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}})),i}},{key:"remove_entity",value:function(t){this.viewer.entities.removeById(t)}}])}(ai);function Ya(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ja(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ja(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Ja(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function qa(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Xa(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Za=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=qa(this,e,[t,n])).options.color=i.options.color||"#00ffff",i.start_id="",i.end_id="",i.polyline_id="",i.clampPositions=[],i}return Xi()(e,t),_()(e,[{key:"clampToGroundMeasure",value:(r=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],this.ids.forEach((function(t,e){var i=d.viewer.entities.getById(t).position.getValue();n.push(d.cartesian3Towgs84(i,d.viewer))})),o=this.chunkLine(n,e),s=[],o.forEach((function(t,e){0===e?s=L()(t.geometry.coordinates):s.push(t.geometry.coordinates[1])})),r=s.length,l=Ya(s),t.prev=7,l.s();case 9:if((c=l.n()).done){t.next=18;break}return u=c.value,p=s.indexOf(u),t.next=14,this.getHeight({lng:u[0],lat:u[1],alt:0},p,r);case 14:h=t.sent,i(null,h);case 16:t.next=9;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(7),l.e(t.t0);case 23:return t.prev=23,l.f(),t.finish(23);case 26:case"end":return t.stop()}}),t,this,[[7,20,23,26]])}))),function(t,e){return r.apply(this,arguments)})},{key:"computeDisByTowPoint",value:(s=o()(a.a.mark((function t(i,n){var s,r,l,c,u=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=this.computeDistance2([i,n]),r=10,l=function(t){if(!u._isDestroy){var i=u.getLabel("贴地距离:"+Number(t).toFixed(2)+"米");i.pixelOffset=new Cesium.Cartesian2(0,-32),u.ids.push(e.create_point(Cesium.Cartesian3.fromDegrees(n.lng,n.lat,n.alt),{label:i},u))}},c=function(){var t=o()(a.a.mark((function t(e){var o,s,r,c,p,h,d,m,f,v;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=u.chunkLine([i,n],e),s=[],o.forEach((function(t,e){0===e?s=L()(t.geometry.coordinates):s.push(t.geometry.coordinates[1])})),r=[],c=Ya(s),t.prev=5,c.s();case 7:if((p=c.n()).done){t.next=16;break}return h=p.value,d=s.indexOf(h),t.next=12,u.sampleHeight({lng:h[0],lat:h[1],alt:0},d);case 12:m=t.sent,r.push(m);case 14:t.next=7;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(5),c.e(t.t0);case 21:return t.prev=21,c.f(),t.finish(21);case 24:f=0,v=r.length-1,r.forEach((function(t,e){if(e!==v){var i=u.computeDistance2([t.position,r[e+1].position]),n=Math.abs(t.position.alt-r[e+1].position.alt),o=Math.sqrt(i*i+n*n);f+=o}})),l(f);case 28:case"end":return t.stop()}}),t,null,[[5,18,21,24]])})));return function(e){return t.apply(this,arguments)}}(),!(s>20)){t.next=10;break}return r=s/20,t.next=8,c(r);case 8:t.next=17;break;case 10:if(!(s<1)){t.next=14;break}l(s),t.next=17;break;case 14:return r=1,t.next=17,c(r);case 17:case"end":return t.stop()}}),t,this)}))),function(t,e){return s.apply(this,arguments)})},{key:"sampleHeight",value:(n=o()(a.a.mark((function t(e,i){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sampleHeightMostDetailed([e]);case 2:return n=t.sent,e.alt=n[0].height,t.abrupt("return",{position:e,index:i});case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"getHeight",value:(i=o()(a.a.mark((function t(e,i,n){var o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sampleHeightMostDetailed([e]);case 2:if(o=t.sent,e.alt=o[0].height,this.clampPositions.push({position:e,index:i}),n!==this.clampPositions.length){t.next=8;break}return s=this.startCompute(),t.abrupt("return",{total:n,current:this.clampPositions.length,total_length:s});case 8:return t.abrupt("return",{total:n,current:this.clampPositions.length});case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return i.apply(this,arguments)})},{key:"startCompute",value:function(){var t=this;this.clampPositions.sort((function(t,e){return t.index<e.index}));var e=0,i=this.clampPositions.length-1;return this.clampPositions.forEach((function(n,o){if(o!==i){var s=t.computeDistance2([n.position,t.clampPositions[o+1].position]),a=Math.abs(n.position.alt-t.clampPositions[o+1].position.alt),r=Math.sqrt(s*s+a*a);e+=r}})),Number(e.toFixed(2))}},{key:"getLabel",value:function(t){return{text:t||"",font:"20px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#f1e605"),style:Cesium.LabelStyle.FILL_AND_OUTLINE,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}}},{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){Xa(e,"start",this,3)([]),this.positions=[],this.cachePositions=[];var i=function(){var i=o()(a.a.mark((function i(n,o){var s,r,l;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(0===t.ids.length&&(t.polyline_id=e.createPolyline(t),t.start_id=e.create_point(o,{image:"start1.png",width:30,height:38,label:t.getLabel("")},t)),t.tip.setPosition(o,n.position.x,n.position.y),t.positions=t.cachePositions.concat(o),0===t.ids.length){i.next=11;break}return s=t.cartesian3Towgs84(o,t.viewer),r=t.cartesian3Towgs84(t.cachePositions[t.cachePositions.length-1],t.viewer),t.cachePositions.push(o),i.next=9,t.computeDisByTowPoint(r,s);case 9:i.next=15;break;case 11:t.cachePositions.push(o),t.ids.push(e.create_point(o,{},t)),(l=t.viewer.entities.getById(t.ids[0]))&&(l.billboard.show=!1);case 15:case"end":return i.stop()}}),i)})));return function(t,e){return i.apply(this,arguments)}}(),n=function(i,n){if(t.cachePositions.length){t.positions=t.cachePositions,t.end_id=e.create_point(t.cachePositions[t.cachePositions.length-1],{image:"end1.png",width:30,height:38},t);var o=t.viewer.entities.getById(t.ids[t.ids.length-1]);o&&(o.billboard.show=!1)}t.cachePositions.length<2&&(t.destroy(),YJ.Measure.Measures.pop()),t.end()};this.event.mouse_left(i),this.event.mouse_move((function(e,i){t.tip.setPosition(i,e.endPosition.x,e.endPosition.y),t.positions=t.cachePositions.concat(i)})),this.event.mouse_right(n),this.event.gesture_pinck_start((function(e,o){var s=new Date,a={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-s>=500?n():i(a,o)}))}))}}},{key:"destroy",value:function(){var t=this;[this.polyline_id,this.end_id,this.start_id].concat(L()(this.ids)).forEach((function(e){t.remove_entity(e)})),Xa(e,"destroy",this,3)([])}},{key:"end",value:function(){Xa(e,"end",this,3)([])}}],[{key:"createPolyline",value:function(t){var e=t.randomString();return t.viewer.entities.add(new Cesium.Entity({id:e,polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions}),!1),clampToGround:!0,width:3,material:new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),dashLength:20}),zIndex:99999999}})),e}},{key:"create_point",value:function(t,e,i){var n=e.label,o=e.image,s=void 0===o?"point.png":o,a=e.width,r=e.height,l=i.randomString(),c=i.cartesian3Towgs84(t,i.viewer);return n&&(n.pixelOffset=new Cesium.Cartesian2(0,-(r||32))),i.viewer.entities.add(new Cesium.Entity({id:l,label:n,position:Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt),billboard:{image:i.getSourceRootPath()+"/img/"+s,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:a,height:r}})),l}}]);var i,n,s,r}(Wa);function Ka(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return $a(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function $a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Qa(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function tr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var er=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=Qa(this,e,[t,n])).options.color=i.options.color||"#00ffff",i.start_id="",i.end_id="",i.polyline_id="",i.clampPositions=[],i}return Xi()(e,t),_()(e,[{key:"clampToGroundMeasure",value:(s=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],this.ids.forEach((function(t,e){var i=d.viewer.entities.getById(t).position.getValue();n.push(d.cartesian3Towgs84(i,d.viewer))})),o=this.chunkLine(n,e),s=[],o.forEach((function(t,e){0===e?s=L()(t.geometry.coordinates):s.push(t.geometry.coordinates[1])})),r=s.length,l=Ka(s),t.prev=7,l.s();case 9:if((c=l.n()).done){t.next=18;break}return u=c.value,p=s.indexOf(u),t.next=14,this.getHeight({lng:u[0],lat:u[1],alt:0},p,r);case 14:h=t.sent,i(null,h);case 16:t.next=9;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(7),l.e(t.t0);case 23:return t.prev=23,l.f(),t.finish(23);case 26:case"end":return t.stop()}}),t,this,[[7,20,23,26]])}))),function(t,e){return s.apply(this,arguments)})},{key:"sampleHeight",value:(n=o()(a.a.mark((function t(e,i){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sampleHeightMostDetailed([e]);case 2:return n=t.sent,e.alt=n[0].height,t.abrupt("return",{position:e,index:i});case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"getHeight",value:(i=o()(a.a.mark((function t(e,i,n){var o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sampleHeightMostDetailed([e]);case 2:if(o=t.sent,e.alt=o[0].height,this.clampPositions.push({position:e,index:i}),n!==this.clampPositions.length){t.next=8;break}return s=this.startCompute(),t.abrupt("return",{total:n,current:this.clampPositions.length,total_length:s});case 8:return t.abrupt("return",{total:n,current:this.clampPositions.length});case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return i.apply(this,arguments)})},{key:"startCompute",value:function(){var t=this;this.clampPositions.sort((function(t,e){return t.index<e.index}));var e=0,i=this.clampPositions.length-1;return this.clampPositions.forEach((function(n,o){if(o!==i){var s=t.computeDistance2([n.position,t.clampPositions[o+1].position]),a=Math.abs(n.position.alt-t.clampPositions[o+1].position.alt),r=Math.sqrt(s*s+a*a);e+=r}})),Number(e.toFixed(2))}},{key:"getLabel",value:function(t){return{text:t||"",font:"20px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#f1e605"),style:Cesium.LabelStyle.FILL_AND_OUTLINE,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}}},{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){tr(e,"start",this,3)([]),this.positions=[],this.cachePositions=[];var i=function(){var i=o()(a.a.mark((function i(n,o){var s,r,l,c,u;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:0===t.ids.length&&(t.polyline_id=e.createPolyline(t),t.start_id=e.create_point(o,{image:"start1.png",width:30,height:38,label:t.getLabel("")},t)),t.positions=t.cachePositions.concat(o),t.tip.setPosition(o,n.position.x,n.position.y),0!==t.ids.length?(s=t.cartesian3Towgs84(o,t.viewer),r=t.cartesian3Towgs84(t.cachePositions[t.cachePositions.length-1],t.viewer),l=t.computeDistance2([s,r]),c="投影距离:"+l+" 米",t.ids.push(e.create_point(o,{label:t.getLabel(c)},t)),t.cachePositions.push(o)):(t.cachePositions.push(o),t.ids.push(e.create_point(o,{show:!1},t)),(u=t.viewer.entities.getById(t.ids[0]))&&(u.billboard.show=!1));case 4:case"end":return i.stop()}}),i)})));return function(t,e){return i.apply(this,arguments)}}(),n=function(i,n){if(t.cachePositions.length){t.positions=t.cachePositions,t.end_id=e.create_point(t.cachePositions[t.cachePositions.length-1],{image:"end1.png",width:30,height:38},t);var o=t.viewer.entities.getById(t.ids[t.ids.length-1]);o&&(o.billboard.show=!1)}t.cachePositions.length<2&&(t.destroy(),YJ.Measure.Measures.pop()),t.end()};this.event.mouse_left(i),this.event.mouse_move((function(e,i){if(t.tip.setPosition(i,e.endPosition.x,e.endPosition.y),t.positions=t.cachePositions.concat(i),t.cachePositions.length){var n=t.cartesian3Towgs84(i,t.viewer),o=t.cartesian3Towgs84(t.cachePositions[t.cachePositions.length-1],t.viewer),s="当前投影距离:"+t.computeDistance2([n,o])+" 米";t.tip.set_text(s)}})),this.event.mouse_right(n),this.event.mouse_right_keyboard_ctrl((function(e,i){t.cachePositions.length&&(t.cachePositions.pop(),t.remove_entity(t.ids.pop()))})),this.event.gesture_pinck_start((function(e,o){var s=new Date,a={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-s>=500?n():i(a,o)}))}))}}},{key:"destroy",value:function(){var t=this;[this.polyline_id,this.end_id,this.start_id].concat(L()(this.ids)).forEach((function(e){t.remove_entity(e)})),tr(e,"destroy",this,3)([])}},{key:"end",value:function(){tr(e,"end",this,3)([])}}],[{key:"createPolyline",value:function(t){var e=t.randomString();return t.viewer.entities.add(new Cesium.Entity({id:e,polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions}),!1),clampToGround:!0,width:3,material:new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),dashLength:20})},zIndex:99999999})),e}},{key:"create_point",value:function(t,e,i){var n=e.label,o=e.image,s=void 0===o?"point.png":o,a=e.width,r=e.height,l=i.randomString(),c=i.cartesian3Towgs84(t,i.viewer);return n&&(n.pixelOffset=new Cesium.Cartesian2(0,-(r||32))),i.viewer.entities.add(new Cesium.Entity({id:l,label:n,position:Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt),billboard:{image:i.getSourceRootPath()+"/img/"+s,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:a,height:r}})),l}}]);var i,n,s}(Wa);function ir(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return nr(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?nr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function nr(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function or(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function sr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var ar=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=or(this,e,[t,n])).options.color=i.options.color||"#00ffff",i.start_id="",i.end_id="",i.polyline_id="",i.clampPositions=[],i.event=new X(t),i}return Xi()(e,t),_()(e,[{key:"clampToGroundMeasure",value:(s=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],this.ids.forEach((function(t,e){var i=d.viewer.entities.getById(t).position.getValue();n.push(d.cartesian3Towgs84(i,d.viewer))})),o=this.chunkLine(n,e),s=[],o.forEach((function(t,e){0===e?s=L()(t.geometry.coordinates):s.push(t.geometry.coordinates[1])})),r=s.length,l=ir(s),t.prev=7,l.s();case 9:if((c=l.n()).done){t.next=18;break}return u=c.value,p=s.indexOf(u),t.next=14,this.getHeight({lng:u[0],lat:u[1],alt:0},p,r);case 14:h=t.sent,i(null,h);case 16:t.next=9;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(7),l.e(t.t0);case 23:return t.prev=23,l.f(),t.finish(23);case 26:case"end":return t.stop()}}),t,this,[[7,20,23,26]])}))),function(t,e){return s.apply(this,arguments)})},{key:"sampleHeight",value:(n=o()(a.a.mark((function t(e,i){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sampleHeightMostDetailed([e]);case 2:return n=t.sent,e.alt=n[0].height,t.abrupt("return",{position:e,index:i});case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"getHeight",value:(i=o()(a.a.mark((function t(e,i,n){var o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sampleHeightMostDetailed([e]);case 2:if(o=t.sent,e.alt=o[0].height,this.clampPositions.push({position:e,index:i}),n!==this.clampPositions.length){t.next=8;break}return s=this.startCompute(),t.abrupt("return",{total:n,current:this.clampPositions.length,total_length:s});case 8:return t.abrupt("return",{total:n,current:this.clampPositions.length});case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return i.apply(this,arguments)})},{key:"startCompute",value:function(){var t=this;this.clampPositions.sort((function(t,e){return t.index<e.index}));var e=0,i=this.clampPositions.length-1;return this.clampPositions.forEach((function(n,o){if(o!==i){var s=t.computeDistance2([n.position,t.clampPositions[o+1].position]),a=Math.abs(n.position.alt-t.clampPositions[o+1].position.alt),r=Math.sqrt(s*s+a*a);e+=r}})),Number(e.toFixed(2))}},{key:"getLabel",value:function(t){return{text:t||"",font:"20px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#f1e605"),style:Cesium.LabelStyle.FILL_AND_OUTLINE,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}}},{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){sr(e,"start",this,3)([]),this.positions=[],this.cachePositions=[];var i=function(i,n){if(0===t.ids.length&&(t.polyline_id=e.createPolyline(t),t.start_id=e.create_point(n,{image:"start1.png",width:30,height:38,label:t.getLabel("")},t)),t.tip.setPosition(n,i.position.x,i.position.y),t.positions=t.cachePositions.concat(n),0!==t.ids.length){var o=t.cartesian3Towgs84(n,t.viewer),s=t.cartesian3Towgs84(t.cachePositions[t.cachePositions.length-1],t.viewer);o.lng===s.lng&&o.lat===s.lat&&o.alt===s.alt||(t.cachePositions.push(n),t.computeAngle(s,o))}else{t.cachePositions.push(n),t.ids.push(e.create_point(n,{},t));var a=t.viewer.entities.getById(t.ids[0]);a&&(a.billboard.show=!1)}},n=function(i,n){if(0!==t.ids.length||t.ids.push(e.create_point(n,{},t)),t.cachePositions.length){t.positions=t.cachePositions,t.end_id=e.create_point(t.cachePositions[t.cachePositions.length-1],{image:"end1.png",width:30,height:38},t);var o=t.viewer.entities.getById(t.ids[t.ids.length-1]);o&&(o.billboard.show=!1)}t.cachePositions.length<2&&(t.destroy(),YJ.Measure.Measures.pop()),t.end()};this.event.mouse_left(i),this.event.mouse_move((function(e,i){e.endPosition.y+=2;var n=e.endPosition,o=t.viewer.scene.pickPosition(n);if(!o){var s=t.viewer.camera.getPickRay(n);o=t.viewer.scene.globe.pick(s,t.viewer.scene)}if(t.tip.setPosition(i,e.endPosition.x,e.endPosition.y),t.positions=t.cachePositions.concat(o),t.cachePositions.length){var a=t.cartesian3Towgs84(o,t.viewer),r=t.cartesian3Towgs84(t.cachePositions[t.cachePositions.length-1],t.viewer),l=t.computeDistance2([r,a]),c=Math.abs(r.alt-a.alt),u=l/Math.sqrt(l*l+c*c),p=Math.acos(u),h="坡度:"+t.radiansToDegrees(p).toFixed(2)+"°";t.tip.set_text(h)}})),this.event.mouse_right(n),this.event.mouse_right_keyboard_ctrl((function(e,i){t.cachePositions.length&&(t.cachePositions.pop(),t.remove_entity(t.ids.pop()))})),this.event.gesture_pinck_start((function(e,o){var s=new Date,a={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-s>=500?n(0,o):i(a,o)}))}))}}},{key:"computeAngle",value:function(t,i){var n=this.computeDistance2([t,i]),o=Math.abs(t.alt-i.alt),s=n/Math.sqrt(n*n+o*o),a=Math.acos(s),r=this.radiansToDegrees(a),l=this.getLabel("坡度:"+r.toFixed(2)+"°");l.pixelOffset=new Cesium.Cartesian2(0,-32),this.ids.push(e.create_point(Cesium.Cartesian3.fromDegrees(i.lng,i.lat,i.alt),{label:l},this))}},{key:"destroy",value:function(){var t=this;[this.polyline_id,this.end_id,this.start_id].concat(L()(this.ids)).forEach((function(e){t.remove_entity(e)})),sr(e,"destroy",this,3)([])}},{key:"end",value:function(){sr(e,"end",this,3)([])}}],[{key:"createPolyline",value:function(t){var e=t.randomString();return t.viewer.entities.add(new Cesium.Entity({id:e,polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions}),!1),clampToGround:!0,width:3,material:new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),dashLength:20}),zIndex:99999999}})),e}},{key:"create_point",value:function(t,e,i){var n=e.label,o=e.image,s=void 0===o?"point.png":o,a=e.width,r=e.height,l=i.randomString(),c=i.cartesian3Towgs84(t,i.viewer);return n&&(n.pixelOffset=new Cesium.Cartesian2(0,-(r||32))),i.viewer.entities.add(new Cesium.Entity({id:l,label:n,position:Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt),billboard:{image:i.getSourceRootPath()+"/img/"+s,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:a,height:r}})),l}}]);var i,n,s}(Wa);function rr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function lr(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?rr(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):rr(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function cr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function ur(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var pr=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=cr(this,e,[t,n])).options.lineColor="#ffdf53",i.polygon_id="",i}return Xi()(e,t),_()(e,[{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){ur(e,"start",this,3)([]),this.ids=[],this.positions=[],this.text="",this.center=new Cesium.Cartesian3,this.cachePositions=[];var i,n=0,o=0,s=function(s,a){0===t.ids.length&&(t.polygon_id=e.create_polygon(t)),t.cachePositions.push(lr({},a)),t.ids.push(t.create_point(lr({},a),!1));var r=t.cartesian3Towgs84(lr({},a),t.viewer);if(r.alt>n&&(n=r.alt),t.positions=t.cachePositions.concat(lr({},a)),t.tip.setPosition(lr({},a),s.position.x,s.position.y),t.positions.length>2){var l=[];t.positions.forEach((function(e){var i=t.cartesian3Towgs84(e,t.viewer);l.push({lng:i.lng,lat:i.lat})}));var c=t.computeCenter(l),u=t.computeArea(l);o=u,t.center=new Cesium.Cartesian3.fromDegrees(c.lng,c.lat,n),i=t.center,t.text="投影面积:"+u+" ㎡"}};this.event.mouse_left(s),this.event.mouse_move((function(e,i){if(t.tip.setPosition(lr({},i),e.endPosition.x,e.endPosition.y),t.positions=t.cachePositions.concat(lr({},i)),t.positions.length>2){var o=[];t.positions.forEach((function(e){var i=t.cartesian3Towgs84(e,t.viewer);o.push({lng:i.lng,lat:i.lat})}));var s=t.computeCenter(o),a=t.computeArea(o);t.center=new Cesium.Cartesian3.fromDegrees(s.lng,s.lat,n),t.text="投影面积:"+a+" ㎡"}})),this.event.mouse_right((function(e,n){if(t.positions=t.cachePositions,t.center=i,t.positions.length<3){t.text="";console.warn("面积计算至少需要三个坐标!"),window.ELEMENT&&window.ELEMENT.Message({message:"面积计算至少需要三个坐标!",type:"warning",duration:1500}),t.destroy()}else t.text="投影面积:"+o+" ㎡";t.end()})),this.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?(t.positions=t.cachePositions,t.end()):s(o,i)}))}))}}},{key:"destroy",value:function(){var t=this;[this.polygon_id].concat(L()(this.ids)).forEach((function(e){t.remove_entity(e)})),ur(e,"destroy",this,3)([])}},{key:"end",value:function(){ur(e,"end",this,3)([])}}],[{key:"create_polygon",value:function(t){var e=t.randomString();new Cesium.NearFarScalar(2e3,1,1e5,0),t.viewer.entities.add(new Cesium.Entity({id:e,label:{text:new Cesium.CallbackProperty((function(){return t.text}),!1),font:"20px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#ffffff"),style:Cesium.LabelStyle.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM},position:new Cesium.CallbackProperty((function(){return t.center}),!1),polygon:{classificationType:Cesium.ClassificationType.BOTH,hierarchy:new Cesium.CallbackProperty((function(e){return new Cesium.PolygonHierarchy(t.positions)}),!1),material:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),zIndex:99999999},polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions.length?t.positions.concat(t.positions[0]):t.positions}),!1),width:2,material:new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString(t.options.lineColor||t.defaultColor),dashLength:20}),clampToGround:!0,zIndex:99999999}}));return e}}])}(Wa);function hr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function dr(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?hr(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):hr(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function mr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function fr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var vr=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=mr(this,e,[t,n])).options.lineColor="#ffdf53",i.polygon_id="",i}return Xi()(e,t),_()(e,[{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){fr(e,"start",this,3)([]),this.ids=[],this.positions=[],this.text="",this.center=new Cesium.Cartesian3,this.cachePositions=[];var i=0,n=function(n,o){0===t.ids.length&&(t.polygon_id=e.create_polygon(t)),t.cachePositions.push(dr({},o)),t.ids.push(t.create_point(dr({},o),!1));var s=t.cartesian3Towgs84(dr({},o),t.viewer);s.alt>i&&(i=s.alt),t.positions=t.cachePositions.concat(dr({},o)),t.tip.setPosition(dr({},o),n.position.x,n.position.y)},o=function(e,n){if(t.positions=t.cachePositions,t.positions.length>2){var o=[];t.positions.forEach((function(e){var i=t.cartesian3Towgs84(e,t.viewer);o.push({lng:i.lng,lat:i.lat})})),setTimeout((function(){var e=t.computeCenter(o),n=t.computeSignedArea(t.viewer,o);t.center=new Cesium.Cartesian3.fromDegrees(e.lng,e.lat,i),t.text="贴地面积:"+n+" ㎡"}),0)}else{console.warn("面积计算至少需要三个坐标!"),window.ELEMENT&&window.ELEMENT.Message({message:"面积计算至少需要三个坐标!",type:"warning",duration:1500}),t.destroy()}t.end()};this.event.mouse_left(n),this.event.mouse_move((function(e,i){t.tip.setPosition(dr({},i),e.endPosition.x,e.endPosition.y),t.positions=t.cachePositions.concat(dr({},i))})),this.event.mouse_right(o),this.event.gesture_pinck_start((function(e,i){var s=new Date,a={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-s>=500?o():n(a,i)}))}))}}},{key:"destroy",value:function(){var t=this;[this.polygon_id].concat(L()(this.ids)).forEach((function(e){t.remove_entity(e)})),fr(e,"destroy",this,3)([])}},{key:"end",value:function(){fr(e,"end",this,3)([])}}],[{key:"create_polygon",value:function(t){var e=t.randomString();new Cesium.NearFarScalar(2e3,1,1e5,0),t.viewer.entities.add(new Cesium.Entity({id:e,label:{text:new Cesium.CallbackProperty((function(){return t.text}),!1),font:"20px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#ffffff"),style:Cesium.LabelStyle.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM},position:new Cesium.CallbackProperty((function(){return t.center}),!1),polygon:{classificationType:Cesium.ClassificationType.BOTH,hierarchy:new Cesium.CallbackProperty((function(e){return new Cesium.PolygonHierarchy(t.positions)}),!1),material:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),zIndex:99999999},polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions.length?t.positions.concat(t.positions[0]):t.positions}),!1),width:2,material:new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString(t.options.lineColor||t.defaultColor),dashLength:20}),clampToGround:!0,zIndex:99999999}}));return e}}])}(Wa);function gr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function yr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var br=function(t){function e(t){return k()(this,e),gr(this,e,[t])}return Xi()(e,t),_()(e,[{key:"cal_center",value:function(t){var e=this.cartesian3Towgs84(t[0],this.viewer),i=this.cartesian3Towgs84(t[1],this.viewer),n=this.computeCenter([e,i]);return Cesium.Cartesian3.fromDegrees(n.lng,n.lat,(e.alt+i.alt)/2)}},{key:"cal_distance",value:function(t){var e=this.cartesian3Towgs84(t[0],this.viewer),i=this.cartesian3Towgs84(t[1],this.viewer),n=this.computeDistance2([e,i]);return e.alt=e.alt.toFixed(2),i.alt=i.alt.toFixed(2),e.alt===i.alt?n:0===Number(n)?Math.abs(e.alt-i.alt).toFixed(2):Math.sqrt(n*n+Math.pow(Math.abs(e.alt-i.alt).toFixed(2),2)).toFixed(2)}},{key:"createPolyline",value:function(t){var e=this,i=this.id_map.get(t);this.viewer.entities.add(new Cesium.Entity({id:t,position:new Cesium.CallbackProperty((function(){return 2===i.positions.length?e.cal_center(i.positions):Cesium.Cartesian3()}),!1),label:{text:new Cesium.CallbackProperty((function(){return 2===i.positions.length?e.cal_distance(i.positions)+"米":"0米"}),!1),scale:1,fillColor:Cesium.Color.RED,font:"normal 20px MicroSoft YaHei",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,style:Cesium.LabelStyle.FILL_AND_OUTLINE,pixelOffset:new Cesium.Cartesian2(0,-10),disableDepthTestDistance:Number.POSITIVE_INFINITY},polyline:{positions:new Cesium.CallbackProperty((function(){return i.positions}),!1),width:2,material:Cesium.Color.YELLOW,zIndex:99999999}})),this.ids.push(t)}},{key:"create_angle_label",value:function(t,e,i,n){var o=this,s=new Cesium.Entity({id:i,position:new Cesium.CallbackProperty((function(){return 2===t.length?o.cal_point(t,e):Cesium.Cartesian3()})),label:{text:new Cesium.CallbackProperty((function(){return 2===t.length?o.cal_angle(t,e,n)+"°":"0°"}),!1),scale:1,fillColor:Cesium.Color.RED,font:"normal 20px MicroSoft YaHei",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,style:Cesium.LabelStyle.FILL_AND_OUTLINE,pixelOffset:new Cesium.Cartesian2(15,-10)}});this.viewer.entities.add(s)}},{key:"cal_point",value:function(t,e){for(var i=0;i<t.length;i++)for(var n=0;n<e.length;n++)if(t[i].x===e[n].x&&t[i].y===e[n].y&&t[i].z===e[n].z)return t[i]}},{key:"cal_angle",value:function(t,e,i){if(1===i)return 90;if(2===i||3===i){var n=this.id_map.get(t).positions,o=this.id_map.get(e).positions,s=this.cartesian3Towgs84(n[0],this.viewer),a=this.cartesian3Towgs84(n[1],this.viewer),r=this.computeDistance2([a,s]),l=this.cartesian3Towgs84(o[0],this.viewer),c=this.cartesian3Towgs84(o[1],this.viewer),u=this.computeDistance2([l,c]),p=Math.abs(l.alt-c.alt),h=Math.sqrt(Math.pow(p,2)+Math.pow(u,2));return 0==r&&(r=Math.abs(a.alt-s.alt)),(180*Math.acos(r/h)/Math.PI).toFixed(2)}}},{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){yr(e,"start",this,3)([]),this.positions=[],this.cachePositions=[];var i=this.randomString(),n=this.randomString(),o=this.randomString(),s=(this.randomString(),this.randomString(),this.randomString(),[]);this.id_map=new Map;var a={};this.id_map.set(o,{positions:[]}),this.id_map.set(i,{positions:[]}),this.id_map.set(n,{positions:[]});var r=function(e,r){if(s.push(r),0===t.ids.length&&(a=t.cartesian3Towgs84(r,t.viewer),t.createPolyline(i),t.createPolyline(n),t.createPolyline(o)),t.ids.push(t.create_point(r)),t.tip.setPosition(r,e.position.x,e.position.y),s.length){var l=t.cartesian3Towgs84(r,t.viewer),c=t.id_map.get(n),u=t.id_map.get(i);l.alt<a.alt?(c.positions[0]=r,c.positions[1]=Cesium.Cartesian3.fromDegrees(l.lng,l.lat,a.alt),u.positions[0]=Cesium.Cartesian3.fromDegrees(l.lng,l.lat,a.alt),u.positions[1]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)):(c.positions[0]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,l.alt),c.positions[1]=r,u.positions[0]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,l.alt),u.positions[1]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt))}2===s.length&&t.end()};this.event.mouse_left(r),this.event.mouse_move((function(e,r){t.tip.setPosition(r,e.endPosition.x,e.endPosition.y);var l=t.id_map.get(o);if(s.length){l.positions=s.concat(r);var c=t.cartesian3Towgs84(r,t.viewer),u=t.id_map.get(n),p=t.id_map.get(i);c.alt<a.alt?(u.positions[0]=r,u.positions[1]=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,a.alt),p.positions[0]=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,a.alt),p.positions[1]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)):(u.positions[0]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,c.alt),u.positions[1]=r,p.positions[0]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,c.alt),p.positions[1]=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt))}})),this.event.mouse_right((function(e,i){t.end()})),this.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?t.end():r(o,i)}))}))}}},{key:"end",value:function(){yr(e,"end",this,3)([])}},{key:"destroy",value:function(){yr(e,"destroy",this,3)([])}}])}(Wa);function Cr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function wr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var kr=function(t){function e(t){var i;return k()(this,e),(i=Cr(this,e,[t,{text:""}])).defaultColor="#f11515",i.locationID=i.randomString(),i.position=new Cesium.Cartesian3,i.text="",i}return Xi()(e,t),_()(e,[{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){wr(e,"start",this,3)([]),this.cache_id=e.create_point(this),e.createLocation(this);var i=function(e,i){t.position=i;var n=t.viewer.entities.getById(t.locationID);n&&(n.show=!0);var o=t.cartesian3Towgs84(i,t.viewer),s=Qe();if("EPSG:4326"===s)t.text="经度:".concat(Number(o.lng.toFixed(8)),"\n纬度:").concat(Number(o.lat.toFixed(8)),"\n海拔:").concat(Number(o.alt.toFixed(2)));else{var a=t.convert([{x:o.lng,y:o.lat,z:o.alt}],"EPSG:4326",s);t.text="x:".concat(Number(a.points[0].x.toFixed(8)),"\ny:").concat(Number(a.points[0].y.toFixed(8)),"\nz:").concat(Number(a.points[0].z.toFixed(2)))}t.end()};this.event.mouse_left(i),this.event.mouse_right((function(e,i){t.destroy(),t.end()})),this.event.mouse_move((function(e,i){t.tip.setPosition(i,e.endPosition.x,e.endPosition.y);var n=t.viewer.entities.getById(t.locationID);n&&(n.show=!0),t.position=i;var o=t.cartesian3Towgs84(i,t.viewer),s=Qe();if("EPSG:4326"===s)t.text="经度:".concat(Number(o.lng.toFixed(8)),"\n纬度:").concat(Number(o.lat.toFixed(8)),"\n海拔:").concat(Number(o.alt.toFixed(2)));else{var a=t.convert([{x:o.lng,y:o.lat,z:o.alt}],"EPSG:4326",s);t.text="x:".concat(Number(a.points[0].x.toFixed(8)),"\ny:").concat(Number(a.points[0].y.toFixed(8)),"\nz:").concat(Number(a.points[0].z.toFixed(2)))}})),this.event.gesture_pinck_start((function(e,n){var o=new Date;e.position1.x,e.position2.x,e.position1.y,e.position2.y;t.event.gesture_pinck_end((function(){new Date-o>=500?(t.destroy(),t.end()):i(0,n)}))}))}}},{key:"destroy",value:function(){this.remove_entity(this.locationID),this.remove_entity(this.cache_id),wr(e,"destroy",this,3)([])}},{key:"end",value:function(){wr(e,"end",this,3)([])}}],[{key:"createLocation",value:function(t){t.viewer.entities.add(new Cesium.Entity({id:t.locationID,show:!1,position:new Cesium.CallbackProperty((function(){return t.position}),!1),label:{text:new Cesium.CallbackProperty((function(){return t.text}),!1),font:"22px Microsoft YaHei",fillColor:new Cesium.Color.fromCssColorString(t.defaultColor),style:Cesium.LabelStyle.FILL_AND_OUTLINE,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,pixelOffset:new Cesium.Cartesian2(-100,-50)},billboard:{image:t.getSourceRootPath()+"/img/location.png",color:Cesium.Color.fromCssColorString("rgba(255,255,255,0.99)"),disableDepthTestDistance:Number.POSITIVE_INFINITY,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,width:48,height:48}}))}},{key:"create_point",value:function(t){var e=t.randomString();return t.viewer.entities.add(new Cesium.Entity({id:e,position:new Cesium.CallbackProperty((function(){return t.position}),!1),billboard:C()({image:t.getSourceRootPath()+"/img/point.png",color:Cesium.Color.fromCssColorString("rgba(255,255,255,0.99)"),verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY},"color",Cesium.Color.WHITE.withAlpha(.99))})),e}}])}(Wa);function xr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function _r(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Er=function(t){function e(t){return k()(this,e),xr(this,e,[t,{text:"左键开始,右键取消"}])}return Xi()(e,t),_()(e,[{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){_r(e,"start",this,3)([]),this.positions=[],this.position=new Cesium.Cartesian3,this.height=0,this.text="",this.circleRadius=0;var i=0;this.firstpoint=null;var n=function(n,o){if(null===t.firstpoint&&(t.positions.push(o),t.firstpoint=t.cartesian3Towgs84(o,t.viewer),t.ids.push(e.create_polygon(t)),t.ids.push(e.create_point(t,o))),i++,t.tip.setPosition(o,n.position.x,n.position.y),2===i){if(t.firstpoint){var s=t.cartesian3Towgs84(o,t.viewer);t.positions[1]=Cesium.Cartesian3.fromDegrees(t.firstpoint.lng,t.firstpoint.lat,s.alt),t.positions[2]=o,t.position=t.positions[1],t.circleRadius=t.computeDistance2([t.firstpoint,s]),t.height=Number((s.alt-t.firstpoint.alt).toFixed(2)),t.text="相对高度:"+t.height+" 米",t.tip.set_text("左键完成,右键取消;半径:"+t.circleRadius+" 米")}t.ids.push(e.create_point(t,o,{label:{text:"半径:"+t.circleRadius+" 米"}})),t.end()}};this.event.mouse_left(n),this.event.mouse_move((function(e,i){if(t.tip.setPosition(i,e.endPosition.x,e.endPosition.y),t.firstpoint){var n=t.cartesian3Towgs84(i,t.viewer);t.positions[1]=Cesium.Cartesian3.fromDegrees(t.firstpoint.lng,t.firstpoint.lat,n.alt),t.positions[2]=i,t.position=t.positions[1],t.circleRadius=t.computeDistance2([t.firstpoint,n]),t.height=Number((n.alt-t.firstpoint.alt).toFixed(2)),t.text="相对高度:"+t.height+" 米",t.tip.set_text("左键完成,右键取消;半径:"+t.circleRadius+" 米")}})),this.event.mouse_right((function(e,i){t.end(),t.destroy()})),this.event.gesture_pinck_start((function(e,i){var o=new Date,s={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-o>=500?(t.end(),t.destroy()):n(s,i)}))}))}}},{key:"end",value:function(){_r(e,"end",this,3)([])}},{key:"destroy",value:function(){_r(e,"destroy",this,3)([])}}],[{key:"create_polygon",value:function(t){var e=t.randomString();t.viewer.entities.add(new Cesium.Entity({id:e,billboard:{image:t.getSourceRootPath()+"/img/point.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)},position:new Cesium.CallbackProperty((function(){return t.position}),!1),label:{text:new Cesium.CallbackProperty((function(){return t.text}),!1),scale:1,font:"normal 20px MicroSoft YaHei",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,style:Cesium.LabelStyle.FILL_AND_OUTLINE,pixelOffset:new Cesium.Cartesian2(0,-15),disableDepthTestDistance:Number.POSITIVE_INFINITY},polyline:{positions:new Cesium.CallbackProperty((function(e){return t.positions}),!1),width:2,material:Cesium.Color.YELLOW,zIndex:99999999},ellipse:{height:new Cesium.CallbackProperty((function(){return t.height+t.firstpoint.alt}),!1),semiMinorAxis:new Cesium.CallbackProperty((function(e){return t.circleRadius}),!1),semiMajorAxis:new Cesium.CallbackProperty((function(e){return t.circleRadius}),!1),material:new Cesium.Color.fromCssColorString(t.defaultColor)}}));return e}},{key:"create_point",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.randomString(),o=t.cartesian3Towgs84(e,t.viewer),s={id:n,position:Cesium.Cartesian3.fromDegrees(o.lng,o.lat,o.alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}};return i.label&&(s.label={text:i.label.text,scale:1,font:"normal 20px MicroSoft YaHei",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,style:Cesium.LabelStyle.FILL_AND_OUTLINE,pixelOffset:new Cesium.Cartesian2(0,-15)}),t.viewer.entities.add(new Cesium.Entity(s)),n}}])}(Wa);function Sr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Dr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Mr=function(t){function e(t){var i;return k()(this,e),(i=Sr(this,e,[t,{text:"左键开始,右键取消"}])).cachePositions=[],i.positions=[],i.arcPositions=[],i.line_id="",i.label_id="",i.arc_id="",i.bearing=0,i}return Xi()(e,t),_()(e,[{key:"createPolyline",value:function(){var t=this,e=t.randomString();return t.viewer.entities.add(new Cesium.Entity({id:e,polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions}),!1),clampToGround:!0,width:5,material:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),zIndex:99999999}})),e}},{key:"end",value:function(){Dr(e,"end",this,3)([])}},{key:"destroy",value:function(){var t=this;Dr(e,"destroy",this,3)([]),[this.line_id,this.label_id,this.arc_id].forEach((function(e){e&&t.remove_entity(e)}))}},{key:"cancel",value:function(){this.end(),this.destroy()}},{key:"caculateAngle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.cartesian3Towgs84(t[0],this.viewer),i=this.cartesian3Towgs84(t[1],this.viewer),n=this.cartesian3Towgs84(t[2],this.viewer),o=turf.point([e.lng,e.lat]),s=turf.point([i.lng,i.lat]),a=turf.point([n.lng,n.lat]),r={units:"kilometers"},l=turf.rhumbDistance(o,s,r),c=turf.rhumbDistance(a,s,r),u=l;l>c&&(u=c);var p=turf.rhumbBearing(o,s),h=turf.rhumbBearing(a,s),d=Math.abs((p-h+360)%360);this.bearing=d>180?360-d:d,this.bearing=this.bearing.toFixed(2);var m=p-180,f=h-180,v=turf.lineArc(s,u/3,f,m);d>180&&(v=turf.lineArc(s,u/3,m,f));for(var g=[],y=0;y<v.geometry.coordinates.length;y++)g.push(Cesium.Cartesian3.fromDegrees(v.geometry.coordinates[y][0],v.geometry.coordinates[y][1]));this.arcPositions=g}},{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){Dr(e,"start",this,3)([]);var i=function(e,i){if(0===t.ids.length&&(t.line_id=t.createPolyline()),t.ids.push(t.create_point(i)),t.tip.setPosition(i,e.position.x,e.position.y),t.cachePositions.push(i),t.cachePositions.length&&(t.positions=t.cachePositions.concat(i)),2===t.ids.length){t.label_id=Cesium.createGuid(),t.arc_id=Cesium.createGuid();var n=t.cartesian3Towgs84(i,t.viewer);t.sampleHeightMostDetailed([n]).then((function(e){t.viewer.entities.add({id:t.arc_id,polyline:{positions:new Cesium.CallbackProperty((function(){return t.arcPositions}),!1),clampToGround:!0,width:5,material:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),zIndex:99999999}}),t.viewer.entities.add({id:t.label_id,position:Cesium.Cartesian3.fromDegrees(n.lng,n.lat,(e[0].height||0)+.1),label:{text:new Cesium.CallbackProperty((function(){return"夹角:"+t.bearing+"°"}),!1),font:"20px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#f1e605"),style:Cesium.LabelStyle.FILL_AND_OUTLINE,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}})}))}3===t.ids.length&&(t.caculateAngle([t.positions[0],t.positions[1],t.positions[2]]),t.end())};this.event.mouse_left(i),this.event.mouse_move((function(e,i){t.tip.setPosition(i,e.endPosition.x,e.endPosition.y),t.cachePositions.length&&(t.positions=t.cachePositions.concat(i)),t.positions.length>2&&t.caculateAngle([t.positions[0],t.positions[1],t.positions[2]])})),this.event.mouse_right((function(e,i){t.cancel()})),this.event.gesture_pinck_start((function(e,n){var o=new Date,s={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-o>=500?t.cancel():i(s,n)}))}))}}}])}(Wa);function Pr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Or(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Tr=function(t){function e(t){var i;return k()(this,e),(i=Pr(this,e,[t,{text:"左键开始,右键取消"}])).cachePositions=[],i.positions=[],i.arcPositions=[],i.line_id="",i.label_id="",i.arc_id="",i.bearing=0,i}return Xi()(e,t),_()(e,[{key:"createPolyline",value:function(){var t=this,e=t.randomString();return t.viewer.entities.add(new Cesium.Entity({id:e,polyline:{positions:new Cesium.CallbackProperty((function(){return t.positions}),!1),clampToGround:!0,width:5,material:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),zIndex:99999999}})),e}},{key:"end",value:function(){Or(e,"end",this,3)([])}},{key:"destroy",value:function(){var t=this;Or(e,"destroy",this,3)([]),[this.line_id,this.label_id,this.arc_id].forEach((function(e){e&&t.remove_entity(e)}))}},{key:"cancel",value:function(){this.end(),this.destroy()}},{key:"caculateAngle",value:function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=this.cartesian3Towgs84(t[1],this.viewer),i=this.cartesian3Towgs84(t[0],this.viewer),n=turf.point([e.lng,e.lat]),o=turf.point([i.lng,i.lat]),s=this.rhumbBearing(i,e);this.bearing=(180+s).toFixed(2);for(var a=turf.rhumbDistance(n,o,{units:"kilometers"}),r=turf.lineArc(n,a/3,0,this.bearing),l=[],c=0;c<r.geometry.coordinates.length;c++)l.push(Cesium.Cartesian3.fromDegrees(r.geometry.coordinates[c][0],r.geometry.coordinates[c][1]));this.arcPositions=l}},{key:"start",value:function(){var t=this;if(!YJ.Measure.GetMeasureStatus()){Or(e,"start",this,3)([]);var i=function(){var e=o()(a.a.mark((function e(i,n){var o,s,r,l,c,u,p,h,d,m;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===t.ids.length&&(t.line_id=t.createPolyline()),t.tip.setPosition(n,i.position.x,i.position.y),t.cachePositions.length&&(t.positions=t.cachePositions.concat(n),s=t.cartesian3Towgs84(n,t.viewer),r=t.cartesian3Towgs84(t.positions[1],t.viewer),l=turf.point([r.lng,r.lat]),c=turf.point([s.lng,s.lat]),u={units:"kilometers"},p=turf.rhumbDistance(l,c,u),0,h=turf.destination(l,p,0,u),t.positions[0]=(o=Cesium.Cartesian3).fromDegrees.apply(o,L()(h.geometry.coordinates))),t.cachePositions.push(n),t.cachePositions.push(n),t.positions.length>2&&t.caculateAngle([t.positions[0],t.positions[1]],[t.positions[2],t.positions[1]]),!(t.ids.length>=2)){e.next=9;break}return t.end(),e.abrupt("return");case 9:if(t.ids.push(t.create_point(n)),t.ids.push(t.create_point(n)),2!==t.ids.length){e.next=20;break}return t.label_id=Cesium.createGuid(),t.arc_id=Cesium.createGuid(),d=t.cartesian3Towgs84(n,t.viewer),e.next=17,t.sampleHeightMostDetailed([d]);case 17:m=e.sent,t.viewer.entities.add({id:t.arc_id,polyline:{positions:new Cesium.CallbackProperty((function(){return t.arcPositions}),!1),clampToGround:!0,width:5,material:new Cesium.Color.fromCssColorString(t.options.color||t.defaultColor),zIndex:99999999}}),t.viewer.entities.add({id:t.label_id,position:Cesium.Cartesian3.fromDegrees(d.lng,d.lat,(m[0].height||0)+.1),label:{text:new Cesium.CallbackProperty((function(){return"方位夹角:"+t.bearing+"°"}),!1),font:"20px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#f1e605"),style:Cesium.LabelStyle.FILL_AND_OUTLINE,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}});case 20:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}();this.event.mouse_left(i),this.event.mouse_move((function(e,i){if(t.tip.setPosition(i,e.endPosition.x,e.endPosition.y),t.cachePositions.length){var n;t.positions=t.cachePositions.concat(i);var o=t.cartesian3Towgs84(i,t.viewer),s=t.cartesian3Towgs84(t.positions[1],t.viewer),a=turf.point([s.lng,s.lat]),r=turf.point([o.lng,o.lat]),l={units:"kilometers"},c=turf.rhumbDistance(a,r,l),u=turf.destination(a,c,0,l);t.positions[0]=(n=Cesium.Cartesian3).fromDegrees.apply(n,L()(u.geometry.coordinates))}t.positions.length>2&&t.caculateAngle([t.positions[0],t.positions[1]],[t.positions[2],t.positions[1]])})),this.event.mouse_right((function(e,i){t.cancel()})),this.event.gesture_pinck_start((function(e,n){var o=new Date,s={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-o>=500?t.cancel():i(s,n)}))}))}}}])}(Wa);function Nr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Br=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,e),(i=Nr(this,e,[t,n])).options.curve=n.curve||!1;var o=Number(n.number);return isNaN(o)?i.options.number=1/0:i.options.number=o<2?2:o,i}return Xi()(e,t),_()(e,[{key:"smoothHandle",value:function(t){if(t.length>1){for(var e=[],i=[],n=0;n<t.length;n++)i.push(n/(t.length-1));for(var o=new Cesium.CatmullRomSpline({times:i,points:t}),s=20*t.length,a=0;a<=s;a++){var r=o.evaluate(a/s);e.push(r)}return e}return t}},{key:"start",value:function(t){var i,n,o,s,a,r=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var l;(i=e,n="start",o=this,s=3,a=Ks()(Ji()(1&s?i.prototype:i),n,o),2&s&&"function"==typeof a?function(t){return a.apply(o,t)}:a)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键结束;CTRL+右键撤销",this.sdk),this.event=new X(this.sdk),this.positions=[],this.points_ids=[];var c=[];this.event.mouse_left((function(i,n){if("2D"!==l){if(l="3D",r.positions=c.concat(n),r.tip.setPosition(n,i.position.x,i.position.y),!r.entityHasCreated){var o=e.create_polyline(r,r.viewer);r.points_ids.push(o)}if(c.push(n),r.points_ids.push(r.create_point(n,r.viewer)),c.length>=r.options.number){var s,a=[];if(c.forEach((function(t){a.push(r.cartesian3Towgs84(t,r.viewer))})),r.options.curve){var u=r.smoothHandle(c);s=[];for(var p=0;p<u.length;p++)s[p]=r.cartesian3Towgs84(u[p],r.viewer)}t(null,a,s),r.end()}}})),this.event.mouse_right((function(e,i){if("2D"!==l){var n,o=[];if(c.forEach((function(t){o.push(r.cartesian3Towgs84(t,r.viewer))})),r.options.curve){var s=r.smoothHandle(c);n=[];for(var a=0;a<s.length;a++)n[a]=r.cartesian3Towgs84(s[a],r.viewer)}t(null,o,n),r.end()}})),this.event.mouse_move((function(t,e){"2D"!==l&&(r.positions=c.concat(e),r.tip.setPosition(e,t.endPosition.x,t.endPosition.y))})),this.event.mouse_right_keyboard_ctrl((function(t,e){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event.gesture_pinck_start_keyboard_ctrl((function(){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),r.positions=c.concat(cartesian))})),this.event.gesture_pinck_start((function(i,n){if("2D"!==l){var o=new Date;r.event.gesture_pinck_end((function(){if(new Date-o>=500){var s,a=[];if(c.forEach((function(t){a.push(r.cartesian3Towgs84(t,r.viewer))})),r.options.curve){var l=r.smoothHandle(c);s=[];for(var u=0;u<l.length;u++)s[u]=r.cartesian3Towgs84(l[u],r.viewer)}t(null,a,s),r.end()}else{if(r.tip.setPosition(n,(i.position1.x+i.position2.x)/2,(i.position1.y+i.position2.y)/2),!r.entityHasCreated){var p=e.create_polyline(r,r.viewer);r.points_ids.push(p)}c.push(n),r.points_ids.push(r.create_point(n,r.viewer)),r.positions=c.concat(n)}}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(t,i){if("3D"!==l){if(l="2D",r.positions=c.concat(i),r.tip.setPosition(i,t.position.x+r.viewer.canvas.width,t.position.y),!r.entityHasCreated){var n=e.create_polyline(r,r._sdk2D.viewer);r.points_ids.push(n)}c.push(i),r.points_ids.push(r.create_point(i,r._sdk2D.viewer))}})),this.event2D.mouse_right((function(e,i){if("3D"!==l){var n,o=[];if(c.forEach((function(t){o.push(r.cartesian3Towgs84(t,r.viewer))})),r.options.curve){var s=r.smoothHandle(c);n=[];for(var a=0;a<s.length;a++)n[a]=r.cartesian3Towgs84(s[a],r.viewer)}t(null,o,n),r.end()}})),this.event2D.mouse_move((function(t,e){"3D"!==l&&(r.positions=c.concat(e),r.tip.setPosition(e,t.endPosition.x+r.viewer.canvas.width,t.endPosition.y))})),this.event2D.mouse_right_keyboard_ctrl((function(t,e){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event2D.gesture_pinck_start_keyboard_ctrl((function(){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),r.positions=c.concat(cartesian))})),this.event2D.gesture_pinck_start((function(i,n){if("3D"!==l){var o=new Date;r.event2D.gesture_pinck_end((function(){if(new Date-o>=500){var s,a=[];if(c.forEach((function(t){a.push(r.cartesian3Towgs84(t,r.viewer))})),r.options.curve){var l=r.smoothHandle(c);s=[];for(var u=0;u<l.length;u++)s[u]=r.cartesian3Towgs84(l[u],r.viewer)}t(null,a,s),r.end()}else{if(r.tip.setPosition(n,(i.position1.x+i.position2.x)/2+r.viewer.canvas.width,(i.position1.y+i.position2.y)/2),!r.entityHasCreated){var p=e.create_polyline(r,r._sdk2D.viewer);r.points_ids.push(p)}c.push(n),r.points_ids.push(r.create_point(n,r._sdk2D.viewer)),r.positions=c.concat(n)}}))}})))}}}],[{key:"create_polyline",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.viewer;t.entityHasCreated=!0;var i=t.randomString();return e.entities.add(new Cesium.Entity({id:i,polyline:{positions:new Cesium.CallbackProperty((function(){return t.options.curve?t.smoothHandle(t.positions):t.positions}),!1),width:5,material:Cesium.Color.fromCssColorString(t.color),clampToGround:!0,zIndex:99999999}})),i}}])}(Qs);function Lr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Ar=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return k()(this,e),Lr(this,e,[t,i,n])}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var e=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var i=void 0;YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键结束;",this.sdk),this.event=new X(this.sdk),this.event.mouse_left((function(n,o){e.end();var s=e.cartesian3Towgs84(i||o,e.viewer);t(null,s,Cesium)})),this.event.mouse_right((function(i,n){e.end(),t(!1)})),this.event.mouse_move((function(t,n){i=n,e.tip.setPosition(n,t.endPosition.x,t.endPosition.y)})),this.event.gesture_pinck_start((function(n,o){var s=new Date;e.event.gesture_pinck_end((function(){if(new Date-s>=500)e.end(),t(!1);else{e.end();var n=e.cartesian3Towgs84(i||o,e.viewer);t(null,n)}}))})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(n,o){e.end();var s=e.cartesian3Towgs84(i||o,e.viewer);t(null,s,Cesium)})),this.event2D.mouse_right((function(i,n){e.end(),t(!1)})),this.event2D.mouse_move((function(t,n){i=n,e.tip.setPosition(n,t.endPosition.x+e.viewer.canvas.width,t.endPosition.y)})),this.event2D.gesture_pinck_start((function(n,o){var s=new Date;e.event2D.gesture_pinck_end((function(){if(new Date-s>=500)e.end(),t(!1);else{e.end();var n=e.cartesian3Towgs84(i||o,e.viewer);t(null,n)}}))})))}}},{key:"end",value:function(){YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy(),this.tip&&this.tip.destroy()}}])}(Qs);function jr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Ir=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),jr(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i,n,o,s,a,r=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var l,c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.viewer;t.entities.add(new Cesium.Entity({id:g.circle_id,position:new Cesium.CallbackProperty((function(t){if(v){var e=g.computeMidpoint(f,v);return Cesium.Cartesian3.fromDegrees(e.lng,e.lat,v.alt)}return Cesium.Cartesian3()}),!1),label:{text:new Cesium.CallbackProperty((function(t){return d>1e3?"半径:"+(d/1e3).toFixed(2)+" 公里":"半径:"+d+" 米"}),!1),font:"20px Microsoft YaHei",distanceDisplayCondition:1e7,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,fillColor:Cesium.Color.fromCssColorString("#f5ce0a"),style:Cesium.LabelStyle.FILL_AND_OUTLINE},polygon:{classificationType:Cesium.ClassificationType.BOTH,hierarchy:new Cesium.CallbackProperty((function(t){return new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(m))}),!1),material:Cesium.Color.fromCssColorString(g.color),zIndex:99999999},polyline:{positions:new Cesium.CallbackProperty((function(t){return p}),!1),width:2,material:Cesium.Color.fromCssColorString("#c1c505").withAlpha(.5),clampToGround:!0,zIndex:99999999}}))};(i=e,n="start",o=this,s=3,a=Ks()(Ji()(1&s?i.prototype:i),n,o),2&s&&"function"==typeof a?function(t){return a.apply(o,t)}:a)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键开始,右键取消",this.sdk),this.event=new X(this.sdk);var u=0;this.circle_id=this.randomString();var p=[],h=[],d=1,m=[],f={},v=null;this.event.mouse_left((function(e,i){"2D"!==l&&(l="3D",r.tip.set_text("再次左键,完成绘制;右键取消"),1===++u&&(r.point_id=r.create_point(i),f=r.cartesian3Towgs84(i,r.viewer),m=r.createCircle(f,.01),h.push(i),c()),2===u&&(p=h.concat(i),v=r.cartesian3Towgs84(i,r.viewer),d=r.computeDistance2([f,v]),m=r.createCircle(f,d),r.end(),t(null,{center:f,radius:Number(d)})))})),this.event.mouse_right((function(e,i){"2D"!==l&&(r.end(),t(!1))})),this.event.mouse_move((function(t,e){"2D"!==l&&(r.tip.setPosition(e,t.endPosition.x,t.endPosition.y),u&&(p=h.concat(e),v=r.cartesian3Towgs84(e,r.viewer),d=r.computeDistance2([f,v]),m=r.createCircle(f,d)))})),this.event.gesture_pinck_start((function(e,i){if("2D"!==l){var n=new Date;r.event.gesture_pinck_end((function(){new Date-n>=500?(r.end(),t(!1)):(r.tip.set_text("再次左键,完成绘制;右键取消"),1===++u&&(r.point_id=r.create_point(i),f=r.cartesian3Towgs84(i,r.viewer),h.push(i),c(),r.tip.setPosition(i,(e.position1.x+e.position2.x)/2,(e.position1.y+e.position2.y)/2)),2===u&&(p=h.concat(i),v=r.cartesian3Towgs84(i,r.viewer),d=r.computeDistance2([f,v]),m=r.createCircle(f,d),r.end(),t(null,{center:f,radius:Number(d)})))}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(e,i){"3D"!==l&&(l="2D",r.tip.set_text("再次左键,完成绘制;右键取消"),1===++u&&(r.point_id=r.create_point(i,r._sdk2D.viewer),f=r.cartesian3Towgs84(i,r.viewer),m=r.createCircle(f,.01),h.push(i),c(r._sdk2D.viewer)),2===u&&(p=h.concat(i),v=r.cartesian3Towgs84(i,r.viewer),d=r.computeDistance2([f,v]),m=r.createCircle(f,d),r.end(),t(null,{center:f,radius:Number(d)})))})),this.event2D.mouse_right((function(e,i){"3D"!==l&&(r.end(),t(!1))})),this.event2D.mouse_move((function(t,e){"3D"!==l&&(r.tip.setPosition(e,t.endPosition.x+r.viewer.canvas.width,t.endPosition.y),u&&(p=h.concat(e),v=r.cartesian3Towgs84(e,r.viewer),d=r.computeDistance2([f,v]),m=r.createCircle(f,d)))})),this.event2D.gesture_pinck_start((function(e,i){if("3D"!==l){var n=new Date;r.event2D.gesture_pinck_end((function(){new Date-n>=500?(r.end(),t(!1)):(r.tip.set_text("再次左键,完成绘制;右键取消"),1===++u&&(r.point_id=r.create_point(i,r._sdk2D.viewer),f=r.cartesian3Towgs84(i,r.viewer),h.push(i),c(r._sdk2D.viewer),r.tip.setPosition(i,(e.position1.x+e.position2.x)/2+r.viewer.canvas.width,(e.position1.y+e.position2.y)/2)),2===u&&(p=h.concat(i),v=r.cartesian3Towgs84(i,r.viewer),d=r.computeDistance2([f,v]),m=r.createCircle(f,d),r.end(),t(null,{center:f,radius:Number(d)})))}))}})));var g=this}}},{key:"end",value:function(){this.remove_entity(this.circle_id),this.remove_entity(this.point_id),YJ.Measure.SetMeasureStatus(!1),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy()}}])}(Qs);function Fr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Rr=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),Fr(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i,n,o,s,a,r=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var l,c=function(){var t=Cesium.Cartesian3.fromDegrees(m[0].lng,m[0].lat),e=Cesium.Cartesian3.fromDegrees(m[1].lng,m[1].lat),i=Cesium.Cartesian3.fromDegrees(m[2].lng,m[2].lat);if(1===p){g=Cesium.Cartesian3.distance(t,e),f=(v=g)/2;var n={x:h.lng,y:h.lat},o={x:m[1].lng,y:m[1].lat},s=Math.PI/180,a=n.y*s,r=o.y*s,l=n.x*s,c=o.x*s,u=Math.sin(c-l)*Math.cos(r),d=Math.cos(a)*Math.sin(r)-Math.sin(a)*Math.cos(r)*Math.cos(c-l),C=Math.atan2(u,d)%(2*Math.PI);b=450-(180*C/Math.PI<0?360+180*C/Math.PI:180*C/Math.PI)}if(2===p){Cesium.Cartesian3.distance(t,i),y=Cesium.Cartesian3.distance(e,i);var w=turf.point([m[0].lng,m[0].lat]),k=turf.point([m[1].lng,m[1].lat]),x=turf.point([m[2].lng,m[2].lat]),_=turf.rhumbBearing(w,k),E=turf.rhumbBearing(k,x),S=Math.abs(_-E),D=S>180?360-S:S;D=180-D,f=y*Math.sin(Cesium.Math.toRadians(D))}},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C.viewer;t.entities.add(new Cesium.Entity({id:C.elliptic_id,position:Cesium.Cartesian3.fromDegrees(h.lng,h.lat),ellipse:{semiMinorAxis:new Cesium.CallbackProperty((function(t){return f}),!1),semiMajorAxis:new Cesium.CallbackProperty((function(t){return v}),!1),granularity:Cesium.Math.toRadians(.1),rotation:new Cesium.CallbackProperty((function(t){return Cesium.Math.toRadians(b)}),!1),material:Cesium.Color.fromCssColorString(C.color),zIndex:99999999}}))};(i=e,n="start",o=this,s=3,a=Ks()(Ji()(1&s?i.prototype:i),n,o),2&s&&"function"==typeof a?function(t){return a.apply(o,t)}:a)([]),this.entity_ids=[],YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键开始,右键取消",this.sdk),this.event=new X(this.sdk);var p=0;this.elliptic_id=this.randomString();var h,d=[],m=[],f=0,v=0,g=0,y=0,b=0;this.event.mouse_left((function(e,i){if("2D"!==l){if(l="3D",r.tip.set_text("再次左键,完成绘制;右键取消"),p++,r.points_ids.push(r.create_point(i)),d.push(i),1===p){d=[i,i,i];var n=r.cartesian3Towgs84(i,r.viewer);h=n,m=[n,n,n],c(),u()}if(2===p){d[1]=i,d[2]=i;var o=r.cartesian3Towgs84(i,r.viewer);m[1]=o,m[2]=o}p>=3&&(r.end(),t(null,{center:h,bearing:b,semiMajorAxis:v,semiMinorAxis:f}))}})),this.event.mouse_right((function(e,i){"2D"!==l&&(r.end(),t(!1))})),this.event.mouse_move((function(t,e){"2D"!==l&&(r.tip.setPosition(e,t.endPosition.x,t.endPosition.y),d[p]=e,m[p]=r.cartesian3Towgs84(e,r.viewer),0!==p&&c())})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(e,i){if("3D"!==l){if(l="2D",r.tip.set_text("再次左键,完成绘制;右键取消"),p++,r.points_ids.push(r.create_point(i,r._sdk2D.viewer)),d.push(i),1===p){d=[i,i,i];var n=r.cartesian3Towgs84(i,r.viewer);h=n,m=[n,n,n],c(),u(r._sdk2D.viewer)}if(2===p){d[1]=i,d[2]=i;var o=r.cartesian3Towgs84(i,r.viewer);m[1]=o,m[2]=o}p>=3&&(r.end(),t(null,{center:h,bearing:b,semiMajorAxis:v,semiMinorAxis:f}))}})),this.event2D.mouse_right((function(e,i){"3D"!==l&&(r.end(),t(!1))})),this.event2D.mouse_move((function(t,e){"3D"!==l&&(r.tip.setPosition(e,t.endPosition.x+r.viewer.canvas.width,t.endPosition.y),d[p]=e,m[p]=r.cartesian3Towgs84(e,r.viewer),0!==p&&c())})));var C=this}}},{key:"end",value:function(){var t=this;this.remove_entity(this.elliptic_id),this.points_ids.forEach((function(e){t.remove_entity(e)})),YJ.Measure.SetMeasureStatus(!1),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),this.event2D&&this.event2D.destroy()}}])}(Qs);function zr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Hr=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),zr(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i,n,o,s,a,r=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var l;(i=e,n="start",o=this,s=3,a=Ks()(Ji()(1&s?i.prototype:i),n,o),2&s&&"function"==typeof a?function(t){return a.apply(o,t)}:a)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键结束;CTRL+右键撤销",this.sdk),this.event=new X(this.sdk),this.positions=[],this.points_ids=[];var c=[],u=!1;this.event.mouse_left((function(t,i){if("2D"!==l){if(l="3D",!r.entityHasCreated){var n=e.create_arrow_polygon(r);r.points_ids.push(n)}r.points_ids.push(r.create_point(i)),c.push(r.cartesian3Towgs84(i,r.viewer)),u=!1}})),this.event.mouse_right((function(e,i){if("2D"!==l){var n=[];if(r.points_ids.length>2)r.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){n.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),u&&r.positions.pop(),t(null,r.positions,n)}})),this.event.mouse_move((function(t,e){"2D"!==l&&(u=!0,r.positions=c.concat(r.cartesian3Towgs84(e,r.viewer)),r.tip.setPosition(e,t.endPosition.x,t.endPosition.y))})),this.event.mouse_right_keyboard_ctrl((function(t,e){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event.gesture_pinck_start_keyboard_ctrl((function(){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event.gesture_pinck_start((function(i,n){if("2D"!==l){var o=new Date;r.event.gesture_pinck_end((function(){if(new Date-o>=500){var s=[];if(r.points_ids.length>2)r.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){s.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),t(null,r.positions,s)}else{if(!r.entityHasCreated){var a=e.create_arrow_polygon(r);r.points_ids.push(a)}r.points_ids.push(r.create_point(n)),c.push(r.cartesian3Towgs84(n,r.viewer)),r.positions=c.concat(r.cartesian3Towgs84(n,r.viewer)),r.tip.setPosition(n,(i.position1.x+i.position2.x)/2,(i.position1.y+i.position2.y)/2)}}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(t,i){if("3D"!==l){if(l="2D",!r.entityHasCreated){var n=e.create_arrow_polygon(r,r._sdk2D.viewer);r.points_ids.push(n)}r.points_ids.push(r.create_point(i,r._sdk2D.viewer)),c.push(r.cartesian3Towgs84(i,r.viewer)),u=!1}})),this.event2D.mouse_right((function(e,i){if("3D"!==l){var n=[];if(r.points_ids.length>2)r.event2D.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){n.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),u&&r.positions.pop(),t(null,r.positions,n)}})),this.event2D.mouse_move((function(t,e){"3D"!==l&&(u=!0,r.positions=c.concat(r.cartesian3Towgs84(e,r.viewer)),r.tip.setPosition(e,t.endPosition.x+r.viewer.canvas.width,t.endPosition.y))})),this.event2D.mouse_right_keyboard_ctrl((function(t,e){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event2D.gesture_pinck_start_keyboard_ctrl((function(){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event2D.gesture_pinck_start((function(i,n){if("3D"!==l){var o=new Date;r.event2D.gesture_pinck_end((function(){if(new Date-o>=500){var s=[];if(r.points_ids.length>2)r.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){s.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),t(null,r.positions,s)}else{if(!r.entityHasCreated){var a=e.create_arrow_polygon(r,r._sdk2D.viewer);r.points_ids.push(a)}r.points_ids.push(r.create_point(n,r._sdk2D.viewer)),c.push(r.cartesian3Towgs84(n,r.viewer)),r.positions=c.concat(r.cartesian3Towgs84(n,r.viewer)),r.tip.setPosition(n,(i.position1.x+i.position2.x)/2+r.viewer.canvas.width,(i.position1.y+i.position2.y)/2)}}))}})))}}}],[{key:"create_arrow_polygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.viewer;t.entityHasCreated=!0;var i=t.randomString();return e.entities.add(new Cesium.Entity({id:i,polygon:{classificationType:Cesium.ClassificationType.BOTH,hierarchy:new Cesium.CallbackProperty((function(e){for(var i=t.computeAttackArrow(t.positions),n=0;n<i.length;n++)if(isNaN(i[n].x)){i=[];break}return new Cesium.PolygonHierarchy(i)}),!1),material:Cesium.Color.fromCssColorString(t.color),zIndex:99999999}})),i}}])}(Qs);function Vr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Gr=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),Vr(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i,n,o,s,a,r=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var l;(i=e,n="start",o=this,s=3,a=Ks()(Ji()(1&s?i.prototype:i),n,o),2&s&&"function"==typeof a?function(t){return a.apply(o,t)}:a)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键取消;CTRL+右键撤销",this.sdk),this.event=new X(this.sdk),this.positions=[],this.points_ids=[];var c=[];this.event.mouse_left((function(i,n){if("2D"!==l){if(l="3D",!r.entityHasCreated){var o=e.create_arrow_polygon(r);r.points_ids.push(o)}if(r.points_ids.push(r.create_point(n)),c.push(r.cartesian3Towgs84(n,r.viewer)),5===c.length){var s=[];if(r.points_ids.length>2)r.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){s.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),t(null,c,s)}}})),this.event.mouse_right((function(e,i){"2D"!==l&&(r.end(),t("取消绘制"))})),this.event.mouse_move((function(t,e){"2D"!==l&&(r.positions=c.concat(r.cartesian3Towgs84(e,r.viewer)),r.tip.setPosition(e,t.endPosition.x,t.endPosition.y))})),this.event.mouse_right_keyboard_ctrl((function(t,e){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event.gesture_pinck_start_keyboard_ctrl((function(){"2D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),r.positions=c.concat(r.cartesian3Towgs84(cartesian,r.viewer)))})),this.event.gesture_pinck_start((function(i,n){if("2D"!==l){var o=new Date;r.event.gesture_pinck_end((function(){if(new Date-o>=500)r.end(),t("取消绘制");else{if(!r.entityHasCreated){var s=e.create_arrow_polygon(r);r.points_ids.push(s)}if(r.points_ids.push(r.create_point(n)),c.push(r.cartesian3Towgs84(n,r.viewer)),r.positions=c.concat(r.cartesian3Towgs84(n,r.viewer)),r.tip.setPosition(n,(i.position1.x+i.position2.x)/2,(i.position1.y+i.position2.y)/2),5===c.length){var a=[];if(r.points_ids.length>2)r.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){a.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),t(null,c,a)}}}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(i,n){if("3D"!==l){if(l="2D",!r.entityHasCreated){var o=e.create_arrow_polygon(r,r._sdk2D.viewer);r.points_ids.push(o)}if(r.points_ids.push(r.create_point(n,r._sdk2D.viewer)),c.push(r.cartesian3Towgs84(n,r.viewer)),5===c.length){var s=[];if(r.points_ids.length>2)r.event2D.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){s.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),t(null,c,s)}}})),this.event2D.mouse_right((function(e,i){"3D"!==l&&(r.end(),t("取消绘制"))})),this.event2D.mouse_move((function(t,e){"3D"!==l&&(r.positions=c.concat(r.cartesian3Towgs84(e,r.viewer)),r.tip.setPosition(e,t.endPosition.x+r.viewer.canvas.width,t.endPosition.y))})),this.event2D.mouse_right_keyboard_ctrl((function(t,e){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop())})),this.event2D.gesture_pinck_start_keyboard_ctrl((function(){"3D"!==l&&r.points_ids.length>1&&(r.remove_entity(r.points_ids.pop()),c.pop(),r.positions=c.concat(r.cartesian3Towgs84(cartesian,r.viewer)))})),this.event2D.gesture_pinck_start((function(i,n){if("3D"!==l){var o=new Date;r.event2D.gesture_pinck_end((function(){if(new Date-o>=500)r.end(),t("取消绘制");else{if(!r.entityHasCreated){var s=e.create_arrow_polygon(r,r._sdk2D.viewer);r.points_ids.push(s)}if(r.points_ids.push(r.create_point(n,r._sdk2D.viewer)),c.push(r.cartesian3Towgs84(n,r.viewer)),r.positions=c.concat(r.cartesian3Towgs84(n,r.viewer)),r.tip.setPosition(n,(i.position1.x+i.position2.x)/2+r.viewer.canvas.width,(i.position1.y+i.position2.y)/2),5===c.length){var a=[];if(r.points_ids.length>2)r.event2D.viewer.entities.getById(r.points_ids[0]).polygon.hierarchy.getValue().positions.forEach((function(t){a.push(r.cartesian3Towgs84(t,r.viewer))}));r.end(),t(null,c,a)}}}))}})))}}}],[{key:"create_arrow_polygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.viewer;t.entityHasCreated=!0;var i=t.randomString();return e.entities.add(new Cesium.Entity({id:i,polygon:{classificationType:Cesium.ClassificationType.BOTH,hierarchy:new Cesium.CallbackProperty((function(e){for(var i=t.computePincerArrow(t.positions),n=0;n<i.length;n++)if(isNaN(i[n].x)){i=[];break}return new Cesium.PolygonHierarchy(i)}),!1),material:Cesium.Color.fromCssColorString(t.color),zIndex:99999999}})),i}}])}(Qs);function Ur(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Wr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Yr=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=Ur(this,e,[t,n])).points=null,i.polygonHasCreated=!1,i}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var n;Wr(e,"start",this,3)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键取消;",this.sdk),this.event=new X(this.sdk),this.positions=[],this.points_ids=[];var o=[];this.anchorpoints=[],this.event.mouse_left((function(e,s){if("2D"!==n&&(n="3D",s&&i.anchorpoints[0]!==s)){i.anchorpoints.push(s);var a=i.cartesian3Towgs84(s,i.viewer);if(a.lng=Number(a.lng.toFixed(8)),a.lat=Number(a.lat.toFixed(8)),(!o[0]||a.lng!==o[0].lng||a.lat!==o[0].lat)&&(o.push(a),i.positions.push(a),i.points_ids.push(i.create_point(s)),2===i.points_ids.length)){var r=[o[0],o[1]];t(null,r),i.end()}}})),this.event.mouse_move((function(t,o){if("2D"!==n&&(i.tip.setPosition(o,t.endPosition.x,t.endPosition.y),o&&0!==i.points_ids.length)){var s=i.cartesian3Towgs84(o,i.viewer);i.positions=[i.positions[0],s],1!==i.points_ids.length||Cesium.defined(i.arrowPolygon)||(i.arrowPolygon=e.polygon(i))}})),this.event.mouse_right((function(e,o){"2D"!==n&&(t(null),i.end())})),this.event.gesture_pinck_start((function(s,a){if("2D"!==n){var r=new Date;i.event.gesture_pinck_end((function(){if(new Date-r>=500)i.end(),t(!1);else if(2===i.anchorpoints.length)i.anchorpoints.push(a),t(null,i.positions),i.end();else{if(!a||Cesium.defined(i.arrowPolygon))return;i.tip.setPosition(a,(s.position1.x+s.position2.x)/2,(s.position1.y+s.position2.y)/2),i.anchorpoints.push(a),i.arrowPolygon=e.polygon(i),o.push(i.cartesian3Towgs84(a)),i.points_ids.push(i.create_point(a))}}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(e,s){if("3D"!==n&&(n="2D",s&&i.anchorpoints[0]!==s)){i.anchorpoints.push(s);var a=i.cartesian3Towgs84(s,i.viewer);if(a.lng=Number(a.lng.toFixed(8)),a.lat=Number(a.lat.toFixed(8)),(!o[0]||a.lng!==o[0].lng||a.lat!==o[0].lat)&&(o.push(a),i.positions.push(a),i.points_ids.push(i.create_point(s,i._sdk2D.viewer)),2===i.points_ids.length)){var r=[o[0],o[1]];t(null,r),i.end()}}})),this.event2D.mouse_move((function(t,o){if("3D"!==n&&(i.tip.setPosition(o,t.endPosition.x+i.viewer.canvas.width,t.endPosition.y),o&&0!==i.points_ids.length)){var s=i.cartesian3Towgs84(o,i.viewer);i.positions=[i.positions[0],s],1!==i.points_ids.length||Cesium.defined(i.arrowPolygon)||(i.arrowPolygon=e.polygon(i,i._sdk2D.viewer))}})),this.event2D.mouse_right((function(e,o){"3D"!==n&&(t(null),i.end())})),this.event2D.gesture_pinck_start((function(s,a){if("3D"!==n){var r=new Date;i.event2D.gesture_pinck_end((function(){if(new Date-r>=500)i.end(),t(!1);else if(2===i.anchorpoints.length)i.anchorpoints.push(a),t(null,i.positions),i.end();else{if(!a||Cesium.defined(i.arrowPolygon))return;i.tip.setPosition(a,(s.position1.x+s.position2.x)/2+i.viewer.canvas.width,(s.position1.y+s.position2.y)/2),i.anchorpoints.push(a),i.arrowPolygon=e.polygon(i,i._sdk2D.viewer),o.push(i.cartesian3Towgs84(a)),i.points_ids.push(i.create_point(a,i._sdk2D.viewer))}}))}})))}}},{key:"end",value:function(){Wr(e,"end",this,3)([]),this.viewer.entities.remove(this.arrowPolygon),!this._is2D&&this._sdk2D&&this._sdk2D.viewer.entities.remove(this.arrowPolygon)}}],[{key:"polygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.viewer,i=t.randomString();return e.entities.add(new Cesium.Entity({name:"ArrowPolygon",id:i,polygon:{hierarchy:new Cesium.CallbackProperty((function(e){for(var i=t.computeStraightArrow(t.positions),n=0;n<i.length;n++)if(isNaN(i[n].x)){i=[];break}return new Cesium.PolygonHierarchy(i)}),!1),material:Cesium.Color.fromCssColorString(t.color),outline:!0,outlineColor:Cesium.Color.GREEN,zIndex:99999999}}))}}])}(Qs);function Jr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var qr=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=Jr(this,e,[t,n])).rhumb=n.rhumb,i.polygonHasCreated=!1,i.rect=[],i.rectObj=[],i.entity=null,i}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i,n,o,s,a,r=this,l=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var c;(i=e,n="start",o=this,s=3,a=Ks()(Ji()(1&s?i.prototype:i),n,o),2&s&&"function"==typeof a?function(t){return a.apply(o,t)}:a)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键取消",l.sdk),this.event=new X(l.sdk),this.positions=[],this.points_ids=[];var u=0,p=null,h=null;this.event.mouse_left((function(i,n){if("2D"!==c){c="3D",u++;var o=r.cartesian3Towgs84(n,r.viewer);if(!r.polygonHasCreated){r.polygonHasCreated=!0;var s=e.create_polygon(r);r.points_ids.push(s),p=o}2==u&&(h=o,r.end(),t(null,l.rectObj,[p,h]))}})),this.event.mouse_right((function(e,i){"2D"!==c&&(r.end(),t("取消",""))})),this.event.mouse_move((function(t,e){if("2D"!==c&&(r.tip.setPosition(e,t.endPosition.x,t.endPosition.y),1==u)){var i=r.cartesian3Towgs84(e,r.viewer);r.calrect(p,i)}})),this.event.gesture_pinck_start((function(i,n){if("2D"!==c){var o=new Date;r.event.gesture_pinck_end((function(){if(new Date-o>=500)t("取消",""),r.end();else{r.tip.setPosition(n,(i.position1.x+i.position2.x)/2,(i.position1.y+i.position2.y)/2),u++;var s=r.cartesian3Towgs84(n);if(!r.polygonHasCreated){r.polygonHasCreated=!0;var a=e.create_polygon(r);r.points_ids.push(a),p=s}2==u&&(r.calrect(p,s),h=s,r.end(),t(null,l.rectObj,[p,h]))}}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(i,n){if("3D"!==c){c="2D",u++;var o=r.cartesian3Towgs84(n,r.viewer);if(!r.polygonHasCreated){r.polygonHasCreated=!0;var s=e.create_polygon(r,r._sdk2D.viewer);r.points_ids.push(s),p=o}2==u&&(h=o,r.end(),t(null,l.rectObj,[p,h]))}})),this.event2D.mouse_right((function(e,i){"3D"!==c&&(r.end(),t("取消",""))})),this.event2D.mouse_move((function(t,e){if("3D"!==c&&(r.tip.setPosition(e,t.endPosition.x+r.viewer.canvas.width,t.endPosition.y),1==u)){var i=r.cartesian3Towgs84(e,r.viewer);r.calrect(p,i)}})),this.event2D.gesture_pinck_start((function(i,n){if("3D"!==c){var o=new Date;r.event2D.gesture_pinck_end((function(){if(new Date-o>=500)t("取消",""),r.end();else{r.tip.setPosition(n,(i.position1.x+i.position2.x)/2+r.viewer.canvas.width,(i.position1.y+i.position2.y)/2),u++;var s=r.cartesian3Towgs84(n);if(!r.polygonHasCreated){r.polygonHasCreated=!0;var a=e.create_polygon(r,r._sdk2D.viewer);r.points_ids.push(a),p=s}2==u&&(r.calrect(p,s),h=s,r.end(),t(null,l.rectObj,[p,h]))}}))}})))}}},{key:"calrect",value:function(t,e){var i,n=[],o=[],s=[];if(n.push([t.lng,t.lat,t.alt],[e.lng,e.lat,e.alt]),2===n.length){var a=turf.lineString(n),r=turf.bbox(a);i=turf.bboxPolygon(r)}i&&(i.geometry.coordinates[0].forEach((function(e){o.push(e[0]),o.push(e[1]);var i={lng:e[0],lat:e[1],alt:t.alt};s.push(i)})),this.rect=[].concat(o),this.rectObj=[].concat(s),this.rectObj.pop())}}],[{key:"create_polygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.viewer,i=t.randomString();return e.entities.add(this.entity=new Cesium.Entity({id:i,polygon:{hierarchy:new Cesium.CallbackProperty((function(e){return new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(t.rect))}),!1),material:Cesium.Color.fromCssColorString(t.color),arcType:t.rhumb?Cesium.ArcType.RHUMB:Cesium.ArcType.GEODESIC,zIndex:99999999}})),i}}])}(Qs);function Xr(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Zr(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Kr=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=Xr(this,e,[t,n])).points=null,i.polygonHasCreated=!1,i}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var n;Zr(e,"start",this,3)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确定,右键取消;",this.sdk),this.event=new X(this.sdk),this.positions=[],this.points_ids=[];var o=[];this.anchorpoints=[],this.event.mouse_left((function(e,s){if("2D"!==n&&(n="3D",s&&(3===i.anchorpoints.length?i.anchorpoints[1]=s:i.anchorpoints.push(s),o.push(i.cartesian3Towgs84(s,i.viewer)),i.points_ids.push(i.create_point(s)),3===i.points_ids.length))){var a=[o[0],o[2],o[1]];t(null,a),i.end()}})),this.event.mouse_move((function(t,s){if("2D"!==n&&(i.tip.setPosition(s,t.endPosition.x,t.endPosition.y),s&&0!==i.points_ids.length))if(o.length>1?i.positions=[o[0],i.cartesian3Towgs84(s,i.viewer),o[1]]:i.positions=[o[0],i.cartesian3Towgs84(s,i.viewer)],1!==i.points_ids.length||Cesium.defined(i.assemblePolygon)||(i.assemblePolygon=e.polygon(i)),i.anchorpoints.length>=2){if(1===i.points_ids.length){var a=new Array;i.positions.forEach((function(t){a.push([t.lng,t.lat])}));var r=P.PlotUtils.mid(a[0],a[1]),l=P.PlotUtils.distance(a[0],r)/.9,c=P.PlotUtils.getThirdPoint(a[0],r,P.Constants.HALF_PI,l,!0);i.positions=[i.positions[0],{lng:c[0],lat:c[1]},i.positions[1]]}i.anchorpoints[1]=s}else i.anchorpoints.push(s)})),this.event.mouse_right((function(e,o){"2D"!==n&&(t(null),i.end())})),this.event.gesture_pinck_start((function(s,a){if("2D"!==n){var r=new Date;i.event.gesture_pinck_end((function(){if(new Date-r>=500)i.end(),t(!1);else if(2===i.anchorpoints.length)i.anchorpoints.push(a),t(null,i.positions),i.end();else{if(!a||Cesium.defined(i.assemblePolygon))return;i.tip.setPosition(a,(s.position1.x+s.position2.x)/2,(s.position1.y+s.position2.y)/2),i.anchorpoints.push(a),i.assemblePolygon=e.polygon(i),o.push(i.cartesian3Towgs84(a)),i.points_ids.push(i.create_point(a))}}))}})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(e,s){if("3D"!==n&&(n="2D",s&&(3===i.anchorpoints.length?i.anchorpoints[1]=s:i.anchorpoints.push(s),o.push(i.cartesian3Towgs84(s,i.viewer)),i.points_ids.push(i.create_point(s,i._sdk2D.viewer)),3===i.points_ids.length))){var a=[o[0],o[2],o[1]];t(null,a),i.end()}})),this.event2D.mouse_move((function(t,s){if("3D"!==n&&(i.tip.setPosition(s,t.endPosition.x+i.viewer.canvas.width,t.endPosition.y),s&&0!==i.points_ids.length))if(o.length>1?i.positions=[o[0],i.cartesian3Towgs84(s,i.viewer),o[1]]:i.positions=[o[0],i.cartesian3Towgs84(s,i.viewer)],1!==i.points_ids.length||Cesium.defined(i.assemblePolygon)||(i.assemblePolygon=e.polygon(i,i._sdk2D.viewer)),i.anchorpoints.length>=2){if(1===i.points_ids.length){var a=new Array;i.positions.forEach((function(t){a.push([t.lng,t.lat])}));var r=P.PlotUtils.mid(a[0],a[1]),l=P.PlotUtils.distance(a[0],r)/.9,c=P.PlotUtils.getThirdPoint(a[0],r,P.Constants.HALF_PI,l,!0);i.positions=[i.positions[0],{lng:c[0],lat:c[1]},i.positions[1]]}i.anchorpoints[1]=s}else i.anchorpoints.push(s)})),this.event2D.mouse_right((function(e,o){"3D"!==n&&(t(null),i.end())})),this.event2D.gesture_pinck_start((function(s,a){if("3D"!==n){var r=new Date;i.event2D.gesture_pinck_end((function(){if(new Date-r>=500)i.end(),t(!1);else if(2===i.anchorpoints.length)i.anchorpoints.push(a),t(null,i.positions),i.end();else{if(!a||Cesium.defined(i.assemblePolygon))return;i.tip.setPosition(a,(s.position1.x+s.position2.x)/2+i.viewer.canvas.width,(s.position1.y+s.position2.y)/2),i.anchorpoints.push(a),i.assemblePolygon=e.polygon(i,i._sdk2D.viewer),o.push(i.cartesian3Towgs84(a)),i.points_ids.push(i.create_point(a,i._sdk2D.viewer))}}))}})))}}},{key:"end",value:function(){Zr(e,"end",this,3)([]),this.viewer.entities.remove(this.assemblePolygon),!this._is2D&&this._sdk2D&&this._sdk2D.viewer.entities.remove(this.assemblePolygon)}},{key:"calculateVector",value:function(t,e,i){var n,o,s,a,r,l;e||(e=Math.PI/2),i||(i=1);var c=Math.sqrt(t.x*t.x+t.y*t.y);if(0==t.y)n=o=c*i*Math.cos(e)/t.x,t.x>0?a=-(s=Math.sqrt(i*i-n*n)):t.x<0&&(s=-(a=Math.sqrt(i*i-n*n))),r={x:n,y:s},l={x:o,y:a};else{var u=-t.x/t.y,p=i*c*Math.cos(e)/t.y,h=1+u*u,d=2*u*p,m=p*p-i*i;s=u*(n=(-d-Math.sqrt(d*d-4*h*m))/(2*h))+p,a=u*(o=(-d+Math.sqrt(d*d-4*h*m))/(2*h))+p,t.y>=0?(r={x:n,y:s},l={x:o,y:a}):t.y<0&&(r={x:o,y:a},l={x:n,y:s})}return[r,l]}},{key:"createCloseCardinal",value:function(t){if(null==t||t.length<3)return t;var e=t[0];t.push(e);for(var i=t,n=[],o=.4,s=i.length-1,a=0;a<=s-1;a++){var r=void 0,l=void 0,c=void 0;a==s-1?(r=i[s-1],l=i[0],c=i[1]):(r=i[a],l=i[a+1],c=i[a+2]);var u={x:void 0,y:void 0},p={x:void 0,y:void 0},h={x:l.x-r.x,y:l.y-r.y},d={x:c.x-l.x,y:c.y-l.y},m=Math.sqrt(h.x*h.x+h.y*h.y),f=Math.sqrt(d.x*d.x+d.y*d.y),v={x:h.x/m,y:h.y/m},g={x:d.x/f,y:d.y/f},y={x:v.x+g.x,y:v.y+g.y},b=Math.sqrt(y.x*y.x+y.y*y.y),C={x:y.x/b,y:y.y/b},w=(v.x*g.x+v.y*g.y)/1;Math.abs(1-w)<.005?(u.x=l.x-g.x*m*o,u.y=l.y-g.y*m*o,p.x=l.x+v.x*f*o,p.y=l.y+v.y*f*o):(u.x=l.x-C.x*m*o,u.y=l.y-C.y*m*o,p.x=l.x+C.x*f*o,p.y=l.y+C.y*f*o),a==s-1?(n[0]=l,n[1]=p,n[3*(s-2)+2+3]=u,n[3*(s-2)+2+4]=i[s]):(n[3*a+2+0]=u,n[3*a+2+1]=l,n[3*a+2+2]=p)}return n}},{key:"calculatePointsFBZ3",value:function(t,e){e||(e=20);var i=[],n=.05;e>0&&(n=1/e);for(var o=0;o<t.length-3;){var s=t[o],a=t[o+1],r=t[o+2],l=t[o+3];i.push(s);for(var c=0;c<1;){var u={x:(1-c)*(1-c)*(1-c)*s.x+3*c*(1-c)*(1-c)*a.x+3*c*c*(1-c)*r.x+c*c*c*l.x,y:(1-c)*(1-c)*(1-c)*s.y+3*c*(1-c)*(1-c)*a.y+3*c*c*(1-c)*r.y+c*c*c*l.y};i.push(u),c+=n}(o+=3)>=t.length&&i.push(s)}return i}}],[{key:"polygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.viewer,i=t.randomString();return e.entities.add(new Cesium.Entity({name:"AssemblePolygon",id:i,polygon:{hierarchy:new Cesium.CallbackProperty((function(e){for(var i=t.computeAssemble(t.positions),n=0;n<i.length;n++)if(isNaN(i[n].x)){i=[];break}return new Cesium.PolygonHierarchy(i)}),!1),material:Cesium.Color.fromCssColorString(t.color),outline:!0,outlineColor:Cesium.Color.GREEN,zIndex:99999999}}))}}])}(Qs);function $r(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Qr=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),$r(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var i,n,o,s,a,r,l=this,c=this;YJ.Measure.GetMeasureStatus()?t("上一次测量未结束"):((n=e,o="start",s=this,a=3,r=Ks()(Ji()(1&a?n.prototype:n),o,s),2&a&&"function"==typeof r?function(t){return r.apply(s,t)}:r)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("左键确认,右键取消",c.sdk),this.event=new X(c.sdk),this._sector_id=null,this._positions=[],this.points_ids=[],this._entities_sector=[],this._radius=0,this._startAngle=0,this._endAngle=0,this.event.mouse_left((function(e,n){if("2D"!==i&&(i="3D",l._positions.length<3?(l.points_ids.push(l.create_point(n)),l._positions.push(l.cartesian3Towgs84(n,l.viewer))):(l.end(),t(null,{center:l._positions[0],radius:l._radius,startAngle:l._startAngle,endAngle:l._endAngle})),2===l._positions.length)){var o=Cesium.Cartesian3.fromDegrees(l._positions[0].lng,l._positions[0].lat,l._positions[0].alt),s=n;l._radius=Cesium.Cartesian3.distance(o,s)}})),this.event.mouse_move((function(t,e){if("2D"!==i&&(l.tip.setPosition(e,t.endPosition.x,t.endPosition.y),!(l._positions.length<2)&&(2==l._positions.length&&l._positions.push(l.cartesian3Towgs84(e,l.viewer)),3==l._positions.length))){l._positions.pop(),l._positions.push(l.cartesian3Towgs84(e,l.viewer)),Cesium.defined(l._sector_id)||(l._sector_id=l.createsector(),l.points_ids.push(l._sector_id));var n=c.calculateAangle(c._positions);c._startAngle=n.angle1,c._endAngle=n.angle2}})),this.event.mouse_right((function(e,n){"2D"!==i&&(l.end(),t(null))})),!this._is2D&&this._sdk2D&&(this.event2D=new X(this._sdk2D),this.event2D.mouse_left((function(e,n){if("3D"!==i&&(i="2D",l._positions.length<3?(l.points_ids.push(l.create_point(n,l._sdk2D.viewer)),l._positions.push(l.cartesian3Towgs84(n,l.viewer))):(l.end(),t(null,{center:l._positions[0],radius:l._radius,startAngle:l._startAngle,endAngle:l._endAngle})),2===l._positions.length)){var o=Cesium.Cartesian3.fromDegrees(l._positions[0].lng,l._positions[0].lat,l._positions[0].alt),s=n;l._radius=Cesium.Cartesian3.distance(o,s)}})),this.event2D.mouse_move((function(t,e){if("3D"!==i&&(l.tip.setPosition(e,t.endPosition.x+l.viewer.canvas.width,t.endPosition.y),!(l._positions.length<2)&&(2==l._positions.length&&l._positions.push(l.cartesian3Towgs84(e,l.viewer)),3==l._positions.length))){l._positions.pop(),l._positions.push(l.cartesian3Towgs84(e,l.viewer)),Cesium.defined(l._sector_id)||(l._sector_id=l.createsector(l._sdk2D.viewer),l.points_ids.push(l._sector_id));var n=c.calculateAangle(c._positions);c._startAngle=n.angle1,c._endAngle=n.angle2}})),this.event2D.mouse_right((function(e,n){"3D"!==i&&(l.end(),t(null))}))))}},{key:"createsector",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.viewer,e=this,i=new Cesium.CallbackProperty((function(){var t=e.calSector(e._positions[0],e._radius,e._startAngle,e._endAngle);return new Cesium.PolygonHierarchy(t)})),n=e.randomString(),o=t.entities.add({id:n,position:Cesium.Cartesian3.fromDegrees(e._positions[0].lng,e._positions[0].lat),polygon:{hierarchy:i,show:!0,fill:!0,clampToGround:!0,material:Cesium.Color.fromCssColorString(e.color),zIndex:99999999}});return e._entities_sector.push(o),n}},{key:"cartesianToLatlng",value:function(t){var e=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(t),i=Cesium.Math.toDegrees(e.latitude);return[Cesium.Math.toDegrees(e.longitude),i]}},{key:"lonLatToMercator",value:function(t){var e=t[0],i=t[1],n=20037508.34*e/180,o=Math.log(Math.tan((90+i)*Math.PI/360))/(Math.PI/180);return[n,o=20037508.34*o/180]}},{key:"WebMercator2lonLat",value:function(t){var e=t[0]/20037508.34*180,i=t[1]/20037508.34*180;return[e,180/Math.PI*(2*Math.atan(Math.exp(i*Math.PI/180))-Math.PI/2)]}},{key:"calculateAangle",value:function(t){function e(t,e){var i=Math.PI/180,n=t.y*i,o=e.y*i,s=t.x*i,a=e.x*i,r=Math.sin(a-s)*Math.cos(o),l=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(a-s),c=Math.atan2(r,l)%(2*Math.PI);return 360-(450-(180*c/Math.PI<0?360+180*c/Math.PI:180*c/Math.PI)-90)%360}var i=t[0],n=t[1],o=t[2],s={x:i.lng,y:i.lat},a={x:n.lng,y:n.lat},r={x:o.lng,y:o.lat};return{angle1:e(s,a),angle2:e(s,r)}}}])}(Qs),tl=52.35987755982988,el=3.141592653589793,il=.006693421622965943,nl=function(){return _()((function t(){k()(this,t)}),null,[{key:"BD09ToGCJ02",value:function(t,e){var i=+t-.0065,n=+e-.006,o=Math.sqrt(i*i+n*n)-2e-5*Math.sin(n*tl),s=Math.atan2(n,i)-3e-6*Math.cos(i*tl);return[o*Math.cos(s),o*Math.sin(s)]}},{key:"GCJ02ToBD09",value:function(t,e){e=+e,t=+t;var i=Math.sqrt(t*t+e*e)+2e-5*Math.sin(e*tl),n=Math.atan2(e,t)+3e-6*Math.cos(t*tl);return[i*Math.cos(n)+.0065,i*Math.sin(n)+.006]}},{key:"WGS84ToGCJ02",value:function(t,e){if(e=+e,t=+t,this.out_of_china(t,e))return[t,e];var i=this.delta(t,e);return[t+i[0],e+i[1]]}},{key:"GCJ02ToWGS84",value:function(t,e){if(e=+e,t=+t,this.out_of_china(t,e))return[t,e];var i=this.delta(t,e);return[2*t-(t+i[0]),2*e-(e+i[1])]}},{key:"delta",value:function(t,e){var i=this.transformLng(t-105,e-35),n=this.transformLat(t-105,e-35),o=e/180*el,s=Math.sin(o);s=1-il*s*s;var a=Math.sqrt(s);return[i=180*i/(6378245/a*Math.cos(o)*el),n=180*n/(6378245*(1-il)/(s*a)*el)]}},{key:"transformLng",value:function(t,e){var i=300+(t=+t)+2*(e=+e)+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return i+=2*(20*Math.sin(6*t*el)+20*Math.sin(2*t*el))/3,i+=2*(20*Math.sin(t*el)+40*Math.sin(t/3*el))/3,i+=2*(150*Math.sin(t/12*el)+300*Math.sin(t/30*el))/3}},{key:"transformLat",value:function(t,e){var i=2*(t=+t)-100+3*(e=+e)+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return i+=2*(20*Math.sin(6*t*el)+20*Math.sin(2*t*el))/3,i+=2*(20*Math.sin(e*el)+40*Math.sin(e/3*el))/3,i+=2*(160*Math.sin(e/12*el)+320*Math.sin(e*el/30))/3}},{key:"out_of_china",value:function(t,e){return e=+e,!((t=+t)>73.66&&t<135.05&&e>3.86&&e<53.55)}}])}();function ol(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var sl=function(t){function e(t,i){var n;return k()(this,e),(n=ol(this,e,[t,i])).sdk.addIncetance(n.options.id,n),n.options.show&&Qt(0,n.options.id),n}return Xi()(e,t),_()(e,[{key:"setDefaultValue",value:function(){var t,i,n,o,s;(t=e,i="setDefaultValue",n=this,o=3,s=Ks()(Ji()(1&o?t.prototype:t),i,n),2&o&&"function"==typeof s?function(t){return s.apply(n,t)}:s)([]),this.options.host=this.options.host||h()}},{key:"requestResource",value:function(){var t="";return t=this.options.host.endsWith("yjearth4.0")?this.options.host+"/data/service/load-compact-service":this.options.host+"/yjearth4.0/data/service/load-compact-service",fetch(t,{method:"post",body:JSON.stringify({source_id:this.options.id}),headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}})}}])}(jn);function al(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function rl(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?al(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):al(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ll(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function cl(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var ul=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=ll(this,e,[t,i])).options.name=i.name||"未命名对象",n.Dialog=o,n._elms={},n}return Xi()(e,t),_()(e,[{key:"setDefaultValue",value:function(){var t,i;cl(e,"setDefaultValue",this,3)([]),this.options.alpha=null!==(t=this.options.alpha)&&void 0!==t?t:1,this.options.brightness=null!==(i=this.options.brightness)&&void 0!==i?i:1}},{key:"layerIndex",get:function(){return this.entity?this.entity._layerIndex:void 0}},{key:"layer_index",get:function(){return this.entity?this.entity._layerIndex:void 0}},{key:"brightness",get:function(){return this.options.brightness},set:function(t){this.options.brightness=t,this.entity.brightness=t}},{key:"alpha",get:function(){return this.options.alpha},set:function(t){Number(t)>1&&(t=1),Number(t)<0&&(t=0),this.entity.alpha=t,this.options.alpha=t,this._elms.alpha&&this._elms.alpha.forEach((function(e){e.value=t}))}},{key:"layerRaise",value:function(t){this.sdk.viewer.imageryLayers.raise(this.entity);for(var e=0;e<this.sdk.viewer.imageryLayers._layers.length;e++)if(this.sdk.viewer.imageryLayers._layers[e]._imageryProvider&&this.sdk.viewer.imageryLayers._layers[e]._imageryProvider._type&&("flw"===this.sdk.viewer.imageryLayers._layers[e]._imageryProvider._type||"jww"===this.sdk.viewer.imageryLayers._layers[e]._imageryProvider._type)){var i=this.sdk.viewer.imageryLayers._layers[e];this.sdk.viewer.imageryLayers.raiseToTop(i)}return this.options.layer_index=this.entity._layerIndex,this.entity._layerIndex}},{key:"layerLower",value:function(){return this.sdk.viewer.imageryLayers.lower(this.entity),this.options.layer_index=this.entity._layerIndex,this.entity._layerIndex}},{key:"layerToTop",value:function(){this.sdk.viewer.imageryLayers.raiseToTop(this.entity);for(var t=0;t<this.sdk.viewer.imageryLayers._layers.length;t++)if(this.sdk.viewer.imageryLayers._layers[t]._imageryProvider&&this.sdk.viewer.imageryLayers._layers[t]._imageryProvider._type&&("flw"===this.sdk.viewer.imageryLayers._layers[t]._imageryProvider._type||"jww"===this.sdk.viewer.imageryLayers._layers[t]._imageryProvider._type)){var e=this.sdk.viewer.imageryLayers._layers[t];this.sdk.viewer.imageryLayers.raiseToTop(e)}return this.options.layer_index=this.entity._layerIndex,this.entity._layerIndex}},{key:"layerToBottom",value:function(){return this.sdk.viewer.imageryLayers.lowerToBottom(this.entity),this.options.layer_index=this.entity._layerIndex,this.entity._layerIndex}},{key:"remove",value:function(){cl(e,"remove",this,3)([]),this.sdk.viewer.scene.imageryLayers.remove(this.entity),this.entity=null}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l.length>0&&void 0!==l[0]&&l[0],!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(e={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},i=this.options.customView.relativePosition.lng,n=this.options.customView.relativePosition.lat,o=this.options.customView.relativePosition.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),r={lng:0,lat:0},this.options.position?r=rl({},this.options.position):this.options.positions?r=rl({},this.options.positions[0]):this.options.center?r=rl({},this.options.center):this.options.start?r=rl({},this.options.start):(this.options.hasOwnProperty("lng")&&(r.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(r.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(r.alt=this.options.alt)),r.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(r);case 17:r.alt=t.sent;case 18:i=this.options.customView.relativePosition.lng+r.lng,n=this.options.customView.relativePosition.lat+r.lat,o=this.options.customView.relativePosition.alt+r.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),this.sdk.viewer.camera.flyTo({destination:s,orientation:e}),t.next=26;break;case 25:this.sdk.viewer.flyTo(this.entity);case 26:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"amapMercatorTilingScheme",value:function(t){return new(function(t){function e(t){var i;k()(this,e),i=ll(this,e,[t]);var n=new Cesium.WebMercatorProjection;return i._projection.project=function(t,e){return e=nl.WGS84ToGCJ02(Cesium.Math.toDegrees(t.longitude),Cesium.Math.toDegrees(t.latitude)),e=n.project(new Cesium.Cartographic(Cesium.Math.toRadians(e[0]),Cesium.Math.toRadians(e[1]))),new Cesium.Cartesian2(e.x,e.y)},i._projection.unproject=function(t,e){var i=n.unproject(t);return e=nl.GCJ02ToWGS84(Cesium.Math.toDegrees(i.longitude),Cesium.Math.toDegrees(i.latitude)),new Cesium.Cartographic(Cesium.Math.toRadians(e[0]),Cesium.Math.toRadians(e[1]))},i}return Xi()(e,t),_()(e)}(Cesium.WebMercatorTilingScheme))(t)}},{key:"edit",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s=this,r=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.length>0&&void 0!==r[0]&&r[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),t.next=5,new Ki(this.sdk,this.options,{title:"底图属性",left:"180px",top:"100px",confirmCallBack:function(t){s.name=s.name.trim(),s.name||(s.name="未命名对象"),s.originalOptions=s.deepCopyObj(s.options),s._DialogObject.close(),s.Dialog.confirmCallBack&&s.Dialog.confirmCallBack(s.originalOptions),be(s.sdk,s.options.id),re(s.sdk,s.options.id)},closeCallBack:function(){s.reset(),s.Dialog.closeCallBack&&s.Dialog.closeCallBack()},removeCallBack:function(){s.Dialog.removeCallBack&&s.Dialog.removeCallBack()}},!0);case 5:this._DialogObject=t.sent,(e=document.createElement("div")).style.width="300px",i='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 60px;">名称:</span>\n <input class="input name" type="text">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 60px;">透明度:</span>\n <input type="range" class="alpha" min="0" max="1" step="0.01">\n </div>\n </div>\n </div>\n ',e.innerHTML=i,n=e.getElementsByClassName("name")[0],o=e.getElementsByClassName("alpha")[0],n.value=this.name,o.value=this.alpha,n.addEventListener("input",(function(){s.name=n.value})),o.addEventListener("input",(function(){s.alpha=o.value})),this._DialogObject.contentAppChild(e),this._elms.name=[n],this._elms.alpha=[o];case 19:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"reset",value:function(){(this.entity||this._DialogObject)&&(this.options=this.deepCopyObj(this.originalOptions),this.name=this.options.name,this.alpha=this.options.alpha,this.brightness=this.options.brightness)}},{key:"flicker",value:function(){}}]);var i,n}(sl);function pl(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var hl=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),pl(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"layer"}},{key:"createArcGis",value:(i=o()(a.a.mark((function t(e){var i,n,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(Number(Cesium.VERSION.split(".")[1])>=107)){t.next=6;break}return t.next=3,Cesium.ArcGisMapServerImageryProvider.fromUrl(e);case 3:i=t.sent,t.next=7;break;case 6:i=new Cesium.ArcGisMapServerImageryProvider({url:e});case 7:for(this.options.hasOwnProperty("layer_index")?this.entity=this.sdk.viewer.imageryLayers.addImageryProvider(i,this.options.layer_index):this.entity=this.sdk.viewer.imageryLayers.addImageryProvider(i),this.entity._id=this.options.id,n=0;n<this.sdk.viewer.imageryLayers._layers.length;n++)this.sdk.viewer.imageryLayers._layers[n]._imageryProvider&&this.sdk.viewer.imageryLayers._layers[n]._imageryProvider._type&&("flw"===this.sdk.viewer.imageryLayers._layers[n]._imageryProvider._type||"jww"===this.sdk.viewer.imageryLayers._layers[n]._imageryProvider._type)&&(o=this.sdk.viewer.imageryLayers._layers[n],this.sdk.viewer.imageryLayers.raiseToTop(o));this.show=this.options.show,this.alpha=this.options.alpha,this.brightness=this.options.brightness,this.options.show&&Qt(0,this.options.id);case 14:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})}]);var i}(ul),dl=function(t){function e(t,i){var n;return k()(this,e),(n=pl(this,e,[t,i])).createArcGis("https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),n}return Xi()(e,t),_()(e)}(hl),ml=function(t){function e(t,i){var n;return k()(this,e),(n=pl(this,e,[t,i])).createArcGis("https://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer"),n}return Xi()(e,t),_()(e)}(hl),fl=function(t){function e(t,i){var n;return k()(this,e),(n=pl(this,e,[t,i])).createArcGis("https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"),n}return Xi()(e,t),_()(e)}(hl);function vl(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var gl=function(t){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),vl(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"layer"}},{key:"createGD",value:function(t){var e=new Cesium.UrlTemplateImageryProvider({url:t,minimumLevel:3,maximumLevel:18,tilingScheme:this.amapMercatorTilingScheme()});this.options.hasOwnProperty("layer_index")?this.entity=this.sdk.viewer.imageryLayers.addImageryProvider(e,this.options.layer_index):this.entity=this.sdk.viewer.imageryLayers.addImageryProvider(e),this.entity._id=this.options.id;for(var i=0;i<this.sdk.viewer.imageryLayers._layers.length;i++)if(this.sdk.viewer.imageryLayers._layers[i]._imageryProvider&&this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type&&("flw"===this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type||"jww"===this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type)){var n=this.sdk.viewer.imageryLayers._layers[i];this.sdk.viewer.imageryLayers.raiseToTop(n)}this.show=this.options.show,this.alpha=this.options.alpha,this.brightness=this.options.brightness,this.options.show&&Qt(0,this.options.id)}}])}(ul),yl=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=vl(this,e,[t,n])).createGD("https://webst02.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8"),i}return Xi()(e,t),_()(e)}(gl),bl=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=vl(this,e,[t,n])).createGD("https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}"),i}return Xi()(e,t),_()(e)}(gl),Cl=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=vl(this,e,[t,n])).createGD("https://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"),i}return Xi()(e,t),_()(e)}(gl);function wl(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return kl(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?kl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function kl(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function xl(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function _l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?xl(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xl(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function El(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Sl(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}function Dl(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Ml(t,e){return t.get(Pl(t,e))}function Pl(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Ol=new WeakMap,Tl=function(t){function e(t,i){var n;return k()(this,e),Dl(n=El(this,e,[t,i]),Ol,void 0),n.setDefaultValue(),n.watchs=[],n.positionCallBack=null,n.rotationCallback=null,n.onClickCallback=null,n._DialogObject=null,n._element_style=null,n.options.accuracy=i.accuracy?Number(i.accuracy.toFixed(1)):1,n.options.position=n.options.position||{},n.oldData={id:n.options.id,transparency:n.options.transparency||0===n.options.transparency?n.options.transparency:1,name:n.options.name,accuracy:n.options.accuracy,url:n.options.url,height:n.options.position.alt||0,lng:n.options.position.lng,lat:n.options.position.lat,scale:n.options.scale||0===n.options.scale?n.options.scale:1,roll:n.options.roll||0,heading:n.options.heading||0,pitch:n.options.pitch||0},n.newData={id:n.options.id,transparency:n.options.transparency||0===n.options.transparency?n.options.transparency:1,name:n.options.name,accuracy:n.options.accuracy,url:n.options.url,height:n.options.position.alt||0,lng:n.options.position.lng,lat:n.options.position.lat,scale:n.options.scale||0===n.options.scale?n.options.scale:1,roll:n.options.roll||0,heading:n.options.heading||0,pitch:n.options.pitch||0},n.tileset=void 0,n.editObj=new Oo(n.sdk),n.editObj.controllerCallBack=n.rotationEditingCallBack,n}return Xi()(e,t),_()(e,[{key:"add",value:(s=o()(a.a.mark((function t(){var e,i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.url){t.next=4;break}return t.abrupt("return",this.loadTileset({url:this.options.url}));case 4:return t.next=6,this.requestResource();case 6:return e=t.sent,t.next=9,e.text();case 9:if(i=t.sent,i=JSON.parse(i),![0,200].includes(i.code)){t.next=19;break}if(!i.data.url.length){t.next=16;break}return t.abrupt("return",this.loadTileset(i.data));case 16:return t.abrupt("return",new Promise((function(t,e){e("资源不存在")})));case 17:t.next=20;break;case 19:return t.abrupt("return",new Promise((function(t,e){e(i.msg||i.message)})));case 20:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"loadSceneTree",value:function(){}},{key:"loadTileset",value:(n=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=_l({},e),n="",i.url.startsWith("http")||i.url.includes(":")?n=i.url:this.options.host?(o=new URL(i.url,this.options.host),n=o.href):n=i.url,t.next=5,fetch(n,{method:"get",headers:{"Content-Type":"application/json"}});case 5:if(200!==(s=t.sent).status){t.next=10;break}return t.next=9,s.json();case 9:this.tileset=t.sent;case 10:if(r={show:this.options.show,skipLevelOfDetail:!0,baseScreenSpaceError:1024,maximumScreenSpaceError:32,skipScreenSpaceErrorFactor:16,skipLevels:1,immediatelyLoadDesiredLevelOfDetail:!1,loadSiblings:!0,cullWithChildrenBounds:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preloadWhenHidden:!1,preferLeaves:!0,maximumCacheOverflowBytes:128,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceErrorDensity:.1,dynamicScreenSpaceErrorFactor:1,dynamicScreenSpaceError:!0},!(Number(Cesium.VERSION.split(".")[1])>=107)){t.next=19;break}return t.next=14,Cesium.Cesium3DTileset.fromUrl(n,r);case 14:l=t.sent,this.entity=l,this.entity.imageBasedLighting.luminanceAtZenith=.1,t.next=25;break;case 19:return r.url=n,l=new Cesium.Cesium3DTileset(r),t.next=23,l.readyPromise;case 23:this.entity=t.sent,this.entity.imageBasedLighting.luminanceAtZenith=.1;case 25:return t.next=27,this.loadSceneTree(n);case 27:if(c=function(t){if(t._contents)for(var e=0;e<t._contents.length;e++)c(t._contents[e]);else for(var i=0;i<t.featuresLength;i++){var n=t.getFeature(i),o=n.content.url,s=n.getProperty("id");if(m.features.has(s))if(m.features.get(s).features){if(m.features.get(s).features[o]){if(m.features.get(s).features[o].customColor&&(n.color=m.features.get(s).features[o].customColor,n.customColor=m.features.get(s).features[o].customColor),m.features.get(s).features[o].customAlpha){var a=n.color;n.color=Cesium.Color.fromCssColorString("rgba(".concat(Cesium.Color.floatToByte(a.red),",").concat(Cesium.Color.floatToByte(a.green),",").concat(Cesium.Color.floatToByte(a.blue),",").concat(m.features.get(s).features[o].customAlpha,")")),n.customAlpha=m.features.get(s).features[o].customAlpha}m.features.get(s).features[o].customShow&&(n.show=m.features.get(s).features[o].customShow,n.customShow=m.features.get(s).features[o].customShow)}m.features.get(s).features[o]=n}else{var r={};if(m.features.get(s).customColor&&(n.color=m.features.get(s).customColor,n.customColor=m.features.get(s).customColor),m.features.get(s).customAlpha){var l=n.color;n.color=Cesium.Color.fromCssColorString("rgba(".concat(Cesium.Color.floatToByte(l.red),",").concat(Cesium.Color.floatToByte(l.green),",").concat(Cesium.Color.floatToByte(l.blue),",").concat(m.features.get(s).customAlpha,")")),n.customAlpha=m.features.get(s).customAlpha}m.features.get(s).customShow&&(n.show=m.features.get(s).customShow,n.customShow=m.features.get(s).customShow),r[o]=n,m.features.get(s).features=r}else{var u={};u[o]=n,m.features.set(s,{features:u})}n.customColor||(n.customColor=Cesium.Color.fromCssColorString("#ffffff"))}},this.sdk&&this.sdk.viewer&&this.sdk.viewer.scene){t.next=30;break}return t.abrupt("return");case 30:l.tileLoad.addEventListener((function(t){var e,i,n;c(t._content),clearTimeout(Ml(Ol,m)),e=Ol,i=m,n=setTimeout((function(){clearTimeout(Ml(Ol,m));var t,e=m.cartesian3Towgs84(l.boundingSphere.center,m.sdk.viewer),i=turf.circle([e.lng,e.lat],l.boundingSphere.radius/1e3,{steps:360,units:"kilometers"}),n=wl(m.sdk.entityMap);try{for(n.s();!(t=n.n()).done;){var o=y()(t.value,2),s=(o[0],o[1]);if("BillboardObject"===s.type&&3==s.heightMode){var a=turf.point([s.lng,s.lat]);turf.booleanPointInPolygon(a,i)&&s.updateHeight()}else s.label&&(s.label.show=s.label.show)}}catch(t){n.e(t)}finally{n.f()}}),500),e.set(Pl(e,i),n)})),this.entity._root.originalTransform=_l({},this.entity._root.transform),this.entity.id=this.options.id||this.randomString(),this.entity.type=this.type,this.sdk.viewer.scene.primitives.add(l),!this.options.position||"{}"==JSON.stringify(this.options.position)||!this.options.position.lng&&0!==this.options.position.lng||!this.options.position.lat&&0!==this.options.position.lat?(this.options.position={},d=Cesium.Cartographic.fromCartesian(this.entity.boundingSphere.center),this.tileset.root.transform&&(d=Cesium.Cartographic.fromCartesian({x:this.tileset.root.transform[12],y:this.tileset.root.transform[13],z:this.tileset.root.transform[14]})),this.entity.original={lng:Cesium.Math.toDegrees(d.longitude),lat:this.oldData.lat=Cesium.Math.toDegrees(d.latitude),height:d.height},this.lng=this.oldData.lng=Cesium.Math.toDegrees(d.longitude),this.lat=this.oldData.lat=Cesium.Math.toDegrees(d.latitude),this.height=this.oldData.height=d.height):(this.options.position.alt,this.options.position.alt,u=Cesium.Cartographic.fromCartesian(this.entity.boundingSphere.center),this.tileset.root.transform&&(u=Cesium.Cartographic.fromCartesian({x:this.tileset.root.transform[12],y:this.tileset.root.transform[13],z:this.tileset.root.transform[14]})),this.entity.original={lng:Cesium.Math.toDegrees(u.longitude),lat:Cesium.Math.toDegrees(u.latitude),height:u.height},p=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(this.options.position.lng,this.options.position.lat,this.options.position.alt)),h=Cesium.Matrix4.fromUniformScale(this.oldData.scale),this.tileset.root.transform&&Cesium.Matrix4.multiply(p,h,this.entity._root.transform),this.lng=this.oldData.lng,this.lat=this.oldData.lat,this.height=this.oldData.height),this.scale=this.oldData.scale,this.roll=this.oldData.roll,this.heading=this.oldData.heading,this.pitch=this.oldData.pitch,this.transparency=this.oldData.transparency,re(this.sdk,this.options.id),ft(this.entity.id,this.mouseMoveCB,this);case 43:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"remove",value:function(){Sl(e,"remove",this,3)([]),this.editObj.destroy(),this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&(this._DialogObject.close(),this._DialogObject=null)}},{key:"flyTo",value:function(){Sl(e,"flyTo",this,3)([])}},{key:"on",value:function(){return this.add()}},{key:"setDefaultValue",value:function(){Sl(e,"setDefaultValue",this,3)([]),this.options.host=this.options.host||h(),this.options.url=this.options.url||""}},{key:"position",get:function(){var t=Cesium.Cartographic.fromCartesian(this.entity.boundingSphere.center);this.tileset.root.transform&&(t=Cesium.Cartographic.fromCartesian({x:this.tileset.root.transform[12],y:this.tileset.root.transform[13],z:this.tileset.root.transform[14]}));var e=Cesium.Math.toDegrees(t.longitude+6.63814e-9),i=Cesium.Math.toDegrees(t.latitude+2.5137835e-7);return this.newData.lng&&this.newData.lat&&this.newData.height?{lng:this.newData.lng,lat:this.newData.lat,height:this.newData.height}:{lng:e,lat:i,height:t.height-2.19104611043234}},set:function(t){}},{key:"rotationEditing",get:function(){return"rtation"===this.editObj.getActiveState()},set:function(t){if(!this.tileset.root.transform)return window.ELEMENT&&(window.ELEMENT.Message.closeAll(),window.ELEMENT.Message({message:"该模型不支持移动和旋转!",type:"warning",duration:1500})),void console.warn("该模型不支持移动和旋转!");t?(this.editObj.position={lng:this.newData.lng,lat:this.newData.lat,alt:this.newData.height},this.editObj.update(),this.editObj.editRtation()):this.editObj.destroy()}},{key:"positionEditing",get:function(){return"translational"===this.editObj.getActiveState()},set:function(t){if(this.sdk&&this.sdk.viewer&&this.entity)return this.tileset.root.transform?void(t?(this.editObj.position={lng:this.newData.lng,lat:this.newData.lat,alt:this.newData.height},this.editObj.update(),this.editObj.editTranslational()):this.editObj.destroy()):(window.ELEMENT&&(window.ELEMENT.Message.closeAll(),window.ELEMENT.Message({message:"该模型不支持移动和旋转!",type:"warning",duration:1500})),void console.warn("该模型不支持移动和旋转!"))}},{key:"positionEditingCallBack",get:function(){},set:function(t){}},{key:"rotationEditingCallBack",get:function(){var t=this;return function(e,i){t.lng=e.position.lng,t.lat=e.position.lat,t.height=e.position.alt,t.roll=e.rotate.x,t.heading=e.rotate.y,t.pitch=e.rotate.z}},set:function(t){this._rotationEditingCallBack=t}},{key:"flicker",value:function(){}},{key:"edit",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"show",get:function(){return this.options.show},set:function(t){var e=this;"boolean"==typeof t?(this.options.show=t,this.entity&&(this.entity.show=t),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t),this.options.label&&this.options.label.show&&this.label&&(this.label.show=t),setTimeout((function(){var t,i=e.cartesian3Towgs84(e.entity.boundingSphere.center,e.sdk.viewer),n=turf.circle([i.lng,i.lat],e.entity.boundingSphere.radius/1e3,{steps:360,units:"kilometers"}),o=wl(e.sdk.entityMap);try{for(o.s();!(t=o.n()).done;){var s=y()(t.value,2),a=(s[0],s[1]);if("BillboardObject"===a.type&&3==a.heightMode){var r=turf.point([a.lng,a.lat]);turf.booleanPointInPolygon(r,n)&&a.updateHeight()}else a.label&&(a.label.show=a.label.show)}}catch(t){o.e(t)}finally{o.f()}be(e.sdk,e.options.id),re(e.sdk,e.options.id)}),300)):console.error("参数必须为boolean")}}]);var i,n,s}(sl);function Nl(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Bl(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Bl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Bl(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Ll(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Al(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ll(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ll(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function jl(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Il(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Fl(t,e,i){return t.set(zl(t,e),i),i}function Rl(t,e){return t.get(zl(t,e))}function zl(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Hl=new WeakMap,Vl=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),Il(i=jl(this,e,[t,n]),Hl,void 0),i.picking=!1,i.Dialog=o,i._elms={},i._EventBinding=new hn,i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"tileset"}},{key:"on",value:function(){return this.add()}},{key:"name",get:function(){return this.newData.name},set:function(t){this.newData.name=t,this._elms.name&&this._elms.name.forEach((function(e){e.value=t}))}},{key:"height",get:function(){return this.newData.height},set:function(t){this.newData.height=t,this.options.position.alt=t,this._elms.height&&this._elms.height.forEach((function(e){e.value=t})),this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch)}},{key:"accuracy",get:function(){return this.newData.accuracy},set:function(t){var e=this;this.newData.accuracy=Number(t.toFixed(1)),this.newData.accuracy<.1&&(this.newData.accuracy=.1),this.entity&&(this.entity.maximumScreenSpaceError=32/this.newData.accuracy),this._elms.accuracy&&this._elms.accuracy.forEach((function(t){t.value=e.newData.accuracy}))}},{key:"lng",get:function(){return this.newData.lng},set:function(t){this.newData.lng=t,this.options.position.lng=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch)}},{key:"lat",get:function(){return this.newData.lat},set:function(t){this.newData.lat=t,this.options.position.lat=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch)}},{key:"roll",get:function(){return this.newData.roll},set:function(t){this.newData.roll=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale)}},{key:"heading",get:function(){return this.newData.heading},set:function(t){this.newData.heading=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale)}},{key:"pitch",get:function(){return this.newData.pitch},set:function(t){this.newData.pitch=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale)}},{key:"transparency",get:function(){return this.newData.transparency},set:function(t){if(this.newData){this.newData.transparency=Number(t),this._elms.transparency&&this._elms.transparency.forEach((function(e){e.value=t}));var e=this.newData.transparency;this.entity.style=new Cesium.Cesium3DTileStyle({color:{conditions:[["Boolean(${SIZE})","${COLOR} * color('rgba(255,255,255)', "+e+")"],["true","color('rgba(255,255,255,"+e+")')"]]},show:!0})}}},{key:"edit",value:(i=o()(a.a.mark((function t(){var e,i,n,o=this,s=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=s.length>0&&void 0!==s[0]&&s[0],this._element_style=null,this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=21;break}return this._element_style=document.createElement("style"),this._element_style.type="text/css",this._element_style.setAttribute("data-name","YJ_style_dialog"),this._element_style.innerHTML="\n .YJ-custom-base-dialog>.content {\n width: 420px;\n }\n .YJ-custom-base-dialog>.content .row .label {\n flex: 0 0 45px;\n }\n",t.next=11,new Ki(this.sdk,this.newData,{title:"倾斜模型属性",left:"180px",top:"100px",confirmCallBack:function(t){o.oldData.name=o.newData.name,o.oldData.height=o.newData.height,o.oldData.lng=o.newData.lng,o.oldData.lat=o.newData.lat,o.oldData.transparency=o.newData.transparency,o.oldData.scale=o.newData.scale,o.oldData.roll=o.newData.roll,o.oldData.heading=o.newData.heading,o.oldData.pitch=o.newData.pitch,o.oldData.type=o.type,o.oldData.accuracy=o.newData.accuracy,o._DialogObject.close(),o.Dialog.confirmCallBack&&o.Dialog.confirmCallBack(Al(Al({},o.oldData),{},{type:o.type})),re(o.sdk,o.oldData.id)},resetCallBack:function(){o.reset(),o.Dialog.resetCallBack&&o.Dialog.resetCallBack()},removeCallBack:function(){o.Dialog.removeCallBack&&o.Dialog.removeCallBack()},closeCallBack:function(){o.reset(),o.positionEditing&&(o.positionEditing=!1),o.rotationEditing&&(o.rotationEditing=!1),o.Dialog.closeCallBack&&o.Dialog.closeCallBack()},showCallBack:function(t){o.newData.show=t,o.entity&&(o.entity.show=t),o.Dialog.showCallBack&&o.Dialog.showCallBack()},rotateCallBack:function(){o.rotationEditing?o.rotationEditing=!1:o.rotationEditing=!0},translationalCallBack:function(){o.positionEditing?o.positionEditing=!1:o.positionEditing=!0}},!0);case 11:this._DialogObject=t.sent,document.getElementsByTagName("head")[0].appendChild(this._element_style),(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" @model="name">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-3">\n <input class="input" type="number" title="" @model="height">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">精度</span>\n <div class="input-number input-number-unit-3">\n <input class="input" type="number" title="" min="0.1" max="10" step="0.1" @model="accuracy">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">透视</span>\n <input type="range" min="0" max="1" step="0.01" @model="transparency">\n </div>\n </div>\n </div>\n ',this._DialogObject.contentAppChild(i),n=i.getElementsByTagName("*"),this._EventBinding.on(this,n),this._elms=this._EventBinding.element,t.next=21;break;case 21:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"updateModel",value:function(t,e,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;if(!this.tileset.root.transform)return window.ELEMENT&&(window.ELEMENT.Message.closeAll(),window.ELEMENT.Message({message:"该模型不支持移动和旋转!",type:"warning",duration:1500})),void console.warn("该模型不支持移动和旋转!");if(!(!t&&0!==t||!e&&0!==e||!i&&0!==i)){var l=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(o)),c=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(s)),u=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(a)),p=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(t,e,i)),h=Cesium.Matrix4.fromRotationTranslation(l),d=Cesium.Matrix4.fromRotationTranslation(c),m=Cesium.Matrix4.fromRotationTranslation(u),f=new Cesium.Matrix4;Cesium.Matrix4.multiply(p,h,f),Cesium.Matrix4.multiply(f,d,f),Cesium.Matrix4.multiply(f,m,f);var v=Cesium.Matrix4.fromUniformScale(r);Cesium.Matrix4.multiply(f,v,this.entity._root.transform),this.editObj.activeAxis||(this.editObj.position={lng:t,lat:e,alt:i}),this.editObj.activeCircle||(this.editObj.rotate={x:o,y:s,z:a}),this.editObj&&this.editObj.update(),clearTimeout(Rl(Hl,this)),Fl(Hl,this,setTimeout((function(){clearTimeout(Rl(Hl,n));var t,e=n.cartesian3Towgs84(n.entity.boundingSphere.center,n.sdk.viewer),i=turf.circle([e.lng,e.lat],n.entity.boundingSphere.radius/1e3,{steps:360,units:"kilometers"}),o=Nl(n.sdk.entityMap);try{for(o.s();!(t=o.n()).done;){var s=y()(t.value,2),a=(s[0],s[1]);if("BillboardObject"===a.type&&3==a.heightMode){var r=turf.point([a.lng,a.lat]);turf.booleanPointInPolygon(r,i)&&a.updateHeight()}else a.label&&(a.label.show=a.label.show)}}catch(t){o.e(t)}finally{o.f()}}),300))}}},{key:"reset",value:function(){this.editObj.destroy(),this.entity&&(this.transparency=this.oldData.transparency,this.name=this.oldData.name,this.height=this.oldData.height,this.lng=this.oldData.lng,this.lat=this.oldData.lat,this.roll=this.oldData.roll,this.heading=this.oldData.heading,this.pitch=this.oldData.pitch,this.scale=this.oldData.scale,this.accuracy=this.oldData.accuracy,this.entity.style=new Cesium.Cesium3DTileStyle({color:{conditions:[["Boolean(${SIZE})","${COLOR} * color('rgba(255,255,255)', "+this.transparency+")"],["true","color('rgba(255,255,255,"+this.transparency+")')"]]},show:!0}))}}]);var i}(Tl);function Gl(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ul(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ul(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Ul(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Wl(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Yl(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Wl(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Wl(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Jl(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function ql(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Xl(t,e,i){return t.set(Kl(t,e),i),i}function Zl(t,e){return t.get(Kl(t,e))}function Kl(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var $l=new WeakMap,Ql=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),ql(i=Jl(this,e,[t,n]),$l,void 0),i.picking=!1,i.features=n.features||[],i.exportStateArray=[],i.Dialog=o,i._elms={},i._EventBinding=new hn,i.Dialog.exportState=function(t){i.exportState(t)},i.Dialog.exportProperty=function(t){i.exportProperty(i.exportStateArray)},i.features=new Map,i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"bim"}},{key:"name",get:function(){return this.newData.name},set:function(t){this.newData.name=t,this._elms.name&&this._elms.name.forEach((function(e){e.value=t}))}},{key:"lng",get:function(){return this.newData.lng},set:function(t){this.newData.lng=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale),this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.newData.lat},set:function(t){this.newData.lat=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale),this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"height",get:function(){return this.newData.height},set:function(t){this.newData.height=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale),this._elms.height&&this._elms.height.forEach((function(e){e.value=t}))}},{key:"roll",get:function(){return this.newData.roll},set:function(t){this.newData.roll=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale),this._elms.roll&&this._elms.roll.forEach((function(e){e.value=t}))}},{key:"heading",get:function(){return this.newData.heading},set:function(t){this.newData.heading=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale),this._elms.heading&&this._elms.heading.forEach((function(e){e.value=t}))}},{key:"pitch",get:function(){return this.newData.pitch},set:function(t){this.newData.pitch=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale),this._elms.pitch&&this._elms.pitch.forEach((function(e){e.value=t}))}},{key:"scale",get:function(){return this.newData.scale},set:function(t){this.newData.scale=t,this.updateModel(this.newData.lng,this.newData.lat,this.newData.height,this.newData.roll,this.newData.heading,this.newData.pitch,this.newData.scale),this._elms.scale&&this._elms.scale.forEach((function(e){e.value=t}))}},{key:"loadSceneTree",value:(r=o()(a.a.mark((function t(e){var i,n=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=e.split("/"))[i.length-1]="scenetree.json",t.next=4,Cesium.Resource.fetchJson({url:i.join("/")}).then((function(t){n.scenetree=t;var e=function(t){t.forEach((function(t){n.features.has(t.id)?n.features.get(t.id).sphere=t.sphere:n.features.set(t.id,{sphere:t.sphere}),t.children&&e(t.children)}))};e(t.scenes[0].children)}));case 4:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"edit",value:(s=o()(a.a.mark((function t(e){var i,n,o=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=16;break}return t.next=6,new Ki(this.sdk,this.newData,{title:"BIM模型属性",left:"180px",top:"100px",resetCallBack:function(){o.reset(),o.Dialog.resetCallBack&&o.Dialog.resetCallBack()},confirmCallBack:function(t){o.name=o.name.trim(),o.name||(o.name="未命名对象"),o.oldData.name=o.newData.name,o.oldData.height=o.newData.height,o.oldData.lng=o.newData.lng,o.oldData.lat=o.newData.lat,o.oldData.scale=o.newData.scale,o.oldData.roll=o.newData.roll,o.oldData.heading=o.newData.heading,o.oldData.pitch=o.newData.pitch,o._DialogObject.close();var e=new Map;o.features.forEach((function(t,i){var n=Yl({},t);delete n.features,e.set(i,n)})),o.Dialog.confirmCallBack&&o.Dialog.confirmCallBack(Yl(Yl({},o.oldData),{},{features:e,type:o.type})),re(o.sdk,o.oldData.id)},removeCallBack:function(){o.Dialog.removeCallBack&&o.Dialog.removeCallBack()},closeCallBack:function(){o.reset(),o.editObj.destroy(),o.Dialog.closeCallBack&&o.Dialog.closeCallBack()},showCallBack:function(t){o.newData.show=t,o.entity&&(o.entity.show=t),o.Dialog.showCallBack&&o.Dialog.showCallBack()},rotateCallBack:function(){o.rotationEditing?o.rotationEditing=!1:o.rotationEditing=!0},translationalCallBack:function(){o.positionEditing?o.positionEditing=!1:o.positionEditing=!0}});case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" tileset-bim",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" @model="name">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">x轴</span>\n <input type="number" title="" min="-180" max="180" @model="roll">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n <div class="col">\n <span class="label">y轴</span>\n <input type="number" title="" min="-180" max="180" @model="heading">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="height">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">z轴</span>\n <input type="number" title="" min="-180" max="180" @model="pitch">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">大小</span>\n <input type="range" max="10" min="0.1" step="0.1" @model="scale">\n <div class="input-number" style="width: 100px;margin-left: 10px;">\n <input type="number" title="" min="0" max="10" step="0.1" @model="scale">\n <span class="arrow"></span>\n </div>\n \n </div>\n </div>\n </div>\n \n <div class="divide">\n <div class="line"></div>\n <p>BIM属性导出选项</p>\n <div class="line"></div>\n </div>\n <div class="row">\n <div style="display: flex;">\n <div class="checkbox-box" @click="exportState">\n <input type="checkbox" value="3">\n <span>修建中</span>\n </div>\n <div class="checkbox-box" @click="exportState">\n <input type="checkbox" value="2">\n <span>未完成</span>\n </div>\n <div class="checkbox-box" @click="exportState">\n <input type="checkbox" value="1">\n <span>已完成</span>\n </div>\n </div>\n <div class="col">\n <button @click="exportProperty">导 出</button>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=i.getElementsByTagName("*"),this._EventBinding.on(this,n),this._elms=this._EventBinding.element,t.next=17;break;case 16:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"featureEdit",value:(n=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d,m=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this,this._element_style=null,this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=46;break}o=function(t){var e='<div class="row property-item">\n <div class="col">\n <input class="input_lable" name="key" value="'.concat(t.key,'">\n <input class="input" name="value" value="').concat(t.value,'">\n <button class="btn add">+</button>\n <button class="btn delete">-</button>\n </div>\n </div>'),i=document.createElement("div");i.innerHTML=e;var s=i.getElementsByClassName("property-item")[0],a=s.querySelector("input[name='key']"),l=s.querySelector("input[name='value']"),c=s.getElementsByClassName("add")[0],p=s.getElementsByClassName("delete")[0];a.addEventListener("input",(function(e){t.key=e.target.value})),l.addEventListener("input",(function(e){t.value=e.target.value})),c.addEventListener("click",(function(){var t={id:n.randomString(),key:"点击此处可编辑",value:""};r.descriptions.push(t),o(t)})),p.addEventListener("click",(function(e){for(var i=0;i<r.descriptions.length;i++)if(r.descriptions[i].id===t.id){r.descriptions.splice(i,1);break}u.removeChild(s)})),u.appendChild(s)},s=i.getProperty("name"),r={id:i.getProperty("id"),name:s,state:i.getProperty("state")||0,descriptions:i.getProperty("descriptions")||[{id:this.randomString(),key:"点击此处可编辑",value:""}]},t.t0=i.getProperty("state"),t.next="0"===t.t0?10:"1"===t.t0?12:"2"===t.t0?14:"3"===t.t0?16:18;break;case 10:return r.stateCH="",t.abrupt("break",18);case 12:return r.stateCH="已完成",t.abrupt("break",18);case 14:return r.stateCH="未完成",t.abrupt("break",18);case 16:return r.stateCH="修建中",t.abrupt("break",18);case 18:return this._element_style=document.createElement("style"),this._element_style.type="text/css",this._element_style.setAttribute("data-name","YJ_style_dialog"),this._element_style.innerHTML="\n .YJ-custom-base-dialog>.content {\n width: 440px;\n }\n .YJ-custom-base-dialog>.content .row .label {\n flex: 0 0 110px;\n }\n .col:first-child {\n margin-right: 10px;\n }\n .col:last-child {\n margin-left: 10px;\n }\n .YJ-custom-base-dialog>.content .divide {\n position: relative;\n display: flex;\n align-items: center;\n margin: 20px 0;\n }\n .YJ-custom-base-dialog>.content .divide .line{\n height: 1px;\n background: #ddd;\n flex: 1;\n }\n .YJ-custom-base-dialog>.content .divide p{\n margin: 0 10px;\n }\n .YJ-custom-base-dialog>.content .property .property-item .btn{\n font-size: 24px;\n line-height: 20px;\n padding: 2px 0;\n }\n .YJ-custom-base-dialog>.content .property .property-item .input_lable {\n flex: 0 0 115px;\n border: none;\n margin-right: 15px;\n text-align: right;\n }\n .YJ-custom-base-dialog>.content .property .property-item:first-child .delete{\n display: none\n }\n .YJ-custom-base-dialog>.content .property .property-item .add{\n display: none;\n }\n .YJ-custom-base-dialog>.content .property .property-item:last-child .add{\n display: inline-block;\n }\n",t.next=24,new W(this.sdk.viewer._container,{title:this.oldData.name+"-----设置状态",left:"calc(50% - 200px)",top:"calc(50% - 200px)",closeCallBack:function(){m.Dialog.closeCallBack&&m.Dialog.closeCallBack()}});case 24:return this._DialogObject=t.sent,t.next=27,this._DialogObject.init();case 27:for(document.getElementsByTagName("head")[0].appendChild(this._element_style),(l=document.createElement("div")).innerHTML='\n <div class="row">\n <div class="col">\n <span class="label">构件名称</span>\n <input class="input" name="name" disabled="disabled">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">选择状态</span>\n <select class="input input-select" name="state-select">\n <option value="0" style="color: #000;">重置</option>\n <option value="1" style="color: #f00;">已完成</option>\n <option value="2" style="color: #0f0;">未完成</option>\n <option value="3" style="color: #00f;">修建中</option>\n </select>\n </div>\n </div>\n <div class="divide">\n <div class="line"></div>\n <p>自定义属性</p>\n <div class="line"></div>\n </div>\n <div class="property">\n </div>\n ',l.querySelector("input[name='name']").value=s,(c=l.querySelector("select[name='state-select']")).value=r.state,c.addEventListener("change",(function(t){switch(r.state=t.target.value,r.state){case"0":r.stateCH="";break;case"1":r.stateCH="已完成";break;case"2":r.stateCH="未完成";break;case"3":r.stateCH="修建中"}})),u=l.getElementsByClassName("property")[0],p=0;p<r.descriptions.length;p++)o(r.descriptions[p],p);h=this._DialogObject._element.foot.getElementsByClassName("translational")[0],this._DialogObject.contentAppChild(l),(d=document.createElement("button")).className="confirm",d.innerHTML="确认",this._DialogObject.footAppChild(d,h),d.addEventListener("click",(function(){for(var t=!1,e=0;e<m.features.length;e++)if(m.features[e].id==r.id){m.features[e]=r,t=!0;break}t||m.features.push(r),i.setProperty("state",r.state),i.setProperty("descriptions",r.descriptions);var n="#fff";switch(r.state){case"0":n="#fff";break;case"1":n="#f00";break;case"2":n="#0f0";break;case"3":n="#00f"}i.color=Cesium.Color.fromCssColorString(n),m._DialogObject.close(),m.Dialog.confirmCallBack&&m.Dialog.confirmCallBack(Yl(Yl({},m.newData),{},{features:m.features}))})),t.next=48;break;case 46:this._element_style&&(document.getElementsByTagName("head")[0].removeChild(this._element_style),this._element_style=null),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 48:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.name=this.oldData.name,this.height=this.oldData.height,this.lng=this.oldData.lng,this.lat=this.oldData.lat,this.roll=this.oldData.roll,this.heading=this.oldData.heading,this.pitch=this.oldData.pitch,this.scale=this.oldData.scale)}},{key:"updateModel",value:function(t,e,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;if(!this.tileset.root.transform)return window.ELEMENT&&(window.ELEMENT.Message.closeAll(),window.ELEMENT.Message({message:"该模型不支持移动和旋转!",type:"warning",duration:1500})),void console.warn("该模型不支持移动和旋转!");if(!(!t&&0!==t||!e&&0!==e||!i&&0!==i)){var l=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(o)),c=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(s)),u=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(a)),p=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(t,e,i)),h=Cesium.Matrix4.fromRotationTranslation(l),d=Cesium.Matrix4.fromRotationTranslation(c),m=Cesium.Matrix4.fromRotationTranslation(u),f=new Cesium.Matrix4;Cesium.Matrix4.multiply(p,h,f),Cesium.Matrix4.multiply(f,d,f),Cesium.Matrix4.multiply(f,m,f);var v=Cesium.Matrix4.fromUniformScale(r);Cesium.Matrix4.multiply(f,v,this.entity._root.transform),this.editObj.activeAxis||(this.editObj.position={lng:t,lat:e,alt:i}),this.editObj.activeCircle||(this.editObj.rotate={x:o,y:s,z:a}),this.editObj&&this.editObj.update(),clearTimeout(Zl($l,this)),Xl($l,this,setTimeout((function(){clearTimeout(Zl($l,n));var t,e=n.cartesian3Towgs84(n.entity.boundingSphere.center,n.sdk.viewer),i=turf.circle([e.lng,e.lat],n.entity.boundingSphere.radius/1e3,{steps:360,units:"kilometers"}),o=Gl(n.sdk.entityMap);try{for(o.s();!(t=o.n()).done;){var s=y()(t.value,2),a=(s[0],s[1]);if("BillboardObject"===a.type&&3==a.heightMode){var r=turf.point([a.lng,a.lat]);turf.booleanPointInPolygon(r,i)&&a.updateHeight()}else a.label&&(a.label.show=a.label.show)}}catch(t){o.e(t)}finally{o.f()}}),300))}}},{key:"getScenetree",value:function(){return this.scenetree}},{key:"featureColor",value:function(t,e){if(this.features.has(t)){var i=this.features.get(t).features;for(var n in i)i[n].content._model&&(i[n].color=Cesium.Color.fromCssColorString(e)),i[n].customColor=Cesium.Color.fromCssColorString(e);this.features.get(t).customColor=Cesium.Color.fromCssColorString(e)}}},{key:"getFeatureColor",value:function(t){if(this.features.has(t)){if(this.features.get(t).customColor)return this.features.get(t).customColor;var e=this.features.get(t).features;for(var i in e)if(e[i].content._model)return e[i].customColor||e[i].color}}},{key:"featureShow",value:function(t,e){if(this.features.has(t)){var i=this.features.get(t).features;for(var n in i)i[n].content._model&&(i[n].show=e),i[n].customShow=e;this.features.get(t).customShow=e}}},{key:"featureFlyto",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.features.has(e)?(i=this.features.get(e).sphere,n=new Cesium.Cartesian3(i[0],i[1],i[2]),o=this.entity._root.originalTransform,o=Cesium.Matrix4.inverse(o,new Cesium.Matrix4),s=this.entity._root.transform,r=Cesium.Matrix4.multiply(s,o,new Cesium.Matrix4),l=Cesium.Matrix4.multiplyByPoint(r,n,new Cesium.Cartesian3),c=this.cartesian3Towgs84(l,this.sdk.viewer),u=Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt+i[3]),ii(0),Je(this.sdk),qe(this.sdk),this.sdk.viewer.camera.flyTo({destination:u}),this.features.forEach((function(t,i){if(i===e){var n=p.getFeatureColor(e);if(p.features.has(e)&&n){var o=p.features.get(e).features;for(var s in o)o[s].content._model&&(o[s].color=n),o[s].customAlpha=1;p.features.get(e).customAlpha=1}}else{var a=p.getFeatureColor(i);if(p.features.has(i)&&a){var r=p.features.get(i).features;for(var l in r)r[l].content._model&&(r[l].color=Cesium.Color.fromCssColorString("rgba(".concat(Cesium.Color.floatToByte(a.red),",").concat(Cesium.Color.floatToByte(a.green),",").concat(Cesium.Color.floatToByte(a.blue),",").concat(.2*a.alpha,")"))),r[l].customAlpha=.2*a.alpha;p.features.get(i).customAlpha=.2*a.alpha}}}))):this.features.forEach((function(t,e){var i=p.features.get(e).features,n=p.getFeatureColor(e);if(n){for(var o in i)i[o].content._model&&(i[o].color=n),i[o].customAlpha=1;p.features.get(e).customAlpha=.2*n.alpha}}));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"exportProperty",value:function(t){if(0!==this.exportStateArray.length){for(var e,i=["name","","","","","","","","","","","","stateCH","descriptions"],n='<Worksheet ss:Name="{nameWS}"><Table><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="120"/><ss:Column ss:Width="240"/>{rows}</Table></Worksheet>',o=function(t,e){return t.replace(/{(\w+)}/g,(function(t,i){return e[i]}))},s="",a="",r="",l=0;l<this.features.length;l++)for(var c=0;c<t.length;c++)if(this.features[l].state==t[c]){for(var u in 0==l&&(r+='<Row><Cell><Data ss:Type="String">构件名称</Data></Cell><Cell><Data ss:Type="String">体积</Data></Cell><Cell><Data ss:Type="String">墩全高H</Data></Cell><Cell><Data ss:Type="String">墩身高h</Data></Cell><Cell><Data ss:Type="String">底部高程</Data></Cell><Cell><Data ss:Type="String">承台宽</Data></Cell><Cell><Data ss:Type="String">承台长</Data></Cell><Cell><Data ss:Type="String">承台高</Data></Cell><Cell><Data ss:Type="String">族</Data></Cell><Cell><Data ss:Type="String">桩径</Data></Cell><Cell><Data ss:Type="String">桩长</Data></Cell><Cell><Data ss:Type="String">结构材质</Data></Cell><Cell><Data ss:Type="String">完成情况</Data></Cell><Cell><Data ss:Type="String">自定义属性</Data></Cell></Row>'),r+="<Row>",i){if(Array.isArray(this.features[l][i[u]])){var p="";for(var h in this.features[l][i[u]])p+="".concat(this.features[l][i[u]][h].key+":"+this.features[l][i[u]][h].value," ");s={nameType:"String",data:p}}else s={nameType:"String",data:this.features[l][i[u]]||"0"};r+=o('<Cell><Data ss:Type="{nameType}">{data}</Data></Cell>',s)}r+="</Row>",l>0&&l/6e4%1==0&&(a+=o(n,s={rows:r,nameWS:"Sheet"+l}),r="",r+='<Row><Cell><Data ss:Type="String">构件名称</Data></Cell><Cell><Data ss:Type="String">体积</Data></Cell><Cell><Data ss:Type="String">墩全高H</Data></Cell><Cell><Data ss:Type="String">墩身高h</Data></Cell><Cell><Data ss:Type="String">底部高程</Data></Cell><Cell><Data ss:Type="String">承台宽</Data></Cell><Cell><Data ss:Type="String">承台长</Data></Cell><Cell><Data ss:Type="String">承台高</Data></Cell><Cell><Data ss:Type="String">族</Data></Cell><Cell><Data ss:Type="String">桩径</Data></Cell><Cell><Data ss:Type="String">桩长</Data></Cell><Cell><Data ss:Type="String">结构材质</Data></Cell><Cell><Data ss:Type="String">完成情况</Data></Cell><Cell><Data ss:Type="String">自定义属性</Data></Cell></Row>')}a+=o(n,s={rows:r,nameWS:"Sheet"}),r="",e=o('<?xml version="1.0"?><?mso-application progid="Excel.Sheet"?><Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"><DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"><Author>Axel Richter</Author><Created>{created}</Created></DocumentProperties><Styles><Style ss:ID="Currency"><NumberFormat ss:Format="Currency"></NumberFormat></Style><Style ss:ID="Date"><NumberFormat ss:Format="Medium Date"></NumberFormat></Style></Styles>{worksheets}</Workbook>',s={created:(new Date).getTime(),worksheets:a});var d,m=document.createElement("A");m.href="data:application/vnd.ms-excel;base64,"+(d=e,window.btoa(unescape(encodeURIComponent(d)))),m.download=this.oldData.name+"--构件属性.xls",m.target="_blank",document.body.appendChild(m),m.click(),document.body.removeChild(m)}else window.ELEMENT&&window.ELEMENT.Message({message:"未选择属性导出选项!",type:"warning",duration:1500})}},{key:"exportState",value:function(t){var e=t.target.getElementsByTagName("input")[0];if(e.checked=!e.checked,e.checked)this.exportStateArray.push(e.value),this.exportStateArray=Array.from(new Set(this.exportStateArray));else for(var i=0;i<this.exportStateArray.length;i++)if(this.exportStateArray[i]==e.value){this.exportStateArray.splice(i,1);break}}}]);var i,n,s,r}(Tl);function tc(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 60px;">颜色</span>\n <div class="color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 60px;">最大比例</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0.1" max="99999" step="0.1" @model="maximumScale">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 60px;">最小像素</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999" @model="minimumPixelSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-99999" max="9999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 60px;">固定大小</span>\n <input class="btn-switch" type="checkbox" @model="scaleByDistance">\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="model-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="方向信息">\n <div>\n <div class="row">\n <p class="lable-left-line">旋转</p>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">x 轴</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="360" min="0" step="0.01" @model="rotateX">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="0" max="360" @model="rotateX">\n <span class="unit">°</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">y 轴</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="360" min="0" step="0.01" @model="rotateY">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="0" max="360" @model="rotateY">\n <span class="unit">°</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">z 轴</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="360" min="0" step="0.01" @model="rotateZ">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="0" max="360" @model="rotateZ">\n <span class="unit">°</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n \n <div class="row">\n <div class="lable-left-line">\n <span>缩放</span>\n <div class="checkbox-box">\n <input type="checkbox">\n <span>是否等比例缩放</span>\n </div>\n </div>\n </div>\n <div class="row no-equal" style="display: none;">\n <div class="row">\n <div class="col">\n <span class="label">x 轴</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="99999" min="0" step="1" @model="scaleX">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="0" max="99999" @model="scaleX">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">y 轴</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="99999" min="0" step="1" @model="scaleY">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="0" max="99999" @model="scaleY">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">z 轴</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="99999" min="0" step="1" @model="scaleZ">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="0" max="99999" @model="scaleZ">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="row equal" style="display: none;">\n <div class="row">\n <div class="col">\n <span class="label">等比例缩放</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="99999" min="0" step="1">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="0" max="99999" step="1">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <p class="lable-left-line">高度</p>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <input style="flex: 1;margin-right: 15px;" type="range" max="999999" min="-99999" step="0.01" @model="alt">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input style="width: 100px;" type="number" title="" min="-99999" max="999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n \n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function ec(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ic(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ec(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ec(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var nc=function(){return _()((function t(e,i){k()(this,t),this.sdk=e,this.model=i,this.activeAxis,this.activeCircle,this.activeModelParam,this.origin,this.rayX,this.rayY,this.rayZ,this.arrow={},this.activeState,this.coordArrows=[],this.coordCircles=[],this.originalMatrix=ic({},i.modelMatrix),this.model.rotate||(this.model.rotate={x:0,y:0,z:0}),this.initParam(),this.MapEvent=new X(this.sdk)}),[{key:"initParam",value:function(){var t=Cesium.Cartographic.fromCartesian(this.model.position),e=Cesium.Math.toDegrees(t.longitude),i=Cesium.Math.toDegrees(t.latitude),n=t.height;return this._params={tx:e,ty:i,tz:n,rx:this.model.rotate.x,ry:this.model.rotate.y,rz:this.model.rotate.z},ic({lng:e,lat:i,alt:n,h:n},this.model.rotate)}},{key:"editTranslational",value:function(){var t=this;this.destroy(),this.activeState="translational",this.MapEvent=new X(this.sdk);var e=this,i=this.initParam(),n=i.lng,o=i.lat,s=i.h,a=this.sdk.viewer;this.origin=Cesium.Cartesian3.fromDegrees(n,o,s);var r=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(this.origin,Cesium.Cartesian3.fromDegrees(n-.001,o,s),new Cesium.Cartesian3),new Cesium.Cartesian3),l=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(this.origin,Cesium.Cartesian3.fromDegrees(n,o-.001,s),new Cesium.Cartesian3),new Cesium.Cartesian3),c=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(this.origin,Cesium.Cartesian3.fromDegrees(n,o,s-1),new Cesium.Cartesian3),new Cesium.Cartesian3);this.rayX=new Cesium.Ray(this.origin,r),this.rayY=new Cesium.Ray(this.origin,l),this.rayZ=new Cesium.Ray(this.origin,c),this.arrow.positionX=Cesium.Ray.getPoint(this.rayX,0),this.arrow.positionY=Cesium.Ray.getPoint(this.rayY,0),this.arrow.positionZ=Cesium.Ray.getPoint(this.rayZ,0);var u=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(n,o,s)),p=a.camera.position,h=Cesium.Cartesian3.distance(p,this.origin)/15;Cesium.Matrix4.multiplyByScale(u,new Cesium.Cartesian3(h,h,h),u);var d=this.createAxisArrow("model_edit_xAxis",[new Cesium.Cartesian3(0,.001,0),new Cesium.Cartesian3(1,0,0)],u,Cesium.Color.RED),m=this.createAxisArrow("model_edit_yAxis",[new Cesium.Cartesian3(0,.001,0),new Cesium.Cartesian3(0,1,0)],u,Cesium.Color.LIME),f=this.createAxisArrow("model_edit_zAxis",[new Cesium.Cartesian3(0,.001,0),new Cesium.Cartesian3(0,0,1)],u,Cesium.Color.BLUE);a.scene.primitives.add(d),a.scene.primitives.add(m),a.scene.primitives.add(f),this.againArrow(),this.sdk.viewer.camera.percentageChanged=.001,this.sdk.viewer.camera.changed.addEventListener(this.againArrow,this);var v,g={x:0,y:0},y=0;this.MapEvent.mouse_move((function(t,i){!function t(i){if(e.activeAxis){var n=i.startPosition.y-i.endPosition.y,o={x:i.endPosition.x-g.x,y:i.endPosition.y-g.y},s=a.camera.getPickRay(o),r=a.scene.globe.pick(s,a.scene),l=new Cesium.Cartesian3,c=Cesium.Transforms.eastNorthUpToFixedFrame(a.camera.position);Cesium.Matrix4.inverse(c,c),Cesium.Matrix4.multiplyByPoint(c,r,l),Cesium.Cartesian3.normalize(l,l);var u=e.initParam(),p=90+Cesium.Math.toDegrees(Math.asin(l.z)),h=Cesium.Cartographic.fromCartesian(a.camera.position).height,d=e.activeModelParam.alt,m=h/Math.cos(Cesium.Math.toRadians(p));new Cesium.EllipsoidGeodesic(Cesium.Cartographic.fromCartesian(r),Cesium.Cartographic.fromCartesian(a.camera.position));r=Cesium.Ray.getPoint(s,m*(1-d/h));var f=Cesium.Cartographic.fromCartesian(r),b=Cesium.Math.toDegrees(f.longitude),C=Cesium.Math.toDegrees(f.latitude);switch(e.activeAxis._name){case"model_edit_xAxis":e._params.tx=b,e._params.ty=e.activeModelParam.lat,e._params.tz=d,e.origin=Cesium.Cartesian3.fromDegrees(u.lng,u.lat,u.alt);var w=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng-.001,u.lat,u.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),k=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng,u.lat-.001,u.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),x=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng,u.lat,u.alt-1),new Cesium.Cartesian3),new Cesium.Cartesian3);e.rayX=new Cesium.Ray(e.origin,w),e.rayY=new Cesium.Ray(e.origin,k),e.rayZ=new Cesium.Ray(e.origin,x);break;case"model_edit_yAxis":e._params.tx=e.activeModelParam.lng,e._params.ty=C,e._params.tz=d,e.origin=Cesium.Cartesian3.fromDegrees(u.lng,u.lat,u.alt);var _=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng-.001,u.lat,u.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),E=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng,u.lat-.001,u.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),S=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng,u.lat,u.alt-1),new Cesium.Cartesian3),new Cesium.Cartesian3);e.rayX=new Cesium.Ray(e.origin,_),e.rayY=new Cesium.Ray(e.origin,E),e.rayZ=new Cesium.Ray(e.origin,S);break;case"model_edit_zAxis":e.activeModelParam.alt+=Cesium.Cartesian3.distance(a.camera.position,Cesium.Cartesian3.fromDegrees(u.lng,u.lat,u.alt))/4300*n*3,e._params.tx=e.activeModelParam.lng,e._params.ty=e.activeModelParam.lat,e._params.tz=e.activeModelParam.alt,e.origin=Cesium.Cartesian3.fromDegrees(u.lng,u.lat,e.activeModelParam.alt);var D=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng-.001,u.lat,e.activeModelParam.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),M=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng,u.lat-.001,e.activeModelParam.alt),new Cesium.Cartesian3),new Cesium.Cartesian3),P=Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(e.origin,Cesium.Cartesian3.fromDegrees(u.lng,u.lat,e.activeModelParam.alt-1),new Cesium.Cartesian3),new Cesium.Cartesian3);e.rayX=new Cesium.Ray(e.origin,D),e.rayY=new Cesium.Ray(e.origin,M),e.rayZ=new Cesium.Ray(e.origin,P)}e.updateModel(e._params.tx,e._params.ty,e._params.tz,e._params.rx,e._params.ry,e._params.rz),e.againArrow()}else{var O=Date.now();if(O-y<100)return clearTimeout(v),void(v=setTimeout((function(){t(i)}),100));clearTimeout(v),y=O;for(var T=e.coordArrows,N=0;N<T.length;N++)if(T[N].getGeometryInstanceAttributes)switch(T[N]._name){case"model_edit_xAxis":T[N].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.RED}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_yAxis":T[N].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.LIME}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_zAxis":T[N].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.BLUE}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}})}for(var B=a.scene.drillPick(i.endPosition,10),L=B.length-1;L>=0;L--){var A=B[L];if(A&&A.primitive&&A.id)switch(A.primitive._name){case"model_edit_xAxis":case"model_edit_yAxis":case"model_edit_zAxis":return void(A.primitive.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.YELLOW}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}))}}}}(t)})),this.MapEvent.mouse_left_down((function(i){var n=a.scene.cartesianToCanvasCoordinates(t.origin);g.x=i.position.x-Math.floor(n.x),g.y=i.position.y-Math.floor(n.y);for(var o=a.scene.drillPick(i.position,10),s=o.length-1;s>=0;s--){var r=o[s];if(r&&r.primitive&&r.primitive._name)if(e.activeAxis)e.activeAxis=null,e.activeModelParam=null,e.controllerCallBack;else switch(r.primitive._name){case"model_edit_xAxis":case"model_edit_yAxis":case"model_edit_zAxis":return a.scene.screenSpaceCameraController.enableRotate=!1,e.activeAxis=r.primitive,e.activeModelParam=e.initParam(),void(r.primitive.appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.YELLOW}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}))}}})),this.MapEvent.mouse_left_up((function(t){a.scene.screenSpaceCameraController.enableRotate=!0;for(var i=0;i<e.coordArrows.length;i++)switch(e.coordArrows[i]._name){case"model_edit_xAxis":e.coordArrows[i].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.RED}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_yAxis":e.coordArrows[i].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.LIME}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}});break;case"model_edit_zAxis":e.coordArrows[i].appearance=new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:Cesium.Color.BLUE}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}})}e.activeAxis&&(e.activeAxis=null,e.activeModelParam=null,e.controllerCallBack)}))}},{key:"againArrow",value:function(){if(this.activeState&&"translational"==this.activeState&&this.origin){this.initParam(),this.origin=new Cesium.Cartesian3.fromDegrees(this._params.tx,this._params.ty,this._params.tz);for(var t=this.sdk.viewer.camera.position,e=Cesium.Cartesian3.distance(t,this.origin)/15,i=Cesium.Transforms.eastNorthUpToFixedFrame(this.origin),n=this.coordArrows,o=0;o<n.length;o++)switch(n[o]._name){case"model_edit_xAxis":case"model_edit_yAxis":case"model_edit_zAxis":Cesium.Matrix4.multiplyByScale(i,new Cesium.Cartesian3(e,e,e),n[o].modelMatrix)}}}},{key:"againCircle",value:function(){if(this.activeState&&"rtation"==this.activeState&&this.origin){this.initParam();for(var t=this.sdk.viewer.camera.position,e=Cesium.Cartesian3.distance(t,this.origin)/15,i=Cesium.Transforms.eastNorthUpToFixedFrame(this.origin),n=this.coordCircles,o=0;o<n.length;o++)switch(n[o]._name){case"model_edit_zCircle":case"model_edit_yCircle":case"model_edit_xCircle":var s=e/20;Cesium.Matrix4.multiplyByScale(i,new Cesium.Cartesian3(s,s,s),n[o].modelMatrix),n[o]._radius=e}}}},{key:"editRtation",value:function(){this.destroy(),this.activeState="rtation",this.MapEvent=new X(this.sdk);var t=this.initParam();this.origin=Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.h),this.createCircle(t.lng,t.lat,t.h,20),this.sdk.viewer.camera.percentageChanged=.001,this.sdk.viewer.camera.changed.addEventListener(this.againCircle,this)}},{key:"createCircle",value:function(t,e,i,n){for(var o=this,s=this.sdk.viewer,a=[],r=0;r<=360;r+=3){var l=Math.sin(Cesium.Math.toRadians(r)),c=n*Math.cos(Cesium.Math.toRadians(r)),u=n*l;a.push(new Cesium.Cartesian3(c,u,0))}var p=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(t,e,i)),h=s.camera.position,d=Cesium.Cartesian3.distance(h,this.origin)/15,m=d/n;Cesium.Matrix4.multiplyByScale(p,new Cesium.Cartesian3(m,m,m),p);var f=this.createAxisSphere("model_edit_zCircle",a,p,Cesium.Color.RED,d);s.scene.primitives.add(f);var v=this.createAxisSphere("model_edit_yCircle",a,p,Cesium.Color.BLUE,d);s.scene.primitives.add(v);var g=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(90)),y=Cesium.Matrix4.fromRotationTranslation(g);Cesium.Matrix4.multiply(v.geometryInstances.modelMatrix,y,v.geometryInstances.modelMatrix);var b=this.createAxisSphere("model_edit_xCircle",a,p,Cesium.Color.LIME,d);s.scene.primitives.add(b);var C=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(90)),w=Cesium.Matrix4.fromRotationTranslation(C);Cesium.Matrix4.multiply(b.geometryInstances.modelMatrix,w,b.geometryInstances.modelMatrix);var k,x=0;this.MapEvent.mouse_move((function(t){!function t(e){var i=ic({},e.endPosition);if(o.activeCircle){var n=Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene,o.ciclkPosition),a=0,r=0,l=0;if(!n)return;var c=e.startPosition.y-i.y,u=e.startPosition.x-i.x;switch(o.activeCircle._name){case"model_edit_xCircle":r=1*u;break;case"model_edit_yCircle":a=1*c;break;case"model_edit_zCircle":l=1*u}o._params.rx-=a,o._params.rx>360&&(o._params.rx=1),o._params.rx<0&&(o._params.rx=360);Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(o._params.rx));o._params.ry-=r,o._params.ry>360&&(o._params.ry=1),o._params.ry<0&&(o._params.ry=360);Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(o._params.ry));o._params.rz-=l,o._params.rz>360&&(o._params.rz=1),o._params.rz<0&&(o._params.rz=360),o.updateModel(o._params.tx,o._params.ty,o._params.tz,o._params.rx,o._params.ry,o._params.rz)}else{var p=Date.now();if(p-x<100)return clearTimeout(k),void(k=setTimeout((function(){t(e)}),100));clearTimeout(k),x=p;for(var h=o.coordCircles,d=0;d<h.length;d++)if(h[d].getGeometryInstanceAttributes){var m=h[d].getGeometryInstanceAttributes(h[d]._name);switch(h[d]._name){case"model_edit_zCircle":m.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED).value;break;case"model_edit_yCircle":m.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE).value;break;case"model_edit_xCircle":m.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.LIME).value}}for(var f=s.scene.drillPick(e.endPosition,10),v=0;v<f.length;v++){var g=f[v];if(g&&g.primitive&&g.id&&g.primitive.getGeometryInstanceAttributes){var y=g.primitive.getGeometryInstanceAttributes(g.id);switch(g.primitive._name){case"model_edit_zCircle":case"model_edit_yCircle":case"model_edit_xCircle":return void(y.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.YELLOW).value)}}}}}(t)})),this.MapEvent.mouse_left_down((function(t){var e=s.scene.pickPosition(t.position);o.ciclkPosition=e;for(var i=s.scene.drillPick(t.position,10),n=0;n<i.length;n++){var a=i[n];if(a&&a.primitive&&a.id)switch(a.primitive._name){case"model_edit_xCircle":case"model_edit_yCircle":case"model_edit_zCircle":return a.primitive.getGeometryInstanceAttributes(a.primitive._name).color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.YELLOW).value,o.activeCircle=a.primitive,o.activeModelParam=o.initParam(),void(s.scene.screenSpaceCameraController.enableRotate=!1)}}o.activeCircle=null,o.activeModelParam=null,s.scene.screenSpaceCameraController.enableRotate=!0})),this.MapEvent.mouse_left_up((function(t){o.activeCircle=null,o.activeModelParam=null,s.scene.screenSpaceCameraController.enableRotate=!0;for(var e=o.coordCircles,i=0;i<e.length;i++)if(e[i].getGeometryInstanceAttributes){var n=e[i].getGeometryInstanceAttributes(e[i]._name);switch(e[i]._name){case"model_edit_zCircle":n.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED).value;break;case"model_edit_yCircle":n.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE).value;break;case"model_edit_xCircle":n.color=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.LIME).value}}}))}},{key:"updateModel",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;this._params.tx=t=parseFloat(parseFloat(t).toFixed(8)),this._params.ty=e=parseFloat(parseFloat(e).toFixed(8)),this._params.tz=i=parseFloat(parseFloat(i).toFixed(2)),this._params.rx=n=parseFloat(n),this._params.ry=o=parseFloat(o),this._params.rz=s=parseFloat(s),this.model.position=new Cesium.Cartesian3.fromDegrees(t,e,i),this.model.rotate={x:n,y:o,z:s};var a=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(n)),r=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(o)),l=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(s)),c=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(t,e,i)),u=Cesium.Matrix4.fromRotationTranslation(a),p=Cesium.Matrix4.fromRotationTranslation(r),h=Cesium.Matrix4.fromRotationTranslation(l),d=new Cesium.Matrix4;Cesium.Matrix4.multiply(c,u,d),Cesium.Matrix4.multiply(d,p,d),Cesium.Matrix4.multiply(d,h,this.model.modelMatrix),this.transformCallBack}},{key:"transformCallBack",get:function(){this._transformCallBack&&this._transformCallBack(this._params)},set:function(t){this._transformCallBack=t}},{key:"createAxisArrow",value:function(t,e,i,n){var o=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({id:t,geometry:new Cesium.PolylineGeometry({positions:e,width:20}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(n)}}),releaseGeometryInstances:!1,appearance:new Cesium.PolylineMaterialAppearance({material:Cesium.Material.fromType(Cesium.Material.PolylineArrowType,{color:n}),translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}),modelMatrix:i});return o._name=t,this.coordArrows.push(o),o}},{key:"createAxisSphere",value:function(t,e,i,n,o){var s=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({id:t,geometry:new Cesium.PolylineGeometry({positions:e,width:5}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(n)}}),releaseGeometryInstances:!1,appearance:new Cesium.PolylineColorAppearance({translucent:!0,renderState:{depthTest:{enabled:!1},depthMask:!1,depthFunction:Cesium.DepthFunction.ALWAYS}}),modelMatrix:i});return s._radius=o,s._name=t,this.coordCircles.push(s),s}},{key:"removeCoordArrows",value:function(){for(var t=0;t<this.coordArrows.length;t++)this.sdk.viewer.scene.primitives.remove(this.coordArrows[t]);this.coordArrows=[]}},{key:"removeCoordCircle",value:function(){for(var t=0;t<this.coordCircles.length;t++)this.sdk.viewer.scene.primitives.remove(this.coordCircles[t]);this.coordCircles=[]}},{key:"update",value:function(){this.againArrow(),this.againCircle()}},{key:"removeAllTools",value:function(){this.removeCoordArrows(),this.removeCoordCircle()}},{key:"destroy",value:function(){this.removeAllTools(),this.activeState=void 0,this.MapEvent&&this.MapEvent.destroy(),this.sdk.viewer.camera.changed.removeEventListener(this.againArrow),this.sdk.viewer.camera.changed.removeEventListener(this.againCircle)}},{key:"getActiveState",value:function(){return this.activeState}},{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(t){this.model=model}}])}();function oc(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var sc=function(t){function e(t,i){return k()(this,e),oc(this,e,[t,i])}return Xi()(e,t),_()(e,[{key:"add",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.url){t.next=2;break}return t.abrupt("return",this.loadModel(this.options.url));case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}}]);var i}(sl);function ac(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return rc(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?rc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function rc(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function lc(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function cc(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?lc(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):lc(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function uc(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function pc(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}function hc(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function dc(t,e,i){return t.set(fc(t,e),i),i}function mc(t,e){return t.get(fc(t,e))}function fc(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var vc=new WeakMap,gc=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),hc(i=uc(this,e,[t,n,o={}]),vc,null),n.position?n.position.lng||0===n.position.lng?n.position.lat||0===n.position.lat?(i.options.earth&&delete i.options.earth,i.picking=!0,i.options.name=n.name||"未命名对象",i.options.color=n.color||"#ffffff","number"==typeof n.scale?(i.options.scale={},i.options.scale.x=n.scale,i.options.scale.y=n.scale,i.options.scale.z=n.scale):(i.options.scale=n.scale||{},i.options.scale.x=i.options.scale.x||0===i.options.scale.x?i.options.scale.x:1,i.options.scale.y=i.options.scale.y||0===i.options.scale.y?i.options.scale.y:1,i.options.scale.z=i.options.scale.z||0===i.options.scale.z?i.options.scale.z:1),i.options.url=n.url,i.options.maximumScale=n.maximumScale||0===n.maximumScale?n.maximumScale:100,i.options.minimumPixelSize=n.minimumPixelSize||0===n.minimumPixelSize?n.minimumPixelSize:60,i.options.position=n.position=n.position||{},i.options.position={lng:n.position.lng,lat:n.position.lat,alt:n.position.alt},i.options.scaleByDistance=!n.scaleByDistance&&!1!==n.scaleByDistance||n.scaleByDistance,i.options.rotate=n.rotate=n.rotate||{},i.options.rotate.x=n.rotate.x||0,i.options.rotate.y=n.rotate.y||0,i.options.rotate.z=n.rotate.z||0,n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera=i.options.attribute.camera.content||[],i.options.attribute.ISC=i.options.attribute.ISC||{},i.options.attribute.ISC.content=i.options.attribute.ISC.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i._elms={},i.entity={id:i.options.id},i.positionCallBack=null,i.rotationCallback=null,i.onClickCallback=null,i._DialogObject=null,i.Dialog=o,i._EventBinding=new hn,i.on(),i):(console.warn("lat is required!"),Wi()(i)):(console.warn("lng is required!"),Wi()(i)):(console.warn("position is required!"),Wi()(i))}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"glb"}},{key:"loadModel",value:(l=o()(a.a.mark((function t(e){var i,n,o,s=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(be(this.sdk,this.options.id),this.sdk&&this.sdk.viewer&&this.sdk.viewer.scene){t.next=3;break}return t.abrupt("return");case 3:if(e=this.replaceHost(e,this.options.host),this.originalOptions=this.deepCopyObj(this.options),i={id:this.options.id,url:e,show:this.options.show,maximumScale:this.options.scaleByDistance?void 0:this.options.maximumScale,minimumPixelSize:this.options.scaleByDistance?void 0:this.options.minimumPixelSize},!(Number(Cesium.VERSION.split(".")[1])>=107)){t.next=13;break}return t.next=10,Cesium.Model.fromGltfAsync(i);case 10:this.entity=t.sent,t.next=16;break;case 13:return t.next=15,Cesium.Model.fromGltf(i);case 15:this.entity=t.sent;case 16:return this.entity.imageBasedLighting.luminanceAtZenith=.6,this.entity.color=Cesium.Color.fromCssColorString(this.options.color),t.next=20,this.sdk.viewer.scene.primitives.add(this.entity);case 20:n=Cesium.Cartographic.fromDegrees(this.options.position.lng,this.options.position.lat,this.options.position.alt),o=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(n),this.entity.position=o,this.entity.rotate=cc({},this.options.rotate),this.entity.customScale=this.options.scale,this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(o),Number(Cesium.VERSION.split(".")[1])>=107?(this.entity.readyEvent.addEventListener((function(){s.entity.originalBoundingSphereRadius=s.entity.boundingSphere.radius,s.editObj=new nc(s.sdk,s.entity),s.editObj.transformCallBack=s.rotationEditingCallBack,s.updateModel(s.options.position.lng,s.options.position.lat,s.options.position.alt,s.options.rotate.x,s.options.rotate.y,s.options.rotate.z,s.options.scale),s.label||(s.label=new Jn(s.sdk,{id:s.options.id,show:!!s.options.show&&s.options.label.show,position:[s.options.position.lng,s.options.position.lat,s.options.position.alt],text:s.options.name,fontSize:s.options.label.fontSize,fontFamily:s.options.label.fontFamily?s.options.label.fontFamily:0,color:s.options.label.color,pixelOffset:s.options.label.pixelOffset,backgroundColor:s.options.label.backgroundColor,lineColor:s.options.label.lineColor,lineWidth:s.options.label.lineWidth,scaleByDistance:s.options.label.scaleByDistance,near:s.options.label.near,far:s.options.label.far},s.entity)),s.entity.isMove=!0,clearTimeout(mc(vc,s)),dc(vc,s,setTimeout((function(){s.entity&&(s.entity.isMove=!1)}),500))})),this.activeAnimate=this.options.activeAnimate,this.modelAnimations=this.entity.loader.components.animations):this.entity.readyPromise.then((function(t){s.entity.originalBoundingSphereRadius=s.entity.boundingSphere.radius,s.editObj=new nc(s.sdk,s.entity),s.editObj.transformCallBack=s.rotationEditingCallBack,s.updateModel(s.options.position.lng,s.options.position.lat,s.options.position.alt,s.options.rotate.x,s.options.rotate.y,s.options.rotate.z,s.options.scale),s.label||(s.label=new Jn(s.sdk,{id:s.options.id,show:!!s.options.show&&s.options.label.show,position:[s.options.position.lng,s.options.position.lat,s.options.position.alt],text:s.options.name,fontSize:s.options.label.fontSize,fontFamily:s.options.label.fontFamily?s.options.label.fontFamily:0,color:s.options.label.color,pixelOffset:s.options.label.pixelOffset,backgroundColor:s.options.label.backgroundColor,lineColor:s.options.label.lineColor,lineWidth:s.options.label.lineWidth,scaleByDistance:s.options.label.scaleByDistance,near:s.options.label.near,far:s.options.label.far,ground:!1},s.entity)),s.entity.isMove=!0,clearTimeout(mc(vc,s)),dc(vc,s,setTimeout((function(){s.entity&&(s.entity.isMove=!1)}),500)),s.activeAnimate=s.options.activeAnimate,s.modelAnimations=s.entity.loader.components.animations})),re(this.sdk,this.options.id);case 28:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getModelAnimations",value:(r=o()(a.a.mark((function t(){var e=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){Number(Cesium.VERSION.split(".")[1])>=107?e.entity.readyEvent.addEventListener((function(){e.modelAnimations=e.entity.loader.components.animations,t(e.modelAnimations)})):e.entity.readyPromise.then((function(i){e.modelAnimations=e.entity.loader.components.animations,t(e.modelAnimations)}))})));case 1:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"remove",value:function(){pc(e,"remove",this,3)([]),this.label&&this.label.remove(),this.positionEditing=!1,this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&(this._DialogObject.close(),this._DialogObject=null)}},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=22;break}if(e={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},i=this.options.customView.relativePosition.lng,n=this.options.customView.relativePosition.lat,o=this.options.customView.relativePosition.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),r={lng:0,lat:0},this.options.position?r=cc({},this.options.position):this.options.positions?r=cc({},this.options.positions[0]):this.options.center?r=cc({},this.options.center):this.options.start?r=cc({},this.options.start):(this.options.hasOwnProperty("lng")&&(r.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(r.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(r.alt=this.options.alt)),r.hasOwnProperty("alt")){t.next=15;break}return t.next=14,this.getClampToHeight(r);case 14:r.alt=t.sent;case 15:i=this.options.customView.relativePosition.lng+r.lng,n=this.options.customView.relativePosition.lat+r.lat,o=this.options.customView.relativePosition.alt+r.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),this.sdk.viewer.camera.flyTo({destination:s,orientation:e}),t.next=23;break;case 22:Number(Cesium.VERSION.split(".")[1])>=107?this.entity.ready&&(l=new Cesium.BoundingSphere(Cesium.Cartesian3.fromDegrees(this.options.position.lng,this.options.position.lat,this.options.position.alt),this.entity.originalBoundingSphereRadius*this.options.scale.z*2),this.sdk.viewer.camera.flyToBoundingSphere(l)):this.entity.readyPromise.then((function(){var t=new Cesium.BoundingSphere(Cesium.Cartesian3.fromDegrees(c.options.position.lng,c.options.position.lat,c.options.position.alt),(c.entity.originalBoundingSphereRadius||c.entity.boundingSphere.radius)*c.options.scale.z*2);c.sdk.viewer.camera.flyToBoundingSphere(t)}));case 23:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"on",value:function(){return this.add()}},{key:"setDefaultValue",value:function(){pc(e,"setDefaultValue",this,3)([]),this.options.host=this.options.host||h(),this.options.url=this.options.url||""}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t,this.entity.color=Cesium.Color.fromCssColorString(t),this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"lng",get:function(){return this.options.position.lng},set:function(t){this.options.position={lng:t,lat:this.options.position.lat,alt:this.options.position.alt},this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.label&&(this.label.position=[this.options.position.lng,this.options.position.lat,this.options.position.alt]),this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.position.lat},set:function(t){this.options.position={lng:this.options.position.lng,lat:t,alt:this.options.position.alt},this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.label&&(this.label.position=[this.options.position.lng,this.options.position.lat,this.options.position.alt]),this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.position.alt},set:function(t){this.options.position={lng:this.options.position.lng,lat:this.options.position.lat,alt:t},this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.label&&(this.label.position=[Number(this.options.position.lng),Number(this.options.position.lat),Number(this.options.position.alt)]),this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t}))}},{key:"maximumScale",get:function(){return this.options.maximumScale},set:function(t){this.options.maximumScale=t,this.entity.maximumScale=this.scaleByDistance?void 0:t,this._elms.maximumScale&&this._elms.maximumScale.forEach((function(e){e.value=t}))}},{key:"minimumPixelSize",get:function(){return this.options.minimumPixelSize},set:function(t){this.options.minimumPixelSize=t,this.entity.minimumPixelSize=this.scaleByDistance?void 0:this.options.minimumPixelSize,this._elms.minimumPixelSize&&this._elms.minimumPixelSize.forEach((function(e){e.value=t}))}},{key:"scaleByDistance",get:function(){return this.options.scaleByDistance},set:function(t){this.options.scaleByDistance=t,this.entity.maximumScale=t?void 0:this.maximumScale,this.entity.minimumPixelSize=t?void 0:this.options.minimumPixelSize,this._elms.scaleByDistance&&this._elms.scaleByDistance.forEach((function(e){e.checked=t}))}},{key:"rotateX",get:function(){return this.options.rotate.x},set:function(t){this.options.rotate.x=t,this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.rotateX&&this._elms.rotateX.forEach((function(e){e.value=t}))}},{key:"rotateY",get:function(){return this.options.rotate.y},set:function(t){this.options.rotate.y=t,this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.rotateY&&this._elms.rotateY.forEach((function(e){e.value=t}))}},{key:"rotateZ",get:function(){return this.options.rotate.z},set:function(t){this.options.rotate.z=t,this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.rotateZ&&this._elms.rotateZ.forEach((function(e){e.value=t}))}},{key:"scaleX",get:function(){return this.options.scale.x},set:function(t){var e=this;this.options.scale.x=Number(Number(t).toFixed(2)),this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.scaleX&&this._elms.scaleX.forEach((function(t){t.value=e.options.scale.x}))}},{key:"scaleY",get:function(){return this.options.scale.y},set:function(t){var e=this;this.options.scale.y=Number(Number(t).toFixed(2)),this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.scaleY&&this._elms.scaleY.forEach((function(t){t.value=e.options.scale.y}))}},{key:"scaleZ",get:function(){return this.options.scale.z},set:function(t){var e=this;this.options.scale.z=Number(Number(t).toFixed(2)),this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.scaleZ&&this._elms.scaleZ.forEach((function(t){t.value=e.options.scale.z}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label&&(this.label.show=t):this.label&&(this.label.show=!1),this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label&&(this.label.color=t),this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label&&(this.label.fontSize=t),this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label&&(this.label.scaleByDistance=t),this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label&&(this.label.lineWidth=t),this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label&&(this.label.pixelOffset=t),this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label&&(this.label.lineColor=t),this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label&&(this.label.backgroundColor=[t,this.label.backgroundColor[1]]),this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label&&(this.label.backgroundColor=[this.label.backgroundColor[0],t]),this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=ac(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=ac(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeISC",get:function(){return this.options.attribute.ISC.content},set:function(t){this.options.attribute.ISC.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=ac(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=ac(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"rotationEditing",get:function(){return"rtation"===this.editObj.getActiveState()},set:function(t){t?this.editObj&&this.editObj.editRtation():this.editObj&&this.editObj.destroy()}},{key:"positionEditing",get:function(){return!(!this.editObj||"translational"!==this.editObj.getActiveState())},set:function(t){this.sdk&&this.sdk.viewer&&this.entity&&(t?(this.leftClickState=vt(),this.editObj&&this.editObj.editTranslational(),new ht(this.sdk)):(this.leftClickState&&!vt()&&new pt(this.sdk),this.editObj&&this.editObj.destroy()))}},{key:"positionEditingCallBack",get:function(){},set:function(t){}},{key:"rotationEditingCallBack",get:function(){var t=this;return function(e){t.lng=e.tx,t.lat=e.ty,t.alt=e.tz,t.rotateX=e.rx,t.rotateY=e.ry,t.rotateZ=e.rz,t._rotationEditingCallBack&&t._rotationEditingCallBack(t.editObj._params)}},set:function(t){this._rotationEditingCallBack=t}},{key:"activeAnimate",get:function(){return this.options.activeAnimate},set:function(t){if(this.options.activeAnimate=t,this.entity&&this.entity.loader.components&&this.modelAnimations&&(this.entity.activeAnimations.removeAll(),this.modelAnimations&&this.modelAnimations.length>0))for(var e=0;e<this.modelAnimations.length;e++)if(this.modelAnimations[e].name===t){this.entity.activeAnimations.add({index:e,loop:Cesium.ModelAnimationLoop.REPEAT,speedup:1,reverse:!1});break}}},{key:"resetAnimate",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.entity){t.next=2;break}return t.abrupt("return");case 2:this.activeAnimate=void 0,this.sdk.viewer.scene.primitives.remove(this.entity),this.on();case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"edit",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f=this,v=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=v.length>0&&void 0!==v[0]&&v[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=46;break}return i=!1,this.scaleX===this.scaleY&&this.scaleX===this.scaleZ&&(i=!0),t.next=9,new Ki(this.sdk,this.originalOptions,{title:"模型属性",left:"180px",top:"100px",confirmCallBack:function(t){f.name=f.options.name||"未命名对象",f.originalOptions=f.deepCopyObj(f.options),f._DialogObject.close();var e=f.deepCopyObj(f.options);e.host="",f.Dialog.confirmCallBack&&f.Dialog.confirmCallBack(e),be(f.sdk,f.options.id),re(f.sdk,f.options.id)},resetCallBack:function(){f.reset(),f.Dialog.resetCallBack&&f.Dialog.resetCallBack()},removeCallBack:function(){f.Dialog.removeCallBack&&f.Dialog.removeCallBack()},closeCallBack:function(){f.reset(),f.positionEditing=!1,f.editObj&&f.editObj.destroy(),f.Dialog.closeCallBack&&f.Dialog.closeCallBack()},showCallBack:function(t){f.show=t,f.Dialog.showCallBack&&f.Dialog.showCallBack()},translationalCallBack:function(){f.positionEditing?f.positionEditing=!1:f.positionEditing=!0}},!0);case 9:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" model",(n=document.createElement("div")).innerHTML=tc(this),this._DialogObject.contentAppChild(n),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,this.attributeISC=this.options.attribute.ISC.content,new dn("model-edit-tabs",void 0,this.sdk),o=this._DialogObject._element.content.getElementsByClassName("checkbox-box")[0].querySelector("input"),s=this._DialogObject._element.content.getElementsByClassName("equal")[0],r=this._DialogObject._element.content.getElementsByClassName("no-equal")[0],o.checked=i,o.addEventListener("change",(function(t){(i=t.target.checked)?(s.style.display="flex",r.style.display="none",f.scaleY=f.scaleX,f.scaleZ=f.scaleX):(s.style.display="none",r.style.display="flex")})),(l=s.getElementsByTagName("input"))[0].value=this.scaleX,l[1].value=this.scaleX,l[0].addEventListener("input",(function(t){f.scaleX=t.target.value,f.scaleY=t.target.value,f.scaleZ=t.target.value})),l[1].addEventListener("input",(function(t){f.scaleX=t.target.value,f.scaleY=t.target.value,f.scaleZ=t.target.value})),i?(s.style.display="flex",r.style.display="none"):(s.style.display="none",r.style.display="flex"),c=new YJColorPicker({el:n.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){f.color=t},clear:function(){f.color="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:n.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){f.labelColor=t},clear:function(){f.labelColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:n.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){f.labelLineColor=t},clear:function(){f.labelLineColor="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){f.labelBackgroundColorStart=t},clear:function(){f.labelBackgroundColorStart="rgba(255,255,255,1)"}}),d=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){f.labelBackgroundColorEnd=t},clear:function(){f.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),m=n.getElementsByTagName("*"),this._EventBinding.on(this,m),this._elms=this._EventBinding.element,this._elms.color=[c],this._elms.labelColor=[u],this._elms.labelLineColor=[p],this._elms.labelBackgroundColorStart=[h],this._elms.labelBackgroundColorEnd=[d],this._elms.scaleX.push(l[0],l[1]),setTimeout((function(){f.attributeLink=f.options.attribute.link.content,f.attributeVr=f.options.attribute.vr.content,f.ISCSelect&&f.ISCSelect(),f.goodsSelect&&f.goodsSelect(),f.cameraSelect&&f.cameraSelect();var t=f.attributeSelect,e=f._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=f._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],o=0;o<t.length;o++)if(t[o].key===f.options.attributeType){n.value=t[o].value,i.legp_searchActive(t[o].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){f.attributeType=t[e].key;break}}))}var s=Rn(),a=Y(f._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(a){a.legp_search(s);var r=f._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];r.value=s[f.labelFontFamily].value;for(var l=0;l<s.length;l++)if(s[l].value==r.value){a.legp_searchActive(s[l].value);break}r.addEventListener("input",(function(){for(var t=0;t<s.length;t++)if(s[t].value===r.value){f.labelFontFamily=s[t].key;break}})),f._elms.labelFontFamily=[r]}}),0),t.next=46;break;case 46:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"setPosition",value:function(t){this.options.position.lng=t.position.lng,this.options.position.lat=t.position.lat,this.options.position.alt=t.position.alt,this.options.rotate.z=-t.heading,this.options.rotate.x=-t.pitch,this.options.rotate.y=-t.roll,this.updateModel(this.options.position.lng,this.options.position.lat,this.options.position.alt,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.label&&(this.label.position=[this.options.position.lng,this.options.position.lat,this.options.position.alt])}},{key:"updateModel",value:function(t,e,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,r=arguments.length>6?arguments[6]:void 0;t=parseFloat(t),e=parseFloat(e),i=parseFloat(parseFloat(i).toFixed(2)),o=parseFloat(o),s=parseFloat(s),a=parseFloat(a),r.x=parseFloat(r.x),r.y=parseFloat(r.y),r.z=parseFloat(r.z),this.entity.position=new Cesium.Cartesian3.fromDegrees(t,e,i),this.entity.rotate={x:o,y:s,z:a},this.entity.customScale=r;var l=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(o)),c=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(s)),u=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(a)),p=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(t,e,i)),h=Cesium.Matrix4.fromRotationTranslation(l),d=Cesium.Matrix4.fromRotationTranslation(c),m=Cesium.Matrix4.fromRotationTranslation(u),f=new Cesium.Matrix4;Cesium.Matrix4.multiply(p,h,f),Cesium.Matrix4.multiply(f,d,f),Cesium.Matrix4.multiply(f,m,this.entity.modelMatrix);var v=r.x,g=r.y,y=r.z;0===v&&(v=1e-5),0===g&&(g=1e-5),0===y&&(y=1e-5),Cesium.Matrix4.multiplyByScale(this.entity.modelMatrix,new Cesium.Cartesian3(v,g,y),this.entity.modelMatrix),this.entity.minimumPixelSize=this.scaleByDistance?void 0:this.options.minimumPixelSize,this.editObj&&this.editObj.update(),this.entity.isMove=!0,clearTimeout(mc(vc,this)),dc(vc,this,setTimeout((function(){n.entity&&(n.entity.isMove=!1)}),500))}},{key:"reset",value:function(){if(this.entity)try{this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lng=this.originalOptions.position.lng,this.lat=this.originalOptions.position.lat,this.alt=this.originalOptions.position.alt,this.maximumScale=this.originalOptions.maximumScale,this.minimumPixelSize=this.originalOptions.minimumPixelSize,this.scaleByDistance=this.originalOptions.scaleByDistance,this.rotateX=this.originalOptions.rotate.x,this.rotateY=this.originalOptions.rotate.y,this.rotateZ=this.originalOptions.rotate.z,this.scaleX=this.originalOptions.scale.x,this.scaleY=this.originalOptions.scale.y,this.scaleZ=this.originalOptions.scale.z,this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.attributeISC=this.options.attribute.ISC.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect()}catch(t){}}}]);var i,n,s,r,l}(sc);function yc(t){return'\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="color"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">最大比例</span>\n <input class="input" type="number" title="" min="0.1" max="99999" step="0.1" @model="maximumScale">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n <div class="col">\n <span class="label">最小像素</span>\n <input class="input" type="number" title="" min="1" max="99999" @model="minimumPixelSize">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n </div>\n <div class="col">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="scaleByDistance">\n </div>\n </div>\n <div class="row">\n <DIV-cy-tabs id="model-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="方向信息">\n <div>\n <div class="row">\n <div class="col">\n <span class="label">x轴</span>\n <input style="width: 332px;" type="range" max="360" min="0" step="0.01" @model="rotateX">\n <input style="font-size: 13px;width: 100px;" type="number" title="" min="0" max="360" @model="rotateX">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">y轴</span>\n <input style="width: 332px;" type="range" max="360" min="0" step="0.01" @model="rotateY">\n <input style="font-size: 13px;width: 100px;" type="number" title="" min="0" max="360" @model="rotateY">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">z轴</span>\n <input style="width: 332px;" type="range" max="360" min="0" step="0.01" @model="rotateZ">\n <input style="font-size: 13px;width: 100px;" type="number" title="" min="0" max="360" @model="rotateZ">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <input style="width: 332px;" type="range" max="999999" min="-99999" step="0.01" @model="alt">\n <input style="font-size: 13px;width: 100px;" type="number" title="" min="-99999" max="999999" @model="alt">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">缩放</span>\n <input style="width: 332px;" type="range" max="999" min="0" step="1" @model="scale">\n <input style="font-size: 13px;width: 100px;" type="number" title="" min="0" max="999" step="1" @model="scale">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ',"\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n ")}function bc(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Cc(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Cc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Cc(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function wc(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function kc(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?wc(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):wc(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function xc(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function _c(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Ec=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=xc(this,e,[t,n,o={}])).picking=!0,i.options.name=n.name||"未命名对象",i.options.color=n.color||"#ffffff",i.options.scale=n.scale||0===n.scale?n.scale:1,i.options.url=n.url,i.options.maximumScale=n.maximumScale||0===n.maximumScale?n.maximumScale:100,i.options.minimumPixelSize=n.minimumPixelSize||0===n.minimumPixelSize?n.minimumPixelSize:60,i.options.positions=n.positions||[],i.options.type=n.type||0,i.options.interval=n.interval||0===n.interval?n.interval:1,i.options.quantity=n.quantity,i.options.scaleByDistance=!n.scaleByDistance&&!1!==n.scaleByDistance||n.scaleByDistance,i.options.rotate=n.rotate=n.rotate||{},i.options.rotate.x=n.rotate.x||0,i.options.rotate.y=n.rotate.y||0,i.options.rotate.z=n.rotate.z||0,i.options.label=n.label=n.label||{},i.options.label.show=!(!n.label.show&&!1!==n.label.show)&&n.label.show,i.options.label.fontSize=n.label.fontSize||20,i.options.label.color=n.label.color||"#ffffff",i.options.label.near=n.label.near||0===n.label.near?n.label.near:2e3,i.options.label.far=n.label.far||0===n.label.far?n.label.far:1e5,i.options.label.scaleByDistance=n.label.scaleByDistance||!1,i.options.label.backgroundColor=n.label.backgroundColor||["#42c6ef","#42c6ef"],i.options.line=n.line=n.line||{},i.options.line.width=n.line.width||2,i.options.line.length=n.line.length||20,i.options.line.color=n.line.color||"#fff000",i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||[],i.options.attributeType=n.attributeType||"richText",i.ModelPositions=[],i._elms={},i.positionCallBack=null,i.rotationCallback=null,i.onClickCallback=null,i._DialogObject=null,i._element_style=null,i.ControllerObject=new Oo(i.sdk),i.ControllerObject.controllerCallBack=function(t){i.lng=t.position.lng,i.lat=t.position.lat,i.alt=t.position.alt},i.Dialog=o,i._EventBinding=new hn,i.on(),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"glb"}},{key:"loadModel",value:(s=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m,f,v,g=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(v=function(t){return new Worker("data:,(".concat(t.toString(),")(").concat(JSON.stringify(m),")"))},f=function(t){var e=t.type,i=t.interval,n=t.positions,o=t.optionsPositions,s=t.quantity,a=t.turfUrl;importScripts(a);var r=[];switch(e){case 1:var l=turf.lineString(n[0]),c=turf.lineChunk(l,i/1e3,{units:"kilometers"});r.push({lng:c.features[0].geometry.coordinates[0][0],lat:c.features[0].geometry.coordinates[0][1]});for(var p=0;p<c.features.length;p++)r.push({lng:c.features[p].geometry.coordinates[1][0],lat:c.features[p].geometry.coordinates[1][1]});break;case 2:var h=turf.polygon(n),d=turf.bbox(h);u=turf.pointGrid(d,i/1e3,{units:"kilometers"});for(var m=turf.pointsWithinPolygon(u,h),f=0;f<m.features.length;f++)r.push({lng:m.features[f].geometry.coordinates[0],lat:m.features[f].geometry.coordinates[1]});break;case 3:if(s)for(var v=o[0].lng,g=o[0].lat,y=o[2].lng,b=o[2].lat,C=turf.point([v,b]),w=turf.point([y,b]),k=turf.distance(C,w,{units:"kilometers"})/s.x,x=turf.point([v,b]),_=turf.point([v,g]),E=turf.distance(x,_,{units:"kilometers"})/s.y,S=turf.lineString([[v,b],[y,b]]),D=turf.lineChunk(S,k,{units:"kilometers"}),M=turf.lineString([[v,b],[v,g]]),P=turf.lineChunk(M,E,{units:"kilometers"}),O=0;O<D.features.length;O++)for(var T=D.features[O].geometry.coordinates,N=0;N<P.features.length;N++){var B=P.features[N].geometry.coordinates;r.push({lng:(T[0][0]+T[1][0])/2,lat:(B[0][1]+B[1][1])/2})}else{u=turf.pointGrid([o[0].lng,o[0].lat,o[2].lng,o[2].lat],i/1e3,{units:"kilometers"});for(var A=0;A<u.features.length;A++)r.push({lng:u.features[A].geometry.coordinates[0],lat:u.features[A].geometry.coordinates[1]})}break;default:r=L()(o)}self.postMessage(r)},e.startsWith("http")||e.includes(":")||this.options.host&&(i=new URL(e,this.options.host),e=i.href),this.originalOptions=this.deepCopyObj(this.options),new Cesium.PrimitiveCollection,n=[[]],o=this.options.positions[0].alt,s=0;s<this.options.positions.length;s++)n[0].push([this.options.positions[s].lng,this.options.positions[s].lat]),this.options.positions[s].alt>this.options.height&&(o=this.options.positions[s].alt);n[0].length>2?(n[0].push([this.options.positions[0].lng,this.options.positions[0].lat]),r=turf.polygon(n),l=turf.pointOnFeature(r),this.center={lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1]}):2==n[0].length?this.center={lng:(this.options.positions[0].lng+this.options.positions[1].lng)/2,lat:(this.options.positions[0].lat+this.options.positions[1].lat)/2}:this.center={lng:this.options.positions[0].lng,lat:this.options.positions[0].lat},c=[],this.options.height||0===this.options.height||(this.options.height=o),p=document.scripts,h="",d=0;case 14:if(!(d<p.length)){t.next=21;break}if(!p[d].src||!p[d].src.includes("turf.min.js")){t.next=18;break}return h=p[d].src&&p[d].src,t.abrupt("break",21);case 18:d++,t.next=14;break;case 21:m={type:this.options.type,interval:this.options.interval,positions:n,optionsPositions:this.options.positions,quantity:this.options.quantity,turfUrl:h},v(f).onmessage=function(t){g.ModelPositions=c=t.data;for(var i=[],n=0;n<c.length;n++){var o=Cesium.Cartesian3.fromDegrees(c[n].lng,c[n].lat,g.options.height),s=Cesium.Transforms.headingPitchRollToFixedFrame(o,new Cesium.HeadingPitchRoll(0,0,0));Cesium.Matrix4.multiplyByUniformScale(s,1,s),i.push({modelMatrix:s})}g.label=new Jn(g.sdk,{show:!!g.options.show&&g.options.label.show,position:[g.center.lng,g.center.lat,g.options.height],text:g.options.name,fontSize:g.options.label.fontSize,color:g.options.label.color,pixelOffset:g.options.line.length,backgroundColor:g.options.label.backgroundColor,lineColor:g.options.line.color,lineWidth:g.options.line.width,scaleByDistance:g.options.label.scaleByDistance,near:g.options.label.near,far:g.options.label.far}),g.entity=new Cesium2.ModelInstanceCollection({url:e,instances:i}),g.entity.position=new Cesium.Cartesian3.fromDegrees(g.center.lng,g.center.lat,g.options.height),g.entity.rotate={x:g.options.rotate.x,y:g.options.rotate.y,z:g.options.rotate.z},g.updateModel(g.center.lng,g.center.lat,g.options.height,g.options.rotate.x,g.options.rotate.y,g.options.rotate.z,g.options.scale),g.sdk.viewer.scene.primitives.add(g.entity)};case 24:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"remove",value:function(){_c(e,"remove",this,3)([]),this.label.remove(),this.positionEditing=!1,this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&(this._DialogObject.close(),this._DialogObject=null)}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=22;break}if(e={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},i=this.options.customView.relativePosition.lng,n=this.options.customView.relativePosition.lat,o=this.options.customView.relativePosition.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),r={lng:0,lat:0},this.options.position?r=kc({},this.options.position):this.options.positions?r=kc({},this.options.positions[0]):this.options.center?r=kc({},this.options.center):this.options.start?r=kc({},this.options.start):(this.options.hasOwnProperty("lng")&&(r.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(r.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(r.alt=this.options.alt)),r.hasOwnProperty("alt")){t.next=15;break}return t.next=14,this.getClampToHeight(r);case 14:r.alt=t.sent;case 15:i=this.options.customView.relativePosition.lng+r.lng,n=this.options.customView.relativePosition.lat+r.lat,o=this.options.customView.relativePosition.alt+r.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),this.sdk.viewer.camera.flyTo({destination:s,orientation:e}),t.next=23;break;case 22:this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.center.lng,this.center.lat,this.options.height+500)});case 23:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"on",value:function(){return this.add()}},{key:"setDefaultValue",value:function(){_c(e,"setDefaultValue",this,3)([]),this.options.host=this.options.host||h(),this.options.url=this.options.url||""}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t,this.entity.color=Cesium.Color.fromCssColorString(t),this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"lng",get:function(){return this.center.lng},set:function(t){this.center.lng=t,this._ControllerChangePosition(50),this.updateModel(this.center.lng,this.center.lat,this.options.height,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.label.position=[this.center.lng,this.center.lat,this.options.height],this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.center.lat},set:function(t){this.center.lat=t,this._ControllerChangePosition(50),this.updateModel(this.center.lng,this.center.lat,this.options.height,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.label.position=[this.center.lng,this.center.lat,this.options.height],this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.height},set:function(t){this.center.alt=t,this.options.height=t,this._ControllerChangePosition(50),this.updateModel(this.center.lng,this.center.lat,this.options.height,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.label.position=[Number(this.center.lng),Number(this.center.lat),Number(this.options.height)],this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t}))}},{key:"_ControllerChangePosition",value:function(t){var e=this;clearTimeout(e._ControllerChangePositionEvent),e._ControllerChangePositionEvent=setTimeout((function(){e.ControllerObject.position={lng:e.center.lng,lat:e.center.lat,alt:e.options.height}}),t)}},{key:"maximumScale",get:function(){return this.options.maximumScale},set:function(t){this.options.maximumScale=t,this.entity.maximumScale=this.scaleByDistance?void 0:t,this._elms.maximumScale&&this._elms.maximumScale.forEach((function(e){e.value=t}))}},{key:"minimumPixelSize",get:function(){return this.options.minimumPixelSize},set:function(t){this.options.minimumPixelSize=t,this.entity.minimumPixelSize=this.scaleByDistance?void 0:t,this._elms.minimumPixelSize&&this._elms.minimumPixelSize.forEach((function(e){e.value=t}))}},{key:"scaleByDistance",get:function(){return this.options.scaleByDistance},set:function(t){this.options.scaleByDistance=t,this.entity.maximumScale=t?void 0:this.maximumScale,this.entity.minimumPixelSize=t?void 0:this.minimumPixelSize,this._elms.scaleByDistance&&this._elms.scaleByDistance.forEach((function(e){e.checked=t}))}},{key:"rotateX",get:function(){return this.options.rotate.x},set:function(t){this.options.rotate.x=t,this.updateModelRotate(this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.rotateX&&this._elms.rotateX.forEach((function(e){e.value=t}))}},{key:"rotateY",get:function(){return this.options.rotate.y},set:function(t){this.options.rotate.y=t,this.updateModelRotate(this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.rotateY&&this._elms.rotateY.forEach((function(e){e.value=t}))}},{key:"rotateZ",get:function(){return this.options.rotate.z},set:function(t){this.options.rotate.z=t,this.updateModelRotate(this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.rotateZ&&this._elms.rotateZ.forEach((function(e){e.value=t}))}},{key:"scale",get:function(){return this.options.scale},set:function(t){this.options.scale=t,this.updateModelRotate(this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this._elms.scale&&this._elms.scale.forEach((function(e){e.value=t}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){this.options.line.width=t,this.label.lineWidth=t,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(e){e.value=t}))}},{key:"lineLength",get:function(){return this.options.line.length},set:function(t){this.options.line.length=t,this.label.pixelOffset=t,this._elms.lineLength&&this._elms.lineLength.forEach((function(e){e.value=t}))}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t,this.label.lineColor=t,this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,255,255,1)"}});e._elms.lineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.labelBackgroundColorEnd],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.labelBackgroundColorStart,t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=bc(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=bc(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera},set:function(t){this.options.attribute.camera=t}},{key:"rotationEditing",get:function(){return"rtation"===this.ControllerObject.getActiveState()},set:function(t){t?this.ControllerObject.editRtation():this.ControllerObject.destroy()}},{key:"positionEditing",get:function(){return"translational"===this.ControllerObject.getActiveState()},set:function(t){!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&(t?(this.leftClickState=vt(),this.ControllerObject.position={lng:this.center.lng,lat:this.center.lat,alt:this.options.height},this.ControllerObject.editTranslational(),new ht(this.sdk)):(this.leftClickState&&!vt()&&new pt(this.sdk),this.ControllerObject.destroy()))}},{key:"positionEditingCallBack",get:function(){},set:function(t){}},{key:"rotationEditingCallBack",get:function(){var t=this;return function(e){t.lng=e.tx,t.lat=e.ty,t.alt=e.tz,t.rotateX=e.rx,t.rotateY=e.ry,t.rotateZ=e.rz,t._rotationEditingCallBack&&t._rotationEditingCallBack(t.ControllerObject._params)}},set:function(t){this._rotationEditingCallBack=t}},{key:"edit",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=this,p=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=p.length>0&&void 0!==p[0]&&p[0],this.originalOptions=this.deepCopyObj(this.options),this._element_style=null,this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=36;break}return this._element_style=document.createElement("style"),this._element_style.type="text/css",this._element_style.setAttribute("data-name","YJ_style_dialog"),this._element_style.innerHTML="\n .YJ-custom-base-dialog>.content {\n width: 600px;\n }\n .YJ-custom-base-dialog>.content>div>.row .col {\n margin: 0 10px;\n }\n .YJ-custom-base-dialog>.content>div>.row .col:first-child {\n margin-left: 0;\n }\n .YJ-custom-base-dialog>.content>div>.row .col:last-child {\n margin-right: 0;\n }\n .YJ-custom-base-dialog>.content>div>.row .label {\n flex: 0 0 74px;\n }\n .YJ-custom-base-dialog>.content .DIV-cy-tab-content-pane .input-select {\n width: 100px;\n }\n",t.next=12,new Ki(this.sdk,this.originalOptions,{title:"编辑属性",left:"180px",top:"100px",confirmCallBack:function(t){u.name=u.options.name||"未命名对象",u.originalOptions=u.deepCopyObj(u.options),u._DialogObject.close(),u.Dialog.confirmCallBack&&u.Dialog.confirmCallBack(u.originalOptions)},resetCallBack:function(){u.reset(),u.Dialog.resetCallBack&&u.Dialog.resetCallBack()},removeCallBack:function(){u.Dialog.removeCallBack&&u.Dialog.removeCallBack()},closeCallBack:function(){u.reset(),u.positionEditing=!1,u.ControllerObject&&u.ControllerObject.destroy(),u.Dialog.closeCallBack&&u.Dialog.closeCallBack()},showCallBack:function(t){u.show=t,u.Dialog.showCallBack&&u.Dialog.showCallBack()},translationalCallBack:function(){u.positionEditing?u.positionEditing=!1:u.positionEditing=!0}},!0);case 12:this._DialogObject=t.sent,document.getElementsByTagName("head")[0].appendChild(this._element_style),(i=document.createElement("div")).innerHTML=yc(this),this._DialogObject.contentAppChild(i),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera,new dn("model-edit-tabs",void 0,this.sdk),n=new YJColorPicker({el:i.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){u.color=t},clear:function(){u.color="rgba(255,255,255,1)"}}),o=new YJColorPicker({el:i.getElementsByClassName("label_color")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){u.labelColor=t},clear:function(){u.labelColor="rgba(255,255,255,1)"}}),s=new YJColorPicker({el:i.getElementsByClassName("line_color")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){u.lineColor=t},clear:function(){u.lineColor="rgba(255,255,255,1)"}}),r=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){u.labelBackgroundColorStart=t},clear:function(){u.labelBackgroundColorStart="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){u.labelBackgroundColorEnd=t},clear:function(){u.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),c=i.getElementsByTagName("*"),this._EventBinding.on(this,c),this._elms=this._EventBinding.element,this._elms.color=[n],this._elms.labelColor=[o],this._elms.lineColor=[s],this._elms.labelBackgroundColorStart=[r],this._elms.labelBackgroundColorEnd=[l],setTimeout((function(){u.attributeLink=u.options.attribute.link.content,u.cameraSelect&&u.cameraSelect();var t=u.attributeSelect,e=u._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=u._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],o=0;o<t.length;o++)if(t[o].key===u.options.attributeType){n.value=t[o].value,i.legp_searchActive(t[o].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){u.attributeType=t[e].key;break}}))}}),0),t.next=36;break;case 36:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"updateModel",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0;t=parseFloat(t),e=parseFloat(e),i=parseFloat(i),n=parseFloat(n),o=parseFloat(o),s=parseFloat(s),a=parseFloat(a),this.entity.rotate={x:n,y:o,z:s};var r=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(n)),l=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(o)),c=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(s)),u=new Cesium.Cartesian3.fromDegrees(t,e,i);Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(u.x-this.entity._center.x,u.y-this.entity._center.y,u.z-this.entity._center.z)),Cesium.Matrix4.fromRotationTranslation(r),Cesium.Matrix4.fromRotationTranslation(l),Cesium.Matrix4.fromRotationTranslation(c),new Cesium.Matrix4;Cesium.Matrix4.fromTranslation(new Cesium.Cartesian3(u.x-this.entity._center.x,u.y-this.entity._center.y,u.z-this.entity._center.z),this.entity.modelMatrix),this.ControllerObject.update(),this.entity.position=new Cesium.Cartesian3.fromDegrees(t,e,i)}},{key:"updateModelRotate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;t=parseFloat(t),e=parseFloat(e),i=parseFloat(i),n=parseFloat(n),this.sdk.viewer.scene.primitives.remove(this.entity);var o=this.options.url;if(!o.startsWith("http")&&!o.includes(":")&&this.options.host){var s=new URL(o,this.options.host);o=s.href}for(var a=[],r=0;r<this.ModelPositions.length;r++){var l=n,c=Cesium.Cartesian3.fromDegrees(this.ModelPositions[r].lng,this.ModelPositions[r].lat,this.options.height),u=Cesium.Transforms.headingPitchRollToFixedFrame(c,new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(i),Cesium.Math.toRadians(e),Cesium.Math.toRadians(t)));Cesium.Matrix4.multiplyByUniformScale(u,l,u),a.push({modelMatrix:u})}this.entity=new Cesium.ModelInstanceCollection({url:o,instances:a}),this.entity.position=new Cesium.Cartesian3.fromDegrees(this.center.lng,this.center.lat,this.options.height),this.entity.rotate={x:this.options.rotate.x,y:this.options.rotate.y,z:this.options.rotate.z},this.updateModel(this.center.lng,this.center.lat,this.options.height,this.options.rotate.x,this.options.rotate.y,this.options.rotate.z,this.options.scale),this.sdk.viewer.scene.primitives.add(this.entity)}},{key:"reset",value:function(){this.entity&&(this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lng=this.originalOptions.position.lng,this.lat=this.originalOptions.position.lat,this.alt=this.originalOptions.position.alt,this.maximumScale=this.originalOptions.maximumScale,this.minimumPixelSize=this.originalOptions.minimumPixelSize,this.scaleByDistance=this.originalOptions.scaleByDistance,this.rotateX=this.originalOptions.rotate.x,this.rotateY=this.originalOptions.rotate.y,this.rotateZ=this.originalOptions.rotate.z,this.scale=this.originalOptions.scale,this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeCamera=this.options.attribute.camera,this.cameraSelect&&this.cameraSelect())}}]);var i,n,s}(sc);function Sc(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Dc(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Sc(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Sc(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Mc(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Pc=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=Mc(this,e,[t,n])).object={},i.options.host=i.options.host||h(),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"layer"}},{key:"on",value:function(){return this.add()}},{key:"add",value:(n=o()(a.a.mark((function t(){var e,i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.requestResource();case 2:return e=t.sent,t.next=5,e.text();case 5:if(i=t.sent,i=JSON.parse(i),![0,200].includes(i.code)){t.next=11;break}return t.abrupt("return",this.loadLayer(i.data));case 11:return t.abrupt("return",new Promise((function(t,e){e(i.msg||i.message)})));case 12:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"loadLayer",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.object=Dc({},e),i="",this.object.url.startsWith("http")?i=this.object.url:this.options.host?(n=new URL(this.object.url,this.options.host),i=n.href):i=this.object.url,o={url:i,mimmumLevel:this.object.minimumLevel,maximumLevel:this.object.maximumLevel,rectangle:new Cesium.Rectangle(Cesium.Math.toRadians(this.object.west),Cesium.Math.toRadians(this.object.south),Cesium.Math.toRadians(this.object.east),Cesium.Math.toRadians(this.object.north))},t.t0=this.object.scheme_name,t.next="amapMercatorTilingScheme"===t.t0?7:""===t.t0?9:10;break;case 7:return o.tilingScheme=this.amapMercatorTilingScheme(),t.abrupt("break",12);case 9:return t.abrupt("break",12);case 10:return o.tilingScheme=new Cesium[this.object.scheme_name],t.abrupt("break",12);case 12:t.t1=this.object.load_method,t.next="tms"===t.t1?15:"xyz"===t.t1?24:"wmts"===t.t1?26:28;break;case 15:if(this.object.url.endsWith("tilemapresource.xml")&&((r=this.object.url.split("/")).pop(),l=r.join("/"),o.url=l),!(Number(Cesium.VERSION.split(".")[1])>=107)){t.next=22;break}return t.next=19,Cesium.TileMapServiceImageryProvider.fromUrl(o.url,o);case 19:s=t.sent,t.next=23;break;case 22:s=new Cesium.TileMapServiceImageryProvider(o);case 23:return t.abrupt("break",30);case 24:return s=new Cesium.UrlTemplateImageryProvider(o),t.abrupt("break",30);case 26:return s=new Cesium.WebMapTileServiceImageryProvider(o),t.abrupt("break",30);case 28:return s=new Cesium.UrlTemplateImageryProvider(o),t.abrupt("break",30);case 30:if(this.sdk&&this.sdk.viewer){t.next=32;break}return t.abrupt("return");case 32:for(this.options.hasOwnProperty("layer_index")?this.entity=this.sdk.viewer.scene.imageryLayers.addImageryProvider(s,this.options.layer_index):this.entity=this.sdk.viewer.scene.imageryLayers.addImageryProvider(s),this.entity._id=this.options.id,c=0;c<this.sdk.viewer.imageryLayers._layers.length;c++)this.sdk.viewer.imageryLayers._layers[c]._imageryProvider&&this.sdk.viewer.imageryLayers._layers[c]._imageryProvider._type&&("flw"===this.sdk.viewer.imageryLayers._layers[c]._imageryProvider._type||"jww"===this.sdk.viewer.imageryLayers._layers[c]._imageryProvider._type)&&(u=this.sdk.viewer.imageryLayers._layers[c],this.sdk.viewer.imageryLayers.raiseToTop(u));this.show=this.options.show,this.alpha=this.options.alpha,this.brightness=this.options.brightness,this.options.show&&Qt(0,this.options.id);case 39:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})}]);var i,n}(ul);function Oc(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Tc=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=Oc(this,e,[t,n])).loadLayer(),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"layer"}},{key:"loadLayer",value:function(t){var e,i={url:this.options.url,mimmumLevel:this.options.minimumLevel||0,maximumLevel:this.options.maximumLevel||20,subdomains:["0","1","2","3","4","5","6","7"]};e=new Cesium.UrlTemplateImageryProvider(i),this.options.hasOwnProperty("layer_index")?this.entity=this.sdk.viewer.scene.imageryLayers.addImageryProvider(e,this.options.layer_index):this.entity=this.sdk.viewer.scene.imageryLayers.addImageryProvider(e),this.entity._id=this.options.id;for(var n=0;n<this.sdk.viewer.imageryLayers._layers.length;n++)if(this.sdk.viewer.imageryLayers._layers[n]._imageryProvider&&this.sdk.viewer.imageryLayers._layers[n]._imageryProvider._type&&("flw"===this.sdk.viewer.imageryLayers._layers[n]._imageryProvider._type||"jww"===this.sdk.viewer.imageryLayers._layers[n]._imageryProvider._type)){var o=this.sdk.viewer.imageryLayers._layers[n];this.sdk.viewer.imageryLayers.raiseToTop(o)}this.show=this.options.show,this.alpha=this.options.alpha,this.brightness=this.options.brightness,this.options.show&&Qt(0,this.options.id)}}])}(ul);function Nc(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Bc(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Nc(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Nc(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Lc(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ac(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ac(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Ac(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function jc(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Ic(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Fc(t,e,i){return t.set(zc(t,e),i),i}function Rc(t,e){return t.get(zc(t,e))}function zc(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Hc=new WeakMap,Vc=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return k()(this,e),Ic(i=jc(this,e,[t,n]),Hc,void 0),i.object=JSON.parse(JSON.stringify(o)),i.object.west||(i.object.west=40),i.object.south||(i.object.south=30),i.object.east||(i.object.east=160),i.object.north||(i.object.north=50),i.show=i.options.show,i._elms={},i.Dialog=s,i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"terrain"}},{key:"name",get:function(){return this.options.name},set:function(t){this.options.name=t,this._elms.name&&this._elms.name.forEach((function(e){e.value=t}))}},{key:"show",get:function(){return!(this.sdk.viewer.scene.terrainProvider instanceof Cesium.EllipsoidTerrainProvider)},set:function(t){t?this.open():this.close()}},{key:"open",value:(r=o()(a.a.mark((function t(){var e,i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.url){t.next=4;break}return t.abrupt("return",this.loadTerrain({url:this.options.url}));case 4:return t.next=6,this.requestResource();case 6:return e=t.sent,t.next=9,e.text();case 9:if(i=t.sent,i=JSON.parse(i),![0,200].includes(i.code)){t.next=19;break}if(!i.data.url.length){t.next=16;break}return t.abrupt("return",this.loadTerrain(i.data));case 16:return t.abrupt("return",new Promise((function(t,e){e("资源不存在")})));case 17:t.next=20;break;case 19:return t.abrupt("return",new Promise((function(t,e){e(i.msg||i.message)})));case 20:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"close",value:function(){var t=this;this.sdk.viewer.scene.terrainProvider=new Cesium.EllipsoidTerrainProvider({});for(var e=0;e<YJ.Analysis.AnalysesResults.length;e++)"ContourAnalysis"===YJ.Analysis.AnalysesResults[e].type&&YJ.Analysis.AnalysesResults[e].destroy();re(this.sdk,this.options.id),clearTimeout(Rc(Hc,this)),Fc(Hc,this,setTimeout((function(){clearTimeout(Rc(Hc,t));var e,i=Lc(t.sdk.entityMap);try{for(i.s();!(e=i.n()).done;){var n=y()(e.value,2),o=(n[0],n[1]);"BillboardObject"!==o.type||1!=o.heightMode&&3!=o.heightMode?o.label&&(o.label.show=o.label.show):o.updateHeight()}}catch(t){i.e(t)}finally{i.f()}}),500))}},{key:"loadTerrain",value:(s=o()(a.a.mark((function t(e){var i,n,o,s=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=Bc({},e),n="",i.url.startsWith("http")||i.url.includes(":")?n=i.url:this.options.host?(o=new URL(i.url,this.options.host),n=o.href):n=i.url,!(Number(Cesium.VERSION.split(".")[1])>=107)){t.next=9;break}return t.next=6,Cesium.CesiumTerrainProvider.fromUrl(n);case 6:this.terrainProvider=t.sent,t.next=10;break;case 9:this.terrainProvider=new Cesium.CesiumTerrainProvider({url:n});case 10:if(this.sdk&&this.sdk.viewer){t.next=12;break}return t.abrupt("return");case 12:this.sdk.viewer.terrainProvider=this.terrainProvider,clearTimeout(Rc(Hc,this)),Fc(Hc,this,setTimeout((function(){clearTimeout(Rc(Hc,s)),s.terrainProvider.readyPromise.then((function(){var t,e=Lc(s.sdk.entityMap);try{for(e.s();!(t=e.n()).done;){var i=y()(t.value,2),n=(i[0],i[1]);"BillboardObject"!==n.type||1!=n.heightMode&&3!=n.heightMode?n.label&&(n.label.show=n.label.show):n.updateHeight()}}catch(t){e.e(t)}finally{e.f()}}))}),1e3)),re(this.sdk,this.options.id);case 16:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"remove",value:function(){this.close()}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:3,!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Bc({},this.options.position):this.options.positions?l=Bc({},this.options.positions[0]):this.options.center?l=Bc({},this.options.center):this.options.start?l=Bc({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i,duration:e}),t.next=27;break;case 25:c=new Cesium.Rectangle(Cesium.Math.toRadians(this.object.west),Cesium.Math.toRadians(this.object.south),Cesium.Math.toRadians(this.object.east),Cesium.Math.toRadians(this.object.north)),this.sdk.viewer.camera.flyTo({destination:c,duration:e});case 27:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"setDefaultValue",value:function(){var t,i,n,o,s;(t=e,i="setDefaultValue",n=this,o=3,s=Ks()(Ji()(1&o?t.prototype:t),i,n),2&o&&"function"==typeof s?function(t){return s.apply(n,t)}:s)([]),this.options.host=this.options.host||h(),this.options.url=this.options.url||""}},{key:"edit",value:(i=o()(a.a.mark((function t(){var e,i,n,o=this,s=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s.length>0&&void 0!==s[0]&&s[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),t.next=5,new Ki(this.sdk,this.options,{title:"地形属性",left:"180px",top:"100px",confirmCallBack:function(t){o.name=o.name.trim(),o.name||(o.name="未命名对象"),o.originalOptions=o.deepCopyObj(o.options),o._DialogObject.close();var e=o.deepCopyObj(o.options);e.host="",o.Dialog.confirmCallBack&&o.Dialog.confirmCallBack(e)},removeCallBack:function(){o.Dialog.removeCallBack&&o.Dialog.removeCallBack()}},!0);case 5:this._DialogObject=t.sent,(e=document.createElement("div")).style.width="300px",i='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称:</span>\n <input class="input name" type="text">\n </div>\n </div>\n </div>\n ',e.innerHTML=i,(n=e.getElementsByClassName("name")[0]).value=this.name,n.addEventListener("input",(function(){o.name=n.value})),this._DialogObject.contentAppChild(e),this._elms.name=[n];case 15:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"flicker",value:function(){}}]);var i,n,s,r}(sl);function Gc(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Uc(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Uc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Uc(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var Wc=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[];if(!e[o]||!e[o].attributes)return 1;var r,l=Gc(e[o].attributes);try{var c=function(){var l=r.value;switch(l.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[l.value]=e.target.checked})),e[o].checked=t[l.value]):(n.push((function(e){var i=e.target.value;"number"!=e.target.type&&"range"!=e.target.type||(i=Number(i)),t[l.value]=i})),"IMG"==e[o].nodeName?e[o].src=t[l.value]:e[o].value=t[l.value]),i.element[l.value]?i.element[l.value].push(e[o]):i.element[l.value]=[e[o]],a.push(l.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t.Dialog[l.value]&&t.Dialog[l.value](e)})),a.push(l.name)}};for(l.s();!(r=l.n()).done;)c()}catch(t){l.e(t)}finally{l.f()}for(var u=0;u<a.length;u++)e[o].attributes.removeNamedItem(a[u]);if(s){var p="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(p="change"),e[o].addEventListener(p,(function(t){for(var e=0;e<n.length;e++)n[e](t)}))}},o=0;o<e.length;o++)n()}}])}();C()(Wc,"event",{});var Yc=new Wc;function Jc(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function qc(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Jc(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Jc(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Xc(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Zc(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var Kc=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=Xc(this,e,[t,i])).options.url=i.url,n.options.startColor=i.startColor||"#ff0000",n.options.endColor=i.endColor||"#fff000",n.options.startScale=i.startScale||.5,n.options.endScale=i.endScale||2,n.options.minimumParticleLife=i.minimumParticleLife||1,n.options.maximumParticleLife=i.maximumParticleLife||2,n.options.minimumSpeed=i.minimumSpeed||1,n.options.maximumSpeed=i.maximumSpeed||30,n.options.emissionRate=i.emissionRate||60,n.options.particleSize=i.particleSize||10,n.options.show=!1!==i.show,n.positionCallBack=null,n.rotationCallback=null,n.onClickCallback=null,n._DialogObject=null,n._element=null,n.particleSystem,n.sdk.addIncetance(n.options.id,n),n.add(),n.operate={},n._elms={},n.previous={positions:{lng:n.options.lng,lat:n.options.lat,alt:n.options.alt}},n.Dialog=o,n.event=new X(n.sdk),n}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"ParticleEffects"}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.isShowView||(this.options.show=t),this.showView&&3!=this.showView?(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=!1),this.options.label&&this.options.label.show&&(this.label.show=!1)):(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=this.options.show),this.options.label&&this.options.label.show&&(this.label.show=this.options.show)),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this.isShowView=!1):console.error("参数必须为boolean")}},{key:"add",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.originalOptions=this.deepCopyObj(this.options),e=this.sdk.viewer.scene,i=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),n=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(i),o=Cesium.Transforms.eastNorthUpToFixedFrame(n),Cesium.Matrix4.multiplyByScale(o,new Cesium.Cartesian3(1,1,1),o),s=this.sdk.viewer.camera.positionCartographic.height,this.particleSystem=e.primitives.add(new Cesium.ParticleSystem({show:!(s>=1e7)&&this.options.show,image:this.options.url||this.getSourceRootPath()+"/img/particlesystem/smoke.png",startColor:Cesium.Color.fromCssColorString(this.options.startColor),endColor:Cesium.Color.fromCssColorString(this.options.endColor),startScale:this.options.startScale,endScale:this.options.endScale,minimumParticleLife:this.options.minimumParticleLife,maximumParticleLife:this.options.maximumParticleLife,minimumSpeed:this.options.minimumSpeed,maximumSpeed:this.options.maximumSpeed,minimumImageSize:new Cesium.Cartesian2(this.options.particleSize,this.options.particleSize),maximumImageSize:new Cesium.Cartesian2(this.options.particleSize,this.options.particleSize),sizeInMeters:!0,emissionRate:this.options.emissionRate,lifetime:.5,loop:!0,emitter:new Cesium.ConeEmitter(Cesium.Math.toRadians(30)),modelMatrix:o,updateCallback:function(t){t._billboard.id=r.options.id}})),this.particleSystem.id=this.options.id,this.entity=this.particleSystem,this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},be(this.sdk,this.options.id),this.options.show&&Qt(0,this.options.id),this.sdk.viewer.camera.changed.addEventListener((function(){if(r.entity&&r.show){var t=r.sdk.viewer.camera.positionCartographic.height;r.entity.show=!(t>=1e7)}}));case 14:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=qc({},this.options.position):this.options.positions?l=qc({},this.options.positions[0]):this.options.center?l=qc({},this.options.center):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=26;break;case 25:this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat,this.options.alt+500),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 26:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"startColor",get:function(){return this.options.startColor},set:function(t){var e=this;this.options.startColor=t,this.particleSystem.startColor=Cesium.Color.fromCssColorString(t),this._elms.startColor&&this._elms.startColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.startColor=t},clear:function(){e.startColor="rgba(255,255,255,1)"}});e._elms.startColor[n]=o}))}},{key:"endColor",get:function(){return this.options.endColor},set:function(t){var e=this;this.options.endColor=t,this.particleSystem.endColor=Cesium.Color.fromCssColorString(t),this._elms.endColor&&this._elms.endColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.endColor=t},clear:function(){e.endColor="rgba(255,255,255,1)"}});e._elms.endColor[n]=o}))}},{key:"minimumSpeed",get:function(){return this.options.minimumSpeed},set:function(t){this.options.minimumSpeed=t,this.particleSystem.minimumSpeed=t,this._elms.minimumSpeed&&this._elms.minimumSpeed.forEach((function(e){e.value=t}))}},{key:"maximumSpeed",get:function(){return this.options.maximumSpeed},set:function(t){this.options.maximumSpeed=t,this.particleSystem.maximumSpeed=t,this._elms.maximumSpeed&&this._elms.maximumSpeed.forEach((function(e){e.value=t}))}},{key:"minimumParticleLife",get:function(){return this.options.minimumParticleLife},set:function(t){this.options.minimumParticleLife=t,this.particleSystem.minimumParticleLife=t,this._elms.minimumParticleLife&&this._elms.minimumParticleLife.forEach((function(e){e.value=t}))}},{key:"maximumParticleLife",get:function(){return this.options.maximumParticleLife},set:function(t){this.options.maximumParticleLife=t,this.particleSystem.maximumParticleLife=t,this._elms.maximumParticleLife&&this._elms.maximumParticleLife.forEach((function(e){e.value=t}))}},{key:"startScale",get:function(){return this.options.startScale},set:function(t){this.options.startScale=t,this.particleSystem.startScale=t,this._elms.startScale&&this._elms.startScale.forEach((function(e){e.value=t}))}},{key:"endScale",get:function(){return this.options.endScale},set:function(t){this.options.endScale=t,this.particleSystem.endScale=t,this._elms.endScale&&this._elms.endScale.forEach((function(e){e.value=t}))}},{key:"emissionRate",get:function(){return this.options.emissionRate},set:function(t){this.options.emissionRate=t,this.particleSystem.emissionRate=t,this._elms.emissionRate&&this._elms.emissionRate.forEach((function(e){e.value=t}))}},{key:"particleSize",get:function(){return this.options.particleSize},set:function(t){this.options.particleSize=t,this.particleSystem.minimumImageSize=new Cesium.Cartesian2(t,t),this.particleSystem.maximumImageSize=new Cesium.Cartesian2(t,t),this._elms.particleSize&&this._elms.particleSize.forEach((function(e){e.value=t}))}},{key:"lng",get:function(){return this.options.lng},set:function(t){this.options.lng=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.lat},set:function(t){this.options.lat=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.alt},set:function(t){this.options.alt=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t}))}},{key:"edit",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r=this,l=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=l.length>0&&void 0!==l[0]&&l[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=21;break}return t.next=7,new Ki(this.sdk,this.originalOptions,{title:"火焰属性",left:"180px",top:"100px",confirmCallBack:function(t){r.name=r.name.trim(),r.name||(r.name="未命名对象"),r.originalOptions=r.deepCopyObj(r.options),r._DialogObject.close(),r.Dialog.confirmCallBack&&r.Dialog.confirmCallBack(r.originalOptions),be(r.sdk,r.options.id),re(r.sdk,r.options.id)},resetCallBack:function(){r.reset(),r.Dialog.resetCallBack&&r.Dialog.resetCallBack()},removeCallBack:function(){r.Dialog.removeCallBack&&r.Dialog.removeCallBack()},closeCallBack:function(){r.reset(),r.positionEditing=!1,r.Dialog.closeCallBack&&r.Dialog.closeCallBack()},showCallBack:function(t){r.show=t,r.Dialog.showCallBack&&r.Dialog.showCallBack()},translationalCallBack:function(){r.positionEditing=!r.positionEditing}},!0);case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" particle-effects",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <div class="row">\n <div class="col">\n <span class="label">起始颜色</span>\n <div class="start_color"></div>\n </div>\n <div class="col" style="margin: 0;justify-content: flex-end;">\n <span class="label">结束颜色</span>\n <div class="end_color"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <div class="row">\n <span>最小初速度</span>\n <input type="range" max="100" min="0" step="1" @model="minimumSpeed">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>最大初速度</span>\n <input type="range" max="100" min="0" step="1" @model="maximumSpeed">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>最小存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="minimumParticleLife">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>最大存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="maximumParticleLife">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>起始比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="startScale">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>结束比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="endScale">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>发射速率(个/秒)</span>\n <input type="range" max="100" min="0" step="1" @model="emissionRate">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>尺寸(像素)</span>\n <input type="range" max="100" min="0" step="1" @model="particleSize">\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=new YJColorPicker({el:i.getElementsByClassName("start_color")[0],size:"mini",alpha:!0,defaultColor:this.startColor,disabled:!1,openPickerAni:"opacity",sure:function(t){r.startColor=t},clear:function(){r.startColor="rgba(255,255,255,1)"}}),o=new YJColorPicker({el:i.getElementsByClassName("end_color")[0],size:"mini",alpha:!0,defaultColor:this.endColor,disabled:!1,openPickerAni:"opacity",sure:function(t){r.endColor=t},clear:function(){r.endColor="rgba(255,255,255,1)"}}),s=i.getElementsByTagName("*"),Yc.on(this,s),this._elms=Yc.element,this._elms.startColor=[n],this._elms.endColor=[o],t.next=21;break;case 21:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.name=this.originalOptions.name,this.startColor=this.originalOptions.startColor,this.endColor=this.originalOptions.endColor,this.minimumSpeed=this.originalOptions.minimumSpeed,this.maximumSpeed=this.originalOptions.maximumSpeed,this.minimumParticleLife=this.originalOptions.minimumParticleLife,this.maximumParticleLife=this.originalOptions.maximumParticleLife,this.startScale=this.originalOptions.startScale,this.endScale=this.originalOptions.endScale,this.emissionRate=this.originalOptions.emissionRate,this.particleSize=this.originalOptions.particleSize,this.lng=this.originalOptions.lng,this.lat=this.originalOptions.lat,this.alt=this.originalOptions.alt,function(t){Ee.apply(this,arguments)}(this.entity))}},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Zc(e,"remove",this,3)([]),this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(this.sdk&&this.sdk.viewer&&this.entity)if(this.operate.positionEditing=t,!0===t){var i;this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.picking=!1,this.previous={positions:qc({},this.entity.position)},this.event.mouse_move((function(t,n){i=t.endPosition;var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.lng=o.lng,e.options.lat=o.lat,e.options.alt=o.alt;var s=Cesium.Cartographic.fromDegrees(e.options.lng,e.options.lat,e.options.alt),a=e.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(s);e.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(a),e._elms.lng&&e._elms.lng.forEach((function(t){t.value=e.options.lng})),e._elms.lat&&e._elms.lat.forEach((function(t){t.value=e.options.lat})),e._elms.alt&&e._elms.alt.forEach((function(t){t.value=e.options.alt})),e.tip.setPosition(n,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,n){if(!i||i.x!==t.position.x||i.y!==t.position.y-2){var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.lng=o.lng,e.options.lat=o.lat,e.options.alt=o.alt}e.entity.position={lng:e.options.lng,lat:e.options.lat,alt:e.options.alt},e.previous={positions:qc({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.options.lng=e.entity.position.lng,e.options.lat=e.entity.position.lat,e.options.alt=e.entity.position.alt,e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.options.lng=e.entity.position.lng,e.options.lat=e.entity.position.lat,e.options.alt=e.entity.position.alt,e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.lng=t.lng,e.options.lat=t.lat,e.options.alt=t.alt,e.entity.position={lng:e.options.lng,lat:e.options.lat,alt:e.options.alt},e.previous={positions:qc({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1}}))}))}else{if(this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){}))),this.tip&&this.tip.destroy(),!this.sdk||!this.sdk.viewer||!this.entity)return;this.options.lng=this.entity.position.lng,this.options.lat=this.entity.position.lat,this.options.alt=this.entity.position.alt;var n=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),o=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(n);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(o),this._elms.lng&&this._elms.lng.forEach((function(t){t.value=e.options.lng})),this._elms.lat&&this._elms.lat.forEach((function(t){t.value=e.options.lat})),this._elms.alt&&this._elms.alt.forEach((function(t){t.value=e.options.alt}))}}},{key:"flicker",value:function(){}}]);var i,n,s,r}(jn);function $c(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Qc(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Qc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Qc(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var tu=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[];if(!e[o]||!e[o].attributes)return 1;var r,l=$c(e[o].attributes);try{var c=function(){var l=r.value;switch(l.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[l.value]=e.target.checked})),e[o].checked=t[l.value]):(n.push((function(e){var i=e.target.value;"number"!=e.target.type&&"range"!=e.target.type||(i=Number(i)),t[l.value]=i})),"IMG"==e[o].nodeName?e[o].src=t[l.value]:e[o].value=t[l.value]),i.element[l.value]?i.element[l.value].push(e[o]):i.element[l.value]=[e[o]],a.push(l.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t.Dialog[l.value]&&t.Dialog[l.value](e)})),a.push(l.name)}};for(l.s();!(r=l.n()).done;)c()}catch(t){l.e(t)}finally{l.f()}for(var u=0;u<a.length;u++)e[o].attributes.removeNamedItem(a[u]);if(s){var p="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(p="change"),e[o].addEventListener(p,(function(t){for(var e=0;e<n.length;e++)n[e](t)}))}},o=0;o<e.length;o++)n()}}])}();C()(tu,"event",{});var eu=new tu;function iu(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function nu(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?iu(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):iu(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ou(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function su(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var au=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=ou(this,e,[t,i])).options.url=i.url,n.options.startColor=i.startColor||"#00000000",n.options.endColor=i.endColor||"#0000001a",n.options.startScale=i.startScale||.1,n.options.endScale=i.endScale||10,n.options.minimumParticleLife=i.minimumParticleLife||6,n.options.maximumParticleLife=i.maximumParticleLife||7,n.options.minimumSpeed=i.minimumSpeed||10,n.options.maximumSpeed=i.maximumSpeed||15,n.options.emissionRate=i.emissionRate||28,n.options.particleSize=i.particleSize||2,n.options.show=!1!==i.show,n._elms={},n.positionCallBack=null,n.rotationCallback=null,n.onClickCallback=null,n._DialogObject=null,n._element=null,n.particleSystem,n.sdk.addIncetance(n.options.id,n),n.add(),n.operate={},n.previous={positions:{lng:n.options.lng,lat:n.options.lat,alt:n.options.alt}},n.Dialog=o,n.event=new X(n.sdk),n}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"ParticleEffects"}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.isShowView||(this.options.show=t),this.showView&&3!=this.showView?(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=!1),this.options.label&&this.options.label.show&&(this.label.show=!1)):(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=this.options.show),this.options.label&&this.options.label.show&&(this.label.show=this.options.show)),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this.isShowView=!1):console.error("参数必须为boolean")}},{key:"add",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.originalOptions=this.deepCopyObj(this.options),e=this.sdk.viewer.scene,i=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),n=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(i),o=Cesium.Transforms.eastNorthUpToFixedFrame(n),Cesium.Matrix4.multiplyByScale(o,new Cesium.Cartesian3(1,1,1),o),s=this.sdk.viewer.camera.positionCartographic.height,this.particleSystem=e.primitives.add(new Cesium.ParticleSystem({show:!(s>=1e7)&&this.options.show,image:this.options.url||this.getSourceRootPath()+"/img/particlesystem/smoke.png",startColor:Cesium.Color.fromCssColorString(this.options.startColor),endColor:Cesium.Color.fromCssColorString(this.options.endColor),startScale:this.options.startScale,endScale:this.options.endScale,minimumParticleLife:this.options.minimumParticleLife,maximumParticleLife:this.options.maximumParticleLife,minimumSpeed:this.options.minimumSpeed,maximumSpeed:this.options.maximumSpeed,minimumImageSize:new Cesium.Cartesian2(this.options.particleSize,this.options.particleSize),maximumImageSize:new Cesium.Cartesian2(this.options.particleSize,this.options.particleSize),sizeInMeters:!0,emissionRate:this.options.emissionRate,lifetime:.5,loop:!0,emitter:new Cesium.CircleEmitter(.2),performance:!1,modelMatrix:o,updateCallback:function(t){t._billboard.id=r.options.id}})),this.particleSystem.id=this.options.id,this.entity=this.particleSystem,this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},be(this.sdk,this.options.id),this.options.show&&Qt(0,this.options.id),this.sdk.viewer.camera.changed.addEventListener((function(){if(r.entity&&r.show){var t=r.sdk.viewer.camera.positionCartographic.height;r.entity.show=!(t>=1e7)}}));case 14:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=nu({},this.options.position):this.options.positions?l=nu({},this.options.positions[0]):this.options.center?l=nu({},this.options.center):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=26;break;case 25:this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat,this.options.alt+500),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 26:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"startColor",get:function(){return this.options.startColor},set:function(t){var e=this;this.options.startColor=t,this.particleSystem.startColor=Cesium.Color.fromCssColorString(t),this._elms.startColor&&this._elms.startColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.startColor=t},clear:function(){e.startColor="rgba(255,255,255,1)"}});e._elms.startColor[n]=o}))}},{key:"endColor",get:function(){return this.options.endColor},set:function(t){var e=this;this.options.endColor=t,this.particleSystem.endColor=Cesium.Color.fromCssColorString(t),this._elms.endColor&&this._elms.endColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.endColor=t},clear:function(){e.endColor="rgba(255,255,255,1)"}});e._elms.endColor[n]=o}))}},{key:"minimumSpeed",get:function(){return this.options.minimumSpeed},set:function(t){this.options.minimumSpeed=t,this.particleSystem.minimumSpeed=t,this._elms.minimumSpeed&&this._elms.minimumSpeed.forEach((function(e){e.value=t}))}},{key:"maximumSpeed",get:function(){return this.options.maximumSpeed},set:function(t){this.options.maximumSpeed=t,this.particleSystem.maximumSpeed=t,this._elms.maximumSpeed&&this._elms.maximumSpeed.forEach((function(e){e.value=t}))}},{key:"minimumParticleLife",get:function(){return this.options.minimumParticleLife},set:function(t){this.options.minimumParticleLife=t,this.particleSystem.minimumParticleLife=t,this._elms.minimumParticleLife&&this._elms.minimumParticleLife.forEach((function(e){e.value=t}))}},{key:"maximumParticleLife",get:function(){return this.options.maximumParticleLife},set:function(t){this.options.maximumParticleLife=t,this.particleSystem.maximumParticleLife=t,this._elms.maximumParticleLife&&this._elms.maximumParticleLife.forEach((function(e){e.value=t}))}},{key:"startScale",get:function(){return this.options.startScale},set:function(t){this.options.startScale=t,this.particleSystem.startScale=t,this._elms.startScale&&this._elms.startScale.forEach((function(e){e.value=t}))}},{key:"endScale",get:function(){return this.options.endScale},set:function(t){this.options.endScale=t,this.particleSystem.endScale=t,this._elms.endScale&&this._elms.endScale.forEach((function(e){e.value=t}))}},{key:"emissionRate",get:function(){return this.options.emissionRate},set:function(t){this.options.emissionRate=t,this.particleSystem.emissionRate=t,this._elms.emissionRate&&this._elms.emissionRate.forEach((function(e){e.value=t}))}},{key:"particleSize",get:function(){return this.options.particleSize},set:function(t){this.options.particleSize=t,this.particleSystem.minimumImageSize=new Cesium.Cartesian2(t,t),this.particleSystem.maximumImageSize=new Cesium.Cartesian2(t,t),this._elms.particleSize&&this._elms.particleSize.forEach((function(e){e.value=t}))}},{key:"lng",get:function(){return this.options.lng},set:function(t){this.options.lng=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.lat},set:function(t){this.options.lat=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.alt},set:function(t){this.options.alt=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t}))}},{key:"edit",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r=this,l=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=l.length>0&&void 0!==l[0]&&l[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=21;break}return t.next=7,new Ki(this.sdk,this.originalOptions,{title:"烟雾属性",left:"180px",top:"100px",confirmCallBack:function(t){r.name=r.name.trim(),r.name||(r.name="未命名对象"),r.originalOptions=r.deepCopyObj(r.options),r._DialogObject.close(),r.Dialog.confirmCallBack&&r.Dialog.confirmCallBack(r.originalOptions),be(r.sdk,r.options.id),re(r.sdk,r.options.id)},resetCallBack:function(){r.reset(),r.Dialog.resetCallBack&&r.Dialog.resetCallBack()},removeCallBack:function(){r.Dialog.removeCallBack&&r.Dialog.removeCallBack()},closeCallBack:function(){r.reset(),r.positionEditing=!1,r.Dialog.closeCallBack&&r.Dialog.closeCallBack()},showCallBack:function(t){r.show=t,r.Dialog.showCallBack&&r.Dialog.showCallBack()},translationalCallBack:function(){r.positionEditing=!r.positionEditing}},!0);case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" particle-effects",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <div class="row">\n <div class="col">\n <span class="label">起始颜色</span>\n <div class="start_color"></div>\n </div>\n <div class="col" style="margin: 0;justify-content: flex-end;">\n <span class="label">结束颜色</span>\n <div class="end_color"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <div class="row">\n <span>最小初速度</span>\n <input type="range" max="100" min="0" step="1" @model="minimumSpeed">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>最大初速度</span>\n <input type="range" max="100" min="0" step="1" @model="maximumSpeed">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>最小存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="minimumParticleLife">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>最大存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="maximumParticleLife">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>起始比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="startScale">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>结束比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="endScale">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>发射速率(个/秒)</span>\n <input type="range" max="100" min="0" step="1" @model="emissionRate">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>尺寸(像素)</span>\n <input type="range" max="100" min="0" step="1" @model="particleSize">\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=new YJColorPicker({el:i.getElementsByClassName("start_color")[0],size:"mini",alpha:!0,defaultColor:this.startColor,disabled:!1,openPickerAni:"opacity",sure:function(t){r.startColor=t},clear:function(){r.startColor="rgba(255,255,255,1)"}}),o=new YJColorPicker({el:i.getElementsByClassName("end_color")[0],size:"mini",alpha:!0,defaultColor:this.endColor,disabled:!1,openPickerAni:"opacity",sure:function(t){r.endColor=t},clear:function(){r.endColor="rgba(255,255,255,1)"}}),s=i.getElementsByTagName("*"),eu.on(this,s),this._elms=eu.element,this._elms.startColor=[n],this._elms.endColor=[o],t.next=21;break;case 21:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.name=this.originalOptions.name,this.startColor=this.originalOptions.startColor,this.endColor=this.originalOptions.endColor,this.minimumSpeed=this.originalOptions.minimumSpeed,this.maximumSpeed=this.originalOptions.maximumSpeed,this.minimumParticleLife=this.originalOptions.minimumParticleLife,this.maximumParticleLife=this.originalOptions.maximumParticleLife,this.startScale=this.originalOptions.startScale,this.endScale=this.originalOptions.endScale,this.emissionRate=this.originalOptions.emissionRate,this.particleSize=this.originalOptions.particleSize,this.lng=this.originalOptions.lng,this.lat=this.originalOptions.lat,this.alt=this.originalOptions.alt)}},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return su(e,"remove",this,3)([]),this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(this.sdk&&this.sdk.viewer&&this.entity)if(this.operate.positionEditing=t,!0===t){var i;this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.picking=!1,this.previous={positions:nu({},this.entity.position)},this.event.mouse_move((function(t,n){i=t.endPosition;var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.lng=o.lng,e.options.lat=o.lat,e.options.alt=o.alt;var s=Cesium.Cartographic.fromDegrees(e.options.lng,e.options.lat,e.options.alt),a=e.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(s);e.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(a),e._elms.lng&&e._elms.lng.forEach((function(t){t.value=e.options.lng})),e._elms.lat&&e._elms.lat.forEach((function(t){t.value=e.options.lat})),e._elms.alt&&e._elms.alt.forEach((function(t){t.value=e.options.alt})),e.tip.setPosition(n,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,n){if(!i||i.x!==t.position.x||i.y!==t.position.y-2){var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.lng=o.lng,e.options.lat=o.lat,e.options.alt=o.alt}e.entity.position={lng:e.options.lng,lat:e.options.lat,alt:e.options.alt},e.previous={positions:nu({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.options.lng=e.entity.position.lng,e.options.lat=e.entity.position.lat,e.options.alt=e.entity.position.alt,e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.options.lng=e.entity.position.lng,e.options.lat=e.entity.position.lat,e.options.alt=e.entity.position.alt,e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.lng=t.lng,e.options.lat=t.lat,e.options.alt=t.alt,e.entity.position={lng:e.options.lng,lat:e.options.lat,alt:e.options.alt},e.previous={positions:nu({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1}}))}))}else{if(this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){}))),this.tip&&this.tip.destroy(),!this.sdk||!this.sdk.viewer||!this.entity)return;this.options.lng=this.entity.position.lng,this.options.lat=this.entity.position.lat,this.options.alt=this.entity.position.alt;var n=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),o=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(n);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(o),this._elms.lng&&this._elms.lng.forEach((function(t){t.value=e.options.lng})),this._elms.lat&&this._elms.lat.forEach((function(t){t.value=e.options.lat})),this._elms.alt&&this._elms.alt.forEach((function(t){t.value=e.options.alt}))}}},{key:"flicker",value:function(){}}]);var i,n,s,r}(jn);function ru(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return lu(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?lu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function lu(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var cu=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[];if(!e[o]||!e[o].attributes)return 1;var r,l=ru(e[o].attributes);try{var c=function(){var l=r.value;switch(l.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[l.value]=e.target.checked})),e[o].checked=t[l.value]):(n.push((function(e){var i=e.target.value;"number"!=e.target.type&&"range"!=e.target.type||(i=Number(i)),t[l.value]=i})),"IMG"==e[o].nodeName?e[o].src=t[l.value]:e[o].value=t[l.value]),i.element[l.value]?i.element[l.value].push(e[o]):i.element[l.value]=[e[o]],a.push(l.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t.Dialog[l.value]&&t.Dialog[l.value](e)})),a.push(l.name)}};for(l.s();!(r=l.n()).done;)c()}catch(t){l.e(t)}finally{l.f()}for(var u=0;u<a.length;u++)e[o].attributes.removeNamedItem(a[u]);if(s){var p="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(p="change"),e[o].addEventListener(p,(function(t){for(var e=0;e<n.length;e++)n[e](t)}))}},o=0;o<e.length;o++)n()}}])}();C()(cu,"event",{});var uu=new cu;function pu(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function hu(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?pu(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):pu(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function du(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function mu(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var fu=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=du(this,e,[t,i])).options.url=i.url,n.options.startColor=i.startColor||"#c1f7f24d",n.options.endColor=i.endColor||"#ffffff00",n.options.startScale=i.startScale||1,n.options.endScale=i.endScale||20,n.options.minimumParticleLife=i.minimumParticleLife||6,n.options.maximumParticleLife=i.maximumParticleLife||7,n.options.minimumSpeed=i.minimumSpeed||9,n.options.maximumSpeed=i.maximumSpeed||9.5,n.options.emissionRate=i.emissionRate||20,n.options.particleSize=i.particleSize||.5,n.options.gravity=i.gravity||0===i.gravity?i.gravity:-3.5,n.options.show=!1!==i.show,n._elms={},n.positionCallBack=null,n.rotationCallback=null,n.onClickCallback=null,n._DialogObject=null,n._element=null,n.particleSystem,n.sdk.addIncetance(n.options.id,n),n.add(),n.operate={},n.previous={positions:{lng:n.options.lng,lat:n.options.lat,alt:n.options.alt}},n.Dialog=o,n.event=new X(n.sdk),n}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"ParticleEffects"}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.isShowView||(this.options.show=t),this.showView&&3!=this.showView?(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=!1),this.options.label&&this.options.label.show&&(this.label.show=!1)):(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=this.options.show),this.options.label&&this.options.label.show&&(this.label.show=this.options.show)),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this.isShowView=!1):console.error("参数必须为boolean")}},{key:"add",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:p=function(){var t=Cesium.HeadingPitchRoll.fromDegrees(0,0,0),e=new Cesium.TranslationRotationScale;//!!!发射粒子的方向
|
||
return e.translation=Cesium.Cartesian3.fromElements(0,0,0),e.rotation=Cesium.Quaternion.fromHeadingPitchRoll(t),Cesium.Matrix4.fromTranslationRotationScale(e)},u=function(t,i){t._billboard.id=e.options.id;var n=t.position;Cesium.Cartesian3.normalize(n,l),Cesium.Cartesian3.multiplyByScalar(l,c*i,l),t.velocity=Cesium.Cartesian3.add(t.velocity,l,t.velocity)},e=this,this.originalOptions=this.deepCopyObj(this.options),i=this.sdk.viewer.scene,new Cesium.Cartesian3,n=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),o=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(n),s=Cesium.Transforms.eastNorthUpToFixedFrame(o),Cesium.Matrix4.multiplyByScale(s,new Cesium.Cartesian3(1,1,1),s),r=this.sdk.viewer.camera.positionCartographic.height,this.particleSystem=i.primitives.add(new Cesium.ParticleSystem({show:!(r>=1e7)&&this.options.show,image:this.options.url||this.getSourceRootPath()+"/img/particlesystem/fountain.png",startColor:Cesium.Color.fromCssColorString(this.options.startColor),endColor:Cesium.Color.fromCssColorString(this.options.endColor),startScale:this.options.startScale,endScale:this.options.endScale,minimumParticleLife:this.options.minimumParticleLife,maximumParticleLife:this.options.maximumParticleLife,minimumSpeed:this.options.minimumSpeed,maximumSpeed:this.options.maximumSpeed,lifetime:.5,imageSize:new Cesium.Cartesian2(this.options.particleSize,2*this.options.particleSize),sizeInMeters:!0,emissionRate:this.options.emissionRate,loop:!0,emitter:new Cesium.ConeEmitter(Cesium.Math.toRadians(.2)),modelMatrix:s,emitterModelMatrix:p(),updateCallback:u})),l=new Cesium.Cartesian3,c=-3.5,this.particleSystem.id=this.options.id,this.entity=this.particleSystem,this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},be(this.sdk,this.options.id),this.options.show&&Qt(0,this.options.id),this.sdk.viewer.camera.changed.addEventListener((function(){if(h.entity&&h.show){var t=h.sdk.viewer.camera.positionCartographic.height;h.entity.show=!(t>=1e7)}}));case 21:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=hu({},this.options.position):this.options.positions?l=hu({},this.options.positions[0]):this.options.center?l=hu({},this.options.center):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=26;break;case 25:this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat,this.options.alt+500),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 26:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"startColor",get:function(){return this.options.startColor},set:function(t){var e=this;this.options.startColor=t,this.particleSystem.startColor=Cesium.Color.fromCssColorString(t),this._elms.startColor&&this._elms.startColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.startColor=t},clear:function(){e.startColor="rgba(255,255,255,1)"}});e._elms.startColor[n]=o}))}},{key:"endColor",get:function(){return this.options.endColor},set:function(t){var e=this;this.options.endColor=t,this.particleSystem.endColor=Cesium.Color.fromCssColorString(t),this._elms.endColor&&this._elms.endColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.endColor=t},clear:function(){e.endColor="rgba(255,255,255,1)"}});e._elms.endColor[n]=o}))}},{key:"minimumSpeed",get:function(){return this.options.minimumSpeed},set:function(t){this.options.minimumSpeed=t,this.particleSystem.minimumSpeed=t,this._elms.minimumSpeed&&this._elms.minimumSpeed.forEach((function(e){e.value=t}))}},{key:"maximumSpeed",get:function(){return this.options.maximumSpeed},set:function(t){this.options.maximumSpeed=t,this.particleSystem.maximumSpeed=t,this._elms.maximumSpeed&&this._elms.maximumSpeed.forEach((function(e){e.value=t}))}},{key:"minimumParticleLife",get:function(){return this.options.minimumParticleLife},set:function(t){this.options.minimumParticleLife=Number(t),this.particleSystem.minimumParticleLife=Number(t),this._elms.minimumParticleLife&&this._elms.minimumParticleLife.forEach((function(e){e.value=Number(t)}))}},{key:"maximumParticleLife",get:function(){return this.options.maximumParticleLife},set:function(t){this.options.maximumParticleLife=Number(t),this.particleSystem.maximumParticleLife=Number(t),this._elms.maximumParticleLife&&this._elms.maximumParticleLife.forEach((function(e){e.value=Number(t)}))}},{key:"startScale",get:function(){return this.options.startScale},set:function(t){this.options.startScale=t,this.particleSystem.startScale=t,this._elms.startScale&&this._elms.startScale.forEach((function(e){e.value=t}))}},{key:"endScale",get:function(){return this.options.endScale},set:function(t){this.options.endScale=t,this.particleSystem.endScale=t,this._elms.endScale&&this._elms.endScale.forEach((function(e){e.value=t}))}},{key:"emissionRate",get:function(){return this.options.emissionRate},set:function(t){this.options.emissionRate=t,this.particleSystem.emissionRate=t,this._elms.emissionRate&&this._elms.emissionRate.forEach((function(e){e.value=t}))}},{key:"particleSize",get:function(){return this.options.particleSize},set:function(t){this.options.particleSize=t,this.particleSystem.minimumImageSize=new Cesium.Cartesian2(t,t),this.particleSystem.maximumImageSize=new Cesium.Cartesian2(t,t),this._elms.particleSize&&this._elms.particleSize.forEach((function(e){e.value=t}))}},{key:"lng",get:function(){return this.options.lng},set:function(t){this.options.lng=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.lat},set:function(t){this.options.lat=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.alt},set:function(t){this.options.alt=t;var e=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t}))}},{key:"edit",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r=this,l=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=l.length>0&&void 0!==l[0]&&l[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=21;break}return t.next=7,new Ki(this.sdk,this.originalOptions,{title:"喷泉属性",left:"180px",top:"100px",confirmCallBack:function(t){r.name=r.name.trim(),r.name||(r.name="未命名对象"),r.originalOptions=r.deepCopyObj(r.options),r._DialogObject.close(),r.Dialog.confirmCallBack&&r.Dialog.confirmCallBack(r.originalOptions),be(r.sdk,r.options.id),re(r.sdk,r.options.id)},resetCallBack:function(){r.reset(),r.Dialog.resetCallBack&&r.Dialog.resetCallBack()},removeCallBack:function(){r.Dialog.removeCallBack&&r.Dialog.removeCallBack()},closeCallBack:function(){r.reset(),r.positionEditing=!1,r.Dialog.closeCallBack&&r.Dialog.closeCallBack()},showCallBack:function(t){r.show=t,r.Dialog.showCallBack&&r.Dialog.showCallBack()},translationalCallBack:function(){r.positionEditing=!r.positionEditing}},!0);case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" particle-effects",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <div class="row">\n <div class="col">\n <span class="label">起始颜色</span>\n <div class="start_color"></div>\n </div>\n <div class="col" style="margin: 0;justify-content: flex-end;">\n <span class="label">结束颜色</span>\n <div class="end_color"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <div class="row">\n <span>最小初速度</span>\n <input type="range" max="100" min="0" step="1" @model="minimumSpeed">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>最大初速度</span>\n <input type="range" max="100" min="0" step="1" @model="maximumSpeed">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>最小存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="minimumParticleLife">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>最大存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="maximumParticleLife">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>起始比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="startScale">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>结束比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="endScale">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>发射速率(个/秒)</span>\n <input type="range" max="100" min="0" step="1" @model="emissionRate">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>尺寸(像素)</span>\n <input type="range" max="100" min="0" step="1" @model="particleSize">\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=new YJColorPicker({el:i.getElementsByClassName("start_color")[0],size:"mini",alpha:!0,defaultColor:this.startColor,disabled:!1,openPickerAni:"opacity",sure:function(t){r.startColor=t},clear:function(){r.startColor="rgba(255,255,255,1)"}}),o=new YJColorPicker({el:i.getElementsByClassName("end_color")[0],size:"mini",alpha:!0,defaultColor:this.endColor,disabled:!1,openPickerAni:"opacity",sure:function(t){r.endColor=t},clear:function(){r.endColor="rgba(255,255,255,1)"}}),s=i.getElementsByTagName("*"),uu.on(this,s),this._elms=uu.element,this._elms.startColor=[n],this._elms.endColor=[o],t.next=21;break;case 21:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.name=this.originalOptions.name,this.startColor=this.originalOptions.startColor,this.endColor=this.originalOptions.endColor,this.minimumSpeed=this.originalOptions.minimumSpeed,this.maximumSpeed=this.originalOptions.maximumSpeed,this.minimumParticleLife=this.originalOptions.minimumParticleLife,this.maximumParticleLife=this.originalOptions.maximumParticleLife,this.startScale=this.originalOptions.startScale,this.endScale=this.originalOptions.endScale,this.emissionRate=this.originalOptions.emissionRate,this.particleSize=this.originalOptions.particleSize,this.lng=this.originalOptions.lng,this.lat=this.originalOptions.lat,this.alt=this.originalOptions.alt)}},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return mu(e,"remove",this,3)([]),this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(this.sdk&&this.sdk.viewer&&this.entity)if(this.operate.positionEditing=t,!0===t){var i;this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.picking=!1,this.previous={positions:hu({},this.entity.position)},this.event.mouse_move((function(t,n){i=t.endPosition;var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.lng=o.lng,e.options.lat=o.lat,e.options.alt=o.alt;var s=Cesium.Cartographic.fromDegrees(e.options.lng,e.options.lat,e.options.alt),a=e.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(s);e.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(a),e._elms.lng&&e._elms.lng.forEach((function(t){t.value=e.options.lng})),e._elms.lat&&e._elms.lat.forEach((function(t){t.value=e.options.lat})),e._elms.alt&&e._elms.alt.forEach((function(t){t.value=e.options.alt})),e.tip.setPosition(n,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,n){if(!i||i.x!==t.position.x||i.y!==t.position.y-2){var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.lng=o.lng,e.options.lat=o.lat,e.options.alt=o.alt}e.entity.position={lng:e.options.lng,lat:e.options.lat,alt:e.options.alt},e.previous={positions:hu({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.options.lng=e.entity.position.lng,e.options.lat=e.entity.position.lat,e.options.alt=e.entity.position.alt,e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.options.lng=e.entity.position.lng,e.options.lat=e.entity.position.lat,e.options.alt=e.entity.position.alt,e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.lng=t.lng,e.options.lat=t.lat,e.options.alt=t.alt,e.entity.position={lng:e.options.lng,lat:e.options.lat,alt:e.options.alt},e.previous={positions:hu({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1}}))}))}else{if(this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){}))),this.tip&&this.tip.destroy(),!this.sdk||!this.sdk.viewer||!this.entity)return;this.options.lng=this.entity.position.lng,this.options.lat=this.entity.position.lat,this.options.alt=this.entity.position.alt;var n=Cesium.Cartographic.fromDegrees(this.options.lng,this.options.lat,this.options.alt),o=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(n);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(o),this._elms.lng&&this._elms.lng.forEach((function(t){t.value=e.options.lng})),this._elms.lat&&this._elms.lat.forEach((function(t){t.value=e.options.lat})),this._elms.alt&&this._elms.alt.forEach((function(t){t.value=e.options.alt}))}}},{key:"flicker",value:function(){}}]);var i,n,s,r}(jn);function vu(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return gu(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?gu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function gu(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function yu(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function bu(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?yu(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):yu(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Cu(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function wu(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}var ku=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=Cu(this,e,[t,i])).options.url=i.url,n.options.startColor=i.startColor||"#c1f7f2",n.options.endColor=i.endColor||"#ffffff00",n.options.startScale=i.startScale||.2,n.options.endScale=i.endScale||2,n.options.minimumParticleLife=i.minimumParticleLife||12,n.options.maximumParticleLife=i.maximumParticleLife||12,n.options.emissionRate=i.emissionRate||100,n.options.particleSize=i.particleSize||1,n.options.show=!1!==i.show,n._elms={},n.positionCallBack=null,n.rotationCallback=null,n.onClickCallback=null,n._DialogObject=null,n._element=null,n.particleSystem,n.sdk.addIncetance(n.options.id,n),n.add(),n.operate={},n.previous={positions:{lng:n.options.start.lng,lat:n.options.start.lat,alt:n.options.start.alt}},n.Dialog=o,n.event=new X(n.sdk),n}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"ParticleEffects"}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.isShowView||(this.options.show=t),this.showView&&3!=this.showView?(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=!1),this.options.label&&this.options.label.show&&(this.label.show=!1)):(this.entity&&this.sdk.viewer.camera.positionCartographic.height<1e7&&(this.entity.show=this.options.show),this.options.label&&this.options.label.show&&(this.label.show=this.options.show)),this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this.isShowView=!1):console.error("参数必须为boolean")}},{key:"add",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:C=function(t,e){var i=new Cesium.Cartesian3,n=Cesium.Transforms.eastNorthUpToFixedFrame(t);return Cesium.Matrix4.inverse(n,n),Cesium.Matrix4.multiplyByPoint(n,e,i),Cesium.Cartesian3.normalize(i,i),Cesium.Math.toDegrees(Math.atan2(i.x,i.y))},b=function(){var t=Cesium.HeadingPitchRoll.fromDegrees(e.options.heading+90,e.options.pitch,0),i=new Cesium.TranslationRotationScale;//!!!发射粒子的方向
|
||
return i.translation=Cesium.Cartesian3.fromElements(0,0,1),i.rotation=Cesium.Quaternion.fromHeadingPitchRoll(t),Cesium.Matrix4.fromTranslationRotationScale(i)},y=function(t,i){t._billboard.id=e.options.id;var n=t.position;Cesium.Cartesian3.normalize(n,r),Cesium.Cartesian3.multiplyByScalar(r,l*i,r),t.velocity=Cesium.Cartesian3.add(t.velocity,r,t.velocity)},e=this,this.originalOptions=this.deepCopyObj(this.options),i=this.sdk.viewer.scene,n=Cesium.Cartographic.fromDegrees(this.options.start.lng,this.options.start.lat,this.options.start.alt),o=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(n),s=Cesium.Transforms.eastNorthUpToFixedFrame(o),Cesium.Matrix4.multiplyByScale(s,new Cesium.Cartesian3(1,1,1),s),r=new Cesium.Cartesian3,l=-3.8,c=Cesium.Cartesian3.fromDegrees(this.options.start.lng,this.options.start.lat,this.options.start.alt),u=Cesium.Cartesian3.fromDegrees(this.options.end.lng,this.options.end.lat,this.options.end.alt),this.options.heading||0===this.options.heading||(this.options.heading=C(c,u)),p=this.options.end.alt-this.options.start.alt,h=Cesium.Cartesian3.distance(c,Cesium.Cartesian3.fromDegrees(this.options.end.lng,this.options.end.lat,this.options.start.alt)),d=p?2*p/h:0,m=Math.atan(d)*(180/Math.PI),f=Math.sqrt(Math.abs(d)*h/-l),v=-l*f/Math.abs(Math.cos(m)),this.options.pitch||0===this.options.pitch||(this.options.pitch=90-m),this.options.speed||0===this.options.speed||(this.options.speed=v),g=this.sdk.viewer.camera.positionCartographic.height,this.particleSystem=i.primitives.add(new Cesium.ParticleSystem({show:!(g>=1e7)&&this.options.show,image:this.options.url||this.getSourceRootPath()+"/img/particlesystem/smoke.png",startColor:Cesium.Color.fromCssColorString(this.options.startColor),endColor:Cesium.Color.fromCssColorString(this.options.endColor),startScale:this.options.startScale,endScale:this.options.endScale,minimumParticleLife:this.options.minimumParticleLife,maximumParticleLife:this.options.maximumParticleLife,minimumSpeed:this.options.speed,maximumSpeed:this.options.speed,lifetime:.5,imageSize:new Cesium.Cartesian2(this.options.particleSize,2*this.options.particleSize),sizeInMeters:!0,emissionRate:this.options.emissionRate,loop:!0,emitter:new Cesium.CircleEmitter(.2),modelMatrix:s,emitterModelMatrix:b(),updateCallback:y})),this.particleSystem.id=this.options.id,this.entity=this.particleSystem,this.entity.position={lng:this.options.start.lng,lat:this.options.start.lat,alt:this.options.start.alt},be(this.sdk,this.options.id),this.options.show&&Qt(0,this.options.id),this.sdk.viewer.camera.changed.addEventListener((function(){if(w.entity&&w.show){var t=w.sdk.viewer.camera.positionCartographic.height;w.entity.show=!(t>=1e7)}}));case 31:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=bu({},this.options.position):this.options.positions?l=bu({},this.options.positions[0]):this.options.line&&this.options.line.positions?l=bu({},this.options.line.positions[0]):this.options.center?l=bu({},this.options.center):this.options.start?l=bu({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=24;break;case 23:this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.start.lng,this.options.start.lat,this.options.start.alt+500),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 24:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"startColor",get:function(){return this.options.startColor},set:function(t){var e=this;this.options.startColor=t,this.particleSystem.startColor=Cesium.Color.fromCssColorString(t),this._elms.startColor&&this._elms.startColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.startColor=t},clear:function(){e.startColor="rgba(255,255,255,1)"}});e._elms.startColor[n]=o}))}},{key:"endColor",get:function(){return this.options.endColor},set:function(t){var e=this;this.options.endColor=t,this.particleSystem.endColor=Cesium.Color.fromCssColorString(t),this._elms.endColor&&this._elms.endColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.endColor=t},clear:function(){e.endColor="rgba(255,255,255,1)"}});e._elms.endColor[n]=o}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){this.options.speed=Number(t),this.particleSystem.minimumSpeed=Number(t),this.particleSystem.maximumSpeed=Number(t),this._elms.speed&&this._elms.speed.forEach((function(e){e.value=Number(t)}))}},{key:"minimumParticleLife",get:function(){return this.options.minimumParticleLife},set:function(t){this.options.minimumParticleLife=Number(t),this.particleSystem.minimumParticleLife=Number(t),this._elms.minimumParticleLife&&this._elms.minimumParticleLife.forEach((function(e){e.value=Number(t)}))}},{key:"maximumParticleLife",get:function(){return this.options.maximumParticleLife},set:function(t){this.options.maximumParticleLife=Number(t),this.particleSystem.maximumParticleLife=Number(t),this._elms.maximumParticleLife&&this._elms.maximumParticleLife.forEach((function(e){e.value=Number(t)}))}},{key:"startScale",get:function(){return this.options.startScale},set:function(t){this.options.startScale=Number(t),this.particleSystem.startScale=Number(t),this._elms.startScale&&this._elms.startScale.forEach((function(e){e.value=Number(t)}))}},{key:"endScale",get:function(){return this.options.endScale},set:function(t){this.options.endScale=Number(t),this.particleSystem.endScale=Number(t),this._elms.endScale&&this._elms.endScale.forEach((function(e){e.value=Number(t)}))}},{key:"emissionRate",get:function(){return this.options.emissionRate},set:function(t){this.options.emissionRate=Number(t),this.particleSystem.emissionRate=Number(t),this._elms.emissionRate&&this._elms.emissionRate.forEach((function(e){e.value=Number(t)}))}},{key:"particleSize",get:function(){return this.options.particleSize},set:function(t){this.options.particleSize=Number(t),this.particleSystem.minimumImageSize=new Cesium.Cartesian2(Number(t),2*Number(t)),this.particleSystem.maximumImageSize=new Cesium.Cartesian2(Number(t),2*Number(t)),this._elms.particleSize&&this._elms.particleSize.forEach((function(e){e.value=Number(t)}))}},{key:"lng",get:function(){return this.options.start.lng},set:function(t){this.options.start.lng=t;var e=Cesium.Cartographic.fromDegrees(this.options.start.lng,this.options.start.lat,this.options.start.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.start.lng,lat:this.options.start.lat,alt:this.options.start.alt},this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.start.lat},set:function(t){this.options.start.lat=t;var e=Cesium.Cartographic.fromDegrees(this.options.start.lng,this.options.start.lat,this.options.start.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.start.lng,lat:this.options.start.lat,alt:this.options.start.alt},this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.start.alt},set:function(t){this.options.start.alt=t;var e=Cesium.Cartographic.fromDegrees(this.options.start.lng,this.options.start.lat,this.options.start.alt),i=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(e);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this.entity.position={lng:this.options.start.lng,lat:this.options.start.lat,alt:this.options.start.alt},this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t}))}},{key:"heading",get:function(){return this.options.heading},set:function(t){this.options.heading=Number(t);var e=Cesium.HeadingPitchRoll.fromDegrees(this.options.heading+90,this.options.pitch,0),i=new Cesium.TranslationRotationScale;//!!!发射粒子的方向
|
||
i.translation=Cesium.Cartesian3.fromElements(0,0,1),i.rotation=Cesium.Quaternion.fromHeadingPitchRoll(e);var n=Cesium.Matrix4.fromTranslationRotationScale(i);this.particleSystem.emitterModelMatrix=n,this._elms.heading&&this._elms.heading.forEach((function(e){e.value=Number(t)}))}},{key:"pitch",get:function(){return this.options.pitch},set:function(t){this.options.pitch=Number(t);var e=Cesium.HeadingPitchRoll.fromDegrees(this.options.heading+90,this.options.pitch,0),i=new Cesium.TranslationRotationScale;//!!!发射粒子的方向
|
||
i.translation=Cesium.Cartesian3.fromElements(0,0,1),i.rotation=Cesium.Quaternion.fromHeadingPitchRoll(e);var n=Cesium.Matrix4.fromTranslationRotationScale(i);this.particleSystem.emitterModelMatrix=n,this._elms.pitch&&this._elms.pitch.forEach((function(e){e.value=Number(t)}))}},{key:"edit",value:(n=o()(a.a.mark((function t(){var i,n,o,s,r,l=this,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=c.length>0&&void 0!==c[0]&&c[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=20;break}return t.next=7,new Ki(this.sdk,this.originalOptions,{title:"喷射水柱属性",left:"180px",top:"100px",confirmCallBack:function(t){l.name=l.name.trim(),l.name||(l.name="未命名对象"),l.originalOptions=l.deepCopyObj(l.options),l._DialogObject.close(),l.Dialog.confirmCallBack&&l.Dialog.confirmCallBack(l.originalOptions),be(l.sdk,l.options.id),re(l.sdk,l.options.id)},resetCallBack:function(){l.reset(),l.Dialog.resetCallBack&&l.Dialog.resetCallBack()},removeCallBack:function(){l.Dialog.removeCallBack&&l.Dialog.removeCallBack()},closeCallBack:function(){l.reset(),l.positionEditing=!1,l.Dialog.closeCallBack&&l.Dialog.closeCallBack()},showCallBack:function(t){l.show=t,l.Dialog.showCallBack&&l.Dialog.showCallBack()},translationalCallBack:function(){l.positionEditing=!l.positionEditing}},!0);case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" particle-effects",(n=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input style="width: 175px;" class="input" type="text" @model="name">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <div class="row">\n <div class="col">\n <span class="label">起始颜色</span>\n <div class="start_color"></div>\n </div>\n <div class="col" style="margin: 0;justify-content: flex-end;">\n <span class="label">结束颜色</span>\n <div class="end_color"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <div class="row">\n <span>速度</span>\n <input type="range" max="30" min="0" step="0.1" @model="speed">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>发射速率(个/秒)</span>\n <input type="range" max="100" min="0" step="1" @model="emissionRate">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>最小存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="minimumParticleLife">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>最大存在时间</span>\n <input type="range" max="100" min="0.01" step="0.1" @model="maximumParticleLife">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>起始比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="startScale">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>结束比例</span>\n <input type="range" max="10" min="0" step="0.1" @model="endScale">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>朝向</span>\n <input type="range" max="360" min="0.1" step="0.1" @model="heading">\n </div>\n </div>\n <div class="col">\n <div class="row">\n <span>俯仰角度</span>\n <input type="range" max="360" min="0.1" step="0.1" @model="pitch">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <div class="row">\n <span>尺寸(像素)</span>\n <input type="range" max="100" min="0" step="1" @model="particleSize">\n </div>\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(n),o=new YJColorPicker({el:n.getElementsByClassName("start_color")[0],size:"mini",alpha:!0,defaultColor:this.startColor,disabled:!1,openPickerAni:"opacity",sure:function(t){l.startColor=t},clear:function(){l.startColor="rgba(255,255,255,1)"}}),s=new YJColorPicker({el:n.getElementsByClassName("end_color")[0],size:"mini",alpha:!0,defaultColor:this.endColor,disabled:!1,openPickerAni:"opacity",sure:function(t){l.endColor=t},clear:function(){l.endColor="rgba(255,255,255,1)"}}),r=n.getElementsByTagName("*"),e.EventBinding(this,r),this._elms.startColor=[o],this._elms.endColor=[s],t.next=20;break;case 20:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.name=this.originalOptions.name,this.startColor=this.originalOptions.startColor,this.endColor=this.originalOptions.endColor,this.speed=this.originalOptions.speed,this.minimumParticleLife=this.originalOptions.minimumParticleLife,this.maximumParticleLife=this.originalOptions.maximumParticleLife,this.startScale=this.originalOptions.startScale,this.endScale=this.originalOptions.endScale,this.emissionRate=this.originalOptions.emissionRate,this.particleSize=this.originalOptions.particleSize,this.lng=this.originalOptions.start.lng,this.lat=this.originalOptions.start.lat,this.alt=this.originalOptions.start.alt)}},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return wu(e,"remove",this,3)([]),this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(this.sdk&&this.sdk.viewer&&this.entity)if(this.operate.positionEditing=t,!0===t){var i;this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.picking=!1,this.previous={positions:bu({},this.entity.position)},this.event.mouse_move((function(t,n){i=t.endPosition;var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.start.lng=o.lng,e.options.start.lat=o.lat,e.options.start.alt=o.alt;var s=Cesium.Cartographic.fromDegrees(e.options.start.lng,e.options.start.lat,e.options.start.alt),a=e.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(s);e.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(a),e._elms.lng&&e._elms.lng.forEach((function(t){t.value=e.options.start.lng})),e._elms.lat&&e._elms.lat.forEach((function(t){t.value=e.options.start.lat})),e._elms.alt&&e._elms.alt.forEach((function(t){t.value=e.options.start.alt})),e.tip.setPosition(n,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,n){if(!i||i.x!==t.position.x||i.y!==t.position.y-2){var o=e.cartesian3Towgs84(n,e.sdk.viewer);e.options.start.lng=o.lng,e.options.start.lat=o.lat,e.options.start.alt=o.alt}e.entity.position={lng:e.options.start.lng,lat:e.options.start.lat,alt:e.options.start.alt},e.previous={positions:bu({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.options.start.lng=e.entity.position.lng,e.options.start.lat=e.entity.position.lat,e.options.start.alt=e.entity.position.alt,e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.options.lng=e.entity.position.lng,e.options.lat=e.entity.position.lat,e.options.alt=e.entity.position.alt,e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.lng=t.lng,e.options.lat=t.lat,e.options.alt=t.alt,e.entity.position={lng:e.options.lng,lat:e.options.lat,alt:e.options.alt},e.previous={positions:bu({},e.entity.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1}}))}))}else{if(this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){}))),this.tip&&this.tip.destroy(),!this.sdk||!this.sdk.viewer||!this.entity)return;this.options.start.lng=this.entity.position.lng,this.options.start.lat=this.entity.position.lat,this.options.start.alt=this.entity.position.alt;var n=Cesium.Cartographic.fromDegrees(this.options.start.lng,this.options.start.lat,this.options.start.alt),o=this.sdk.viewer.scene.globe.ellipsoid.cartographicToCartesian(n);this.entity.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(o),this._elms.lng&&this._elms.lng.forEach((function(t){t.value=e.options.start.lng})),this._elms.lat&&this._elms.lat.forEach((function(t){t.value=e.options.start.lat})),this._elms.alt&&this._elms.alt.forEach((function(t){t.value=e.options.start.alt}))}}},{key:"flicker",value:function(){}}],[{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=vu(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}}]);var i,n,s,r}(jn);function xu(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">多面体颜色</span>\n <div class="color"></div>\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <span class="label">多面体高度</span>\n <div class="input-number input-number-unit-1" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="9999999" data-null data-min="0.01" @model="height">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n \x3c!-- <div class="col">\n <span class="label">拉伸高度</span>\n <input class="input" type="number" title="" min="0" max="9999999" @model="extrudedHeight">\n </div> --\x3e\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="polygon-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function _u(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Eu(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Eu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Eu(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var Su=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[],r=function(){};if(!e[o]||!e[o].attributes)return 1;var l,c=_u(e[o].attributes);try{var u=function(){var c=l.value;switch(c.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[c.value]=e.target.checked})),e[o].checked=t[c.value]):(n.push((function(e){var i=e.target.value;if("number"==e.target.type){var n=e.target.value+"";if("."!=e.data&&("-"!=e.data||e.target.value)&&("0"!=n.charAt(n.length-1)||!e.target.value.toString().includes("."))&&"0"!=e.target.value){if(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),"undefined"!==e.target.dataset.min&&""!==e.target.dataset.min){var o=Number(e.target.dataset.min);i<o&&(i=o)}t[c.value]=i}}else t[c.value]=i})),r=function(e){var i=e.target.value;(e.target.value||"undefined"!==e.target.dataset.null&&""!==e.target.dataset.null&&!Boolean(e.target.dataset.null))&&(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),e.target.dataset.min&&i<Number(e.target.dataset.min)&&(i=Number(e.target.dataset.min))),t[c.value]=i},"IMG"==e[o].nodeName?e[o].src=t[c.value]:e[o].value=t[c.value]),i.element[c.value]?i.element[c.value].push(e[o]):i.element[c.value]=[e[o]],a.push(c.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t[c.value]&&t[c.value](e)})),a.push(c.name);break;case"@change":s=!0,n.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[c.value]&&t[c.value](e,i)}))}};for(c.s();!(l=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}for(var p=0;p<a.length;p++)e[o].attributes.removeNamedItem(a[p]);if(s){var h="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(h="change"),e[o].addEventListener(h,(function(t){for(var e=0;e<n.length;e++)n[e](t)})),e[o].addEventListener("blur",r)}},o=0;o<e.length;o++)n()}}])}();C()(Su,"event",{});var Du=new Su;function Mu(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Pu(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Pu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Pu(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Ou(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Tu=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=Ou(this,e,[t,n])).options.color=n.color||"#ff0000",i.options.show=!n.show&&!1!==n.show||n.show,i.options.height=n.height||0===n.height?n.height:10,i.options.height<=.01&&(i.options.height=.01),i.options.extrudedHeight=n.extrudedHeight||0===n.extrudedHeight?n.extrudedHeight:0,i.entity,i.nodePoints=[],i.operate={},i.options["area-unit"]=n["area-unit"]||"平方米",n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i._elms={},i.Dialog=o,!i.options.positions||i.options.positions.length<3?(i._error="多面体最少需要三个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500})):(i.sdk.addIncetance(i.options.id,i),e.create(i)),i}return Xi()(e,t),_()(e,[{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=this;if(this.event&&this.event.destroy(),this.event=new X(this.sdk),this.operate.positionEditing=t,this.previous={positions:L()(this.positions)},!0===t){var n;this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)"));var o=Cesium.Color.fromCssColorString(this.options.color).withAlpha(.99);2===this.sdk.viewer.scene.mode&&(o=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=o,this.picking=!1;for(var s=[],a=this.positions,r=[],l=0;l<a.length;l++){var c=this.cartesian3Towgs84(a[l],this.sdk.viewer);s.push([c.lng,c.lat])}var u=this.cartesian3Towgs84(a[0],this.sdk.viewer);s.push([u.lng,u.lat]);for(var p=turf.polygon([s]),h=turf.centroid(p),d=(n=Cesium.Cartesian3).fromDegrees.apply(n,L()(h.geometry.coordinates)),m=0;m<a.length;m++)d.x,a[m].x,r.push({x:d.x-a[m].x,y:d.y-a[m].y,z:d.z-a[m].z});var f=[];this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer),o=Cesium.Cartesian3.fromDegrees(n.lng,n.lat);f=[];for(var s=0;s<r.length;s++)f.push({x:o.x-r[s].x,y:o.y-r[s].y,z:o.z-r[s].z});e.label.position=[n.lng,n.lat,e.options.height+e.options.extrudedHeight],e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.event.destroy();var n=e.cartesian3Towgs84(i,e.sdk.viewer),o=Cesium.Cartesian3.fromDegrees(n.lng,n.lat);f=[],e.options.positions=[];for(var s=0;s<r.length;s++){f.push({x:o.x-r[s].x,y:o.y-r[s].y,z:o.z-r[s].z});var a=e.cartesian3Towgs84({x:o.x-r[s].x,y:o.y-r[s].y,z:o.z-r[s].z},e.sdk.viewer);a.alt=a.alt-e.options.height,e.options.positions.push(a)}e.positions=f,e.previous.positions=f,e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.event.destroy();var t=e.cartesian3Towgs84(i,e.sdk.viewer),o=Cesium.Cartesian3.fromDegrees(t.lng,t.lat);f=[],e.options.positions=[];for(var s=0;s<r.length;s++){f.push({x:o.x-r[s].x,y:o.y-r[s].y,z:o.z-r[s].z});var a=e.cartesian3Towgs84({x:o.x-r[s].x,y:o.y-r[s].y,z:o.z-r[s].z},e.sdk.viewer);a.alt=a.alt-e.options.height,e.options.positions.push(a)}e.positions=f,e.previous.positions=f,e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return f.length>0?new Cesium.PolygonHierarchy(f):new Cesium.PolygonHierarchy(a)}),!1)}else{this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)"));var v=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(v=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=v,this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){})),this.event.destroy()),this.tip&&this.tip.destroy();for(var g=[[]],y=0;y<this.previous.positions.length;y++){var b=this.cartesian3Towgs84(this.previous.positions[y],this.sdk.viewer);g[0].push([b.lng,b.lat])}var C=this.cartesian3Towgs84(this.previous.positions[0],this.sdk.viewer);g[0].push([C.lng,C.lat]);var w=turf.polygon(g),k=turf.centroid(w);this.label.position=[k.geometry.coordinates[0],k.geometry.coordinates[1],this.options.height+this.options.extrudedHeight],this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.previous.positions)}),!0)}}}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"#ff0000",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[i]=n}))}}},{key:"height",get:function(){return this.options.height},set:function(t){this.options.height=t,this.options.height<=.01&&(this.options.height=.01);for(var e=[[]],i=0;i<this.options.positions.length;i++)e[0].push([this.options.positions[i].lng,this.options.positions[i].lat,this.options.height+this.options.extrudedHeight]);e[0].push([this.options.positions[0].lng,this.options.positions[0].lat,this.options.height+this.options.extrudedHeight]);var n,o=turf.polygon(e),s=turf.centroid(o);this.label.position=[s.geometry.coordinates[0],s.geometry.coordinates[1],this.options.extrudedHeight+this.options.height],n=this.entity.polygon.hierarchy._value?this.entity.polygon.hierarchy._value.positions:this.entity.polygon.hierarchy._callback().positions;var a=[];this.entity.polygon.perPositionHeight=!0;for(var r=0;r<n.length;r++){var l=Cesium.Cartographic.fromCartesian(n[r]),c=Cesium.Math.toDegrees(l.longitude),u=Cesium.Math.toDegrees(l.latitude),p=new Cesium.Cartesian3.fromDegrees(c,u,this.options.extrudedHeight+t);a.push(p)}this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(a),this.positions=a,this.previous={positions:L()(this.positions)},this._elms.height&&this._elms.height.forEach((function(e){e.value=t}))}},{key:"extrudedHeight",get:function(){return this.options.extrudedHeight},set:function(t){this.options.extrudedHeight=t;for(var e=[[]],i=0;i<this.options.positions.length;i++)e[0].push([this.options.positions[i].lng,this.options.positions[i].lat]);e[0].push([this.options.positions[0].lng,this.options.positions[0].lat]);var n=turf.polygon(e),o=turf.centroid(n);this.label.position=[o.geometry.coordinates[0],o.geometry.coordinates[1],this.options.extrudedHeight+this.options.height],this._elms.extrudedHeight&&this._elms.extrudedHeight.forEach((function(e){e.value=t}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Mu(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Mu(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Mu(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Mu(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._error){t.next=2;break}return t.abrupt("return");case 2:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=32;break}return t.next=8,new Ki(this.sdk,this.options,{title:"多面体属性",left:"180px",top:"100px",confirmCallBack:function(t){p.name=p.name.trim(),p.name||(p.name="未命名对象"),p.options.label.position={lng:p.label.position[0],lat:p.label.position[1],alt:p.label.position[2]},p.originalOptions=p.deepCopyObj(p.options),p._DialogObject.close(),p.Dialog.confirmCallBack&&p.Dialog.confirmCallBack(p.originalOptions),be(p.sdk,p.options.id),re(p.sdk,p.options.id)},resetCallBack:function(){p.reset(),p.Dialog.resetCallBack&&p.Dialog.resetCallBack()},removeCallBack:function(){p.Dialog.removeCallBack&&p.Dialog.removeCallBack()},closeCallBack:function(){p.reset(),p.Dialog.closeCallBack&&p.Dialog.closeCallBack();for(var t=0;t<p.nodePoints.length;t++)p.sdk.viewer.entities.remove(p.nodePoints[t]);p.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),p.positionEditing=!1},showCallBack:function(t){p.options.show=t,p.originalOptions.show=t,p.show=t,p.Dialog.showCallBack&&p.Dialog.showCallBack()},translationalCallBack:function(){p.positionEditing=!p.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(p)}});case 8:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" polyhedron",(n=document.createElement("div")).innerHTML=xu(this),this._DialogObject.contentAppChild(n),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("polygon-object-edit-tabs",void 0,this.sdk),o=new YJColorPicker({el:n.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){p.color=t},clear:function(){p.color="rgba(255,255,255,1)"}}),s=new YJColorPicker({el:n.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelColor=t},clear:function(){p.labelColor="rgba(255,255,255,1)"}}),r=new YJColorPicker({el:n.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelLineColor=t},clear:function(){p.labelLineColor="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelBackgroundColorStart=t},clear:function(){p.labelBackgroundColorStart="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelBackgroundColorEnd=t},clear:function(){p.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),u=n.getElementsByTagName("*"),Du.on(this,u),this._elms=Du.element,this._elms.color=[o],this._elms.labelColor=[s],this._elms.labelLineColor=[r],this._elms.labelBackgroundColorStart=[l],this._elms.labelBackgroundColorEnd=[c],setTimeout((function(){p.attributeLink=p.options.attribute.link.content,p.attributeVr=p.options.attribute.vr.content,p.cameraSelect&&p.cameraSelect(),p.goodsSelect&&p.goodsSelect();var t=p.attributeSelect,e=p._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=p._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],o=0;o<t.length;o++)if(t[o].key===p.options.attributeType){n.value=t[o].value,i.legp_searchActive(t[o].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){p.attributeType=t[e].key;break}}))}var s=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],a=Y(p._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(a){a.legp_search(s);var r=p._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];r.value=p.options["area-unit"];for(var l=0;l<s.length;l++)if(s[l].value===r.value){a.legp_searchActive(s[l].value);break}r.addEventListener("input",(function(){for(var t=0;t<s.length;t++)if(s[t].value===r.value){p.areaUnit=s[t].value;break}}))}var c=Rn(),u=Y(p._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(u){u.legp_search(c);var h=p._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];h.value=c[p.labelFontFamily].value;for(var d=0;d<c.length;d++)if(c[d].value==h.value){u.legp_searchActive(c[d].value);break}h.addEventListener("input",(function(){for(var t=0;t<c.length;t++)if(c[t].value===h.value){p.labelFontFamily=c[t].key;break}})),p._elms.labelFontFamily=[h]}}),0),t.next=33;break;case 32:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 33:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.entity){t.next=2;break}return t.abrupt("return");case 2:if(this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.height=this.originalOptions.height,this.extrudedHeight=this.originalOptions.extrudedHeight,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeVr=this.options.attribute.vr.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect(),e=this.options.positions,i=[],this.options.height||0===this.options.height){for(n=0;n<e.length;n++)i.push(e[n].lng,e[n].lat,this.options.height+this.options.extrudedHeight);this.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i)}else{for(o=0;o<e.length;o++)i.push(e[o].lng,e[o].lat);this.positions=Cesium.Cartesian3.fromDegreesArray(i)}for(this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(this.positions),s=[[]],r=0;r<this.options.positions.length;r++)s[0].push([this.options.positions[r].lng,this.options.positions[r].lat]);return s[0].push([this.options.positions[0].lng,this.options.positions[0].lat]),l=turf.polygon(s),c=turf.pointOnFeature(l),t.next=38,this.getClampToHeight({lng:c.geometry.coordinates[0],lat:c.geometry.coordinates[1]});case 38:t.sent,this.label.position=[c.geometry.coordinates[0],c.geometry.coordinates[1],this.extrudedHeight+this.height];case 40:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label&&this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;for(var i=[[]],n=0;n<this.options.positions.length;n++)i[0].push([this.options.positions[n].lng,this.options.positions[n].lat]);i[0].push([this.options.positions[0].lng,this.options.positions[0].lat]);var o=turf.polygon(i),s=turf.pointOnFeature(o),a=document.getElementById(e.domid);this.sdk.viewer.scene.postRender.addEventListener((function(i){var n=Cesium.Cartesian3.fromDegrees(s.geometry.coordinates[0],s.geometry.coordinates[1],t.options.extrudedHeight+t.options.height);if("block"===a.style.display||""===a.style.display){var o=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);o&&(a.style.left=(o.x+e.x).toFixed(0)+"px",a.style.top=(o.y+e.y).toFixed(0)+"px")}}))}}],[{key:"createLabel",value:(i=o()(a.a.mark((function t(e){var i,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i=[[]],n=0;n<e.options.positions.length;n++)i[0].push([e.options.positions[n].lng,e.options.positions[n].lat]);i[0].push([e.options.positions[0].lng,e.options.positions[0].lat]),o=turf.polygon(i),s=turf.pointOnFeature(o),e.options.label.position||(e.options.label.position={lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1],alt:e.options.extrudedHeight+e.options.height}),e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,ground:!1,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far});case 7:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"create",value:function(t){for(var i=t.options.positions,n=[],o=i[0].alt,s=0;s<i.length;s++)o>i[s].alt&&(o=i[s].alt);t.options.extrudedHeight=o;for(var a=0;a<i.length;a++)n.push(i[a].lng,i[a].lat,t.options.height+o);t.positions=Cesium.Cartesian3.fromDegreesArrayHeights(n);var r=Cesium.Color.fromCssColorString(t.options.color);switch(2===t.sdk.viewer.scene.mode&&(r=new Cesium.CustomColorMaterialSource({color:t.options.color})),t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,polygon:{hierarchy:new Cesium.PolygonHierarchy(t.positions),extrudedHeight:t.options.extrudedHeight,perPositionHeight:!0,material:r}}),e.createLabel(t),t.options.areaByMeter=t.computeArea(i),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n;YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];var o=!1,s=function(e,s){if(i){t.options.positions[i.index]=t.cartesian3Towgs84(s,t.sdk.viewer),n=t.options.positions[i.index],o=!0;var a=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",position:Cesium.Cartesian3.fromDegrees(t.options.positions[i.index].lng,t.options.positions[i.index].lat,t.options.extrudedHeight),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.splice(i.index,0,a),t.options.positions.splice(i.index,0,t.options.positions[i.index]),t.options.areaByMeter=t.computeArea(t.options.positions);for(var r=[[]],l=0;l<t.options.positions.length;l++)r[0].push([t.options.positions[l].lng,t.options.positions[l].lat]);if(r[0].push([t.options.positions[0].lng,t.options.positions[0].lat]),r[0].length>=4){var c=turf.polygon(r),u=turf.centroid(c);t.label.position=[u.geometry.coordinates[0],u.geometry.coordinates[1],t.options.height+t.options.extrudedHeight]}switch(t.options["area-unit"]){case"平方米":t.area=t.options.areaByMeter;break;case"平方千米":t.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.area=t.options.areaByMeter}}else{var p=t.sdk.viewer.scene.pick(e.position);p&&p.id&&p.id.name&&"node-secondary-edit-point"===p.id.name&&(i=p.id,t.nodePoints.splice(p.id.index,1),t.sdk.viewer.entities.remove(p.id),t.tip.set_text("左键确认,右键结束,CTRL+右键撤销"),n=t.cartesian3Towgs84(i.position._value,t.sdk.viewer))}},a=function(s,a){if(i){switch(t.options.positions[i.index]=n,o&&t.options.positions.splice(i.index,1),t.options.areaByMeter=t.computeArea(t.options.positions),t.options["area-unit"]){case"平方米":t.area=t.options.areaByMeter;break;case"平方千米":t.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.area=t.options.areaByMeter}for(var r=t.options.positions,l=[],c=0;c<r.length;c++)l.push(r[c].lng,r[c].lat,t.options.height+t.options.extrudedHeight);t.positions=Cesium.Cartesian3.fromDegreesArrayHeights(l),t.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(t.positions),e(null,t.options.positions)}for(var u=0;u<t.nodePoints.length;u++)t.sdk.viewer.entities.remove(t.nodePoints[u]);t.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),t.event.destroy(),t.tip.destroy()};t.event.mouse_left(s),t.event.mouse_right(a),t.event.mouse_move((function(e,n){if(i){t.options.positions[i.index]=t.cartesian3Towgs84(n,t.sdk.viewer);for(var o=t.options.positions,s=[],a=0;a<o.length;a++)s.push(o[a].lng,o[a].lat,t.options.height+t.options.extrudedHeight);t.positions=Cesium.Cartesian3.fromDegreesArrayHeights(s),t.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(t.positions);for(var r=[[]],l=0;l<t.options.positions.length;l++)r[0].push([t.options.positions[l].lng,t.options.positions[l].lat]);if(r[0].push([t.options.positions[0].lng,t.options.positions[0].lat]),r[0].length>=4){var c=turf.polygon(r),u=turf.centroid(c);t.label.position=[u.geometry.coordinates[0],u.geometry.coordinates[1],t.options.height+t.options.extrudedHeight]}}t.tip.setPosition(n,e.endPosition.x,e.endPosition.y)})),t.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?a(o,i):s(o,i)}))})),t.event.mouse_right_keyboard_ctrl((function(e,n){i&&(t.options.positions.pop(),t.sdk.viewer.entities.remove(t.nodePoints[t.nodePoints.length-1]),i.index===t.options.positions.length&&(t.nodePoints[i.index-1]?i=t.nodePoints[i.index-1]:i.index=0),t.nodePoints.pop())}));for(var r=0;r<t.options.positions.length;r++){var l=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:r,position:Cesium.Cartesian3.fromDegrees(t.options.positions[r].lng,t.options.positions[r].lat,t.options.extrudedHeight),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.push(l)}}}}]);var i,n,s,r}(jn);C()(Tu,"elms",{});var Nu=Tu;function Bu(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="assemble-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">边线颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">边线宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function Lu(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Au(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Lu(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Lu(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ju(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Iu(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Iu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Iu(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Fu(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Ru=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),(i=Fu(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"#ff000080",i.options.show=!n.show&&!1!==n.show||n.show,i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.positions=n.positions||[],i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",i.entity,i.event=new X(i.sdk),i.operate={},i._elms={},i.Dialog=o,n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.nodePoints=[],!i.options.positions||i.options.positions.length<3)i._error="集结地最少需要三个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500});else{if(!i.options.height&&0!==i.options.height){for(var s=i.options.positions[0].alt,a=1;a<i.options.positions.length;a++)s<i.options.positions[a].alt&&(s=i.options.positions[a].alt);i.options.height=s}i.sdk.addIncetance(i.options.id,i),e.create(i)}return i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"AssembleObject"}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,0.5)"}});e._elms.color[i]=n}))}}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.previous=null,i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.height},set:function(t){var e,i=this;!t||isNaN(Number(t))?this.options.height=0:this.options.height=Number(Number(t).toFixed(2)),e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.height}))}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(this.options.line.color),this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.line.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,0,0,0.5)"}});e._elms.lineColor[i]=n})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){var e=this;this.options.line.width=t||0===t?t:3,this.entity.polyline.width=this.options.line.width,this._elms.lineColor&&this._elms.lineColor.forEach((function(t){t.value=e.options.line.width}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=ju(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=ju(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=ju(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=ju(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._error){t.next=2;break}return t.abrupt("return");case 2:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=61;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];for(var i=function(i){var o=document.createElement("div");o.className="tr",o.innerHTML='\n <div class="td">'.concat(i+1,'</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ');var s=o.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.positions[i].lng.toFixed(8),s.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.positions[i].lng.toFixed(8);var l=o.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.positions[i].lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.positions[i].lat.toFixed(8);var p=o.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),s.addEventListener("dblclick",(function(){s.innerHTML="",r.value=Number(n.options.positions[i].lng.toFixed(8)),s.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.positions[i].lng.toFixed(8)),s.innerHTML="",s.appendChild(a)})),r.addEventListener("input",(function(){n.options.positions[i].lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.positions[i].lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.positions[i].lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.positions[i].lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.positions[i].lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.positions[i].lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(o)},o=0;o<n.options.positions.length;o++)i(o)},t.next=9,new Ki(this.sdk,this.options,{title:"集结地属性",left:"180px",top:"100px",confirmCallBack:function(t){w.name=w.name.trim(),w.name||(w.name="未命名对象"),w.options.label.position={lng:w.label.position[0],lat:w.label.position[1],alt:w.label.position[2]},w.originalOptions=w.deepCopyObj(w.options),w._DialogObject.close(),w.Dialog.confirmCallBack&&w.Dialog.confirmCallBack(w.originalOptions),be(w.sdk,w.options.id),re(w.sdk,w.options.id)},resetCallBack:function(){w.reset(),w.Dialog.resetCallBack&&w.Dialog.resetCallBack()},removeCallBack:function(){w.Dialog.removeCallBack&&w.Dialog.removeCallBack()},closeCallBack:function(){w.reset(),w.positionEditing=!1,w.Dialog.closeCallBack&&w.Dialog.closeCallBack()},showCallBack:function(t){w.options.show=t,w.originalOptions.show=t,w.show=t,w.Dialog.showCallBack&&w.Dialog.showCallBack()},translationalCallBack:function(){w.positionEditing=!w.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(w,(function(){o()}))}});case 9:if(this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" assemble",(s=document.createElement("div")).innerHTML=Bu(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("assemble-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){w.color=t},clear:function(){w.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.lineColor=t},clear:function(){w.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelColor=t},clear:function(){w.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelLineColor=t},clear:function(){w.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorStart=t},clear:function(){w.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorEnd=t},clear:function(){w.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],m=this._DialogObject._element.content.getElementsByClassName("height-box")[0],f=m.getElementsByClassName("height")[0],v=this._DialogObject._element.content.getElementsByClassName("height-confirm")[0],f.value=10,2==this.heightMode?(m&&(m.className="input-number input-number-unit-1 height-box disabled"),v&&v.setAttribute("disabled","disabled")):(m&&(m.className="input-number input-number-unit-1 height-box"),v&&v.removeAttribute("disabled")),g=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],!(y=Y(this._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode"))){t.next=58;break}y.legp_search(g),b=this._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],C=0;case 42:if(!(C<g.length)){t.next=50;break}if(g[C].key!=this.heightMode){t.next=47;break}return b.value=g[C].value,y.legp_searchActive(g[C].value),t.abrupt("break",50);case 47:C++,t.next=42;break;case 50:b.addEventListener("input",(function(){for(var t=0;t<g.length;t++)if(g[t].value===b.value){w.heightMode=g[t].key;break}})),f.addEventListener("input",(function(){w.heightMode})),this._elms.height=f,this._elms.heightBox=m,this._elms.heightMode=b,this._elms.heightConfirm=v,this._elms.heightModeObject=y,v.addEventListener("click",(function(){w.operate.positionEditing?(w.positionEditing=!1,w.height=w.height+Number(f.value)):(e.closeNodeEdit(w),w.heightMode=w.heightMode,setTimeout((function(){w.height=w.height+Number(f.value)}),100))}));case 58:setTimeout((function(){w.attributeLink=w.options.attribute.link.content,w.attributeVr=w.options.attribute.vr.content,w.cameraSelect&&w.cameraSelect(),w.goodsSelect&&w.goodsSelect();var t=w.attributeSelect,e=w._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=w._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],s=0;s<t.length;s++)if(t[s].key===w.options.attributeType){n.value=t[s].value,i.legp_searchActive(t[s].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){w.attributeType=t[e].key;break}}))}o();var a=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],r=Y(w._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(r){r.legp_search(a);var l=w._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];l.value=w.options["area-unit"];for(var c=0;c<a.length;c++)if(a[c].value===l.value){r.legp_searchActive(a[c].value);break}l.addEventListener("input",(function(){for(var t=0;t<a.length;t++)if(a[t].value===l.value){w.areaUnit=a[t].value;break}}))}var u=Rn(),p=Y(w._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(p){p.legp_search(u);var h=w._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];h.value=u[w.labelFontFamily].value;for(var d=0;d<u.length;d++)if(u[d].value==h.value){p.legp_searchActive(u[d].value);break}h.addEventListener("input",(function(){for(var t=0;t<u.length;t++)if(u[t].value===h.value){w.labelFontFamily=u[t].key;break}})),w._elms.labelFontFamily=[h]}}),0),t.next=62;break;case 61:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 62:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:function(){if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lineColor=this.originalOptions.line.color,this.lineWidth=this.originalOptions.line.width,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeVr=this.options.attribute.vr.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect();for(var t=0;t<this.options.positions.length;t++)this._elms.lng&&this._elms.lng[t]&&(this._elms.lng[t].innerHTML=this.options.positions[t].lng.toFixed(8)),this._elms.lat&&this._elms.lat[t]&&(this._elms.lat[t].innerHTML=this.options.positions[t].lat.toFixed(8)),this._elms.alt&&this._elms.alt[t]&&(this._elms.alt[t].innerHTML=Number(this.options.height.toFixed(2)));this.heightMode=this.heightMode;for(var e=0;e<this.nodePoints.length;e++)this.sdk.viewer.entities.remove(this.nodePoints[e]);this.previous=null,this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy()}}},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sdk.viewer.entities.remove(this.entity),this.label&&this.label.remove(),this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0]&&this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=v.length>0&&void 0!==v[0]?v[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Au({},this.options.position):this.options.positions?l=Au({},this.options.positions[0]):this.options.center?l=Au({},this.options.center):this.options.start?l=Au({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=51;break;case 25:c=[],t.t0=this.heightMode,t.next=0===t.t0||"0"===t.t0?29:1===t.t0||"1"===t.t0?31:2===t.t0||"2"===t.t0?33:35;break;case 29:case 31:return u=!1,t.abrupt("break",35);case 33:return u=!0,t.abrupt("break",35);case 35:if(!u){t.next=48;break}p=0;case 37:if(!(p<this.options.positions.length)){t.next=46;break}return t.next=40,this.getClampToHeight(this.options.positions[p]);case 40:h=t.sent,d=Cesium.Cartesian3.fromDegrees(this.options.positions[p].lng,this.options.positions[p].lat,h),c.push(d.x,d.y,d.z);case 43:p++,t.next=37;break;case 46:t.next=49;break;case 48:if(this.positionsH)for(m=0;m<this.positionsH.length;m++)c.push(this.positionsH[m].x,this.positionsH[m].y,this.positionsH[m].z);case 49:f=Cesium.BoundingSphere.fromVertices(c),this.sdk.viewer.camera.flyToBoundingSphere(f,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=this;if(this.event&&this.event.destroy(),this.event=new X(this.sdk),this.operate.positionEditing=t,!0===t){var n;this.previous={positions:L()(this.positions)},this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1;for(var o=[],s=L()(this.positions),a=[],r=0;r<s.length;r++){var l=this.cartesian3Towgs84(s[r],this.sdk.viewer);o.push([l.lng,l.lat])}var c=this.cartesian3Towgs84(s[0],this.sdk.viewer);o.push([c.lng,c.lat]);for(var u=turf.polygon([o]),p=turf.centroid(u),h=(n=Cesium.Cartesian3).fromDegrees.apply(n,L()(p.geometry.coordinates)),d=0;d<s.length;d++)h.x,s[d].x,a.push({x:h.x-s[d].x,y:h.y-s[d].y,z:h.z-s[d].z});var m=[];this.event.mouse_move((function(t,i){e.cartesian3Towgs84(i,e.sdk.viewer);m=[];for(var n=0;n<a.length;n++)m.push({x:i.x-a[n].x,y:i.y-a[n].y,z:i.z-a[n].z});e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),m=[];for(var n=0;n<a.length;n++){var o={x:i.x-a[n].x,y:i.y-a[n].y,z:i.z-a[n].z};m.push(o),e.options.positions[n]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[n]&&(e._elms.lng[n].innerHTML=e.options.positions[n].lng.toFixed(8)),e._elms.lat&&e._elms.lat[n]&&(e._elms.lat[n].innerHTML=e.options.positions[n].lat.toFixed(8))}e.positions=m,e.previous=null,e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),m=[];for(var t=0;t<a.length;t++){var o={x:i.x-a[t].x,y:i.y-a[t].y,z:i.z-a[t].z};m.push(o),e.options.positions[t]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[t]&&(e._elms.lng[t].innerHTML=e.options.positions[t].lng.toFixed(8)),e._elms.lat&&e._elms.lat[t]&&(e._elms.lat[t].innerHTML=e.options.positions[t].lat.toFixed(8))}e.positions=m,e.previous={positions:L()(e.positions)},e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){var t=[];if(m.length>0)for(var e=0;e<m.length;e++)t.push(i.cartesian3Towgs84(m[e],i.sdk.viewer));else for(var n=0;n<s.length;n++)t.push(i.cartesian3Towgs84(s[n],i.sdk.viewer));return i.renewPositions(t),new Cesium.PolygonHierarchy(i.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!1)}else{this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.destroy()),this.tip&&this.tip.destroy(),this.previous?this.positions=L()(this.previous.positions):this.previous={positions:L()(this.positions)};for(var f=[],v=0;v<this.positions.length;v++)f.push(i.cartesian3Towgs84(this.positions[v],i.sdk.viewer));this.renewPositions(f),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positionsH)}),!0),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!0)}}}},{key:"setPosition",value:function(t){for(var e,i=Cesium.Cartesian3.fromDegrees(t.position.lng,t.position.lat,t.position.alt),n=L()(this.positions),o=[],s=[],a=0;a<n.length;a++){var r=this.cartesian3Towgs84(n[a],this.sdk.viewer);o.push([r.lng,r.lat])}var l=this.cartesian3Towgs84(n[0],this.sdk.viewer);o.push([l.lng,l.lat]);for(var c=turf.polygon([o]),u=turf.centroid(c),p=(e=Cesium.Cartesian3).fromDegrees.apply(e,L()(u.geometry.coordinates)),h=0;h<n.length;h++)s.push({x:p.x-n[h].x,y:p.y-n[h].y,z:p.z-n[h].z});for(var d=[],m=0;m<s.length;m++)d.push({x:i.x-s[m].x,y:i.y-s[m].y,z:i.z-s[m].z});this.label.position=[t.position.lng,t.position.lat,t.position.alt];var f=[];if(d.length>0)for(var v=0;v<d.length;v++)f.push(this.cartesian3Towgs84(d[v],this.sdk.viewer));var g=this.computeAssemble(f);0!=g.length&&(this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(g)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return g.length>=3?[].concat(L()(g),[g[0],g[1]]):L()(g)}),!1))}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=this.computeAssemble(this.options.positions);if(0!=i.length){for(var n=[[]],o=0;o<i.length;o++){var s=this.cartesian3Towgs84(i[o],this.sdk.viewer);n[0].push([s.lng,s.lat])}var a=this.cartesian3Towgs84(i[0],this.sdk.viewer);n[0].push([a.lng,a.lat]);var r=turf.polygon(n),l=turf.pointOnFeature(r),c=document.getElementById(e.domid),u=Cesium.Cartesian3.fromDegrees(l.geometry.coordinates[0],l.geometry.coordinates[1]);this.sdk.viewer.scene.postRender.addEventListener((function(i){if("block"===c.style.display||""===c.style.display){var n=t.sdk.viewer.scene.cartesianToCanvasCoordinates(u);n&&(c.style.left=(n.x+e.x).toFixed(0)+"px",c.style.top=(n.y+e.y).toFixed(0)+"px")}}))}}},{key:"renewPositions",value:function(t){var e=this;if(!this._error&&this.sdk.viewer){var i=!1,n=this.options.positions;t&&(n=t);for(var o=[],s=0;s<n.length;s++)o.push(n[s].lng,n[s].lat);this.positions=Cesium.Cartesian3.fromDegreesArray(o);var a=this.computeAssemble(n);if(0!=a.length){for(var r=[[]],l=[],c=0;c<a.length;c++){var u=this.cartesian3Towgs84(a[c],this.sdk.viewer);l.push(u),r[0].push([u.lng,u.lat])}var p=this.cartesian3Towgs84(a[0],this.sdk.viewer);r[0].push([p.lng,p.lat]);var h=0,d=turf.polygon(r),m=turf.pointOnFeature(d);switch(this.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:h=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(m.geometry.coordinates[0],m.geometry.coordinates[1]))||0,i=!1;break;case"2":case 2:i=!0}var f=[];if(i||0!=this.nodePoints.length)this.positionsH=a,setTimeout((function(){if(e.sdk.viewer){var t=L()(e.sdk.viewer.entities.values);e.getClampToHeight({lng:m.geometry.coordinates[0],lat:m.geometry.coordinates[1]},t).then((function(t){e.label&&(e.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],t])}))}}),100);else{for(var v=0;v<r[0].length;v++)f.push(r[0][v][0],r[0][v][1],this.height+h);this.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(f),this.label&&(this.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],this.height+h])}return this.options.areaByMeter=this.computeArea(l),this.areaUnit=this.areaUnit,o}}}}],[{key:"create",value:function(t){for(var i=t.options.positions,n=[],o=0;o<i.length;o++)n.push(i[o].lng,i[o].lat);t.positions=Cesium.Cartesian3.fromDegreesArray(n);var s=t.computeAssemble(t.options.positions);if(0!=s.length){for(var a=[[]],r=0;r<s.length;r++){var l=t.cartesian3Towgs84(s[r],t.sdk.viewer);a[0].push([l.lng,l.lat])}var c=t.cartesian3Towgs84(s[0],t.sdk.viewer);a[0].push([c.lng,c.lat]);var u,p=turf.polygon(a),h=turf.pointOnFeature(p),d=0;switch(t.options.heightMode){case"0":case 0:u=!1;break;case"1":case 1:d=t.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(h.geometry.coordinates[0],h.geometry.coordinates[1]))||0,u=!1;break;case"2":case 2:u=!0}t.options.label.position||(t.options.label.position={lng:h.geometry.coordinates[0],lat:h.geometry.coordinates[1],alt:t.height+d});for(var m=[],f=0;f<a[0].length;f++)m.push(a[0][f][0],a[0][f][1],t.height+d);var v=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(u=!1,v=new Cesium.CustomColorMaterialSource({color:t.options.color})),t.options.label.ground=u,t.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(m),t.entity=t.sdk.viewer.entities.add({show:t.options.show,id:t.options.id,polygon:{hierarchy:u?new Cesium.PolygonHierarchy(s):new Cesium.PolygonHierarchy(t.positionsH),perPositionHeight:!u,material:v,zIndex:t.sdk._entityZIndex},polyline:{positions:[].concat(L()(t.positionsH),[t.positionsH[0],t.positionsH[1]]),width:t.options.line.width,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!u,arcType:u?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t);for(var g=[],y=0;y<s.length;y++)g.push(t.cartesian3Towgs84(s[y],t.sdk.viewer));switch(t.options.areaByMeter=t.computeArea(g),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineWidth:e.options.label.lineWidth,lineColor:e.options.label.lineColor,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:e.options.label.ground});case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=ju(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n,s=function(){var e=o()(a.a.mark((function e(){var i,n,o,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=L()(t.sdk.viewer.entities.values),n=0;case 2:if(!(n<t.options.positions.length)){e.next=11;break}return e.next=5,t.getClampToHeight(t.options.positions[n],i);case 5:o=e.sent,s=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:n,position:Cesium.Cartesian3.fromDegrees(t.options.positions[n].lng,t.options.positions[n].lat,o),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.push(s);case 8:n++,e.next=2;break;case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];for(var r=[],l=0;l<t.options.positions.length;l++)r.push(t.options.positions[l].lng,t.options.positions[l].lat);var c=function(e,n){i&&(t.options.positions[i.index]=t.cartesian3Towgs84(n,t.sdk.viewer),t._elms.lng&&t._elms.lng[i.index]&&(t._elms.lng[i.index].innerHTML=t.options.positions[i.index].lng.toFixed(8)),t._elms.lat&&t._elms.lat[i.index]&&(t._elms.lat[i.index].innerHTML=t.options.positions[i.index].lat.toFixed(8)),t.renewPositions()),t.tip.setPosition(n,e.position?e.position.x:e.endPosition.x,e.position?e.position.y:e.endPosition.y)},u=function(e,o){c(e,o);var s=t.cartesian3Towgs84(o,t.sdk.viewer);if(i){var a=i.index,r=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:a,position:Cesium.Cartesian3.fromDegrees(t.options.positions[i.index].lng,t.options.positions[i.index].lat,s.alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.splice(i.index,0,r),i=null,t.tip.set_text("请选择一个顶点,右键取消")}else{var l=e.position;l||(l={x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2});var u=t.sdk.viewer.scene.pick(l);u&&u.id&&u.id.name&&"node-secondary-edit-point"===u.id.name&&(i=u.id,n=t.cartesian3Towgs84(u.id.position.getValue(),t.sdk.viewer),t.nodePoints.splice(u.id.index,1),t.sdk.viewer.entities.remove(u.id),t.tip.set_text("左键确认,右键取消"))}t.renewPositions()},p=function(){t.event.mouse_move((function(){})),t.event.mouse_left((function(){})),t.event.mouse_right((function(){})),t.event.gesture_pinck_start((function(){})),i&&(n?t.options.positions[i.index]=n:t.options.positions.pop(),t._elms.lng&&t._elms.lng[i.index]&&(t._elms.lng[i.index].innerHTML=t.options.positions[i.index].lng.toFixed(8)),t._elms.lat&&t._elms.lat[i.index]&&(t._elms.lat[i.index].innerHTML=t.options.positions[i.index].lat.toFixed(8))),t.heightMode=t.heightMode,t.previous=null};t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){var e=t.computeAssemble(t.options.positions);return new Cesium.PolygonHierarchy(e)}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){var e=t.computeAssemble(t.options.positions);return e.length>=3?[].concat(L()(e),[e[0],e[1]]):L()(e)}),!1);for(var h=[[]],d=[],m=0;m<t.positionsH.length;m++){var f=t.cartesian3Towgs84(t.positionsH[m],t.sdk.viewer);d.push(f),h[0].push([f.lng,f.lat])}var v=t.cartesian3Towgs84(t.positionsH[0],t.sdk.viewer);h[0].push([v.lng,v.lat]);var g=turf.polygon(h),y=turf.pointOnFeature(g),b=L()(t.sdk.viewer.entities.values);t.getClampToHeight({lng:y.geometry.coordinates[0],lat:y.geometry.coordinates[1]},b).then((function(e){t.label.position=[y.geometry.coordinates[0],y.geometry.coordinates[1],e]})),setTimeout((function(){t.event.mouse_left(u),t.event.mouse_right(p),t.event.mouse_move(c),t.event.gesture_pinck_start((function(e,i){var n=new Date;t.event.gesture_pinck_end((function(){var t=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t-n>=500?p():u(o,i)}))})),s()}),200)}}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}}]);var i,n,s,r}(jn);function zu(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label" style="flex: 0 0 56px;">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">动画时长</span>\n <div class="input-number input-number-unit-3">\n <input class="input blur" type="number" title="" min="500" max="9999999" @model="spreadTime">\n <span class="unit">ms</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col">\n <span class="label">动画</span>\n <input class="btn-switch" type="checkbox" @model="spreadState">\n </div>\n <div class="col">\n <span class="label">动画重复</span>\n <input class="btn-switch" type="checkbox" @model="loop">\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="attack-arrow-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">边线颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">边线宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function Hu(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Vu(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Hu(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Hu(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Gu(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Uu(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Uu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Uu(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Wu(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Yu=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),(i=Wu(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"#ff000080",i.options.show=!n.show&&!1!==n.show||n.show,i.options.positions=n.positions||[],i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",i.entity,i.event=new X(i.sdk),i.operate={},i._elms={},i.nodePoints=[],i.Dialog=o,i.options.loop=n.loop||!1,i.options.spreadState=n.spreadState||!1,i.spreadTime=n.spreadTime,n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontFamily:n.label.fontFamily?n.label.fontFamily:0,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",!i.options.positions||i.options.positions.length<3)i._error="箭头面最少需要三个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500});else{if(!i.options.height&&0!==i.options.height){for(var s=i.options.positions[0].alt,a=1;a<i.options.positions.length;a++)s<i.options.positions[a].alt&&(s=i.options.positions[a].alt);i.options.height=s}i.sdk.addIncetance(i.options.id,i),e.create(i)}return i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"AttackArrowObject"}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,0.5)"}});e._elms.color[i]=n}))}}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.previous=null,i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.height},set:function(t){var e,i=this;!t||isNaN(Number(t))?this.options.height=0:this.options.height=Number(Number(t).toFixed(2)),e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.height}))}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(this.options.line.color),this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.line.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,0,0,0.5)"}});e._elms.lineColor[i]=n})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){this.options.line.width=t||0===t?t:3,this.entity.polyline.width=this.options.line.width,this._elms.lineColor&&this._elms.lineColor.forEach((function(e){e.value=t}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Gu(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Gu(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Gu(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Gu(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._error){t.next=2;break}return t.abrupt("return");case 2:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&this._DialogObject.close(),!i){t.next=61;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];for(var i=function(i){var o=document.createElement("div");o.className="tr",o.innerHTML='\n <div class="td">'.concat(i+1,'</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ');var s=o.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.positions[i].lng.toFixed(8),s.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.positions[i].lng.toFixed(8);var l=o.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.positions[i].lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.positions[i].lat.toFixed(8);var p=o.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),s.addEventListener("dblclick",(function(){s.innerHTML="",r.value=Number(n.options.positions[i].lng.toFixed(8)),s.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.positions[i].lng.toFixed(8)),s.innerHTML="",s.appendChild(a)})),r.addEventListener("input",(function(){n.options.positions[i].lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.positions[i].lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.positions[i].lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.positions[i].lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.positions[i].lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.positions[i].lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(o)},o=0;o<n.options.positions.length;o++)i(o)},t.next=9,new Ki(this.sdk,this.options,{title:"箭头属性",left:"180px",top:"100px",confirmCallBack:function(t){w.name=w.name.trim(),w.name||(w.name="未命名对象"),w.options.label.position={lng:w.label.position[0],lat:w.label.position[1],alt:w.label.position[2]},w.originalOptions=w.deepCopyObj(w.options),w._DialogObject.close(),w.Dialog.confirmCallBack&&w.Dialog.confirmCallBack(w.originalOptions)},resetCallBack:function(){w.reset(),w.Dialog.resetCallBack&&w.Dialog.resetCallBack()},removeCallBack:function(){w.Dialog.removeCallBack&&w.Dialog.removeCallBack()},closeCallBack:function(){var t=w.options.spreadState;w.positionEditing=!1,setTimeout((function(){w.options.spreadState=t,w.reset()}),10),w.Dialog.closeCallBack&&w.Dialog.closeCallBack()},showCallBack:function(t){w.options.show=t,w.originalOptions.show=t,w.show=t,w.Dialog.showCallBack&&w.Dialog.showCallBack()},translationalCallBack:function(){w.positionEditing=!w.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(w,(function(){o()}))}});case 9:if(this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" attackArrow",(s=document.createElement("div")).innerHTML=zu(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("attack-arrow-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){w.color=t},clear:function(){w.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.lineColor=t},clear:function(){w.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelColor=t},clear:function(){w.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelLineColor=t},clear:function(){w.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorStart=t},clear:function(){w.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorEnd=t},clear:function(){w.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],m=this._DialogObject._element.content.getElementsByClassName("height-box")[0],f=m.getElementsByClassName("height")[0],v=this._DialogObject._element.content.getElementsByClassName("height-confirm")[0],f.value=10,2==this.heightMode?(m&&(m.className="input-number input-number-unit-1 height-box disabled"),v&&v.setAttribute("disabled","disabled")):(m&&(m.className="input-number input-number-unit-1 height-box"),v&&v.removeAttribute("disabled")),g=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],!(y=Y(this._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode"))){t.next=58;break}y.legp_search(g),b=this._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],C=0;case 42:if(!(C<g.length)){t.next=50;break}if(g[C].key!=this.heightMode){t.next=47;break}return b.value=g[C].value,y.legp_searchActive(g[C].value),t.abrupt("break",50);case 47:C++,t.next=42;break;case 50:b.addEventListener("input",(function(){for(var t=0;t<g.length;t++)if(g[t].value===b.value){w.heightMode=g[t].key;break}})),f.addEventListener("input",(function(){w.heightMode})),this._elms.height=f,this._elms.heightBox=m,this._elms.heightMode=b,this._elms.heightConfirm=v,this._elms.heightModeObject=y,v.addEventListener("click",(function(){w.operate.positionEditing?(w.positionEditing=!1,w.height=w.height+Number(f.value)):(e.closeNodeEdit(w),w.heightMode=w.heightMode,setTimeout((function(){w.height=w.height+Number(f.value)}),100))}));case 58:setTimeout((function(){w.attributeLink=w.options.attribute.link.content,w.attributeVr=w.options.attribute.vr.content,w.cameraSelect&&w.cameraSelect(),w.goodsSelect&&w.goodsSelect();var t=w.attributeSelect,e=w._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=w._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],s=0;s<t.length;s++)if(t[s].key===w.options.attributeType){n.value=t[s].value,i.legp_searchActive(t[s].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){w.attributeType=t[e].key;break}}))}var a=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],r=Y(w._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(r){r.legp_search(a);var l=w._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];l.value=w.options["area-unit"];for(var c=0;c<a.length;c++)if(a[c].value===l.value){r.legp_searchActive(a[c].value);break}l.addEventListener("input",(function(){for(var t=0;t<a.length;t++)if(a[t].value===l.value){w.areaUnit=a[t].value;break}}))}var u=Rn(),p=Y(w._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(p){p.legp_search(u);var h=w._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];h.value=u[w.labelFontFamily].value;for(var d=0;d<u.length;d++)if(u[d].value==h.value){p.legp_searchActive(u[d].value);break}h.addEventListener("input",(function(){for(var t=0;t<u.length;t++)if(u[t].value===h.value){w.labelFontFamily=u[t].key;break}})),w._elms.labelFontFamily=[h]}o()}),0),t.next=62;break;case 61:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 62:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:function(){var t=this;if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lineColor=this.originalOptions.line.color,this.lineWidth=this.originalOptions.line.width,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect();for(var e=0;e<this.options.positions.length;e++)this._elms.lng&&this._elms.lng[e]&&(this._elms.lng[e].innerHTML=this.options.positions[e].lng.toFixed(8)),this._elms.lat&&this._elms.lat[e]&&(this._elms.lat[e].innerHTML=this.options.positions[e].lat.toFixed(8)),this._elms.alt&&this._elms.alt[e]&&(this._elms.alt[e].innerHTML=Number(this.options.height.toFixed(2)));this.heightMode=this.heightMode;for(var i=0;i<this.nodePoints.length;i++)this.sdk.viewer.entities.remove(this.nodePoints[i]);this.previous=null,this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy();var n=this.options.spreadState;this.removeAnimate(),setTimeout((function(){t.loop=t.options.loop,t.spreadState=n,be(t.sdk,t.options.id),re(t.sdk,t.options.id)}),200)}}},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.removeAnimate(),this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.entity&&this.sdk.viewer.entities.remove(this.entity),this.label&&this.label.remove(),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=9,this.sdk.removeIncetance(this.options.id);case 9:return t.next=11,be(this.sdk,this.options.id);case 11:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0]&&this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=v.length>0&&void 0!==v[0]?v[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Vu({},this.options.position):this.options.positions?l=Vu({},this.options.positions[0]):this.options.center?l=Vu({},this.options.center):this.options.start?l=Vu({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=51;break;case 25:c=[],t.t0=this.heightMode,t.next=0===t.t0||"0"===t.t0?29:1===t.t0||"1"===t.t0?31:2===t.t0||"2"===t.t0?33:35;break;case 29:case 31:return u=!1,t.abrupt("break",35);case 33:return u=!0,t.abrupt("break",35);case 35:if(!u){t.next=48;break}p=0;case 37:if(!(p<this.options.positions.length)){t.next=46;break}return t.next=40,this.getClampToHeight(this.options.positions[p]);case 40:h=t.sent,d=Cesium.Cartesian3.fromDegrees(this.options.positions[p].lng,this.options.positions[p].lat,h),c.push(d.x,d.y,d.z);case 43:p++,t.next=37;break;case 46:t.next=49;break;case 48:if(this.positionsH)for(m=0;m<this.positionsH.length;m++)c.push(this.positionsH[m].x,this.positionsH[m].y,this.positionsH[m].z);case 49:f=Cesium.BoundingSphere.fromVertices(c),this.sdk.viewer.camera.flyToBoundingSphere(f,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity){this.removeAnimate();var i=this;if(this.event&&this.event.destroy(),this.event=new X(this.sdk),this.operate.positionEditing=t,!0===t){var n;this.previous={positions:L()(this.positions)},this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1;for(var o=[],s=L()(this.positions),a=[],r=0;r<s.length;r++){var l=this.cartesian3Towgs84(s[r],this.sdk.viewer);o.push([l.lng,l.lat])}var c=this.cartesian3Towgs84(s[0],this.sdk.viewer);o.push([c.lng,c.lat]);for(var u=turf.polygon([o]),p=turf.centroid(u),h=(n=Cesium.Cartesian3).fromDegrees.apply(n,L()(p.geometry.coordinates)),d=0;d<s.length;d++)h.x,s[d].x,a.push({x:h.x-s[d].x,y:h.y-s[d].y,z:h.z-s[d].z});var m=[];this.event.mouse_move((function(t,i){m=[];for(var n=0;n<a.length;n++)m.push({x:i.x-a[n].x,y:i.y-a[n].y,z:i.z-a[n].z});e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),m=[];for(var n=0;n<a.length;n++){var o={x:i.x-a[n].x,y:i.y-a[n].y,z:i.z-a[n].z};m.push(o),e.options.positions[n]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[n]&&(e._elms.lng[n].innerHTML=e.options.positions[n].lng.toFixed(8)),e._elms.lat&&e._elms.lat[n]&&(e._elms.lat[n].innerHTML=e.options.positions[n].lat.toFixed(8))}e.positions=m,e.previous={positions:L()(e.positions)},e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),m=[];for(var t=0;t<a.length;t++){var o={x:i.x-a[t].x,y:i.y-a[t].y,z:i.z-a[t].z};m.push(o),e.options.positions[t]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[t]&&(e._elms.lng[t].innerHTML=e.options.positions[t].lng.toFixed(8)),e._elms.lat&&e._elms.lat[t]&&(e._elms.lat[t].innerHTML=e.options.positions[t].lat.toFixed(8))}e.positions=m,e.previous={positions:L()(e.positions)},e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){var t=[];if(m.length>0)for(var e=0;e<m.length;e++)t.push(i.cartesian3Towgs84(m[e],i.sdk.viewer));else for(var n=0;n<s.length;n++)t.push(i.cartesian3Towgs84(s[n],i.sdk.viewer));return i.renewPositions(t),new Cesium.PolygonHierarchy(i.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!1)}else{this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.destroy()),this.tip&&this.tip.destroy(),this.previous?this.positions=L()(this.previous.positions):this.previous={positions:L()(this.positions)};for(var f=[],v=0;v<this.positions.length;v++)f.push(i.cartesian3Towgs84(this.positions[v],i.sdk.viewer));i.renewPositions(f),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positionsH)}),!0),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!0)}}}},{key:"setPosition",value:function(t){for(var e,i=Cesium.Cartesian3.fromDegrees(t.position.lng,t.position.lat,t.position.alt),n=L()(this.positions),o=[],s=[],a=0;a<n.length;a++){var r=this.cartesian3Towgs84(n[a],this.sdk.viewer);o.push([r.lng,r.lat])}var l=this.cartesian3Towgs84(n[0],this.sdk.viewer);o.push([l.lng,l.lat]);for(var c=turf.polygon([o]),u=turf.centroid(c),p=(e=Cesium.Cartesian3).fromDegrees.apply(e,L()(u.geometry.coordinates)),h=0;h<n.length;h++)s.push({x:p.x-n[h].x,y:p.y-n[h].y,z:p.z-n[h].z});for(var d=[],m=0;m<s.length;m++)d.push({x:i.x-s[m].x,y:i.y-s[m].y,z:i.z-s[m].z});this.label.position=[t.position.lng,t.position.lat,t.position.alt];var f=[];if(d.length>0)for(var v=0;v<d.length;v++)f.push(this.cartesian3Towgs84(d[v],this.sdk.viewer));var g=this.computeAttackArrow(f);0!=g.length&&(this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(g)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return g.length>=3?[].concat(L()(g),[g[0],g[1]]):L()(g)}),!1))}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=this.computeAttackArrow(this.options.positions);if(0!=i.length){for(var n=[[]],o=0;o<i.length;o++){var s=this.cartesian3Towgs84(i[o],this.sdk.viewer);n[0].push([s.lng,s.lat])}var a=this.cartesian3Towgs84(i[0],this.sdk.viewer);n[0].push([a.lng,a.lat]);var r=turf.polygon(n),l=turf.pointOnFeature(r),c=document.getElementById(e.domid),u=Cesium.Cartesian3.fromDegrees(l.geometry.coordinates[0],l.geometry.coordinates[1]);this.sdk.viewer.scene.postRender.addEventListener((function(i){if("block"===c.style.display||""===c.style.display){var n=t.sdk.viewer.scene.cartesianToCanvasCoordinates(u);n&&(c.style.left=(n.x+e.x).toFixed(0)+"px",c.style.top=(n.y+e.y).toFixed(0)+"px")}}))}}},{key:"spreadTime",get:function(){return this.options.spreadTime},set:function(t){var e=Number(t);isNaN(e)?e=3e3:e<500?e=500:e>9999999&&(e=9999999),this.options.spreadTime=e,this.spreadState&&this.setSpreadProgressByTime(),this._elms.spreadTime&&this._elms.spreadTime.forEach((function(t){t.value=e}))}},{key:"loop",get:function(){return this.options.loop},set:function(t){this.options.loop=t,this.TweenAnimate&&(t?this.TweenAnimate.repeat(1/0):this.TweenAnimate.repeat()),this._elms.loop&&this._elms.loop.forEach((function(e){e.checked=t}))}},{key:"spreadState",get:function(){return this.options.spreadState},set:function(t){this.options.spreadState=t,this.TweenAnimate?t?(this.lineEdit=!1,this.setSpreadProgressByTime(this.TweenAnimate._object.distance/this.TweenAnimate._valuesEnd.distance*this.spreadTime)):this.TweenAnimate.pause():t&&this.setSpreadProgressByTime(),this._elms.spreadState&&this._elms.spreadState.forEach((function(e){e.checked=t}))}},{key:"setSpreadProgressByTime",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.entity){for(var i=this,n=0;n<this.nodePoints.length;n++)this.sdk.viewer.entities.remove(this.nodePoints[n]);this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy();i.computeAttackArrow(i.options.positions);this.TweenAnimate&&(TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null);var s,r=le(),l=r.sdkP,c=r.sdkD;if(c&&l&&this.sdk===c)(s=l.entityMap.get(this.options.id))&&s.entity&&s.entity.polygon&&s.positionsH&&(this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(s.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(s.positionsH),[s.positionsH[0],s.positionsH[1]])}),!1));else{for(var u=[[(i.options.positions[0].lng+i.options.positions[1].lng)/2,(i.options.positions[0].lat+i.options.positions[1].lat)/2]],p=2;p<i.options.positions.length;p++)u.push([i.options.positions[p].lng,i.options.positions[p].lat]);for(var h=turf.lineString(u),d=[],m=1;m<u.length;m++){var f=turf.point(u[m]),v=turf.point(u[m-1]),g=turf.distance(f,v,{units:"kilometers"}),y=d[d.length-1]||0;d.push(y+g)}var b=turf.length(h,{units:"kilometers"}),C=e/this.spreadTime;this.TweenAnimate=new TWEEN.Tween({distance:b*C}).to({distance:b},this.spreadTime-e).easing(TWEEN.Easing.Linear.None).repeat(this.options.loop?1/0:0).onRepeat((function(){e&&t.setSpreadProgressByTime()})).onUpdate(function(){var e=o()(a.a.mark((function e(i,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.TweenAnimate._duration!=1/0){e.next=2;break}return e.abrupt("return");case 2:if(t.sdk.viewer){e.next=6;break}return t.removeAnimate(),e.abrupt("return");case 6:w(i);case 7:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()).onStart((function(){t.options.spreadState=!0,t._elms.spreadState&&t._elms.spreadState.forEach((function(t){t.checked=!0}))})).onComplete((function(e){t.removeAnimate()})),this.spreadState?this.TweenAnimate.start():w({distance:b*C}),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!1)}}function w(t){return k.apply(this,arguments)}function k(){return(k=o()(a.a.mark((function t(e){var n,o,s,r,l,c;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.show){t.next=2;break}return t.abrupt("return");case 2:n=2,o=d.length-2;case 4:if(!(o>=0)){t.next=12;break}if(!(e.distance>=d[o])){t.next=9;break}return(n=n+o+1)>i.options.positions.length-1&&(n=i.options.positions.length-1),t.abrupt("break",12);case 9:o--,t.next=4;break;case 12:for(s=[],r=0;r<n;r++)s[r]=Vu({},i.options.positions[r]);if(e.distance){t.next=18;break}s[n]={lng:s[1].lng,lat:s[1].lat},t.next=25;break;case 18:return t.next=20,turf.lineSliceAlong(h,0,e.distance,{units:"kilometers"});case 20:l=t.sent,c=L()(l.geometry.coordinates[l.geometry.coordinates.length-1]),s[n]||(s[n]={}),s[n].lng=c[0],s[n].lat=c[1];case 25:i.renewPositions(s);case 26:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}},{key:"removeAnimate",value:function(){this.spreadState=!1,this.TweenAnimate&&(TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null,this.renewPositions(),this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(this.positionsH),this.entity.polyline.positions=[].concat(L()(this.positionsH),[this.positionsH[0],this.positionsH[1]]))}},{key:"renewPositions",value:function(t){var e=this;if(!this._error&&this.sdk.viewer){var i=!1,n=this.options.positions;t&&(n=t);for(var o=[],s=0;s<n.length;s++)o.push(n[s].lng,n[s].lat);this.positions=Cesium.Cartesian3.fromDegreesArray(o);var a=this.computeAttackArrow(n);if(0!=a.length){for(var r=[[]],l=[],c=0;c<a.length;c++){var u=this.cartesian3Towgs84(a[c],this.sdk.viewer);l.push(u),r[0].push([u.lng,u.lat])}var p=this.cartesian3Towgs84(a[0],this.sdk.viewer);r[0].push([p.lng,p.lat]);var h=0,d=turf.polygon(r),m=turf.pointOnFeature(d);switch(this.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:h=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(m.geometry.coordinates[0],m.geometry.coordinates[1]))||0,i=!1;break;case"2":case 2:i=!0}var f=[];if(i||0!=this.nodePoints.length)this.positionsH=a,setTimeout((function(){if(e.sdk.viewer){var t=L()(e.sdk.viewer.entities.values);e.getClampToHeight({lng:m.geometry.coordinates[0],lat:m.geometry.coordinates[1]},t).then((function(t){e.label&&(e.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],t])}))}}),100);else{for(var v=0;v<r[0].length;v++)f.push(r[0][v][0],r[0][v][1],this.height+h);this.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(f),this.label&&(this.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],this.height+h])}return this.spreadState||(this.options.areaByMeter=this.computeArea(l),this.areaUnit=this.areaUnit),o}}}}],[{key:"create",value:function(t){for(var i=t.options.positions,n=[],o=0;o<i.length;o++)n.push(i[o].lng,i[o].lat);t.positions=Cesium.Cartesian3.fromDegreesArray(n);var s=t.computeAttackArrow(t.options.positions);if(0!=s.length){for(var a=[[]],r=0;r<s.length;r++){var l=t.cartesian3Towgs84(s[r],t.sdk.viewer);a[0].push([l.lng,l.lat])}var c=t.cartesian3Towgs84(s[0],t.sdk.viewer);a[0].push([c.lng,c.lat]);var u,p=turf.polygon(a),h=turf.pointOnFeature(p),d=0;switch(t.options.heightMode){case"0":case 0:u=!1;break;case"1":case 1:d=t.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(h.geometry.coordinates[0],h.geometry.coordinates[1]))||0,u=!1;break;case"2":case 2:u=!0}t.options.label.position||(t.options.label.position={lng:h.geometry.coordinates[0],lat:h.geometry.coordinates[1],alt:t.height+d}),t.options.label.ground=u;for(var m=[],f=0;f<a[0].length;f++)m.push(a[0][f][0],a[0][f][1],t.height+d);var v=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(u=!1,v=new Cesium.CustomColorMaterialSource({color:t.options.color})),t.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(m),t.entity=t.sdk.viewer.entities.add({show:t.options.show,id:t.options.id,polygon:{hierarchy:u?new Cesium.PolygonHierarchy(s):new Cesium.PolygonHierarchy(t.positionsH),perPositionHeight:!u,material:v,zIndex:t.sdk._entityZIndex},polyline:{positions:[].concat(L()(t.positionsH),[t.positionsH[0],t.positionsH[1]]),width:t.options.line.width,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!u,arcType:u?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t);for(var g=[],y=0;y<s.length;y++)g.push(t.cartesian3Towgs84(s[y],t.sdk.viewer));switch(t.options.areaByMeter=t.computeArea(g),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id),t.spreadState=t.options.spreadState}}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:e.options.label.ground});case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=Gu(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),-1!==e[n].className.indexOf("blur")&&(u="blur"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.positionEditing=!1,setTimeout((function(){if(YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n,s=function(){var e=o()(a.a.mark((function e(){var i,n,o,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=L()(t.sdk.viewer.entities.values),n=0;case 2:if(!(n<t.options.positions.length)){e.next=11;break}return e.next=5,t.getClampToHeight(t.options.positions[n],i);case 5:o=e.sent,s=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:n,position:Cesium.Cartesian3.fromDegrees(t.options.positions[n].lng,t.options.positions[n].lat,o),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.push(s);case 8:n++,e.next=2;break;case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t.removeAnimate(),YJ.Measure.SetMeasureStatus(!0),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];var r=function(e,n){i&&(t.options.positions[i.index]=t.cartesian3Towgs84(n,t.sdk.viewer),t.renewPositions()),t.tip.setPosition(n,e.position?e.position.x:e.endPosition.x,e.position?e.position.y:e.endPosition.y)},l=function(e,o){if(r(e,o),i){t.options.positions[i.index]=t.cartesian3Towgs84(o,t.sdk.viewer);var s=i.index;i.index===t.options.positions.length-1&&(s+=1);var a=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:s,position:Cesium.Cartesian3.fromDegrees(t.options.positions[i.index].lng,t.options.positions[i.index].lat,t.options.positions[i.index].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});i=a,n=t.options.positions[i.index],t.nodePoints.splice(i.index,0,a),s<t.options.positions.length?(i=null,t.tip.set_text("请选择一个顶点,右键取消")):(t.options.positions.splice(i.index,0,t.options.positions[i.index]),t.options.positions[i.index]=t.cartesian3Towgs84(o,t.sdk.viewer)),t.renewPositions()}else{var l=t.sdk.viewer.scene.pick(e.position||e.endPosition);l&&l.id&&l.id.name&&"node-secondary-edit-point"===l.id.name&&(i=l.id,n=t.cartesian3Towgs84(l.id.position.getValue(),t.sdk.viewer),t.nodePoints.splice(l.id.index,1),t.sdk.viewer.entities.remove(l.id),t.tip.set_text("左键确认,右键结束,CTRL+右键撤销"))}},c=function(e,o){t.event.mouse_move((function(){})),t.event.mouse_left((function(){})),t.event.mouse_right((function(){})),t.event.gesture_pinck_start((function(){})),i&&(n?(t.options.positions[i.index]=n,t.options.positions.length>3&&i.index===t.options.positions.length-1&&t.options.positions.splice(i.index+1,1)):t.options.positions.pop(),t._elms.lng&&t._elms.lng[i.index]&&(t._elms.lng[i.index].innerHTML=t.options.positions[i.index].lng.toFixed(8)),t._elms.lat&&t._elms.lat[i.index]&&(t._elms.lat[i.index].innerHTML=t.options.positions[i.index].lat.toFixed(8))),t.heightMode=t.heightMode,t.previous=null};t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(t.positionsH)}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(t.positionsH),[t.positionsH[0],t.positionsH[1]])}),!1);for(var u=[[]],p=[],h=0;h<t.positionsH.length;h++){var d=t.cartesian3Towgs84(t.positionsH[h],t.sdk.viewer);p.push(d),u[0].push([d.lng,d.lat])}var m=t.cartesian3Towgs84(t.positionsH[0],t.sdk.viewer);u[0].push([m.lng,m.lat]);var f=turf.polygon(u),v=turf.pointOnFeature(f),g=L()(t.sdk.viewer.entities.values);t.getClampToHeight({lng:v.geometry.coordinates[0],lat:v.geometry.coordinates[1]},g).then((function(e){t.label.position=[v.geometry.coordinates[0],v.geometry.coordinates[1],e]})),setTimeout((function(){t.event.mouse_left(l),t.event.mouse_right(c),t.event.mouse_move(r),t.event.mouse_right_keyboard_ctrl((function(e,n){i&&(t.options.positions.pop(),t.sdk.viewer.entities.remove(t.nodePoints[t.nodePoints.length-1]),t.nodePoints.pop(),i.index&&i.index===t.options.positions.length&&(t.nodePoints[i.index-1]?i=t.nodePoints[i.index-1]:i.index=i.index-1),t.renewPositions())})),t.event.gesture_pinck_start((function(e,i){var n=new Date;t.event.gesture_pinck_end((function(){var t=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t-n>=500?c():l(o,i)}))})),s()}),200)}}),0)}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}}]);var i,n,s,r}(jn);function Ju(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label" style="flex: 0 0 56px;">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">动画时长</span>\n <div class="input-number input-number-unit-3">\n <input class="input blur" type="number" title="" min="500" max="9999999" @model="spreadTime">\n <span class="unit">ms</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col">\n <span class="label">动画</span>\n <input class="btn-switch" type="checkbox" @model="spreadState">\n </div>\n <div class="col">\n <span class="label">动画重复</span>\n <input class="btn-switch" type="checkbox" @model="loop">\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="pincer-arrow-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">边线颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">边线宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function qu(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Xu(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?qu(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):qu(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Zu(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ku(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ku(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Ku(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function $u(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Qu=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),(i=$u(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"#ff000080",i.options.show=!n.show&&!1!==n.show||n.show,i.options.positions=n.positions||[],i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",i.options.height=n.height,i.options.loop=n.loop||!1,i.options.spreadState=n.spreadState||!1,i._elms={},i.nodePoints=[],i.spreadTime=n.spreadTime,i.entity,i.event,i.operate={},i.Dialog=o,n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",!i.options.positions||i.options.positions.length<5)i._error="双箭头最少需要五个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500});else{if(!i.options.height&&0!==i.options.height){for(var s=i.options.positions[0].alt,a=1;a<i.options.positions.length;a++)s<i.options.positions[a].alt&&(s=i.options.positions[a].alt);i.options.height=s}i.sdk.addIncetance(i.options.id,i),e.create(i)}return i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"PincerArrowObject"}},{key:"name",get:function(){return this.options.name},set:function(t){this.options.name=t,this.label.text=t,this._elms.name&&this._elms.name.forEach((function(e){e.value=t}))}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,0.5)"}});e._elms.color[i]=n}))}}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.height},set:function(t){var e,i=this;!t||isNaN(Number(t))?this.options.height=0:this.options.height=Number(Number(t).toFixed(2)),e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.height}))}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(this.options.line.color),this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.line.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,0,0,0.5)"}});e._elms.lineColor[i]=n})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){var e=this;this.options.line.width=t||0===t?t:3,this.entity.polyline.width=this.options.line.width,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(t){t.value=e.options.line.width}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Zu(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Zu(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Zu(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Zu(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._error){t.next=2;break}return t.abrupt("return");case 2:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=61;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];for(var i=function(i){var o=document.createElement("div");o.className="tr",o.innerHTML='\n <div class="td">'.concat(i+1,'</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ');var s=o.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.positions[i].lng.toFixed(8),s.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.positions[i].lng.toFixed(8);var l=o.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.positions[i].lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.positions[i].lat.toFixed(8);var p=o.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),s.addEventListener("dblclick",(function(){s.innerHTML="",r.value=Number(n.options.positions[i].lng.toFixed(8)),s.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.positions[i].lng.toFixed(8)),s.innerHTML="",s.appendChild(a)})),r.addEventListener("input",(function(){n.options.positions[i].lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.positions[i].lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.positions[i].lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.positions[i].lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.positions[i].lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.positions[i].lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(o)},o=0;o<n.options.positions.length;o++)i(o)},t.next=9,new Ki(this.sdk,this.options,{title:"双箭头属性",left:"180px",top:"100px",confirmCallBack:function(t){w.name=w.name.trim(),w.name||(w.name="未命名对象"),w.options.label.position={lng:w.label.position[0],lat:w.label.position[1],alt:w.label.position[2]},w.originalOptions=w.deepCopyObj(w.options),w._DialogObject.close(),w.Dialog.confirmCallBack&&w.Dialog.confirmCallBack(w.originalOptions)},resetCallBack:function(){w.reset(),w.Dialog.resetCallBack&&w.Dialog.resetCallBack()},removeCallBack:function(){w.Dialog.removeCallBack&&w.Dialog.removeCallBack()},closeCallBack:function(){var t=w.options.spreadState;w.positionEditing=!1,setTimeout((function(){w.options.spreadState=t,w.reset()}),10),w.Dialog.closeCallBack&&w.Dialog.closeCallBack()},showCallBack:function(t){w.options.show=t,w.originalOptions.show=t,w.show=t,w.Dialog.showCallBack&&w.Dialog.showCallBack()},translationalCallBack:function(){w.positionEditing=!w.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(w,(function(){o()}))}});case 9:if(this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" pincerArrow",(s=document.createElement("div")).innerHTML=Ju(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("pincer-arrow-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){w.color=t},clear:function(){w.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.lineColor=t},clear:function(){w.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelColor=t},clear:function(){w.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelLineColor=t},clear:function(){w.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorStart=t},clear:function(){w.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorEnd=t},clear:function(){w.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],m=this._DialogObject._element.content.getElementsByClassName("height-box")[0],f=m.getElementsByClassName("height")[0],v=this._DialogObject._element.content.getElementsByClassName("height-confirm")[0],f.value=10,2==this.heightMode?(m&&(m.className="input-number input-number-unit-1 height-box disabled"),v&&v.setAttribute("disabled","disabled")):(m&&(m.className="input-number input-number-unit-1 height-box"),v&&v.removeAttribute("disabled")),g=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],!(y=Y(this._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode"))){t.next=58;break}y.legp_search(g),b=this._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],C=0;case 42:if(!(C<g.length)){t.next=50;break}if(g[C].key!=this.heightMode){t.next=47;break}return b.value=g[C].value,y.legp_searchActive(g[C].value),t.abrupt("break",50);case 47:C++,t.next=42;break;case 50:b.addEventListener("input",(function(){for(var t=0;t<g.length;t++)if(g[t].value===b.value){w.heightMode=g[t].key;break}})),f.addEventListener("input",(function(){w.heightMode})),this._elms.height=f,this._elms.heightBox=m,this._elms.heightMode=b,this._elms.heightConfirm=v,this._elms.heightModeObject=y,v.addEventListener("click",(function(){w.operate.positionEditing?(w.positionEditing=!1,w.height=w.height+Number(f.value)):(e.closeNodeEdit(w),w.heightMode=w.heightMode,setTimeout((function(){w.height=w.height+Number(f.value)}),100))}));case 58:setTimeout((function(){w.attributeLink=w.options.attribute.link.content,w.attributeVr=w.options.attribute.vr.content,w.cameraSelect&&w.cameraSelect(),w.goodsSelect&&w.goodsSelect();var t=w.attributeSelect,e=w._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=w._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],s=0;s<t.length;s++)if(t[s].key===w.options.attributeType){n.value=t[s].value,i.legp_searchActive(t[s].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){w.attributeType=t[e].key;break}}))}var a=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],r=Y(w._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(r){r.legp_search(a);var l=w._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];l.value=w.options["area-unit"];for(var c=0;c<a.length;c++)if(a[c].value===l.value){r.legp_searchActive(a[c].value);break}l.addEventListener("input",(function(){for(var t=0;t<a.length;t++)if(a[t].value===l.value){w.areaUnit=a[t].value;break}}))}var u=Rn(),p=Y(w._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(p){p.legp_search(u);var h=w._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];h.value=u[w.labelFontFamily].value;for(var d=0;d<u.length;d++)if(u[d].value==h.value){p.legp_searchActive(u[d].value);break}h.addEventListener("input",(function(){for(var t=0;t<u.length;t++)if(u[t].value===h.value){w.labelFontFamily=u[t].key;break}})),w._elms.labelFontFamily=[h]}o()}),0),t.next=62;break;case 61:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 62:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:function(){var t=this;if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lineColor=this.originalOptions.line.color,this.lineWidth=this.originalOptions.line.width,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect();for(var e=0;e<this.options.positions.length;e++)this._elms.lng&&this._elms.lng[e]&&(this._elms.lng[e].innerHTML=this.options.positions[e].lng.toFixed(8)),this._elms.lat&&this._elms.lat[e]&&(this._elms.lat[e].innerHTML=this.options.positions[e].lat.toFixed(8)),this._elms.alt&&this._elms.alt[e]&&(this._elms.alt[e].innerHTML=Number(this.options.height.toFixed(2)));this.heightMode=this.heightMode;for(var i=0;i<this.nodePoints.length;i++)this.sdk.viewer.entities.remove(this.nodePoints[i]);this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy();var n=this.options.spreadState;this.removeAnimate(),setTimeout((function(){t.loop=t.options.loop,t.spreadState=n,be(t.sdk,t.options.id),re(t.sdk,t.options.id)}),200),setTimeout((function(){t.previous=null}),50)}}},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.removeAnimate(),this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label&&this.label.remove(),this.entity&&this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=9,this.sdk.removeIncetance(this.options.id);case 9:return t.next=11,be(this.sdk,this.options.id);case 11:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=v.length>0&&void 0!==v[0]?v[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Xu({},this.options.position):this.options.positions?l=Xu({},this.options.positions[0]):this.options.center?l=Xu({},this.options.center):this.options.start?l=Xu({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=51;break;case 25:c=[],t.t0=this.heightMode,t.next=0===t.t0||"0"===t.t0?29:1===t.t0||"1"===t.t0?31:2===t.t0||"2"===t.t0?33:35;break;case 29:case 31:return u=!1,t.abrupt("break",35);case 33:return u=!0,t.abrupt("break",35);case 35:if(!u){t.next=48;break}p=0;case 37:if(!(p<this.options.positions.length)){t.next=46;break}return t.next=40,this.getClampToHeight(this.options.positions[p]);case 40:h=t.sent,d=Cesium.Cartesian3.fromDegrees(this.options.positions[p].lng,this.options.positions[p].lat,h),c.push(d.x,d.y,d.z);case 43:p++,t.next=37;break;case 46:t.next=49;break;case 48:if(this.positionsH)for(m=0;m<this.positionsH.length;m++)c.push(this.positionsH[m].x,this.positionsH[m].y,this.positionsH[m].z);case 49:f=Cesium.BoundingSphere.fromVertices(c),this.sdk.viewer.camera.flyToBoundingSphere(f,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity){this.removeAnimate();var i=this;if(this.event&&this.event.destroy(),this.event=new X(this.sdk),this.operate.positionEditing=t,!0===t){var n;this.previous={positions:L()(this.positions)},this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1;for(var o=[],s=L()(this.positions),a=[],r=0;r<s.length;r++){var l=this.cartesian3Towgs84(s[r],this.sdk.viewer);o.push([l.lng,l.lat])}var c=this.cartesian3Towgs84(s[0],this.sdk.viewer);o.push([c.lng,c.lat]);for(var u=turf.polygon([o]),p=turf.centroid(u),h=(n=Cesium.Cartesian3).fromDegrees.apply(n,L()(p.geometry.coordinates)),d=0;d<s.length;d++)h.x,s[d].x,a.push({x:h.x-s[d].x,y:h.y-s[d].y,z:h.z-s[d].z});var m=[];this.event.mouse_move((function(t,i){m=[];for(var n=0;n<a.length;n++)m.push({x:i.x-a[n].x,y:i.y-a[n].y,z:i.z-a[n].z});e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),m=[];for(var n=0;n<a.length;n++){var o={x:i.x-a[n].x,y:i.y-a[n].y,z:i.z-a[n].z};m.push(o),e.options.positions[n]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[n]&&(e._elms.lng[n].innerHTML=e.options.positions[n].lng.toFixed(8)),e._elms.lat&&e._elms.lat[n]&&(e._elms.lat[n].innerHTML=e.options.positions[n].lat.toFixed(8))}e.positions=m,e.previous={positions:L()(e.positions)},e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),m=[];for(var t=0;t<a.length;t++){var o={x:i.x-a[t].x,y:i.y-a[t].y,z:i.z-a[t].z};m.push(o),e.options.positions[t]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[t]&&(e._elms.lng[t].innerHTML=e.options.positions[t].lng.toFixed(8)),e._elms.lat&&e._elms.lat[t]&&(e._elms.lat[t].innerHTML=e.options.positions[t].lat.toFixed(8))}e.positions=m,e.previous={positions:L()(e.positions)},e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){var t=[];if(m.length>0)for(var e=0;e<m.length;e++)t.push(i.cartesian3Towgs84(m[e],i.sdk.viewer));else for(var n=0;n<s.length;n++)t.push(i.cartesian3Towgs84(s[n],i.sdk.viewer));return i.renewPositions(t),new Cesium.PolygonHierarchy(i.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!1)}else{this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.destroy()),this.tip&&this.tip.destroy(),this.previous?this.positions=L()(this.previous.positions):this.previous={positions:L()(this.positions)};for(var f=[],v=0;v<this.positions.length;v++)f.push(this.cartesian3Towgs84(this.positions[v],this.sdk.viewer));this.renewPositions(f),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positionsH)}),!0),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!0)}}}},{key:"setPosition",value:function(t){for(var e,i=Cesium.Cartesian3.fromDegrees(t.position.lng,t.position.lat,t.position.alt),n=L()(this.positions),o=[],s=[],a=0;a<n.length;a++){var r=this.cartesian3Towgs84(n[a],this.sdk.viewer);o.push([r.lng,r.lat])}var l=this.cartesian3Towgs84(n[0],this.sdk.viewer);o.push([l.lng,l.lat]);for(var c=turf.polygon([o]),u=turf.centroid(c),p=(e=Cesium.Cartesian3).fromDegrees.apply(e,L()(u.geometry.coordinates)),h=0;h<n.length;h++)s.push({x:p.x-n[h].x,y:p.y-n[h].y,z:p.z-n[h].z});for(var d=[],m=0;m<s.length;m++)d.push({x:i.x-s[m].x,y:i.y-s[m].y,z:i.z-s[m].z});this.label.position=[t.position.lng,t.position.lat,t.position.alt];var f=[];if(d.length>0)for(var v=0;v<d.length;v++)f.push(this.cartesian3Towgs84(d[v],this.sdk.viewer));var g=this.computePincerArrow(f);0!=g.length&&(this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(g)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return g.length>=3?[].concat(L()(g),[g[0],g[1]]):L()(g)}),!1))}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=this.computePincerArrow(this.options.positions);if(0!=i.length){for(var n=[[]],o=0;o<i.length;o++){var s=this.cartesian3Towgs84(i[o],this.sdk.viewer);n[0].push([s.lng,s.lat])}var a=this.cartesian3Towgs84(i[0],this.sdk.viewer);n[0].push([a.lng,a.lat]);var r=turf.polygon(n),l=turf.pointOnFeature(r),c=document.getElementById(e.domid),u=Cesium.Cartesian3.fromDegrees(l.geometry.coordinates[0],l.geometry.coordinates[1]);this.sdk.viewer.scene.postRender.addEventListener((function(i){if("block"===c.style.display||""===c.style.display){var n=t.sdk.viewer.scene.cartesianToCanvasCoordinates(u);n&&(c.style.left=(n.x+e.x).toFixed(0)+"px",c.style.top=(n.y+e.y).toFixed(0)+"px")}}))}}},{key:"spreadTime",get:function(){return this.options.spreadTime},set:function(t){var e=Number(t);isNaN(e)?e=3e3:e<500?e=500:e>9999999&&(e=9999999),this.options.spreadTime=e,this.spreadState&&this.setSpreadProgressByTime(),this._elms.spreadTime&&this._elms.spreadTime.forEach((function(t){t.value=e}))}},{key:"loop",get:function(){return this.options.loop},set:function(t){this.options.loop=t,this.TweenAnimate&&(t?this.TweenAnimate.repeat(1/0):this.TweenAnimate.repeat()),this._elms.loop&&this._elms.loop.forEach((function(e){e.checked=t}))}},{key:"spreadState",get:function(){return this.options.spreadState},set:function(t){this.options.spreadState=t,this.TweenAnimate?t?(this.lineEdit=!1,this.setSpreadProgressByTime(this.TweenAnimate._object.distance1/this.TweenAnimate._valuesEnd.distance1*this.spreadTime)):this.TweenAnimate.pause():t&&this.setSpreadProgressByTime(),this._elms.spreadState&&this._elms.spreadState.forEach((function(e){e.checked=t}))}},{key:"setSpreadProgressByTime",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.entity){for(var i=this,n=0;n<this.nodePoints.length;n++)this.sdk.viewer.entities.remove(this.nodePoints[n]);this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy();var s=this.computePincerArrow(this.options.positions);if(0!=s.length){this.TweenAnimate&&(TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null);var r,l=le(),c=l.sdkP,u=l.sdkD;if(u&&c&&this.sdk===u)(r=c.entityMap.get(this.options.id))&&r.entity&&r.entity.polygon&&r.positionsH&&(this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(r.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(r.positionsH),[r.positionsH[0],r.positionsH[1]])}),!1));else{for(var p=[],h=[],d=[],m=[],f=0;f<=2;f++)m.push([this.options.positions[f].lng,this.options.positions[f].lat]);m.push([this.options.positions[0].lng,this.options.positions[0].lat]);for(var v=turf.lineString(m),g=turf.booleanClockwise(v),y=0;y<=100;y++){var b=this.cartesian3Towgs84(s[y],this.sdk.viewer);p.push([b.lng,b.lat,b.alt])}g?p.push([this.options.positions[3].lng,this.options.positions[3].lat,this.options.positions[3].alt]):p.push([this.options.positions[2].lng,this.options.positions[2].lat,this.options.positions[2].alt]);for(var C=312;C>=212;C--){var w=this.cartesian3Towgs84(s[C],this.sdk.viewer);h.push([w.lng,w.lat,w.alt])}g?h.push([this.options.positions[2].lng,this.options.positions[2].lat,this.options.positions[2].alt]):h.push([this.options.positions[3].lng,this.options.positions[3].lat,this.options.positions[3].alt]),d.push([(this.options.positions[0].lng+this.options.positions[1].lng)/2,(this.options.positions[0].lat+this.options.positions[1].lat)/2],[this.options.positions[4].lng,this.options.positions[4].lat]);var k=this.deepCopyObj(this.options.positions),x=turf.lineString(p),_=turf.length(x,{units:"kilometers"}),E=turf.lineString(h),S=turf.length(E,{units:"kilometers"}),D=turf.lineString(d),M=turf.length(D,{units:"kilometers"}),P=e/this.spreadTime;this.TweenAnimate=new TWEEN.Tween({distance1:_*P,distance2:S*P,distance3:M*P}).to({distance1:_,distance2:S,distance3:M},this.spreadTime-e).easing(TWEEN.Easing.Linear.None).repeat(this.options.loop?1/0:0).onRepeat((function(){e&&t.setSpreadProgressByTime()})).onUpdate(function(){var e=o()(a.a.mark((function e(i,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.TweenAnimate._duration!=1/0){e.next=2;break}return e.abrupt("return");case 2:if(t.sdk.viewer){e.next=6;break}return t.removeAnimate(),e.abrupt("return");case 6:O(i);case 7:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()).onStart((function(){t.options.spreadState=!0,t._elms.spreadState&&t._elms.spreadState.forEach((function(t){t.checked=!0}))})).onComplete((function(e){t.removeAnimate()})),this.spreadState?this.TweenAnimate.start():O({distance1:_*P,distance2:S*P,distance3:M*P}),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!1)}}}function O(t){return T.apply(this,arguments)}function T(){return(T=o()(a.a.mark((function t(e){var n,o,s,r,l,c,u,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.show){t.next=2;break}return t.abrupt("return");case 2:if(n=2,o=3,g&&(n=3,o=2),e.distance1){t.next=10;break}k[n].lng=k[1].lng,k[n].lat=k[1].lat,t.next=16;break;case 10:return t.next=12,turf.lineSliceAlong(x,0,e.distance1,{units:"kilometers"});case 12:s=t.sent,r=L()(s.geometry.coordinates[s.geometry.coordinates.length-1]),k[n].lng=r[0],k[n].lat=r[1];case 16:if(e.distance2){t.next=21;break}k[o].lng=k[0].lng,k[3].lat=k[0].lat,t.next=27;break;case 21:return t.next=23,turf.lineSliceAlong(E,0,e.distance2,{units:"kilometers"});case 23:l=t.sent,c=L()(l.geometry.coordinates[l.geometry.coordinates.length-1]),k[o].lng=c[0],k[o].lat=c[1];case 27:if(e.distance3){t.next=32;break}k[4].lng=d[0][0],k[4].lat=d[0][1],t.next=38;break;case 32:return t.next=34,turf.lineSliceAlong(D,0,e.distance3,{units:"kilometers"});case 34:u=t.sent,p=L()(u.geometry.coordinates[u.geometry.coordinates.length-1]),k[4].lng=p[0],k[4].lat=p[1];case 38:i.renewPositions(k);case 39:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}},{key:"removeAnimate",value:function(){this.spreadState=!1,this.TweenAnimate&&(TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null,this.renewPositions(),this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(this.positionsH),this.entity.polyline.positions=[].concat(L()(this.positionsH),[this.positionsH[0],this.positionsH[1]]))}},{key:"renewPositions",value:function(t){var e=this;if(!this._error&&this.sdk.viewer){var i=!1,n=this.options.positions;t&&(n=t);for(var o=[],s=0;s<n.length;s++)o.push(n[s].lng,n[s].lat);this.positions=Cesium.Cartesian3.fromDegreesArray(o);var a=this.computePincerArrow(n);if(0!=a.length){for(var r=[[]],l=[],c=0;c<a.length;c++){var u=this.cartesian3Towgs84(a[c],this.sdk.viewer);l.push(u),r[0].push([u.lng,u.lat])}var p=this.cartesian3Towgs84(a[0],this.sdk.viewer);r[0].push([p.lng,p.lat]);var h=0,d=turf.polygon(r),m=turf.pointOnFeature(d);switch(this.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:h=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(m.geometry.coordinates[0],m.geometry.coordinates[1]))||0,i=!1;break;case"2":case 2:i=!0}var f=[];if(i||0!=this.nodePoints.length)this.positionsH=a,setTimeout((function(){if(e.sdk.viewer){var t=L()(e.sdk.viewer.entities.values);e.getClampToHeight({lng:m.geometry.coordinates[0],lat:m.geometry.coordinates[1]},t).then((function(t){e.label&&(e.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],t])}))}}),100);else{for(var v=0;v<r[0].length;v++)f.push(r[0][v][0],r[0][v][1],this.height+h);this.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(f),this.label&&(this.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],this.height+h])}return this.spreadState||(this.options.areaByMeter=this.computeArea(l),this.areaUnit=this.areaUnit),o}}}}],[{key:"create",value:function(t){for(var i=t.options.positions,n=[],o=0;o<i.length;o++)n.push(i[o].lng,i[o].lat);t.positions=Cesium.Cartesian3.fromDegreesArray(n);var s=t.computePincerArrow(t.options.positions);if(0!=s.length){for(var a=[[]],r=0;r<s.length;r++){var l=t.cartesian3Towgs84(s[r],t.sdk.viewer);a[0].push([l.lng,l.lat])}var c=t.cartesian3Towgs84(s[0],t.sdk.viewer);a[0].push([c.lng,c.lat]);var u,p=turf.polygon(a),h=turf.pointOnFeature(p),d=0;switch(t.options.heightMode){case"0":case 0:u=!1;break;case"1":case 1:d=t.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(h.geometry.coordinates[0],h.geometry.coordinates[1]))||0,u=!1;break;case"2":case 2:u=!0}t.options.label.position||(t.options.label.position={lng:h.geometry.coordinates[0],lat:h.geometry.coordinates[1],alt:t.height+d});for(var m=[],f=0;f<a[0].length;f++)m.push(a[0][f][0],a[0][f][1],t.height+d);var v=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(u=!1,v=new Cesium.CustomColorMaterialSource({color:t.options.color})),t.options.label.ground=u,t.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(m),t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,polygon:{hierarchy:u?new Cesium.PolygonHierarchy(s):new Cesium.PolygonHierarchy(t.positionsH),perPositionHeight:!u,material:v,zIndex:t.sdk._entityZIndex},polyline:{positions:[].concat(L()(t.positionsH),[t.positionsH[0],t.positionsH[1]]),width:t.options.line.width,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!u,arcType:u?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t);for(var g=[],y=0;y<s.length;y++)g.push(t.cartesian3Towgs84(s[y],t.sdk.viewer));switch(t.options.areaByMeter=t.computeArea(g),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id),t.spreadState=t.options.spreadState}}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:e.options.label.ground});case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=Zu(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),-1!==e[n].className.indexOf("blur")&&(u="blur"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.positionEditing=!1,setTimeout((function(){if(YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n,s=function(){var e=o()(a.a.mark((function e(){var i,n,o,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=L()(t.sdk.viewer.entities.values),n=0;case 2:if(!(n<r.length)){e.next=11;break}return e.next=5,t.getClampToHeight(t.options.positions[n],i);case 5:o=e.sent,s=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:n,position:Cesium.Cartesian3.fromDegrees(r[n].lng,r[n].lat,o),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.push(s);case 8:n++,e.next=2;break;case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t.removeAnimate(),YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];var r=L()(t.options.positions),l=function(e,o){if(i){t.options.positions[i.index]=t.cartesian3Towgs84(o,t.sdk.viewer),r[i.index]=t.options.positions[i.index];var s=i.index,a=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:s,position:Cesium.Cartesian3.fromDegrees(r[i.index].lng,r[i.index].lat,r[i.index].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.splice(i.index,0,a),i=null,t.tip.set_text("请选择一个顶点,右键取消")}else{var l=t.sdk.viewer.scene.pick(e.position);l&&l.id&&l.id.name&&"node-secondary-edit-point"===l.id.name&&(i=l.id,n=t.cartesian3Towgs84(l.id.position.getValue(),t.sdk.viewer),t.nodePoints.splice(l.id.index,1),t.sdk.viewer.entities.remove(l.id),t.tip.set_text("左键确定,右键取消"))}t.renewPositions(),t.tip.setPosition(o,e.position.x,e.position.y)},c=function(){t.event.mouse_move((function(){})),t.event.mouse_left((function(){})),t.event.mouse_right((function(){})),t.event.gesture_pinck_start((function(){})),i&&(r[i.index]=n,t._elms.lng&&t._elms.lng[i.index]&&(t._elms.lng[i.index].innerHTML=t.options.positions[i.index].lng.toFixed(8)),t._elms.lat&&t._elms.lat[i.index]&&(t._elms.lat[i.index].innerHTML=t.options.positions[i.index].lat.toFixed(8)),e(null,r)),t.options.positions=L()(r),t.heightMode=t.heightMode,t.previous=null};t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(t.positionsH)}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(t.positionsH),[t.positionsH[0],t.positionsH[1]])}),!1),setTimeout((function(){t.event.mouse_left(l),t.event.mouse_right(c),t.event.mouse_move((function(e,n){i&&(t.options.positions[i.index]=t.cartesian3Towgs84(n,t.sdk.viewer),t.renewPositions()),t.tip.setPosition(n,e.endPosition.x,e.endPosition.y)})),t.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?c():l(o,i)}))}));for(var e=[[]],n=[],o=0;o<t.positionsH.length;o++){var a=t.cartesian3Towgs84(t.positionsH[o],t.sdk.viewer);n.push(a),e[0].push([a.lng,a.lat])}var r=t.cartesian3Towgs84(t.positionsH[0],t.sdk.viewer);e[0].push([r.lng,r.lat]);var u=turf.polygon(e),p=turf.pointOnFeature(u),h=L()(t.sdk.viewer.entities.values);t.getClampToHeight({lng:p.geometry.coordinates[0],lat:p.geometry.coordinates[1]},h).then((function(e){t.label.position=[p.geometry.coordinates[0],p.geometry.coordinates[1],e]})),s()}),200)}}),0)}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}}]);var i,n,s,r}(jn);function tp(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">动画时长</span>\n <div class="input-number input-number-unit-3">\n <input class="input blur" type="number" title="" min="500" max="9999999" @model="spreadTime">\n <span class="unit">ms</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col">\n <span class="label">动画</span>\n <input class="btn-switch" type="checkbox" @model="spreadState">\n </div>\n <div class="col">\n <span class="label">动画重复</span>\n <input class="btn-switch" type="checkbox" @model="loop">\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="assemble-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">边线颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">边线宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function ep(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ip(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ep(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ep(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function np(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return op(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?op(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function op(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function sp(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var ap=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),(i=sp(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"#ff000080",i.options.show=!n.show&&!1!==n.show||n.show,i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.positions=n.positions||[],i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",i.entity,i.event=new X(i.sdk),i.operate={},i._elms={},i.Dialog=o,i.options.loop=n.loop||!1,i.options.spreadState=n.spreadState||!1,i.spreadTime=n.spreadTime,n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.nodePoints=[],!i.options.positions||i.options.positions.length<2)i._error="直线箭头需要两个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500});else{if(!i.options.height&&0!==i.options.height){for(var s=i.options.positions[0].alt,a=1;a<i.options.positions.length;a++)s<i.options.positions[a].alt&&(s=i.options.positions[a].alt);i.options.height=s}i.sdk.addIncetance(i.options.id,i),e.create(i)}return i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"StraightArrowObject"}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[i]=n}))}}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.height},set:function(t){var e,i=this;!t||isNaN(Number(t))?this.options.height=0:this.options.height=Number(Number(t).toFixed(2)),e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positionsH),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.height}))}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t,this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(t),this._elms.lineColor&&this._elms.lineColor.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,255,255,1)"}});e._elms.lineColor[n]=o})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){this.options.line.width=t,this.entity.polyline.width=t,this._elms.lineColor&&this._elms.lineColor.forEach((function(e){e.value=t}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter||0==this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=np(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=np(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=np(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=np(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._error){t.next=2;break}return t.abrupt("return");case 2:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=61;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];for(var i=function(i){var o=document.createElement("div");o.className="tr",o.innerHTML='\n <div class="td">'.concat(i+1,'</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ');var s=o.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.positions[i].lng.toFixed(8),s.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.positions[i].lng.toFixed(8);var l=o.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.positions[i].lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.positions[i].lat.toFixed(8);var p=o.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),s.addEventListener("dblclick",(function(){s.innerHTML="",r.value=Number(n.options.positions[i].lng.toFixed(8)),s.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.positions[i].lng.toFixed(8)),s.innerHTML="",s.appendChild(a)})),r.addEventListener("input",(function(){n.options.positions[i].lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.positions[i].lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.positions[i].lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.positions[i].lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.positions[i].lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.positions[i].lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(o)},o=0;o<n.options.positions.length;o++)i(o)},t.next=9,new Ki(this.sdk,this.options,{title:"直线箭头属性",left:"180px",top:"100px",confirmCallBack:function(t){w.name=w.name.trim(),w.name||(w.name="未命名对象"),w.options.label.position={lng:w.label.position[0],lat:w.label.position[1],alt:w.label.position[2]},w.originalOptions=w.deepCopyObj(w.options),w._DialogObject.close(),w.Dialog.confirmCallBack&&w.Dialog.confirmCallBack(w.originalOptions)},resetCallBack:function(){w.reset(),w.Dialog.resetCallBack&&w.Dialog.resetCallBack()},removeCallBack:function(){w.Dialog.removeCallBack&&w.Dialog.removeCallBack()},closeCallBack:function(){var t=w.options.spreadState;w.positionEditing=!1,setTimeout((function(){w.options.spreadState=t,w.reset()}),10),w.Dialog.closeCallBack&&w.Dialog.closeCallBack()},showCallBack:function(t){w.options.show=t,w.originalOptions.show=t,w.show=t,w.Dialog.showCallBack&&w.Dialog.showCallBack()},translationalCallBack:function(){w.positionEditing=!w.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(w,(function(){o()}))}});case 9:if(this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" assemble",(s=document.createElement("div")).innerHTML=tp(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("assemble-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){w.color=t},clear:function(){w.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.lineColor=t},clear:function(){w.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelColor=t},clear:function(){w.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelLineColor=t},clear:function(){w.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorStart=t},clear:function(){w.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorEnd=t},clear:function(){w.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],m=this._DialogObject._element.content.getElementsByClassName("height-box")[0],f=m.getElementsByClassName("height")[0],v=this._DialogObject._element.content.getElementsByClassName("height-confirm")[0],f.value=10,2==this.heightMode?(m&&(m.className="input-number input-number-unit-1 height-box disabled"),v&&v.setAttribute("disabled","disabled")):(m&&(m.className="input-number input-number-unit-1 height-box"),v&&v.removeAttribute("disabled")),g=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],!(y=Y(this._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode"))){t.next=58;break}y.legp_search(g),b=this._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],C=0;case 42:if(!(C<g.length)){t.next=50;break}if(g[C].key!=this.heightMode){t.next=47;break}return b.value=g[C].value,y.legp_searchActive(g[C].value),t.abrupt("break",50);case 47:C++,t.next=42;break;case 50:b.addEventListener("input",(function(){for(var t=0;t<g.length;t++)if(g[t].value===b.value){w.heightMode=g[t].key;break}})),f.addEventListener("input",(function(){w.heightMode})),this._elms.height=f,this._elms.heightBox=m,this._elms.heightMode=b,this._elms.heightConfirm=v,this._elms.heightModeObject=y,v.addEventListener("click",(function(){w.operate.positionEditing?(w.positionEditing=!1,w.height=w.height+Number(f.value)):(e.closeNodeEdit(w),w.heightMode=w.heightMode,setTimeout((function(){w.height=w.height+Number(f.value)}),100))}));case 58:setTimeout((function(){w.attributeLink=w.options.attribute.link.content,w.attributeVr=w.options.attribute.vr.content,w.cameraSelect&&w.cameraSelect(),w.goodsSelect&&w.goodsSelect();var t=w.attributeSelect,e=w._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=w._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],s=0;s<t.length;s++)if(t[s].key===w.options.attributeType){n.value=t[s].value,i.legp_searchActive(t[s].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){w.attributeType=t[e].key;break}}))}o();var a=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],r=Y(w._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(r){r.legp_search(a);var l=w._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];l.value=w.options["area-unit"];for(var c=0;c<a.length;c++)if(a[c].value===l.value){r.legp_searchActive(a[c].value);break}l.addEventListener("input",(function(){for(var t=0;t<a.length;t++)if(a[t].value===l.value){w.areaUnit=a[t].value;break}}))}var u=Rn(),p=Y(w._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(p){p.legp_search(u);var h=w._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];h.value=u[w.labelFontFamily].value;for(var d=0;d<u.length;d++)if(u[d].value==h.value){p.legp_searchActive(u[d].value);break}h.addEventListener("input",(function(){for(var t=0;t<u.length;t++)if(u[t].value===h.value){w.labelFontFamily=u[t].key;break}})),w._elms.labelFontFamily=[h]}}),0),t.next=62;break;case 61:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 62:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:function(){var t=this;if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lineColor=this.originalOptions.line.color,this.lineWidth=this.originalOptions.line.width,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeVr=this.options.attribute.vr.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect();for(var e=0;e<this.options.positions.length;e++)this._elms.lng&&this._elms.lng[e]&&(this._elms.lng[e].innerHTML=this.options.positions[e].lng.toFixed(8)),this._elms.lat&&this._elms.lat[e]&&(this._elms.lat[e].innerHTML=this.options.positions[e].lat.toFixed(8)),this._elms.alt&&this._elms.alt[e]&&(this._elms.alt[e].innerHTML=Number(this.options.height.toFixed(2)));this.heightMode=this.heightMode;for(var i=0;i<this.nodePoints.length;i++)this.sdk.viewer.entities.remove(this.nodePoints[i]);this.previous=null,this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy();var n=this.options.spreadState;this.removeAnimate(),setTimeout((function(){t.loop=t.options.loop,t.spreadState=n,be(t.sdk,t.options.id),re(t.sdk,t.options.id)}),200)}}},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.removeAnimate(),this.sdk.viewer.entities.remove(this.entity),this.label&&this.label.remove(),this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=9,this.sdk.removeIncetance(this.options.id);case 9:return t.next=11,be(this.sdk,this.options.id);case 11:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0]&&this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=v.length>0&&void 0!==v[0]?v[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=ip({},this.options.position):this.options.positions?l=ip({},this.options.positions[0]):this.options.center?l=ip({},this.options.center):this.options.start?l=ip({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=51;break;case 25:c=[],t.t0=this.heightMode,t.next=0===t.t0||"0"===t.t0?29:1===t.t0||"1"===t.t0?31:2===t.t0||"2"===t.t0?33:35;break;case 29:case 31:return u=!1,t.abrupt("break",35);case 33:return u=!0,t.abrupt("break",35);case 35:if(!u){t.next=48;break}p=0;case 37:if(!(p<this.options.positions.length)){t.next=46;break}return t.next=40,this.getClampToHeight(this.options.positions[p]);case 40:h=t.sent,d=Cesium.Cartesian3.fromDegrees(this.options.positions[p].lng,this.options.positions[p].lat,h),c.push(d.x,d.y,d.z);case 43:p++,t.next=37;break;case 46:t.next=49;break;case 48:if(this.positionsH)for(m=0;m<this.positionsH.length;m++)c.push(this.positionsH[m].x,this.positionsH[m].y,this.positionsH[m].z);case 49:f=Cesium.BoundingSphere.fromVertices(c),this.sdk.viewer.camera.flyToBoundingSphere(f,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity){this.removeAnimate();var i=this;if(this.event&&this.event.destroy(),this.event=new X(this.sdk),this.operate.positionEditing=t,!0===t){this.previous={positions:L()(this.positions)},this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1;for(var n=[],o=L()(this.positions),s=[],a=0;a<o.length;a++){var r=this.cartesian3Towgs84(o[a],this.sdk.viewer);n.push([r.lng,r.lat])}for(var l=Cesium.Cartesian3.fromDegrees((n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2),c=0;c<o.length;c++)l.x,o[c].x,s.push({x:l.x-o[c].x,y:l.y-o[c].y,z:l.z-o[c].z});var u=[];this.event.mouse_move((function(t,i){e.cartesian3Towgs84(i,e.sdk.viewer);u=[];for(var n=0;n<s.length;n++)u.push({x:i.x-s[n].x,y:i.y-s[n].y,z:i.z-s[n].z});e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),u=[];for(var n=0;n<s.length;n++){var o={x:i.x-s[n].x,y:i.y-s[n].y,z:i.z-s[n].z};u.push(o),e.options.positions[n]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[n]&&(e._elms.lng[n].innerHTML=e.options.positions[n].lng.toFixed(8)),e._elms.lat&&e._elms.lat[n]&&(e._elms.lat[n].innerHTML=e.options.positions[n].lat.toFixed(8))}e.positions=u,e.previous={positions:L()(e.positions)},e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),u=[];for(var t=0;t<s.length;t++){var o={x:i.x-s[t].x,y:i.y-s[t].y,z:i.z-s[t].z};u.push(o),e.options.positions[t]=e.cartesian3Towgs84(o,e.sdk.viewer),e._elms.lng&&e._elms.lng[t]&&(e._elms.lng[t].innerHTML=e.options.positions[t].lng.toFixed(8)),e._elms.lat&&e._elms.lat[t]&&(e._elms.lat[t].innerHTML=e.options.positions[t].lat.toFixed(8))}e.positions=u,e.previous={positions:L()(e.positions)},e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){var t=[];if(u.length>0)for(var e=0;e<u.length;e++)t.push(i.cartesian3Towgs84(u[e],i.sdk.viewer));else for(var n=0;n<o.length;n++)t.push(i.cartesian3Towgs84(o[n],i.sdk.viewer));return i.renewPositions(t),new Cesium.PolygonHierarchy(i.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!1)}else{this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.destroy()),this.tip&&this.tip.destroy(),this.previous?this.positions=L()(this.previous.positions):this.previous={positions:L()(this.positions)};for(var p=[],h=0;h<this.positions.length;h++)p.push(i.cartesian3Towgs84(this.positions[h],i.sdk.viewer));this.renewPositions(p),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positionsH)}),!0),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!0)}}}},{key:"setPosition",value:function(t){for(var e,i=Cesium.Cartesian3.fromDegrees(t.position.lng,t.position.lat,t.position.alt),n=L()(this.positions),o=[],s=[],a=0;a<n.length;a++){var r=this.cartesian3Towgs84(n[a],this.sdk.viewer);o.push([r.lng,r.lat])}var l=this.cartesian3Towgs84(n[0],this.sdk.viewer);o.push([l.lng,l.lat]);for(var c=turf.polygon([o]),u=turf.centroid(c),p=(e=Cesium.Cartesian3).fromDegrees.apply(e,L()(u.geometry.coordinates)),h=0;h<n.length;h++)s.push({x:p.x-n[h].x,y:p.y-n[h].y,z:p.z-n[h].z});for(var d=[],m=0;m<s.length;m++)d.push({x:i.x-s[m].x,y:i.y-s[m].y,z:i.z-s[m].z});this.label.position=[t.position.lng,t.position.lat,t.position.alt];var f=[];if(d.length>0)for(var v=0;v<d.length;v++)f.push(this.cartesian3Towgs84(d[v],this.sdk.viewer));var g=this.computeStraightArrow(f);0!=g.length&&(this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(g)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return g.length>=3?[].concat(L()(g),[g[0],g[1]]):L()(g)}),!1))}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=this.computeStraightArrow(this.options.positions);if(0!=i.length){for(var n=[[]],o=0;o<i.length;o++){var s=this.cartesian3Towgs84(i[o],this.sdk.viewer);n[0].push([s.lng,s.lat])}var a=this.cartesian3Towgs84(i[0],this.sdk.viewer);n[0].push([a.lng,a.lat]);var r=turf.polygon(n),l=turf.pointOnFeature(r),c=document.getElementById(e.domid),u=Cesium.Cartesian3.fromDegrees(l.geometry.coordinates[0],l.geometry.coordinates[1]);this.sdk.viewer.scene.postRender.addEventListener((function(i){if("block"===c.style.display||""===c.style.display){var n=t.sdk.viewer.scene.cartesianToCanvasCoordinates(u);n&&(c.style.left=(n.x+e.x).toFixed(0)+"px",c.style.top=(n.y+e.y).toFixed(0)+"px")}}))}}},{key:"spreadTime",get:function(){return this.options.spreadTime},set:function(t){var e=Number(t);isNaN(e)?e=3e3:e<500?e=500:e>9999999&&(e=9999999),this.options.spreadTime=e,this.spreadState&&this.setSpreadProgressByTime(),this._elms.spreadTime&&this._elms.spreadTime.forEach((function(t){t.value=e}))}},{key:"loop",get:function(){return this.options.loop},set:function(t){this.options.loop=t,this.TweenAnimate&&(t?this.TweenAnimate.repeat(1/0):this.TweenAnimate.repeat()),this._elms.loop&&this._elms.loop.forEach((function(e){e.checked=t}))}},{key:"spreadState",get:function(){return this.options.spreadState},set:function(t){this.options.spreadState=t,this.TweenAnimate?t?(this.lineEdit=!1,this.setSpreadProgressByTime(this.TweenAnimate._object.distance/this.TweenAnimate._valuesEnd.distance*this.spreadTime)):this.TweenAnimate.pause():t&&this.setSpreadProgressByTime(),this._elms.spreadState&&this._elms.spreadState.forEach((function(e){e.checked=t}))}},{key:"setSpreadProgressByTime",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.entity){for(var i=this,n=0;n<this.nodePoints.length;n++)this.sdk.viewer.entities.remove(this.nodePoints[n]);this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.TweenAnimate&&(TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null);var s,r=le(),l=r.sdkP,c=r.sdkD;if(c&&l&&this.sdk===c)(s=l.entityMap.get(this.options.id))&&s.entity&&s.entity.polygon&&s.positionsH&&(this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(s.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(s.positionsH),[s.positionsH[0],s.positionsH[1]])}),!1));else{for(var u=[],p=0;p<i.options.positions.length;p++)u.push([i.options.positions[p].lng,i.options.positions[p].lat]);for(var h=turf.lineString(u),d=[],m=1;m<u.length;m++){var f=turf.point(u[m]),v=turf.point(u[m-1]),g=turf.distance(f,v,{units:"kilometers"}),y=d[d.length-1]||0;d.push(y+g)}var b=turf.length(h,{units:"kilometers"}),C=e/this.spreadTime;this.TweenAnimate=new TWEEN.Tween({distance:b*C}).to({distance:b},this.spreadTime-e).easing(TWEEN.Easing.Linear.None).repeat(this.options.loop?1/0:0).onRepeat((function(){e&&t.setSpreadProgressByTime()})).onUpdate(function(){var e=o()(a.a.mark((function e(i,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.TweenAnimate._duration!=1/0){e.next=2;break}return e.abrupt("return");case 2:if(t.sdk.viewer){e.next=6;break}return t.removeAnimate(),e.abrupt("return");case 6:w(i);case 7:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()).onStart((function(){t.options.spreadState=!0,t._elms.spreadState&&t._elms.spreadState.forEach((function(t){t.checked=!0}))})).onComplete((function(e){t.removeAnimate()})),this.spreadState?this.TweenAnimate.start():w({distance:b*C}),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positionsH)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positionsH),[i.positionsH[0],i.positionsH[1]])}),!1)}}function w(t){return k.apply(this,arguments)}function k(){return(k=o()(a.a.mark((function t(e){var n,o,s,r,l,c;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.show){t.next=2;break}return t.abrupt("return");case 2:n=2,o=d.length-2;case 4:if(!(o>=0)){t.next=12;break}if(!(e.distance>=d[o])){t.next=9;break}return(n=n+o+1)>i.options.positions.length-1&&(n=i.options.positions.length-1),t.abrupt("break",12);case 9:o--,t.next=4;break;case 12:for(s=[],r=0;r<n;r++)s[r]=ip({},i.options.positions[r]);if(e.distance){t.next=18;break}s[n]={lng:s[1].lng,lat:s[1].lat},t.next=24;break;case 18:return t.next=20,turf.lineSliceAlong(h,0,e.distance,{units:"kilometers"});case 20:l=t.sent,c=L()(l.geometry.coordinates[l.geometry.coordinates.length-1]),s[1].lng=c[0],s[1].lat=c[1];case 24:i.renewPositions(s);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}},{key:"removeAnimate",value:function(){this.spreadState=!1,this.TweenAnimate&&(TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null,this.renewPositions(),this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(this.positionsH),this.entity.polyline.positions=[].concat(L()(this.positionsH),[this.positionsH[0],this.positionsH[1]]))}},{key:"renewPositions",value:function(t){var e=this;if(!this._error&&this.sdk.viewer){var i=!1,n=this.options.positions;t&&(n=t);for(var o=[],s=0;s<n.length;s++)o.push(n[s].lng,n[s].lat);this.positions=Cesium.Cartesian3.fromDegreesArray(o);var a=this.computeStraightArrow(n);if(0!=a.length){for(var r=[[]],l=[],c=0;c<a.length;c++){var u=this.cartesian3Towgs84(a[c],this.sdk.viewer);l.push(u),r[0].push([u.lng,u.lat])}var p=this.cartesian3Towgs84(a[0],this.sdk.viewer);r[0].push([p.lng,p.lat]);var h=0,d=turf.polygon(r),m=turf.pointOnFeature(d);switch(this.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:h=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(m.geometry.coordinates[0],m.geometry.coordinates[1]))||0,i=!1;break;case"2":case 2:i=!0}var f=[];if(i||0!=this.nodePoints.length)this.positionsH=a,setTimeout((function(){if(e.sdk.viewer){var t=L()(e.sdk.viewer.entities.values);e.getClampToHeight({lng:m.geometry.coordinates[0],lat:m.geometry.coordinates[1]},t).then((function(t){e.label&&(e.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],t])}))}}),100);else{for(var v=0;v<r[0].length;v++)f.push(r[0][v][0],r[0][v][1],this.height+h);this.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(f),this.label&&(this.label.position=[m.geometry.coordinates[0],m.geometry.coordinates[1],this.height+h])}return this.spreadState||(this.options.areaByMeter=this.computeArea(l),this.areaUnit=this.areaUnit),o}}}}],[{key:"create",value:function(t){for(var i=t.options.positions,n=[],o=0;o<i.length;o++)n.push(i[o].lng,i[o].lat);t.positions=Cesium.Cartesian3.fromDegreesArray(n);var s=t.computeStraightArrow(t.options.positions);if(0!=s.length){for(var a=[[]],r=0;r<s.length;r++){var l=t.cartesian3Towgs84(s[r],t.sdk.viewer);a[0].push([l.lng,l.lat])}var c=t.cartesian3Towgs84(s[0],t.sdk.viewer);a[0].push([c.lng,c.lat]);var u,p=turf.polygon(a),h=turf.pointOnFeature(p),d=0;switch(t.options.heightMode){case"0":case 0:u=!1;break;case"1":case 1:d=t.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(h.geometry.coordinates[0],h.geometry.coordinates[1]))||0,u=!1;break;case"2":case 2:u=!0}t.options.label.position||(t.options.label.position={lng:h.geometry.coordinates[0],lat:h.geometry.coordinates[1],alt:t.height+d});for(var m=[],f=0;f<a[0].length;f++)m.push(a[0][f][0],a[0][f][1],t.height+d);var v=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(u=!1,v=new Cesium.CustomColorMaterialSource({color:t.options.color})),t.options.label.ground=u,t.positionsH=Cesium.Cartesian3.fromDegreesArrayHeights(m),t.entity=t.sdk.viewer.entities.add({show:t.options.show,id:t.options.id,polygon:{hierarchy:u?new Cesium.PolygonHierarchy(s):new Cesium.PolygonHierarchy(t.positionsH),perPositionHeight:!u,material:v,zIndex:t.sdk._entityZIndex},polyline:{positions:[].concat(L()(t.positionsH),[t.positionsH[0],t.positionsH[1]]),width:t.options.line.width,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!u,arcType:u?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t);for(var g=[],y=0;y<s.length;y++)g.push(t.cartesian3Towgs84(s[y],t.sdk.viewer));switch(t.options.areaByMeter=t.computeArea(g),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id),t.spreadState=t.options.spreadState}}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:e.options.label.ground});case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=np(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n,s=function(){var e=o()(a.a.mark((function e(){var i,n,o,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=L()(t.sdk.viewer.entities.values),n=0;case 2:if(!(n<t.options.positions.length)){e.next=11;break}return e.next=5,t.getClampToHeight(t.options.positions[n],i);case 5:o=e.sent,s=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:n,position:Cesium.Cartesian3.fromDegrees(t.options.positions[n].lng,t.options.positions[n].lat,o),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.push(s);case 8:n++,e.next=2;break;case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t.removeAnimate(),YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];for(var r=[],l=0;l<t.options.positions.length;l++)r.push(t.options.positions[l].lng,t.options.positions[l].lat);var c=function(e,n){i&&(t.options.positions[i.index]=t.cartesian3Towgs84(n,t.sdk.viewer),t._elms.lng&&t._elms.lng[i.index]&&(t._elms.lng[i.index].innerHTML=t.options.positions[i.index].lng.toFixed(8)),t._elms.lat&&t._elms.lat[i.index]&&(t._elms.lat[i.index].innerHTML=t.options.positions[i.index].lat.toFixed(8)),t.renewPositions()),t.tip.setPosition(n,e.position?e.position.x:e.endPosition.x,e.position?e.position.y:e.endPosition.y)},u=function(e,o){c(e,o);var s=t.cartesian3Towgs84(o,t.sdk.viewer);if(i){var a=i.index,r=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:a,position:Cesium.Cartesian3.fromDegrees(t.options.positions[i.index].lng,t.options.positions[i.index].lat,s.alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.splice(i.index,0,r),i=null,t.tip.set_text("请选择一个顶点,右键取消")}else{var l=e.position;l||(l={x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2});var u=t.sdk.viewer.scene.pick(l);u&&u.id&&u.id.name&&"node-secondary-edit-point"===u.id.name&&(i=u.id,n=t.cartesian3Towgs84(u.id.position.getValue(),t.sdk.viewer),t.nodePoints.splice(u.id.index,1),t.sdk.viewer.entities.remove(u.id),t.tip.set_text("左键确认,右键取消"))}t.renewPositions()},p=function(){t.event.mouse_move((function(){})),t.event.mouse_left((function(){})),t.event.mouse_right((function(){})),t.event.gesture_pinck_start((function(){})),i&&(n?t.options.positions[i.index]=n:t.options.positions.pop(),t._elms.lng&&t._elms.lng[i.index]&&(t._elms.lng[i.index].innerHTML=t.options.positions[i.index].lng.toFixed(8)),t._elms.lat&&t._elms.lat[i.index]&&(t._elms.lat[i.index].innerHTML=t.options.positions[i.index].lat.toFixed(8))),t.heightMode=t.heightMode,t.previous=null};t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){var e=t.computeStraightArrow(t.options.positions);return new Cesium.PolygonHierarchy(e)}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){var e=t.computeStraightArrow(t.options.positions);return e.length>=3?[].concat(L()(e),[e[0],e[1]]):L()(e)}),!1),setTimeout((function(){t.event.mouse_left(u),t.event.mouse_right(p),t.event.mouse_move(c),t.event.gesture_pinck_start((function(e,i){var n=new Date;t.event.gesture_pinck_end((function(){var t=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t-n>=500?p():u(o,i)}))}));for(var e=[[]],i=[],n=0;n<t.positionsH.length;n++){var o=t.cartesian3Towgs84(t.positionsH[n],t.sdk.viewer);i.push(o),e[0].push([o.lng,o.lat])}var a=t.cartesian3Towgs84(t.positionsH[0],t.sdk.viewer);e[0].push([a.lng,a.lat]);var r=turf.polygon(e),l=turf.pointOnFeature(r),h=L()(t.sdk.viewer.entities.values);t.getClampToHeight({lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1]},h).then((function(e){t.label.position=[l.geometry.coordinates[0],l.geometry.coordinates[1],e]})),s()}),200)}}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}}]);var i,n,s,r}(jn);function rp(t){return'\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <DIV-cy-tabs id="circle-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">边线颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">边线宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ',"\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n ")}function lp(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function cp(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?lp(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):lp(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function up(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return pp(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?pp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function pp(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function hp(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var dp=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=hp(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"#ff000080",i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.radius=n.radius||0===n.radius?n.radius:10,i.options.show=!n.show&&!1!==n.show||n.show,i.options.center=n.center||{},i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",n.label=n.label||{},i._elms={},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.event=new X(i.sdk),i.nodePoints=[],i.operate={},i.Dialog={},i.sdk.addIncetance(i.options.id,i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"CircleObject"}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.center.alt},set:function(t){var e,i=this;!t||isNaN(Number(t))?this.options.center.alt=0:this.options.center.alt=Number(Number(t).toFixed(2)),e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.center.alt}))}},{key:"radius",get:function(){return this.options.radius},set:function(t){this.options.radius=t,this.renewPositions(),this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(this.positions),this.entity.polyline.positions=[].concat(L()(this.positions),[this.positions[0],this.positions[1]])}},{key:"center",get:function(){return this.options.center},set:function(t){var e=this;this.options.center=t,this.height=this.height,this._elms.lng&&this._elms.lng.forEach((function(t){t.innerHTML=e.options.center.lng})),this._elms.lat&&this._elms.lat.forEach((function(t){t.innerHTML=e.options.center.lat}))}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,0.5)"}});e._elms.color[i]=n}))}}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(this.options.line.color),this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.line.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,0,0,0.5)"}});e._elms.lineColor[i]=n})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){this.options.line.width=t||0===t?t:3,this.entity.polyline.width=this.options.line.width,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(e){e.value=t}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,!this.show||this.showView&&3!=this.showView?this.label.show=!1:this.label.show=t,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=up(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=up(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=up(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=up(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=32;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];var i=document.createElement("div");i.className="tr",i.innerHTML='\n <div class="td align-center">圆心坐标</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ';var o=i.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.center.lng.toFixed(8),o.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.center.lng.toFixed(8);var l=i.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.center.lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.center.lat.toFixed(8);var p=i.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),o.addEventListener("dblclick",(function(){o.innerHTML="",r.value=Number(n.options.center.lng.toFixed(8)),o.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.center.lng.toFixed(8)),o.innerHTML="",o.appendChild(a)})),r.addEventListener("input",(function(){n.options.center.lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.center.lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.center.lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.center.lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.center.lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.center.lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(i)},t.next=7,new Ki(this.sdk,this.options,{title:"圆属性",left:"180px",top:"100px",confirmCallBack:function(t){m.name=m.name.trim(),m.name||(m.name="未命名对象"),m.options.label.position={lng:m.label.position[0],lat:m.label.position[1],alt:m.label.position[2]},m.originalOptions=m.deepCopyObj(m.options),m._DialogObject.close(),m.Dialog.confirmCallBack&&m.Dialog.confirmCallBack(m.originalOptions),be(m.sdk,m.options.id),re(m.sdk,m.options.id)},resetCallBack:function(){m.reset(),m.Dialog.resetCallBack&&m.Dialog.resetCallBack()},removeCallBack:function(){m.Dialog.removeCallBack&&m.Dialog.removeCallBack()},closeCallBack:function(){m.reset(),m.positionEditing=!1,m.Dialog.closeCallBack&&m.Dialog.closeCallBack()},showCallBack:function(t){m.options.show=t,m.originalOptions.show=t,m.show=t,m.Dialog.showCallBack&&m.Dialog.showCallBack()},translationalCallBack:function(){m.positionEditing=!m.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(m,(function(){o()}))}});case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" circle",(s=document.createElement("div")).innerHTML=rp(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("circle-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){m.color=t},clear:function(){m.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.lineColor=t},clear:function(){m.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelColor=t},clear:function(){m.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelLineColor=t},clear:function(){m.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelBackgroundColorStart=t},clear:function(){m.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelBackgroundColorEnd=t},clear:function(){m.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],setTimeout((function(){m.attributeLink=m.options.attribute.link.content,m.attributeVr=m.options.attribute.vr.content,m.cameraSelect&&m.cameraSelect(),m.goodsSelect&&m.goodsSelect();var t=m.attributeSelect,i=m._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(i){var n=Y(i,".attribute-select");n.legp_search(t);for(var s=m._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],a=0;a<t.length;a++)if(t[a].key===m.options.attributeType){s.value=t[a].value,n.legp_searchActive(t[a].value);break}s.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===s.value){m.attributeType=t[e].key;break}}))}var r=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],l=Y(m._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(l){l.legp_search(r);var c=m._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];c.value=m.options["area-unit"];for(var u=0;u<r.length;u++)if(r[u].value===c.value){l.legp_searchActive(r[u].value);break}c.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===c.value){m.areaUnit=r[t].value;break}}))}var p=m._DialogObject._element.content.getElementsByClassName("height-box")[0],h=p.getElementsByClassName("height")[0],d=m._DialogObject._element.content.getElementsByClassName("height-confirm")[0];h.value=10,2==m.heightMode?(p&&(p.className="input-number input-number-unit-1 height-box disabled"),d&&d.setAttribute("disabled","disabled")):(p&&(p.className="input-number input-number-unit-1 height-box"),d&&d.removeAttribute("disabled"));var f=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],v=Y(m._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode");if(v){v.legp_search(f);for(var g=m._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],y=0;y<f.length;y++)if(f[y].key==m.heightMode){g.value=f[y].value,v.legp_searchActive(f[y].value);break}g.addEventListener("input",(function(){for(var t=0;t<f.length;t++)if(f[t].value===g.value){m.heightMode=f[t].key;break}})),h.addEventListener("input",(function(){m.heightMode})),m._elms.height=h,m._elms.heightBox=p,m._elms.heightMode=g,m._elms.heightConfirm=d,m._elms.heightModeObject=v,d.addEventListener("click",(function(){m.operate.positionEditing?(m.positionEditing=!1,m.height=m.height+Number(h.value)):(e.closeNodeEdit(m),m.heightMode=m.heightMode,setTimeout((function(){m.height=m.height+Number(h.value)}),100))}))}var b=Rn(),C=Y(m._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(C){C.legp_search(b);var w=m._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];w.value=b[m.labelFontFamily].value;for(var k=0;k<b.length;k++)if(b[k].value==w.value){C.legp_searchActive(b[k].value);break}w.addEventListener("input",(function(){for(var t=0;t<b.length;t++)if(b[t].value===w.value){m.labelFontFamily=b[t].key;break}})),m._elms.labelFontFamily=[w]}o()}),0),t.next=33;break;case 32:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 33:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:function(){var t=this;if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.radius=this.originalOptions.radius,this.color=this.originalOptions.color,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelLineColor=this.originalOptions.label.lineColor,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelColor=this.originalOptions.label.color,this.lineWidth=this.originalOptions.line.width,this.lineLength=this.originalOptions.line.length,this.lineColor=this.originalOptions.line.color,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect(),this.heightMode=this.originalOptions.heightMode,this._elms.lng&&this._elms.lng.forEach((function(e){e.innerHTML=t.options.center.lng})),this._elms.lat&&this._elms.lat.forEach((function(e){e.innerHTML=t.options.center.lat})),this._elms.alt&&this._elms.alt.forEach((function(e){e.innerHTML=t.options.center.alt}));for(var e=0;e<this.nodePoints.length;e++)this.sdk.viewer.entities.remove(this.nodePoints[e]);this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy()}}},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=E.length>0&&void 0!==E[0]?E[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=cp({},this.options.position):this.options.positions?l=cp({},this.options.positions[0]):this.options.center?l=cp({},this.options.center):this.options.start?l=cp({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=60;break;case 23:c=this.entity.polygon.hierarchy.getValue(Cesium.JulianDate.now()).positions,u=[],p=0,h=this.cartesian3Towgs84(c[0],this.sdk.viewer),d=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,0),m=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,1e7),f=Cesium.Cartesian3.subtract(m,d,new Cesium.Cartesian3),v=Cesium.Cartesian3.normalize(f,f),g=new Cesium.Ray(d,v),y={},b=this.sdk.viewer.scene.drillPickFromRay(g),C=0;case 35:if(!(C<b.length)){t.next=42;break}if(!b[C].position){t.next=39;break}return y=b[C],t.abrupt("break",42);case 39:C++,t.next=35;break;case 42:if(!y||!y.position){t.next=46;break}p=this.cartesian3Towgs84(y.position,this.sdk.viewer).alt,t.next=55;break;case 46:return t.prev=46,t.next=49,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.terrainProvider,[Cesium.Cartographic.fromDegrees(h.lng,h.lat)]);case 49:w=t.sent,p=w[0].height,t.next=55;break;case 53:t.prev=53,t.t0=t.catch(46);case 55:for(k=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,p),u.push(k.x,k.y,k.z),x=1;x<c.length;x++)u.push(c[x].x,c[x].y,c[x].z);_=Cesium.BoundingSphere.fromVertices(u),this.sdk.viewer.camera.flyToBoundingSphere(_,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 60:case"end":return t.stop()}}),t,this,[[46,53]])}))),function(){return n.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity){var i=this;this.operate.positionEditing=t,this.event&&this.event.destroy(),this.event=new X(this.sdk),this.previous={positions:cp({},this.options.center)},!0===t?(this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1,this.renewPositions(),this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);n.alt=e.options.center.alt;var o=0,s=!1;switch(e.options.heightMode){case"0":case 0:s=!1;break;case"1":case 1:o=e.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(n.lng,n.lat))||0,s=!1;break;case"2":case 2:s=!0}var a=e.createCircle(n,e.options.radius),r=[];if(s){e.positions=Cesium.Cartesian3.fromDegreesArray(a);var l=L()(e.sdk.viewer.entities.values);e.getClampToHeight({lng:n.lng,lat:n.lat},l).then((function(t){e.label&&(e.label.position=[n.lng,n.lat,t])}))}else{for(var c=0;c<a.length;c+=2)r.push(a[c],a[c+1],n.alt+o);e.positions=Cesium.Cartesian3.fromDegreesArrayHeights(r),e.label&&(e.label.position=[n.lng,n.lat,n.alt+o])}e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.center.lng=Number(n.lng.toFixed(8)),e.options.center.lat=Number(n.lat.toFixed(8)),e.center=e.options.center,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.previous={positions:cp({},e.options.center)},e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.center.lng=Number(t.lng.toFixed(8)),e.options.center.lat=Number(t.lat.toFixed(8)),e.center=e.options.center,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.previous={positions:cp({},e.options.center)},e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positions)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positions),[i.positions[0],i.positions[1]])}),!1)):(this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.destroy()),this.tip&&this.tip.destroy(),this.renewPositions(),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positions)}),!0),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positions),[i.positions[0],i.positions[1]])}),!0))}}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=document.getElementById(e.domid),n=Cesium.Cartesian3.fromDegrees(this.options.center.lng,this.options.center.lat);this.sdk.viewer.scene.postRender.addEventListener((function(o){if("block"===i.style.display||""===i.style.display){var s=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);s&&(i.style.left=(s.x+e.x).toFixed(0)+"px",i.style.top=(s.y+e.y).toFixed(0)+"px")}}))}},{key:"renewPositions",value:function(t){var e=this;if(!this._error){var i=!1;t||(t=this.options.center);var n=0;switch(this.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:n=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(t.lng,t.lat))||0,i=!1;break;case"2":case 2:i=!0}var o=this.createCircle(t,this.options.radius),s=[];if(i)this.positions=Cesium.Cartesian3.fromDegreesArray(o),setTimeout((function(){var i=L()(e.sdk.viewer.entities.values);e.getClampToHeight({lng:t.lng,lat:t.lat},i).then((function(i){e.label&&(e.label.position=[t.lng,t.lat,i])}))}),100);else{for(var a=0;a<o.length;a+=2)s.push(o[a],o[a+1],t.alt+n);this.positions=Cesium.Cartesian3.fromDegreesArrayHeights(s),this.label&&(this.label.position=[t.lng,t.lat,t.alt+n])}return this.options.areaByMeter=Number((Cesium.Math.PI*this.options.radius*this.options.radius).toFixed(2)),this.areaUnit=this.areaUnit,o}}}],[{key:"create",value:function(t){var i,n=t.createCircle(t.options.center,t.options.radius),o=0;switch(t.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:o=t.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(t.options.center.lng,t.options.center.lat))||0,i=!1;break;case"2":case 2:i=!0}t.options.label.position||(t.options.label.position={lng:t.options.center.lng,lat:t.options.center.lat,alt:t.options.center.alt+o});var s=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(i=!1,s=new Cesium.CustomColorMaterialSource({color:t.options.color}));for(var a,r=[],l=0;l<n.length;l+=2)r.push(n[l],n[l+1],t.options.center.alt+o);switch(t.options.label.ground=i,t.positions=Cesium.Cartesian3.fromDegreesArrayHeights(r),a=Cesium.Cartesian3.fromDegreesArray(n),t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,polygon:{hierarchy:i?new Cesium.PolygonHierarchy(a):new Cesium.PolygonHierarchy(t.positions),perPositionHeight:!i,material:s,zIndex:t.sdk._entityZIndex},polyline:{positions:[].concat(L()(t.positions),[t.positions[0],t.positions[1]]),width:t.options.line.width,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!i,arcType:i?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t),t.options.areaByMeter=Number((Cesium.Math.PI*t.options.radius*t.options.radius).toFixed(2)),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:e.options.label.ground});case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"nodeEdit",value:function(t){if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus());else{var e=function(){var e=o()(a.a.mark((function e(){var i,n,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=L()(t.sdk.viewer.entities.values),e.next=3,t.getClampToHeight(t.options.center,i);case 3:n=e.sent,o=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",position:Cesium.Cartesian3.fromDegrees(t.options.center.lng,t.options.center.lat,n),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.push(o);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t.event&&t.event.destroy(),t.event=new X(t.sdk),YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("左键确认,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];var i,n=[],s=cp({},t.options.center),r=null;n=t.createCircle(t.options.center,t.options.radius),t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(n))}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegreesArray(n)}),!1),setTimeout((function(){var e=L()(t.sdk.viewer.entities.values);t.getClampToHeight({lng:t.options.center.lng,lat:t.options.center.lat},e).then((function(e){t.label.position=[t.options.center.lng,t.options.center.lat,e]}))}),50),setTimeout((function(){t.event.mouse_left((function(e,n){i&&(t.sdk.viewer.entities.remove(i),i=null),s=t.cartesian3Towgs84(n,t.viewer);var o=t.computeDistance2([t.options.center,s]);t.radius=o,YJ.Measure.SetMeasureStatus(!1),t.event.destroy(),t.tip.destroy(),t.heightMode=t.heightMode})),t.event.mouse_right((function(e,n){i&&(t.sdk.viewer.entities.remove(i),i=null),YJ.Measure.SetMeasureStatus(!1),t.event.destroy(),t.tip.destroy(),t.heightMode=t.heightMode})),t.event.mouse_move((function(e,o){i&&(i.show=!0),s=t.cartesian3Towgs84(o,t.viewer),r=t.computeDistance2([t.options.center,s]),n=t.createCircle(t.options.center,r),t.tip.setPosition(o,e.endPosition.x,e.endPosition.y)})),e()}),200),i=t.sdk.viewer.entities.add(new Cesium.Entity({show:!1,position:new Cesium.CallbackProperty((function(e){if(s){var i=t.computeMidpoint(t.options.center,s);return Cesium.Cartesian3.fromDegrees(i.lng,i.lat,s.alt)}return Cesium.Cartesian3()}),!1),label:{text:new Cesium.CallbackProperty((function(t){return r>1e3?"半径:"+(r/1e3).toFixed(2)+" 公里":"半径:"+r+" 米"}),!1),font:"20px Microsoft YaHei",distanceDisplayCondition:1e7,scale:1,horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,fillColor:Cesium.Color.fromCssColorString("#f5ce0a"),style:Cesium.LabelStyle.FILL_AND_OUTLINE},polyline:{positions:new Cesium.CallbackProperty((function(e){return Cesium.Cartesian3.fromDegreesArray([t.options.center.lng,t.options.center.lat,s.lng,s.lat])}),!1),width:2,material:Cesium.Color.fromCssColorString("#c1c505").withAlpha(.5),clampToGround:!0,zIndex:99999999}})),t.nodePoints.push(i)}}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=up(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}}]);var i,n,s,r}(jn);function mp(t){return'\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <DIV-cy-tabs id="circle-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">边线颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">边线宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ',"\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n ")}function fp(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function vp(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?fp(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fp(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function gp(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return yp(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function yp(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function bp(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Cp=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=bp(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"rgba(255, 0, 0, 0.5)",i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.semiMinorAxis=n.semiMinorAxis||0===n.semiMinorAxis?n.semiMinorAxis:10,i.options.semiMajorAxis=n.semiMajorAxis||0===n.semiMajorAxis?n.semiMajorAxis:20,i.options.show=!n.show&&!1!==n.show||n.show,i.options.center=n.center||{},i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",n.label=n.label||{},i._elms={},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.event=new X(i.sdk),i.nodePoints=[],i.operate={},i.Dialog={},i.sdk.addIncetance(i.options.id,i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"EllipseObject"}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.center.alt},set:function(t){var e,i=this;this.entity.polygon.hierarchy=[],!t||isNaN(Number(t))?this.options.center.alt=0:this.options.center.alt=Number(Number(t).toFixed(2)),this.previous=null,e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.center.alt}))}},{key:"semiMinorAxis",get:function(){return this.options.semiMinorAxis},set:function(t){this.options.semiMinorAxis=t,this.height=this.height}},{key:"semiMajorAxis",get:function(){return this.options.semiMajorAxis},set:function(t){this.options.semiMajorAxis=t,this.height=this.height}},{key:"center",get:function(){return this.options.center},set:function(t){var e=this;this.options.center=t,this.height=this.height,this._elms.lng&&this._elms.lng.forEach((function(t){t.innerHTML=e.options.center.lng})),this._elms.lat&&this._elms.lat.forEach((function(t){t.innerHTML=e.options.center.lat}))}},{key:"bearing",get:function(){return this.options.bearing},set:function(t){this.options.bearing=t,this.height=this.height}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this.entity.polyline.width=this.lineWidth,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,0.5)"}});e._elms.color[i]=n}))}}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(this.options.line.color),this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.line.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,0,0,0.5)"}});e._elms.lineColor[i]=n})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){var e=this;this.options.line.width=t||0===t?t:3,this.entity.polyline.width=this.options.line.width,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(t){t.value=e.options.line.width}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=gp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=gp(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=gp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=gp(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=32;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];var i=document.createElement("div");i.className="tr",i.innerHTML='\n <div class="td align-center">圆心坐标</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ';var o=i.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.center.lng.toFixed(8),o.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.center.lng.toFixed(8);var l=i.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.center.lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.center.lat.toFixed(8);var p=i.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),o.addEventListener("dblclick",(function(){o.innerHTML="",r.value=Number(n.options.center.lng.toFixed(8)),o.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.center.lng.toFixed(8)),o.innerHTML="",o.appendChild(a)})),r.addEventListener("input",(function(){n.options.center.lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.center.lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.center.lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.center.lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.center.lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.center.lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(i)},t.next=7,new Ki(this.sdk,this.options,{title:"椭圆属性",left:"180px",top:"100px",confirmCallBack:function(t){m.name=m.name.trim(),m.name||(m.name="未命名对象"),m.options.label.position={lng:m.label.position[0],lat:m.label.position[1],alt:m.label.position[2]},m.originalOptions=m.deepCopyObj(m.options),m._DialogObject.close(),m.Dialog.confirmCallBack&&m.Dialog.confirmCallBack(m.originalOptions),be(m.sdk,m.options.id),re(m.sdk,m.options.id)},resetCallBack:function(){m.reset(),m.Dialog.resetCallBack&&m.Dialog.resetCallBack()},removeCallBack:function(){m.Dialog.removeCallBack&&m.Dialog.removeCallBack()},closeCallBack:function(){m.reset(),m.previous=null,m.positionEditing=!1,m.Dialog.closeCallBack&&m.Dialog.closeCallBack()},showCallBack:function(t){m.options.show=t,m.originalOptions.show=t,m.show=t,m.Dialog.showCallBack&&m.Dialog.showCallBack()},translationalCallBack:function(){m.positionEditing=!m.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(m,(function(){o()}))}});case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" circle",(s=document.createElement("div")).innerHTML=mp(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("circle-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){m.color=t},clear:function(){m.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.lineColor=t},clear:function(){m.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelColor=t},clear:function(){m.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelLineColor=t},clear:function(){m.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelBackgroundColorStart=t},clear:function(){m.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){m.labelBackgroundColorEnd=t},clear:function(){m.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],setTimeout((function(){m.attributeLink=m.options.attribute.link.content,m.attributeVr=m.options.attribute.vr.content,m.cameraSelect&&m.cameraSelect(),m.goodsSelect&&m.goodsSelect();var t=m.attributeSelect,i=m._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(i){var n=Y(i,".attribute-select");n.legp_search(t);for(var s=m._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],a=0;a<t.length;a++)if(t[a].key===m.options.attributeType){s.value=t[a].value,n.legp_searchActive(t[a].value);break}s.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===s.value){m.attributeType=t[e].key;break}}))}var r=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],l=Y(m._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(l){l.legp_search(r);var c=m._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];c.value=m.options["area-unit"];for(var u=0;u<r.length;u++)if(r[u].value===c.value){l.legp_searchActive(r[u].value);break}c.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===c.value){m.areaUnit=r[t].value;break}}))}var p=m._DialogObject._element.content.getElementsByClassName("height-box")[0],h=p.getElementsByClassName("height")[0],d=m._DialogObject._element.content.getElementsByClassName("height-confirm")[0];h.value=10,2==m.heightMode?(p&&(p.className="input-number input-number-unit-1 height-box disabled"),d&&d.setAttribute("disabled","disabled")):(p&&(p.className="input-number input-number-unit-1 height-box"),d&&d.removeAttribute("disabled"));var f=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],v=Y(m._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode");if(v){v.legp_search(f);for(var g=m._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],y=0;y<f.length;y++)if(f[y].key==m.heightMode){g.value=f[y].value,v.legp_searchActive(f[y].value);break}g.addEventListener("input",(function(){for(var t=0;t<f.length;t++)if(f[t].value===g.value){m.heightMode=f[t].key;break}})),h.addEventListener("input",(function(){m.heightMode})),m._elms.height=h,m._elms.heightBox=p,m._elms.heightMode=g,m._elms.heightConfirm=d,m._elms.heightModeObject=v,d.addEventListener("click",(function(){m.operate.positionEditing?(m.positionEditing=!1,m.height=m.height+Number(h.value)):(e.closeNodeEdit(m),setTimeout((function(){m.height=m.height+Number(h.value)}),100))}))}var b=Rn(),C=Y(m._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(C){C.legp_search(b);var w=m._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];w.value=b[m.labelFontFamily].value;for(var k=0;k<b.length;k++)if(b[k].value==w.value){C.legp_searchActive(b[k].value);break}w.addEventListener("input",(function(){for(var t=0;t<b.length;t++)if(b[t].value===w.value){m.labelFontFamily=b[t].key;break}})),m._elms.labelFontFamily=[w]}o()}),0),t.next=33;break;case 32:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 33:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:function(){var t=this;if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.radius=this.originalOptions.radius,this.semiMinorAxis=this.originalOptions.semiMinorAxis,this.semiMajorAxis=this.originalOptions.semiMajorAxis,this.bearing=this.originalOptions.bearing,this.color=this.originalOptions.color,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelColor=this.originalOptions.label.color,this.lineWidth=this.originalOptions.line.width,this.lineLength=this.originalOptions.line.length,this.lineColor=this.originalOptions.line.color,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect(),this.heightMode=this.originalOptions.heightMode,this._elms.lng&&this._elms.lng.forEach((function(e){e.innerHTML=t.options.center.lng})),this._elms.lat&&this._elms.lat.forEach((function(e){e.innerHTML=t.options.center.lat})),this._elms.alt&&this._elms.alt.forEach((function(e){e.innerHTML=t.options.center.alt}));for(var e=0;e<this.nodePoints.length;e++)this.sdk.viewer.entities.remove(this.nodePoints[e]);this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy()}}},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=E.length>0&&void 0!==E[0]?E[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!this.options.customView){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=vp({},this.options.position):this.options.positions?l=vp({},this.options.positions[0]):this.options.center?l=vp({},this.options.center):this.options.start?l=vp({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=60;break;case 23:c=this.entity.polyline.positions.getValue(),u=[],p=0,h=this.cartesian3Towgs84(c[0],this.sdk.viewer),d=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,0),m=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,1e7),f=Cesium.Cartesian3.subtract(m,d,new Cesium.Cartesian3),v=Cesium.Cartesian3.normalize(f,f),g=new Cesium.Ray(d,v),y={},b=this.sdk.viewer.scene.drillPickFromRay(g),C=0;case 35:if(!(C<b.length)){t.next=42;break}if(!b[C].position){t.next=39;break}return y=b[C],t.abrupt("break",42);case 39:C++,t.next=35;break;case 42:if(!y||!y.position){t.next=46;break}p=this.cartesian3Towgs84(y.position,this.sdk.viewer).alt,t.next=55;break;case 46:return t.prev=46,t.next=49,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.terrainProvider,[Cesium.Cartographic.fromDegrees(h.lng,h.lat)]);case 49:w=t.sent,p=w[0].height,t.next=55;break;case 53:t.prev=53,t.t0=t.catch(46);case 55:for(k=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,p),u.push(k.x,k.y,k.z),x=1;x<c.length;x++)u.push(c[x].x,c[x].y,c[x].z);_=Cesium.BoundingSphere.fromVertices(u),this.sdk.viewer.camera.flyToBoundingSphere(_,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 60:case"end":return t.stop()}}),t,this,[[46,53]])}))),function(){return n.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity){var i=this;if(this.operate.positionEditing=t,this.event&&this.event.destroy(),this.event=new X(this.sdk),!0===t){this.previous={center:this.deepCopyObj(this.options.center)},this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1,this.renewPositions();this.createEllipse(this.options.center,{bearing:this.options.bearing,semiMinorAxis:this.options.semiMinorAxis,semiMajorAxis:this.options.semiMajorAxis}),this.event.mouse_move((function(t,i){[];var n=e.cartesian3Towgs84(i,e.sdk.viewer);n.alt=e.options.center.alt,e.renewPositions(n),e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){[];var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.center.lng=Number(n.lng.toFixed(8)),e.options.center.lat=Number(n.lat.toFixed(8)),e.center=e.options.center,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.previous={center:e.deepCopyObj(e.options.center)},e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{[];var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.center.lng=t.lng,e.options.center.lat=t.lat,e.center=e.options.center,e.createEllipse(e.options.center,{bearing:e.options.bearing,semiMinorAxis:e.options.semiMinorAxis,semiMajorAxis:e.options.semiMajorAxis}),e.label.position=[t.lng,t.lat],e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.previous={center:e.deepCopyObj(e.options.center)},e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positions)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positions),[i.positions[0],i.positions[1]])}),!1)}else this.previous||(this.previous={center:this.deepCopyObj(this.options.center)}),this.options.center=this.deepCopyObj(this.previous.center),this.tip&&this.tip.destroy(),this.renewPositions(),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positions)}),!0),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positions),[i.positions[0],i.positions[1]])}),!0)}}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=document.getElementById(e.domid),n=Cesium.Cartesian3.fromDegrees(this.options.center.lng,this.options.center.lat);this.sdk.viewer.scene.postRender.addEventListener((function(o){if("block"===i.style.display||""===i.style.display){var s=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);s&&(i.style.left=(s.x+e.x).toFixed(0)+"px",i.style.top=(s.y+e.y).toFixed(0)+"px")}}))}},{key:"renewPositions",value:function(t){var e=this;if(!this._error){var i=!1;t||(t=this.options.center);var n=0;switch(this.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:n=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(t.lng,t.lat))||0,i=!1;break;case"2":case 2:i=!0}return this.positions=this.createEllipse(t,{bearing:this.options.bearing,semiMinorAxis:this.options.semiMinorAxis,semiMajorAxis:this.options.semiMajorAxis,height:t.alt+n}),i?setTimeout((function(){e.getClampToHeight({lng:t.lng,lat:t.lat}).then((function(i){e.label&&(e.label.position=[t.lng,t.lat,i])}))}),100):this.label&&(this.label.position=[t.lng,t.lat,t.alt+n]),this.options.areaByMeter=Number((Cesium.Math.PI*this.options.semiMinorAxis*this.options.semiMajorAxis).toFixed(2)),this.areaUnit=this.areaUnit,this.positions}}}],[{key:"create",value:function(t){var i,n=0;switch(t.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:n=t.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(t.options.center.lng,t.options.center.lat))||0,i=!1;break;case"2":case 2:i=!0}t.options.label.position||(t.options.label.position={lng:t.options.center.lng,lat:t.options.center.lat,alt:t.options.center.alt+n});var o=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(i=!1,o=new Cesium.CustomColorMaterialSource({color:t.options.color})),t.options.label.ground=i;var s=t.createEllipse(t.options.center,{bearing:t.options.bearing,semiMinorAxis:t.options.semiMinorAxis,semiMajorAxis:t.options.semiMajorAxis,height:t.options.center.alt+n});switch(t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,polygon:{hierarchy:new Cesium.PolygonHierarchy(s),perPositionHeight:!i,material:o,zIndex:t.sdk._entityZIndex},polyline:{positions:[].concat(L()(s),[s[0],s[1]]),width:t.options.line.width,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!i,arcType:i?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t),t.options.areaByMeter=Number((Cesium.Math.PI*t.options.semiMinorAxis*t.options.semiMajorAxis).toFixed(2)),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:e.options.label.ground});case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"nodeEdit",value:function(t){if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus());else{var e,i=function(t,e){var i=Math.PI/180,n=t.y*i,o=e.y*i,s=t.x*i,a=e.x*i,r=Math.sin(a-s)*Math.cos(o),l=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(a-s),c=Math.atan2(r,l)%(2*Math.PI);return 450-(180*c/Math.PI<0?360+180*c/Math.PI:180*c/Math.PI)},n=function(){var e=o()(a.a.mark((function e(i,n){var o,s,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.cartesian3Towgs84(i,t.sdk.viewer),e.next=3,t.getClampToHeight(o,d);case 3:s=e.sent,r=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",type:n,position:Cesium.Cartesian3.fromDegrees(o.lng,o.lat,s),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),t.nodePoints.push(r);case 6:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}();t.event&&t.event.destroy(),t.event=new X(t.sdk),YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个编辑点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];var s=Cesium.Cartesian3.fromDegrees(t.center.lng,t.center.lat),r=t.options.semiMinorAxis,l=t.options.semiMajorAxis,c=t.options.bearing,u=t.createEllipse(t.options.center,{bearing:t.options.bearing,semiMinorAxis:t.options.semiMinorAxis,semiMajorAxis:t.options.semiMajorAxis});t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(u)}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(u),[u[0],u[1]])}),!1);var p=t.entity.polyline.positions.getValue(),h=p.length,d=L()(t.sdk.viewer.entities.values);setTimeout((function(){t.event.mouse_left((function(n,o){if(e)t.options.semiMinorAxis=r,t.options.semiMajorAxis=l,t.options.bearing=c,t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null,e=null,YJ.Measure.SetMeasureStatus(!1),t.heightMode=t.heightMode;else{var a=t.sdk.viewer.scene.pick(n.position);if(a&&a.id&&a.id.name&&"node-secondary-edit-point"===a.id.name&&("semiMinorAxis"===a.id._type||"semiMajorAxis"===a.id._type)){t.tip.set_text("左键确认,右键取消"),e=a.id;for(var p=0;p<t.nodePoints.length;p++)t.sdk.viewer.entities.remove(t.nodePoints[p]);t.nodePoints=[];var h=o,d=t.cartesian3Towgs84(h,t.sdk.viewer);s=Cesium.Cartesian3.fromDegrees(t.center.lng,t.center.lat,d.alt);var m=Cesium.Cartesian3.distance(s,h),f={x:t.center.lng,y:t.center.lat},v={x:d.lng,y:d.lat};c=i(f,v),"semiMinorAxis"===e._type&&(r=m,c+=90),"semiMajorAxis"===e._type&&(l=m),u=t.createEllipse(t.center,{bearing:c,semiMinorAxis:r,semiMajorAxis:l})}}})),t.event.mouse_move((function(n,o){if(e){var a=o,p=t.cartesian3Towgs84(o,t.sdk.viewer);s=Cesium.Cartesian3.fromDegrees(t.center.lng,t.center.lat,p.alt);var h=Cesium.Cartesian3.distance(s,a),d={x:t.center.lng,y:t.center.lat},m={x:p.lng,y:p.lat};c=i(d,m),"semiMinorAxis"===e._type&&(r=h,c+=90),"semiMajorAxis"===e._type&&(l=h),u=t.createEllipse(t.center,{bearing:c,semiMinorAxis:r,semiMajorAxis:l})}t.tip.setPosition(o,n.endPosition.x,n.endPosition.y)})),t.event.mouse_right((function(e,i){for(var n=0;n<t.nodePoints.length;n++)t.sdk.viewer.entities.remove(t.nodePoints[n]);t.nodePoints=[],t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null,t.heightMode=t.heightMode})),t.getClampToHeight({lng:t.center.lng,lat:t.center.lat},d).then((function(e){t.label&&(t.label.position=[t.center.lng,t.center.lat,e])})),n(p[0],"semiMajorAxis"),n(p[(h-2)/4],"semiMinorAxis"),n(p[(h-2)/2],"semiMajorAxis"),n(p[h-2-(h-2)/4],"semiMinorAxis")}),200)}}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=gp(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}}]);var i,n,s,r}(jn);function wp(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">拉伸高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="999999999" @model="extrudedHeight">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col material-box">\n <span class="label">材质样式</span>\n <div class="material"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">墙体闭合</span>\n <input class="btn-switch" type="checkbox" @model="noseToTail">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="radar-scan-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function kp(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return _p(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_p(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function _p(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var Ep=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[],r=function(){};if(!e[o]||!e[o].attributes)return 1;var l,c=kp(e[o].attributes);try{var u=function(){var c=l.value;switch(c.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[c.value]=e.target.checked})),e[o].checked=t[c.value]):(n.push((function(e){var i=e.target.value;if("number"==e.target.type){if("."!=e.data&&("-"!=e.data||e.target.value)){var n=Number(i);e.target.max&&n>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&n<Number(e.target.min)&&(i=Number(e.target.min)),t[c.value]=i}}else t[c.value]=i})),r=function(e){var i=e.target.value;(e.target.value||"undefined"!==e.target.dataset.null&&""!==e.target.dataset.null&&!Boolean(e.target.dataset.null))&&(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),e.target.dataset.min&&i<Number(e.target.dataset.min)&&(i=Number(e.target.dataset.min))),t[c.value]=i},"IMG"==e[o].nodeName?e[o].src=t[c.value]:e[o].value=t[c.value]),i.element[c.value]?i.element[c.value].push(e[o]):i.element[c.value]=[e[o]],a.push(c.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t[c.value]&&t[c.value](e)})),a.push(c.name);break;case"@change":s=!0,n.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[c.value]&&t[c.value](e,i)}))}};for(c.s();!(l=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}for(var p=0;p<a.length;p++)e[o].attributes.removeNamedItem(a[p]);if(s){var h="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(h="change"),e[o].addEventListener(h,(function(t){for(var e=0;e<n.length;e++)n[e](t)})),e[o].addEventListener("blur",(function(t){r(t)}))}},o=0;o<e.length;o++)n()}}])}();C()(Ep,"event",{});var Sp=new Ep;function Dp(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Mp(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Mp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Mp(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Pp(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Op=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=Pp(this,e,[t,i])).options.color=i.color||"#ff0000",n.options.extrudedHeight=i.extrudedHeight||2.4,n.options.positions=i.positions,n.options.material=Number(i.material)||0===Number(i.material)?Number(i.material):3,n.options.duration=i.duration||0===i.duration?i.duration:1e3,n.options.show=!i.show&&!1!==i.show||i.show,n.options["nose-to-tail"]=i["nose-to-tail"]||!1,n.entity,n.nodePoints=[],i.label=i.label||{},n.options.label={text:n.options.name,show:i.label.show||!1,position:i.label.position,fontSize:i.label.fontSize||0===i.label.fontSize?i.label.fontSize:20,fontFamily:i.label.fontFamily?i.label.fontFamily:0,color:i.label.color||"#ffffff",lineWidth:i.label.lineWidth||0===i.label.lineWidth?i.label.lineWidth:4,pixelOffset:i.label.pixelOffset||0===i.label.pixelOffset?i.label.pixelOffset:20,backgroundColor:i.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:i.label.lineColor||"#00ffff80",scaleByDistance:i.label.scaleByDistance||!1,near:i.label.near||0===i.label.near?i.label.near:2e3,far:i.label.far||0===i.label.far?i.label.far:1e5},n.options.instruct=i.instruct||"",n.options.operatingPoint=i.operatingPoint||"",n.options.attribute=i.attribute||{},n.options.attribute.vr=n.options.attribute.vr||{},n.options.attribute.vr.content=n.options.attribute.vr.content||[],n.options.attribute.link=n.options.attribute.link||{},n.options.attribute.link.content=n.options.attribute.link.content||[],n.options.attribute.camera=n.options.attribute.camera||{},n.options.attribute.camera=n.options.attribute.camera.content||[],n.options.attribute.ISC=n.options.attribute.ISC||{},n.options.attribute.ISC.content=n.options.attribute.ISC.content||[],n.options.attribute.goods=n.options.attribute.goods||{},n.options.attribute.goods.content=n.options.attribute.goods.content||[],n.options.attributeType=i.attributeType||"richText",n.Dialog=o,n._elms={},!n.options.positions||n.options.positions.length<2?(n._error="最少需要两个坐标!",console.warn(n._error),window.ELEMENT&&window.ELEMENT.Message({message:n._error,type:"warning",duration:1500})):(n.sdk.addIncetance(n.options.id,n),e.create(n)),n}return Xi()(e,t),_()(e,[{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t||"#ff0000",this.entity.polylineVolume.material=this.getMaterial(),this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[i]=n}))}},{key:"material",get:function(){return this.options.material},set:function(t){var e=this;this.options.material=Number(t)||0===Number(t)?Number(t):3,this.entity.polylineVolume.material=this.getMaterial(),this._elms.material&&this._elms.material.forEach((function(t){t.value=e.options.material}))}},{key:"noseToTail",get:function(){return this.options["nose-to-tail"]},set:function(t){this.options["nose-to-tail"]=t;for(var e=this.options.positions,i=[],n=0;n<e.length;n++)i.push(e[n].lng,e[n].lat,e[n].alt);t&&i.push(e[0].lng,e[0].lat,e[0].alt),this.entity.polylineVolume.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i),this.material=this.material,this._elms.noseToTail&&this._elms.noseToTail.forEach((function(e){e.checked=t}))}},{key:"extrudedHeight",get:function(){return this.options.extrudedHeight},set:function(t){this.options.extrudedHeight=t,this.label.position=[this.options.positions[0].lng,this.options.positions[0].lat,this.options.positions[0].alt+this.options.extrudedHeight],this.entity.polylineVolume.shape=[{x:-1e-7,y:-this.options.extrudedHeight/2},{x:1e-7,y:-this.options.extrudedHeight/2},{x:1e-7,y:this.options.extrudedHeight/2},{x:-1e-7,y:this.options.extrudedHeight/2}],this._elms.extrudedHeight&&this._elms.extrudedHeight.forEach((function(e){e.value=t}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Dp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Dp(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeISC",get:function(){return this.options.attribute.ISC.content},set:function(t){this.options.attribute.ISC.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Dp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++){var n,o=Dp(e[i].attributes);try{var s,a=function(){var o=n.value;return e[i]&&e[i].attributes?"@click"===o.name?(e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1):void 0:0};for(o.s();!(n=o.n()).done&&(0===(s=a())||1!==s););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(s=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m,f,v=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=49;break}return t.next=6,new Ki(this.sdk,this.options,{title:"电子围墙属性",left:"180px",top:"100px",confirmCallBack:function(t){v.name=v.name.trim(),v.name||(v.name="未命名对象"),v.options.label.position={lng:v.label.position[0],lat:v.label.position[1],alt:v.label.position[2]},v.originalOptions=v.deepCopyObj(v.options),v._DialogObject.close(),v.Dialog.confirmCallBack&&v.Dialog.confirmCallBack(v.originalOptions),be(v.sdk,v.options.id),re(v.sdk,v.options.id)},resetCallBack:function(){v.reset(),v.Dialog.resetCallBack&&v.Dialog.resetCallBack()},removeCallBack:function(){v.Dialog.removeCallBack&&v.Dialog.removeCallBack()},closeCallBack:function(){v.reset(),v.Dialog.closeCallBack&&v.Dialog.closeCallBack();for(var t=0;t<v.nodePoints.length;t++)v.sdk.viewer.entities.remove(v.nodePoints[t]);v.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),v.event&&v.event.destroy(),v.event&&v.tip.destroy()},showCallBack:function(t){v.options.show=t,v.originalOptions.show=t,v.show=t,v.Dialog.showCallBack&&v.Dialog.showCallBack()},secondaryEditCallBack:function(){e.nodeEdit(v)}});case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" wall-stereoscopic",(n=document.createElement("div")).innerHTML=wp(this),this._DialogObject.contentAppChild(n),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,this.attributeISC=this.options.attribute.ISC.content,o=[{name:'<i class="icon icon-wall"></i>纯色墙',value:"纯色墙",key:0,icon:"icon-wall"},{name:'<i class="icon icon-wall-gradient"></i>上升墙',value:"上升墙",key:1,icon:"icon-wall-gradient"},{name:'<i class="icon icon-wall-arrow"></i>箭头墙',value:"箭头墙",key:2,icon:"icon-wall-arrow"},{name:'<i class="icon icon-wall-warn"></i>警戒墙',value:"警戒墙",key:3,icon:"icon-wall-warn"}],(s=Y(n.getElementsByClassName("material-box")[0],".material")).legp_search(o),(r=document.createElement("i")).className="icon icon-active",n.getElementsByClassName("material")[0].getElementsByClassName("cy_datalist")[0].appendChild(r),l=n.getElementsByClassName("material")[0].getElementsByTagName("input")[0],c=0;case 22:if(!(c<o.length)){t.next=31;break}if(o[c].key!==this.material){t.next=28;break}return s.legp_searchActive(o[c].value),l.value=o[c].value,r.className="icon icon-active ".concat(o[c].icon),t.abrupt("break",31);case 28:c++,t.next=22;break;case 31:l.addEventListener("input",(function(t,e){for(var i=0;i<o.length;i++)if(o[i].value===l.value){v.material=o[i].key,r.className="icon icon-active ".concat(o[i].icon);break}})),new dn("radar-scan-edit-tabs",void 0,this.sdk),u=new YJColorPicker({el:n.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){v.color=t},clear:function(){v.color="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:n.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){v.labelColor=t},clear:function(){v.labelColor="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:n.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){v.labelLineColor=t},clear:function(){v.labelLineColor="rgba(255,255,255,1)"}}),d=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){v.labelBackgroundColorStart=t},clear:function(){v.labelBackgroundColorStart="rgba(255,255,255,1)"}}),m=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){v.labelBackgroundColorEnd=t},clear:function(){v.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),f=n.getElementsByTagName("*"),Sp.on(this,f),this._elms=Sp.element,this._elms.color=[u],this._elms.labelColor=[p],this._elms.labelLineColor=[h],this._elms.labelBackgroundColorStart=[d],this._elms.labelBackgroundColorEnd=[m],setTimeout((function(){v.attributeLink=v.options.attribute.link.content,v.ISCSelect&&v.ISCSelect(),v.goodsSelect&&v.goodsSelect(),v.cameraSelect&&v.cameraSelect(),v.attributeVr=v.options.attribute.vr.content;var t=v.attributeSelect,e=Y(v._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0],".attribute-select");if(e.legp_search(t),v._DialogObject._element.content.getElementsByClassName("attribute-select")[0]){for(var i=v._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],n=0;n<t.length;n++)if(t[n].key===v.options.attributeType){i.value=t[n].value,e.legp_searchActive(t[n].value);break}i.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===i.value){v.attributeType=t[e].key;break}}));var o=Rn(),s=Y(v._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(s){s.legp_search(o);var a=v._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];a.value=o[v.labelFontFamily].value;for(var r=0;r<o.length;r++)if(o[r].value==a.value){s.legp_searchActive(o[r].value);break}a.addEventListener("input",(function(){for(var t=0;t<o.length;t++)if(o[t].value===a.value){v.labelFontFamily=o[t].key;break}})),v._elms.labelFontFamily=[a]}}}),0),t.next=50;break;case 49:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 50:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"reset",value:function(){var t=this;if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.extrudedHeight=this.originalOptions.extrudedHeight,this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.attributeISC=this.options.attribute.ISC.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect();for(var e=this.options.positions,i=[],n=0;n<e.length;n++)i.push(e[n].lng,e[n].lat,e[n].alt);this.noseToTail&&i.push(i[0],i[1],i[2]),this.entity.polylineVolume.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i),this.material=this.material,this._elms.noseToTail&&this._elms.noseToTail.forEach((function(e){e.checked=t.noseToTail}))}}},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"getMaterial",value:function(){var t,e=this;switch(this.options.material){case 0:t=Cesium.Color.fromCssColorString(this.options.color),2===this.sdk.viewer.scene.mode&&(t=new Cesium.CustomColorMaterialSource({color:this.options.color}));break;case 1:t=new Cesium.PolylineTrailLinkMaterialProperty({color:Cesium.Color.fromCssColorString(this.options.color),duration:this.options.duration});break;case 2:case 3:var i;switch(this.options.material){case 2:i="arrow";break;case 3:i="warn"}t=new Cesium.CustomMaterialSource({image:this.getSourceRootPath()+"/img/material/".concat(i,".png"),color:this.options.color,repeats:new Cesium.CallbackProperty((function(){var t=[[1,1,1]];if(!e.entity||!e.entity.polylineVolume)return t;var i=e.entity.polylineVolume.positions.getValue();if(!Cesium.defined(i))return t;var n=0,o=[];t=[];for(var s=!1,a=0;a<i.length-1;++a){var r=Cesium.Cartesian3.distance(i[a],i[a+1]);r>=1e5&&(s=!0),o.push(r),n+=r}var l=n/e.options.extrudedHeight;if(l/=1,s)for(var c=0;c<o.length;c++){t.push([((c+1)/o.length).toFixed(30),l/5,1])}else for(var u=0;u<o.length;u++){var p=o[u]/n;p;var h=p*l;t.push([((u+1)/o.length).toFixed(30),h,1])}return t}),!1),duration:this.options.duration})}return t}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"setDIV",value:function(){var t,e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};i.x=i.x||0===i.x?i.x:10,i.y=i.y||0===i.y?i.y:10;for(var n=[],o=0;o<this.options.positions.length;o++)n.push([this.options.positions[o].lng,this.options.positions[o].lat]);var s=turf.lineString(n),a=turf.length(s,{units:"kilometers"}),r=turf.lineSliceAlong(s,0,a/2,{units:"kilometers"}),l=document.getElementById(i.domid),c=(t=Cesium.Cartesian3).fromDegrees.apply(t,L()(r.geometry.coordinates[r.geometry.coordinates.length-1]).concat([this.options.positions[0].alt+this.options.extrudedHeight]));this.sdk.viewer.scene.postRender.addEventListener((function(t){if("block"===l.style.display||""===l.style.display){var n=e.sdk.viewer.scene.cartesianToCanvasCoordinates(c);n&&(l.style.left=(n.x+i.x).toFixed(0)+"px",l.style.top=(n.y+i.y).toFixed(0)+"px")}}))}}],[{key:"createLabel",value:function(t){t.label=new Jn(t.sdk,{id:t.options.id,show:!!t.options.show&&t.options.label.show,position:[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight],text:t.options.name,fontSize:t.options.label.fontSize,fontFamily:t.options.label.fontFamily,color:t.options.label.color,ground:!1,pixelOffset:t.options.label.pixelOffset,backgroundColor:t.options.label.backgroundColor,lineColor:t.options.label.lineColor,lineWidth:t.options.label.lineWidth,scaleByDistance:t.options.label.scaleByDistance,near:t.options.label.near,far:t.options.label.far})}},{key:"create",value:(i=o()(a.a.mark((function t(i){var n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=i.options.positions,o=[],s=0;s<n.length;s++)o.push(n[s].lng,n[s].lat,n[s].alt);i.noseToTail&&o.push(o[0],o[1],o[2]),i.entity=i.sdk.viewer.entities.add({id:i.options.id,show:i.options.show,polylineVolume:{positions:Cesium.Cartesian3.fromDegreesArrayHeights(o),shape:[{x:-1e-7,y:-i.options.extrudedHeight/2},{x:1e-7,y:-i.options.extrudedHeight/2},{x:1e-7,y:i.options.extrudedHeight/2},{x:-1e-7,y:i.options.extrudedHeight/2}],cornerType:Cesium.CornerType.MITERED}}),i.entity.polylineVolume.material=i.getMaterial(),e.createLabel(i),be(i.sdk,i.options.id),i.options.show&&Qt(0,i.options.id);case 9:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n;YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];for(var o=t.options.positions,s=[],a=0;a<o.length;a++)s.push(o[a].lng,o[a].lat,o[a].alt);t.noseToTail&&s.push(s[0],s[1],s[2]);var r=!1,l=function(e,o){if(i){r=!0;var a=t.sdk.viewer.scene.clampToHeight(o,[t.entity]);t.options.positions[i.index]=t.cartesian3Towgs84(a,t.sdk.viewer),n=t.options.positions[i.index];var l=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",position:Cesium.Cartesian3.fromDegrees(t.options.positions[i.index].lng,t.options.positions[i.index].lat,t.options.positions[i.index].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.splice(i.index,0,l),t.options.positions.splice(i.index,0,t.options.positions[i.index]);var c=t.options.positions;s=[];for(var u=0;u<c.length;u++)s.push(c[u].lng,c[u].lat,c[u].alt);t.noseToTail&&s.push(s[0],s[1],s[2]),t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight],t.tip.setPosition(o,e.position.x,e.position.y),t.material=t.material}else{var p=t.sdk.viewer.scene.pick(e.position);p&&p.id&&p.id.name&&"node-secondary-edit-point"===p.id.name&&(i=p.id,t.nodePoints.splice(p.id.index,1),t.sdk.viewer.entities.remove(p.id),t.tip.set_text("左键开始,右键结束,CTRL+右键撤销"),n=t.cartesian3Towgs84(i.position._value,t.sdk.viewer),t.entity.polylineVolume.positions=new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegreesArrayHeights(s)}),!1))}},c=function(o,a){i&&(t.options.positions[i.index]=n,r&&t.options.positions.splice(i.index,1),e(null,t.options.positions));var l=t.options.positions;s=[];for(var c=0;c<l.length;c++)s.push(l[c].lng,l[c].lat,l[c].alt);t.noseToTail&&s.push(s[0],s[1],s[2]),t.entity.polylineVolume.positions=Cesium.Cartesian3.fromDegreesArrayHeights(s),t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight];for(var u=0;u<t.nodePoints.length;u++)t.sdk.viewer.entities.remove(t.nodePoints[u]);t.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),t.event.destroy(),t.tip.destroy(),t.material=t.material};t.event.mouse_left(l),t.event.mouse_right(c);var u=!1;t.event.mouse_move((function(e,n){if(i){var o=t.sdk.viewer.scene.clampToHeight(n,[t.entity]);t.options.positions[i.index]=t.cartesian3Towgs84(o,t.sdk.viewer);var a=t.options.positions;s=[];for(var r=0;r<a.length;r++)s.push(a[r].lng,a[r].lat,a[r].alt);if(t.noseToTail&&s.push(s[0],s[1],s[2]),t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight],u)return u=!1,void(t.material=t.material)}t.tip.setPosition(n,e.endPosition.x,e.endPosition.y)})),t.event.mouse_right_keyboard_ctrl((function(e,n){i&&(u=!0,t.options.positions.pop(),t.sdk.viewer.entities.remove(t.nodePoints[t.nodePoints.length-1]),i.index===t.options.positions.length&&(t.nodePoints[i.index-1]?i=t.nodePoints[i.index-1]:i.index=0),t.nodePoints.pop())})),t.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?c(o,i):l(o,i)}))}));for(var p=0;p<t.options.positions.length;p++){var h=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:p,position:Cesium.Cartesian3.fromDegrees(t.options.positions[p].lng,t.options.positions[p].lat,t.options.positions[p].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.push(h)}}}}]);var i,n,s}(jn);function Tp(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">宽度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" data-min="0.01" max="999999" @model="width">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">拉伸高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="999999999" @model="extrudedHeight">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col corner-type-box">\n <span class="label">拐角类型</span>\n <div class="corner-type"></div>\n </div>\n <div class="col material-box">\n <span class="label">墙体样式</span>\n <div class="material"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">墙体闭合</span>\n <input class="btn-switch" type="checkbox" @model="noseToTail">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="radar-scan-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function Np(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Bp(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Bp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Bp(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var Lp=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[],r=function(){};if(!e[o]||!e[o].attributes)return 1;var l,c=Np(e[o].attributes);try{var u=function(){var c=l.value;switch(c.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[c.value]=e.target.checked})),e[o].checked=t[c.value]):(n.push((function(e){var i=e.target.value;if("number"==e.target.type){if("."!=e.data&&("-"!=e.data||e.target.value)){var n=Number(i);e.target.max&&n>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&n<Number(e.target.min)&&(i=Number(e.target.min)),e.target.dataset.min&&n<Number(e.target.dataset.min)&&(i=Number(e.target.dataset.min)),t[c.value]=i}}else t[c.value]=i})),r=function(e){var i=e.target.value;(e.target.value||"undefined"!==e.target.dataset.null&&""!==e.target.dataset.null&&!Boolean(e.target.dataset.null))&&(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),e.target.dataset.min&&i<Number(e.target.dataset.min)&&(i=Number(e.target.dataset.min))),t[c.value]=i},"IMG"==e[o].nodeName?e[o].src=t[c.value]:e[o].value=t[c.value]),i.element[c.value]?i.element[c.value].push(e[o]):i.element[c.value]=[e[o]],a.push(c.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t[c.value]&&t[c.value](e)})),a.push(c.name);break;case"@change":s=!0,n.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[c.value]&&t[c.value](e,i)}))}};for(c.s();!(l=c.n()).done;)u()}catch(t){c.e(t)}finally{c.f()}for(var p=0;p<a.length;p++)e[o].attributes.removeNamedItem(a[p]);if(s){var h="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(h="change"),e[o].addEventListener(h,(function(t){for(var e=0;e<n.length;e++)n[e](t)})),e[o].addEventListener("blur",(function(t){r(t)}))}},o=0;o<e.length;o++)n()}}])}();C()(Lp,"event",{});var Ap=new Lp;function jp(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ip(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ip(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Ip(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Fp(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Rp=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=Fp(this,e,[t,i]))._elms={},n.options.color=i.color||"#ffffff",n.options.width=i.width||.24,n.options["nose-to-tail"]=i["nose-to-tail"]||!1,n.options.extrudedHeight=i.extrudedHeight||2.4,n.cornerType=i.cornerType,n.options.positions=i.positions,n.options.material=Number(i.material)||0,n.options.show=!i.show&&!1!==i.show||i.show,n.entity,n.nodePoints=[],i.label=i.label||{},n.options.label={text:n.options.name,show:i.label.show||!1,position:i.label.position,fontSize:i.label.fontSize||0===i.label.fontSize?i.label.fontSize:20,fontFamily:i.label.fontFamily?i.label.fontFamily:0,color:i.label.color||"#ffffff",lineWidth:i.label.lineWidth||0===i.label.lineWidth?i.label.lineWidth:4,pixelOffset:i.label.pixelOffset||0===i.label.pixelOffset?i.label.pixelOffset:20,backgroundColor:i.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:i.label.lineColor||"#00ffff80",scaleByDistance:i.label.scaleByDistance||!1,near:i.label.near||0===i.label.near?i.label.near:2e3,far:i.label.far||0===i.label.far?i.label.far:1e5},n.options.instruct=i.instruct||"",n.options.operatingPoint=i.operatingPoint||"",n.options.attribute=i.attribute||{},n.options.attribute.vr=n.options.attribute.vr||{},n.options.attribute.vr.content=n.options.attribute.vr.content||[],n.options.attribute.link=n.options.attribute.link||{},n.options.attribute.link.content=n.options.attribute.link.content||[],n.options.attribute.camera=n.options.attribute.camera||{},n.options.attribute.camera.content=n.options.attribute.camera.content||[],n.options.attribute.ISC=n.options.attribute.ISC||{},n.options.attribute.ISC.content=n.options.attribute.ISC.content||[],n.options.attribute.goods=n.options.attribute.goods||{},n.options.attribute.goods.content=n.options.attribute.goods.content||[],n.options.attributeType=i.attributeType||"richText",n.Dialog=o,!n.options.positions||n.options.positions.length<2?(n._error="最少需要两个坐标!",console.warn(n._error),window.ELEMENT&&window.ELEMENT.Message({message:n._error,type:"warning",duration:1500})):(n.sdk.addIncetance(n.options.id,n),e.create(n)),n}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"WallRealStereoscopic"}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t,this.entity)for(var i=0;i<this.entity.values.length;i++){if(this.entity.values[i].polylineVolume){var n=this.entity.values[i];n.polylineVolume.material=this.getMaterial(n.id)}if(this.entity.values[i].polygon)this.entity.values[i].polygon.material=Cesium.Color.fromCssColorString(this.options.color)}this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!1,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"width",get:function(){return this.options.width},set:function(t){this.options.width=t,this.options.width<=.01&&(this.options.width=.01),this.update(),this._elms.width&&this._elms.width.forEach((function(e){e.value=t}))}},{key:"cornerType",get:function(){return this.options.cornerType},set:function(t){switch(t){case 0:case"0":t=0;break;case 1:case"1":t=1;break;case 2:case"2":t=2;break;default:t=0}this.options.cornerType=t,this.update(),this._elms.cornerType&&this._elms.cornerType.forEach((function(e){e.value=t}))}},{key:"material",get:function(){return this.options.material},set:function(t){if(this.options.material=Number(t),this.entity)for(var e=0;e<this.entity.values.length;e++)if(this.entity.values[e].polylineVolume){var i=this.entity.values[e];i.polylineVolume.material=this.getMaterial(i.id)}this._elms.material&&this._elms.material.forEach((function(e){e.value=t}))}},{key:"noseToTail",get:function(){return this.options["nose-to-tail"]},set:function(t){this.options["nose-to-tail"]=t,this.update(),this.material=this.material,this._elms.noseToTail&&this._elms.noseToTail.forEach((function(e){e.checked=t}))}},{key:"extrudedHeight",get:function(){return this.options.extrudedHeight},set:function(t){this.options.extrudedHeight=t,this.label.position=[this.options.positions[0].lng,this.options.positions[0].lat,this.options.positions[0].alt+this.options.extrudedHeight],this.update(),this._elms.extrudedHeight&&this._elms.extrudedHeight.forEach((function(e){e.value=t}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=jp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=jp(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeISC",get:function(){return this.options.attribute.ISC.content},set:function(t){this.options.attribute.ISC.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=jp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=jp(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"calculatePositions3",value:function(){var t=this.deepCopyObj(this.options.positions);this.noseToTail&&t.push(t[0],t[1]);for(var e=[],i=[],n=[],o=[],s=[],a=0;a<t.length-1;a++){var r=turf.point([t[a].lng,t[a].lat]),l=turf.point([t[a+1].lng,t[a+1].lat]),c=turf.rhumbBearing(r,l),u=turf.destination(r,this.options.width/2/1e3,c+90,{units:"kilometers"}),p=turf.destination(l,this.options.width/2/1e3,c+90,{units:"kilometers"}),h=turf.destination(r,this.options.width/2/1e3,c-90,{units:"kilometers"}),d=turf.destination(l,this.options.width/2/1e3,c-90,{units:"kilometers"}),m=u.geometry.coordinates,f=p.geometry.coordinates,v=h.geometry.coordinates,g=d.geometry.coordinates;m[2]=t[a].alt,f[2]=t[a+1].alt,v[2]=t[a].alt,g[2]=t[a+1].alt,e.push(m,f),i.push(v,g)}if(0===this.cornerType);else if(1===this.cornerType)for(var y=0;y<e.length-3;y+=2)0==y&&(o.push(e[y]),s.push(i[y])),o.push(e[y+1],e[y+2]),s.push(i[y+1],i[y+2]),y==e.length-4&&(o.push(e[y+3]),s.push(i[y+3]));else if(2===this.cornerType)for(var b=0;b<e.length-3;b+=2){var C=t[b/2+1],w=turf.point(e[b+1]),k=turf.point(i[b+1]),x=turf.rhumbBearing(w,k),_=turf.point(e[b+2]),E=turf.point(i[b+2]),S=turf.rhumbBearing(_,E);console.log("bearing1, bearing2",x-S);var D=!0;if(Math.sin(Cesium.Math.toRadians(x-S))>0){var M=x;x=S+180,S=M+180,D=!1}var P=turf.sector([C.lng,C.lat,C.alt],this.options.width/1e3/2,x,S,{units:"kilometers"});if(console.log("sector",P),0==b&&(o.push(e[b]),s.push(i[b])),console.log("face",D),D){o.push(e[b+1],e[b+2]);for(var O=1;O<P.geometry.coordinates[0].length-1;O++)s.push([].concat(L()(P.geometry.coordinates[0][O]),[e[b+1][2]]))}else{for(var T=P.geometry.coordinates[0].length-2;T>0;T--)o.push([].concat(L()(P.geometry.coordinates[0][T]),[e[b+1][2]]));s.push(i[b+1],i[b+2])}b==e.length-4&&(o.push(e[b+3]),s.push(i[b+3]))}n=[].concat(o);for(var N=s.length-1;N>=0;N--)n.push(s[N]);return n.push(n[0]),console.log("positions",n),n}},{key:"calculatePositions2",value:function(){for(var t=[],e=0;e<this.options.positions.length-2;e++){var i=(180-u(this.options.positions[e],this.options.positions[e+1],this.options.positions[e+2]))/2,n=Math.tan(i*Math.PI/180)*(this.options.width/2);console.log("width",n,i);var o=turf.lineString([[this.options.positions[1].lng,this.options.positions[1].lat],[this.options.positions[0].lng,this.options.positions[0].lat]]),s=turf.lineString([[this.options.positions[1].lng,this.options.positions[1].lat],[this.options.positions[2].lng,this.options.positions[2].lat]]),a=turf.lineSliceAlong(o,0,n/1e3,{units:"kilometers"}),r=turf.lineSliceAlong(s,0,n/1e3,{units:"kilometers"}),l=a.geometry.coordinates[a.geometry.coordinates.length-1],c=r.geometry.coordinates[r.geometry.coordinates.length-1];l[2]=this.options.positions[e+1].alt,c[2]=this.options.positions[e+1].alt,t.push([l,c]),this.sdk.viewer.entities.add({position:Cesium.Cartesian3.fromDegrees(l[0],l[1],l[2]),billboard:{image:this.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),this.sdk.viewer.entities.add({position:Cesium.Cartesian3.fromDegrees(c[0],c[1],c[2]),billboard:{image:this.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}})}function u(t,e,i){var n=turf.point([t.lng,t.lat]),o=turf.point([e.lng,e.lat]),s=turf.point([i.lng,i.lat]),a={units:"kilometers"},r=turf.rhumbDistance(n,o,a),l=turf.rhumbDistance(s,o,a);var c=turf.rhumbBearing(n,o),u=turf.rhumbBearing(s,o),p=Math.abs((c-u+360)%360);return p>180&&(p=360-p),p}return t}},{key:"calculatePositions",value:function(){var t=this.deepCopyObj(this.options.positions);this.noseToTail&&t.push(t[0],t[1]);for(var e=[],i=[],n=0;n<t.length-1;n++){var o=turf.point([t[n].lng,t[n].lat]),s=turf.point([t[n+1].lng,t[n+1].lat]),a=turf.rhumbBearing(o,s),r=turf.destination(o,this.options.width/2/1e3,a+90,{units:"kilometers"}),l=turf.destination(s,this.options.width/2/1e3,a+90,{units:"kilometers"}),c=turf.destination(o,this.options.width/2/1e3,a-90,{units:"kilometers"}),u=turf.destination(s,this.options.width/2/1e3,a-90,{units:"kilometers"}),p=r.geometry.coordinates,h=l.geometry.coordinates,d=c.geometry.coordinates,m=u.geometry.coordinates;p[2]=t[n].alt,h[2]=t[n+1].alt,d[2]=t[n].alt,m[2]=t[n+1].alt,e.push([p,h,m,d,p])}if(i.push(e[0]),0===this.cornerType)for(var f=1;f<e.length;f++){var v=t[f],g=turf.point(e[f-1][1]),y=turf.point(e[f-1][2]),b=turf.rhumbBearing(g,y),C=turf.point(e[f][0]),w=turf.point(e[f][3]),k=turf.rhumbBearing(C,w);if(Math.sin(Cesium.Math.toRadians(b-k))>0){var x=b;b=k+180,k=x+180,!1}var _=Math.abs(b-k);_>180&&(_=360-_);var E=this.options.width/2/Math.cos(Cesium.Math.toRadians(_/2));E>5*this.options.width&&(E=5*this.options.width);var S=turf.sector([v.lng,v.lat],this.options.width/1e3/2,b,k,{units:"kilometers",steps:3600}),D=turf.point([v.lng,v.lat]),M=turf.point(L()(S.geometry.coordinates[0][Math.ceil(S.geometry.coordinates[0].length/2)])),P=turf.bearing(D,M),O=turf.destination(D,E/1e3,P,{units:"kilometers"}),T=[];T.push([].concat(L()(S.geometry.coordinates[0][0]),[v.alt])),T.push([].concat(L()(S.geometry.coordinates[0][1]),[v.alt])),T.push([].concat(L()(O.geometry.coordinates),[v.alt])),T.push([].concat(L()(S.geometry.coordinates[0][S.geometry.coordinates[0].length-2]),[v.alt])),i.push(T),i.push(e[f])}else if(1===this.cornerType)for(var N=1;N<e.length;N++)i.push([e[N-1][2],e[N][0],e[N-1][1],e[N][3],e[N-1][2]]),i.push(e[N]);else if(2===this.cornerType)for(var B=1;B<e.length;B++){var A=t[B],j=turf.point(e[B-1][1]),I=turf.point(e[B-1][2]),F=turf.rhumbBearing(j,I),R=turf.point(e[B][0]),z=turf.point(e[B][3]),H=turf.rhumbBearing(R,z);if(Math.sin(Cesium.Math.toRadians(F-H))>0){var V=F;F=H+180,H=V+180}for(var G=turf.sector([A.lng,A.lat],this.options.width/1e3/2,F,H,{units:"kilometers"}),U=[],W=0;W<G.geometry.coordinates[0].length-1;W++)U.push([].concat(L()(G.geometry.coordinates[0][W]),[A.alt]));i.push(U),i.push(e[B])}return i}},{key:"edit",value:(s=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=67;break}return t.next=6,new Ki(this.sdk,this.options,{title:"实体墙属性",left:"180px",top:"100px",confirmCallBack:function(t){w.name=w.name.trim(),w.name||(w.name="未命名对象"),w.options.label.position={lng:w.label.position[0],lat:w.label.position[1],alt:w.label.position[2]},w.originalOptions=w.deepCopyObj(w.options),w._DialogObject.close(),w.Dialog.confirmCallBack&&w.Dialog.confirmCallBack(w.originalOptions),be(w.sdk,w.options.id),re(w.sdk,w.options.id)},resetCallBack:function(){w.reset(),w.Dialog.resetCallBack&&w.Dialog.resetCallBack()},removeCallBack:function(){w.Dialog.removeCallBack&&w.Dialog.removeCallBack()},closeCallBack:function(){w.reset(),w.Dialog.closeCallBack&&w.Dialog.closeCallBack();for(var t=0;t<w.nodePoints.length;t++)w.sdk.viewer.entities.remove(w.nodePoints[t]);w.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),w.event&&w.event.destroy(),w.event&&w.tip.destroy()},showCallBack:function(t){w.options.show=t,w.originalOptions.show=t,w.show=t,w.Dialog.showCallBack&&w.Dialog.showCallBack()},secondaryEditCallBack:function(){e.nodeEdit(w)}});case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" wall-stereoscopic",(n=document.createElement("div")).innerHTML=Tp(this),this._DialogObject.contentAppChild(n),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,this.attributeISC=this.options.attribute.ISC.content,o=[{name:'<svg class="icon-zj"><use xlink:href="#yj-icon-zj"></use></svg>直角',value:"直角",key:0,icon:"yj-icon-zj"},{name:'<svg class="icon-xj"><use xlink:href="#yj-icon-xj"></use></svg>斜角',value:"斜角",key:1,icon:"yj-icon-xj"},{name:'<svg class="icon-yj"><use xlink:href="#yj-icon-yj"></use></svg>圆角',value:"圆角",key:2,icon:"yj-icon-yj"}],(s=Y(n.getElementsByClassName("corner-type-box")[0],".corner-type")).legp_search(o),(r=document.createElement("i")).className="icon-active",n.getElementsByClassName("corner-type")[0].getElementsByClassName("cy_datalist")[0].appendChild(r),l=n.getElementsByClassName("corner-type")[0].getElementsByTagName("input")[0],c=0;case 22:if(!(c<o.length)){t.next=31;break}if(o[c].key!==this.cornerType){t.next=28;break}return s.legp_searchActive(o[c].value),l.value=o[c].value,r.innerHTML='<svg class="'.concat(o[c].icon,'"><use xlink:href="#').concat(o[c].icon,'"></use></svg>'),t.abrupt("break",31);case 28:c++,t.next=22;break;case 31:l.addEventListener("input",(function(t,e){for(var i=0;i<o.length;i++)if(o[i].value===l.value){w.cornerType=o[i].key,r.innerHTML='<svg class="'.concat(o[i].icon,'"><use xlink:href="#').concat(o[i].icon,'"></use></svg>');break}})),u=[{name:'<i class="icon icon-wall"></i>纯色墙',value:"纯色墙",key:0,icon:"icon-wall"},{name:'<i class="icon icon-wall-brick1"></i>红砖墙',value:"红砖墙",key:1,icon:"icon-wall-brick1"},{name:'<i class="icon icon-wall-brick2"></i>黄砖墙',value:"黄砖墙",key:2,icon:"icon-wall-brick2"},{name:'<i class="icon icon-wall-brick3"></i>灰瓷墙',value:"灰瓷墙",key:3,icon:"icon-wall-brick3"}],(p=Y(n.getElementsByClassName("material-box")[0],".material")).legp_search(u),(h=document.createElement("i")).className="icon icon-active",n.getElementsByClassName("material")[0].getElementsByClassName("cy_datalist")[0].appendChild(h),d=n.getElementsByClassName("material")[0].getElementsByTagName("input")[0],m=0;case 40:if(!(m<u.length)){t.next=49;break}if(u[m].key!==this.material){t.next=46;break}return p.legp_searchActive(u[m].value),d.value=u[m].value,h.className="icon icon-active ".concat(u[m].icon),t.abrupt("break",49);case 46:m++,t.next=40;break;case 49:d.addEventListener("input",(function(t,e){for(var i=0;i<u.length;i++)if(u[i].value===d.value){w.material=u[i].key,h.className="icon icon-active ".concat(u[i].icon);break}})),new dn("radar-scan-edit-tabs",void 0,this.sdk),f=new YJColorPicker({el:n.getElementsByClassName("color")[0],size:"mini",alpha:!1,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){w.color=t},clear:function(){w.color="rgba(255,255,255,1)"}}),v=new YJColorPicker({el:n.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelColor=t},clear:function(){w.labelColor="rgba(255,255,255,1)"}}),g=new YJColorPicker({el:n.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelLineColor=t},clear:function(){w.labelLineColor="rgba(255,255,255,1)"}}),y=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorStart=t},clear:function(){w.labelBackgroundColorStart="rgba(255,255,255,1)"}}),b=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorEnd=t},clear:function(){w.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),C=n.getElementsByTagName("*"),Ap.on(this,C),this._elms=Ap.element,this._elms.color=[f],this._elms.labelColor=[v],this._elms.labelLineColor=[g],this._elms.labelBackgroundColorStart=[y],this._elms.labelBackgroundColorEnd=[b],setTimeout((function(){w.attributeLink=w.options.attribute.link.content,w.ISCSelect&&w.ISCSelect(),w.goodsSelect&&w.goodsSelect(),w.cameraSelect&&w.cameraSelect(),w.attributeVr=w.options.attribute.vr.content;var t=w.attributeSelect,e=Y(w._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0],".attribute-select");if(e.legp_search(t),w._DialogObject._element.content.getElementsByClassName("attribute-select")[0]){for(var i=w._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],n=0;n<t.length;n++)if(t[n].key===w.options.attributeType){i.value=t[n].value,e.legp_searchActive(t[n].value);break}i.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===i.value){w.attributeType=t[e].key;break}}));var o=Rn(),s=Y(w._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(s){s.legp_search(o);var a=w._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];a.value=o[w.labelFontFamily].value;for(var r=0;r<o.length;r++)if(o[r].value==a.value){s.legp_searchActive(o[r].value);break}a.addEventListener("input",(function(){for(var t=0;t<o.length;t++)if(o[t].value===a.value){w.labelFontFamily=o[t].key;break}})),w._elms.labelFontFamily=[a]}}}),0),t.next=68;break;case 67:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 68:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"reset",value:function(){if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.width=this.originalOptions.width,this.cornerType=this.originalOptions.cornerType,this.extrudedHeight=this.originalOptions.extrudedHeight,this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.attributeISC=this.options.attribute.ISC.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect();for(var t=this.options.positions,e=[],i=[],n=[],o=0;o<t.length;o++)e.push(t[o].lng,t[o].lat,t[o].alt),i.push(t[o].alt),n.push(t[o].alt+this.options.extrudedHeight)}}},{key:"remove",value:(n=o()(a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label.remove(),e=0;e<this.entity.values.length;e++)this.sdk.viewer.entities.remove(this.entity.values[e]);return this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"getMaterial",value:function(t){var e,i,n=this;switch(this.options.material){case 0:e=Cesium.Color.fromCssColorString(this.options.color),2===this.sdk.viewer.scene.mode&&(e=new Cesium.CustomColorMaterialSource({color:this.options.color}));break;case 1:case 2:case 3:case 4:switch(this.options.material){case 1:i="brick1";break;case 2:i="brick2";break;case 3:i="brick3";break;case 4:i="brick4"}e=new Cesium.CustomMaterialSource({image:this.getSourceRootPath()+"/img/material/".concat(i,".png"),color:this.options.color,is2D:!1,repeats:new Cesium.CallbackProperty((function(){var e=[["1.0",1,1]];if(!n.entity)return e;var i=n.entity.getById(t);if(!i||!i.polylineVolume)return e;var o=i.polylineVolume.positions.getValue();if(!Cesium.defined(o))return e;var s=0,a=[];e=[];for(var r=0;r<o.length-1;++r){var l=Cesium.Cartesian3.distance(o[r],o[r+1]);a.push(l),s+=l}var c=s/n.options.extrudedHeight;c/=1;for(var u=0;u<a.length;u++){var p=a[u]/s;p;var h=p*c;e.push([((u+1)/a.length).toFixed(30),h,1])}return e}),!1),isTranslucent:!1,duration:0})}return e}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"update",value:function(){if(this.entity){for(var t=this.calculatePositions(),i=[],n=[],o=0;o<this.entity.values.length;o++)this.sdk.viewer.entities.remove(this.entity.values[o]);this.entity.removeAll();for(var s=0;s<t.length;s++){for(var a=[],r=[],l=0;l<t[s].length;l++)a.push(t[s][l][0],t[s][l][1],t[s][l][2]),r.push(t[s][l][0],t[s][l][1],t[s][l][2]+this.options.extrudedHeight);i.push(a),n.push(r);var c=this.sdk.viewer.entities.add({id:this.options.id+"-"+e.randomString(12),polylineVolume:{positions:Cesium.Cartesian3.fromDegreesArrayHeights(i[s]),shape:[{x:-1e-7,y:-this.options.extrudedHeight/2},{x:1e-7,y:-this.options.extrudedHeight/2},{x:1e-7,y:this.options.extrudedHeight/2},{x:-1e-7,y:this.options.extrudedHeight/2}],cornerType:Cesium.CornerType.MITERED}}),u=this.sdk.viewer.entities.add({id:this.options.id+"-"+e.randomString(12),polygon:{hierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(n[s])),perPositionHeight:!0,material:Cesium.Color.fromCssColorString(this.options.color)}});this.entity.add(c),this.entity.add(u),c.polylineVolume.material=this.getMaterial(c.id)}}}},{key:"setDIV",value:function(){var t,e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};i.x=i.x||0===i.x?i.x:10,i.y=i.y||0===i.y?i.y:10;for(var n=[],o=0;o<this.options.positions.length;o++)n.push([this.options.positions[o].lng,this.options.positions[o].lat]);var s=turf.lineString(n),a=turf.length(s,{units:"kilometers"}),r=turf.lineSliceAlong(s,0,a/2,{units:"kilometers"}),l=document.getElementById(i.domid),c=(t=Cesium.Cartesian3).fromDegrees.apply(t,L()(r.geometry.coordinates[r.geometry.coordinates.length-1]).concat([this.options.positions[0].alt+this.options.extrudedHeight]));this.sdk.viewer.scene.postRender.addEventListener((function(t){if("block"===l.style.display||""===l.style.display){var n=e.sdk.viewer.scene.cartesianToCanvasCoordinates(c);n&&(l.style.left=(n.x+i.x).toFixed(0)+"px",l.style.top=(n.y+i.y).toFixed(0)+"px")}}))}}],[{key:"createLabel",value:function(t){t.label=new Jn(t.sdk,{id:t.options.id,show:!!t.options.show&&t.options.label.show,position:[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight],text:t.options.name,fontSize:t.options.label.fontSize,fontFamily:t.options.label.fontFamily,color:t.options.label.color,ground:!1,pixelOffset:t.options.label.pixelOffset,backgroundColor:t.options.label.backgroundColor,lineColor:t.options.label.lineColor,lineWidth:t.options.label.lineWidth,scaleByDistance:t.options.label.scaleByDistance,near:t.options.label.near,far:t.options.label.far})}},{key:"create",value:(i=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i.entity=new Cesium.EntityCollection,n=i.calculatePositions(),o=0;o<n.length;o++){for(s=[],r=[],l=0;l<n[o].length;l++)s.push(n[o][l][0],n[o][l][1],n[o][l][2]),r.push(n[o][l][0],n[o][l][1],n[o][l][2]+i.options.extrudedHeight);c=i.sdk.viewer.entities.add({id:i.options.id+"-"+e.randomString(12),polylineVolume:{positions:Cesium.Cartesian3.fromDegreesArrayHeights(s),shape:[{x:-1e-7,y:-i.options.extrudedHeight/2},{x:1e-7,y:-i.options.extrudedHeight/2},{x:1e-7,y:i.options.extrudedHeight/2},{x:-1e-7,y:i.options.extrudedHeight/2}],cornerType:Cesium.CornerType.MITERED}}),u=i.sdk.viewer.entities.add({id:i.options.id+"-"+e.randomString(12),polygon:{hierarchy:Cesium.Cartesian3.fromDegreesArrayHeights(r),perPositionHeight:!0,material:Cesium.Color.fromCssColorString(i.options.color)}}),i.entity.add(c),i.entity.add(u),c.polylineVolume.material=i.getMaterial(c.id)}i.entity.show=i.options.show,e.createLabel(i),be(i.sdk,i.options.id),i.options.show&&Qt(0,i.options.id);case 9:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"nodeEdit",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(YJ.Measure.GetMeasureStatus())i("上一次测量未结束");else{var n,o,s=function(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t.entity){for(var n=t.calculatePositions(),o=0;o<t.entity.values.length;o++)t.sdk.viewer.entities.remove(t.entity.values[o]);t.entity.removeAll(),a=[],r=[];for(var s=function(o){for(var s=[],l=[],c=0;c<n[o].length;c++)s.push(n[o][c][0],n[o][c][1],n[o][c][2]),l.push(n[o][c][0],n[o][c][1],n[o][c][2]+t.options.extrudedHeight);a.push(s),r.push(l);var u=t.sdk.viewer.entities.add({id:t.options.id+"-"+e.randomString(12),polylineVolume:{positions:i?new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegreesArrayHeights(a[o])}),!1):Cesium.Cartesian3.fromDegreesArrayHeights(a[o]),shape:[{x:-1e-7,y:-t.options.extrudedHeight/2},{x:1e-7,y:-t.options.extrudedHeight/2},{x:1e-7,y:t.options.extrudedHeight/2},{x:-1e-7,y:t.options.extrudedHeight/2}],cornerType:Cesium.CornerType.MITERED}}),p=t.sdk.viewer.entities.add({id:t.options.id+"-"+e.randomString(12),polygon:{hierarchy:i?new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(r[o]))}),!1):new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(r[o])),perPositionHeight:!0,material:Cesium.Color.fromCssColorString(t.options.color)}});t.entity.add(u),t.entity.add(p),u.polylineVolume.material=t.getMaterial(u.id)},l=0;l<n.length;l++)s(l)}};YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];t.options.positions;var a=[],r=[],l=!1,c=function(e,i){if(!0,n){l=!0;var a=t.sdk.viewer.scene.clampToHeight(i,L()(t.entity.values));t.options.positions[n.index]=t.cartesian3Towgs84(a,t.sdk.viewer),o=t.options.positions[n.index];var r=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",position:Cesium.Cartesian3.fromDegrees(t.options.positions[n.index].lng,t.options.positions[n.index].lat,t.options.positions[n.index].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.splice(n.index,0,r),t.options.positions.splice(n.index,0,t.options.positions[n.index]),s(!0),t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight],t.tip.setPosition(i,e.position.x,e.position.y),t.material=t.material}else{var c=t.sdk.viewer.scene.pick(e.position);c&&c.id&&c.id.name&&"node-secondary-edit-point"===c.id.name&&(n=c.id,t.nodePoints.splice(c.id.index,1),t.sdk.viewer.entities.remove(c.id),t.tip.set_text("左键开始,右键结束,CTRL+右键撤销"),o=t.cartesian3Towgs84(n.position._value,t.sdk.viewer),s(!0))}},u=function(e,a){n&&(t.options.positions[n.index]=o,l&&t.options.positions.splice(n.index,1),s(),i(null,t.options.positions)),t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight];for(var r=0;r<t.nodePoints.length;r++)t.sdk.viewer.entities.remove(t.nodePoints[r]);t.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),t.event.destroy(),t.tip.destroy(),t.material=t.material};t.event.mouse_left(c),t.event.mouse_right(u),t.event.mouse_move((function(e,i){if(n){var o=t.sdk.viewer.scene.clampToHeight(i,L()(t.entity.values));t.options.positions[n.index]=t.cartesian3Towgs84(o,t.sdk.viewer);for(var s=t.calculatePositions(),l=0;l<s.length;l++){for(var c=[],u=[],p=0;p<s[l].length;p++)c.push(s[l][p][0],s[l][p][1],s[l][p][2]),u.push(s[l][p][0],s[l][p][1],s[l][p][2]+t.options.extrudedHeight);a[l]=c,r[l]=u}t.label.position=[t.options.positions[0].lng,t.options.positions[0].lat,t.options.positions[0].alt+t.options.extrudedHeight]}t.tip.setPosition(i,e.endPosition.x,e.endPosition.y)})),t.event.mouse_right_keyboard_ctrl((function(e,i){n&&(!0,t.options.positions.pop(),s(!0),t.sdk.viewer.entities.remove(t.nodePoints[t.nodePoints.length-1]),n.index===t.options.positions.length&&(t.nodePoints[n.index-1]?n=t.nodePoints[n.index-1]:n.index=0),t.nodePoints.pop())})),t.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?u(o,i):c(o,i)}))}));for(var p=0;p<t.options.positions.length;p++){var h=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:p,position:Cesium.Cartesian3.fromDegrees(t.options.positions[p].lng,t.options.positions[p].lat,t.options.positions[p].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.push(h)}}}},{key:"randomString",value:function(t){t=t||32;for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",i=e.length,n="",o=0;o<t;o++)n+=e.charAt(Math.floor(Math.random()*i));return n}}]);var i,n,s}(jn);function zp(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 56%;">\n <div>\n <div class="row">\n <div class="col input-select-unit-box">\n <div class="input-select-unit"></div>\n <input class="input input-text" readonly="readonly" type="text" style="flex: 0 0 130px;" @model="length">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="polyline-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="线条风格">\n <div class="row">\n <div class="col">\n <span class="label">线条颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">线条宽度</span>\n <div class="input-number input-number-unit-1" style="width: 80px;">\n <input class="input" type="number" title="" min="1" max="999" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col input-select-line-type-box">\n <span class="label">线条形式</span>\n <div class="input-select-line-type"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">线段缓冲</span>\n <input class="btn-switch" type="checkbox" @model="extend">\n </div>\n <div class="col">\n <span class="label">缓冲宽度</span>\n <div class="input-number input-number-unit-1" style="width: 80px;">\n <input class="input" type="number" title="" min="0" data-min="0.01" max="999999" @model="extendWidth">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">缓冲颜色</span>\n <div class="extendColor"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">首尾相连</span>\n <input class="btn-switch" type="checkbox" @model="noseToTail">\n </div>\n <div class="col">\n </div>\n <div class="col">\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n \x3c!-- <DIV-cy-tab-pane label="灯光控制">--\x3e\n \x3c!-- <div>--\x3e\n \x3c!-- <div class="row">--\x3e\n \x3c!-- <div class="col">--\x3e\n \x3c!-- <span class="label">指令</span>--\x3e\n \x3c!-- <input class="input" type="text" @model="instruct">--\x3e\n \x3c!-- <button class="primary" @click="instructSubmit">提交</button>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </DIV-cy-tab-pane>--\x3e\n \x3c!-- <DIV-cy-tab-pane label="设置操作点">--\x3e\n \x3c!-- <div>--\x3e\n \x3c!-- <div class="row">--\x3e\n \x3c!-- <div class="col">--\x3e\n \x3c!-- <span class="label">设置操作点</span>--\x3e\n \x3c!-- <input class="input" type="text" @model="operatingPoint">--\x3e\n \x3c!-- <button class="primary" @click="operatingPointSubmit">提交</button>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </div>--\x3e\n \x3c!-- </DIV-cy-tab-pane>--\x3e\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function Hp(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Vp(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Vp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Vp(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}var Gp=function(){function t(){k()(this,t),this.element={}}return _()(t,[{key:"getEvent",value:function(e){return t.event[e]}},{key:"getEventAll",value:function(){return t.event}},{key:"setEvent",value:function(e,i){t.event[e]=i}},{key:"on",value:function(t,e){for(var i=this,n=function(){var n=[],s=!1,a=[];if(!e[o]||!e[o].attributes)return 1;var r,l=Hp(e[o].attributes);try{var c=function(){var l=r.value;switch(l.name){case"@model":s=!0,"checkbox"==e[o].type?(n.push((function(e){t[l.value]=e.target.checked})),e[o].checked=t[l.value]):(n.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),e.target.dataset.min&&i<Number(e.target.dataset.min)&&(i=Number(e.target.dataset.min)),t[l.value]=i):t[l.value]=i})),"IMG"==e[o].nodeName?e[o].src=t[l.value]:e[o].value=t[l.value]),i.element[l.value]?i.element[l.value].push(e[o]):i.element[l.value]=[e[o]],a.push(l.name);break;case"@click":e[o].addEventListener("click",(function(e){"function"==typeof t[l.value]&&t[l.value](e)})),a.push(l.name);break;case"@change":s=!0,n.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[l.value]&&t[l.value](e,i)}))}};for(l.s();!(r=l.n()).done;)c()}catch(t){l.e(t)}finally{l.f()}for(var u=0;u<a.length;u++)e[o].attributes.removeNamedItem(a[u]);if(s){var p="input";"INPUT"==e[o].tagName&&"checkbox"!=e[o].type||(p="change"),e[o].addEventListener(p,(function(t){for(var e=0;e<n.length;e++)n[e](t)}))}},o=0;o<e.length;o++)n()}}])}();C()(Gp,"event",{});var Up=new Gp;function Wp(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Yp(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Wp(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Wp(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Jp(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return qp(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function qp(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Xp(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Zp=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),(i=Xp(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.width=n.width||0===n.width?n.width:3,i.options.color=n.color||"#ff0000",i.options.type=n.type?Number(n.type):0,i.options["nose-to-tail"]=n["nose-to-tail"]||!1,i.options.extend=n.extend||!1,i.options["length-unit"]=n["length-unit"]||"米",i.options["fit-length-unit"]=n["fit-length-unit"]||"米",i.options["words-name"]=n["words-name"]||"空间长度",i.options["extend-width"]=n["extend-width"]||0===n["extend-width"]?n["extend-width"]:10,i.options["extend-color"]=n["extend-color"]||"rgba(255,255,80,0.3)",i.options.show=!n.show&&!1!==n.show||n.show,i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i._elms=[],n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.instruct=n.instruct||"",i.options.operatingPoint=n.operatingPoint||"",i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.operate={},i.nodePoints=[],i.unitNum=0,i.Dialog=o,!i.options.positions||i.options.positions.length<2)i._error="线段最少需要两个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500});else{for(var s=0;s<i.options.positions.length;s++)i.options.positions[s].lng=Number(Number(i.options.positions[s].lng).toFixed(8)),i.options.positions[s].lat=Number(Number(i.options.positions[s].lat).toFixed(8)),i.options.positions[s].alt=Number(Number(i.options.positions[s].alt).toFixed(2));i.sdk.addIncetance(i.options.id,i),e.create(i)}return i}return Xi()(e,t),_()(e,[{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t||"#ff0000",this.entity.polyline.material=this.getMaterial(t,this.options.type),this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,1)"}});e._elms.color[i]=n}))}},{key:"length",get:function(){return this.options.length},set:function(t){this.options.length=t,this._elms.length&&this._elms.length.forEach((function(e){e.value=t}))}},{key:"fitLength",get:function(){return this.options.fitLength},set:function(t){this.options.fitLength=t,this._elms.fitLength&&this._elms.fitLength.forEach((function(e){e.value=t}))}},{key:"lengthUnit",get:function(){return this.options["length-unit"]},set:function(t){if(this.unitNum++,this.options["length-unit"]=t,this._elms.lengthUnit&&this._elms.lengthUnit.forEach((function(e){e.value=t})),this.options.lengthByMeter)if(this.unitNum>2)switch(t){case"米":this.length=this.noseToTail?this.options.fitLengthByMeter:this.options.lengthByMeter;break;case"千米":this.length=this.noseToTail?(this.options.fitLengthByMeter/1e3).toFixed(5):(this.options.lengthByMeter/1e3).toFixed(5);break;default:this.length=this.noseToTail?this.options.fitLengthByMeter:this.options.lengthByMeter}else{var e=this.noseToTail?this.options.fitLengthByMeter:this.options.lengthByMeter;this.lengthUnit=e>1e3||1e3==e?"千米":"米"}}},{key:"wordsName",get:function(){return this.options["words-name"]},set:function(t){var e=this;this.options["words-name"]=t,this._elms.wordsName&&this._elms.wordsName.forEach((function(e){e.value=t}));var i=this;if(this.noseToTail)this.renewPositions(this.options.positions);else this.computeDistance(this.smoothHandle(this.options.positions),2,t).then((function(t){i.options.lengthByMeter=t,i.lengthUnit=e.options["length-unit"]}))}},{key:"fitLengthUnit",get:function(){return this.options["fit-length-unit"]},set:function(t){if(this.options["fit-length-unit"]=t,this._elms.fitLengthUnit&&this._elms.fitLengthUnit.forEach((function(e){e.value=t})),this.options.fitLengthByMeter)switch(t){case"米":this.fitLength=this.options.fitLengthByMeter;break;case"千米":this.fitLength=Number((this.options.fitLengthByMeter/1e3).toFixed(5));break;default:this.fitLength=this.options.fitLengthByMeter}}},{key:"lineWidth",get:function(){return this.options.width},set:function(t){var e=this;this.options.width=t||0==t?t:3,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(t){t.value=e.options.width})),this.entity&&this.entity.polyline&&(this.entity.polyline.width=this.options.width)}},{key:"lineType",get:function(){return this.options.type},set:function(t){var e=this,i=[{name:"实线",value:"实线",key:0},{name:"虚线",value:"虚线",key:1},{name:"泛光",value:"泛光",key:2}];this.options.type=Number(t);for(var n=function(n){if(i[n].key===Number(t))return e._elms.lineType&&e._elms.lineType.forEach((function(t){t.value=i[n].value})),1},o=0;o<i.length&&!n(o);o++);this.entity&&this.entity.polyline&&(this.entity.polyline.material=this.getMaterial(this.options.color,this.options.type))}},{key:"noseToTail",get:function(){return this.options["nose-to-tail"]},set:function(t){if(this.options["nose-to-tail"]=t,e.closeNodeEdit(this),this._elms.noseToTail&&this._elms.noseToTail.forEach((function(e){e.checked=t})),this.entity){var i=this.renewPositions(this.options.positions);this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i),this.renewPolygon(i)}this.lengthUnit=this.options["length-unit"]}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.positionEditing=!1,this.options.heightMode=t||0==t?t:2;var n="";e.closeNodeEdit(this);var o=!1,s=!1,a=this.renewPositions(this.options.positions);switch(this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(a),this.renewPolygon(a),this.options.heightMode){case"0":case 0:this.entity.polyline.clampToGround=o,this.extend=!1,n="海拔高度";break;case"1":case 1:this.entity.polyline.clampToGround=o,this.extend=!1,n="相对地表";break;case"2":case 2:o=!0,s=!0,this.entity.polyline.clampToGround=o,n="依附模型"}this.lengthUnit=this.lengthUnit,this._elms.heightMode&&(this._elms.heightMode.value=n),this._elms.heightModeObject&&this._elms.heightModeObject.legp_searchActive(n),s?(this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),this._elms.heightConfirm&&this._elms.heightConfirm.setAttribute("disabled","disabled")):(this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box"),this._elms.heightConfirm&&this._elms.heightConfirm.removeAttribute("disabled")),setTimeout((function(){o?(i.label.ground=o,i._elms.heightMode&&(i._elms.heightMode.value="依附模型"),i.label.position=[i.options.positions[0].lng,i.options.positions[0].lat]):(i.label.ground=o,i.label.position=[i.options.positions[0].lng,i.options.positions[0].lat,a[2]],i.options.label.position={lng:i.options.positions[0].lng,lat:i.options.positions[0].lat,alt:a[2]})}),0)}},{key:"extend",get:function(){return this.options.extend},set:function(t){if(this.options.extend=t,e.closeNodeEdit(this),t&&(this.heightMode=2),this._elms.extend&&this._elms.extend.forEach((function(e){e.checked=t})),this.entity)if(this.options.extend){var i=this.renewPositions(this.options.positions);this.renewPolygon(i)}else this.entity.polygon=void 0}},{key:"extendWidth",get:function(){return this.options["extend-width"]},set:function(t){this.options["extend-width"]=t,this._elms.extendWidth&&this._elms.extendWidth.forEach((function(e){e.value=t}));var e=this.renewPositions(this.options.positions);this.renewPolygon(e)}},{key:"extendColor",get:function(){return this.options["extend-color"]},set:function(t){var e=this;this.options["extend-color"]=t,this._elms.extendColor&&this._elms.extendColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.extendColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.extendColor=t},clear:function(){e.extendColor="rgba(255,255,255,1)"}});e._elms.extendColor[i]=n})),this.entity&&this.entity.polygon&&(this.entity.polygon.material=Cesium.Color.fromCssColorString(this.options["extend-color"]))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){var e=this;this.options.label.show=t,this.show?(this.label.show=t,setTimeout((function(){e.label.position=[e.options.positions[0].lng,e.options.positions[0].lat,e.options.positions[0].alt]}),0)):this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Jp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Jp(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=Jp(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Jp(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(l=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=31;break}return t.next=6,new Ki(this.sdk,this.options,{title:"曲线属性",left:"180px",top:"100px",confirmCallBack:function(t){h.name=h.name.trim(),h.name||(h.name="未命名对象"),h.options.label.position={lng:h.label.position[0],lat:h.label.position[1],alt:h.label.position[2]},h.originalOptions=h.deepCopyObj(h.options),h._DialogObject.close(),h.Dialog.confirmCallBack&&h.Dialog.confirmCallBack(h.originalOptions),be(h.sdk,h.options.id),re(h.sdk,h.options.id)},resetCallBack:function(){h.reset(),h.Dialog.resetCallBack&&h.Dialog.resetCallBack()},removeCallBack:function(){h.Dialog.removeCallBack&&h.Dialog.removeCallBack()},closeCallBack:function(){h.reset(),h.Dialog.closeCallBack&&h.Dialog.closeCallBack();for(var t=0;t<h.nodePoints.length;t++)h.sdk.viewer.entities.remove(h.nodePoints[t]);h.nodePoints=[],h.positionEditing=!1},showCallBack:function(t){h.options.show=t,h.originalOptions.show=t,h.show=t,h.Dialog.showCallBack&&h.Dialog.showCallBack()},translationalCallBack:function(){h.positionEditing=!h.positionEditing},secondaryEditCallBack:function(){h.positionEditing=!1,h.noseToTail=!1,h.heightMode=0,e.nodeEdit(h)}});case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" polyline",(n=document.createElement("div")).innerHTML=zp(this),this._DialogObject.contentAppChild(n),this.attributeType=this.options.attributeType,new dn("polyline-object-edit-tabs",void 0,this.sdk),o=new YJColorPicker({el:n.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){h.color=t},clear:function(){h.color="rgba(255,255,255,1)"}}),s=new YJColorPicker({el:n.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelColor=t},clear:function(){h.labelColor="rgba(255,255,255,1)"}}),r=new YJColorPicker({el:n.getElementsByClassName("extendColor")[0],size:"mini",alpha:!0,defaultColor:this.extendColor,disabled:!1,openPickerAni:"opacity",sure:function(t){h.extendColor=t},clear:function(){h.extendColor="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:n.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelLineColor=t},clear:function(){h.labelLineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelBackgroundColorStart=t},clear:function(){h.labelBackgroundColorStart="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:n.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelBackgroundColorEnd=t},clear:function(){h.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),p=n.getElementsByTagName("*"),Up.on(this,p),this._elms=Up.element,this._elms.color=[o],this._elms.labelColor=[s],this._elms.extendColor=[r],this._elms.labelLineColor=[l],this._elms.labelBackgroundColorStart=[c],this._elms.labelBackgroundColorEnd=[u],setTimeout((function(){h.attributeLink=h.options.attribute.link.content,h.attributeVr=h.options.attribute.vr.content,h.cameraSelect&&h.cameraSelect(),h.goodsSelect&&h.goodsSelect();var t=h.attributeSelect,i=h._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(i){var o=Y(i,".attribute-select");o.legp_search(t);for(var s=h._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],a=0;a<t.length;a++)if(t[a].key===h.options.attributeType){s.value=t[a].value,o.legp_searchActive(t[a].value);break}s.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===s.value){h.attributeType=t[e].key;break}}))}var r=[{name:"空间长度",value:"空间长度"},{name:"投影长度",value:"投影长度"},{name:"地表长度",value:"地表长度"}],l=Y(h._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(l){l.legp_search(r);var c=h._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];h._elms.wordsName=[c],c.value=h.options["words-name"];for(var u=0;u<r.length;u++)if(r[u].value===c.value){l.legp_searchActive(r[u].value);break}c.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===c.value){h.wordsName=r[t].value;break}}))}var p=[{name:"米",value:"米"},{name:"千米",value:"千米"}],d=Y(h._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit",1);if(d){d.legp_search(p);var m=h._DialogObject._element.content.getElementsByClassName("input-select-unit")[1].getElementsByTagName("input")[0];h._elms.lengthUnit=[m],m.value=h.options["length-unit"];for(var f=0;f<p.length;f++)if(p[f].value===m.value){d.legp_searchActive(p[f].value);break}m.addEventListener("input",(function(){for(var t=0;t<p.length;t++)if(p[t].value===m.value){h.lengthUnit=p[t].value;break}}))}var v=[{name:"实线",value:"实线",key:0},{name:"虚线",value:"虚线",key:1},{name:"泛光",value:"泛光",key:2}],g=Y(h._DialogObject._element.content.getElementsByClassName("input-select-line-type-box")[0],".input-select-line-type");if(g){g.legp_search(v);var y=h._DialogObject._element.content.getElementsByClassName("input-select-line-type")[0].getElementsByTagName("input")[0];h._elms.lineType=[y];for(var b=0;b<v.length;b++)if(v[b].key===h.options.type){g.legp_searchActive(v[b].value),y.value=v[b].value;break}y.addEventListener("input",(function(){for(var t=0;t<v.length;t++)if(v[t].value===y.value){h.lineType=v[t].key;break}}))}var C=h._DialogObject._element.content.getElementsByClassName("height-box")[0],w=C.getElementsByClassName("height")[0],k=h._DialogObject._element.content.getElementsByClassName("height-confirm")[0];w.value=10,2==h.heightMode?(C&&(C.className="input-number input-number-unit-1 height-box disabled"),k&&k.setAttribute("disabled","disabled")):(C&&(C.className="input-number input-number-unit-1 height-box"),k&&k.removeAttribute("disabled"));var x=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],_=Y(h._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode");if(_){_.legp_search(x);for(var E=h._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],S=0;S<x.length;S++)if(x[S].key==h.heightMode){E.value=x[S].value,_.legp_searchActive(x[S].value);break}E.addEventListener("input",(function(){for(var t=0;t<x.length;t++)if(x[t].value===E.value){h.heightMode=x[t].key;break}})),w.addEventListener("input",(function(){h.heightMode})),h._elms.height=w,h._elms.heightBox=C,h._elms.heightMode=E,h._elms.heightConfirm=k,h._elms.heightModeObject=_,k.addEventListener("click",(function(){h.positionEditing=!1;for(var t=0;t<h.options.positions.length;t++)h.options.positions[t].alt=Number((h.options.positions[t].alt+Number(w.value)).toFixed(2)),h._elms.alt[t].innerHTML=h.options.positions[t].alt;var i=h.renewPositions(h.options.positions);h.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(i),h.positionEditing=!1,e.closeNodeEdit(h)}))}var D=n.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];h._elms.lng=[],h._elms.lngInput=[],h._elms.lat=[],h._elms.latInput=[],h._elms.alt=[],h._elms.altInput=[];for(var M=function(t){var i=document.createElement("div");i.className="tr",i.innerHTML='\n <div class="td">'.concat(t+1,'</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ');var n=i.getElementsByClassName("lng")[0],o=document.createElement("span");o.innerHTML=h.options.positions[t].lng.toFixed(8),n.appendChild(o);var s=document.createElement("input");s.className="input",s.type="number",s.title="",s.min=-180,s.max=180,s.value=h.options.positions[t].lng.toFixed(8);var a=i.getElementsByClassName("lat")[0],r=document.createElement("span");r.innerHTML=h.options.positions[t].lat.toFixed(8),a.appendChild(r);var l=document.createElement("input");l.className="input",l.type="number",l.title="",l.min=-90,l.max=90,l.value=h.options.positions[t].lat.toFixed(8);var c=i.getElementsByClassName("alt")[0],u=document.createElement("span");u.innerHTML=h.options.positions[t].alt.toFixed(2),c.appendChild(u);var p=document.createElement("input");p.className="input",p.type="number",p.title="",p.min=-9999999,p.max=999999999,p.value=h.options.positions[t].alt.toFixed(2),n.addEventListener("dblclick",(function(){n.innerHTML="",s.value=Number(h.options.positions[t].lng.toFixed(8)),n.appendChild(s),s.focus(),h.positionEditing=!1,e.closeNodeEdit(h)})),s.addEventListener("blur",(function(){s.value=Number(h.options.positions[t].lng.toFixed(8)),n.innerHTML="",n.appendChild(o)})),s.addEventListener("input",(function(){h.options.positions[t].lng=Number(Number(s.value).toFixed(8)),o.innerHTML=h.options.positions[t].lng.toFixed(8);var e=h.renewPositions(h.options.positions);h.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(e),h.label.position=[h.options.positions[0].lng,h.options.positions[0].lat,e[2]]})),a.addEventListener("dblclick",(function(){a.innerHTML="",l.value=Number(h.options.positions[t].lat.toFixed(8)),a.appendChild(l),l.focus(),h.positionEditing=!1,e.closeNodeEdit(h)})),l.addEventListener("blur",(function(){l.value=Number(h.options.positions[t].lat.toFixed(8)),a.innerHTML="",a.appendChild(r)})),l.addEventListener("input",(function(){h.options.positions[t].lat=Number(Number(l.value).toFixed(8)),r.innerHTML=h.options.positions[t].lat.toFixed(8);var e=h.renewPositions(h.options.positions);h.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(e),h.label.position=[h.options.positions[0].lng,h.options.positions[0].lat,e[2]]})),c.addEventListener("dblclick",(function(){2!=h.heightMode&&(c.innerHTML="",p.value=Number(h.options.positions[t].alt.toFixed(2)),c.appendChild(p),p.focus(),h.positionEditing=!1,e.closeNodeEdit(h))})),p.addEventListener("blur",(function(){p.value=Number(h.options.positions[t].alt.toFixed(2)),c.innerHTML="",c.appendChild(u)})),p.addEventListener("input",(function(){h.options.positions[t].alt=Number(Number(p.value).toFixed(2)),u.innerHTML=h.options.positions[t].alt.toFixed(2);var e=h.renewPositions(h.options.positions);h.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(e),h.label.position=[h.options.positions[0].lng,h.options.positions[0].lat,e[2]]})),h._elms.lng.push(o),h._elms.lngInput.push(s),h._elms.lat.push(r),h._elms.latInput.push(l),h._elms.alt.push(u),h._elms.altInput.push(p),D.appendChild(i)},P=0;P<h.options.positions.length;P++)M(P);var O=Rn(),T=Y(h._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(T){T.legp_search(O);var N=h._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];N.value=O[h.labelFontFamily].value;for(var B=0;B<O.length;B++)if(O[B].value==N.value){T.legp_searchActive(O[B].value);break}N.addEventListener("input",(function(){for(var t=0;t<O.length;t++)if(O[t].value===N.value){h.labelFontFamily=O[t].key;break}})),h._elms.labelFontFamily=[N]}}),0),t.next=32;break;case 31:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 32:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"smoothHandle",value:function(t){for(var e=[],i=[],n=[],o=0;o<t.length;o++)n.push(t[o].lng,t[o].lat,t[o].alt),i.push(o/(t.length-1));for(var s=new Cesium.CatmullRomSpline({times:i,points:Cesium.Cartesian3.fromDegreesArrayHeights(n)}),a=20*t.length,r=0;r<=a;r++){var l=s.evaluate(r/a);e.push(this.cartesian3Towgs84(l,this.sdk.viewer))}return e}},{key:"renewPositions",value:function(t){var e=this;if(!this._error){var i,n=JSON.parse(JSON.stringify(t));switch(this.heightMode){case 0:case"0":!1;break;case 1:case"1":for(var o=0;o<n.length;o++){var s=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(n[o].lng,n[o].lat));n[o].alt=Number(s?(n[o].alt+Number(s)).toFixed(2):n[o].alt.toFixed(2))}!1;break;case 2:case"2":!0}var a=[];i=this.options["nose-to-tail"]&&"false"!==this.options["nose-to-tail"]?[].concat(L()(n),[n[0]]):L()(n),i=this.smoothHandle(i);for(var r=0;r<i.length;r++)a.push(i[r].lng,i[r].lat,i[r].alt);if(this.options["nose-to-tail"]&&"false"!==this.options["nose-to-tail"]||this.options.smooth&&"false"!==this.options.smooth){for(var l=[],c=0;c<a.length;c+=3)l.push({lng:a[c],lat:a[c+1],alt:a[c+2]});var u=this;this.computeDistance(l,2,this.options["words-name"]).then((function(t){u.options.fitLengthByMeter=t,u.lengthUnit=u.options["length-unit"]}))}else{var p=this;this.computeDistance(p.smoothHandle(n),2,this.options["words-name"]).then((function(t){p.options.fitLengthByMeter=t,p.lengthUnit=p.options["length-unit"]}))}var h=this;return this.computeDistance(this.smoothHandle(n),2,this.options["words-name"]).then((function(t){h.options.lengthByMeter=t,h.lengthUnit=e.options["length-unit"]})),a}}},{key:"renewPolygon",value:function(t){var e=[];if(this.options.extend&&"false"!==this.options.extend){for(var i=[],n=0;n<t.length;n+=3)e.push([t[n],t[n+1]]);for(var o=turf.lineString(e),s=turf.buffer(o,this.options["extend-width"]/1e3,{units:"kilometers"}),a=0;a<s.geometry.coordinates[0].length;a++)i.push(s.geometry.coordinates[0][a][0],s.geometry.coordinates[0][a][1]);for(var r=[],l=1;l<s.geometry.coordinates.length;l++){for(var c=[],u=0;u<s.geometry.coordinates[l].length;u++)c.push(s.geometry.coordinates[l][u][0],s.geometry.coordinates[l][u][1]);r.push({positions:Cesium.Cartesian3.fromDegreesArray(c)})}this.entity.polygon=new Cesium.PolygonGraphics({hierarchy:{positions:Cesium.Cartesian3.fromDegreesArray(i),holes:r},material:Cesium.Color.fromCssColorString(this.options["extend-color"])})}else this.entity.polygon=void 0}},{key:"reset",value:(r=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.entity){t.next=2;break}return t.abrupt("return");case 2:this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.lineWidth=this.originalOptions.width,this.lineType=this.originalOptions.type,this.noseToTail=this.originalOptions["nose-to-tail"],this.extend=this.originalOptions.extend,this.extendWidth=this.originalOptions["extend-width"],this.extendColor=this.originalOptions["extend-color"],this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect(),this.heightMode=this.options.heightMode;case 32:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=y.length>0&&void 0!==y[0]?y[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(Je(this.sdk),qe(this.sdk),ii(0),!this.options.customView){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Yp({},this.options.position):this.options.positions?l=Yp({},this.options.positions[0]):this.options.center?l=Yp({},this.options.center):this.options.start?l=Yp({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=43;break;case 25:c=[],t.t0=this.options.heightMode,t.next="0"===t.t0||0===t.t0?29:"1"===t.t0||1===t.t0?31:"2"===t.t0||2===t.t0?36:41;break;case 29:for(p=0;p<this.options.positions.length;p++)h=Cesium.Cartesian3.fromDegrees(this.options.positions[p].lng,this.options.positions[p].lat,this.options.positions[p].alt),c.push(h.x,h.y,h.z);return t.abrupt("break",41);case 31:return t.next=33,this.getClampToHeight(this.options.positions[0]);case 33:for(u=t.sent,d=0;d<this.options.positions.length;d++)m=Cesium.Cartesian3.fromDegrees(this.options.positions[d].lng,this.options.positions[d].lat,u+this.options.positions[d].alt),c.push(m.x,m.y,m.z);return t.abrupt("break",41);case 36:return t.next=38,this.getClampToHeight(this.options.positions[0]);case 38:for(u=t.sent,f=0;f<this.options.positions.length;f++)v=Cesium.Cartesian3.fromDegrees(this.options.positions[f].lng,this.options.positions[f].lat,u),c.push(v.x,v.y,v.z);return t.abrupt("break",41);case 41:g=Cesium.BoundingSphere.fromVertices(c),this.sdk.viewer.camera.flyToBoundingSphere(g,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 43:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label&&this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var i=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity)if(this.operate.positionEditing=t,!0===t){e.closeNodeEdit(this),this.event&&this.event.destroy(),this.event=new X(this.sdk),this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1;var n=JSON.parse(JSON.stringify(this.options.positions)),o=this.renewPositions(this.options.positions);this.previous={positions:L()(this.options.positions)};for(var s=0;s<n.length;s++)n[s]=Cesium.Cartesian3.fromDegrees(n[s].lng,n[s].lat,n[s].alt);for(var a=n[Math.floor(n.length/2)],r=[],l=0;l<n.length;l++)r.push({x:a.x-n[l].x,y:a.y-n[l].y,z:a.z-n[l].z});var c=[],u=[];this.event.mouse_move((function(t,e){c=[],u=[];for(var n=0;n<r.length;n++){var s={x:e.x-r[n].x,y:e.y-r[n].y,z:e.z-r[n].z},a=i.cartesian3Towgs84(s,i.sdk.viewer);a.alt=i.options.positions[n].alt,c.push(s),u.push(a)}var l=u[0];o=i.renewPositions(u),i.label.position=[l.lng,l.lat,l.alt],i.options.label.position={lng:l.lng,lat:l.lat,alt:l.alt},i.tip.setPosition(e,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,e){i.event.mouse_move((function(){})),i.event.mouse_left((function(){})),i.event.mouse_right((function(){})),c=[],u=[];for(var n=0;n<r.length;n++){var o={x:e.x-r[n].x,y:e.y-r[n].y,z:e.z-r[n].z},s=i.cartesian3Towgs84(o,i.sdk.viewer);s.alt=i.options.positions[n].alt,c.push(o),u.push(s)}for(var a=[],l=0;l<u.length;l++){var p=u[l];a.push(p),i._elms.lng&&(i._elms.lng[l].innerHTML=p.lng.toFixed(8)),i._elms.lngInput&&(i._elms.lngInput[l].value=p.lng.toFixed(8)),i._elms.lat&&(i._elms.lat[l].innerHTML=p.lat.toFixed(8)),i._elms.latInput&&(i._elms.latInput[l].value=p.lat.toFixed(8)),i._elms.alt&&(i._elms.alt[l].innerHTML=p.alt.toFixed(2)),i._elms.altInput&&(i._elms.altInput[l].value=p.alt.toFixed(2))}i.options.positions=a,i.previous.positions=a;var h=i.renewPositions(i.options.positions);i.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(h),i.renewPolygon(h),i.positionEditing=!1})),this.event.mouse_right((function(t,e){i.event.mouse_move((function(){})),i.event.mouse_left((function(){})),i.event.mouse_right((function(){})),i.positionEditing=!1})),this.event.gesture_pinck_start((function(t,e){var n=new Date;i.event.gesture_pinck_end((function(){var o=new Date,s={position:{x:(t.position1.x+t.position2.x)/2,y:(t.position1.y+t.position2.y)/2}};o-n>=500?(i.event.mouse_move((function(){})),i.event.mouse_left((function(){})),i.event.mouse_right((function(){})),i.positionEditing=!1):leftEvent(s,e)}))})),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegreesArrayHeights(o)}),!1)}else{this.sdk&&this.sdk.viewer&&this.label&&this.label.entity||(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.destroy()),this.tip&&this.tip.destroy();var p=this.renewPositions(this.options.positions);switch(this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(p),this.renewPolygon(p),this.heightMode){case 0:case"0":case 1:case"1":this.label.position=[this.options.positions[0].lng,this.options.positions[0].lat,p[2]],this.options.label.position={lng:this.options.positions[0].lng,lat:this.options.positions[0].lat,alt:p[2]}}}}},{key:"setDIV",value:function(){var t,e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};i.x=i.x||0===i.x?i.x:10,i.y=i.y||0===i.y?i.y:10;for(var n=[],o=0;o<this.options.positions.length;o++)n.push([this.options.positions[o].lng,this.options.positions[o].lat]);var s=turf.lineString(n),a=turf.length(s,{units:"kilometers"}),r=turf.lineSliceAlong(s,0,a/2,{units:"kilometers"}),l=document.getElementById(i.domid),c=(t=Cesium.Cartesian3).fromDegrees.apply(t,L()(r.geometry.coordinates[r.geometry.coordinates.length-1]));this.sdk.viewer.scene.postRender.addEventListener((function(t){if("block"===l.style.display||""===l.style.display){var n=e.sdk.viewer.scene.cartesianToCanvasCoordinates(c);n&&(l.style.left=(n.x+i.x).toFixed(0)+"px",l.style.top=(n.y+i.y).toFixed(0)+"px")}}))}}],[{key:"createLabel",value:(i=o()(a.a.mark((function t(e){var i,n,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=L()(e.sdk.viewer.entities.values),t.t0=e.options.heightMode,t.next="0"===t.t0||0===t.t0?4:"1"===t.t0||1===t.t0?7:"2"===t.t0||2===t.t0?14:19;break;case 4:return n=!1,i=e.options.positions[0].alt,t.abrupt("break",19);case 7:return n=!1,t.next=10,e.getClampToHeight({lng:e.options.positions[0].lng,lat:e.options.positions[0].lat},o);case 10:return t.t1=t.sent,t.t2=e.options.positions[0].alt,i=t.t1+t.t2,t.abrupt("break",19);case 14:return n=!0,t.next=17,e.getClampToHeight({lng:e.options.positions[0].lng,lat:e.options.positions[0].lat},o);case 17:return i=t.sent,t.abrupt("break",19);case 19:e.options.label.position||(e.options.label.position={lng:e.options.positions[0].lng,lat:e.options.positions[0].lat,alt:i}),e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:n});case 21:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"create",value:function(t){var i;i=2==t.heightMode;var n=t.options.positions,o=t.renewPositions(n);t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,polyline:{positions:Cesium.Cartesian3.fromDegreesArrayHeights(o),width:t.options.width,clampToGround:i,material:t.getMaterial(t.options.color,t.options.type),zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t),t.renewPolygon(o),t.computeDistance(t.smoothHandle(n),2,t.options["words-name"]).then((function(e){t.options.lengthByMeter=e,t.lengthUnit=t.options["length-unit"],be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}));t.sdk.viewer.scene}},{key:"nodeEdit",value:function(t){if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus());else{var i;e.closeNodeEdit(t),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.ControllerObject=new Oo(t.sdk),t.event.mouse_left((function(e,n){var o=t.sdk.viewer.scene.pick(e.position);o&&o.id&&o.id.name&&"node-secondary-edit-point"===o.id.name&&(i=o.id,t.ControllerObject.position=t.options.positions[i.index],t.ControllerObject.editTranslational(),t.tip&&t.tip.destroy(),t.ControllerObject.controllerCallBack=function(e){0===i.index&&(t.label.position=[e.position.lng,e.position.lat,e.position.alt],t.options.label.position={lng:e.position.lng,lat:e.position.lat,alt:e.position.alt}),t.options.positions[i.index]=e.position,t._elms.lng&&(t._elms.lng[i.index].innerHTML=e.position.lng.toFixed(8)),t._elms.lngInput&&(t._elms.lngInput[i.index].value=e.position.lng.toFixed(8)),t._elms.lat&&(t._elms.lat[i.index].innerHTML=e.position.lat.toFixed(8)),t._elms.latInput&&(t._elms.latInput[i.index].value=e.position.lat.toFixed(8)),t._elms.alt&&(t._elms.alt[i.index].innerHTML=e.position.alt.toFixed(2)),t._elms.altInput&&(t._elms.altInput[i.index].value=e.position.alt.toFixed(2)),i.position=Cesium.Cartesian3.fromDegrees(e.position.lng,e.position.lat,e.position.alt)})})),t.event.mouse_right((function(e,i){for(var n=0;n<t.nodePoints.length;n++)t.sdk.viewer.entities.remove(t.nodePoints[n]);t.nodePoints=[],t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null,t.ControllerObject.destroy();var o=t.renewPositions(t.options.positions);t.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArrayHeights(o)})),t.event.mouse_move((function(e,i){t.tip.setPosition(i,e.endPosition.x,e.endPosition.y)})),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){var e=t.renewPositions(t.options.positions);return Cesium.Cartesian3.fromDegreesArrayHeights(e)}),!1);for(var n=0;n<t.options.positions.length;n++){var o=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:n,position:Cesium.Cartesian3.fromDegrees(t.options.positions[n].lng,t.options.positions[n].lat,t.options.positions[n].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.push(o)}}}},{key:"closeNodeEdit",value:function(t){t.ControllerObject&&t.ControllerObject.destroy(),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[]}}]);var i,n,s,r,l}(jn);function Kp(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function $p(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Kp(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Kp(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Qp(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var th=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=Qp(this,e,[t,n])).viewer=t.viewer,i.options.show=!n.show&&!1!==n.show||n.show,i.options.name=i.options.name||"未命名对象",i.options.size=i.options.size||0===i.options.size?i.options.size:80,i.options.scaleByDistance=!n.scaleByDistance&&!1!==n.scaleByDistance||n.scaleByDistance,i.event=new X(i.sdk),i.Dialog=o,i.operate={},i._elms={},i._EventBinding=new hn,i.sdk.addIncetance(i.options.id,i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"Explosion"}},{key:"edit",value:(s=o()(a.a.mark((function t(e){var i,n,o=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=15;break}return t.next=6,new Ki(this.sdk,this.options,{title:"爆炸属性",left:"180px",top:"100px",confirmCallBack:function(t){o.name=o.name.trim(),o.name||(o.name="未命名对象"),o.originalOptions=o.deepCopyObj(o.options),o._DialogObject.close(),o.Dialog.confirmCallBack&&o.Dialog.confirmCallBack(o.originalOptions),be(o.sdk,o.options.id),re(o.sdk,o.options.id)},resetCallBack:function(){o.reset(),o.Dialog.resetCallBack&&o.Dialog.resetCallBack()},removeCallBack:function(){o.Dialog.removeCallBack&&o.Dialog.removeCallBack()},closeCallBack:function(){o.reset(),o.positionEditing=!1,o.Dialog.closeCallBack&&o.Dialog.closeCallBack()},showCallBack:function(t){o.options.show=t,o.originalOptions.show=t,o.show=t,o.Dialog.showCallBack&&o.Dialog.showCallBack()},translationalCallBack:function(){o.positionEditing=!o.positionEditing}});case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" explosion",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">随地图缩放</span>\n <input class="btn-switch" type="checkbox" @model="scaleByDistance">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">爆炸范围</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="999999" @model="size">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=i.getElementsByTagName("*"),this._EventBinding.on(this,n),this._elms=this._EventBinding.element,this.scaleByDistance=this.options.scaleByDistance;case 15:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=$p({},this.options.position):this.options.positions?l=$p({},this.options.positions[0]):this.options.center?l=$p({},this.options.center):this.options.start?l=$p({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=24;break;case 23:this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.position.lng,this.options.position.lat,this.options.position.alt+8*this.options.size),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-85),roll:Cesium.Math.toRadians(0)}});case 24:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.previous=null,this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.size=this.originalOptions.size,this.scaleByDistance=this.originalOptions.scaleByDistance,this.lng=this.options.position.lng,this.lat=this.options.position.lat)}},{key:"scaleByDistance",get:function(){return this.options.scaleByDistance},set:function(t){this.options.scaleByDistance=t,this.entity.billboard.sizeInMeters=t,this._elms.scaleByDistance&&this._elms.scaleByDistance.forEach((function(e){e.checked=t}))}},{key:"lng",get:function(){return this.options.position.lng},set:function(t){this.options.position.lng=t,this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.position.lat},set:function(t){this.options.position.lat=t,this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"alt",get:function(){return this.options.position.alt},set:function(t){this.options.position.alt=t,this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t}))}},{key:"size",get:function(){return this.options.size},set:function(t){this.options.size=t,this.entity.billboard.width=this.options.size,this.entity.billboard.height=this.options.size,this._elms.size&&this._elms.size.forEach((function(e){e.value=t}))}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity&&(this.operate.positionEditing=t,!0===t?(this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.previous={position:$p({},this.options.position)},this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.alt=n.alt,e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.alt=n.alt,e.previous={position:$p({},e.options.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=t.lng,e.lat=t.lat,e.alt=t.alt,e.previous={position:$p({},e.options.position)},e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1}}))}))):(this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){}))),this.tip&&this.tip.destroy(),this.previous&&(this.lng=this.previous.position.lng,this.lat=this.previous.position.lat,this.alt=this.previous.position.alt)))}},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),t.next=7,this.sdk.removeIncetance(this.options.id);case 7:return t.next=9,be(this.sdk,this.options.id);case 9:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"flicker",value:function(){}}],[{key:"create",value:function(t){for(var e=[],i=10001;i<=10120;i++){var n=t.getSourceRootPath()+"/img/frameAnimation/explosion/b".concat(i,".png");e.push(n)}var o=new Cesium.Entity({id:t.options.id,show:t.options.show,position:new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegrees(t.options.position.lng,t.options.position.lat,t.options.position.alt)}),!1),billboard:{image:new Cesium.CallbackProperty((function(){var t=e[o.imgIndex];return o.imgIndex++,o.imgIndex>=e.length&&(o.imgIndex=0),t}),!1),disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:Number.POSITIVE_INFINITY}),!1),width:t.options.size,height:t.options.size,sizeInMeters:t.options.scaleByDistance,pixelOffset:{x:0,y:-20}}});o.imgIndex=0,t.entity=t.viewer.entities.add(o),be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}}]);var i,n,s}(jn);function eh(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">扩散半径</span>\n <div class="input-number input-number-unit-2 input-radius">\n <input class="input" type="number" title="" data-min="0.1" max="999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <div class="input-radius-unit-box" style="flex: 0 0 60px;">\n <div class="input-radius-unit"></div>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n <div class="col">\n <span class="label">持续时间</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="100" max="99999" @model="duration">\n <span class="unit">ms</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <div class="row">\n <div class="col">\n <span class="label">范围颜色</span>\n <div class="colorOut"></div>\n </div>\n <div class="col">\n <span class="label">扫描颜色</span>\n <div class="colorIn"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <DIV-cy-tabs id="radar-scan-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n </div>\n <span class="custom-divider"></span>\n ')}function ih(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function nh(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ih(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ih(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function oh(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return sh(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?sh(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function sh(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function ah(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var rh=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=ah(this,e,[t,i])).options.lng=i.lng,n.options.lat=i.lat,n.options.alt=i.alt,n.options.colorOut=i.colorOut||"rgba(255,255,0,0.3)",n.options.colorIn=i.colorIn||"rgba(255,0,0,0.3)",n.options.radius=i.radius||10,n.options.radius>999999&&(n.options.radius=999999),n.options.duration=i.duration||2e3,n.event=new X(n.sdk),n.options.positionEditin=!1,i.label=i.label||{},n.options.label={text:n.options.name,show:i.label.show||!1,position:i.label.position,fontSize:i.label.fontSize||0===i.label.fontSize?i.label.fontSize:20,fontFamily:i.label.fontFamily?i.label.fontFamily:0,color:i.label.color||"#ffffff",lineWidth:i.label.lineWidth||0===i.label.lineWidth?i.label.lineWidth:4,pixelOffset:i.label.pixelOffset||0===i.label.pixelOffset?i.label.pixelOffset:20,backgroundColor:i.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:i.label.lineColor||"#00ffff80",scaleByDistance:i.label.scaleByDistance||!1,near:i.label.near||0===i.label.near?i.label.near:2e3,far:i.label.far||0===i.label.far?i.label.far:1e5},n.options.instruct=i.instruct||"",n.options.operatingPoint=i.operatingPoint||"",n.options.attribute=i.attribute||{},n.options.attribute.vr=n.options.attribute.vr||{},n.options.attribute.vr.content=n.options.attribute.vr.content||[],n.options.attribute.link=n.options.attribute.link||{},n.options.attribute.link.content=n.options.attribute.link.content||[],n.options.attribute.camera=n.options.attribute.camera||{},n.options.attribute.camera=n.options.attribute.camera.content||[],n.options.attribute.ISC=n.options.attribute.ISC||{},n.options.attribute.ISC.content=n.options.attribute.ISC.content||[],n.options.attribute.goods=n.options.attribute.goods||{},n.options.attribute.goods.content=n.options.attribute.goods.content||[],n.options.attributeType=i.attributeType||"richText",n._elms={},n.Dialog=o,n._EventBinding=new hn,n.ControllerObject=new Oo(n.sdk),n.sdk.addIncetance(n.options.id,n),e.radarSolidScan(n),n}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"RadarScanStereoscopic"}},{key:"positionEditing",get:function(){return"translational"===this.ControllerObject.getActiveState()},set:function(t){var e=this;this.sdk&&this.sdk.viewer&&this.entity&&(t?(this.picking=!1,this.ControllerObject.position={lng:this.options.lng,lat:this.options.lat,alt:this.options.alt},this.ControllerObject.editTranslational(),this.ControllerObject.controllerCallBack=function(t){e.lng=t.position.lng,e.lat=t.position.lat,e.alt=t.position.alt}):(setTimeout((function(){e.picking=!0}),500),this.ControllerObject.destroy()))}},{key:"lng",get:function(){return this.options.lng},set:function(t){this.options.lng=Number(t),this.label.position=[t,this.lat,this.alt+this.radius],this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t})),e.changeParam(this)}},{key:"lat",get:function(){return this.options.lat},set:function(t){this.options.lat=Number(t),this.label.position=[this.lng,t,this.alt+this.radius],this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t})),e.changeParam(this)}},{key:"alt",get:function(){return this.options.alt},set:function(t){this.options.alt=Number(t),this.label.position=[this.lng,this.lat,t+this.radius],this._elms.alt&&this._elms.alt.forEach((function(e){e.value=t})),e.changeParam(this)}},{key:"radius",get:function(){return this.options.radius},set:function(t){var i=Number(t.toFixed(2));(i>999999&&(i=999999),i<.1&&(i=.1),this.options.radius=i,this.label.position=[this.lng,this.lat,this.alt+t],this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content)&&("千米"===this._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value&&(i=Number((i/1e3).toFixed(5))));this._elms.radius&&this._elms.radius.forEach((function(t){t.value=i})),e.changeParam(this)}},{key:"duration",get:function(){return this.options.duration},set:function(t){this.options.duration=t,this._elms.duration&&this._elms.duration.forEach((function(e){e.value=t})),e.changeParam(this)}},{key:"colorOut",get:function(){return this.options.colorOut},set:function(t){var e=this;this.options.colorOut=t,this.entity.ellipsoid.material=Cesium.Color.fromCssColorString(t),this.entity.ellipsoid.outlineColor=Cesium.Color.fromCssColorString(t),this._elms.colorOut&&this._elms.colorOut.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.colorOut=t},clear:function(){e.colorOut="rgba(255,255,255,1)"}});e._elms.colorOut[n]=o}))}},{key:"colorIn",get:function(){return this.options.colorIn},set:function(t){var e=this;this.options.colorIn=t,this.entity.wall.material=Cesium.Color.fromCssColorString(t),this._elms.colorIn&&this._elms.colorIn.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.colorIn=t},clear:function(){e.colorIn="rgba(255,255,255,1)"}});e._elms.colorIn[n]=o}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"instruct",get:function(){return this.options.instruct},set:function(t){this.options.instruct=t,this._elms.instruct&&this._elms.instruct.forEach((function(e){e.value=t}))}},{key:"operatingPoint",get:function(){return this.options.operatingPoint},set:function(t){this.options.operatingPoint=t,this._elms.operatingPoint&&this._elms.operatingPoint.forEach((function(e){e.value=t}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=oh(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=oh(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeISC",get:function(){return this.options.attribute.ISC.content},set:function(t){this.options.attribute.ISC.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=oh(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=oh(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=36;break}return t.next=6,new Ki(this.sdk,this.options,{title:"立体雷达扫描属性",left:"180px",top:"100px",confirmCallBack:function(t){h.name=h.name.trim(),h.name||(h.name="未命名对象"),h.options.label.position={lng:h.label.position[0],lat:h.label.position[1],alt:h.options.alt+h.options.radius},h.label.position=[h.options.label.position.lng,h.options.label.position.lat,h.options.label.position.alt],h.originalOptions=h.deepCopyObj(h.options),h._DialogObject.close(),h.Dialog.confirmCallBack&&h.Dialog.confirmCallBack(h.originalOptions),be(h.sdk,h.options.id),re(h.sdk,h.options.id)},resetCallBack:function(){h.reset(),h.Dialog.resetCallBack&&h.Dialog.resetCallBack()},removeCallBack:function(){h.Dialog.removeCallBack&&h.Dialog.removeCallBack(h.options)},closeCallBack:function(){h.reset(),h.Dialog.closeCallBack&&h.Dialog.closeCallBack(),h.positionEditing&&(h.positionEditing=!1),h.positionEditing=!1},showCallBack:function(t){h.options.show=t,h.originalOptions.show=t,h.show=t,h.Dialog.showCallBack&&h.Dialog.showCallBack()},translationalCallBack:function(){h.positionEditing=!h.positionEditing}},!0);case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" radar-scan-stereoscopic",(i=document.createElement("div")).innerHTML=eh(this),this._DialogObject.contentAppChild(i),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,this.attributeISC=this.options.attribute.ISC.content,new dn("radar-scan-edit-tabs",void 0,this.sdk),n=new YJColorPicker({el:i.getElementsByClassName("colorOut")[0],size:"mini",alpha:!0,defaultColor:this.colorOut,disabled:!1,openPickerAni:"opacity",sure:function(t){h.colorOut=t},clear:function(){h.colorOut="rgba(255,255,255,1)"}}),o=new YJColorPicker({el:i.getElementsByClassName("colorIn")[0],size:"mini",alpha:!0,defaultColor:this.colorIn,disabled:!1,openPickerAni:"opacity",sure:function(t){h.colorIn=t},clear:function(){h.colorIn="rgba(255,255,255,1)"}}),s=new YJColorPicker({el:i.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelColor=t},clear:function(){h.labelColor="rgba(255,255,255,1)"}}),r=new YJColorPicker({el:i.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelLineColor=t},clear:function(){h.labelLineColor="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelBackgroundColorStart=t},clear:function(){h.labelBackgroundColorStart="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:i.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){h.labelBackgroundColorEnd=t},clear:function(){h.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),u=i.getElementsByTagName("*"),this._EventBinding.on(this,u),this._elms=this._EventBinding.element,this._elms.colorOut=[n],this._elms.colorIn=[o],this._elms.labelColor=[s],this._elms.labelLineColor=[r],this._elms.labelBackgroundColorStart=[l],this._elms.labelBackgroundColorEnd=[c],(p=this._DialogObject._element.content.getElementsByClassName("input-radius")[0].getElementsByTagName("input")[0]).value=this.options.radius,this._elms.radius=[p],p.addEventListener("input",(function(t){var e=h._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value;if(t.target.value||0===t.target.value){var i=t.target.value;i=Number(i),"."==t.data||"-"==t.data&&!t.target.value||(!t.target.max&&!t.target.min||i<=Number(t.target.max)/("米"===e?1:1e3)&&i>=Number(t.target.min))&&(h.radius=i*("米"===e?1:1e3))}})),p.addEventListener("blur",(function(t){var e=h._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0].value;if(t.target.value||0===t.target.value){var i=t.target.value;i=Number(i),t.target.max&&i>Number(t.target.max)/("米"===e?1:1e3)&&(i=Number(t.target.max)/("米"===e?1:1e3)),t.target.min&&i<Number(t.target.min)&&(i=Number(t.target.min)),h.radius=Number((i*("米"===e?1:1e3)).toFixed(2))}})),setTimeout((function(){h.attributeLink=h.options.attribute.link.content,h.attributeVr=h.options.attribute.vr.content,h.ISCSelect&&h.ISCSelect(),h.goodsSelect&&h.goodsSelect(),h.cameraSelect&&h.cameraSelect();var t=h.attributeSelect,e=h._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=e.getElementsByTagName("input")[0],o=0;o<t.length;o++)if(t[o].key===h.options.attributeType){n.value=t[o].value,i.legp_searchActive(t[o].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){h.attributeType=t[e].key;break}}))}var s=[{name:"米",value:"米"},{name:"千米",value:"千米"}],a=h._DialogObject._element.content.getElementsByClassName("input-radius-unit-box")[0];if(a){Y(a,".input-radius-unit").legp_search(s);var r=h._DialogObject._element.content.getElementsByClassName("input-radius-unit")[0].getElementsByTagName("input")[0];r.value=s[0].value,r.addEventListener("input",(function(){var t=h._DialogObject._element.content.getElementsByClassName("input-radius")[0],e=t.getElementsByClassName("unit")[0],i=t.getElementsByClassName("input")[0];switch(r.value){case"米":"km"===e.innerHTML&&(e.innerHTML="m",i.value=Number((1e3*i.value).toFixed(2)));break;case"千米":"m"===e.innerHTML&&(e.innerHTML="km",i.value=Number((i.value/1e3).toFixed(5)))}}))}var l=Rn(),c=Y(h._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(c){c.legp_search(l);var u=h._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];u.value=l[h.labelFontFamily].value;for(var p=0;p<l.length;p++)if(l[p].value==u.value){c.legp_searchActive(l[p].value);break}u.addEventListener("input",(function(){for(var t=0;t<l.length;t++)if(l[t].value===u.value){h.labelFontFamily=l[t].key;break}})),h._elms.labelFontFamily=[u]}}),0);case 36:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"flyTo",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=nh({},this.options.position):this.options.positions?l=nh({},this.options.positions[0]):this.options.center?l=nh({},this.options.center):this.options.start?l=nh({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=27;break;case 23:return t.next=25,this.getClampToHeight({lng:this.options.lng,lat:this.options.lat});case 25:c=t.sent,this.sdk.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat,6*this.options.radius+c),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)},duration:1});case 27:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.lng=this.originalOptions.lng,this.lat=this.originalOptions.lat,this.alt=this.originalOptions.alt,this.colorOut=this.originalOptions.colorOut,this.colorIn=this.originalOptions.colorIn,this.radius=this.originalOptions.radius,this.duration=this.originalOptions.duration,this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.instruct=this.originalOptions.instruct,this.operatingPoint=this.originalOptions.operatingPoint,this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.attributeISC=this.options.attribute.ISC.content,this.positionEditing=!1,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect())}},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=6,this.sdk.removeIncetance(this.options.id);case 6:return t.next=8,be(this.sdk,this.options.id);case 8:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"instructSubmit",value:function(){this.Dialog.instructSubmit&&this.Dialog.instructSubmit(this.options.id,this.options.label.text,this.instruct),this.originalOptions.instruct=this.instruct}},{key:"operatingPointSubmit",value:function(){this.Dialog.operatingPointSubmit&&this.Dialog.operatingPointSubmit(this.options.id,this.options.label.text,this.operatingPoint),this.originalOptions.operatingPoint=this.operatingPoint}},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=document.getElementById(e.domid),n=Cesium.Cartesian3.fromDegrees(this.options.lng,this.options.lat,this.options.alt+this.options.radius);this.sdk.viewer.scene.postRender.addEventListener((function(o){if("block"===i.style.display||""===i.style.display){var s=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);s&&(i.style.left=(s.x+e.x).toFixed(0)+"px",i.style.top=(s.y+e.y).toFixed(0)+"px")}}))}}],[{key:"radarSolidScan",value:function(t){var i=t.sdk.viewer,n=t.options,o=(n.radius,n.lng,n.lat,n.alt,t.options.duration?360/t.options.duration*Cesium.getTimestamp():0),s=a(t.options,t.options.radius,o);(new Date).getTime();function a(t,e,i){var n=t.lng,o=t.lat,s=t.alt,a=Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(n,o,s)),r=e*Math.cos(i*Math.PI/180),l=e*Math.sin(i*Math.PI/180),c=Cesium.Cartesian3.fromElements(r,l,s),u=Cesium.Matrix4.multiplyByPoint(a,c,new Cesium.Cartesian3),p=Cesium.Cartographic.fromCartesian(u);return function(t,e,i,n,o){var s=[],a=[];s.push(t,e,o),a.push(o);for(var r=Cesium.Cartesian3.distance(Cesium.Cartesian3.fromDegrees(t,e),Cesium.Cartesian3.fromDegrees(i,n)),l=0;l<=90;l++){var c=r*Math.sin(l*Math.PI/180),u=Math.cos(l*Math.PI/180),p=(i-t)*u+t,h=(n-e)*u+e;s.push(p,h,c+o),a.push(o)}return{positionArr:s,bottomArr:a}}(n,o,Cesium.Math.toDegrees(p.longitude),Cesium.Math.toDegrees(p.latitude),s)}i.clock.onTick.addEventListener((function(){o=t.options.duration?360/t.options.duration*Cesium.getTimestamp():0,s=a(t.options,t.options.radius,o)})),t.entity=i.entities.add({id:t.options.id,show:t.options.show,position:new Cesium.CallbackProperty((function(){return new Cesium.Cartesian3.fromDegrees(t.options.lng,t.options.lat,t.options.alt)}),!1),ellipsoid:{radii:new Cesium.CallbackProperty((function(){return new Cesium.Cartesian3(t.options.radius,t.options.radius,t.options.radius)}),!1),material:Cesium.Color.fromCssColorString(n.colorOut),outline:!0,outlineColor:Cesium.Color.fromCssColorString(n.colorOut),outlineWidth:1,maximumCone:Cesium.Math.toRadians(90)},wall:{positions:new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegreesArrayHeights(s.positionArr)}),!1),material:Cesium.Color.fromCssColorString(n.colorIn),minimumHeights:new Cesium.CallbackProperty((function(){return s.bottomArr}),!1)}}),e.createLabel(t),be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){var i,n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.options.alt){t.next=4;break}i=e.options.alt+e.options.radius,t.next=8;break;case 4:return n=L()(e.sdk.viewer.entities.values),t.next=7,e.getClampToHeight({lng:e.options.lng,lat:e.options.lat},n);case 7:i=t.sent;case 8:e.options.label.position||(e.options.label.position={lng:e.options.lng,lat:e.options.lat,alt:i}),e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,ground:!1,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far});case 10:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"changeParam",value:function(t){}}]);var i,n,s,r}(jn);function lh(t){return'\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col" style="flex: 0 0 60%;">\n <div class="row">\n <div class="col input-select-unit-box">\n <span class="label" style="margin-right: 0px;">投影面积:</span>\n <input class="input input-text" readonly="readonly" type="text" @model="area">\n <div class="input-select-unit"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="row">\n <DIV-cy-tabs id="circle-object-edit-tabs">\n <DIV-cy-tab-pane label="属性信息">\n '.concat(En(t),'\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="空间信息">\n <div class="row">\n <div class="col height-mode-box">\n <span class="label" style="flex: 0 0 56px;">高度模式</span>\n <div class="height-mode"></div>\n </div>\n <div class="col">\n <span class="label">Z值统一增加</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input height" type="number" title="" min="-9999999" max="999999999">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n <button class="confirm height-confirm" style="margin-left: 5px;">确认</button>\n </div>\n </div>\n <div class="row">\n <div class="table spatial-info-table">\n <div class="table-head">\n <div class="tr">\n <div class="th"></div>\n <div class="th">经度(X)</div>\n <div class="th">纬度(Y)</div>\n <div class="th">高度(Z)</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="面风格">\n <div class="row">\n <div class="col">\n <span class="label">面颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">边线颜色</span>\n <div class="lineColor"></div>\n </div>\n <div class="col">\n <span class="label">边线宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="0" max="99" @model="lineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标注风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">标注开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col" style="flex: 0 0 114px;">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ','\n </DIV-cy-tab-pane>\n <DIV-cy-tab-pane label="标签风格">\n ').concat('\n <div class="row">\n <div class="col">\n <span class="label">引线颜色</span>\n <div class="labelLineColor"></div>\n </div>\n <div class="col">\n <span class="label">背景颜色</span>\n <div class="labelBackgroundColorStart" style="margin-right: 10px;"></div>\n <div class="labelBackgroundColorEnd"></div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">引线宽度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="999" @model="labelLineWidth">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">引线长度</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="999" @model="labelPixelOffset">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n ',"\n </DIV-cy-tab-pane>\n </DIV-cy-tabs>\n </div>\n ")}function ch(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function uh(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ch(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ch(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ph(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return hh(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?hh(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function hh(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function dh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var mh=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=dh(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"rgba(255, 0, 0, 0.5)",i.options.heightMode=n.heightMode||0==n.heightMode?n.heightMode:2,i.options.semiMinorAxis=n.semiMinorAxis||0===n.semiMinorAxis?n.semiMinorAxis:10,i.options.semiMajorAxis=n.semiMajorAxis||0===n.semiMajorAxis?n.semiMajorAxis:20,i.options.show=!n.show&&!1!==n.show||n.show,i.options.center=n.center||{},i.options.line=n.line||{},i.options.line.width=i.options.line.width||0===i.options.line.width?i.options.line.width:3,i.options.line.color=i.options.line.color||"rgba(255, 0, 0, 1)",i.options["area-unit"]=n["area-unit"]||"平方米",n.label=n.label||{},i._elms={},i.options.label={text:i.options.name,show:n.label.show||!1,position:n.label.position,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attribute.vr=i.options.attribute.vr||{},i.options.attribute.vr.content=i.options.attribute.vr.content||[],i.options.attribute.camera=i.options.attribute.camera||{},i.options.attribute.camera.content=i.options.attribute.camera.content||[],i.options.attribute.goods=i.options.attribute.goods||{},i.options.attribute.goods.content=i.options.attribute.goods.content||[],i.options.attributeType=n.attributeType||"richText",i.event=new X(i.sdk),i.nodePoints=[],i.operate={},i.Dialog={},i.sdk.addIncetance(i.options.id,i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"SectorObject"}},{key:"heightMode",get:function(){return this.options.heightMode?this.options.heightMode:0},set:function(t){var i=this;this.entity.polygon.hierarchy=[],setTimeout((function(){if(i.options.heightMode=t||0==t?t:2,i.positionEditing=!1,i.entity){var n="";e.closeNodeEdit(i);var o=!1,s=!1;switch(i.renewPositions(),i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.options.heightMode){case"0":case 0:n="海拔高度";break;case"1":case 1:n="相对地表";break;case"2":case 2:o=!0,s=!0,n="依附模型"}i.label.ground=o,i.entity.polyline.clampToGround=o,i.entity.polyline.arcType=o?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,i.entity.polygon.perPositionHeight=!o,i._elms.heightMode&&(i._elms.heightMode.value=n),i._elms.heightModeObject&&i._elms.heightModeObject.legp_searchActive(n),s?(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"),i._elms.heightConfirm&&i._elms.heightConfirm.setAttribute("disabled","disabled")):(i._elms.heightBox&&(i._elms.heightBox.className="input-number input-number-unit-1 height-box"),i._elms.heightConfirm&&i._elms.heightConfirm.removeAttribute("disabled"))}}),50)}},{key:"height",get:function(){return this.options.center.alt},set:function(t){var e,i=this;!t||isNaN(Number(t))?this.options.center.alt=0:this.options.center.alt=Number(Number(t).toFixed(2)),e=2==this.heightMode,this.renewPositions(),setTimeout((function(){i.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),i.entity.polygon.perPositionHeight=!e,i.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),i.entity.polyline.clampToGround=!!e,i.entity.polyline.arcType=e?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE}),0),this._elms.alt&&this._elms.alt.forEach((function(t){t.innerHTML=i.options.center.alt}))}},{key:"startAngle",get:function(){return this.options.startAngle},set:function(t){this.options.startAngle=t,this.height=this.height}},{key:"endAngle",get:function(){return this.options.endAngle},set:function(t){this.options.endAngle=t,this.height=this.height}},{key:"center",get:function(){return this.options.center},set:function(t){var e=this;this.options.center=t,this.height=this.height,this._elms.lng&&this._elms.lng.forEach((function(t){t.innerHTML=e.options.center.lng})),this._elms.lat&&this._elms.lat.forEach((function(t){t.innerHTML=e.options.center.lat}))}},{key:"radius",get:function(){return this.options.radius},set:function(t){this.options.radius=t,this.height=this.height}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=Cesium.Color.fromCssColorString(this.options.color);2===this.sdk.viewer.scene.mode&&(i=new Cesium.CustomColorMaterialSource({color:this.options.color})),this.entity.polygon.material=i,this.entity.polyline.width=this.lineWidth,this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,0,0,0.5)"}});e._elms.color[i]=n}))}}},{key:"lineColor",get:function(){return this.options.line.color},set:function(t){var e=this;this.options.line.color=t||"rgba(255, 0, 0, 0.5)",this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polyline&&(this.entity.polyline.material=Cesium.Color.fromCssColorString(this.options.line.color),this._elms.lineColor&&this._elms.lineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.options.line.color,disabled:!1,openPickerAni:"opacity",sure:function(t){e.lineColor=t},clear:function(){e.lineColor="rgba(255,0,0,0.5)"}});e._elms.lineColor[i]=n})))}},{key:"lineWidth",get:function(){return this.options.line.width},set:function(t){var e=this;this.options.line.width=t||0===t?t:3,this.entity.polyline.width=this.options.line.width,this._elms.lineWidth&&this._elms.lineWidth.forEach((function(t){t.value=e.options.line.width}))}},{key:"area",get:function(){return this.options.area},set:function(t){this.options.area=t,this._elms.area&&this._elms.area.forEach((function(e){e.value=t}))}},{key:"areaUnit",get:function(){return this.options["area-unit"]},set:function(t){if(this.options["area-unit"]=t,this._elms.areaUnit&&this._elms.areaUnit.forEach((function(e){e.value=t})),this.options.areaByMeter)switch(t){case"平方米":this.area=this.options.areaByMeter;break;case"平方千米":this.area=Number((this.options.areaByMeter/1e6).toFixed(8));break;case"亩":this.area=Number((this.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":this.area=Number((this.options.areaByMeter/1e4).toFixed(6));break;default:this.area=this.options.areaByMeter}}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){this.options.label.show=t,this.show?this.label.show=t:this.label.show=!1,this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label.color=t,this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label.fontSize=t,this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label.scaleByDistance=t,this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label.near=e,this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label.far=e,this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"labelLineWidth",get:function(){return this.options.label.lineWidth},set:function(t){this.options.label.lineWidth=t,this.label.lineWidth=t,this._elms.labelLineWidth&&this._elms.labelLineWidth.forEach((function(e){e.value=t}))}},{key:"labelPixelOffset",get:function(){return this.options.label.pixelOffset},set:function(t){this.options.label.pixelOffset=t,this.label.pixelOffset=t,this._elms.labelPixelOffset&&this._elms.labelPixelOffset.forEach((function(e){e.value=t}))}},{key:"labelLineColor",get:function(){return this.options.label.lineColor},set:function(t){var e=this;this.options.label.lineColor=t,this.label.lineColor=t,this._elms.labelLineColor&&this._elms.labelLineColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelLineColor=t},clear:function(){e.labelLineColor="rgba(0,255,255,0.5)"}});e._elms.labelLineColor[i]=n}))}},{key:"labelBackgroundColorStart",get:function(){return this.options.label.backgroundColor[0]},set:function(t){var e=this;this.options.label.backgroundColor[0]=t,this.label.backgroundColor=[t,this.label.backgroundColor[1]],this._elms.labelBackgroundColorStart&&this._elms.labelBackgroundColorStart.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorStart=t},clear:function(){e.labelBackgroundColorStart="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorStart[i]=n}))}},{key:"labelBackgroundColorEnd",get:function(){return this.options.label.backgroundColor[1]},set:function(t){var e=this;this.options.label.backgroundColor[1]=t,this.label.backgroundColor=[this.label.backgroundColor[0],t],this._elms.labelBackgroundColorEnd&&this._elms.labelBackgroundColorEnd.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelBackgroundColorEnd=t},clear:function(){e.labelBackgroundColorEnd="rgba(255,255,255,1)"}});e._elms.labelBackgroundColorEnd[i]=n}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=ph(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=ph(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeCamera",get:function(){return this.options.attribute.camera.content},set:function(t){this.options.attribute.camera.content=t}},{key:"attributeVr",get:function(){return this.options.attribute.vr.content},set:function(t){var e=this;if(this.options.attribute.vr.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.vr.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.vr.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.vr.content[s].name+'</div>\n <div class="td">'+this.options.attribute.vr.content[s].url+'</div>\n <div class="td">\n <button @click="vrEdit">编辑</button>\n <button @click="vrDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={vrEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.vr.content;case 2:e.attributeVr=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-vr")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.vr.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=ph(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),vrDelete:function(t){e.options.attribute.vr.content.splice(t,1),e.attributeVr=e.options.attribute.vr.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.vr.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeVr=e.options.attribute.vr.content},cancelEdit:function(){e.attributeVr=e.options.attribute.vr.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=ph(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"attributeGoods",get:function(){return this.options.attribute.goods.content},set:function(t){this.options.attribute.goods.content=t}},{key:"edit",value:(r=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=59;break}return o=function(){var t=s.getElementsByClassName("spatial-info-table")[0].getElementsByClassName("table-body")[0];t.innerHTML="",n._elms.lng=[],n._elms.lngInput=[],n._elms.lat=[],n._elms.latInput=[],n._elms.alt=[],n._elms.altInput=[];var i=document.createElement("div");i.className="tr",i.innerHTML='\n <div class="td align-center">圆心坐标</div>\n <div class="td lng align-center"></div>\n <div class="td lat align-center"></div>\n <div class="td alt align-center"></div>\n ';var o=i.getElementsByClassName("lng")[0],a=document.createElement("span");a.innerHTML=n.options.center.lng.toFixed(8),o.appendChild(a);var r=document.createElement("input");r.className="input",r.type="number",r.title="",r.min=-180,r.max=180,r.value=n.options.center.lng.toFixed(8);var l=i.getElementsByClassName("lat")[0],c=document.createElement("span");c.innerHTML=n.options.center.lat.toFixed(8),l.appendChild(c);var u=document.createElement("input");u.className="input",u.type="number",u.title="",u.min=-90,u.max=90,u.value=n.options.center.lat.toFixed(8);var p=i.getElementsByClassName("alt")[0],h=document.createElement("span");h.innerHTML=n.height.toFixed(2),p.appendChild(h);var d=document.createElement("input");d.className="input",d.type="number",d.title="",d.min=-9999999,d.max=999999999,d.value=n.height.toFixed(2),o.addEventListener("dblclick",(function(){o.innerHTML="",r.value=Number(n.options.center.lng.toFixed(8)),o.appendChild(r),r.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),r.addEventListener("blur",(function(){r.value=Number(n.options.center.lng.toFixed(8)),o.innerHTML="",o.appendChild(a)})),r.addEventListener("input",(function(){n.options.center.lng=Number(Number(r.value).toFixed(8)),a.innerHTML=n.options.center.lng.toFixed(8),n.height=n.height})),l.addEventListener("dblclick",(function(){l.innerHTML="",u.value=Number(n.options.center.lat.toFixed(8)),l.appendChild(u),u.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode})),u.addEventListener("blur",(function(){u.value=Number(n.options.center.lat.toFixed(8)),l.innerHTML="",l.appendChild(c)})),u.addEventListener("input",(function(){n.options.center.lat=Number(Number(u.value).toFixed(8)),c.innerHTML=n.options.center.lat.toFixed(8),n.height=n.height})),p.addEventListener("dblclick",(function(){2!=n.heightMode&&(p.innerHTML="",d.value=Number(n.height.toFixed(2)),p.appendChild(d),d.focus(),n.operate.positionEditing&&(n.positionEditing=!1),e.closeNodeEdit(n),n.heightMode=n.heightMode)})),d.addEventListener("blur",(function(){d.value=Number(n.height.toFixed(2)),p.innerHTML="",p.appendChild(h)})),d.addEventListener("input",(function(){n.height=Number(Number(d.value).toFixed(2)),h.innerHTML=Number(n.height.toFixed(2))})),n._elms.lng.push(a),n._elms.lngInput.push(r),n._elms.lat.push(c),n._elms.latInput.push(u),n._elms.alt.push(h),n._elms.altInput.push(d),t.appendChild(i)},t.next=7,new Ki(this.sdk,this.options,{title:"扇形属性",left:"180px",top:"100px",confirmCallBack:function(t){w.name=w.name.trim(),w.name||(w.name="未命名对象"),w.options.label.position={lng:w.label.position[0],lat:w.label.position[1],alt:w.label.position[2]},w.originalOptions=w.deepCopyObj(w.options),w._DialogObject.close(),w.Dialog.confirmCallBack&&w.Dialog.confirmCallBack(w.originalOptions),be(w.sdk,w.options.id),re(w.sdk,w.options.id)},resetCallBack:function(){w.reset(),w.Dialog.resetCallBack&&w.Dialog.resetCallBack()},removeCallBack:function(){w.Dialog.removeCallBack&&w.Dialog.removeCallBack()},closeCallBack:function(){w.reset(),w.positionEditing=!1,w.Dialog.closeCallBack&&w.Dialog.closeCallBack()},showCallBack:function(t){w.options.show=t,w.originalOptions.show=t,w.show=t,w.Dialog.showCallBack&&w.Dialog.showCallBack()},translationalCallBack:function(){w.positionEditing=!w.positionEditing},secondaryEditCallBack:function(){e.nodeEdit(w,(function(){o()}))}});case 7:if(this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" circle",(s=document.createElement("div")).innerHTML=lh(this),this._DialogObject.contentAppChild(s),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera.content,new dn("circle-object-edit-tabs",void 0,this.sdk),r=new YJColorPicker({el:s.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){w.color=t},clear:function(){w.color="rgba(255,255,255,1)"}}),l=new YJColorPicker({el:s.getElementsByClassName("lineColor")[0],size:"mini",alpha:!0,defaultColor:this.lineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.lineColor=t},clear:function(){w.lineColor="rgba(255,255,255,1)"}}),c=new YJColorPicker({el:s.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelColor=t},clear:function(){w.labelColor="rgba(255,255,255,1)"}}),u=new YJColorPicker({el:s.getElementsByClassName("labelLineColor")[0],size:"mini",alpha:!0,defaultColor:this.labelLineColor,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelLineColor=t},clear:function(){w.labelLineColor="rgba(255,255,255,1)"}}),p=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorStart")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorStart,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorStart=t},clear:function(){w.labelBackgroundColorStart="rgba(255,255,255,1)"}}),h=new YJColorPicker({el:s.getElementsByClassName("labelBackgroundColorEnd")[0],size:"mini",alpha:!0,defaultColor:this.labelBackgroundColorEnd,disabled:!1,openPickerAni:"opacity",sure:function(t){w.labelBackgroundColorEnd=t},clear:function(){w.labelBackgroundColorEnd="rgba(255,255,255,1)"}}),d=s.getElementsByTagName("*"),e.EventBinding(this,d),this._elms.color=[r],this._elms.lineColor=[l],this._elms.labelColor=[c],this._elms.labelLineColor=[u],this._elms.labelBackgroundColorStart=[p],this._elms.labelBackgroundColorEnd=[h],m=this._DialogObject._element.content.getElementsByClassName("height-box")[0],f=m.getElementsByClassName("height")[0],v=this._DialogObject._element.content.getElementsByClassName("height-confirm")[0],f.value=10,2==this.heightMode?(m&&(m.className="input-number input-number-unit-1 height-box disabled"),v&&v.setAttribute("disabled","disabled")):(m&&(m.className="input-number input-number-unit-1 height-box"),v&&v.removeAttribute("disabled")),g=[{name:"海拔高度",value:"海拔高度",key:"0"},{name:"相对地表",value:"相对地表",key:"1"},{name:"依附模型",value:"依附模型",key:"2"}],!(y=Y(this._DialogObject._element.content.getElementsByClassName("height-mode-box")[0],".height-mode"))){t.next=56;break}y.legp_search(g),b=this._DialogObject._element.content.getElementsByClassName("height-mode")[0].getElementsByTagName("input")[0],C=0;case 40:if(!(C<g.length)){t.next=48;break}if(g[C].key!=this.heightMode){t.next=45;break}return b.value=g[C].value,y.legp_searchActive(g[C].value),t.abrupt("break",48);case 45:C++,t.next=40;break;case 48:b.addEventListener("input",(function(){for(var t=0;t<g.length;t++)if(g[t].value===b.value){w.heightMode=g[t].key;break}})),f.addEventListener("input",(function(){w.heightMode})),this._elms.height=f,this._elms.heightBox=m,this._elms.heightMode=b,this._elms.heightConfirm=v,this._elms.heightModeObject=y,v.addEventListener("click",(function(){w.operate.positionEditing?(w.positionEditing=!1,w.height=w.height+Number(f.value)):(e.closeNodeEdit(w),w.heightMode=w.heightMode,setTimeout((function(){w.height=w.height+Number(f.value)}),100))}));case 56:setTimeout((function(){w.attributeLink=w.options.attribute.link.content,w.attributeVr=w.options.attribute.vr.content,w.cameraSelect&&w.cameraSelect(),w.goodsSelect&&w.goodsSelect();var t=w.attributeSelect,e=w._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0];if(e){var i=Y(e,".attribute-select");i.legp_search(t);for(var n=w._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],s=0;s<t.length;s++)if(t[s].key===w.options.attributeType){n.value=t[s].value,i.legp_searchActive(t[s].value);break}n.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===n.value){w.attributeType=t[e].key;break}}))}var a=[{name:"平方米",value:"平方米"},{name:"平方千米",value:"平方千米"},{name:"亩",value:"亩"},{name:"公顷",value:"公顷"}],r=Y(w._DialogObject._element.content.getElementsByClassName("input-select-unit-box")[0],".input-select-unit");if(r){r.legp_search(a);var l=w._DialogObject._element.content.getElementsByClassName("input-select-unit")[0].getElementsByTagName("input")[0];l.value=w.options["area-unit"];for(var c=0;c<a.length;c++)if(a[c].value===l.value){r.legp_searchActive(a[c].value);break}l.addEventListener("input",(function(){for(var t=0;t<a.length;t++)if(a[t].value===l.value){w.areaUnit=a[t].value;break}}))}var u=Rn(),p=Y(w._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(p){p.legp_search(u);var h=w._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];h.value=u[w.labelFontFamily].value;for(var d=0;d<u.length;d++)if(u[d].value==h.value){p.legp_searchActive(u[d].value);break}h.addEventListener("input",(function(){for(var t=0;t<u.length;t++)if(u[t].value===h.value){w.labelFontFamily=u[t].key;break}})),w._elms.labelFontFamily=[h]}o()}),0),t.next=60;break;case 59:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 60:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"reset",value:function(){var t=this;if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.name=this.originalOptions.name,this.radius=this.originalOptions.radius,this.color=this.originalOptions.color,this.area=this.originalOptions.area,this.areaUnit=this.originalOptions["area-unit"],this.labelShow=this.originalOptions.label.show,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelColor=this.originalOptions.label.color,this.lineWidth=this.originalOptions.line.width,this.lineLength=this.originalOptions.line.length,this.lineColor=this.originalOptions.line.color,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.attributeLink=this.options.attribute.link.content,this.attributeVr=this.options.attribute.vr.content,this.attributeCamera=this.options.attribute.camera.content,this.attributeGoods=this.options.attribute.goods.content,this.cameraSelect&&this.cameraSelect(),this.goodsSelect&&this.goodsSelect(),this.heightMode=this.originalOptions.heightMode,this._elms.lng&&this._elms.lng.forEach((function(e){e.innerHTML=t.options.center.lng})),this._elms.lat&&this._elms.lat.forEach((function(e){e.innerHTML=t.options.center.lat})),this._elms.alt&&this._elms.alt.forEach((function(e){e.innerHTML=t.options.center.alt}));for(var e=0;e<this.nodePoints.length;e++)this.sdk.viewer.entities.remove(this.nodePoints[e]);this.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.tip&&this.tip.destroy()}}},{key:"remove",value:(s=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.label.remove(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,be(this.sdk,this.options.id);case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"_addRr",value:function(){this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value?(this.options.attribute.vr.content.push({name:"全景图",url:this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("vr_add")[0].value="",this.attributeVr=this.options.attribute.vr.content):this.Dialog.clickAddVr&&this.Dialog.clickAddVr()}},{key:"addAttributeRr",value:function(t){this.options.attribute.vr.content.push({name:"全景图",url:t}),this.attributeVr=this.options.attribute.vr.content}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=E.length>0&&void 0!==E[0]?E[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!this.options.customView){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=uh({},this.options.position):this.options.positions?l=uh({},this.options.positions[0]):this.options.center?l=uh({},this.options.center):this.options.start?l=uh({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=60;break;case 23:c=this.entity.polyline.positions.getValue(),u=[],p=0,h=this.cartesian3Towgs84(c[0],this.sdk.viewer),d=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,0),m=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,1e7),f=Cesium.Cartesian3.subtract(m,d,new Cesium.Cartesian3),v=Cesium.Cartesian3.normalize(f,f),g=new Cesium.Ray(d,v),y={},b=this.sdk.viewer.scene.drillPickFromRay(g),C=0;case 35:if(!(C<b.length)){t.next=42;break}if(!b[C].position){t.next=39;break}return y=b[C],t.abrupt("break",42);case 39:C++,t.next=35;break;case 42:if(!y||!y.position){t.next=46;break}p=this.cartesian3Towgs84(y.position,this.sdk.viewer).alt,t.next=55;break;case 46:return t.prev=46,t.next=49,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.terrainProvider,[Cesium.Cartographic.fromDegrees(h.lng,h.lat)]);case 49:w=t.sent,p=w[0].height,t.next=55;break;case 53:t.prev=53,t.t0=t.catch(46);case 55:for(k=Cesium.Cartesian3.fromDegrees(h.lng,h.lat,p),u.push(k.x,k.y,k.z),x=1;x<c.length;x++)u.push(c[x].x,c[x].y,c[x].z);_=Cesium.BoundingSphere.fromVertices(u),this.sdk.viewer.camera.flyToBoundingSphere(_,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 60:case"end":return t.stop()}}),t,this,[[46,53]])}))),function(){return n.apply(this,arguments)})},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"positionEditing",get:function(){return this.operate.positionEditing},set:function(t){var e=this;if(!YJ.Measure.GetMeasureStatus()&&this.sdk&&this.sdk.viewer&&this.entity&&this.entity.polygon){var i=this;this.operate.positionEditing=t,this.event&&this.event.destroy(),this.event=new X(this.sdk),!0===t?(this.previous={center:this.deepCopyObj(this.options.center)},this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.label&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,0.9)")),this.picking=!1,this.renewPositions(),this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);n.alt=e.options.center.alt;var o=0,s=!1;switch(e.options.heightMode){case"0":case 0:s=!1;break;case"1":case 1:o=e.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(n.lng,n.lat))||0,s=!1;break;case"2":case 2:s=!0}var a=e.calSector(n,e.options.radius,e.options.startAngle,e.options.endAngle,360,!0),r=[];if(s){for(var l=0;l<a.length;l++)r.push(a[l].lng,a[l].lat);e.positions=Cesium.Cartesian3.fromDegreesArray(r),e.getClampToHeight({lng:n.lng,lat:n.lat}).then((function(t){e.label&&(e.label.position=[n.lng,n.lat,t])}))}else{for(var c=0;c<a.length;c++)r.push(a[c].lng,a[c].lat,n.alt+o);e.positions=Cesium.Cartesian3.fromDegreesArrayHeights(r),e.label&&(e.label.position=[n.lng,n.lat,n.alt+o])}e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.center.lng=Number(n.lng.toFixed(8)),e.options.center.lat=Number(n.lat.toFixed(8)),e.center=e.options.center,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.previous={center:e.deepCopyObj(e.options.center)},e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.center.lng=t.lng,e.options.center.lat=t.lat,e.center=e.options.center,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.previous={center:e.deepCopyObj(e.options.center)},e.positionEditing=!1}}))})),this.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(i.positions)}),!1),this.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(i.positions),[i.positions[0],i.positions[1]])}),!1)):(this.previous||(this.previous={center:this.deepCopyObj(this.options.center)}),this.options.center=this.deepCopyObj(this.previous.center),this.label&&this.label.entity&&this.label.entity.billboard&&(this.label.entity.billboard.color=Cesium.Color.fromCssColorString("rgba(255,255,255,1)")),this.picking=!0,this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.destroy()),this.tip&&this.tip.destroy(),this.renewPositions(),this.entity.polygon.hierarchy=new Cesium.PolygonHierarchy(i.positions),this.entity.polyline.positions=[].concat(L()(i.positions),[i.positions[0],i.positions[1]]),this.previous=null)}}},{key:"setDIV",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{domid:"",x:10,y:10};e.x=e.x||0===e.x?e.x:10,e.y=e.y||0===e.y?e.y:10;var i=document.getElementById(e.domid),n=Cesium.Cartesian3.fromDegrees(this.options.center.lng,this.options.center.lat);this.sdk.viewer.scene.postRender.addEventListener((function(o){if("block"===i.style.display||""===i.style.display){var s=t.sdk.viewer.scene.cartesianToCanvasCoordinates(n);s&&(i.style.left=(s.x+e.x).toFixed(0)+"px",i.style.top=(s.y+e.y).toFixed(0)+"px")}}))}},{key:"renewPositions",value:function(t){var e=this;if(!this._error){var i=!1;t||(t=this.options.center);var n=0;switch(this.options.heightMode){case"0":case 0:i=!1;break;case"1":case 1:n=this.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(t.lng,t.lat))||0,i=!1;break;case"2":case 2:i=!0}var o=this.calSector(t,this.options.radius,this.options.startAngle,this.options.endAngle,360,!0),s=[];if(i){for(var a=0;a<o.length;a++)s.push(o[a].lng,o[a].lat);this.positions=Cesium.Cartesian3.fromDegreesArray(s),setTimeout((function(){e.getClampToHeight({lng:t.lng,lat:t.lat}).then((function(i){e.label&&(e.label.position=[t.lng,t.lat,i])}))}),100)}else{for(var r=0;r<o.length;r++)s.push(o[r].lng,o[r].lat,t.alt+n);this.positions=Cesium.Cartesian3.fromDegreesArrayHeights(s),this.label&&(this.label.position=[t.lng,t.lat,t.alt+n])}var l=this.options.endAngle-this.options.startAngle;return l<0&&(l=360+l),this.options.areaByMeter=Number((Cesium.Math.PI*this.options.radius*this.options.radius*(l/360)).toFixed(2)),this.areaUnit=this.areaUnit,o}}}],[{key:"create",value:function(t){var i=t.calSector(t.options.center,t.options.radius,t.options.startAngle,t.options.endAngle,360,!0),n=!0,o=0;switch(t.options.heightMode){case"0":case 0:n=!1;break;case"1":case 1:o=t.sdk.viewer.scene.globe.getHeight(Cesium.Cartographic.fromDegrees(t.options.center.lng,t.options.center.lat))||0,n=!1;break;case"2":case 2:n=!0}t.options.label.position||(t.options.label.position={lng:t.options.center.lng,lat:t.options.center.lat,alt:t.options.center.alt+o});var s=Cesium.Color.fromCssColorString(t.options.color);2===t.sdk.viewer.scene.mode&&(n=!1,s=new Cesium.CustomColorMaterialSource({color:t.options.color}));var a=[];if(t.options.label.ground=n,n){for(var r=0;r<i.length;r++)a.push(i[r].lng,i[r].lat);t.positions=Cesium.Cartesian3.fromDegreesArray(a)}else{for(var l=0;l<i.length;l++)a.push(i[l].lng,i[l].lat,t.options.center.alt+o);t.positions=Cesium.Cartesian3.fromDegreesArrayHeights(a)}t.entity=t.sdk.viewer.entities.add({id:t.options.id,show:t.options.show,polygon:{hierarchy:new Cesium.PolygonHierarchy(t.positions),perPositionHeight:!n,material:s,zIndex:t.sdk._entityZIndex},polyline:{positions:[].concat(L()(t.positions),[t.positions[0],t.positions[1]]),width:t.options.line.width,material:Cesium.Color.fromCssColorString(t.options.line.color),clampToGround:!!n,arcType:n?Cesium.ArcType.GEODESIC:Cesium.ArcType.NONE,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,e.createLabel(t);var c=t.options.endAngle-t.options.startAngle;switch(c<0&&(c=360+c),t.options.areaByMeter=Number((Cesium.Math.PI*t.options.radius*t.options.radius*(c/360)).toFixed(2)),t.options["area-unit"]){case"平方米":t.options.area=t.options.areaByMeter;break;case"平方千米":t.options.area=Number((t.options.areaByMeter/1e6).toFixed(8));break;case"亩":t.options.area=Number((t.options.areaByMeter/666.6666667).toFixed(4));break;case"公顷":t.options.area=Number((t.options.areaByMeter/1e4).toFixed(6));break;default:t.options.area=t.options.areaByMeter}be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"createLabel",value:(i=o()(a.a.mark((function t(e){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.label=new Jn(e.sdk,{id:e.options.id,show:!!e.options.show&&e.options.label.show,position:[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far,ground:e.options.label.ground});case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"nodeEdit",value:function(t){if(t.positionEditing=!1,YJ.Measure.GetMeasureStatus());else{var e,i=function(t){function e(t,e){var i=Math.PI/180,n=t.y*i,o=e.y*i,s=t.x*i,a=e.x*i,r=Math.sin(a-s)*Math.cos(o),l=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(a-s),c=Math.atan2(r,l)%(2*Math.PI);return 360-(450-(180*c/Math.PI<0?360+180*c/Math.PI:180*c/Math.PI)-90)%360}var i=t[0],n=t[1],o=t[2],s={x:i.lng,y:i.lat},a={x:n.lng,y:n.lat},r={x:o.lng,y:o.lat};return{angle1:e(s,a),angle2:e(s,r)}},n=function(){var e=o()(a.a.mark((function e(i,n){var o,s,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.cartesian3Towgs84(i,t.sdk.viewer),e.next=3,t.getClampToHeight(o);case 3:s=e.sent,r=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",type:n,position:Cesium.Cartesian3.fromDegrees(o.lng,o.lat,s),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),t.nodePoints.push(r);case 6:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}();t.event&&t.event.destroy(),t.event=new X(t.sdk),YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个编辑点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];var s=t.calSector(t.options.center,t.options.radius,t.options.startAngle,t.options.endAngle),r=[],l=t.options.radius,c={angle1:t.options.startAngle,angle2:t.options.endAngle};t.entity.polyline.clampToGround=!0,t.entity.polyline.arcType=Cesium.ArcType.GEODESIC,t.entity.polygon.perPositionHeight=!1,t.entity.polygon.hierarchy=new Cesium.CallbackProperty((function(){return new Cesium.PolygonHierarchy(s)}),!1),t.entity.polyline.positions=new Cesium.CallbackProperty((function(){return[].concat(L()(s),[s[0],s[1]])}),!1);var u=t.entity.polyline.positions.getValue();r=[uh({},t.center),t.cartesian3Towgs84(u[1],t.sdk.viewer),t.cartesian3Towgs84(u[u.length-4],t.sdk.viewer)],setTimeout((function(){n(u[1],"sector-start"),n(u[u.length-4],"sector-end"),t.event.mouse_left((function(i,n){if(e)t.options.startAngle=c.angle1,t.options.endAngle=c.angle2,t.options.radius=l,t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null,e=null,YJ.Measure.SetMeasureStatus(!1),t.heightMode=t.heightMode;else{var o=t.sdk.viewer.scene.pick(i.position);if(o&&o.id&&o.id.name&&"node-secondary-edit-point"===o.id.name&&("sector-start"===o.id._type||"sector-end"===o.id._type)){t.tip.set_text("左键确认,右键取消"),e=o.id;for(var s=0;s<t.nodePoints.length;s++)t.sdk.viewer.entities.remove(t.nodePoints[s]);t.nodePoints=[]}}})),t.event.mouse_move((function(n,o){if(e){var a=t.cartesian3Towgs84(o,t.sdk.viewer);"sector-start"===e._type&&(r[1]=a),"sector-end"===e._type&&(r[2]=a),c=i(r);var u=Cesium.Cartesian3.fromDegrees(r[0].lng,r[0].lat,0),p=Cesium.Cartesian3.fromDegrees(a.lng,a.lat,0);l=Cesium.Cartesian3.distance(u,p),s=t.calSector(t.options.center,l,c.angle1,c.angle2)}t.tip.setPosition(o,n.endPosition.x,n.endPosition.y)})),t.event.mouse_right((function(e,i){for(var n=0;n<t.nodePoints.length;n++)t.sdk.viewer.entities.remove(t.nodePoints[n]);t.nodePoints=[],t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null,t.heightMode=t.heightMode}))}),200)}}},{key:"closeNodeEdit",value:function(t){YJ.Measure.SetMeasureStatus(!1),t.event&&t.event.destroy(),t.tip&&t.tip.destroy(),t.tip=null;for(var e=0;e<t.nodePoints.length;e++)t.sdk.viewer.entities.remove(t.nodePoints[e]);t.nodePoints=[],t.picking=!0}},{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=ph(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}}]);var i,n,s,r}(jn);function fh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var vh=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=fh(this,e,[t,n])).source=new Cesium.CustomDataSource(i.options.id),i.detail=[],i}return Xi()(e,t),_()(e,[{key:"show",get:function(){return this.options.show},set:function(t){this.source&&(this.source.show=t,this.options.show=t)}},{key:"setDefaultValue",value:function(){var t;this.options.id=this.options.id||Cesium.createGuid(),this.options.url=this.options.url||"",this.options.show=null===(t=this.options.show)||void 0===t||t}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=l.length>0&&void 0!==l[0]?l[0]:3,ii(0),Je(this.sdk),qe(this.sdk),this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation?(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i,duration:e})):this.source&&this.viewer.flyTo(this.source,{duration:e});case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"remove",value:function(){var t,i,n,o,s;(t=e,i="remove",n=this,o=3,s=Ks()(Ji()(1&o?t.prototype:t),i,n),2&o&&"function"==typeof s?function(t){return s.apply(n,t)}:s)([]),this.viewer.dataSources.remove(this.source),this.source=null}},{key:"on",value:(i=o()(a.a.mark((function t(){var e=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.show=this.options.show,t.next=3,Cesium.KmlDataSource.load(this.options.url,{camera:this.viewer.scene.camera,canvas:this.viewer.scene.canvas});case 3:return t.sent.entities.values.forEach((function(t,i){if(e.detail.push({name:t.name,id:t.id}),t.label){var n=1;t.billboard&&(n=t.billboard.scale._value),t.label.pixelOffset=new Cesium.Cartesian2(0,-32*n-15),t.label.horizontalOrigin=Cesium.HorizontalOrigin.CENTER,t.label.disableDepthTestDistance=Number.POSITIVE_INFINITY}if(t.polygon){var o={hierarchy:t.polygon.hierarchy.getValue().positions,material:t.polygon.material,classificationType:Cesium.ClassificationType.BOTH};if(t.polygon.outline.getValue()){var s=t.polygon.hierarchy.getValue().positions,a=new Cesium.Entity({id:e.getOutlineId(t.id),polyline:{positions:s,width:t.polygon.outlineWidth.getValue(),material:t.polygon.outlineColor.getValue(),clampToGround:!0,zIndex:e.sdk._entityZIndex}});e.source.entities.add(a)}t.polygon=o}t.billboard&&(t.billboard.heightReference=Cesium.HeightReference.CLAMP_TO_GROUND),t.polyline&&(t.polyline={positions:t.polyline.positions.getValue(),material:t.polyline.material,clampToGround:!0,width:t.polyline.width?t.polyline.width.getValue():1}),t.show=!0,e.source.entities.add(t)})),t.next=7,this.viewer.dataSources.add(this.source);case 7:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getOutlineId",value:function(t){return[t,"outline"].join("_")}}]);var i,n}(jn);function gh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var yh=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=gh(this,e,[t,n])).primitive=void 0,i.positions=[],i.loading=!0,i}return Xi()(e,t),_()(e,[{key:"setDefaultValue",value:function(){var t,i,n,o,s;(t=e,i="setDefaultValue",n=this,o=3,s=Ks()(Ji()(1&o?t.prototype:t),i,n),2&o&&"function"==typeof s?function(t){return s.apply(n,t)}:s)([]),this.options.host=this.options.host||h(),this.options.color=this.options.color||"rgb(239, 6, 6, 1)",this.options.width=this.options.width||1}},{key:"show",get:function(){return this.options.show},set:function(t){if(this.options.show=t,this.entity)for(var e=0;e<this.entity.entities.values.length;e++)this.entity.entities.values[e].show=t}},{key:"on",value:(n=o()(a.a.mark((function t(){var i,n,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="",i=(i=this.options.host.endsWith("yjearth4.0")?this.options.host+"/data/service/getFile":this.options.host+"/yjearth4.0/data/service/getFile")+"?path="+encodeURIComponent(this.options.url),t.next=5,fetch(i,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}});case 5:return n=t.sent,t.next=8,n.json();case 8:return o=t.sent,this.geojson=o,t.abrupt("return",e.addDataToGlobe(this,o.features));case 11:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"remove",value:function(){var t=this;this.entity&&(this.entity.entities.values.forEach((function(e){t.sdk.viewer.entities.remove(e)})),this.entity=null,this.geojson={})}},{key:"flyTo",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.loading){t.next=24;break}if(!this.geojson){t.next=24;break}if(ii(0),Je(this.sdk),qe(this.sdk),e=turf.bbox(this.geojson),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}return i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:e[0],lat:e[1]},t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent,n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=24;break;case 23:this.viewer.camera.flyTo({destination:(c=Cesium.Rectangle).fromDegrees.apply(c,L()(e))});case 24:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"flicker",value:function(){}}],[{key:"addDataToGlobe",value:function(t){for(var e=new Cesium.GeoJsonDataSource,i=t.deepCopyObj(t.geojson),n=0;n<i.features.length;n++)i.features[n].id||(i.features[n].id=t.options.id+"_"+n);return e.load(i,{clampToGround:!0}).then((function(e){t.entity=e,e.entities.values.forEach((function(e){var i=Cesium.Color.fromCssColorString(t.options.color),n=i.withAlpha(.2);e.show=t.options.show,t.sdk.viewer.entities.add(e),e.billboard&&(e.billboard.heightReference=Cesium.HeightReference.CLAMP_TO_GROUND,e.point=new Cesium.PointGraphics({show:!0,color:i,pixelSize:10,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY})),e.polyline&&(e.polyline.material=i,e.polyline.zIndex=t.sdk._entityZIndex,t.sdk._entityZIndex++),e.polygon&&(e.polygon.perPositionHeight=!1,e.polygon.material=n,e.polygon.zIndex=t.sdk._entityZIndex,e.polyline=new Cesium.PolylineGraphics({positions:e.polygon.hierarchy._value.positions,width:1,clampToGround:!0,material:i,zIndex:t.sdk._entityZIndex}),t.sdk._entityZIndex++)})),t.loading=!1}))}}]);var i,n}(jn);function bh(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ch(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?bh(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):bh(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function wh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var kh=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=wh(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.color=n.color||"rgba(32,67,135,0.5)",i.options.positions=n.positions||[],i.options.frequency=n.frequency||10,i.options.animationSpeed=n.animationSpeed||1,i.options.amplitude=n.amplitude||10,i.options.show=!n.show&&!1!==n.show||n.show,i.Dialog=o,i._EventBinding=new hn,i._elms={},i.sdk.addIncetance(i.options.id,i),e.create(i),i}return Xi()(e,t),_()(e,[{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t,this.entity&&(this.entity.appearance.material.uniforms.baseWaterColor=Cesium.Color.fromCssColorString(t)),this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"frequency",get:function(){return this.options.frequency},set:function(t){this.options.frequency=t,this.entity&&(this.entity.appearance.material.uniforms.frequency=10*t),this._elms.frequency&&this._elms.frequency.forEach((function(e){e.value=t}))}},{key:"animationSpeed",get:function(){return this.options.animationSpeed},set:function(t){this.options.animationSpeed=t,this.entity&&(this.entity.appearance.material.uniforms.animationSpeed=.01*t),this._elms.animationSpeed&&this._elms.animationSpeed.forEach((function(e){e.value=t}))}},{key:"amplitude",get:function(){return this.options.amplitude},set:function(t){this.options.amplitude=t,this.entity&&(this.entity.appearance.material.uniforms.amplitude=t),this._elms.amplitude&&this._elms.amplitude.forEach((function(e){e.value=t}))}},{key:"height",get:function(){return this.options.height},set:function(t){this.options.height=t;var e=this.options.positions[0],i=Cesium.Cartesian3.fromDegrees(e.lng,e.lat,t),n=Cesium.Cartesian3.fromDegrees(e.lng,e.lat,this.entity.originalHeight);this.entity.modelMatrix=Cesium.Matrix4.setTranslation(this.entity.modelMatrix,new Cesium.Cartesian3(i.x-n.x,i.y-n.y,i.z-n.z),new Cesium.Matrix4),this._elms.height&&this._elms.height.forEach((function(e){e.value=t}))}},{key:"edit",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s=this,r=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=r.length>0&&void 0!==r[0]&&r[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=19;break}return t.next=7,new Ki(this.sdk,this.originalOptions,{title:"水面属性",left:"180px",top:"100px",confirmCallBack:function(t){s.name=s.name.trim(),s.name||(s.name="未命名对象"),s.originalOptions=s.deepCopyObj(s.options),s._DialogObject.close(),s.Dialog.confirmCallBack&&s.Dialog.confirmCallBack(s.originalOptions),be(s.sdk,s.options.id),re(s.sdk,s.options.id)},resetCallBack:function(){s.reset(),s.Dialog.resetCallBack&&s.Dialog.resetCallBack()},removeCallBack:function(){s.Dialog.removeCallBack&&s.Dialog.removeCallBack()},closeCallBack:function(){s.reset(),s.Dialog.closeCallBack&&s.Dialog.closeCallBack()},showCallBack:function(t){s.show=t,s.Dialog.showCallBack&&s.Dialog.showCallBack()}},!0);case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" water-surface",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="water-color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="height">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">水面振幅</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="100" step="1" @model="amplitude">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">动画速度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" max="10" min="0" step="0.1" @model="animationSpeed">\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">水面频率</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" max="100" min="0" step="1" @model="frequency">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=new YJColorPicker({el:i.getElementsByClassName("water-color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){s.color=t},clear:function(){s.color="rgba(255,255,255,1)"}}),o=i.getElementsByTagName("*"),this._EventBinding.on(this,o),this._elms=this._EventBinding.element,this._elms.color=[n],t.next=19;break;case 19:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.name=this.originalOptions.name,this.color=this.originalOptions.color,this.frequency=this.originalOptions.frequency,this.animationSpeed=this.originalOptions.animationSpeed,this.amplitude=this.originalOptions.amplitude,this.height=this.originalOptions.height)}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=d.length>0&&void 0!==d[0]?d[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=Ch({},this.options.position):this.options.positions?l=Ch({},this.options.positions[0]):this.options.center?l=Ch({},this.options.center):this.options.start?l=Ch({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=28;break;case 23:c=Cesium.Rectangle.fromCartesianArray(this.entity.geometryInstances.geometry._polygonHierarchy.positions),u=this.sdk.viewer.camera.getRectangleCameraCoordinates(c),p=this.cartesian3Towgs84(u,this.sdk.viewer),h=Cesium.Cartesian3.fromDegrees(p.lng,p.lat,p.alt+this.height),this.sdk.viewer.camera.flyTo({orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)},destination:h});case 28:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.sdk.viewer.scene.primitives.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=5,this.sdk.removeIncetance(this.options.id);case 5:return t.next=7,be(this.sdk,this.options.id);case 7:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"flicker",value:function(){}}],[{key:"create",value:function(t){for(var e=t.options.positions,i=[],n=e[0].alt,o=0;o<e.length;o++)i.push(e[o].lng,e[o].lat),n<e[o].alt&&(n=e[o].alt);t.options.height||0===t.options.height||(t.options.height=n),t.entity=t.sdk.viewer.scene.primitives.add(new Cesium.Primitive({id:t.options.id,show:t.options.show,asynchronous:!1,releaseGeometryInstances:!1,geometryInstances:new Cesium.GeometryInstance({name:"water-surface",geometry:new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(i)),vertexFormat:Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT,height:t.options.height})}),appearance:new Cesium.EllipsoidSurfaceAppearance({aboveGroud:!0,material:new Cesium.Material({fabric:{type:"Water",uniforms:{baseWaterColor:Cesium.Color.fromCssColorString(t.options.color),normalMap:t.getSourceRootPath()+"/img/water.png",frequency:10*t.options.frequency,animationSpeed:.01*t.options.animationSpeed,amplitude:t.options.amplitude}}})})})),t.entity.id=t.options.id,t.entity.originalHeight=t.options.height,be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}}]);var i,n,s}(jn);function xh(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return _h(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function _h(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Eh(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Sh(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Eh(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Eh(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Dh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Mh(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Ph(t,e,i){return t.set(Th(t,e),i),i}function Oh(t,e){return t.get(Th(t,e))}function Th(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Nh=new WeakMap,Bh=new WeakMap,Lh=new WeakMap,Ah=new WeakMap,jh=new WeakMap,Ih=new WeakMap,Fh=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),Mh(i=Dh(this,e,[t,n]),Nh,null),Mh(i,Bh,!1),Mh(i,Lh,void 0),Mh(i,Ah,void 0),Mh(i,jh,void 0),Mh(i,Ih,void 0),i.options.name=n.name||"",i.options.show=!n.show&&!1!==n.show||n.show,i.options.speed=n.speed||0===n.speed?n.speed:1,i.options.speed<=0&&(i.options.speed=.01),i.options.delay=n.delay||0,i.options.loop=!n.loop&&!1!==n.loop||n.loop,i.options.model=n.model=n.model||{},i.options.line=n.line=n.line||{},i.options.line.positions=n.line.positions||[],i.options.height=i.options.line.positions[0]?i.options.line.positions[0].alt:0,i.options.height=Number(i.options.height.toFixed(2)),i.options.line.show=!n.line.show&&!1!==n.line.show||n.line.show,i.options.model.show=!n.model.show&&!1!==n.model.show||n.model.show,i.options.model.url=n.model.url||"",i.options.model.pixelSize=n.model.pixelSize||70,i.options.model.heading=n.model.heading||0,i.options.model.pitch=n.model.pitch||0,i.options.model.roll=n.model.roll||0,i.options.model.scale=n.model.scale||0===n.model.scale?n.model.scale:1,i.options.model.animate=n.model.animate||"无",i.options.line.smooth=!!n.line.smooth&&n.line.smooth,i.options.line.noseToTail=!!n.line.noseToTail&&n.line.noseToTail,i.positions_smooth=[],i.options.ground=n.ground||!1,i.options.state=!n.state&&!1!==n.state||n.state,i.options.routeDirection=!n.routeDirection&&!1!==n.routeDirection||n.routeDirection,i.keyPoints=[],i.realTimePositions=[],i._elms={},i.Dialog=o,i.realTimeRouteArray=[],i.distance,n.label=n.label||{},i.options.label={text:i.options.name,show:n.label.show||!1,fontSize:n.label.fontSize||0===n.label.fontSize?n.label.fontSize:20,fontFamily:n.label.fontFamily?n.label.fontFamily:0,color:n.label.color||"#ffffff",lineWidth:n.label.lineWidth||0===n.label.lineWidth?n.label.lineWidth:4,pixelOffset:n.label.pixelOffset||0===n.label.pixelOffset?n.label.pixelOffset:20,backgroundColor:n.label.backgroundColor||["#00ffff80","#00ffff80"],lineColor:n.label.lineColor||"#00ffff80",scaleByDistance:n.label.scaleByDistance||!1,near:n.label.near||0===n.label.near?n.label.near:2e3,far:n.label.far||0===n.label.far?n.label.far:1e5},i.options.line.positions.length<2?(i._error="最少需要两个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500})):(i.sdk.addIncetance(i.options.id,i),i.ControllerObject=new Oo(i.sdk),i._EventBinding=new hn,i.options.viewFollow=!1,i.options.firstPersonView=!1,e.addLine(i),i.firstPersonView=!1),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"TrajectoryMotion"}},{key:"show",get:function(){return this.options.show},set:function(t){if("boolean"==typeof t){if(this.isShowView||(this.options.show=t,this.originalOptions&&(this.originalOptions.show=t)),this.options.show){this.firstPersonView?this.model.show=!1:this.model.show=(!this.showView||3==this.showView)&&this.modelShow,this.showView&&3!=this.showView?this.line.polyline.material=new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff00"),dashLength:20}):this.line.polyline.material=this.lineShow?new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff"),dashLength:20}):new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff00"),dashLength:20});for(var e=0;e<this.keyPoints.length;e++)this.keyPoints[e].show=(!this.showView||3==this.showView)&&this.keyPointShow;this.realTimeRoute&&this.realTimeLine&&(this.realTimeLine.show=!this.showView||3==this.showView),this.label&&(this.label.show=(!this.showView||3==this.showView)&&this.options.label.show)}else{this.model.show=(!this.showView||3==this.showView)&&this.options.show;var i=this.options.show;i=(!this.showView||3==this.showView)&&this.options.show,this.realTimeLine&&(this.realTimeLine.show=!1),this.line.polyline.material=i?new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff"),dashLength:20}):new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff00"),dashLength:20});for(var n=0;n<this.keyPoints.length;n++)this.keyPoints[n].show=(!this.showView||3==this.showView)&&i;this.label&&(this.label.show=!1),this.viewFollow=!1}this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t),be(this.sdk,this.options.id),re(this.sdk,this.options.id),this.isShowView=!1}else console.error("参数必须为boolean")}},{key:"height",get:function(){return this.options.height},set:function(t){var e=this;if(!this.ground){var i=this.options.height-Number(t.toFixed(2));if(this.options.height=Number(t.toFixed(2)),this.line)if(this.ground);else{var n=this.options.height-this.options.line.positions[0].alt;this.line.polyline.clampToGround=!1;for(var o=0;o<this.keyPoints.length;o++)this.options.line.positions[o].alt+=n,this.keyPoints[o].position=Cesium.Cartesian3.fromDegrees(this.options.line.positions[o].lng,this.options.line.positions[o].lat,this.options.line.positions[o].alt)}if(this.model&&this.model.position){var s=this.model.heading,a=this.model.pitch,r=this.model.roll;if(isNaN(s)||isNaN(a)||isNaN(r))return;var l=Cesium.Transforms.eastNorthUpToFixedFrame(this.model.position);Cesium.Matrix4.multiplyByTranslation(l,new Cesium.Cartesian3(0,0,-i),l),Cesium.Matrix4.getTranslation(l,this.model.position),Cesium.Matrix4.multiplyByMatrix3(l,Cesium.Matrix3.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(s,a,r)),this.entity.modelMatrix),this.label&&(this.label.show=this.label.show),this.options.label.position&&setTimeout((function(){e.options.label.position.alt?e.label&&(e.label.position=[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt]):e.getClampToHeight({lng:e.options.label.position.lng,lat:e.options.label.position.lat}).then((function(t){e.label&&(e.label.position=[e.options.label.position.lng,e.options.label.position.lat,t])}))}),0)}var c=this.renewLinePositions(this.options.line.positions);this.line.polyline.positions=c,this._elms.height&&this._elms.height.forEach((function(e){e.value=Number(t.toFixed(2))}))}}},{key:"ground",get:function(){return this.options.ground},set:function(t){var e=this;if(this.lineEdit=!1,this.options.ground=t,this.realTimeLine.polyline.clampToGround=t,this.height=this.options.height,this.line&&t){this.line.polyline.clampToGround=!0;for(var i=function(t){e.sdk.viewer.scene.clampToHeightMostDetailed([new Cesium.Cartesian3.fromDegrees(e.options.line.positions[t].lng,e.options.line.positions[t].lat)]).then((function(i){e.keyPoints[t].position=i[0]}))},n=0;n<this.keyPoints.length;n++)i(n)}setTimeout((function(){e.TweenAnimate&&e.TweenAnimate._isPlaying?e.setMovePositionByDistance(e.TweenAnimate._object.distance):e.setMovePositionByDistance(0)}),200),t?this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"):this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box"),this._elms.ground&&this._elms.ground.forEach((function(e){e.checked=t}))}},{key:"modelPixelSize",get:function(){return this.options.model.pixelSize},set:function(t){this.options.model.pixelSize=t,this.model&&(this.model.minimumPixelSize=t),this._elms.modelPixelSize&&this._elms.modelPixelSize.forEach((function(e){e.value=t}))}},{key:"scale",get:function(){return this.options.model.scale},set:function(t){this.options.model.scale=Number(t),this.model&&(this.model.scale=t,this.model.customScale={x:this.options.model.scale,y:this.options.model.scale,z:this.options.model.scale}),this._elms.scale&&this._elms.scale.forEach((function(e){e.value=t}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){t<=0&&(t=.01),this.options.speed=t,this.state&&this.TweenAnimate&&this.TweenAnimate._isPlaying&&this.setMovePositionByDistance(this.TweenAnimate._object.distance),this._elms.speed&&this._elms.speed.forEach((function(e){e.value=t}))}},{key:"smooth",get:function(){return this.options.line.smooth},set:function(t){this.lineEdit=!1,this.options.line.smooth=t;var e=this.renewLinePositions(this.options.line.positions);this.line.polyline.positions=e,this.model.position=e[0],this.modelMove(e),this._elms.smooth&&this._elms.smooth.forEach((function(e){e.checked=t}))}},{key:"delay",get:function(){return this.options.delay},set:function(t){this.options.delay=t,this.TweenAnimate&&this.TweenAnimate._isPlaying&&this.TweenAnimate.delay(this.delay),this._elms.delay&&this._elms.delay.forEach((function(e){e.value=t}))}},{key:"state",get:function(){return this.options.state},set:function(t){var e=this;if(this.options.state=t,cancelAnimationFrame(Oh(Lh,this)),this.editObj&&(this.editObj.destroy(),this.editObj=null,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&(this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].innerHTML="开始调整",this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].className="btn model-rotate-btn")),this.TweenAnimate&&this.TweenAnimate._isPlaying)if(clearTimeout(this.TweenAnimate.timeout),t)this.lineEdit=!1,this.TweenAnimate.isPlaying()?this.TweenAnimate.timeout=setTimeout((function(){e.TweenAnimate.resume()}),this.options.delay):this.TweenAnimate.delay(this.delay).start(),this.speed=this.speed;else{var i=Sh({},this.sdk.viewer.camera._position),n=this;Ph(Lh,this,requestAnimationFrame((function t(){n.firstPersonView&&n.sdk.viewer.camera.setView({destination:Sh({},i),orientation:{heading:n.sdk.viewer.camera.heading,pitch:n.sdk.viewer.camera.pitch,roll:n.sdk.viewer.camera.roll}}),Ph(Lh,n,requestAnimationFrame(t))}))),this.TweenAnimate.pause(),setTimeout((function(){n.model.isMove=!1}),200)}else if(t){var o=this.renewLinePositions(this.options.line.positions);this.modelMove(o)}this._elms.state&&this._elms.state.forEach((function(e){e.checked=t}))}},{key:"modelShow",get:function(){return this.options.model.show},set:function(t){this.options.model.show=t;var e=t;e=!(!this.show||this.showView&&3!=this.showView)&&t,this.model&&this.show&&(this.model.show=e),this._elms.modelShow&&this._elms.modelShow.forEach((function(e){e.checked=t}))}},{key:"modelAnimate",get:function(){return this.options.model.animate},set:function(t){if(this.options.model.animate=t,this.model&&this.model.loader.components){var e=this.model.loader.components.animations;if(this.model.activeAnimations.removeAll(),e&&e.length>0)for(var i=0;i<e.length;i++)if(e[i].name==t){this.model.activeAnimations.add({index:i,loop:Cesium.ModelAnimationLoop.REPEAT,speedup:1,reverse:!1});break}this._elms.modelAnimate&&this._elms.modelAnimate.forEach((function(e){e.value=t}))}}},{key:"noseToTail",get:function(){return this.options.line.noseToTail},set:function(t){this.lineEdit=!1,this.options.line.noseToTail=t;for(var e=[],i=0;i<this.options.line.positions.length;i++)e.push(this.options.line.positions[i].lng,this.options.line.positions[i].lat,this.options.line.positions[i].alt);Cesium.Cartesian3.fromDegreesArrayHeights(e);if(this.line){var n=this.renewLinePositions(this.options.line.positions);this.line.polyline.positions=n,this.model.position=n[0],this.modelMove(n)}this._elms.noseToTail&&this._elms.noseToTail.forEach((function(e){e.checked=t}))}},{key:"lineShow",get:function(){return this.options.line.show},set:function(t){t&&(this.realTimeRoute=!1),this.options.line.show=t;var e=t;e=(!this.showView||3==this.showView)&&t,this.line&&this.show&&(this.line.polyline.material=e?new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff"),dashLength:20}):new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff00"),dashLength:20})),this._elms.lineShow&&this._elms.lineShow.forEach((function(e){e.checked=t}))}},{key:"realTimeRoute",get:function(){return this.options.realTimeRoute},set:function(t){t&&(this.lineShow=!1,this.keyPointShow=!1),this.options.realTimeRoute=t,this.realTimeLine&&this.show&&(this.realTimeLine.show=t),this._elms.realTimeRoute&&this._elms.realTimeRoute.forEach((function(e){e.checked=t}))}},{key:"keyPointShow",get:function(){return this.options.line.keyPoint},set:function(t){this.options.line.keyPoint=t;for(var e=0;e<this.keyPoints.length;e++)this.show&&(this.keyPoints[e].show=t);this._elms.keyPointShow&&this._elms.keyPointShow.forEach((function(e){e.checked=t})),!t&&this.lineEdit&&(Ph(Bh,this,t),YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.ControllerObject&&this.ControllerObject.destroy(),this.tip&&this.tip.destroy(),this.tip=null,this._elms.lineEdit&&this._elms.lineEdit.forEach((function(e){e.checked=t})))}},{key:"lineEdit",get:function(){return Oh(Bh,this)},set:function(t){var e=this,i=[],n=function(t){i=e.renewLinePositions(t),e.model.position=i[0],e.modelMove(i)};if(t){if(this.viewFollow=!1,YJ.Measure.GetMeasureStatus())return console.warn("上一次测量未结束"),void(this.lineEdit=!1);var o;this.ground=!1,this.smooth=!1,this.state=!1,YJ.Measure.SetMeasureStatus(!0),this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.tip=new Z("请选择一个顶点,右键取消",this.sdk),this.event=new X(this.sdk),n(L()(this.options.line.positions));var s=function(t,i){var s=e.sdk.viewer.scene.pick(t.position);if(s&&s.id&&s.id.name&&"node-secondary-edit-point"===s.id.name)for(var a=0;a<e.keyPoints.length;a++)if(e.keyPoints[a].id===s.id.id){o=s.id,e.ControllerObject.position=e.options.line.positions[o.index],e.ControllerObject.editTranslational(),e.tip&&e.tip.destroy(),e.tip=null,e.ControllerObject.controllerCallBack=function(t){e.options.line.positions[o.index]=t.position,0===o.index&&(e.options.height=e.options.line.positions[o.index].alt,e._elms.height&&e._elms.height.forEach((function(t){t.value=Number(e.options.height.toFixed(2))}))),o.position=Cesium.Cartesian3.fromDegrees(t.position.lng,t.position.lat,t.position.alt),n(L()(e.options.line.positions))};break}};this.event.mouse_left(s),this.event.mouse_right((function(t,i){e.keyPointShow=!1,YJ.Measure.SetMeasureStatus(!1),e.event.destroy(),e.tip&&e.tip.destroy(),e.tip=null,e.ControllerObject.destroy()})),this.event.mouse_move((function(t,i){e.tip&&e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.gesture_pinck_start((function(t,i){var n=new Date,o={position:{x:(t.position1.x+t.position2.x)/2,y:(t.position1.y+t.position2.y)/2}};e.event.gesture_pinck_end((function(){new Date-n>=500?(e.keyPointShow=!1,YJ.Measure.SetMeasureStatus(!1),e.event.destroy(),e.tip&&e.tip.destroy(),e.tip=null,e.ControllerObject.destroy()):s(o)}))})),this.line.polyline.positions=new Cesium.CallbackProperty((function(){return i}),!1),this.keyPointShow=t}else this.lineEdit&&(YJ.Measure.SetMeasureStatus(!1),this.event.destroy(),this.tip&&this.tip.destroy(),this.tip=null),this.keyPointShow=t,this.ControllerObject.destroy();Ph(Bh,this,t),this._elms.lineEdit&&this._elms.lineEdit.forEach((function(e){e.checked=t}))}},{key:"routeDirection",get:function(){return this.options.routeDirection},set:function(t){this.options.routeDirection=t,this._elms.routeDirection&&this._elms.routeDirection.forEach((function(e){e.checked=t}))}},{key:"loop",get:function(){return this.options.loop},set:function(t){this.options.loop=t,this.TweenAnimate&&this.TweenAnimate._isPlaying&&(t?this.TweenAnimate.repeat(1/0):this.TweenAnimate.repeat()),this._elms.loop&&this._elms.loop.forEach((function(e){e.checked=t}))}},{key:"firstPersonView",get:function(){return this.options.firstPersonView},set:function(t){var e=this,i=le();if((Me()||i.sdkD||!this.show)&&(t=!1),cancelAnimationFrame(Oh(Lh,this)),Oh(Ih,this)&&Oh(Ih,this).destroy(),this.sdk.viewer._firstPersonView=t,this.options.firstPersonView=t,this.options.firstPersonView){if(this.viewFollow=!0,this.firstPersonHeadingPitch={heading:0,pitch:-10},this.state=!0,this.model&&(this.model.show=!1),this._DialogObject&&this._DialogObject._element.content){var n=this._DialogObject._element.content.querySelectorAll("button[name='firstPerson']");n[0].className="btn is-active",n[1].className="btn"}this.sdk.viewer.trackedEntity&&(this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),this.sdk.viewer.trackedEntity=null),Ve(this.sdk,!1);var o,s=le(),a=(o=this.sdk===s.sdkP?s.sdkD:s.sdkP)?o.entityMap.get(this.options.id):void 0;this.sdk&&Ph(Ih,this,new X(this.sdk)),Oh(Ih,this).mouse_right_down((function(t,i){var n=Sh({},t.position);Oh(Ih,e).mouse_move((function(t,i){e.firstPersonHeadingPitch.heading=e.firstPersonHeadingPitch.heading+(t.endPosition.x-n.x)/20,e.firstPersonHeadingPitch.pitch=e.firstPersonHeadingPitch.pitch+(n.y-t.endPosition.y)/10,a&&(a.firstPersonHeadingPitch=Sh({},e.firstPersonHeadingPitch)),n=Sh({},t.endPosition)}),!0)}),!0),Oh(Ih,this).mouse_right_up((function(t,i){Oh(Ih,e).mouse_move((function(){}))}),!0)}else{if(Ve(this.sdk,!0),this.model&&this.modelShow&&this.show){var r=!0;r=!(!this.show||this.showView&&3!=this.showView),this.model.show=r}if(this._DialogObject&&this._DialogObject._element.content){var l=this._DialogObject._element.content.querySelectorAll("button[name='firstPerson']");l[0]&&l[1]&&(l[0].className="btn",l[1].className="btn is-active")}if(this.viewFollow&&this.show){if(this.sdk.viewer.trackedEntity&&this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),3===this.sdk.viewer.scene.mode){var c=this.sdk.viewer.entities.add({position:this.positions_smooth[0],point:{color:Cesium.Color.RED.withAlpha(0),pixelSize:0}});this.sdk.viewer.trackedEntity=c}this.viewFollow=this.viewFollow}}re(this.sdk,this.options.id)}},{key:"viewFollow",get:function(){return this.options.viewFollow},set:function(t){le();var e=Me();if(this.show||(t=!1),this.options.viewFollow=t,this.options.viewFollow?(this.editObj&&(this.editObj.destroy(),this.editObj=null,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&(this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].innerHTML="开始调整",this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].className="btn model-rotate-btn")),Je(this.sdk),this.lineEdit=!1):this.firstPersonView=!1,this.options.firstPersonView){if(this.sdk.viewer.trackedEntity&&(this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),this.sdk.viewer.trackedEntity=null),this._DialogObject&&this._DialogObject._element.content){var i=this._DialogObject._element.content.querySelectorAll("button[name='firstPerson']");i[0]&&i[1]&&(i[0].className="btn",i[1].className="btn is-active")}}else if(this.sdk.viewer.trackedEntity&&(this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),this.sdk.viewer.trackedEntity=null),t&&this.show&&this.model){var n=this.sdk.viewer.entities.add({position:this.model.position,point:{color:Cesium.Color.RED.withAlpha(0),pixelSize:0}});this.sdk.viewer.trackedEntity=n}var o=Pe();if(o)if(this.sdk!=o){var s=o.entityMap.get(this.options.id);s&&s.viewFollow!=t&&(s.viewFollow=t)}else if(e){var a=e.entityMap.get(this.options.id);a&&a.viewFollow!=t&&(a.viewFollow=t,this.TweenAnimate&&this.TweenAnimate._isPlaying&&a.setMovePositionByDistance(this.TweenAnimate._object.distance))}re(this.sdk,this.options.id),this._elms.viewFollow&&this._elms.viewFollow.forEach((function(e){e.checked=t}))}},{key:"labelShow",get:function(){return this.options.label.show},set:function(t){var e=this;this.options.label.show=t;var i=t;i=!(!this.show||this.showView&&3!=this.showView)&&t,this.show?(this.label&&(this.label.show=i),this.options.label.position&&setTimeout((function(){e.options.label.position.alt?e.label&&(e.label.position=[e.options.label.position.lng,e.options.label.position.lat,e.options.label.position.alt]):e.getClampToHeight({lng:e.options.label.position.lng,lat:e.options.label.position.lat}).then((function(t){e.label&&(e.label.position=[e.options.label.position.lng,e.options.label.position.lat,t])}))}),0)):this.label&&(this.label.show=!1),this._elms.labelShow&&this._elms.labelShow.forEach((function(e){e.checked=t}))}},{key:"labelFontFamily",get:function(){return this.options.label.fontFamily},set:function(t){this.options.label.fontFamily=t||0,this.label&&(this.label.fontFamily=this.options.label.fontFamily);var e=Hn(this.labelFontFamily)||"";this._elms.labelFontFamily&&this._elms.labelFontFamily.forEach((function(t){t.value=e}))}},{key:"labelColor",get:function(){return this.options.label.color},set:function(t){var e=this;this.options.label.color=t,this.label&&(this.label.color=t),this._elms.labelColor&&this._elms.labelColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.labelColor=t},clear:function(){e.labelColor="rgba(255,255,255,1)"}});e._elms.labelColor[i]=n}))}},{key:"labelFontSize",get:function(){return this.options.label.fontSize},set:function(t){this.options.label.fontSize=t,this.label&&(this.label.fontSize=t),this._elms.labelFontSize&&this._elms.labelFontSize.forEach((function(e){e.value=t}))}},{key:"labelScaleByDistance",get:function(){return this.options.label.scaleByDistance},set:function(t){this.options.label.scaleByDistance=t,this.label&&(this.label.scaleByDistance=t),this._elms.labelScaleByDistance&&this._elms.labelScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"labelNear",get:function(){return this.options.label.near},set:function(t){var e=t;e>this.labelFar&&(e=this.labelFar),this.options.label.near=e,this.label&&(this.label.near=e),this._elms.labelNear&&this._elms.labelNear.forEach((function(t){t.value=e}))}},{key:"labelFar",get:function(){return this.options.label.far},set:function(t){var e=t;e<this.labelNear&&(e=this.labelNear),this.options.label.far=e,this.label&&(this.label.far=e),this._elms.labelFar&&this._elms.labelFar.forEach((function(t){t.value=e}))}},{key:"modelMove",value:(p=o()(a.a.mark((function t(e){var i,n,s,r,l,c,u,p,h,d,m,f,v,g,b,C,w,k=this,x=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w=function(t,e){var i=Cesium.Transforms.eastNorthUpToFixedFrame(t);if(e){var n=Cesium.Cartesian3.subtract(e,t,new Cesium.Cartesian3),o=Cesium.Matrix4.multiplyByPointAsVector(Cesium.Matrix4.inverse(i,new Cesium.Matrix4),n,new Cesium.Cartesian3),s=Cesium.Cartesian3.normalize(o,new Cesium.Cartesian3),a=Math.atan2(s.y,s.x)-Cesium.Math.PI_OVER_TWO,r=Cesium.Math.PI_OVER_TWO-Cesium.Math.acosClamped(s.z),l=Cesium.Math.fastApproximateAtan2(s.x,s.z);return{heading:Cesium.Math.TWO_PI-Cesium.Math.zeroToTwoPi(a),pitch:r,roll:l}}},C=function(){return(C=o()(a.a.mark((function t(e){var i,o,s,r,c,u,p,d,g,b,C,k,x,_,E,S,D,M,P,O,T,N,B,A,j,I,F,R,z,H,V,G,U,W,Y,J;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.model.isMove=!0,i=Me(),o=le(),n.sdk.viewer&&n.sdk.viewer.scene){t.next=6;break}return n.removeModelAnimate(),t.abrupt("return");case 6:if(c=h,!(s=e)){t.next=16;break}return t.next=12,turf.lineSliceAlong(h,0,s,{units:"kilometers"});case 12:c=t.sent,r=L()(c.geometry.coordinates[c.geometry.coordinates.length-1]),t.next=17;break;case 16:r=L()(h.geometry.coordinates[0]);case 17:if(!n.ground){t.next=57;break}d=[],g=xh(n.sdk.entityMap);try{for(g.s();!(b=g.n()).done;)(C=y()(b.value,2))[0],(!(k=C[1]).type||"glb"!==k.type&&"bim"!==k.type&&"tileset"!==k.type&&"TrajectoryMotion"!==k.type&&"ParticleEffects"!==k.type&&k.entity)&&(d.push(k.entity),k.label&&k.label.entity&&d.push(k.label.entity))}catch(t){g.e(t)}finally{g.f()}if(n.label&&n.label.entity&&d.push(n.label.entity),!(_=Me())||n.sdk!=_){t.next=28;break}x=new Cesium.Cartesian3.fromDegrees(r[0],r[1]),u=x,t.next=32;break;case 28:return t.next=30,n.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(r[0],r[1]),[n.model].concat(d));case 30:x=t.sent,u=x;case 32:return x||(u=new Cesium.Cartesian3.fromDegrees(r[0],r[1])),E=n.cartesian3Towgs84(u,l),S=0,t.prev=35,t.next=38,Cesium.sampleTerrainMostDetailed(n.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(E.lng,E.lat)]);case 38:D=t.sent,S=D[0].height,t.next=45;break;case 42:t.prev=42,t.t0=t.catch(35),S=0;case 45:if(E.alt<S&&(E.alt=S),E.alt=Number(E.alt.toFixed(1)),u=Cesium.Cartesian3.fromDegrees(E.lng,E.lat,E.alt),n.sdk.viewer&&n.sdk.viewer.scene){t.next=51;break}return n.removeModelAnimate(),t.abrupt("return");case 51:for(p=Cesium.Cartesian3.fromDegrees(r[0],r[1],n.cartesian3Towgs84(u,n.sdk.viewer).alt+1.8),M=[],P=0;P<c.geometry.coordinates.length;P++)M.push(c.geometry.coordinates[P][0],c.geometry.coordinates[P][1]);n.realTimePositions=Cesium.Cartesian3.fromDegreesArray(M),t.next=75;break;case 57:if(O=n.spline.evaluate(e/n.distance)){t.next=60;break}return t.abrupt("return");case 60:r=n.cartesian3Towgs84(O,l),u=O,p=Cesium.Cartesian3.fromDegrees(r.lng,r.lat,r.alt+1.8),T=[],N=0;case 65:if(!(N<=1e3)){t.next=73;break}if(!(N/1e3>e/n.distance)){t.next=68;break}return t.abrupt("break",73);case 68:B=n.spline.evaluate(N/1e3),T.push(B);case 70:N++,t.next=65;break;case 73:T.push(O),n.realTimePositions=T;case 75:if(m=w(n.model.position,u),v&&v.position&&(f=w(v.position,u),m.pitch=f.pitch),v.position=n.model.position,Cesium.HeadingPitchRoll.fromDegrees(n.options.model.heading,n.options.model.pitch,n.options.model.roll),A=0,j=0,I=0,F=Cesium.Transforms.eastNorthUpToFixedFrame(u),!n.options.routeDirection||n.lineEdit){t.next=95;break}if(A=m.heading*(180/Math.PI)-90-n.options.model.heading,j=m.pitch*(180/Math.PI)-n.options.model.pitch,I=n.options.model.roll,R=Pe()?Pe().entityMap.get(n.options.id):o.sdkP&&o.sdkP.entityMap.get(n.options.id),n.state||R&&(i&&i===n.sdk||o.sdkD&&o.sdkD===n.sdk)&&(A=R.model.heading,j=R.model.pitch,I=R.model.roll),!(isNaN(A)||isNaN(j)||isNaN(I))){t.next=91;break}return t.abrupt("return");case 91:n.state||(R&&(i&&i===n.sdk||o.sdkD&&o.sdkD===n.sdk)?(A=R.model.heading,j=R.model.pitch,I=R.model.roll):(A=n.model.heading||0===n.model.heading?n.model.heading:n.options.model.heading,j=n.model.pitch||0===n.model.pitch?n.model.pitch:n.options.model.pitch,I=n.model.roll||0===n.model.roll?n.model.roll:n.options.model.roll)),n.model.modelMatrix=Cesium.Matrix4.multiplyByMatrix3(F,Cesium.Matrix3.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(A,j,I)),n.model.modelMatrix),t.next=111;break;case 95:if(!n.entity){t.next=111;break}if(A=n.options.model.heading,j=n.options.model.pitch,I=n.options.model.roll,!(isNaN(A)||isNaN(j)||isNaN(I))){t.next=101;break}return t.abrupt("return");case 101:z=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(I)),H=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(j)),V=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(A)),G=Cesium.Matrix4.fromRotationTranslation(z),U=Cesium.Matrix4.fromRotationTranslation(H),W=Cesium.Matrix4.fromRotationTranslation(V),Y=new Cesium.Matrix4,Cesium.Matrix4.multiply(F,G,Y),Cesium.Matrix4.multiply(Y,U,Y),Cesium.Matrix4.multiply(Y,W,n.entity.modelMatrix);case 111:if(n.model.position=u,n.model.roll=I,n.model.pitch=j,n.model.heading=A,u){t.next=117;break}return t.abrupt("return");case 117:J=n.cartesian3Towgs84(u,n.sdk.viewer),n.label.position=[J.lng,J.lat,J.alt],n.realTimeRouteArray.push(u),n.viewFollow&&(n.options.firstPersonView?n.sdk.viewer.camera.setView({destination:p,orientation:{heading:Cesium.Math.toRadians(A+90+n.firstPersonHeadingPitch.heading),pitch:Cesium.Math.toRadians(n.firstPersonHeadingPitch.pitch),roll:0}}):3===n.sdk.viewer.scene.mode?n.sdk.viewer.trackedEntity&&(n.sdk.viewer.trackedEntity.position=u):n.sdk.viewer.trackedEntity&&n.sdk.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(r.lng,r.lat,n.sdk.viewer.camera.positionCartographic.height),orientation:{heading:Cesium.Math.toRadians(-90),pitch:0,roll:0}}));case 122:case"end":return t.stop()}}),t,null,[[35,42]])})))).apply(this,arguments)},b=function(t){return C.apply(this,arguments)},i=x.length>1&&void 0!==x[1]?x[1]:{time:0},cancelAnimationFrame(Oh(Lh,this)),n=this,s=i.time||0,r=i.distance,l=this.sdk.viewer,this.model&&this.sdk&&this.sdk.viewer){t.next=11;break}return t.abrupt("return");case 11:for(this.removeModelAnimate(),c=[],u=0;u<e.length;u++)p=this.cartesian3Towgs84(e[u],l),c.push([p.lng,p.lat,p.alt]);h=turf.lineString(c),this.distance=turf.length(h,{units:"kilometers"}),d=1e3*this.distance/this.options.speed,r||0===r?(r>this.distance&&(r=this.distance),s=r/this.distance*d):(r=1e-6,s&&(s>d&&(s=d),r=s/d*this.distance)),v={},this.TweenAnimate=new TWEEN.Tween({distance:r}).to({distance:this.distance},1e3*(d-s)).delay(this.delay).easing(TWEEN.Easing.Linear.None).repeat(this.options.loop?1/0:0).onRepeat((function(){(s||r)&&k.modelMove(e)})).onUpdate(function(){var t=o()(a.a.mark((function t(e,i){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k.TweenAnimate._duration!=1/0){t.next=2;break}return t.abrupt("return");case 2:if(k.sdk.viewer){t.next=6;break}return k.removeModelAnimate(),t.abrupt("return");case 6:isNaN(e.distance)||b(e.distance);case 7:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}()).onEveryStart((function(){k.realTimeRouteArray=[]})).onComplete((function(t){k.state=!1})),this.state?this.TweenAnimate.start():(g=function(){if(Ph(Ah,n,requestAnimationFrame(g)),n.options.firstPersonView){var t=Sh({},n.sdk.viewer.camera._position);n.sdk.viewer.camera.setView({destination:t,orientation:{heading:Cesium.Math.toRadians(n.model.heading+90+n.firstPersonHeadingPitch.heading),pitch:Cesium.Math.toRadians(n.firstPersonHeadingPitch.pitch),roll:0}})}},b(r),setTimeout((function(){n.model.isMove=!1}),500),g());case 24:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"setMovePositionByDistance",value:function(t){var e=this.renewLinePositions(this.options.line.positions);this.modelMove(e,{distance:t})}},{key:"setMovePositionByTime",value:function(t){var e=this.renewLinePositions(this.options.line.positions);this.modelMove(e,{time:t})}},{key:"edit",value:(u=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._error){t.next=2;break}return t.abrupt("return");case 2:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=45;break}return t.next=8,new Ki(this.sdk,this.options,{title:"轨迹运动属性",left:"180px",top:"100px",confirmCallBack:function(t){p.name=p.name.trim(),p.name||(p.name="未命名对象"),p.originalOptions=p.deepCopyObj(p.options),p._DialogObject.close();var e=p.deepCopyObj(p.options);e.host="",p.Dialog.confirmCallBack&&p.Dialog.confirmCallBack(e),be(p.sdk,p.options.id),re(p.sdk,p.options.id)},removeCallBack:function(){p.sdk.viewer.trackedEntity&&(p.sdk.viewer.entities.remove(p.sdk.viewer.trackedEntity),p.sdk.viewer.trackedEntity=null),p.Dialog.removeCallBack&&p.Dialog.removeCallBack()},closeCallBack:function(){p._DialogObject=null,p.reset(),p.Dialog.closeCallBack&&p.Dialog.closeCallBack(),p.editObj&&(p.editObj.destroy(),p.editObj=null),p.keyPointShow=!1,p.event&&p.event.destroy(),p.tip&&p.tip.destroy(),p.tip=null,p.ControllerObject.destroy(),p.firstPersonView!==p.originalOptions.firstPersonView&&(p.firstPersonView=p.originalOptions.firstPersonView),p.firstPersonView&&p.modelShow&&p.model&&(p.model.show=!1)},showCallBack:function(t){p.show=t,p.Dialog.showCallBack&&p.Dialog.showCallBack()}});case 8:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" trajectory-motion",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 70px;">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col"></div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 70px;">起始点高度</span>\n <div class="input-number input-number-unit-1 height-box">\n <input class="input" type="number" title="" min="-9999999" max="999999999" @model="height">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">模型倍数</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="0" max="99999" step="1" @model="scale">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 70px;">运行速度</span>\n <div class="input-number input-number-unit-3">\n <input class="input" type="number" title="" min="0" max="99999999" step="1" @model="speed">\n <span class="unit">m/s</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">延迟运动</span>\n <div class="input-number input-number-unit-3">\n <input class="input" type="number" title="" min="0" max="9999999" @model="delay">\n <span class="unit">ms</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label" style="flex: 0 0 70px;">更换模型</span>\n <button class="btn" @click="clickChangeModel">选择</button>\n </div>\n <div class="col">\n <span class="label">模型方向</span>\n <button class="btn model-rotate-btn" @click="modelRotate">开始调整</button>\n <svg class="icon-rubric"><use xlink:href="#yj-icon-rubric"></use></svg>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <div class="btn-group">\n <button class="btn" style="border-radius: 5px 0 0 5px;" name="firstPerson"\n data-state="true"><span>第一视角</span></button>\n <button class="btn" style="border-radius: 0 5px 5px 0;" name="firstPerson"\n data-state="false"><span>第三视角</span></button>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item div-item-switch">\n <div class="row">\n <div class="col">\n <span class="label">路径显隐</span>\n <input class="btn-switch" type="checkbox" @model="lineShow">\n </div>\n <div class="col">\n <span class="label">模型显隐</span>\n <input class="btn-switch" type="checkbox" @model="modelShow">\n </div>\n <div class="col">\n <span class="label">实时路径</span>\n <input class="btn-switch" type="checkbox" @model="realTimeRoute">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">编辑</span>\n <input class="btn-switch" type="checkbox" @model="lineEdit">\n </div>\n <div class="col">\n <span class="label">路径圆滑</span>\n <input class="btn-switch" type="checkbox" @model="smooth">\n </div>\n <div class="col">\n <span class="label">环线</span>\n <input class="btn-switch" type="checkbox" @model="noseToTail">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">轨迹贴地</span>\n <input class="btn-switch" type="checkbox" @model="ground">\n </div>\n <div class="col">\n <span class="label">轨迹循环</span>\n <input class="btn-switch" type="checkbox" @model="loop">\n </div>\n <div class="col">\n <span class="label">轨迹动画</span>\n <input class="btn-switch" type="checkbox" @model="state">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">路径方向</span>\n <input class="btn-switch" type="checkbox" @model="routeDirection">\n </div>\n <div class="col" style="margin-right: 33px;">\n <span class="label">视角跟随</span>\n <input class="btn-switch" type="checkbox" @model="viewFollow">\n </div>\n <div class="col" style="margin: 0px;">\n <span class="label">模型动画</span>\n <div class="input input-select model-animate-select"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">文字开关</span>\n <input class="btn-switch" type="checkbox" @model="labelShow">\n </div>\n <div class="col"></div>\n </div>\n <div class="row">\n <div class="col" style="margin-right: 14px;">\n <span class="label">字体颜色</span>\n <div class="labelColor"></div>\n </div>\n <div class="col font-select-box">\n <span class="label" style="flex: none;">字体选择</span>\n <div class="input input-select font-select"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2" style="width: 82px;">\n <input class="input" type="number" title="" min="1" max="99" @model="labelFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="labelScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1" style="width: 82px;">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1" style="width: 82px;">\n <input class="input" type="number" title="" min="1" max="99999999" @model="labelFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),this.editObj?(this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].innerHTML="结束调整",this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].className="btn model-rotate-btn is-active"):(this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].innerHTML="开始调整",this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].className="btn model-rotate-btn"),n=new YJColorPicker({el:i.getElementsByClassName("labelColor")[0],size:"mini",alpha:!0,defaultColor:this.labelColor,disabled:!1,openPickerAni:"opacity",sure:function(t){p.labelColor=t},clear:function(){p.labelColor=""}}),o=this._DialogObject._element.content.getElementsByClassName("height-box")[0],s=i.getElementsByTagName("*"),this._EventBinding.on(this,s),this._elms=this._EventBinding.element,this._elms.heightBox=o,this._elms.labelColor=[n],this.model&&(r=function(){var t=p.model.loader.components.animations;if(p._DialogObject){if(t){for(var e=[{name:"无",value:"无"}],n=0;n<t.length;n++)e.push({name:t[n].name,value:t[n].name});Y(p._DialogObject._element.content,".model-animate-select").legp_search(e)}var o=i.getElementsByClassName("model-animate-select")[0].getElementsByTagName("input")[0];o.value=p.modelAnimate,o.addEventListener("input",(function(t,e){p.modelAnimate=o.value}))}},Number(Cesium.VERSION.split(".")[1])>=107?this.model.ready?r():this.model.readyEvent.addEventListener((function(){r()})):this.model.readyPromise.then((function(t){r()}))),this.ground?this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box disabled"):this._elms.heightBox&&(this._elms.heightBox.className="input-number input-number-unit-1 height-box"),(l=i.querySelectorAll("button[name='firstPerson']"))[0].addEventListener("click",(function(t){var e=le();Me()||e.sdkD||(p.firstPersonView||(p.viewFollow=!0),p.firstPersonView=!0)})),l[1].addEventListener("click",(function(t){p.firstPersonView&&(p.viewFollow=!0),p.firstPersonView=!1})),this.options.firstPersonView?(l[0].className="btn is-active",l[1].className="btn",this.sdk.viewer.trackedEntity&&(this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),this.sdk.viewer.trackedEntity=null)):(l[0].className="btn",l[1].className="btn is-active"),(c=document.createElement("div")).className="custom-rubric-box",c.style.transformOrigin="center bottom",c.style.position="absolute",c.style.top="180px",c.style.right="3px",c.style.padding="5px 10px",c.style.backgroundColor="#3e4249",c.style.borderRadius="5px",c.style.fontSize="12px",c.style.color="#ff5733",c.style.display="none",c.innerHTML='场景正北方向为轨迹前进正方向<div x-arrow="" class="custom__popper__arrow" style="left: 59px;"></div>',(u=i.getElementsByClassName("icon-rubric")[0]).addEventListener("mouseenter",(function(t){c.style.display="block"})),document.addEventListener("mousemove",(function(t){u.contains(t.target)||(c.style.display="none")})),this._DialogObject._element.content.appendChild(c),setTimeout((function(){var t=Rn(),e=Y(p._DialogObject._element.content.getElementsByClassName("font-select-box")[0],".font-select");if(e){e.legp_search(t);var i=p._DialogObject._element.content.getElementsByClassName("font-select")[0].getElementsByTagName("input")[0];i.value=t[p.labelFontFamily].value;for(var n=0;n<t.length;n++)if(t[n].value==i.value){e.legp_searchActive(t[n].value);break}i.addEventListener("input",(function(){for(var e=0;e<t.length;e++)if(t[e].value===i.value){p.labelFontFamily=t[e].key;break}})),p._elms.labelFontFamily=[i]}}),0);case 45:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"flyTo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ii(0),Je(this.sdk),this.options.customView?this.sdk.viewer.camera.flyTo({destination:this.options.customView.position,orientation:this.options.customView.orientation}):this.line&&this.sdk.viewer.flyTo(this.line,{offset:t.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-60),roll:Cesium.Math.toRadians(0)}})}},{key:"remove",value:(c=o()(a.a.mark((function t(){var e,i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.sdk.viewer.scene.primitives.remove(this.model),this.sdk.viewer.entities.remove(this.line),this.sdk.viewer.entities.remove(this.realTimeLine),this.label&&this.label.remove(),e=0;e<this.keyPointShow.length;e++)this.sdk.viewer.entities.remove(this.keyPointShow[e]);return this.line=null,this.realTimeLine=null,this.model=null,this.label=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),Oh(jh,this)&&Oh(jh,this).destroy(),this.removeModelAnimate(),(i=Me())&&i===this.sdk||(this.viewFollow=!1),cancelAnimationFrame(Oh(Lh,this)),t.next=19,this.sdk.removeIncetance(this.options.id);case 19:return t.next=21,be(this.sdk,this.options.id);case 21:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"reset",value:(l=o()(a.a.mark((function t(){var e,i=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.options.model.url!==this.originalOptions.model.url&&this.changeModelUrl(this.originalOptions.model.url),this.name=this.originalOptions.name,JSON.stringify(this.options.line.positions)!==JSON.stringify(this.originalOptions.line.positions)&&(this.options.line.positions=this.deepCopyObj(this.originalOptions.line.positions),e=this.renewLinePositions(this.options.line.positions),this.line.polyline.positions=e,setTimeout((function(){i.model.position=e[0],i.modelMove(e)}),0)),this.modelShow=this.originalOptions.model.show,this.noseToTail!==this.originalOptions.line.noseToTail&&(this.noseToTail=this.originalOptions.line.noseToTail),this.height!==this.originalOptions.height&&(this.height=this.originalOptions.height),this.lineShow!==this.originalOptions.line.show&&(this.lineShow=this.originalOptions.line.show),this.keyPointShow=this.originalOptions.line.keyPoint,this.routeDirection=this.originalOptions.routeDirection,this.scale=this.originalOptions.model.scale,this.loop!==this.originalOptions.loop&&(this.loop=this.originalOptions.loop),this.viewFollow=this.originalOptions.viewFollow,this.state=this.originalOptions.state,this.speed=this.originalOptions.speed,this.smooth!==this.originalOptions.line.smooth&&(this.smooth=this.originalOptions.line.smooth),this.realTimeRoute=this.originalOptions.realTimeRoute,this.modelAnimate=this.originalOptions.model.animate,this.delay=this.originalOptions.delay,this.ground!==this.originalOptions.ground&&(this.ground=this.originalOptions.ground),this.firstPersonView!==this.originalOptions.firstPersonView&&(this.firstPersonView=this.originalOptions.firstPersonView),this.firstPersonView&&this.modelShow&&this.model&&(this.model.show=!1),this.labelShow=this.originalOptions.label.show,this.labelColor=this.originalOptions.label.color,this.labelFontSize=this.originalOptions.label.fontSize,this.labelFontFamily=this.originalOptions.label.fontFamily,this.labelScaleByDistance=this.originalOptions.label.scaleByDistance,this.labelNear=this.originalOptions.label.near,this.labelFar=this.originalOptions.label.far,this.labelLineWidth=this.originalOptions.label.lineWidth,this.labelPixelOffset=this.originalOptions.label.pixelOffset,this.labelLineColor=this.originalOptions.label.lineColor,this.labelBackgroundColorStart=this.originalOptions.label.backgroundColor[0],this.labelBackgroundColorEnd=this.originalOptions.label.backgroundColor[1],this.options=this.deepCopyObj(this.originalOptions);case 34:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"modelRotate",value:function(){if(this.editObj)this.editObj.destroy(),this.editObj=null,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&(this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].innerHTML="开始调整",this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].className="btn model-rotate-btn");else if(this.viewFollow)window.ELEMENT&&(window.ELEMENT.Message.closeAll(),window.ELEMENT.Message({message:"关闭视角跟随后可调整模型方向!",type:"warning",duration:1500}),console.warn("关闭视角跟随后可调整模型方向!"));else{this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&(this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].innerHTML="结束调整",this._DialogObject._element.content.getElementsByClassName("model-rotate-btn")[0].className="btn model-rotate-btn is-active"),this.state=!1,this.editObj=new nc(this.sdk,this.model),this.editObj.editRtation(),this.editObj.transformCallBack=this.rotationEditingCallBack,this.routeDirection=!1;var t=this.options.model.heading,e=this.options.model.pitch,i=this.options.model.roll;if(isNaN(t)||isNaN(e)||isNaN(i))return;var n=Cesium.Transforms.eastNorthUpToFixedFrame(this.model.position),o=Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(i)),s=Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(e)),a=Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(t)),r=Cesium.Matrix4.fromRotationTranslation(o),l=Cesium.Matrix4.fromRotationTranslation(s),c=Cesium.Matrix4.fromRotationTranslation(a),u=new Cesium.Matrix4;Cesium.Matrix4.multiply(n,r,u),Cesium.Matrix4.multiply(u,l,u),Cesium.Matrix4.multiply(u,c,this.entity.modelMatrix)}}},{key:"clickChangeModel",value:function(){this.Dialog.changeModelCallBack&&this.Dialog.changeModelCallBack()}},{key:"rotationEditingCallBack",get:function(){var t=this;return function(e){t.options.model.heading=e.rz,t.options.model.pitch=e.ry,t.options.model.roll=e.rx,t._rotationEditingCallBack&&t._rotationEditingCallBack(t.editObj._params),t.entity&&(t.entity.isMove=!0),clearTimeout(Oh(Nh,t)),Ph(Nh,t,setTimeout((function(){t.entity&&(t.entity.isMove=!1)}),500))}},set:function(t){this._rotationEditingCallBack=t}},{key:"changeModelUrl",value:(r=o()(a.a.mark((function t(e){var i,n,o,s,r=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.sdk.viewer.scene.primitives.remove(this.model),this.options.model.url=this.replaceHost(e,this.options.host),i=this.model.modelMatrix,n=this.model.position,o={id:this.options.id,url:this.options.model.url,show:this.options.model.show,scale:this.options.model.scale},s=function(){r.options.model.url===r.originalOptions.model.url?r.modelAnimate=r.originalOptions.model.animate:r.options.model.animate="无";var t=r.model.loader.components.animations;if(r._DialogObject){if(t){for(var e=[{name:"无",value:"无"}],i=0;i<t.length;i++)e.push({name:t[i].name,value:t[i].name});Y(r._DialogObject._element.content,".model-animate-select").legp_search(e)}var n=r._DialogObject._element.content.getElementsByClassName("model-animate-select")[0].getElementsByTagName("input")[0];n.value=r.modelAnimate,n.addEventListener("input",(function(t,e){r.modelAnimate=n.value}))}},!(Number(Cesium.VERSION.split(".")[1])>=107)){t.next=15;break}return t.next=9,Cesium.Model.fromGltfAsync(o);case 9:this.model=t.sent,this.model.position=n,this.sdk.viewer.scene.primitives.add(this.model),this.model.readyEvent.addEventListener((function(){s(),r.model.modelMatrix=i})),t.next=18;break;case 15:this.model=this.sdk.viewer.scene.primitives.add(Cesium.Model.fromGltf(o)),this.model.position=n,this.model.readyPromise.then((function(t){s(),r.model.modelMatrix=i}));case 18:this.model.imageBasedLighting.luminanceAtZenith=.6;case 19:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"removeModelAnimate",value:function(){this.TweenAnimate&&(clearTimeout(this.TweenAnimate.timeout),TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null)}},{key:"controllerCallBack",get:function(){return function(t){}},set:function(t){this._controllerCallBack=t}},{key:"renewLinePositions",value:function(t){var e=t;this.noseToTail&&(e=[].concat(L()(t),[t[0]]));for(var i=[],n=[],o=[],s=0;s<e.length;s++)i.push(e[s].lng,e[s].lat,e[s].alt),n.push(s/(e.length-1));this.smooth?this.spline=new Cesium.CatmullRomSpline({times:n,points:Cesium.Cartesian3.fromDegreesArrayHeights(i)}):this.spline=new Cesium.LinearSpline({times:n,points:Cesium.Cartesian3.fromDegreesArrayHeights(i)});for(var a=0;a<=1e3;a++){var r=this.spline.evaluate(a/1e3);o.push(r)}return this.positions_smooth=o,o}},{key:"flicker",value:function(){}}],[{key:"addLine",value:function(t){var i,n=t.renewLinePositions(t.options.line.positions);i=!!t.options.show&&t.options.line.show,t.sdk.viewer.entities.removeById(t.options.id+"-2"),t.sdk.viewer.entities.removeById(t.options.id+"-3"),t.line=t.sdk.viewer.entities.add({id:t.options.id+"-2",polyline:{positions:n,width:2,clampToGround:t.ground,material:i?new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff"),dashLength:20}):new Cesium.PolylineDashMaterialProperty({color:new Cesium.Color.fromCssColorString("#00ffff00"),dashLength:20}),zIndex:t.sdk._entityZIndex}}),t.realTimeLine=t.sdk.viewer.entities.add({id:t.options.id+"-3",show:!!t.options.realTimeRoute&&t.options.realTimeRoute,polyline:{positions:new Cesium.CallbackProperty((function(){return t.realTimePositions}),!1),width:2,clampToGround:t.ground,material:Cesium.Color.fromCssColorString("#ff0000"),zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,Oh(jh,t)&&Oh(jh,t).destroy(),Ph(jh,t,new X(t.sdk)),Oh(jh,t).mouse_right((function(e,i){var n,o=le(),s=(n=t.sdk===o.sdkP?o.sdkD:o.sdkP)?n.entityMap.get(t.options.id):void 0;s&&(s.viewFollow=!1),t.viewFollow=!1}),!0),e.addModel(t),e.addKeyPoint(t),t.noseToTail=t.options.line.noseToTail,t.smooth=t.options.line.smooth,be(t.sdk,t.options.id),t.options.show&&Qt(0,t.options.id)}},{key:"addModel",value:(s=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.replaceHost(i.options.model.url,i.options.host),o={id:i.options.id,url:n,show:!!i.options.show&&i.options.model.show,scale:i.options.model.scale},!(Number(Cesium.VERSION.split(".")[1])>=107)){t.next=11;break}return t.next=5,Cesium.Model.fromGltfAsync(o);case 5:i.model=t.sent,i.model.originalBoundingSphereRadius=0,i.sdk.viewer.scene.primitives.add(i.model),i.model.readyEvent.addEventListener((function(){i.model.originalBoundingSphereRadius=i.model.boundingSphere.radius,i.modelAnimate=i.options.model.animate})),t.next=14;break;case 11:i.model=i.sdk.viewer.scene.primitives.add(Cesium.Model.fromGltf(o)),i.model.originalBoundingSphereRadius=0,i.model.readyPromise.then((function(){i.model.originalBoundingSphereRadius=i.model.boundingSphere.radius,i.modelAnimate=i.options.model.animate}));case 14:for(i.model.imageBasedLighting.luminanceAtZenith=.6,s=Cesium.Transforms.eastNorthUpToFixedFrame(i.positions_smooth[0]),i.model.modelMatrix=s,i.model.position=i.positions_smooth[0],i.model.customScale={x:i.options.model.scale,y:i.options.model.scale,z:i.options.model.scale},r=i.options.line.positions,l=[],c=0;c<r.length;c++)l.push(r[c].lng,r[c].lat,r[c].alt);u=i.smooth?i.positions_smooth:Cesium.Cartesian3.fromDegreesArrayHeights(l),e.createLabel(i),i.modelMove(u),i.entity=i.model;case 26:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"createLabel",value:(n=o()(a.a.mark((function t(e){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=e.cartesian3Towgs84(e.model.position,e.sdk.viewer),e.label=new Jn(e.sdk,{show:!!e.options.show&&!!e.options.model.show&&e.options.label.show,position:[i.lng,i.lat,i.alt],text:e.options.name,fontSize:e.options.label.fontSize,fontFamily:e.options.label.fontFamily,color:e.options.label.color,pixelOffset:e.options.label.pixelOffset,backgroundColor:e.options.label.backgroundColor,lineColor:e.options.label.lineColor,lineWidth:e.options.label.lineWidth,scaleByDistance:e.options.label.scaleByDistance,near:e.options.label.near,far:e.options.label.far},e.model);case 2:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"addKeyPoint",value:(i=o()(a.a.mark((function t(e){var i,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=0;case 1:if(!(i<e.options.line.positions.length)){t.next=13;break}return t.next=4,e.getClampToHeight(e.options.line.positions[i]);case 4:return n=t.sent,t.next=7,Cesium.Cartesian3.fromDegrees(e.options.line.positions[i].lng,e.options.line.positions[i].lat,n);case 7:o=t.sent,s=e.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:i,show:e.options.line.keyPoint||!1,position:e.ground?o:Cesium.Cartesian3.fromDegrees(e.options.line.positions[i].lng,e.options.line.positions[i].lat,e.options.line.positions[i].alt),billboard:{image:e.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),e.keyPoints.push(s);case 10:i++,t.next=1;break;case 13:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})}]);var i,n,s,r,l,c,u,p}(jn);function Rh(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return zh(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zh(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function zh(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Hh(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Vh(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Hh(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Hh(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Gh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Uh(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Wh(t,e,i){return t.set(Yh(t,e),i),i}function Yh(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Jh=new WeakMap,qh=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),Uh(i=Gh(this,e,[t,n]),Jh,!1),i.options.name=n.name||"",i.options.show=!n.show&&!1!==n.show||n.show,i.options.speed=n.speed||0===n.speed?n.speed:1,i.options.totalTime=n.totalTime,(n.totalTime||0===n.totalTime)&&(i.totalTime=n.totalTime),i.options.delay=n.delay||0,i.options.loop=!n.loop&&!1!==n.loop||n.loop,i.options.line=n.line=n.line||{},i.options.line.positions=n.line.positions||[],i.options.height=n.height||0===n.height?n.height:i.options.line.positions[0]?i.options.line.positions[0].alt:0,i.options.line.show=!n.line.show&&!1!==n.line.show||n.line.show,i.options.line.smooth=!!n.line.smooth&&n.line.smooth,i.options.line.noseToTail=!!n.line.noseToTail&&n.line.noseToTail,i.positions_smooth=[],i.options.ground=n.ground||!1,i.options.state=!n.state&&!1!==n.state||n.state,i.options.routeDirection=!n.routeDirection&&!1!==n.routeDirection||n.routeDirection,i.keyPoints=[],i.realTimePositions=[],i._elms={},i.Dialog=o,i.realTimeRouteArray=[],i._current={heading:0,pitch:0,roll:0},i.distance,i.options.line.positions.length<2?(i._error="最少需要两个坐标!",console.warn(i._error),window.ELEMENT&&window.ELEMENT.Message({message:i._error,type:"warning",duration:1500})):(i.ControllerObject=new Oo(i.sdk),i._EventBinding=new hn,e.addLine(i),i.firstPersonView=!1,i.options.viewFollow=!1),i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"TrajectoryMotionObject"}},{key:"show",get:function(){return this.options.show},set:function(t){if("boolean"==typeof t){if(this.options.show=t,t){this.line.show=this.lineShow;for(var e=0;e<this.keyPoints.length;e++)this.keyPoints[e].show=this.keyPointShow}else{this.line.show=t;for(var i=0;i<this.keyPoints.length;i++)this.keyPoints[i].show=t}this._DialogObject&&this._DialogObject.showBtn&&(this._DialogObject.showBtn.checked=t)}else console.error("参数必须为boolean")}},{key:"height",get:function(){return this.options.height},set:function(t){var e=this;if(this.options.height=t,this.line)if(this.ground){this.line.polyline.clampToGround=!0;for(var i=function(t){e.sdk.viewer.scene.clampToHeightMostDetailed([new Cesium.Cartesian3.fromDegrees(e.options.line.positions[t].lng,e.options.line.positions[t].lat)]).then((function(i){e.keyPoints[t].position=i[0]}))},n=0;n<this.keyPoints.length;n++)i(n)}else{var o=this.options.height-this.options.line.positions[0].alt;this.line.polyline.clampToGround=!1;for(var s=0;s<this.keyPoints.length;s++)this.options.line.positions[s].alt+=o,this.keyPoints[s].position=Cesium.Cartesian3.fromDegrees(this.options.line.positions[s].lng,this.options.line.positions[s].lat,this.options.line.positions[s].alt)}this._renewLine(this.options.line.positions);this._elms.height&&this._elms.height.forEach((function(e){e.value=t}))}},{key:"ground",get:function(){return this.options.ground},set:function(t){this.lineEdit=!1,this.options.ground=t,this.realTimeLine.polyline.clampToGround=t,this.height=this.options.height,this._elms.ground&&this._elms.ground.forEach((function(e){e.checked=t}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){var e=this;t<=0&&(t=.01),this.options.speed=t,(this.distance||0===this.distance)&&(this.options.totalTime=1e3*this.distance/this.options.speed,this.TweenAnimate&&this.state&&this.TweenAnimate&&this.setMovePositionByDistance(this.TweenAnimate._object.distance),this._elms.speed&&this._elms.speed.forEach((function(e){e.value=t})),this._elms.totalTime&&this._elms.totalTime.forEach((function(t){t.value=e.options.totalTime})))}},{key:"totalTime",get:function(){return this.options.totalTime},set:function(t){var e=this;this.options.totalTime=t,(this.distance||0===this.distance)&&(this.options.speed=1e3*this.distance/this.options.totalTime,this.TweenAnimate&&this.setMovePositionByDistance(this.TweenAnimate._object.distance),this._elms.totalTime&&this._elms.totalTime.forEach((function(e){e.value=t})),this._elms.speed&&this._elms.speed.forEach((function(t){t.value=e.options.speed})))}},{key:"smooth",get:function(){return this.options.line.smooth},set:function(t){this.lineEdit=!1,this.options.line.smooth=t;var e=this._renewLine(this.options.line.positions);this.modelMove(e),this._elms.smooth&&this._elms.smooth.forEach((function(e){e.checked=t}))}},{key:"delay",get:function(){return this.options.delay},set:function(t){this.options.delay=t,this.TweenAnimate&&this.TweenAnimate.delay(this.delay),this._elms.delay&&this._elms.delay.forEach((function(e){e.value=t}))}},{key:"state",get:function(){return this.options.state},set:function(t){if(this.options.state=t,this.editObj&&(this.editObj.destroy(),this.editObj=null),this.TweenAnimate)t?this.speed=this.speed:this.TweenAnimate.pause();else if(t){var e=this._renewLine(this.options.line.positions);this.modelMove(e)}this._elms.state&&this._elms.state.forEach((function(e){e.checked=t}))}},{key:"noseToTail",get:function(){return this.options.line.noseToTail},set:function(t){this.lineEdit=!1,this.options.line.noseToTail=t;for(var e=[],i=0;i<this.options.line.positions.length;i++)e.push(this.options.line.positions[i].lng,this.options.line.positions[i].lat,this.options.line.positions[i].alt);Cesium.Cartesian3.fromDegreesArrayHeights(e);if(this.line){var n=this._renewLine(this.options.line.positions);this.modelMove(n)}this._elms.noseToTail&&this._elms.noseToTail.forEach((function(e){e.checked=t}))}},{key:"lineShow",get:function(){return this.options.line.show},set:function(t){t&&(this.realTimeRoute=!1),this.options.line.show=t,this.line&&this.show&&(this.line.show=t),this._elms.lineShow&&this._elms.lineShow.forEach((function(e){e.checked=t}))}},{key:"realTimeRoute",get:function(){return this.options.realTimeRoute},set:function(t){t&&(this.lineShow=!1,this.keyPointShow=!1),this.options.realTimeRoute=t,this.realTimeLine&&this.show&&(this.realTimeLine.show=t),this._elms.realTimeRoute&&this._elms.realTimeRoute.forEach((function(e){e.checked=t}))}},{key:"keyPointShow",get:function(){return this.options.line.keyPoint},set:function(t){this.options.line.keyPoint=t;for(var e=0;e<this.keyPoints.length;e++)this.show&&(this.keyPoints[e].show=t);this._elms.keyPointShow&&this._elms.keyPointShow.forEach((function(e){e.checked=t})),!t&&this.lineEdit&&(Wh(Jh,this,t),YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.ControllerObject&&this.ControllerObject.destroy(),this.tip&&this.tip.destroy(),this.tip=null,this._elms.lineEdit&&this._elms.lineEdit.forEach((function(e){e.checked=t})))}},{key:"lineEdit",get:function(){return e=this,(t=Jh).get(Yh(t,e));var t,e},set:function(t){var e=this,i=[],n=function(t){i=e._renewLine(t),e.modelMove(i)};if(t){if(this.viewFollow=!1,YJ.Measure.GetMeasureStatus())return console.warn("上一次测量未结束"),void(this.lineEdit=!1);var o;this.ground=!1,this.smooth=!1,this.state=!1,YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("请选择一个顶点,右键取消",this.sdk),this.event=new X(this.sdk),n(L()(this.options.line.positions)),this.event.mouse_left((function(t,i){var s=e.sdk.viewer.scene.pick(t.position);if(s&&s.id&&s.id.name&&"node-secondary-edit-point"===s.id.name)for(var a=0;a<e.keyPoints.length;a++)if(e.keyPoints[a].id===s.id.id){o=s.id,e.ControllerObject.position=e.options.line.positions[o.index],e.ControllerObject.editTranslational(),e.tip&&e.tip.destroy(),e.tip=null,e.ControllerObject.controllerCallBack=function(t){e.options.line.positions[o.index]=t.position,o.position=Cesium.Cartesian3.fromDegrees(t.position.lng,t.position.lat,t.position.alt),n(L()(e.options.line.positions))};break}})),this.event.mouse_right((function(t,i){e.keyPointShow=!1,YJ.Measure.SetMeasureStatus(!1),e.event.destroy(),e.tip&&e.tip.destroy(),e.tip=null,e.ControllerObject.destroy()})),this.event.mouse_move((function(t,i){e.tip&&e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.line.polyline.positions=new Cesium.CallbackProperty((function(){return i}),!1),this.keyPointShow=t}else this.lineEdit&&(YJ.Measure.SetMeasureStatus(!1),this.event.destroy(),this.tip&&this.tip.destroy(),this.tip=null),this.keyPointShow=t,this.ControllerObject.destroy();Wh(Jh,this,t),this._elms.lineEdit&&this._elms.lineEdit.forEach((function(e){e.checked=t}))}},{key:"routeDirection",get:function(){return this.options.routeDirection},set:function(t){this.options.routeDirection=t,this._elms.routeDirection&&this._elms.routeDirection.forEach((function(e){e.checked=t}))}},{key:"loop",get:function(){return this.options.loop},set:function(t){this.options.loop=t,t?this.TweenAnimate.repeat(1/0):this.TweenAnimate.repeat(),this._elms.loop&&this._elms.loop.forEach((function(e){e.checked=t}))}},{key:"firstPersonView",get:function(){return this.options.firstPersonView},set:function(t){if(this.sdk.viewer._firstPersonView=t,this.options.firstPersonView=t,this.options.firstPersonView){if(this._DialogObject&&this._DialogObject._element.content){var e=this._DialogObject._element.content.querySelectorAll("button[name='firstPerson']");e[0].className="btn is-active",e[1].className="btn"}this.sdk.viewer.trackedEntity&&(this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),this.sdk.viewer.trackedEntity=null)}else{if(this._DialogObject&&this._DialogObject._element.content){var i=this._DialogObject._element.content.querySelectorAll("button[name='firstPerson']");i[0]&&i[1]&&(i[0].className="btn",i[1].className="btn is-active")}if(this.viewFollow){this.sdk.viewer.trackedEntity&&this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity);var n=this.sdk.viewer.entities.add({position:this.positions_smooth[0],point:{color:Cesium.Color.RED.withAlpha(0),pixelSize:0}});this.sdk.viewer.trackedEntity=n}}}},{key:"viewFollow",get:function(){return this.options.viewFollow},set:function(t){if(this.options.viewFollow=t,this.options.viewFollow?this.lineEdit=!1:this.firstPersonView=!1,this.options.firstPersonView){if(this.sdk.viewer.trackedEntity&&(this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),this.sdk.viewer.trackedEntity=null),this._DialogObject&&this._DialogObject._element.content){var e=this._DialogObject._element.content.querySelectorAll("button[name='firstPerson']");e[0]&&e[1]&&(e[0].className="btn",e[1].className="btn is-active")}}else if(this.sdk.viewer.trackedEntity&&(this.sdk.viewer.entities.remove(this.sdk.viewer.trackedEntity),this.sdk.viewer.trackedEntity=null),t){var i=this.sdk.viewer.entities.add({position:this.current.position,point:{color:Cesium.Color.RED.withAlpha(0),pixelSize:0}});this.sdk.viewer.trackedEntity=i}this._elms.viewFollow&&this._elms.viewFollow.forEach((function(e){e.checked=t}))}},{key:"moveCallBack",value:function(t){this.setPosition=t.setPosition.bind(t)}},{key:"current",get:function(){return this._current},set:function(t){this._current=t;var e=this.cartesian3Towgs84(this._current.position,this.sdk.viewer);this.setPosition&&this.setPosition(Vh(Vh({},this._current),{},{position:Vh({},e)}))}},{key:"modelMove",value:(s=o()(a.a.mark((function t(e){var i,n,s,r,l,c,u,p,h,d,m,f,v,g,b,C,w,k,x,_,E,S,D=this,M=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(S=function(t,e){var i=Cesium.Transforms.eastNorthUpToFixedFrame(t);if(e){var n=Cesium.Cartesian3.subtract(e,t,new Cesium.Cartesian3),o=Cesium.Matrix4.multiplyByPointAsVector(Cesium.Matrix4.inverse(i,new Cesium.Matrix4),n,new Cesium.Cartesian3),s=Cesium.Cartesian3.normalize(o,new Cesium.Cartesian3),a=Math.atan2(s.y,s.x)-Cesium.Math.PI_OVER_TWO,r=Cesium.Math.PI_OVER_TWO-Cesium.Math.acosClamped(s.z),l=r*(180/Math.PI);r=l*(Math.PI/180);var c=Cesium.Math.fastApproximateAtan2(s.x,s.z);return{heading:Cesium.Math.TWO_PI-Cesium.Math.zeroToTwoPi(a),pitch:r,roll:c}}},E=function(){return(E=o()(a.a.mark((function t(e){var i,o,s,r,c,u,p,d,y,b,C,w,k,_,E,D,M,P,O,T;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=h,!(i=e)){t.next=10;break}return t.next=6,turf.lineSliceAlong(h,0,i,{units:"kilometers"});case 6:r=t.sent,o=L()(r.geometry.coordinates[r.geometry.coordinates.length-1]),t.next=11;break;case 10:o=L()(h.geometry.coordinates[0]);case 11:if(!n.ground){t.next=38;break}return t.next=14,n.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(o[0],o[1]),g);case 14:return p=t.sent,(c=p)||(c=new Cesium.Cartesian3.fromDegrees(o[0],o[1])),d=n.cartesian3Towgs84(c,l),y=0,t.prev=19,t.next=22,Cesium.sampleTerrainMostDetailed(n.sdk.viewer.scene.terrainProvider,[Cesium.Cartographic.fromDegrees(d.lng,d.lat)]);case 22:b=t.sent,y=b[0].height,t.next=29;break;case 26:t.prev=26,t.t0=t.catch(19),y=0;case 29:for(d.alt<y&&(d.alt=y),d.alt=Number(d.alt.toFixed(1)),c=Cesium.Cartesian3.fromDegrees(d.lng,d.lat,d.alt),u=Cesium.Cartesian3.fromDegrees(o[0],o[1],n.cartesian3Towgs84(c,n.sdk.viewer).alt+1),C=[],w=0;w<s.geometry.coordinates.length;w++)C.push(s.geometry.coordinates[w][0],s.geometry.coordinates[w][1]);n.realTimePositions=Cesium.Cartesian3.fromDegreesArray(C),t.next=54;break;case 38:k=n.spline.evaluate(e/n.distance),o=n.cartesian3Towgs84(k,l),c=Cesium.Cartesian3.fromDegrees(o.lng,o.lat,o.alt),u=Cesium.Cartesian3.fromDegrees(o.lng,o.lat,o.alt+1),_=[],E=0;case 44:if(!(E<=100)){t.next=52;break}if(!(E/100>e/n.distance)){t.next=47;break}return t.abrupt("break",52);case 47:D=n.spline.evaluate(E/100),_.push(D);case 49:E++,t.next=44;break;case 52:_.push(k),n.realTimePositions=_;case 54:if(m=S(n.current.position,c),v&&v.position&&(f=S(v.position,c),m.pitch=f.pitch),v.position=n.current.position,M=Cesium.HeadingPitchRoll.fromDegrees(n.current.heading,n.current.pitch,n.current.roll),P=0,O=0,T=0,n.options.routeDirection?(P=(m.heading-M.heading)*(180/Math.PI)-90+n.current.heading,O=m.pitch*(180/Math.PI)):(P=n.current.heading,O=n.current.pitch),T=n.current.roll,!(isNaN(P)||isNaN(O)||isNaN(T))){t.next=65;break}return t.abrupt("return");case 65:(P<0||P>180)&&(O=-O),n.current={position:c,heading:P,pitch:O,roll:T},x&&(x=!1,n._first={position:c,heading:P,pitch:O,roll:T}),n.realTimeRouteArray.push(c),n.viewFollow&&(n.options.firstPersonView?n.sdk.viewer.camera.setView({destination:u,orientation:{heading:n.sdk.viewer.camera.heading,pitch:n.sdk.viewer.camera.pitch,roll:n.sdk.viewer.camera.roll}}):n.sdk.viewer.trackedEntity&&(n.sdk.viewer.trackedEntity.position=c));case 71:case"end":return t.stop()}}),t,null,[[19,26]])})))).apply(this,arguments)},_=function(t){return E.apply(this,arguments)},i=M.length>1&&void 0!==M[1]?M[1]:{time:0},n=this,s=i.time||0,r=i.distance||0,l=this.sdk.viewer,this.removeModelAnimate(),c=[],u=0;u<e.length;u++)p=this.cartesian3Towgs84(e[u],l),c.push([p.lng,p.lat,p.alt]);h=turf.lineString(c),this.distance=turf.length(h,{units:"kilometers"}),this.totalTime||(this.totalTime=1e3*this.distance/this.options.speed),d=this.totalTime,s&&(s>d&&(s=d),r=s/d*this.distance),v={},g=[],b=Rh(this.sdk.entityMap);try{for(b.s();!(C=b.n()).done;)(w=y()(C.value,2))[0],(k=w[1]).type&&"glb"===k.type&&g.push(k.entity)}catch(t){b.e(t)}finally{b.f()}x=!0,this.TweenAnimate=new TWEEN.Tween({distance:r}).to({distance:this.distance},1e3*(d-s)).delay(this.delay).easing(TWEEN.Easing.Linear.None).repeat(this.options.loop?1/0:0).onRepeat((function(){s&&D.modelMove(e)})).onUpdate(function(){var t=o()(a.a.mark((function t(e,i){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(D.TweenAnimate._duration!=1/0){t.next=2;break}return t.abrupt("return");case 2:if(D.sdk.viewer){t.next=6;break}return D.removeModelAnimate(),t.abrupt("return");case 6:_(e.distance);case 7:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}()).onEveryStart((function(){D.realTimeRouteArray=[]})).onComplete((function(t){D.state=!1,D.removeModelAnimate()})),this.state?this.TweenAnimate.start():_(r);case 26:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"setMovePositionByDistance",value:function(t){var e=this._renewLine(this.options.line.positions);this.modelMove(e,{distance:t})}},{key:"setMovePositionByTime",value:function(t){var e=this._renewLine(this.options.line.positions);this.modelMove(e,{time:t}),this.state||this.modelMove(e,{time:t+.01})}},{key:"pause",value:function(){this.state=!1}},{key:"resume",value:function(){this.state=!0}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:{},ii(0),Je(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=22;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},(l=Vh({},this.options.line.positions[0])).hasOwnProperty("alt")){t.next=15;break}return t.next=14,this.getClampToHeight(l);case 14:l.alt=t.sent;case 15:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=23;break;case 22:this.line&&this.sdk.viewer.flyTo(this.line,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-60),roll:Cesium.Math.toRadians(0)}});case 23:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"remove",value:function(){this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.sdk.viewer.entities.remove(this.line),this.line=null,this.removeModelAnimate()}},{key:"reset",value:function(){this.modelMove(this.line.polyline.positions._value),this.state=!1,this.current=this._first}},{key:"removeModelAnimate",value:function(){this.TweenAnimate&&(clearTimeout(this.TweenAnimate.timeout),TWEEN.remove(this.TweenAnimate),this.TweenAnimate=null)}},{key:"_renewLine",value:function(t){this.options.line.positions=t;var e=t;this.noseToTail&&(e=[].concat(L()(t),[t[0]]));for(var i=[],n=[],o=[],s=0;s<e.length;s++)i.push(e[s].lng,e[s].lat,e[s].alt),n.push(s/(e.length-1));this.smooth?this.spline=new Cesium.CatmullRomSpline({times:n,points:Cesium.Cartesian3.fromDegreesArrayHeights(i)}):this.spline=new Cesium.LinearSpline({times:n,points:Cesium.Cartesian3.fromDegreesArrayHeights(i)});for(var a=0;a<=100;a++){var r=this.spline.evaluate(a/100);o.push(r)}return this.positions_smooth=o,o}},{key:"renewLinePositions",value:function(t){this.options.line.positions=t;var e=t;this.noseToTail&&(e=[].concat(L()(t),[t[0]]));for(var i=[],n=[],o=[],s=0;s<e.length;s++)i.push(e[s].lng,e[s].lat,e[s].alt),n.push(s/(e.length-1));this.smooth?this.spline=new Cesium.CatmullRomSpline({times:n,points:Cesium.Cartesian3.fromDegreesArrayHeights(i)}):this.spline=new Cesium.LinearSpline({times:n,points:Cesium.Cartesian3.fromDegreesArrayHeights(i)});for(var a=0;a<=100;a++){var r=this.spline.evaluate(a/100);o.push(r)}return this.positions_smooth=o,this.line&&this.line.polyline&&(this.line.polyline.positions=o),o}},{key:"flicker",value:function(){}}],[{key:"addLine",value:function(t){var i=t._renewLine(t.options.line.positions);t.current.position=i[0],t.line=t.sdk.viewer.entities.add({id:t.options.id+"-2",show:!!t.options.show&&t.options.line.show,polyline:{positions:i,width:2,clampToGround:t.ground,material:Cesium.Color.fromCssColorString("#ffffff"),zIndex:t.sdk._entityZIndex}}),t.realTimeLine=t.sdk.viewer.entities.add({id:t.options.id+"-3",show:!!t.options.realTimeRoute&&t.options.realTimeRoute,polyline:{positions:new Cesium.CallbackProperty((function(){return t.realTimePositions}),!1),width:2,clampToGround:t.ground,zIndex:t.sdk._entityZIndex,material:Cesium.Color.fromCssColorString("#ff0000")}}),t.sdk._entityZIndex++,new X(t.sdk).mouse_right((function(e,i){t.viewFollow=!1})),e.addKeyPoint(t),t.noseToTail=t.options.line.noseToTail,t.smooth=t.options.line.smooth}},{key:"addModel",value:function(t){}},{key:"addKeyPoint",value:(i=o()(a.a.mark((function t(e){var i,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=0;case 1:if(!(i<e.options.line.positions.length)){t.next=13;break}return t.next=4,e.getClampToHeight(e.options.line.positions[i]);case 4:return n=t.sent,t.next=7,Cesium.Cartesian3.fromDegrees(e.options.line.positions[i].lng,e.options.line.positions[i].lat,n);case 7:o=t.sent,s=e.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:i,show:e.options.line.keyPoint||!1,position:e.ground?o:Cesium.Cartesian3.fromDegrees(e.options.line.positions[i].lng,e.options.line.positions[i].lat,e.options.line.positions[i].alt),billboard:{image:e.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}}),e.keyPoints.push(s);case 10:i++,t.next=1;break;case 13:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})}]);var i,n,s}(jn);function Xh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Zh=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=Xh(this,e,[t,n])).options.width=n.width||1,i.options.color=n.color||"#ff0000",i._elms={},i._EventBinding=new hn,e.edit(i,!0),i}return Xi()(e,t),_()(e,[{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color&&(this.options.color=t,this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o})))}},{key:"width",get:function(){return this.options.width},set:function(t){this.options.width=t,this._elms.width&&this._elms.width.forEach((function(e){e.value=t}))}},{key:"start",value:function(){var t,i,n,o,s,a=this;if(YJ.Measure.GetMeasureStatus())console.log("上一次测量未结束");else{this.sdk.viewer;Ve(this.sdk,!1),(t=e,i="start",n=this,o=3,s=Ks()(Ji()(1&o?t.prototype:t),i,n),2&o&&"function"==typeof s?function(t){return s.apply(n,t)}:s)([]),YJ.Measure.SetMeasureStatus(!0),this.tip=new Z("长按左键,拖动鼠标进行涂鸦,右键结束涂鸦",this.sdk),this.event=new X(this.sdk),this.positions=[],this.points_ids=[];var r=[],l=[];this.event.mouse_left_down((function(t,e){l=[];var i=a.sdk.viewer.entities.add({name:"涂鸦",polyline:{positions:new Cesium.CallbackProperty((function(){return l}),!1),width:a.width,clampToGround:!0,material:Cesium.Color.fromCssColorString(a.color),zIndex:99999999}});r.push(i),a.event.mouse_move((function(t,e){a.tip.setPosition(e,t.endPosition.x,t.endPosition.y),l.push(e)}))})),this.event.mouse_left_up((function(t,e){r[r.length-1].polyline.positions=l,a.event.mouse_move((function(t,e){a.tip.setPosition(e,t.endPosition.x,t.endPosition.y)}))})),this.event.mouse_move((function(t,e){a.tip.setPosition(e,t.endPosition.x,t.endPosition.y)})),this.event.mouse_right((function(t,e){a.end()})),this.event.gesture_pinck_start((function(t,e){var i=new Date;a.event.gesture_pinck_end((function(){new Date-i>=500&&a.end()}))}))}}},{key:"end",value:function(){YJ.Measure.SetMeasureStatus(!1),this.event&&this.event.destroy(),this.event=void 0,this.tip&&this.tip.destroy(),this.tip=void 0,Ve(this.sdk,!0)}},{key:"remove",value:function(){this.end(),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);for(var t=this.sdk.viewer.entities.values,e=t.length-1;e>=0;e--)"涂鸦"===t[e].name&&this.sdk.viewer.entities.remove(t[e])}},{key:"flicker",value:function(){}}],[{key:"edit",value:(i=o()(a.a.mark((function t(i,n){var o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=22;break}return t.next=3,new W(i.sdk.viewer._container,{title:"涂鸦参数"});case 3:return i._DialogObject=t.sent,t.next=6,i._DialogObject.init();case 6:(o=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">涂鸦颜色</span>\n <div class="color"></div>\n </div>\n <div class="col">\n <span class="label">线条宽度</span>\n <div class="input-number input-number-unit-2" style="width: 80px;">\n <input class="input" type="number" title="" min="1" max="99" step="1" @model="width">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n ',i._DialogObject.contentAppChild(o),s=new YJColorPicker({el:o.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:i.color,disabled:!1,openPickerAni:"opacity",sure:function(t){i.color=t},clear:function(){i.color="rgba(255,255,255,1)"}}),i._DialogObject._element.body.className=i._DialogObject._element.body.className+" graffiti",r=o.getElementsByTagName("*"),i._EventBinding.on(i,r),i._elms=i._EventBinding.element,i._elms.color=[s],(l=document.createElement("button")).className="confirm",l.innerHTML="确认",i._DialogObject.footAppChild(l),l.addEventListener("click",(function(){i.start(),e.edit(i,!1)})),t.next=23;break;case 22:i._DialogObject&&i._DialogObject.close&&(i._DialogObject.close(),i._DialogObject=null);case 23:case"end":return t.stop()}}),t)}))),function(t,e){return i.apply(this,arguments)})}]);var i}(Qs);function Kh(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function $h(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Kh(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Kh(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Qh(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var td=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=Qh(this,e,[t,n])).options.name=n.name||"未命名对象",i.options.show=!n.show&&!1!==n.show||n.show,i.options.url=n.url,i.options.angle=n.angle||0,i.options.scale=n.scale||0===n.scale?n.scale:1,i.options.positions=n.positions,i.options.offset={x:.5,y:.5},i.options.flipe=n.flipe||{},i.options.flipe.x=i.options.flipe.x||!1,i.options.flipe.y=i.options.flipe.y||!1,i.entity={id:i.options.id},i._positionEditing=!1,i.Dialog=o,i._elms={},i.previous={positions:$h({},i.options.positions)},i._EventBinding=new hn,i.event=new X(i.sdk),i.sdk.addIncetance(i.options.id,i),i.create(),i}return Xi()(e,t),_()(e,[{key:"offset",get:function(){return this.options.offset},set:function(t){var e=this;this.options.offset=t;var i=new Image;i.src=this.replaceHost(this.options.url,this.options.host),i.onload=function(){var t=document.createElement("canvas"),n=t.getContext("2d");t.width=2*i.width,t.height=2*i.height,e.flipeX&&(n.scale(1,-1),n.translate(0,-t.height)),e.flipeY&&(n.scale(-1,1),n.translate(-t.width,0)),n.drawImage(i,i.width-i.width*e.options.offset.x,i.height-i.height*e.options.offset.y),e.entity.rectangle.material=new Cesium.ImageMaterialProperty({image:t,transparent:!0})}}},{key:"angle",get:function(){return this.options.angle},set:function(t){this.options.angle=t,this._elms.angle&&this._elms.angle.forEach((function(e){e.value=t}))}},{key:"scale",get:function(){return this.options.scale},set:function(t){this.options.scale=t,this._elms.scale&&this._elms.scale.forEach((function(e){e.value=t}))}},{key:"flipeY",get:function(){return this.options.flipe.y},set:function(t){var e=this;if("boolean"==typeof t){if(this.options.flipe.y=t,!this.entity)return;var i=new Image;i.src=this.replaceHost(this.options.url,this.options.host),i.onload=function(){var t=document.createElement("canvas"),n=t.getContext("2d");t.width=2*i.width,t.height=2*i.height,e.flipeX&&(n.scale(1,-1),n.translate(0,-t.height)),e.flipeY&&(n.scale(-1,1),n.translate(-t.width,0)),n.drawImage(i,i.width-i.width*e.options.offset.x,i.height-i.height*e.options.offset.y),e.entity&&(e.entity.rectangle.material=new Cesium.ImageMaterialProperty({image:t,transparent:!0}))}}else console.error("参数必须为boolean")}},{key:"flipeX",get:function(){return this.options.flipe.x},set:function(t){var e=this;if("boolean"==typeof t){if(this.options.flipe.x=t,!this.entity)return;var i=new Image;i.src=this.replaceHost(this.options.url,this.options.host),i.onload=function(){var t=document.createElement("canvas"),n=t.getContext("2d");t.width=2*i.width,t.height=2*i.height,e.flipeX&&(n.scale(1,-1),n.translate(0,-t.height)),e.flipeY&&(n.scale(-1,1),n.translate(-t.width,0)),n.drawImage(i,i.width-i.width*e.options.offset.x,i.height-i.height*e.options.offset.y),e.entity.rectangle.material=new Cesium.ImageMaterialProperty({image:t,transparent:!0})}}else console.error("参数必须为boolean")}},{key:"create",value:(r=o()(a.a.mark((function t(){var e,i=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(this.replaceHost(this.options.url,this.options.host),{method:"get",headers:{"Content-Type":"application/json"}});case 2:t.sent.ok&&((e=new Image).src=this.replaceHost(this.options.url,this.options.host),e.onload=function(){var t=document.createElement("canvas"),n=t.getContext("2d");t.width=2*e.width,t.height=2*e.height,i.flipeX&&(n.scale(1,-1),n.translate(0,-t.height)),i.flipeY&&(n.scale(-1,1),n.translate(-t.width,0)),n.drawImage(e,e.width-e.width*i.options.offset.x,e.height-e.height*i.options.offset.y),i.entity=i.sdk.viewer.entities.add({id:i.options.id,show:i.options.show,rectangle:{coordinates:new Cesium.CallbackProperty((function(){var t,e=Math.abs(Math.cos(Math.PI/180*i.options.positions.lat))*(1e-4*i.options.scale),n={x:i.flipeY?Math.abs(i.options.offset.x-1):i.options.offset.x,y:i.flipeX?Math.abs(i.options.offset.y-1):i.options.offset.y};n={lng:n.x*(1e-4*i.options.scale*2),lat:Math.abs(n.y-1)*(2*e)};var o=[i.options.positions.lng-1e-4*i.options.scale,i.options.positions.lat-e,i.options.positions.lng+1e-4*i.options.scale,i.options.positions.lat+e];return(t=Cesium.Rectangle).fromDegrees.apply(t,o)}),!1),material:new Cesium.ImageMaterialProperty({image:t,transparent:!0}),rotation:new Cesium.CallbackProperty((function(){return Cesium.Math.toRadians(i.options.angle)}),!1),stRotation:new Cesium.CallbackProperty((function(){return Cesium.Math.toRadians(i.options.angle)}),!1)}}),"cesium-viewer 2d"===i.sdk.viewer._element.className&&(i.entity.rectangle.height=0),be(i.sdk,i.options.id),i.options.show&&Qt(0,i.options.id)});case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"edit",value:(s=o()(a.a.mark((function t(e){var i,n,s,r,l,c,u,p,h,d=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this,this.originalOptions=$h({},this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=20;break}return n=function(t){!function e(i){if(i)if(i===r._element.body){var n=t.x-i.getBoundingClientRect().left,o=t.y-i.getBoundingClientRect().top,s={x:Number(((n-42)/l.width).toFixed(2)),y:Number(((o-71)/l.height).toFixed(2))};s.x<0&&(s.x=0),s.x>1&&(s.x=1),s.y<0&&(s.y=0),s.y>1&&(s.y=1),u={x:s.x,y:s.y},c.style.top="calc(".concat(100*u.y,"% - 5px)"),c.style.left="calc(".concat(100*u.x,"% - 5px)")}else e(i.offsetParent)}(t.target)},s=function(){r&&r._element.body.removeEventListener("mousemove",n)},t.next=8,new Ki(this.sdk,this.originalOptions,{title:"军标属性",left:"180px",top:"100px",confirmCallBack:function(t){d.name=d.name.trim(),d.name||(d.name="未命名对象"),d.originalOptions=d.deepCopyObj(d.options),d._DialogObject.close(),d.Dialog.confirmCallBack&&d.Dialog.confirmCallBack(d.originalOptions),be(d.sdk,d.options.id),re(d.sdk,d.options.id)},resetCallBack:function(){d.reset(),d.Dialog.resetCallBack&&d.Dialog.resetCallBack()},removeCallBack:function(){d.Dialog.removeCallBack&&d.Dialog.removeCallBack()},closeCallBack:function(){d.reset(),d.positionEditing=!1,r&&r.close&&r.close(),d.Dialog.closeCallBack&&d.Dialog.closeCallBack()},showCallBack:function(t){d.show=t,d.Dialog.showCallBack&&d.Dialog.showCallBack()},translationalCallBack:function(){d.positionEditing=!d.positionEditing},addFootElm:[{tagName:"button",className:"flipe-over-y",innerHTML:"Y轴翻转",event:["click",function(){d.flipeY=!d.flipeY}]},{tagName:"button",className:"flipe-over-x",innerHTML:"X轴翻转",event:["click",function(){d.flipeX=!d.flipeX}]}]},!0);case 8:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" ground-image",(p=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <button class="anchor btn" @click="setAnchorPoint">调整锚点</button>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">旋转角度</span>\n <input type="range" max="360" min="0" step="0.1" @model="angle">\n <div class="input-number input-number-unit" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0" max="360" step="0.1" @model="angle">\n <span class="unit">°</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">调整大小</span>\n <input type="range" max="40000" min="0" step="0.1" @model="scale">\n <div class="input-number input-number-unit-1" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0" max="40000" step="0.1" @model="scale">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(p),h=p.getElementsByTagName("*"),this._EventBinding.on(this,h),this._elms=this._EventBinding.element,p.getElementsByClassName("anchor")[0].addEventListener("click",o()(a.a.mark((function t(){var e,o,p,h;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r&&r.close&&r.close(),document.body.addEventListener("mouseup",s),e=i._DialogObject._element.body.getBoundingClientRect(),t.next=5,new Ki(d.sdk,d.originalOptions,{title:"锚点设置",left:e.left+80+"px",top:e.top+200+"px",confirmCallBack:function(t){i.offset={x:u.x,y:u.y},o.close()},closeCallBack:function(){document.body.removeEventListener("mouseup",s)}},!1);case 5:o=t.sent,r=o,o._element.body.className=o._element.body.className+" anchor-point",p=document.createElement("div"),(h=new Image).src=d.replaceHost(d.options.url,d.options.host),h.onload=function(){var t=150/(h.width/h.height),e=(l=document.createElement("canvas")).getContext("2d",{willReadFrequently:!0});l.width=150,l.height=t,l.style.display="block",e.drawImage(h,0,0,150,t),p.appendChild(l),o.contentAppChild(p),(c=document.createElement("span")).className="point",p.appendChild(c),u={x:i.offset.x,y:i.offset.y},c.style.top="calc(".concat(100*Number(u.y),"% - 6px)"),c.style.left="calc(".concat(100*Number(u.x),"% - 6px)"),l.addEventListener("click",(function(t){var e=t.offsetX,i=t.offsetY,n={x:Number((e/l.width).toFixed(2)),y:Number((i/l.height).toFixed(2))};n.x<0&&(n.x=0),n.x>1&&(n.x=1),n.y<0&&(n.y=0),n.y>1&&(n.y=1),u={x:n.x,y:n.y},c.style.top="calc(".concat(100*u.y,"% - 5px)"),c.style.left="calc(".concat(100*u.x,"% - 5px)")})),c.addEventListener("mousedown",(function(t){o._element.body.addEventListener("mousemove",n)}))};case 12:case"end":return t.stop()}}),t)})))),t.next=21;break;case 20:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 21:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"positionEditing",get:function(){return this._positionEditing},set:function(t){var e=this;this.sdk&&this.sdk.viewer&&this.entity&&(this._positionEditing=t,this.previous={positions:$h({},this.options.positions)},!0===t?(this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.positions.lng=n.lng,e.options.positions.lat=n.lat,e.options.positions.alt=n.alt,e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.positions.lng=n.lng,e.options.positions.lat=n.lat,e.options.positions.alt=n.alt,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.options.positions.lng=e.previous.positions.lng,e.options.positions.lat=e.previous.positions.lat,e.options.positions.alt=e.previous.positions.alt,e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.options.positions.lng=e.previous.positions.lng,e.options.positions.lat=e.previous.positions.lat,e.options.positions.alt=e.previous.positions.alt,e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.options.positions.lng=t.lng,e.options.positions.lat=t.lat,e.options.positions.alt=t.alt,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1}}))}))):(this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){}))),this.tip&&this.tip.destroy(),this.options.positions.lng=this.previous.positions.lng,this.options.positions.lat=this.previous.positions.lat,this.options.positions.alt=this.previous.positions.alt))}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=D.length>0&&void 0!==D[0]?D[0]:{},ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=23;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=$h({},this.options.position):this.options.positions?l=$h({},this.options.positions[0]):this.options.center?l=$h({},this.options.center):this.options.start?l=$h({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=16;break}return t.next=15,this.getClampToHeight(l);case 15:l.alt=t.sent;case 16:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=59;break;case 23:c=Math.abs(Math.cos(Math.PI/180*this.options.positions.lat))*(1e-4*this.options.scale),u=[[this.options.positions.lng-1e-4*this.options.scale,this.options.positions.lat-c],[this.options.positions.lng+1e-4*this.options.scale,this.options.positions.lat+c]],p=[],h=0,d=this.options.positions,m=Cesium.Cartesian3.fromDegrees(d.lng,d.lat,0),f=Cesium.Cartesian3.fromDegrees(d.lng,d.lat,1e7),v=Cesium.Cartesian3.subtract(f,m,new Cesium.Cartesian3),g=Cesium.Cartesian3.normalize(v,v),y=new Cesium.Ray(m,g),b={},C=this.sdk.viewer.scene.drillPickFromRay(y),w=0;case 36:if(!(w<C.length)){t.next=43;break}if(!C[w].position){t.next=40;break}return b=C[w],t.abrupt("break",43);case 40:w++,t.next=36;break;case 43:if(!b||!b.position){t.next=47;break}h=this.cartesian3Towgs84(b.position,this.sdk.viewer).alt,t.next=56;break;case 47:return t.prev=47,t.next=50,Cesium.sampleTerrainMostDetailed(this.sdk.viewer.terrainProvider,[Cesium.Cartographic.fromDegrees(d.lng,d.lat)]);case 50:k=t.sent,h=k[0].height,t.next=56;break;case 54:t.prev=54,t.t0=t.catch(47);case 56:for(x=0;x<u.length;x++)E=(_=Cesium.Cartesian3).fromDegrees.apply(_,L()(u[x]).concat([h])),p.push(E.x,E.y,E.z);S=Cesium.BoundingSphere.fromVertices(p),this.sdk.viewer.camera.flyToBoundingSphere(S,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 59:case"end":return t.stop()}}),t,this,[[47,54]])}))),function(){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.name=this.originalOptions.name,this.angle=this.originalOptions.angle,this.scale=this.originalOptions.scale)}},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=7,this.sdk.removeIncetance(this.options.id);case 7:return t.next=9,be(this.sdk,this.options.id);case 9:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"setPosition",value:function(t){this.options.positions.lng=t.position.lng,this.options.positions.lat=t.position.lat,this.options.positions.alt=t.position.alt}}]);var i,n,s,r}(jn),ed=i(20),id=i.n(ed);function nd(t){return'\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">旋转角度</span>\n <input type="range" max="360" min="0" step="0.1" @model="angle">\n <div class="input-number input-number-unit" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0" max="360" step="0.1" @model="angle">\n <span class="unit">°</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col x-scale">\n <span class="label">X 轴大小</span>\n <input type="range" max="200" min="0.001" step="0.001">\n <div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0.001" max="200" step="0.001">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col y-scale">\n <span class="label">Y 轴大小</span>\n <input type="range" max="200" min="0.001" step="0.001">\n <div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0.001" max="200" step="0.001">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col" style="flex: 5;">\n <span class="label">文字内容</span>\n <input class="input" type="text" @model="textValue">\n </div>\n <div class="col">\n <button class="btn" @click="textPosPick">设置位置</span>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">文字开关</span>\n <input class="btn-switch" type="checkbox" @model="textShow">\n </div>\n <div class="col">\n <span class="label">字体颜色</span>\n <div class="textColor"></div>\n </div>\n <div class="col">\n <span class="label">字体大小</span>\n <div class="input-number input-number-unit-2">\n <input class="input" type="number" title="" min="1" max="99" @model="textFontSize">\n <span class="unit">px</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">视野缩放</span>\n <input class="btn-switch" type="checkbox" @model="textScaleByDistance">\n </div>\n <div class="col">\n <span class="label">最近距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="textNear">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">最远距离</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999999" @model="textFar">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item attribute-info">\n <div class="row">\n '.concat(En(t),"\n </div>\n </div>\n ")}var od=i(21),sd=i.n(od),ad=i(12),rd=i.n(ad);function ld(t,e,i,n){var o=Ks()(Ji()(1&n?t.prototype:t),e,i);return 2&n&&"function"==typeof o?function(t){return o.apply(i,t)}:o}function cd(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}
|
||
/**
|
||
* @license
|
||
* Copyright 2010-2024 Three.js Authors
|
||
* SPDX-License-Identifier: MIT
|
||
*/()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var ud=1014,pd=1020,hd=2400,dd=2401,md="srgb",fd="srgb-linear",vd="display-p3",gd="display-p3-linear",yd="linear",bd="srgb",Cd="rec709",wd=7680,kd=35044,xd=2e3,_d=2001,Ed=function(){return _()((function t(){k()(this,t)}),[{key:"addEventListener",value:function(t,e){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)}},{key:"hasEventListener",value:function(t,e){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)}},{key:"removeEventListener",value:function(t,e){if(void 0!==this._listeners){var i=this._listeners[t];if(void 0!==i){var n=i.indexOf(e);-1!==n&&i.splice(n,1)}}}},{key:"dispatchEvent",value:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var i=e.slice(0),n=0,o=i.length;n<o;n++)i[n].call(this,t);t.target=null}}}}])}(),Sd=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],Dd=Math.PI/180;Math.PI;function Md(){var t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,i=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return(Sd[255&t]+Sd[t>>8&255]+Sd[t>>16&255]+Sd[t>>24&255]+"-"+Sd[255&e]+Sd[e>>8&255]+"-"+Sd[e>>16&15|64]+Sd[e>>24&255]+"-"+Sd[63&i|128]+Sd[i>>8&255]+"-"+Sd[i>>16&255]+Sd[i>>24&255]+Sd[255&n]+Sd[n>>8&255]+Sd[n>>16&255]+Sd[n>>24&255]).toLowerCase()}function Pd(t,e,i){return Math.max(e,Math.min(i,t))}function Od(t,e){return(t%e+e)%e}function Td(t,e,i){return(1-i)*t+i*e}function Nd(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Bd(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}var Ld=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;k()(this,t),t.prototype.isVector2=!0,this.x=e,this.y=i}),[{key:"width",get:function(){return this.x},set:function(t){this.x=t}},{key:"height",get:function(){return this.y},set:function(t){this.y=t}},{key:"set",value:function(t,e){return this.x=t,this.y=e,this}},{key:"setScalar",value:function(t){return this.x=t,this.y=t,this}},{key:"setX",value:function(t){return this.x=t,this}},{key:"setY",value:function(t){return this.y=t,this}},{key:"setComponent",value:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}},{key:"getComponent",value:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y)}},{key:"copy",value:function(t){return this.x=t.x,this.y=t.y,this}},{key:"add",value:function(t){return this.x+=t.x,this.y+=t.y,this}},{key:"addScalar",value:function(t){return this.x+=t,this.y+=t,this}},{key:"addVectors",value:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}},{key:"addScaledVector",value:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}},{key:"sub",value:function(t){return this.x-=t.x,this.y-=t.y,this}},{key:"subScalar",value:function(t){return this.x-=t,this.y-=t,this}},{key:"subVectors",value:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}},{key:"multiply",value:function(t){return this.x*=t.x,this.y*=t.y,this}},{key:"multiplyScalar",value:function(t){return this.x*=t,this.y*=t,this}},{key:"divide",value:function(t){return this.x/=t.x,this.y/=t.y,this}},{key:"divideScalar",value:function(t){return this.multiplyScalar(1/t)}},{key:"applyMatrix3",value:function(t){var e=this.x,i=this.y,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this}},{key:"min",value:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}},{key:"max",value:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}},{key:"clamp",value:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}},{key:"clampScalar",value:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}},{key:"clampLength",value:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},{key:"roundToZero",value:function(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this}},{key:"dot",value:function(t){return this.x*t.x+this.y*t.y}},{key:"cross",value:function(t){return this.x*t.y-this.y*t.x}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"angle",value:function(){return Math.atan2(-this.y,-this.x)+Math.PI}},{key:"angleTo",value:function(t){var e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;var i=this.dot(t)/e;return Math.acos(Pd(i,-1,1))}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceToSquared(t))}},{key:"distanceToSquared",value:function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i}},{key:"manhattanDistanceTo",value:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}},{key:"setLength",value:function(t){return this.normalize().multiplyScalar(t)}},{key:"lerp",value:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}},{key:"lerpVectors",value:function(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}},{key:"equals",value:function(t){return t.x===this.x&&t.y===this.y}},{key:"fromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=t[e],this.y=t[e+1],this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this.x,t[e+1]=this.y,t}},{key:"fromBufferAttribute",value:function(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}},{key:"rotateAround",value:function(t,e){var i=Math.cos(e),n=Math.sin(e),o=this.x-t.x,s=this.y-t.y;return this.x=o*i-s*n+t.x,this.y=o*n+s*i+t.y,this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this}},{key:Symbol.iterator,value:a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.x;case 2:return t.next=4,this.y;case 4:case"end":return t.stop()}}),t,this)}))}])}(),Ad=function(){return _()((function t(e,i,n,o,s,a,r,l,c){k()(this,t),t.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,i,n,o,s,a,r,l,c)}),[{key:"set",value:function(t,e,i,n,o,s,a,r,l){var c=this.elements;return c[0]=t,c[1]=n,c[2]=a,c[3]=e,c[4]=o,c[5]=r,c[6]=i,c[7]=s,c[8]=l,this}},{key:"identity",value:function(){return this.set(1,0,0,0,1,0,0,0,1),this}},{key:"copy",value:function(t){var e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}},{key:"extractBasis",value:function(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}},{key:"setFromMatrix4",value:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}},{key:"multiply",value:function(t){return this.multiplyMatrices(this,t)}},{key:"premultiply",value:function(t){return this.multiplyMatrices(t,this)}},{key:"multiplyMatrices",value:function(t,e){var i=t.elements,n=e.elements,o=this.elements,s=i[0],a=i[3],r=i[6],l=i[1],c=i[4],u=i[7],p=i[2],h=i[5],d=i[8],m=n[0],f=n[3],v=n[6],g=n[1],y=n[4],b=n[7],C=n[2],w=n[5],k=n[8];return o[0]=s*m+a*g+r*C,o[3]=s*f+a*y+r*w,o[6]=s*v+a*b+r*k,o[1]=l*m+c*g+u*C,o[4]=l*f+c*y+u*w,o[7]=l*v+c*b+u*k,o[2]=p*m+h*g+d*C,o[5]=p*f+h*y+d*w,o[8]=p*v+h*b+d*k,this}},{key:"multiplyScalar",value:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}},{key:"determinant",value:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],r=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-i*o*c+i*a*r+n*o*l-n*s*r}},{key:"invert",value:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],r=t[6],l=t[7],c=t[8],u=c*s-a*l,p=a*r-c*o,h=l*o-s*r,d=e*u+i*p+n*h;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);var m=1/d;return t[0]=u*m,t[1]=(n*l-c*i)*m,t[2]=(a*i-n*s)*m,t[3]=p*m,t[4]=(c*e-n*r)*m,t[5]=(n*o-a*e)*m,t[6]=h*m,t[7]=(i*r-l*e)*m,t[8]=(s*e-i*o)*m,this}},{key:"transpose",value:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}},{key:"getNormalMatrix",value:function(t){return this.setFromMatrix4(t).invert().transpose()}},{key:"transposeIntoArray",value:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}},{key:"setUvTransform",value:function(t,e,i,n,o,s,a){var r=Math.cos(o),l=Math.sin(o);return this.set(i*r,i*l,-i*(r*s+l*a)+s+t,-n*l,n*r,-n*(-l*s+r*a)+a+e,0,0,1),this}},{key:"scale",value:function(t,e){return this.premultiply(jd.makeScale(t,e)),this}},{key:"rotate",value:function(t){return this.premultiply(jd.makeRotation(-t)),this}},{key:"translate",value:function(t,e){return this.premultiply(jd.makeTranslation(t,e)),this}},{key:"makeTranslation",value:function(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}},{key:"makeRotation",value:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}},{key:"makeScale",value:function(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}},{key:"equals",value:function(t){for(var e=this.elements,i=t.elements,n=0;n<9;n++)if(e[n]!==i[n])return!1;return!0}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;i<9;i++)this.elements[i]=t[i+e];return this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}},{key:"clone",value:function(){return(new this.constructor).fromArray(this.elements)}}])}(),jd=new Ad;function Id(t){for(var e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function Fd(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}var Rd={};function zd(t){t in Rd||(Rd[t]=!0,console.warn(t))}var Hd,Vd=(new Ad).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Gd=(new Ad).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Ud=C()(C()(C()(C()({},fd,{transfer:yd,primaries:Cd,toReference:function(t){return t},fromReference:function(t){return t}}),md,{transfer:bd,primaries:Cd,toReference:function(t){return t.convertSRGBToLinear()},fromReference:function(t){return t.convertLinearToSRGB()}}),gd,{transfer:yd,primaries:"p3",toReference:function(t){return t.applyMatrix3(Gd)},fromReference:function(t){return t.applyMatrix3(Vd)}}),vd,{transfer:bd,primaries:"p3",toReference:function(t){return t.convertSRGBToLinear().applyMatrix3(Gd)},fromReference:function(t){return t.applyMatrix3(Vd).convertLinearToSRGB()}}),Wd=new Set([fd,gd]),Yd={enabled:!0,_workingColorSpace:fd,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Wd.has(t))throw new Error('Unsupported working color space, "'.concat(t,'".'));this._workingColorSpace=t},convert:function(t,e,i){if(!1===this.enabled||e===i||!e||!i)return t;var n=Ud[e].toReference;return(0,Ud[i].fromReference)(n(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Ud[t].primaries},getTransfer:function(t){return""===t?yd:Ud[t].transfer}};function Jd(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function qd(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}var Xd=function(){return _()((function t(){k()(this,t)}),null,[{key:"getDataURL",value:function(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;var e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===Hd&&(Hd=Fd("canvas")),Hd.width=t.width,Hd.height=t.height;var i=Hd.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),e=Hd}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}},{key:"sRGBToLinear",value:function(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){var e=Fd("canvas");e.width=t.width,e.height=t.height;var i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);for(var n=i.getImageData(0,0,t.width,t.height),o=n.data,s=0;s<o.length;s++)o[s]=255*Jd(o[s]/255);return i.putImageData(n,0,0),e}if(t.data){for(var a=t.data.slice(0),r=0;r<a.length;r++)a instanceof Uint8Array||a instanceof Uint8ClampedArray?a[r]=Math.floor(255*Jd(a[r]/255)):a[r]=Jd(a[r]);return{data:a,width:t.width,height:t.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}])}(),Zd=0,Kd=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;k()(this,t),this.isSource=!0,Object.defineProperty(this,"id",{value:Zd++}),this.uuid=Md(),this.data=e,this.dataReady=!0,this.version=0}),[{key:"needsUpdate",set:function(t){!0===t&&this.version++}},{key:"toJSON",value:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.images[this.uuid])return t.images[this.uuid];var i={uuid:this.uuid,url:""},n=this.data;if(null!==n){var o;if(Array.isArray(n)){o=[];for(var s=0,a=n.length;s<a;s++)n[s].isDataTexture?o.push($d(n[s].image)):o.push($d(n[s]))}else o=$d(n);i.url=o}return e||(t.images[this.uuid]=i),i}}])}();function $d(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?Xd.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Qd=0,tm=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.DEFAULT_IMAGE,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEFAULT_MAPPING,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1001,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1001,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1006,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1008,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1023,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1009,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:e.DEFAULT_ANISOTROPY,p=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";return k()(this,e),(t=cd(this,e)).isTexture=!0,Object.defineProperty(rd()(t),"id",{value:Qd++}),t.uuid=Md(),t.name="",t.source=new Kd(i),t.mipmaps=[],t.mapping=n,t.channel=0,t.wrapS=o,t.wrapT=s,t.magFilter=a,t.minFilter=r,t.anisotropy=u,t.format=l,t.internalFormat=null,t.type=c,t.offset=new Ld(0,0),t.repeat=new Ld(1,1),t.center=new Ld(0,0),t.rotation=0,t.matrixAutoUpdate=!0,t.matrix=new Ad,t.generateMipmaps=!0,t.premultiplyAlpha=!1,t.flipY=!0,t.unpackAlignment=4,t.colorSpace=p,t.userData={},t.version=0,t.onUpdate=null,t.isRenderTargetTexture=!1,t.pmremVersion=0,t}return Xi()(e,t),_()(e,[{key:"image",get:function(){return this.source.data},set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.source.data=t}},{key:"updateMatrix",value:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}},{key:"toJSON",value:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}},{key:"transformUv",value:function(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case 1e3:t.x=t.x-Math.floor(t.x);break;case 1001:t.x=t.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case 1e3:t.y=t.y-Math.floor(t.y);break;case 1001:t.y=t.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}},{key:"needsUpdate",set:function(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}},{key:"needsPMREMUpdate",set:function(t){!0===t&&this.pmremVersion++}}])}(Ed);tm.DEFAULT_IMAGE=null,tm.DEFAULT_MAPPING=300,tm.DEFAULT_ANISOTROPY=1;var em=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;k()(this,t),t.prototype.isVector4=!0,this.x=e,this.y=i,this.z=n,this.w=o}),[{key:"width",get:function(){return this.z},set:function(t){this.z=t}},{key:"height",get:function(){return this.w},set:function(t){this.w=t}},{key:"set",value:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this}},{key:"setScalar",value:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}},{key:"setX",value:function(t){return this.x=t,this}},{key:"setY",value:function(t){return this.y=t,this}},{key:"setZ",value:function(t){return this.z=t,this}},{key:"setW",value:function(t){return this.w=t,this}},{key:"setComponent",value:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}},{key:"getComponent",value:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y,this.z,this.w)}},{key:"copy",value:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}},{key:"add",value:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}},{key:"addScalar",value:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}},{key:"addVectors",value:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}},{key:"addScaledVector",value:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}},{key:"sub",value:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}},{key:"subScalar",value:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}},{key:"subVectors",value:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}},{key:"multiply",value:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}},{key:"multiplyScalar",value:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}},{key:"applyMatrix4",value:function(t){var e=this.x,i=this.y,n=this.z,o=this.w,s=t.elements;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*o,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*o,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*o,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*o,this}},{key:"divideScalar",value:function(t){return this.multiplyScalar(1/t)}},{key:"setAxisAngleFromQuaternion",value:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}},{key:"setAxisAngleFromRotationMatrix",value:function(t){var e,i,n,o,s=.01,a=.1,r=t.elements,l=r[0],c=r[4],u=r[8],p=r[1],h=r[5],d=r[9],m=r[2],f=r[6],v=r[10];if(Math.abs(c-p)<s&&Math.abs(u-m)<s&&Math.abs(d-f)<s){if(Math.abs(c+p)<a&&Math.abs(u+m)<a&&Math.abs(d+f)<a&&Math.abs(l+h+v-3)<a)return this.set(1,0,0,0),this;e=Math.PI;var g=(l+1)/2,y=(h+1)/2,b=(v+1)/2,C=(c+p)/4,w=(u+m)/4,k=(d+f)/4;return g>y&&g>b?g<s?(i=0,n=.707106781,o=.707106781):(n=C/(i=Math.sqrt(g)),o=w/i):y>b?y<s?(i=.707106781,n=0,o=.707106781):(i=C/(n=Math.sqrt(y)),o=k/n):b<s?(i=.707106781,n=.707106781,o=0):(i=w/(o=Math.sqrt(b)),n=k/o),this.set(i,n,o,e),this}var x=Math.sqrt((f-d)*(f-d)+(u-m)*(u-m)+(p-c)*(p-c));return Math.abs(x)<.001&&(x=1),this.x=(f-d)/x,this.y=(u-m)/x,this.z=(p-c)/x,this.w=Math.acos((l+h+v-1)/2),this}},{key:"min",value:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}},{key:"max",value:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}},{key:"clamp",value:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}},{key:"clampScalar",value:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}},{key:"clampLength",value:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}},{key:"roundToZero",value:function(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}},{key:"dot",value:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"setLength",value:function(t){return this.normalize().multiplyScalar(t)}},{key:"lerp",value:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}},{key:"lerpVectors",value:function(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}},{key:"equals",value:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}},{key:"fromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}},{key:"fromBufferAttribute",value:function(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}},{key:Symbol.iterator,value:a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.x;case 2:return t.next=4,this.y;case 4:return t.next=6,this.z;case 6:return t.next=8,this.w;case 8:case"end":return t.stop()}}),t,this)}))}])}(),im=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return k()(this,e),(t=cd(this,e,[null])).isDataArrayTexture=!0,t.image={data:i,width:n,height:o,depth:s},t.magFilter=1003,t.minFilter=1003,t.wrapR=1001,t.generateMipmaps=!1,t.flipY=!1,t.unpackAlignment=1,t}return Xi()(e,t),_()(e)}(tm),nm=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return k()(this,e),(t=cd(this,e,[null])).isData3DTexture=!0,t.image={data:i,width:n,height:o,depth:s},t.magFilter=1003,t.minFilter=1003,t.wrapR=1001,t.generateMipmaps=!1,t.flipY=!1,t.unpackAlignment=1,t}return Xi()(e,t),_()(e)}(tm),om=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;k()(this,t),this.isQuaternion=!0,this._x=e,this._y=i,this._z=n,this._w=o}),[{key:"x",get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},{key:"w",get:function(){return this._w},set:function(t){this._w=t,this._onChangeCallback()}},{key:"set",value:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this._onChangeCallback(),this}},{key:"clone",value:function(){return new this.constructor(this._x,this._y,this._z,this._w)}},{key:"copy",value:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}},{key:"setFromEuler",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t._x,n=t._y,o=t._z,s=t._order,a=Math.cos,r=Math.sin,l=a(i/2),c=a(n/2),u=a(o/2),p=r(i/2),h=r(n/2),d=r(o/2);switch(s){case"XYZ":this._x=p*c*u+l*h*d,this._y=l*h*u-p*c*d,this._z=l*c*d+p*h*u,this._w=l*c*u-p*h*d;break;case"YXZ":this._x=p*c*u+l*h*d,this._y=l*h*u-p*c*d,this._z=l*c*d-p*h*u,this._w=l*c*u+p*h*d;break;case"ZXY":this._x=p*c*u-l*h*d,this._y=l*h*u+p*c*d,this._z=l*c*d+p*h*u,this._w=l*c*u-p*h*d;break;case"ZYX":this._x=p*c*u-l*h*d,this._y=l*h*u+p*c*d,this._z=l*c*d-p*h*u,this._w=l*c*u+p*h*d;break;case"YZX":this._x=p*c*u+l*h*d,this._y=l*h*u+p*c*d,this._z=l*c*d-p*h*u,this._w=l*c*u-p*h*d;break;case"XZY":this._x=p*c*u-l*h*d,this._y=l*h*u-p*c*d,this._z=l*c*d+p*h*u,this._w=l*c*u+p*h*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===e&&this._onChangeCallback(),this}},{key:"setFromAxisAngle",value:function(t,e){var i=e/2,n=Math.sin(i);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}},{key:"setFromRotationMatrix",value:function(t){var e=t.elements,i=e[0],n=e[4],o=e[8],s=e[1],a=e[5],r=e[9],l=e[2],c=e[6],u=e[10],p=i+a+u;if(p>0){var h=.5/Math.sqrt(p+1);this._w=.25/h,this._x=(c-r)*h,this._y=(o-l)*h,this._z=(s-n)*h}else if(i>a&&i>u){var d=2*Math.sqrt(1+i-a-u);this._w=(c-r)/d,this._x=.25*d,this._y=(n+s)/d,this._z=(o+l)/d}else if(a>u){var m=2*Math.sqrt(1+a-i-u);this._w=(o-l)/m,this._x=(n+s)/m,this._y=.25*m,this._z=(r+c)/m}else{var f=2*Math.sqrt(1+u-i-a);this._w=(s-n)/f,this._x=(o+l)/f,this._y=(r+c)/f,this._z=.25*f}return this._onChangeCallback(),this}},{key:"setFromUnitVectors",value:function(t,e){var i=t.dot(e)+1;return i<Number.EPSILON?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}},{key:"angleTo",value:function(t){return 2*Math.acos(Math.abs(Pd(this.dot(t),-1,1)))}},{key:"rotateTowards",value:function(t,e){var i=this.angleTo(t);if(0===i)return this;var n=Math.min(1,e/i);return this.slerp(t,n),this}},{key:"identity",value:function(){return this.set(0,0,0,1)}},{key:"invert",value:function(){return this.conjugate()}},{key:"conjugate",value:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}},{key:"dot",value:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}},{key:"lengthSq",value:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}},{key:"length",value:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}},{key:"normalize",value:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}},{key:"multiply",value:function(t){return this.multiplyQuaternions(this,t)}},{key:"premultiply",value:function(t){return this.multiplyQuaternions(t,this)}},{key:"multiplyQuaternions",value:function(t,e){var i=t._x,n=t._y,o=t._z,s=t._w,a=e._x,r=e._y,l=e._z,c=e._w;return this._x=i*c+s*a+n*l-o*r,this._y=n*c+s*r+o*a-i*l,this._z=o*c+s*l+i*r-n*a,this._w=s*c-i*a-n*r-o*l,this._onChangeCallback(),this}},{key:"slerp",value:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var i=this._x,n=this._y,o=this._z,s=this._w,a=s*t._w+i*t._x+n*t._y+o*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=i,this._y=n,this._z=o,this;var r=1-a*a;if(r<=Number.EPSILON){var l=1-e;return this._w=l*s+e*this._w,this._x=l*i+e*this._x,this._y=l*n+e*this._y,this._z=l*o+e*this._z,this.normalize(),this}var c=Math.sqrt(r),u=Math.atan2(c,a),p=Math.sin((1-e)*u)/c,h=Math.sin(e*u)/c;return this._w=s*p+this._w*h,this._x=i*p+this._x*h,this._y=n*p+this._y*h,this._z=o*p+this._z*h,this._onChangeCallback(),this}},{key:"slerpQuaternions",value:function(t,e,i){return this.copy(t).slerp(e,i)}},{key:"random",value:function(){var t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),o=Math.sqrt(i);return this.set(n*Math.sin(t),n*Math.cos(t),o*Math.sin(e),o*Math.cos(e))}},{key:"equals",value:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}},{key:"fromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}},{key:"fromBufferAttribute",value:function(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}},{key:"toJSON",value:function(){return this.toArray()}},{key:"_onChange",value:function(t){return this._onChangeCallback=t,this}},{key:"_onChangeCallback",value:function(){}},{key:Symbol.iterator,value:a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._x;case 2:return t.next=4,this._y;case 4:return t.next=6,this._z;case 6:return t.next=8,this._w;case 8:case"end":return t.stop()}}),t,this)}))}],[{key:"slerpFlat",value:function(t,e,i,n,o,s,a){var r=i[n+0],l=i[n+1],c=i[n+2],u=i[n+3],p=o[s+0],h=o[s+1],d=o[s+2],m=o[s+3];if(0===a)return t[e+0]=r,t[e+1]=l,t[e+2]=c,void(t[e+3]=u);if(1===a)return t[e+0]=p,t[e+1]=h,t[e+2]=d,void(t[e+3]=m);if(u!==m||r!==p||l!==h||c!==d){var f=1-a,v=r*p+l*h+c*d+u*m,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),C=Math.atan2(b,v*g);f=Math.sin(f*C)/b,a=Math.sin(a*C)/b}var w=a*g;if(r=r*f+p*w,l=l*f+h*w,c=c*f+d*w,u=u*f+m*w,f===1-a){var k=1/Math.sqrt(r*r+l*l+c*c+u*u);r*=k,l*=k,c*=k,u*=k}}t[e]=r,t[e+1]=l,t[e+2]=c,t[e+3]=u}},{key:"multiplyQuaternionsFlat",value:function(t,e,i,n,o,s){var a=i[n],r=i[n+1],l=i[n+2],c=i[n+3],u=o[s],p=o[s+1],h=o[s+2],d=o[s+3];return t[e]=a*d+c*u+r*h-l*p,t[e+1]=r*d+c*p+l*u-a*h,t[e+2]=l*d+c*h+a*p-r*u,t[e+3]=c*d-a*u-r*p-l*h,t}}])}(),sm=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;k()(this,t),t.prototype.isVector3=!0,this.x=e,this.y=i,this.z=n}),[{key:"set",value:function(t,e,i){return void 0===i&&(i=this.z),this.x=t,this.y=e,this.z=i,this}},{key:"setScalar",value:function(t){return this.x=t,this.y=t,this.z=t,this}},{key:"setX",value:function(t){return this.x=t,this}},{key:"setY",value:function(t){return this.y=t,this}},{key:"setZ",value:function(t){return this.z=t,this}},{key:"setComponent",value:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}},{key:"getComponent",value:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}},{key:"clone",value:function(){return new this.constructor(this.x,this.y,this.z)}},{key:"copy",value:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}},{key:"add",value:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}},{key:"addScalar",value:function(t){return this.x+=t,this.y+=t,this.z+=t,this}},{key:"addVectors",value:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}},{key:"addScaledVector",value:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}},{key:"sub",value:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}},{key:"subScalar",value:function(t){return this.x-=t,this.y-=t,this.z-=t,this}},{key:"subVectors",value:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}},{key:"multiply",value:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}},{key:"multiplyScalar",value:function(t){return this.x*=t,this.y*=t,this.z*=t,this}},{key:"multiplyVectors",value:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}},{key:"applyEuler",value:function(t){return this.applyQuaternion(rm.setFromEuler(t))}},{key:"applyAxisAngle",value:function(t,e){return this.applyQuaternion(rm.setFromAxisAngle(t,e))}},{key:"applyMatrix3",value:function(t){var e=this.x,i=this.y,n=this.z,o=t.elements;return this.x=o[0]*e+o[3]*i+o[6]*n,this.y=o[1]*e+o[4]*i+o[7]*n,this.z=o[2]*e+o[5]*i+o[8]*n,this}},{key:"applyNormalMatrix",value:function(t){return this.applyMatrix3(t).normalize()}},{key:"applyMatrix4",value:function(t){var e=this.x,i=this.y,n=this.z,o=t.elements,s=1/(o[3]*e+o[7]*i+o[11]*n+o[15]);return this.x=(o[0]*e+o[4]*i+o[8]*n+o[12])*s,this.y=(o[1]*e+o[5]*i+o[9]*n+o[13])*s,this.z=(o[2]*e+o[6]*i+o[10]*n+o[14])*s,this}},{key:"applyQuaternion",value:function(t){var e=this.x,i=this.y,n=this.z,o=t.x,s=t.y,a=t.z,r=t.w,l=2*(s*n-a*i),c=2*(a*e-o*n),u=2*(o*i-s*e);return this.x=e+r*l+s*u-a*c,this.y=i+r*c+a*l-o*u,this.z=n+r*u+o*c-s*l,this}},{key:"project",value:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}},{key:"unproject",value:function(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}},{key:"transformDirection",value:function(t){var e=this.x,i=this.y,n=this.z,o=t.elements;return this.x=o[0]*e+o[4]*i+o[8]*n,this.y=o[1]*e+o[5]*i+o[9]*n,this.z=o[2]*e+o[6]*i+o[10]*n,this.normalize()}},{key:"divide",value:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}},{key:"divideScalar",value:function(t){return this.multiplyScalar(1/t)}},{key:"min",value:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}},{key:"max",value:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}},{key:"clamp",value:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}},{key:"clampScalar",value:function(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}},{key:"clampLength",value:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}},{key:"floor",value:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}},{key:"ceil",value:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}},{key:"round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}},{key:"roundToZero",value:function(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}},{key:"negate",value:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}},{key:"dot",value:function(t){return this.x*t.x+this.y*t.y+this.z*t.z}},{key:"lengthSq",value:function(){return this.x*this.x+this.y*this.y+this.z*this.z}},{key:"length",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}},{key:"manhattanLength",value:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}},{key:"normalize",value:function(){return this.divideScalar(this.length()||1)}},{key:"setLength",value:function(t){return this.normalize().multiplyScalar(t)}},{key:"lerp",value:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}},{key:"lerpVectors",value:function(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}},{key:"cross",value:function(t){return this.crossVectors(this,t)}},{key:"crossVectors",value:function(t,e){var i=t.x,n=t.y,o=t.z,s=e.x,a=e.y,r=e.z;return this.x=n*r-o*a,this.y=o*s-i*r,this.z=i*a-n*s,this}},{key:"projectOnVector",value:function(t){var e=t.lengthSq();if(0===e)return this.set(0,0,0);var i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}},{key:"projectOnPlane",value:function(t){return am.copy(this).projectOnVector(t),this.sub(am)}},{key:"reflect",value:function(t){return this.sub(am.copy(t).multiplyScalar(2*this.dot(t)))}},{key:"angleTo",value:function(t){var e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;var i=this.dot(t)/e;return Math.acos(Pd(i,-1,1))}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceToSquared(t))}},{key:"distanceToSquared",value:function(t){var e=this.x-t.x,i=this.y-t.y,n=this.z-t.z;return e*e+i*i+n*n}},{key:"manhattanDistanceTo",value:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}},{key:"setFromSpherical",value:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}},{key:"setFromSphericalCoords",value:function(t,e,i){var n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this}},{key:"setFromCylindrical",value:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}},{key:"setFromCylindricalCoords",value:function(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}},{key:"setFromMatrixPosition",value:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}},{key:"setFromMatrixScale",value:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=n,this}},{key:"setFromMatrixColumn",value:function(t,e){return this.fromArray(t.elements,4*e)}},{key:"setFromMatrix3Column",value:function(t,e){return this.fromArray(t.elements,3*e)}},{key:"setFromEuler",value:function(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}},{key:"setFromColor",value:function(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}},{key:"equals",value:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}},{key:"fromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}},{key:"fromBufferAttribute",value:function(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}},{key:"random",value:function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}},{key:"randomDirection",value:function(){var t=Math.random()*Math.PI*2,e=2*Math.random()-1,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}},{key:Symbol.iterator,value:a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.x;case 2:return t.next=4,this.y;case 4:return t.next=6,this.z;case 6:case"end":return t.stop()}}),t,this)}))}])}(),am=new sm,rm=new om,lm=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm(1/0,1/0,1/0),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm(-1/0,-1/0,-1/0);k()(this,t),this.isBox3=!0,this.min=e,this.max=i}),[{key:"set",value:function(t,e){return this.min.copy(t),this.max.copy(e),this}},{key:"setFromArray",value:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e+=3)this.expandByPoint(um.fromArray(t,e));return this}},{key:"setFromBufferAttribute",value:function(t){this.makeEmpty();for(var e=0,i=t.count;e<i;e++)this.expandByPoint(um.fromBufferAttribute(t,e));return this}},{key:"setFromPoints",value:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}},{key:"setFromCenterAndSize",value:function(t,e){var i=um.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}},{key:"setFromObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.makeEmpty(),this.expandByObject(t,e)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){return this.min.copy(t.min),this.max.copy(t.max),this}},{key:"makeEmpty",value:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}},{key:"isEmpty",value:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}},{key:"getCenter",value:function(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}},{key:"getSize",value:function(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}},{key:"expandByPoint",value:function(t){return this.min.min(t),this.max.max(t),this}},{key:"expandByVector",value:function(t){return this.min.sub(t),this.max.add(t),this}},{key:"expandByScalar",value:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this}},{key:"expandByObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.updateWorldMatrix(!1,!1);var i=t.geometry;if(void 0!==i){var n=i.getAttribute("position");if(!0===e&&void 0!==n&&!0!==t.isInstancedMesh)for(var o=0,s=n.count;o<s;o++)!0===t.isMesh?t.getVertexPosition(o,um):um.fromBufferAttribute(n,o),um.applyMatrix4(t.matrixWorld),this.expandByPoint(um);else void 0!==t.boundingBox?(null===t.boundingBox&&t.computeBoundingBox(),pm.copy(t.boundingBox)):(null===i.boundingBox&&i.computeBoundingBox(),pm.copy(i.boundingBox)),pm.applyMatrix4(t.matrixWorld),this.union(pm)}for(var a=t.children,r=0,l=a.length;r<l;r++)this.expandByObject(a[r],e);return this}},{key:"containsPoint",value:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}},{key:"containsBox",value:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}},{key:"getParameter",value:function(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}},{key:"intersectsBox",value:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}},{key:"intersectsSphere",value:function(t){return this.clampPoint(t.center,um),um.distanceToSquared(t.center)<=t.radius*t.radius}},{key:"intersectsPlane",value:function(t){var e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}},{key:"intersectsTriangle",value:function(t){if(this.isEmpty())return!1;this.getCenter(ym),bm.subVectors(this.max,ym),hm.subVectors(t.a,ym),dm.subVectors(t.b,ym),mm.subVectors(t.c,ym),fm.subVectors(dm,hm),vm.subVectors(mm,dm),gm.subVectors(hm,mm);var e=[0,-fm.z,fm.y,0,-vm.z,vm.y,0,-gm.z,gm.y,fm.z,0,-fm.x,vm.z,0,-vm.x,gm.z,0,-gm.x,-fm.y,fm.x,0,-vm.y,vm.x,0,-gm.y,gm.x,0];return!!km(e,hm,dm,mm,bm)&&(!!km(e=[1,0,0,0,1,0,0,0,1],hm,dm,mm,bm)&&(Cm.crossVectors(fm,vm),km(e=[Cm.x,Cm.y,Cm.z],hm,dm,mm,bm)))}},{key:"clampPoint",value:function(t,e){return e.copy(t).clamp(this.min,this.max)}},{key:"distanceToPoint",value:function(t){return this.clampPoint(t,um).distanceTo(t)}},{key:"getBoundingSphere",value:function(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(um).length()),t}},{key:"intersect",value:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}},{key:"union",value:function(t){return this.min.min(t.min),this.max.max(t.max),this}},{key:"applyMatrix4",value:function(t){return this.isEmpty()||(cm[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),cm[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),cm[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),cm[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),cm[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),cm[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),cm[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),cm[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(cm)),this}},{key:"translate",value:function(t){return this.min.add(t),this.max.add(t),this}},{key:"equals",value:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}])}(),cm=[new sm,new sm,new sm,new sm,new sm,new sm,new sm,new sm],um=new sm,pm=new lm,hm=new sm,dm=new sm,mm=new sm,fm=new sm,vm=new sm,gm=new sm,ym=new sm,bm=new sm,Cm=new sm,wm=new sm;function km(t,e,i,n,o){for(var s=0,a=t.length-3;s<=a;s+=3){wm.fromArray(t,s);var r=o.x*Math.abs(wm.x)+o.y*Math.abs(wm.y)+o.z*Math.abs(wm.z),l=e.dot(wm),c=i.dot(wm),u=n.dot(wm);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>r)return!1}return!0}var xm=new lm,_m=new sm,Em=new sm,Sm=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;k()(this,t),this.isSphere=!0,this.center=e,this.radius=i}),[{key:"set",value:function(t,e){return this.center.copy(t),this.radius=e,this}},{key:"setFromPoints",value:function(t,e){var i=this.center;void 0!==e?i.copy(e):xm.setFromPoints(t).getCenter(i);for(var n=0,o=0,s=t.length;o<s;o++)n=Math.max(n,i.distanceToSquared(t[o]));return this.radius=Math.sqrt(n),this}},{key:"copy",value:function(t){return this.center.copy(t.center),this.radius=t.radius,this}},{key:"isEmpty",value:function(){return this.radius<0}},{key:"makeEmpty",value:function(){return this.center.set(0,0,0),this.radius=-1,this}},{key:"containsPoint",value:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}},{key:"distanceToPoint",value:function(t){return t.distanceTo(this.center)-this.radius}},{key:"intersectsSphere",value:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}},{key:"intersectsBox",value:function(t){return t.intersectsSphere(this)}},{key:"intersectsPlane",value:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}},{key:"clampPoint",value:function(t,e){var i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}},{key:"getBoundingBox",value:function(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}},{key:"applyMatrix4",value:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}},{key:"translate",value:function(t){return this.center.add(t),this}},{key:"expandByPoint",value:function(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;_m.subVectors(t,this.center);var e=_m.lengthSq();if(e>this.radius*this.radius){var i=Math.sqrt(e),n=.5*(i-this.radius);this.center.addScaledVector(_m,n/i),this.radius+=n}return this}},{key:"union",value:function(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(Em.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(_m.copy(t.center).add(Em)),this.expandByPoint(_m.copy(t.center).sub(Em))),this)}},{key:"equals",value:function(t){return t.center.equals(this.center)&&t.radius===this.radius}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}])}(),Dm=new sm,Mm=new sm,Pm=new sm,Om=new sm,Tm=new sm,Nm=new sm,Bm=new sm,Lm=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm(0,0,-1);k()(this,t),this.origin=e,this.direction=i}),[{key:"set",value:function(t,e){return this.origin.copy(t),this.direction.copy(e),this}},{key:"copy",value:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}},{key:"at",value:function(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}},{key:"lookAt",value:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this}},{key:"recast",value:function(t){return this.origin.copy(this.at(t,Dm)),this}},{key:"closestPointToPoint",value:function(t,e){e.subVectors(t,this.origin);var i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}},{key:"distanceToPoint",value:function(t){return Math.sqrt(this.distanceSqToPoint(t))}},{key:"distanceSqToPoint",value:function(t){var e=Dm.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Dm.copy(this.origin).addScaledVector(this.direction,e),Dm.distanceToSquared(t))}},{key:"distanceSqToSegment",value:function(t,e,i,n){Mm.copy(t).add(e).multiplyScalar(.5),Pm.copy(e).sub(t).normalize(),Om.copy(this.origin).sub(Mm);var o,s,a,r,l=.5*t.distanceTo(e),c=-this.direction.dot(Pm),u=Om.dot(this.direction),p=-Om.dot(Pm),h=Om.lengthSq(),d=Math.abs(1-c*c);if(d>0)if(s=c*u-p,r=l*d,(o=c*p-u)>=0)if(s>=-r)if(s<=r){var m=1/d;a=(o*=m)*(o+c*(s*=m)+2*u)+s*(c*o+s+2*p)+h}else s=l,a=-(o=Math.max(0,-(c*s+u)))*o+s*(s+2*p)+h;else s=-l,a=-(o=Math.max(0,-(c*s+u)))*o+s*(s+2*p)+h;else s<=-r?a=-(o=Math.max(0,-(-c*l+u)))*o+(s=o>0?-l:Math.min(Math.max(-l,-p),l))*(s+2*p)+h:s<=r?(o=0,a=(s=Math.min(Math.max(-l,-p),l))*(s+2*p)+h):a=-(o=Math.max(0,-(c*l+u)))*o+(s=o>0?l:Math.min(Math.max(-l,-p),l))*(s+2*p)+h;else s=c>0?-l:l,a=-(o=Math.max(0,-(c*s+u)))*o+s*(s+2*p)+h;return i&&i.copy(this.origin).addScaledVector(this.direction,o),n&&n.copy(Mm).addScaledVector(Pm,s),a}},{key:"intersectSphere",value:function(t,e){Dm.subVectors(t.center,this.origin);var i=Dm.dot(this.direction),n=Dm.dot(Dm)-i*i,o=t.radius*t.radius;if(n>o)return null;var s=Math.sqrt(o-n),a=i-s,r=i+s;return r<0?null:a<0?this.at(r,e):this.at(a,e)}},{key:"intersectsSphere",value:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}},{key:"distanceToPlane",value:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}},{key:"intersectPlane",value:function(t,e){var i=this.distanceToPlane(t);return null===i?null:this.at(i,e)}},{key:"intersectsPlane",value:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}},{key:"intersectBox",value:function(t,e){var i,n,o,s,a,r,l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,p=this.origin;return l>=0?(i=(t.min.x-p.x)*l,n=(t.max.x-p.x)*l):(i=(t.max.x-p.x)*l,n=(t.min.x-p.x)*l),c>=0?(o=(t.min.y-p.y)*c,s=(t.max.y-p.y)*c):(o=(t.max.y-p.y)*c,s=(t.min.y-p.y)*c),i>s||o>n?null:((o>i||isNaN(i))&&(i=o),(s<n||isNaN(n))&&(n=s),u>=0?(a=(t.min.z-p.z)*u,r=(t.max.z-p.z)*u):(a=(t.max.z-p.z)*u,r=(t.min.z-p.z)*u),i>r||a>n?null:((a>i||i!=i)&&(i=a),(r<n||n!=n)&&(n=r),n<0?null:this.at(i>=0?i:n,e)))}},{key:"intersectsBox",value:function(t){return null!==this.intersectBox(t,Dm)}},{key:"intersectTriangle",value:function(t,e,i,n,o){Tm.subVectors(e,t),Nm.subVectors(i,t),Bm.crossVectors(Tm,Nm);var s,a=this.direction.dot(Bm);if(a>0){if(n)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Om.subVectors(this.origin,t);var r=s*this.direction.dot(Nm.crossVectors(Om,Nm));if(r<0)return null;var l=s*this.direction.dot(Tm.cross(Om));if(l<0)return null;if(r+l>a)return null;var c=-s*Om.dot(Bm);return c<0?null:this.at(c/a,o)}},{key:"applyMatrix4",value:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}},{key:"equals",value:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}])}(),Am=function(){function t(e,i,n,o,s,a,r,l,c,u,p,h,d,m,f,v){k()(this,t),t.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,i,n,o,s,a,r,l,c,u,p,h,d,m,f,v)}return _()(t,[{key:"set",value:function(t,e,i,n,o,s,a,r,l,c,u,p,h,d,m,f){var v=this.elements;return v[0]=t,v[4]=e,v[8]=i,v[12]=n,v[1]=o,v[5]=s,v[9]=a,v[13]=r,v[2]=l,v[6]=c,v[10]=u,v[14]=p,v[3]=h,v[7]=d,v[11]=m,v[15]=f,this}},{key:"identity",value:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}},{key:"clone",value:function(){return(new t).fromArray(this.elements)}},{key:"copy",value:function(t){var e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}},{key:"copyPosition",value:function(t){var e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}},{key:"setFromMatrix3",value:function(t){var e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}},{key:"extractBasis",value:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}},{key:"makeBasis",value:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}},{key:"extractRotation",value:function(t){var e=this.elements,i=t.elements,n=1/jm.setFromMatrixColumn(t,0).length(),o=1/jm.setFromMatrixColumn(t,1).length(),s=1/jm.setFromMatrixColumn(t,2).length();return e[0]=i[0]*n,e[1]=i[1]*n,e[2]=i[2]*n,e[3]=0,e[4]=i[4]*o,e[5]=i[5]*o,e[6]=i[6]*o,e[7]=0,e[8]=i[8]*s,e[9]=i[9]*s,e[10]=i[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}},{key:"makeRotationFromEuler",value:function(t){var e=this.elements,i=t.x,n=t.y,o=t.z,s=Math.cos(i),a=Math.sin(i),r=Math.cos(n),l=Math.sin(n),c=Math.cos(o),u=Math.sin(o);if("XYZ"===t.order){var p=s*c,h=s*u,d=a*c,m=a*u;e[0]=r*c,e[4]=-r*u,e[8]=l,e[1]=h+d*l,e[5]=p-m*l,e[9]=-a*r,e[2]=m-p*l,e[6]=d+h*l,e[10]=s*r}else if("YXZ"===t.order){var f=r*c,v=r*u,g=l*c,y=l*u;e[0]=f+y*a,e[4]=g*a-v,e[8]=s*l,e[1]=s*u,e[5]=s*c,e[9]=-a,e[2]=v*a-g,e[6]=y+f*a,e[10]=s*r}else if("ZXY"===t.order){var b=r*c,C=r*u,w=l*c,k=l*u;e[0]=b-k*a,e[4]=-s*u,e[8]=w+C*a,e[1]=C+w*a,e[5]=s*c,e[9]=k-b*a,e[2]=-s*l,e[6]=a,e[10]=s*r}else if("ZYX"===t.order){var x=s*c,_=s*u,E=a*c,S=a*u;e[0]=r*c,e[4]=E*l-_,e[8]=x*l+S,e[1]=r*u,e[5]=S*l+x,e[9]=_*l-E,e[2]=-l,e[6]=a*r,e[10]=s*r}else if("YZX"===t.order){var D=s*r,M=s*l,P=a*r,O=a*l;e[0]=r*c,e[4]=O-D*u,e[8]=P*u+M,e[1]=u,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=M*u+P,e[10]=D-O*u}else if("XZY"===t.order){var T=s*r,N=s*l,B=a*r,L=a*l;e[0]=r*c,e[4]=-u,e[8]=l*c,e[1]=T*u+L,e[5]=s*c,e[9]=N*u-B,e[2]=B*u-N,e[6]=a*c,e[10]=L*u+T}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}},{key:"makeRotationFromQuaternion",value:function(t){return this.compose(Fm,t,Rm)}},{key:"lookAt",value:function(t,e,i){var n=this.elements;return Vm.subVectors(t,e),0===Vm.lengthSq()&&(Vm.z=1),Vm.normalize(),zm.crossVectors(i,Vm),0===zm.lengthSq()&&(1===Math.abs(i.z)?Vm.x+=1e-4:Vm.z+=1e-4,Vm.normalize(),zm.crossVectors(i,Vm)),zm.normalize(),Hm.crossVectors(Vm,zm),n[0]=zm.x,n[4]=Hm.x,n[8]=Vm.x,n[1]=zm.y,n[5]=Hm.y,n[9]=Vm.y,n[2]=zm.z,n[6]=Hm.z,n[10]=Vm.z,this}},{key:"multiply",value:function(t){return this.multiplyMatrices(this,t)}},{key:"premultiply",value:function(t){return this.multiplyMatrices(t,this)}},{key:"multiplyMatrices",value:function(t,e){var i=t.elements,n=e.elements,o=this.elements,s=i[0],a=i[4],r=i[8],l=i[12],c=i[1],u=i[5],p=i[9],h=i[13],d=i[2],m=i[6],f=i[10],v=i[14],g=i[3],y=i[7],b=i[11],C=i[15],w=n[0],k=n[4],x=n[8],_=n[12],E=n[1],S=n[5],D=n[9],M=n[13],P=n[2],O=n[6],T=n[10],N=n[14],B=n[3],L=n[7],A=n[11],j=n[15];return o[0]=s*w+a*E+r*P+l*B,o[4]=s*k+a*S+r*O+l*L,o[8]=s*x+a*D+r*T+l*A,o[12]=s*_+a*M+r*N+l*j,o[1]=c*w+u*E+p*P+h*B,o[5]=c*k+u*S+p*O+h*L,o[9]=c*x+u*D+p*T+h*A,o[13]=c*_+u*M+p*N+h*j,o[2]=d*w+m*E+f*P+v*B,o[6]=d*k+m*S+f*O+v*L,o[10]=d*x+m*D+f*T+v*A,o[14]=d*_+m*M+f*N+v*j,o[3]=g*w+y*E+b*P+C*B,o[7]=g*k+y*S+b*O+C*L,o[11]=g*x+y*D+b*T+C*A,o[15]=g*_+y*M+b*N+C*j,this}},{key:"multiplyScalar",value:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}},{key:"determinant",value:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],o=t[12],s=t[1],a=t[5],r=t[9],l=t[13],c=t[2],u=t[6],p=t[10],h=t[14];return t[3]*(+o*r*u-n*l*u-o*a*p+i*l*p+n*a*h-i*r*h)+t[7]*(+e*r*h-e*l*p+o*s*p-n*s*h+n*l*c-o*r*c)+t[11]*(+e*l*u-e*a*h-o*s*u+i*s*h+o*a*c-i*l*c)+t[15]*(-n*a*c-e*r*u+e*a*p+n*s*u-i*s*p+i*r*c)}},{key:"transpose",value:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}},{key:"setPosition",value:function(t,e,i){var n=this.elements;return t.isVector3?(n[12]=t.x,n[13]=t.y,n[14]=t.z):(n[12]=t,n[13]=e,n[14]=i),this}},{key:"invert",value:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],r=t[6],l=t[7],c=t[8],u=t[9],p=t[10],h=t[11],d=t[12],m=t[13],f=t[14],v=t[15],g=u*f*l-m*p*l+m*r*h-a*f*h-u*r*v+a*p*v,y=d*p*l-c*f*l-d*r*h+s*f*h+c*r*v-s*p*v,b=c*m*l-d*u*l+d*a*h-s*m*h-c*a*v+s*u*v,C=d*u*r-c*m*r-d*a*p+s*m*p+c*a*f-s*u*f,w=e*g+i*y+n*b+o*C;if(0===w)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var k=1/w;return t[0]=g*k,t[1]=(m*p*o-u*f*o-m*n*h+i*f*h+u*n*v-i*p*v)*k,t[2]=(a*f*o-m*r*o+m*n*l-i*f*l-a*n*v+i*r*v)*k,t[3]=(u*r*o-a*p*o-u*n*l+i*p*l+a*n*h-i*r*h)*k,t[4]=y*k,t[5]=(c*f*o-d*p*o+d*n*h-e*f*h-c*n*v+e*p*v)*k,t[6]=(d*r*o-s*f*o-d*n*l+e*f*l+s*n*v-e*r*v)*k,t[7]=(s*p*o-c*r*o+c*n*l-e*p*l-s*n*h+e*r*h)*k,t[8]=b*k,t[9]=(d*u*o-c*m*o-d*i*h+e*m*h+c*i*v-e*u*v)*k,t[10]=(s*m*o-d*a*o+d*i*l-e*m*l-s*i*v+e*a*v)*k,t[11]=(c*a*o-s*u*o-c*i*l+e*u*l+s*i*h-e*a*h)*k,t[12]=C*k,t[13]=(c*m*n-d*u*n+d*i*p-e*m*p-c*i*f+e*u*f)*k,t[14]=(d*a*n-s*m*n-d*i*r+e*m*r+s*i*f-e*a*f)*k,t[15]=(s*u*n-c*a*n+c*i*r-e*u*r-s*i*p+e*a*p)*k,this}},{key:"scale",value:function(t){var e=this.elements,i=t.x,n=t.y,o=t.z;return e[0]*=i,e[4]*=n,e[8]*=o,e[1]*=i,e[5]*=n,e[9]*=o,e[2]*=i,e[6]*=n,e[10]*=o,e[3]*=i,e[7]*=n,e[11]*=o,this}},{key:"getMaxScaleOnAxis",value:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}},{key:"makeTranslation",value:function(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}},{key:"makeRotationX",value:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}},{key:"makeRotationY",value:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}},{key:"makeRotationZ",value:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}},{key:"makeRotationAxis",value:function(t,e){var i=Math.cos(e),n=Math.sin(e),o=1-i,s=t.x,a=t.y,r=t.z,l=o*s,c=o*a;return this.set(l*s+i,l*a-n*r,l*r+n*a,0,l*a+n*r,c*a+i,c*r-n*s,0,l*r-n*a,c*r+n*s,o*r*r+i,0,0,0,0,1),this}},{key:"makeScale",value:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}},{key:"makeShear",value:function(t,e,i,n,o,s){return this.set(1,i,o,0,t,1,s,0,e,n,1,0,0,0,0,1),this}},{key:"compose",value:function(t,e,i){var n=this.elements,o=e._x,s=e._y,a=e._z,r=e._w,l=o+o,c=s+s,u=a+a,p=o*l,h=o*c,d=o*u,m=s*c,f=s*u,v=a*u,g=r*l,y=r*c,b=r*u,C=i.x,w=i.y,k=i.z;return n[0]=(1-(m+v))*C,n[1]=(h+b)*C,n[2]=(d-y)*C,n[3]=0,n[4]=(h-b)*w,n[5]=(1-(p+v))*w,n[6]=(f+g)*w,n[7]=0,n[8]=(d+y)*k,n[9]=(f-g)*k,n[10]=(1-(p+m))*k,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}},{key:"decompose",value:function(t,e,i){var n=this.elements,o=jm.set(n[0],n[1],n[2]).length(),s=jm.set(n[4],n[5],n[6]).length(),a=jm.set(n[8],n[9],n[10]).length();this.determinant()<0&&(o=-o),t.x=n[12],t.y=n[13],t.z=n[14],Im.copy(this);var r=1/o,l=1/s,c=1/a;return Im.elements[0]*=r,Im.elements[1]*=r,Im.elements[2]*=r,Im.elements[4]*=l,Im.elements[5]*=l,Im.elements[6]*=l,Im.elements[8]*=c,Im.elements[9]*=c,Im.elements[10]*=c,e.setFromRotationMatrix(Im),i.x=o,i.y=s,i.z=a,this}},{key:"makePerspective",value:function(t,e,i,n,o,s){var a,r,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2e3,c=this.elements,u=2*o/(e-t),p=2*o/(i-n),h=(e+t)/(e-t),d=(i+n)/(i-n);if(l===xd)a=-(s+o)/(s-o),r=-2*s*o/(s-o);else{if(l!==_d)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+l);a=-s/(s-o),r=-s*o/(s-o)}return c[0]=u,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=p,c[9]=d,c[13]=0,c[2]=0,c[6]=0,c[10]=a,c[14]=r,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}},{key:"makeOrthographic",value:function(t,e,i,n,o,s){var a,r,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2e3,c=this.elements,u=1/(e-t),p=1/(i-n),h=1/(s-o),d=(e+t)*u,m=(i+n)*p;if(l===xd)a=(s+o)*h,r=-2*h;else{if(l!==_d)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+l);a=o*h,r=-1*h}return c[0]=2*u,c[4]=0,c[8]=0,c[12]=-d,c[1]=0,c[5]=2*p,c[9]=0,c[13]=-m,c[2]=0,c[6]=0,c[10]=r,c[14]=-a,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}},{key:"equals",value:function(t){for(var e=this.elements,i=t.elements,n=0;n<16;n++)if(e[n]!==i[n])return!1;return!0}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;i<16;i++)this.elements[i]=t[i+e];return this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}])}(),jm=new sm,Im=new Am,Fm=new sm(0,0,0),Rm=new sm(1,1,1),zm=new sm,Hm=new sm,Vm=new sm,Gm=new Am,Um=new om,Wm=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.DEFAULT_ORDER;k()(this,t),this.isEuler=!0,this._x=e,this._y=i,this._z=n,this._order=o}),[{key:"x",get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(t){this._order=t,this._onChangeCallback()}},{key:"set",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._order;return this._x=t,this._y=e,this._z=i,this._order=n,this._onChangeCallback(),this}},{key:"clone",value:function(){return new this.constructor(this._x,this._y,this._z,this._order)}},{key:"copy",value:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}},{key:"setFromRotationMatrix",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.elements,o=n[0],s=n[4],a=n[8],r=n[1],l=n[5],c=n[9],u=n[2],p=n[6],h=n[10];switch(e){case"XYZ":this._y=Math.asin(Pd(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(p,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Pd(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(r,l)):(this._y=Math.atan2(-u,o),this._z=0);break;case"ZXY":this._x=Math.asin(Pd(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(r,o));break;case"ZYX":this._y=Math.asin(-Pd(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(p,h),this._z=Math.atan2(r,o)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Pd(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,o)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Pd(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(p,l),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-c,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===i&&this._onChangeCallback(),this}},{key:"setFromQuaternion",value:function(t,e,i){return Gm.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Gm,e,i)}},{key:"setFromVector3",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order;return this.set(t.x,t.y,t.z,e)}},{key:"reorder",value:function(t){return Um.setFromEuler(this),this.setFromQuaternion(Um,t)}},{key:"equals",value:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}},{key:"fromArray",value:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}},{key:"_onChange",value:function(t){return this._onChangeCallback=t,this}},{key:"_onChangeCallback",value:function(){}},{key:Symbol.iterator,value:a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._x;case 2:return t.next=4,this._y;case 4:return t.next=6,this._z;case 6:return t.next=8,this._order;case 8:case"end":return t.stop()}}),t,this)}))}])}();Wm.DEFAULT_ORDER="XYZ";var Ym=function(){return _()((function t(){k()(this,t),this.mask=1}),[{key:"set",value:function(t){this.mask=(1<<t|0)>>>0}},{key:"enable",value:function(t){this.mask|=1<<t|0}},{key:"enableAll",value:function(){this.mask=-1}},{key:"toggle",value:function(t){this.mask^=1<<t|0}},{key:"disable",value:function(t){this.mask&=~(1<<t|0)}},{key:"disableAll",value:function(){this.mask=0}},{key:"test",value:function(t){return 0!=(this.mask&t.mask)}},{key:"isEnabled",value:function(t){return 0!=(this.mask&(1<<t|0))}}])}(),Jm=0,qm=new sm,Xm=new om,Zm=new Am,Km=new sm,$m=new sm,Qm=new sm,tf=new om,ef=new sm(1,0,0),nf=new sm(0,1,0),of=new sm(0,0,1),sf={type:"added"},af={type:"removed"},rf={type:"childadded",child:null},lf={type:"childremoved",child:null},cf=function(t){function e(){var t;k()(this,e),(t=cd(this,e)).isObject3D=!0,Object.defineProperty(rd()(t),"id",{value:Jm++}),t.uuid=Md(),t.name="",t.type="Object3D",t.parent=null,t.children=[],t.up=e.DEFAULT_UP.clone();var i=new sm,n=new Wm,o=new om,s=new sm(1,1,1);return n._onChange((function(){o.setFromEuler(n,!1)})),o._onChange((function(){n.setFromQuaternion(o,void 0,!1)})),Object.defineProperties(t,{position:{configurable:!0,enumerable:!0,value:i},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:o},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new Am},normalMatrix:{value:new Ad}}),t.matrix=new Am,t.matrixWorld=new Am,t.matrixAutoUpdate=e.DEFAULT_MATRIX_AUTO_UPDATE,t.matrixWorldAutoUpdate=e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,t.matrixWorldNeedsUpdate=!1,t.layers=new Ym,t.visible=!0,t.castShadow=!1,t.receiveShadow=!1,t.frustumCulled=!0,t.renderOrder=0,t.animations=[],t.userData={},t}return Xi()(e,t),_()(e,[{key:"onBeforeShadow",value:function(){}},{key:"onAfterShadow",value:function(){}},{key:"onBeforeRender",value:function(){}},{key:"onAfterRender",value:function(){}},{key:"applyMatrix4",value:function(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}},{key:"applyQuaternion",value:function(t){return this.quaternion.premultiply(t),this}},{key:"setRotationFromAxisAngle",value:function(t,e){this.quaternion.setFromAxisAngle(t,e)}},{key:"setRotationFromEuler",value:function(t){this.quaternion.setFromEuler(t,!0)}},{key:"setRotationFromMatrix",value:function(t){this.quaternion.setFromRotationMatrix(t)}},{key:"setRotationFromQuaternion",value:function(t){this.quaternion.copy(t)}},{key:"rotateOnAxis",value:function(t,e){return Xm.setFromAxisAngle(t,e),this.quaternion.multiply(Xm),this}},{key:"rotateOnWorldAxis",value:function(t,e){return Xm.setFromAxisAngle(t,e),this.quaternion.premultiply(Xm),this}},{key:"rotateX",value:function(t){return this.rotateOnAxis(ef,t)}},{key:"rotateY",value:function(t){return this.rotateOnAxis(nf,t)}},{key:"rotateZ",value:function(t){return this.rotateOnAxis(of,t)}},{key:"translateOnAxis",value:function(t,e){return qm.copy(t).applyQuaternion(this.quaternion),this.position.add(qm.multiplyScalar(e)),this}},{key:"translateX",value:function(t){return this.translateOnAxis(ef,t)}},{key:"translateY",value:function(t){return this.translateOnAxis(nf,t)}},{key:"translateZ",value:function(t){return this.translateOnAxis(of,t)}},{key:"localToWorld",value:function(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}},{key:"worldToLocal",value:function(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Zm.copy(this.matrixWorld).invert())}},{key:"lookAt",value:function(t,e,i){t.isVector3?Km.copy(t):Km.set(t,e,i);var n=this.parent;this.updateWorldMatrix(!0,!1),$m.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Zm.lookAt($m,Km,this.up):Zm.lookAt(Km,$m,this.up),this.quaternion.setFromRotationMatrix(Zm),n&&(Zm.extractRotation(n.matrixWorld),Xm.setFromRotationMatrix(Zm),this.quaternion.premultiply(Xm.invert()))}},{key:"add",value:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(sf),rf.child=t,this.dispatchEvent(rf),rf.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}},{key:"remove",value:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var i=this.children.indexOf(t);return-1!==i&&(t.parent=null,this.children.splice(i,1),t.dispatchEvent(af),lf.child=t,this.dispatchEvent(lf),lf.child=null),this}},{key:"removeFromParent",value:function(){var t=this.parent;return null!==t&&t.remove(this),this}},{key:"clear",value:function(){return this.remove.apply(this,L()(this.children))}},{key:"attach",value:function(t){return this.updateWorldMatrix(!0,!1),Zm.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Zm.multiply(t.parent.matrixWorld)),t.applyMatrix4(Zm),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(sf),rf.child=t,this.dispatchEvent(rf),rf.child=null,this}},{key:"getObjectById",value:function(t){return this.getObjectByProperty("id",t)}},{key:"getObjectByName",value:function(t){return this.getObjectByProperty("name",t)}},{key:"getObjectByProperty",value:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var o=this.children[i].getObjectByProperty(t,e);if(void 0!==o)return o}}},{key:"getObjectsByProperty",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this[t]===e&&i.push(this);for(var n=this.children,o=0,s=n.length;o<s;o++)n[o].getObjectsByProperty(t,e,i);return i}},{key:"getWorldPosition",value:function(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}},{key:"getWorldQuaternion",value:function(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose($m,t,Qm),t}},{key:"getWorldScale",value:function(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose($m,tf,t),t}},{key:"getWorldDirection",value:function(t){this.updateWorldMatrix(!0,!1);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}},{key:"raycast",value:function(){}},{key:"traverse",value:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)}},{key:"traverseVisible",value:function(t){if(!1!==this.visible){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}}},{key:"traverseAncestors",value:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}},{key:"updateMatrix",value:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}},{key:"updateMatrixWorld",value:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++){var o=e[i];!0!==o.matrixWorldAutoUpdate&&!0!==t||o.updateMatrixWorld(t)}}},{key:"updateWorldMatrix",value:function(t,e){var i=this.parent;if(!0===t&&null!==i&&!0===i.matrixWorldAutoUpdate&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e)for(var n=this.children,o=0,s=n.length;o<s;o++){var a=n[o];!0===a.matrixWorldAutoUpdate&&a.updateWorldMatrix(!1,!0)}}},{key:"toJSON",value:function(t){var e=void 0===t||"string"==typeof t,i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});var n={};function o(e,i){return void 0===e[i.uuid]&&(e[i.uuid]=i.toJSON(t)),i.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map((function(t){return{boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()}})),n.maxGeometryCount=this._maxGeometryCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),null!==this.boundingBox&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=o(t.geometries,this.geometry);var s=this.geometry.parameters;if(void 0!==s&&void 0!==s.shapes){var a=s.shapes;if(Array.isArray(a))for(var r=0,l=a.length;r<l;r++){var c=a[r];o(t.shapes,c)}else o(t.shapes,a)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(o(t.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){for(var u=[],p=0,h=this.material.length;p<h;p++)u.push(o(t.materials,this.material[p]));n.material=u}else n.material=o(t.materials,this.material);if(this.children.length>0){n.children=[];for(var d=0;d<this.children.length;d++)n.children.push(this.children[d].toJSON(t).object)}if(this.animations.length>0){n.animations=[];for(var m=0;m<this.animations.length;m++){var f=this.animations[m];n.animations.push(o(t.animations,f))}}if(e){var v=_(t.geometries),g=_(t.materials),y=_(t.textures),b=_(t.images),C=_(t.shapes),w=_(t.skeletons),k=_(t.animations),x=_(t.nodes);v.length>0&&(i.geometries=v),g.length>0&&(i.materials=g),y.length>0&&(i.textures=y),b.length>0&&(i.images=b),C.length>0&&(i.shapes=C),w.length>0&&(i.skeletons=w),k.length>0&&(i.animations=k),x.length>0&&(i.nodes=x)}return i.object=n,i;function _(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}}},{key:"clone",value:function(t){return(new this.constructor).copy(this,t)}},{key:"copy",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var i=0;i<t.children.length;i++){var n=t.children[i];this.add(n.clone())}return this}}])}(Ed);cf.DEFAULT_UP=new sm(0,1,0),cf.DEFAULT_MATRIX_AUTO_UPDATE=!0,cf.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var uf=new sm,pf=new sm,hf=new sm,df=new sm,mf=new sm,ff=new sm,vf=new sm,gf=new sm,yf=new sm,bf=new sm,Cf=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new sm;k()(this,t),this.a=e,this.b=i,this.c=n}return _()(t,[{key:"set",value:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}},{key:"setFromPointsAndIndices",value:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this}},{key:"setFromAttributeAndIndices",value:function(t,e,i,n){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,n),this}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}},{key:"getArea",value:function(){return uf.subVectors(this.c,this.b),pf.subVectors(this.a,this.b),.5*uf.cross(pf).length()}},{key:"getMidpoint",value:function(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}},{key:"getNormal",value:function(e){return t.getNormal(this.a,this.b,this.c,e)}},{key:"getPlane",value:function(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}},{key:"getBarycoord",value:function(e,i){return t.getBarycoord(e,this.a,this.b,this.c,i)}},{key:"getInterpolation",value:function(e,i,n,o,s){return t.getInterpolation(e,this.a,this.b,this.c,i,n,o,s)}},{key:"containsPoint",value:function(e){return t.containsPoint(e,this.a,this.b,this.c)}},{key:"isFrontFacing",value:function(e){return t.isFrontFacing(this.a,this.b,this.c,e)}},{key:"intersectsBox",value:function(t){return t.intersectsTriangle(this)}},{key:"closestPointToPoint",value:function(t,e){var i,n,o=this.a,s=this.b,a=this.c;mf.subVectors(s,o),ff.subVectors(a,o),gf.subVectors(t,o);var r=mf.dot(gf),l=ff.dot(gf);if(r<=0&&l<=0)return e.copy(o);yf.subVectors(t,s);var c=mf.dot(yf),u=ff.dot(yf);if(c>=0&&u<=c)return e.copy(s);var p=r*u-c*l;if(p<=0&&r>=0&&c<=0)return i=r/(r-c),e.copy(o).addScaledVector(mf,i);bf.subVectors(t,a);var h=mf.dot(bf),d=ff.dot(bf);if(d>=0&&h<=d)return e.copy(a);var m=h*l-r*d;if(m<=0&&l>=0&&d<=0)return n=l/(l-d),e.copy(o).addScaledVector(ff,n);var f=c*d-h*u;if(f<=0&&u-c>=0&&h-d>=0)return vf.subVectors(a,s),n=(u-c)/(u-c+(h-d)),e.copy(s).addScaledVector(vf,n);var v=1/(f+m+p);return i=m*v,n=p*v,e.copy(o).addScaledVector(mf,i).addScaledVector(ff,n)}},{key:"equals",value:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}],[{key:"getNormal",value:function(t,e,i,n){n.subVectors(i,e),uf.subVectors(t,e),n.cross(uf);var o=n.lengthSq();return o>0?n.multiplyScalar(1/Math.sqrt(o)):n.set(0,0,0)}},{key:"getBarycoord",value:function(t,e,i,n,o){uf.subVectors(n,e),pf.subVectors(i,e),hf.subVectors(t,e);var s=uf.dot(uf),a=uf.dot(pf),r=uf.dot(hf),l=pf.dot(pf),c=pf.dot(hf),u=s*l-a*a;if(0===u)return o.set(0,0,0),null;var p=1/u,h=(l*r-a*c)*p,d=(s*c-a*r)*p;return o.set(1-h-d,d,h)}},{key:"containsPoint",value:function(t,e,i,n){return null!==this.getBarycoord(t,e,i,n,df)&&df.x>=0&&df.y>=0&&df.x+df.y<=1}},{key:"getInterpolation",value:function(t,e,i,n,o,s,a,r){return null===this.getBarycoord(t,e,i,n,df)?(r.x=0,r.y=0,"z"in r&&(r.z=0),"w"in r&&(r.w=0),null):(r.setScalar(0),r.addScaledVector(o,df.x),r.addScaledVector(s,df.y),r.addScaledVector(a,df.z),r)}},{key:"isFrontFacing",value:function(t,e,i,n){return uf.subVectors(i,e),pf.subVectors(t,e),uf.cross(pf).dot(n)<0}}])}(),wf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},kf={h:0,s:0,l:0},xf={h:0,s:0,l:0};function _f(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+6*(e-t)*(2/3-i):t}var Ef=function(){return _()((function t(e,i,n){return k()(this,t),this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,i,n)}),[{key:"set",value:function(t,e,i){if(void 0===e&&void 0===i){var n=t;n&&n.isColor?this.copy(n):"number"==typeof n?this.setHex(n):"string"==typeof n&&this.setStyle(n)}else this.setRGB(t,e,i);return this}},{key:"setScalar",value:function(t){return this.r=t,this.g=t,this.b=t,this}},{key:"setHex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:md;return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Yd.toWorkingColorSpace(this,e),this}},{key:"setRGB",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Yd.workingColorSpace;return this.r=t,this.g=e,this.b=i,Yd.toWorkingColorSpace(this,n),this}},{key:"setHSL",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Yd.workingColorSpace;if(t=Od(t,1),e=Pd(e,0,1),i=Pd(i,0,1),0===e)this.r=this.g=this.b=i;else{var o=i<=.5?i*(1+e):i+e-i*e,s=2*i-o;this.r=_f(s,o,t+1/3),this.g=_f(s,o,t),this.b=_f(s,o,t-1/3)}return Yd.toWorkingColorSpace(this,n),this}},{key:"setStyle",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:md;function n(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}if(e=/^(\w+)\(([^\)]*)\)/.exec(t)){var o,s=e[1],a=e[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,i);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,i);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,i);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){var r=e[1],l=r.length;if(3===l)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,i);if(6===l)return this.setHex(parseInt(r,16),i);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,i);return this}},{key:"setColorName",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:md,i=wf[t.toLowerCase()];return void 0!==i?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+t),this}},{key:"clone",value:function(){return new this.constructor(this.r,this.g,this.b)}},{key:"copy",value:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}},{key:"copySRGBToLinear",value:function(t){return this.r=Jd(t.r),this.g=Jd(t.g),this.b=Jd(t.b),this}},{key:"copyLinearToSRGB",value:function(t){return this.r=qd(t.r),this.g=qd(t.g),this.b=qd(t.b),this}},{key:"convertSRGBToLinear",value:function(){return this.copySRGBToLinear(this),this}},{key:"convertLinearToSRGB",value:function(){return this.copyLinearToSRGB(this),this}},{key:"getHex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:md;return Yd.fromWorkingColorSpace(Sf.copy(this),t),65536*Math.round(Pd(255*Sf.r,0,255))+256*Math.round(Pd(255*Sf.g,0,255))+Math.round(Pd(255*Sf.b,0,255))}},{key:"getHexString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:md;return("000000"+this.getHex(t).toString(16)).slice(-6)}},{key:"getHSL",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yd.workingColorSpace;Yd.fromWorkingColorSpace(Sf.copy(this),e);var i,n,o=Sf.r,s=Sf.g,a=Sf.b,r=Math.max(o,s,a),l=Math.min(o,s,a),c=(l+r)/2;if(l===r)i=0,n=0;else{var u=r-l;switch(n=c<=.5?u/(r+l):u/(2-r-l),r){case o:i=(s-a)/u+(s<a?6:0);break;case s:i=(a-o)/u+2;break;case a:i=(o-s)/u+4}i/=6}return t.h=i,t.s=n,t.l=c,t}},{key:"getRGB",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yd.workingColorSpace;return Yd.fromWorkingColorSpace(Sf.copy(this),e),t.r=Sf.r,t.g=Sf.g,t.b=Sf.b,t}},{key:"getStyle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:md;Yd.fromWorkingColorSpace(Sf.copy(this),t);var e=Sf.r,i=Sf.g,n=Sf.b;return t!==md?"color(".concat(t," ").concat(e.toFixed(3)," ").concat(i.toFixed(3)," ").concat(n.toFixed(3),")"):"rgb(".concat(Math.round(255*e),",").concat(Math.round(255*i),",").concat(Math.round(255*n),")")}},{key:"offsetHSL",value:function(t,e,i){return this.getHSL(kf),this.setHSL(kf.h+t,kf.s+e,kf.l+i)}},{key:"add",value:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}},{key:"addColors",value:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}},{key:"addScalar",value:function(t){return this.r+=t,this.g+=t,this.b+=t,this}},{key:"sub",value:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}},{key:"multiply",value:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}},{key:"multiplyScalar",value:function(t){return this.r*=t,this.g*=t,this.b*=t,this}},{key:"lerp",value:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}},{key:"lerpColors",value:function(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}},{key:"lerpHSL",value:function(t,e){this.getHSL(kf),t.getHSL(xf);var i=Td(kf.h,xf.h,e),n=Td(kf.s,xf.s,e),o=Td(kf.l,xf.l,e);return this.setHSL(i,n,o),this}},{key:"setFromVector3",value:function(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}},{key:"applyMatrix3",value:function(t){var e=this.r,i=this.g,n=this.b,o=t.elements;return this.r=o[0]*e+o[3]*i+o[6]*n,this.g=o[1]*e+o[4]*i+o[7]*n,this.b=o[2]*e+o[5]*i+o[8]*n,this}},{key:"equals",value:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}},{key:"fromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}},{key:"fromBufferAttribute",value:function(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}},{key:"toJSON",value:function(){return this.getHex()}},{key:Symbol.iterator,value:a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.r;case 2:return t.next=4,this.g;case 4:return t.next=6,this.b;case 6:case"end":return t.stop()}}),t,this)}))}])}(),Sf=new Ef;Ef.NAMES=wf;var Df=0,Mf=function(t){function e(){var t;return k()(this,e),(t=cd(this,e)).isMaterial=!0,Object.defineProperty(rd()(t),"id",{value:Df++}),t.uuid=Md(),t.name="",t.type="Material",t.blending=1,t.side=0,t.vertexColors=!1,t.opacity=1,t.transparent=!1,t.alphaHash=!1,t.blendSrc=204,t.blendDst=205,t.blendEquation=100,t.blendSrcAlpha=null,t.blendDstAlpha=null,t.blendEquationAlpha=null,t.blendColor=new Ef(0,0,0),t.blendAlpha=0,t.depthFunc=3,t.depthTest=!0,t.depthWrite=!0,t.stencilWriteMask=255,t.stencilFunc=519,t.stencilRef=0,t.stencilFuncMask=255,t.stencilFail=wd,t.stencilZFail=wd,t.stencilZPass=wd,t.stencilWrite=!1,t.clippingPlanes=null,t.clipIntersection=!1,t.clipShadows=!1,t.shadowSide=null,t.colorWrite=!0,t.precision=null,t.polygonOffset=!1,t.polygonOffsetFactor=0,t.polygonOffsetUnits=0,t.dithering=!1,t.alphaToCoverage=!1,t.premultipliedAlpha=!1,t.forceSinglePass=!1,t.visible=!0,t.toneMapped=!0,t.userData={},t.version=0,t._alphaTest=0,t}return Xi()(e,t),_()(e,[{key:"alphaTest",get:function(){return this._alphaTest},set:function(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}},{key:"onBuild",value:function(){}},{key:"onBeforeRender",value:function(){}},{key:"onBeforeCompile",value:function(){}},{key:"customProgramCacheKey",value:function(){return this.onBeforeCompile.toString()}},{key:"setValues",value:function(t){if(void 0!==t)for(var e in t){var i=t[e];if(void 0!==i){var n=this[e];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i:console.warn("THREE.Material: '".concat(e,"' is not a property of THREE.").concat(this.type,"."))}else console.warn("THREE.Material: parameter '".concat(e,"' has value of undefined."))}}},{key:"toJSON",value:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function n(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.dispersion&&(i.dispersion=this.dispersion),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapRotation&&(i.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),0!==this.side&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),204!==this.blendSrc&&(i.blendSrc=this.blendSrc),205!==this.blendDst&&(i.blendDst=this.blendDst),100!==this.blendEquation&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==wd&&(i.stencilFail=this.stencilFail),this.stencilZFail!==wd&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==wd&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),e){var o=n(t.textures),s=n(t.images);o.length>0&&(i.textures=o),s.length>0&&(i.images=s)}return i}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;var e=t.clippingPlanes,i=null;if(null!==e){var n=e.length;i=new Array(n);for(var o=0;o!==n;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}},{key:"needsUpdate",set:function(t){!0===t&&this.version++}}])}(Ed),Pf=function(t){function e(t){var i;return k()(this,e),(i=cd(this,e)).isMeshBasicMaterial=!0,i.type="MeshBasicMaterial",i.color=new Ef(16777215),i.map=null,i.lightMap=null,i.lightMapIntensity=1,i.aoMap=null,i.aoMapIntensity=1,i.specularMap=null,i.alphaMap=null,i.envMap=null,i.envMapRotation=new Wm,i.combine=0,i.reflectivity=1,i.refractionRatio=.98,i.wireframe=!1,i.wireframeLinewidth=1,i.wireframeLinecap="round",i.wireframeLinejoin="round",i.fog=!0,i.setValues(t),i}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}])}(Mf);!function(){for(var t=new ArrayBuffer(4),e=new Float32Array(t),i=new Uint32Array(t),n=new Uint32Array(512),o=new Uint32Array(512),s=0;s<256;++s){var a=s-127;a<-27?(n[s]=0,n[256|s]=32768,o[s]=24,o[256|s]=24):a<-14?(n[s]=1024>>-a-14,n[256|s]=1024>>-a-14|32768,o[s]=-a-1,o[256|s]=-a-1):a<=15?(n[s]=a+15<<10,n[256|s]=a+15<<10|32768,o[s]=13,o[256|s]=13):a<128?(n[s]=31744,n[256|s]=64512,o[s]=24,o[256|s]=24):(n[s]=31744,n[256|s]=64512,o[s]=13,o[256|s]=13)}for(var r=new Uint32Array(2048),l=new Uint32Array(64),c=new Uint32Array(64),u=1;u<1024;++u){for(var p=u<<13,h=0;0==(8388608&p);)p<<=1,h-=8388608;p&=-8388609,h+=947912704,r[u]=p|h}for(var d=1024;d<2048;++d)r[d]=939524096+(d-1024<<13);for(var m=1;m<31;++m)l[m]=m<<23;l[31]=1199570944,l[32]=2147483648;for(var f=33;f<63;++f)l[f]=2147483648+(f-32<<23);l[63]=3347054592;for(var v=1;v<64;++v)32!==v&&(c[v]=1024)}();var Of=new sm,Tf=new Ld,Nf=function(){return _()((function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(k()(this,t),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=i,this.count=void 0!==e?e.length/i:0,this.normalized=n,this.usage=kd,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=1015,this.version=0}),[{key:"onUploadCallback",value:function(){}},{key:"needsUpdate",set:function(t){!0===t&&this.version++}},{key:"updateRange",get:function(){return zd("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}},{key:"setUsage",value:function(t){return this.usage=t,this}},{key:"addUpdateRange",value:function(t,e){this.updateRanges.push({start:t,count:e})}},{key:"clearUpdateRanges",value:function(){this.updateRanges.length=0}},{key:"copy",value:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}},{key:"copyAt",value:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,o=this.itemSize;n<o;n++)this.array[t+n]=e.array[i+n];return this}},{key:"copyArray",value:function(t){return this.array.set(t),this}},{key:"applyMatrix3",value:function(t){if(2===this.itemSize)for(var e=0,i=this.count;e<i;e++)Tf.fromBufferAttribute(this,e),Tf.applyMatrix3(t),this.setXY(e,Tf.x,Tf.y);else if(3===this.itemSize)for(var n=0,o=this.count;n<o;n++)Of.fromBufferAttribute(this,n),Of.applyMatrix3(t),this.setXYZ(n,Of.x,Of.y,Of.z);return this}},{key:"applyMatrix4",value:function(t){for(var e=0,i=this.count;e<i;e++)Of.fromBufferAttribute(this,e),Of.applyMatrix4(t),this.setXYZ(e,Of.x,Of.y,Of.z);return this}},{key:"applyNormalMatrix",value:function(t){for(var e=0,i=this.count;e<i;e++)Of.fromBufferAttribute(this,e),Of.applyNormalMatrix(t),this.setXYZ(e,Of.x,Of.y,Of.z);return this}},{key:"transformDirection",value:function(t){for(var e=0,i=this.count;e<i;e++)Of.fromBufferAttribute(this,e),Of.transformDirection(t),this.setXYZ(e,Of.x,Of.y,Of.z);return this}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(t,e),this}},{key:"getComponent",value:function(t,e){var i=this.array[t*this.itemSize+e];return this.normalized&&(i=Nd(i,this.array)),i}},{key:"setComponent",value:function(t,e,i){return this.normalized&&(i=Bd(i,this.array)),this.array[t*this.itemSize+e]=i,this}},{key:"getX",value:function(t){var e=this.array[t*this.itemSize];return this.normalized&&(e=Nd(e,this.array)),e}},{key:"setX",value:function(t,e){return this.normalized&&(e=Bd(e,this.array)),this.array[t*this.itemSize]=e,this}},{key:"getY",value:function(t){var e=this.array[t*this.itemSize+1];return this.normalized&&(e=Nd(e,this.array)),e}},{key:"setY",value:function(t,e){return this.normalized&&(e=Bd(e,this.array)),this.array[t*this.itemSize+1]=e,this}},{key:"getZ",value:function(t){var e=this.array[t*this.itemSize+2];return this.normalized&&(e=Nd(e,this.array)),e}},{key:"setZ",value:function(t,e){return this.normalized&&(e=Bd(e,this.array)),this.array[t*this.itemSize+2]=e,this}},{key:"getW",value:function(t){var e=this.array[t*this.itemSize+3];return this.normalized&&(e=Nd(e,this.array)),e}},{key:"setW",value:function(t,e){return this.normalized&&(e=Bd(e,this.array)),this.array[t*this.itemSize+3]=e,this}},{key:"setXY",value:function(t,e,i){return t*=this.itemSize,this.normalized&&(e=Bd(e,this.array),i=Bd(i,this.array)),this.array[t+0]=e,this.array[t+1]=i,this}},{key:"setXYZ",value:function(t,e,i,n){return t*=this.itemSize,this.normalized&&(e=Bd(e,this.array),i=Bd(i,this.array),n=Bd(n,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this}},{key:"setXYZW",value:function(t,e,i,n,o){return t*=this.itemSize,this.normalized&&(e=Bd(e,this.array),i=Bd(i,this.array),n=Bd(n,this.array),o=Bd(o,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=o,this}},{key:"onUpload",value:function(t){return this.onUploadCallback=t,this}},{key:"clone",value:function(){return new this.constructor(this.array,this.itemSize).copy(this)}},{key:"toJSON",value:function(){var t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==kd&&(t.usage=this.usage),t}}])}(),Bf=function(t){function e(t,i,n){return k()(this,e),cd(this,e,[new Uint16Array(t),i,n])}return Xi()(e,t),_()(e)}(Nf),Lf=function(t){function e(t,i,n){return k()(this,e),cd(this,e,[new Uint32Array(t),i,n])}return Xi()(e,t),_()(e)}(Nf),Af=function(t){function e(t,i,n){return k()(this,e),cd(this,e,[new Float32Array(t),i,n])}return Xi()(e,t),_()(e)}(Nf),jf=0,If=new Am,Ff=new cf,Rf=new sm,zf=new lm,Hf=new lm,Vf=new sm,Gf=function(t){function e(){var t;return k()(this,e),(t=cd(this,e)).isBufferGeometry=!0,Object.defineProperty(rd()(t),"id",{value:jf++}),t.uuid=Md(),t.name="",t.type="BufferGeometry",t.index=null,t.attributes={},t.morphAttributes={},t.morphTargetsRelative=!1,t.groups=[],t.boundingBox=null,t.boundingSphere=null,t.drawRange={start:0,count:1/0},t.userData={},t}return Xi()(e,t),_()(e,[{key:"getIndex",value:function(){return this.index}},{key:"setIndex",value:function(t){return Array.isArray(t)?this.index=new(Id(t)?Lf:Bf)(t,1):this.index=t,this}},{key:"getAttribute",value:function(t){return this.attributes[t]}},{key:"setAttribute",value:function(t,e){return this.attributes[t]=e,this}},{key:"deleteAttribute",value:function(t){return delete this.attributes[t],this}},{key:"hasAttribute",value:function(t){return void 0!==this.attributes[t]}},{key:"addGroup",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.groups.push({start:t,count:e,materialIndex:i})}},{key:"clearGroups",value:function(){this.groups=[]}},{key:"setDrawRange",value:function(t,e){this.drawRange.start=t,this.drawRange.count=e}},{key:"applyMatrix4",value:function(t){var e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);var i=this.attributes.normal;if(void 0!==i){var n=(new Ad).getNormalMatrix(t);i.applyNormalMatrix(n),i.needsUpdate=!0}var o=this.attributes.tangent;return void 0!==o&&(o.transformDirection(t),o.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}},{key:"applyQuaternion",value:function(t){return If.makeRotationFromQuaternion(t),this.applyMatrix4(If),this}},{key:"rotateX",value:function(t){return If.makeRotationX(t),this.applyMatrix4(If),this}},{key:"rotateY",value:function(t){return If.makeRotationY(t),this.applyMatrix4(If),this}},{key:"rotateZ",value:function(t){return If.makeRotationZ(t),this.applyMatrix4(If),this}},{key:"translate",value:function(t,e,i){return If.makeTranslation(t,e,i),this.applyMatrix4(If),this}},{key:"scale",value:function(t,e,i){return If.makeScale(t,e,i),this.applyMatrix4(If),this}},{key:"lookAt",value:function(t){return Ff.lookAt(t),Ff.updateMatrix(),this.applyMatrix4(Ff.matrix),this}},{key:"center",value:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Rf).negate(),this.translate(Rf.x,Rf.y,Rf.z),this}},{key:"setFromPoints",value:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i];e.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new Af(e,3)),this}},{key:"computeBoundingBox",value:function(){null===this.boundingBox&&(this.boundingBox=new lm);var t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),void this.boundingBox.set(new sm(-1/0,-1/0,-1/0),new sm(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(var i=0,n=e.length;i<n;i++){var o=e[i];zf.setFromBufferAttribute(o),this.morphTargetsRelative?(Vf.addVectors(this.boundingBox.min,zf.min),this.boundingBox.expandByPoint(Vf),Vf.addVectors(this.boundingBox.max,zf.max),this.boundingBox.expandByPoint(Vf)):(this.boundingBox.expandByPoint(zf.min),this.boundingBox.expandByPoint(zf.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}},{key:"computeBoundingSphere",value:function(){null===this.boundingSphere&&(this.boundingSphere=new Sm);var t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),void this.boundingSphere.set(new sm,1/0);if(t){var i=this.boundingSphere.center;if(zf.setFromBufferAttribute(t),e)for(var n=0,o=e.length;n<o;n++){var s=e[n];Hf.setFromBufferAttribute(s),this.morphTargetsRelative?(Vf.addVectors(zf.min,Hf.min),zf.expandByPoint(Vf),Vf.addVectors(zf.max,Hf.max),zf.expandByPoint(Vf)):(zf.expandByPoint(Hf.min),zf.expandByPoint(Hf.max))}zf.getCenter(i);for(var a=0,r=0,l=t.count;r<l;r++)Vf.fromBufferAttribute(t,r),a=Math.max(a,i.distanceToSquared(Vf));if(e)for(var c=0,u=e.length;c<u;c++)for(var p=e[c],h=this.morphTargetsRelative,d=0,m=p.count;d<m;d++)Vf.fromBufferAttribute(p,d),h&&(Rf.fromBufferAttribute(t,d),Vf.add(Rf)),a=Math.max(a,i.distanceToSquared(Vf));this.boundingSphere.radius=Math.sqrt(a),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}},{key:"computeTangents",value:function(){var t=this.index,e=this.attributes;if(null!==t&&void 0!==e.position&&void 0!==e.normal&&void 0!==e.uv){var i=e.position,n=e.normal,o=e.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Nf(new Float32Array(4*i.count),4));for(var s=this.getAttribute("tangent"),a=[],r=[],l=0;l<i.count;l++)a[l]=new sm,r[l]=new sm;var c=new sm,u=new sm,p=new sm,h=new Ld,d=new Ld,m=new Ld,f=new sm,v=new sm,g=this.groups;0===g.length&&(g=[{start:0,count:t.count}]);for(var y=0,b=g.length;y<b;++y)for(var C=g[y],w=C.start,k=w,x=w+C.count;k<x;k+=3)L(t.getX(k+0),t.getX(k+1),t.getX(k+2));for(var _=new sm,E=new sm,S=new sm,D=new sm,M=0,P=g.length;M<P;++M)for(var O=g[M],T=O.start,N=T,B=T+O.count;N<B;N+=3)A(t.getX(N+0)),A(t.getX(N+1)),A(t.getX(N+2))}else console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");function L(t,e,n){c.fromBufferAttribute(i,t),u.fromBufferAttribute(i,e),p.fromBufferAttribute(i,n),h.fromBufferAttribute(o,t),d.fromBufferAttribute(o,e),m.fromBufferAttribute(o,n),u.sub(c),p.sub(c),d.sub(h),m.sub(h);var s=1/(d.x*m.y-m.x*d.y);isFinite(s)&&(f.copy(u).multiplyScalar(m.y).addScaledVector(p,-d.y).multiplyScalar(s),v.copy(p).multiplyScalar(d.x).addScaledVector(u,-m.x).multiplyScalar(s),a[t].add(f),a[e].add(f),a[n].add(f),r[t].add(v),r[e].add(v),r[n].add(v))}function A(t){S.fromBufferAttribute(n,t),D.copy(S);var e=a[t];_.copy(e),_.sub(S.multiplyScalar(S.dot(e))).normalize(),E.crossVectors(D,e);var i=E.dot(r[t])<0?-1:1;s.setXYZW(t,_.x,_.y,_.z,i)}}},{key:"computeVertexNormals",value:function(){var t=this.index,e=this.getAttribute("position");if(void 0!==e){var i=this.getAttribute("normal");if(void 0===i)i=new Nf(new Float32Array(3*e.count),3),this.setAttribute("normal",i);else for(var n=0,o=i.count;n<o;n++)i.setXYZ(n,0,0,0);var s=new sm,a=new sm,r=new sm,l=new sm,c=new sm,u=new sm,p=new sm,h=new sm;if(t)for(var d=0,m=t.count;d<m;d+=3){var f=t.getX(d+0),v=t.getX(d+1),g=t.getX(d+2);s.fromBufferAttribute(e,f),a.fromBufferAttribute(e,v),r.fromBufferAttribute(e,g),p.subVectors(r,a),h.subVectors(s,a),p.cross(h),l.fromBufferAttribute(i,f),c.fromBufferAttribute(i,v),u.fromBufferAttribute(i,g),l.add(p),c.add(p),u.add(p),i.setXYZ(f,l.x,l.y,l.z),i.setXYZ(v,c.x,c.y,c.z),i.setXYZ(g,u.x,u.y,u.z)}else for(var y=0,b=e.count;y<b;y+=3)s.fromBufferAttribute(e,y+0),a.fromBufferAttribute(e,y+1),r.fromBufferAttribute(e,y+2),p.subVectors(r,a),h.subVectors(s,a),p.cross(h),i.setXYZ(y+0,p.x,p.y,p.z),i.setXYZ(y+1,p.x,p.y,p.z),i.setXYZ(y+2,p.x,p.y,p.z);this.normalizeNormals(),i.needsUpdate=!0}}},{key:"normalizeNormals",value:function(){for(var t=this.attributes.normal,e=0,i=t.count;e<i;e++)Vf.fromBufferAttribute(t,e),Vf.normalize(),t.setXYZ(e,Vf.x,Vf.y,Vf.z)}},{key:"toNonIndexed",value:function(){function t(t,e){for(var i=t.array,n=t.itemSize,o=t.normalized,s=new i.constructor(e.length*n),a=0,r=0,l=0,c=e.length;l<c;l++){a=t.isInterleavedBufferAttribute?e[l]*t.data.stride+t.offset:e[l]*n;for(var u=0;u<n;u++)s[r++]=i[a++]}return new Nf(s,n,o)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;var i=new e,n=this.index.array,o=this.attributes;for(var s in o){var a=t(o[s],n);i.setAttribute(s,a)}var r=this.morphAttributes;for(var l in r){for(var c=[],u=r[l],p=0,h=u.length;p<h;p++){var d=t(u[p],n);c.push(d)}i.morphAttributes[l]=c}i.morphTargetsRelative=this.morphTargetsRelative;for(var m=this.groups,f=0,v=m.length;f<v;f++){var g=m[f];i.addGroup(g.start,g.count,g.materialIndex)}return i}},{key:"toJSON",value:function(){var t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){var e=this.parameters;for(var i in e)void 0!==e[i]&&(t[i]=e[i]);return t}t.data={attributes:{}};var n=this.index;null!==n&&(t.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});var o=this.attributes;for(var s in o){var a=o[s];t.data.attributes[s]=a.toJSON(t.data)}var r={},l=!1;for(var c in this.morphAttributes){for(var u=this.morphAttributes[c],p=[],h=0,d=u.length;h<d;h++){var m=u[h];p.push(m.toJSON(t.data))}p.length>0&&(r[c]=p,l=!0)}l&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);var f=this.groups;f.length>0&&(t.data.groups=JSON.parse(JSON.stringify(f)));var v=this.boundingSphere;return null!==v&&(t.data.boundingSphere={center:v.center.toArray(),radius:v.radius}),t}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var e={};this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone(e));var n=t.attributes;for(var o in n){var s=n[o];this.setAttribute(o,s.clone(e))}var a=t.morphAttributes;for(var r in a){for(var l=[],c=a[r],u=0,p=c.length;u<p;u++)l.push(c[u].clone(e));this.morphAttributes[r]=l}this.morphTargetsRelative=t.morphTargetsRelative;for(var h=t.groups,d=0,m=h.length;d<m;d++){var f=h[d];this.addGroup(f.start,f.count,f.materialIndex)}var v=t.boundingBox;null!==v&&(this.boundingBox=v.clone());var g=t.boundingSphere;return null!==g&&(this.boundingSphere=g.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}},{key:"dispose",value:function(){this.dispatchEvent({type:"dispose"})}}])}(Ed),Uf=new Am,Wf=new Lm,Yf=new Sm,Jf=new sm,qf=new sm,Xf=new sm,Zf=new sm,Kf=new sm,$f=new sm,Qf=new Ld,tv=new Ld,ev=new Ld,iv=new sm,nv=new sm,ov=new sm,sv=new sm,av=new sm,rv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Gf,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Pf;return k()(this,e),(t=cd(this,e)).isMesh=!0,t.type="Mesh",t.geometry=i,t.material=n,t.updateMorphTargets(),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t,i){return ld(e,"copy",this,3)([t,i]),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}},{key:"updateMorphTargets",value:function(){var t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){var i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var n=0,o=i.length;n<o;n++){var s=i[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=n}}}}},{key:"getVertexPosition",value:function(t,e){var i=this.geometry,n=i.attributes.position,o=i.morphAttributes.position,s=i.morphTargetsRelative;e.fromBufferAttribute(n,t);var a=this.morphTargetInfluences;if(o&&a){$f.set(0,0,0);for(var r=0,l=o.length;r<l;r++){var c=a[r],u=o[r];0!==c&&(Kf.fromBufferAttribute(u,t),s?$f.addScaledVector(Kf,c):$f.addScaledVector(Kf.sub(e),c))}e.add($f)}return e}},{key:"raycast",value:function(t,e){var i=this.geometry,n=this.material,o=this.matrixWorld;if(void 0!==n){if(null===i.boundingSphere&&i.computeBoundingSphere(),Yf.copy(i.boundingSphere),Yf.applyMatrix4(o),Wf.copy(t.ray).recast(t.near),!1===Yf.containsPoint(Wf.origin)){if(null===Wf.intersectSphere(Yf,Jf))return;if(Wf.origin.distanceToSquared(Jf)>Math.pow(t.far-t.near,2))return}Uf.copy(o).invert(),Wf.copy(t.ray).applyMatrix4(Uf),null!==i.boundingBox&&!1===Wf.intersectsBox(i.boundingBox)||this._computeIntersections(t,e,Wf)}}},{key:"_computeIntersections",value:function(t,e,i){var n,o=this.geometry,s=this.material,a=o.index,r=o.attributes.position,l=o.attributes.uv,c=o.attributes.uv1,u=o.attributes.normal,p=o.groups,h=o.drawRange;if(null!==a)if(Array.isArray(s))for(var d=0,m=p.length;d<m;d++)for(var f=p[d],v=s[f.materialIndex],g=Math.max(f.start,h.start),y=Math.min(a.count,Math.min(f.start+f.count,h.start+h.count));g<y;g+=3)(n=lv(this,v,t,i,l,c,u,a.getX(g),a.getX(g+1),a.getX(g+2)))&&(n.faceIndex=Math.floor(g/3),n.face.materialIndex=f.materialIndex,e.push(n));else for(var b=Math.max(0,h.start),C=Math.min(a.count,h.start+h.count);b<C;b+=3)(n=lv(this,s,t,i,l,c,u,a.getX(b),a.getX(b+1),a.getX(b+2)))&&(n.faceIndex=Math.floor(b/3),e.push(n));else if(void 0!==r)if(Array.isArray(s))for(var w=0,k=p.length;w<k;w++)for(var x=p[w],_=s[x.materialIndex],E=Math.max(x.start,h.start),S=Math.min(r.count,Math.min(x.start+x.count,h.start+h.count));E<S;E+=3)(n=lv(this,_,t,i,l,c,u,E,E+1,E+2))&&(n.faceIndex=Math.floor(E/3),n.face.materialIndex=x.materialIndex,e.push(n));else for(var D=Math.max(0,h.start),M=Math.min(r.count,h.start+h.count);D<M;D+=3)(n=lv(this,s,t,i,l,c,u,D,D+1,D+2))&&(n.faceIndex=Math.floor(D/3),e.push(n))}}])}(cf);function lv(t,e,i,n,o,s,a,r,l,c){t.getVertexPosition(r,qf),t.getVertexPosition(l,Xf),t.getVertexPosition(c,Zf);var u=function(t,e,i,n,o,s,a,r){if(null===(1===e.side?n.intersectTriangle(a,s,o,!0,r):n.intersectTriangle(o,s,a,0===e.side,r)))return null;av.copy(r),av.applyMatrix4(t.matrixWorld);var l=i.ray.origin.distanceTo(av);return l<i.near||l>i.far?null:{distance:l,point:av.clone(),object:t}}(t,e,i,n,qf,Xf,Zf,sv);if(u){o&&(Qf.fromBufferAttribute(o,r),tv.fromBufferAttribute(o,l),ev.fromBufferAttribute(o,c),u.uv=Cf.getInterpolation(sv,qf,Xf,Zf,Qf,tv,ev,new Ld)),s&&(Qf.fromBufferAttribute(s,r),tv.fromBufferAttribute(s,l),ev.fromBufferAttribute(s,c),u.uv1=Cf.getInterpolation(sv,qf,Xf,Zf,Qf,tv,ev,new Ld)),a&&(iv.fromBufferAttribute(a,r),nv.fromBufferAttribute(a,l),ov.fromBufferAttribute(a,c),u.normal=Cf.getInterpolation(sv,qf,Xf,Zf,iv,nv,ov,new sm),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));var p={a:r,b:l,c:c,normal:new sm,materialIndex:0};Cf.getNormal(qf,Xf,Zf,p.normal),u.face=p}return u}var cv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;k()(this,e),(t=cd(this,e)).type="BoxGeometry",t.parameters={width:i,height:n,depth:o,widthSegments:s,heightSegments:a,depthSegments:r};var l=t;s=Math.floor(s),a=Math.floor(a),r=Math.floor(r);var c=[],u=[],p=[],h=[],d=0,m=0;function f(t,e,i,n,o,s,a,r,f,v,g){for(var y=s/f,b=a/v,C=s/2,w=a/2,k=r/2,x=f+1,_=v+1,E=0,S=0,D=new sm,M=0;M<_;M++)for(var P=M*b-w,O=0;O<x;O++){var T=O*y-C;D[t]=T*n,D[e]=P*o,D[i]=k,u.push(D.x,D.y,D.z),D[t]=0,D[e]=0,D[i]=r>0?1:-1,p.push(D.x,D.y,D.z),h.push(O/f),h.push(1-M/v),E+=1}for(var N=0;N<v;N++)for(var B=0;B<f;B++){var L=d+B+x*N,A=d+B+x*(N+1),j=d+(B+1)+x*(N+1),I=d+(B+1)+x*N;c.push(L,A,I),c.push(A,j,I),S+=6}l.addGroup(m,S,g),m+=S,d+=E}return f("z","y","x",-1,-1,o,n,i,r,a,0),f("z","y","x",1,-1,o,n,-i,r,a,1),f("x","z","y",1,1,i,o,n,s,r,2),f("x","z","y",1,-1,i,o,-n,s,r,3),f("x","y","z",1,-1,i,n,o,s,a,4),f("x","y","z",-1,-1,i,n,-o,s,a,5),t.setIndex(c),t.setAttribute("position",new Af(u,3)),t.setAttribute("normal",new Af(p,3)),t.setAttribute("uv",new Af(h,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}])}(Gf);function uv(t){var e={};for(var i in t)for(var n in e[i]={},t[i]){var o=t[i][n];o&&(o.isColor||o.isMatrix3||o.isMatrix4||o.isVector2||o.isVector3||o.isVector4||o.isTexture||o.isQuaternion)?o.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[i][n]=null):e[i][n]=o.clone():Array.isArray(o)?e[i][n]=o.slice():e[i][n]=o}return e}function pv(t){for(var e={},i=0;i<t.length;i++){var n=uv(t[i]);for(var o in n)e[o]=n[o]}return e}var hv=function(t){function e(){var t;return k()(this,e),(t=cd(this,e)).isCamera=!0,t.type="Camera",t.matrixWorldInverse=new Am,t.projectionMatrix=new Am,t.projectionMatrixInverse=new Am,t.coordinateSystem=xd,t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t,i){return ld(e,"copy",this,3)([t,i]),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}},{key:"getWorldDirection",value:function(t){return ld(e,"getWorldDirection",this,3)([t]).negate()}},{key:"updateMatrixWorld",value:function(t){ld(e,"updateMatrixWorld",this,3)([t]),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"updateWorldMatrix",value:function(t,i){ld(e,"updateWorldMatrix",this,3)([t,i]),this.matrixWorldInverse.copy(this.matrixWorld).invert()}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}])}(cf),dv=(new sm,new Ld,new Ld,function(t){function e(t,i,n,o,s,a,r,l,c,u){var p;return k()(this,e),(p=cd(this,e,[t=void 0!==t?t:[],i=void 0!==i?i:301,n,o,s,a,r,l,c,u])).isCubeTexture=!0,p.flipY=!1,p}return Xi()(e,t),_()(e,[{key:"images",get:function(){return this.image},set:function(t){this.image=t}}])}(tm)),mv=new sm,fv=new sm,vv=new Ad,gv=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm(1,0,0),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;k()(this,t),this.isPlane=!0,this.normal=e,this.constant=i}),[{key:"set",value:function(t,e){return this.normal.copy(t),this.constant=e,this}},{key:"setComponents",value:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this}},{key:"setFromNormalAndCoplanarPoint",value:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}},{key:"setFromCoplanarPoints",value:function(t,e,i){var n=mv.subVectors(i,e).cross(fv.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,t),this}},{key:"copy",value:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this}},{key:"normalize",value:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}},{key:"negate",value:function(){return this.constant*=-1,this.normal.negate(),this}},{key:"distanceToPoint",value:function(t){return this.normal.dot(t)+this.constant}},{key:"distanceToSphere",value:function(t){return this.distanceToPoint(t.center)-t.radius}},{key:"projectPoint",value:function(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}},{key:"intersectLine",value:function(t,e){var i=t.delta(mv),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;var o=-(t.start.dot(this.normal)+this.constant)/n;return o<0||o>1?null:e.copy(t.start).addScaledVector(i,o)}},{key:"intersectsLine",value:function(t){var e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}},{key:"intersectsBox",value:function(t){return t.intersectsPlane(this)}},{key:"intersectsSphere",value:function(t){return t.intersectsPlane(this)}},{key:"coplanarPoint",value:function(t){return t.copy(this.normal).multiplyScalar(-this.constant)}},{key:"applyMatrix4",value:function(t,e){var i=e||vv.getNormalMatrix(t),n=this.coplanarPoint(mv).applyMatrix4(t),o=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(o),this}},{key:"translate",value:function(t){return this.constant-=t.dot(this.normal),this}},{key:"equals",value:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}])}(),yv=new Sm,bv=new sm,Cv=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new gv,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new gv,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new gv,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new gv,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new gv,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new gv;k()(this,t),this.planes=[e,i,n,o,s,a]}),[{key:"set",value:function(t,e,i,n,o,s){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(n),a[4].copy(o),a[5].copy(s),this}},{key:"copy",value:function(t){for(var e=this.planes,i=0;i<6;i++)e[i].copy(t.planes[i]);return this}},{key:"setFromProjectionMatrix",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=this.planes,n=t.elements,o=n[0],s=n[1],a=n[2],r=n[3],l=n[4],c=n[5],u=n[6],p=n[7],h=n[8],d=n[9],m=n[10],f=n[11],v=n[12],g=n[13],y=n[14],b=n[15];if(i[0].setComponents(r-o,p-l,f-h,b-v).normalize(),i[1].setComponents(r+o,p+l,f+h,b+v).normalize(),i[2].setComponents(r+s,p+c,f+d,b+g).normalize(),i[3].setComponents(r-s,p-c,f-d,b-g).normalize(),i[4].setComponents(r-a,p-u,f-m,b-y).normalize(),e===xd)i[5].setComponents(r+a,p+u,f+m,b+y).normalize();else{if(e!==_d)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);i[5].setComponents(a,u,m,y).normalize()}return this}},{key:"intersectsObject",value:function(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),yv.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{var e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),yv.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(yv)}},{key:"intersectsSprite",value:function(t){return yv.center.set(0,0,0),yv.radius=.7071067811865476,yv.applyMatrix4(t.matrixWorld),this.intersectsSphere(yv)}},{key:"intersectsSphere",value:function(t){for(var e=this.planes,i=t.center,n=-t.radius,o=0;o<6;o++)if(e[o].distanceToPoint(i)<n)return!1;return!0}},{key:"intersectsBox",value:function(t){for(var e=this.planes,i=0;i<6;i++){var n=e[i];if(bv.x=n.normal.x>0?t.max.x:t.min.x,bv.y=n.normal.y>0?t.max.y:t.min.y,bv.z=n.normal.z>0?t.max.z:t.min.z,n.distanceToPoint(bv)<0)return!1}return!0}},{key:"containsPoint",value:function(t){for(var e=this.planes,i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}},{key:"clone",value:function(){return(new this.constructor).copy(this)}}])}();var wv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;k()(this,e),(t=cd(this,e)).type="PlaneGeometry",t.parameters={width:i,height:n,widthSegments:o,heightSegments:s};for(var a=i/2,r=n/2,l=Math.floor(o),c=Math.floor(s),u=l+1,p=c+1,h=i/l,d=n/c,m=[],f=[],v=[],g=[],y=0;y<p;y++)for(var b=y*d-r,C=0;C<u;C++){var w=C*h-a;f.push(w,-b,0),v.push(0,0,1),g.push(C/l),g.push(1-y/c)}for(var x=0;x<c;x++)for(var _=0;_<l;_++){var E=_+u*x,S=_+u*(x+1),D=_+1+u*(x+1),M=_+1+u*x;m.push(E,S,M),m.push(S,D,M)}return t.setIndex(m),t.setAttribute("position",new Af(f,3)),t.setAttribute("normal",new Af(v,3)),t.setAttribute("uv",new Af(g,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.width,t.height,t.widthSegments,t.heightSegments)}}])}(Gf),kv={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},xv={common:{diffuse:{value:new Ef(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ad},alphaMap:{value:null},alphaMapTransform:{value:new Ad},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ad}},envmap:{envMap:{value:null},envMapRotation:{value:new Ad},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ad}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ad}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ad},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ad},normalScale:{value:new Ld(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ad},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ad}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ad}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ad}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ef(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ef(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ad},alphaTest:{value:0},uvTransform:{value:new Ad}},sprite:{diffuse:{value:new Ef(16777215)},opacity:{value:1},center:{value:new Ld(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ad},alphaMap:{value:null},alphaMapTransform:{value:new Ad},alphaTest:{value:0}}},_v={basic:{uniforms:pv([xv.common,xv.specularmap,xv.envmap,xv.aomap,xv.lightmap,xv.fog]),vertexShader:kv.meshbasic_vert,fragmentShader:kv.meshbasic_frag},lambert:{uniforms:pv([xv.common,xv.specularmap,xv.envmap,xv.aomap,xv.lightmap,xv.emissivemap,xv.bumpmap,xv.normalmap,xv.displacementmap,xv.fog,xv.lights,{emissive:{value:new Ef(0)}}]),vertexShader:kv.meshlambert_vert,fragmentShader:kv.meshlambert_frag},phong:{uniforms:pv([xv.common,xv.specularmap,xv.envmap,xv.aomap,xv.lightmap,xv.emissivemap,xv.bumpmap,xv.normalmap,xv.displacementmap,xv.fog,xv.lights,{emissive:{value:new Ef(0)},specular:{value:new Ef(1118481)},shininess:{value:30}}]),vertexShader:kv.meshphong_vert,fragmentShader:kv.meshphong_frag},standard:{uniforms:pv([xv.common,xv.envmap,xv.aomap,xv.lightmap,xv.emissivemap,xv.bumpmap,xv.normalmap,xv.displacementmap,xv.roughnessmap,xv.metalnessmap,xv.fog,xv.lights,{emissive:{value:new Ef(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:kv.meshphysical_vert,fragmentShader:kv.meshphysical_frag},toon:{uniforms:pv([xv.common,xv.aomap,xv.lightmap,xv.emissivemap,xv.bumpmap,xv.normalmap,xv.displacementmap,xv.gradientmap,xv.fog,xv.lights,{emissive:{value:new Ef(0)}}]),vertexShader:kv.meshtoon_vert,fragmentShader:kv.meshtoon_frag},matcap:{uniforms:pv([xv.common,xv.bumpmap,xv.normalmap,xv.displacementmap,xv.fog,{matcap:{value:null}}]),vertexShader:kv.meshmatcap_vert,fragmentShader:kv.meshmatcap_frag},points:{uniforms:pv([xv.points,xv.fog]),vertexShader:kv.points_vert,fragmentShader:kv.points_frag},dashed:{uniforms:pv([xv.common,xv.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:kv.linedashed_vert,fragmentShader:kv.linedashed_frag},depth:{uniforms:pv([xv.common,xv.displacementmap]),vertexShader:kv.depth_vert,fragmentShader:kv.depth_frag},normal:{uniforms:pv([xv.common,xv.bumpmap,xv.normalmap,xv.displacementmap,{opacity:{value:1}}]),vertexShader:kv.meshnormal_vert,fragmentShader:kv.meshnormal_frag},sprite:{uniforms:pv([xv.sprite,xv.fog]),vertexShader:kv.sprite_vert,fragmentShader:kv.sprite_frag},background:{uniforms:{uvTransform:{value:new Ad},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:kv.background_vert,fragmentShader:kv.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ad}},vertexShader:kv.backgroundCube_vert,fragmentShader:kv.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:kv.cube_vert,fragmentShader:kv.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:kv.equirect_vert,fragmentShader:kv.equirect_frag},distanceRGBA:{uniforms:pv([xv.common,xv.displacementmap,{referencePosition:{value:new sm},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:kv.distanceRGBA_vert,fragmentShader:kv.distanceRGBA_frag},shadow:{uniforms:pv([xv.lights,xv.fog,{color:{value:new Ef(0)},opacity:{value:1}}]),vertexShader:kv.shadow_vert,fragmentShader:kv.shadow_frag}};_v.physical={uniforms:pv([_v.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ad},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ad},clearcoatNormalScale:{value:new Ld(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ad},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ad},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ad},sheen:{value:0},sheenColor:{value:new Ef(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ad},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ad},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ad},transmissionSamplerSize:{value:new Ld},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ad},attenuationDistance:{value:0},attenuationColor:{value:new Ef(0)},specularColor:{value:new Ef(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ad},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ad},anisotropyVector:{value:new Ld},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ad}}]),vertexShader:kv.meshphysical_vert,fragmentShader:kv.meshphysical_frag};new Wm,new Am;var Ev=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2e3;return k()(this,e),(t=cd(this,e)).isOrthographicCamera=!0,t.type="OrthographicCamera",t.zoom=1,t.view=null,t.left=i,t.right=n,t.top=o,t.bottom=s,t.near=a,t.far=r,t.updateProjectionMatrix(),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t,i){return ld(e,"copy",this,3)([t,i]),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}},{key:"setViewOffset",value:function(t,e,i,n,o,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}},{key:"clearViewOffset",value:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}},{key:"updateProjectionMatrix",value:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,o=i-t,s=i+t,a=n+e,r=n-e;if(null!==this.view&&this.view.enabled){var l=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s=(o+=l*this.view.offsetX)+l*this.view.width,r=(a-=c*this.view.offsetY)-c*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,r,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}},{key:"toJSON",value:function(t){var i=ld(e,"toJSON",this,3)([t]);return i.object.zoom=this.zoom,i.object.left=this.left,i.object.right=this.right,i.object.top=this.top,i.object.bottom=this.bottom,i.object.near=this.near,i.object.far=this.far,null!==this.view&&(i.object.view=Object.assign({},this.view)),i}}])}(hv),Sv=(new Ev,new Ef,(1+Math.sqrt(5))/2),Dv=1/Sv;new sm(-Sv,Dv,0),new sm(Sv,Dv,0),new sm(-Dv,0,Sv),new sm(Dv,0,Sv),new sm(0,Sv,-Dv),new sm(0,Sv,Dv),new sm(-1,1,-1),new sm(1,1,-1),new sm(-1,1,1),new sm(1,1,1);var Mv=function(t){function e(t,i,n,o,s,a,r,l,c,u){var p;if(k()(this,e),1026!==(u=void 0!==u?u:1026)&&1027!==u)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");return void 0===n&&1026===u&&(n=ud),void 0===n&&1027===u&&(n=pd),(p=cd(this,e,[null,o,s,a,r,l,u,n,c])).isDepthTexture=!0,p.image={width:t,height:i},p.magFilter=void 0!==r?r:1003,p.minFilter=void 0!==l?l:1003,p.flipY=!1,p.generateMipmaps=!1,p.compareFunction=null,p}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.compareFunction=t.compareFunction,this}},{key:"toJSON",value:function(t){var i=ld(e,"toJSON",this,3)([t]);return null!==this.compareFunction&&(i.compareFunction=this.compareFunction),i}}])}(tm),Pv=(new tm,new Mv(1,1));Pv.compareFunction=515;new im,new nm,new dv,new Float32Array(16),new Float32Array(9),new Float32Array(4);new Map;new Wm,new Am;new sm,new sm,new sm,new sm,new Ld,new Ld,new Am,new sm,new sm,new sm,new Ld,new Ld,new Ld;new sm,new sm,new sm,new em,new em,new sm,new Am,new sm,new Sm,new Am,new Lm,new Am,new Am,new Am,new Am,new lm,new Am,new rv,new Sm;var Ov=function(){return _()((function t(){k()(this,t),this.index=0,this.pool=[],this.list=[]}),[{key:"push",value:function(t,e){var i=this.pool,n=this.list;this.index>=i.length&&i.push({start:-1,count:-1,z:-1});var o=i[this.index];n.push(o),this.index++,o.start=t.start,o.count=t.count,o.z=e}},{key:"reset",value:function(){this.list.length=0,this.index=0}}])}();new Am,new Am,new Am,new Am,new Cv,new lm,new Sm,new sm,new Ov,new rv;new sm,new sm,new Am,new Lm,new Sm,new sm,new sm;new sm,new sm,new Am,new Lm,new Sm,new sm;var Tv=function(){return _()((function t(){k()(this,t),this.type="Curve",this.arcLengthDivisions=200}),[{key:"getPoint",value:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}},{key:"getPointAt",value:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)}},{key:"getPoints",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e}},{key:"getSpacedPoints",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e}},{key:"getLength",value:function(){var t=this.getLengths();return t[t.length-1]}},{key:"getLengths",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.arcLengthDivisions;if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0),o=0;i.push(0);for(var s=1;s<=t;s++)o+=(e=this.getPoint(s/t)).distanceTo(n),i.push(o),n=e;return this.cacheArcLengths=i,i}},{key:"updateArcLengths",value:function(){this.needsUpdate=!0,this.getLengths()}},{key:"getUtoTmapping",value:function(t,e){var i,n=this.getLengths(),o=0,s=n.length;i=e||t*n[s-1];for(var a,r=0,l=s-1;r<=l;)if((a=n[o=Math.floor(r+(l-r)/2)]-i)<0)r=o+1;else{if(!(a>0)){l=o;break}l=o-1}if(n[o=l]===i)return o/(s-1);var c=n[o];return(o+(i-c)/(n[o+1]-c))/(s-1)}},{key:"getTangent",value:function(t,e){var i=1e-4,n=t-i,o=t+i;n<0&&(n=0),o>1&&(o=1);var s=this.getPoint(n),a=this.getPoint(o),r=e||(s.isVector2?new Ld:new sm);return r.copy(a).sub(s).normalize(),r}},{key:"getTangentAt",value:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)}},{key:"computeFrenetFrames",value:function(t,e){for(var i=new sm,n=[],o=[],s=[],a=new sm,r=new Am,l=0;l<=t;l++){var c=l/t;n[l]=this.getTangentAt(c,new sm)}o[0]=new sm,s[0]=new sm;var u=Number.MAX_VALUE,p=Math.abs(n[0].x),h=Math.abs(n[0].y),d=Math.abs(n[0].z);p<=u&&(u=p,i.set(1,0,0)),h<=u&&(u=h,i.set(0,1,0)),d<=u&&i.set(0,0,1),a.crossVectors(n[0],i).normalize(),o[0].crossVectors(n[0],a),s[0].crossVectors(n[0],o[0]);for(var m=1;m<=t;m++){if(o[m]=o[m-1].clone(),s[m]=s[m-1].clone(),a.crossVectors(n[m-1],n[m]),a.length()>Number.EPSILON){a.normalize();var f=Math.acos(Pd(n[m-1].dot(n[m]),-1,1));o[m].applyMatrix4(r.makeRotationAxis(a,f))}s[m].crossVectors(n[m],o[m])}if(!0===e){var v=Math.acos(Pd(o[0].dot(o[t]),-1,1));v/=t,n[0].dot(a.crossVectors(o[0],o[t]))>0&&(v=-v);for(var g=1;g<=t;g++)o[g].applyMatrix4(r.makeRotationAxis(n[g],v*g)),s[g].crossVectors(n[g],o[g])}return{tangents:n,normals:o,binormals:s}}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}},{key:"toJSON",value:function(){var t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}},{key:"fromJSON",value:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}])}(),Nv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2*Math.PI,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;return k()(this,e),(t=cd(this,e)).isEllipseCurve=!0,t.type="EllipseCurve",t.aX=i,t.aY=n,t.xRadius=o,t.yRadius=s,t.aStartAngle=a,t.aEndAngle=r,t.aClockwise=l,t.aRotation=c,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld,i=e,n=2*Math.PI,o=this.aEndAngle-this.aStartAngle,s=Math.abs(o)<Number.EPSILON;o<0;)o+=n;for(;o>n;)o-=n;o<Number.EPSILON&&(o=s?0:n),!0!==this.aClockwise||s||(o===n?o=-n:o-=n);var a=this.aStartAngle+t*o,r=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var c=Math.cos(this.aRotation),u=Math.sin(this.aRotation),p=r-this.aX,h=l-this.aY;r=p*c-h*u+this.aX,l=p*u+h*c+this.aY}return i.set(r,l)}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}}])}(Tv),Bv=function(t){function e(t,i,n,o,s,a){var r;return k()(this,e),(r=cd(this,e,[t,i,n,n,o,s,a])).isArcCurve=!0,r.type="ArcCurve",r}return Xi()(e,t),_()(e)}(Nv);function Lv(){var t=0,e=0,i=0,n=0;function o(o,s,a,r){t=o,e=a,i=-3*o+3*s-2*a-r,n=2*o-2*s+a+r}return{initCatmullRom:function(t,e,i,n,s){o(e,i,s*(i-t),s*(n-e))},initNonuniformCatmullRom:function(t,e,i,n,s,a,r){var l=(e-t)/s-(i-t)/(s+a)+(i-e)/a,c=(i-e)/a-(n-e)/(a+r)+(n-i)/r;o(e,i,l*=a,c*=a)},calc:function(o){var s=o*o;return t+e*o+i*s+n*(s*o)}}}var Av=new sm,jv=new Lv,Iv=new Lv,Fv=new Lv,Rv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"centripetal",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;return k()(this,e),(t=cd(this,e)).isCatmullRomCurve3=!0,t.type="CatmullRomCurve3",t.points=i,t.closed=n,t.curveType=o,t.tension=s,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm,o=n,s=this.points,a=s.length,r=(a-(this.closed?0:1))*t,l=Math.floor(r),c=r-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/a)+1)*a:0===c&&l===a-1&&(l=a-2,c=1),this.closed||l>0?e=s[(l-1)%a]:(Av.subVectors(s[0],s[1]).add(s[0]),e=Av);var u=s[l%a],p=s[(l+1)%a];if(this.closed||l+2<a?i=s[(l+2)%a]:(Av.subVectors(s[a-1],s[a-2]).add(s[a-1]),i=Av),"centripetal"===this.curveType||"chordal"===this.curveType){var h="chordal"===this.curveType?.5:.25,d=Math.pow(e.distanceToSquared(u),h),m=Math.pow(u.distanceToSquared(p),h),f=Math.pow(p.distanceToSquared(i),h);m<1e-4&&(m=1),d<1e-4&&(d=m),f<1e-4&&(f=m),jv.initNonuniformCatmullRom(e.x,u.x,p.x,i.x,d,m,f),Iv.initNonuniformCatmullRom(e.y,u.y,p.y,i.y,d,m,f),Fv.initNonuniformCatmullRom(e.z,u.z,p.z,i.z,d,m,f)}else"catmullrom"===this.curveType&&(jv.initCatmullRom(e.x,u.x,p.x,i.x,this.tension),Iv.initCatmullRom(e.y,u.y,p.y,i.y,this.tension),Fv.initCatmullRom(e.z,u.z,p.z,i.z,this.tension));return o.set(jv.calc(c),Iv.calc(c),Fv.calc(c)),o}},{key:"copy",value:function(t){ld(e,"copy",this,3)([t]),this.points=[];for(var i=0,n=t.points.length;i<n;i++){var o=t.points[i];this.points.push(o.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);t.points=[];for(var i=0,n=this.points.length;i<n;i++){var o=this.points[i];t.points.push(o.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}},{key:"fromJSON",value:function(t){ld(e,"fromJSON",this,3)([t]),this.points=[];for(var i=0,n=t.points.length;i<n;i++){var o=t.points[i];this.points.push((new sm).fromArray(o))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}}])}(Tv);function zv(t,e,i,n,o){var s=.5*(n-e),a=.5*(o-i),r=t*t;return(2*i-2*n+s+a)*(t*r)+(-3*i+3*n-2*s-a)*r+s*t+i}function Hv(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}function Vv(t,e,i,n,o){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,o)}var Gv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ld,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ld,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Ld;return k()(this,e),(t=cd(this,e)).isCubicBezierCurve=!0,t.type="CubicBezierCurve",t.v0=i,t.v1=n,t.v2=o,t.v3=s,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld,i=e,n=this.v0,o=this.v1,s=this.v2,a=this.v3;return i.set(Vv(t,n.x,o.x,s.x,a.x),Vv(t,n.y,o.y,s.y,a.y)),i}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}])}(Tv),Uv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new sm,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new sm;return k()(this,e),(t=cd(this,e)).isCubicBezierCurve3=!0,t.type="CubicBezierCurve3",t.v0=i,t.v1=n,t.v2=o,t.v3=s,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm,i=e,n=this.v0,o=this.v1,s=this.v2,a=this.v3;return i.set(Vv(t,n.x,o.x,s.x,a.x),Vv(t,n.y,o.y,s.y,a.y),Vv(t,n.z,o.z,s.z,a.z)),i}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}])}(Tv),Wv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ld,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld;return k()(this,e),(t=cd(this,e)).isLineCurve=!0,t.type="LineCurve",t.v1=i,t.v2=n,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld,i=e;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}},{key:"getPointAt",value:function(t,e){return this.getPoint(t,e)}},{key:"getTangent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld;return e.subVectors(this.v2,this.v1).normalize()}},{key:"getTangentAt",value:function(t,e){return this.getTangent(t,e)}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.v1.copy(t.v1),this.v2.copy(t.v2),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}])}(Tv),Yv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm;return k()(this,e),(t=cd(this,e)).isLineCurve3=!0,t.type="LineCurve3",t.v1=i,t.v2=n,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm,i=e;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}},{key:"getPointAt",value:function(t,e){return this.getPoint(t,e)}},{key:"getTangent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm;return e.subVectors(this.v2,this.v1).normalize()}},{key:"getTangentAt",value:function(t,e){return this.getTangent(t,e)}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.v1.copy(t.v1),this.v2.copy(t.v2),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}])}(Tv),Jv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ld,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Ld;return k()(this,e),(t=cd(this,e)).isQuadraticBezierCurve=!0,t.type="QuadraticBezierCurve",t.v0=i,t.v1=n,t.v2=o,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld,i=e,n=this.v0,o=this.v1,s=this.v2;return i.set(Hv(t,n.x,o.x,s.x),Hv(t,n.y,o.y,s.y)),i}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}])}(Tv),qv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new sm,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new sm;return k()(this,e),(t=cd(this,e)).isQuadraticBezierCurve3=!0,t.type="QuadraticBezierCurve3",t.v0=i,t.v1=n,t.v2=o,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new sm,i=e,n=this.v0,o=this.v1,s=this.v2;return i.set(Hv(t,n.x,o.x,s.x),Hv(t,n.y,o.y,s.y),Hv(t,n.z,o.z,s.z)),i}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}])}(Tv),Xv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return k()(this,e),(t=cd(this,e)).isSplineCurve=!0,t.type="SplineCurve",t.points=i,t}return Xi()(e,t),_()(e,[{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ld,i=e,n=this.points,o=(n.length-1)*t,s=Math.floor(o),a=o-s,r=n[0===s?s:s-1],l=n[s],c=n[s>n.length-2?n.length-1:s+1],u=n[s>n.length-3?n.length-1:s+2];return i.set(zv(a,r.x,l.x,c.x,u.x),zv(a,r.y,l.y,c.y,u.y)),i}},{key:"copy",value:function(t){ld(e,"copy",this,3)([t]),this.points=[];for(var i=0,n=t.points.length;i<n;i++){var o=t.points[i];this.points.push(o.clone())}return this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);t.points=[];for(var i=0,n=this.points.length;i<n;i++){var o=this.points[i];t.points.push(o.toArray())}return t}},{key:"fromJSON",value:function(t){ld(e,"fromJSON",this,3)([t]),this.points=[];for(var i=0,n=t.points.length;i<n;i++){var o=t.points[i];this.points.push((new Ld).fromArray(o))}return this}}])}(Tv),Zv=Object.freeze({__proto__:null,ArcCurve:Bv,CatmullRomCurve3:Rv,CubicBezierCurve:Gv,CubicBezierCurve3:Uv,EllipseCurve:Nv,LineCurve:Wv,LineCurve3:Yv,QuadraticBezierCurve:Jv,QuadraticBezierCurve3:qv,SplineCurve:Xv}),Kv=function(t){function e(t){var i;return k()(this,e),(i=cd(this,e)).type="Path",i.currentPoint=new Ld,t&&i.setFromPoints(t),i}return Xi()(e,t),_()(e,[{key:"setFromPoints",value:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y);return this}},{key:"moveTo",value:function(t,e){return this.currentPoint.set(t,e),this}},{key:"lineTo",value:function(t,e){var i=new Wv(this.currentPoint.clone(),new Ld(t,e));return this.curves.push(i),this.currentPoint.set(t,e),this}},{key:"quadraticCurveTo",value:function(t,e,i,n){var o=new Jv(this.currentPoint.clone(),new Ld(t,e),new Ld(i,n));return this.curves.push(o),this.currentPoint.set(i,n),this}},{key:"bezierCurveTo",value:function(t,e,i,n,o,s){var a=new Gv(this.currentPoint.clone(),new Ld(t,e),new Ld(i,n),new Ld(o,s));return this.curves.push(a),this.currentPoint.set(o,s),this}},{key:"splineThru",value:function(t){var e=[this.currentPoint.clone()].concat(t),i=new Xv(e);return this.curves.push(i),this.currentPoint.copy(t[t.length-1]),this}},{key:"arc",value:function(t,e,i,n,o,s){var a=this.currentPoint.x,r=this.currentPoint.y;return this.absarc(t+a,e+r,i,n,o,s),this}},{key:"absarc",value:function(t,e,i,n,o,s){return this.absellipse(t,e,i,i,n,o,s),this}},{key:"ellipse",value:function(t,e,i,n,o,s,a,r){var l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(t+l,e+c,i,n,o,s,a,r),this}},{key:"absellipse",value:function(t,e,i,n,o,s,a,r){var l=new Nv(t,e,i,n,o,s,a,r);if(this.curves.length>0){var c=l.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(l);var u=l.getPoint(1);return this.currentPoint.copy(u),this}},{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.currentPoint.copy(t.currentPoint),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.currentPoint=this.currentPoint.toArray(),t}},{key:"fromJSON",value:function(t){return ld(e,"fromJSON",this,3)([t]),this.currentPoint.fromArray(t.currentPoint),this}}])}(function(t){function e(){var t;return k()(this,e),(t=cd(this,e)).type="CurvePath",t.curves=[],t.autoClose=!1,t}return Xi()(e,t),_()(e,[{key:"add",value:function(t){this.curves.push(t)}},{key:"closePath",value:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);if(!t.equals(e)){var i=!0===t.isVector2?"LineCurve":"LineCurve3";this.curves.push(new Zv[i](e,t))}return this}},{key:"getPoint",value:function(t,e){for(var i=t*this.getLength(),n=this.getCurveLengths(),o=0;o<n.length;){if(n[o]>=i){var s=n[o]-i,a=this.curves[o],r=a.getLength(),l=0===r?0:1-s/r;return a.getPointAt(l,e)}o++}return null}},{key:"getLength",value:function(){var t=this.getCurveLengths();return t[t.length-1]}},{key:"updateArcLengths",value:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}},{key:"getCurveLengths",value:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t}},{key:"getSpacedPoints",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:40,e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e}},{key:"getPoints",value:function(){for(var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,i=[],n=0,o=this.curves;n<o.length;n++)for(var s=o[n],a=s.isEllipseCurve?2*e:s.isLineCurve||s.isLineCurve3?1:s.isSplineCurve?e*s.points.length:e,r=s.getPoints(a),l=0;l<r.length;l++){var c=r[l];t&&t.equals(c)||(i.push(c),t=c)}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},{key:"copy",value:function(t){ld(e,"copy",this,3)([t]),this.curves=[];for(var i=0,n=t.curves.length;i<n;i++){var o=t.curves[i];this.curves.push(o.clone())}return this.autoClose=t.autoClose,this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);t.autoClose=this.autoClose,t.curves=[];for(var i=0,n=this.curves.length;i<n;i++){var o=this.curves[i];t.curves.push(o.toJSON())}return t}},{key:"fromJSON",value:function(t){ld(e,"fromJSON",this,3)([t]),this.autoClose=t.autoClose,this.curves=[];for(var i=0,n=t.curves.length;i<n;i++){var o=t.curves[i];this.curves.push((new Zv[o.type]).fromJSON(o))}return this}}])}(Tv)),$v=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[new Ld(0,-.5),new Ld(.5,0),new Ld(0,.5)],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*Math.PI;k()(this,e),(t=cd(this,e)).type="LatheGeometry",t.parameters={points:i,segments:n,phiStart:o,phiLength:s},n=Math.floor(n),s=Pd(s,0,2*Math.PI);for(var a=[],r=[],l=[],c=[],u=[],p=1/n,h=new sm,d=new Ld,m=new sm,f=new sm,v=new sm,g=0,y=0,b=0;b<=i.length-1;b++)switch(b){case 0:g=i[b+1].x-i[b].x,y=i[b+1].y-i[b].y,m.x=1*y,m.y=-g,m.z=0*y,v.copy(m),m.normalize(),c.push(m.x,m.y,m.z);break;case i.length-1:c.push(v.x,v.y,v.z);break;default:g=i[b+1].x-i[b].x,y=i[b+1].y-i[b].y,m.x=1*y,m.y=-g,m.z=0*y,f.copy(m),m.x+=v.x,m.y+=v.y,m.z+=v.z,m.normalize(),c.push(m.x,m.y,m.z),v.copy(f)}for(var C=0;C<=n;C++)for(var w=o+C*p*s,x=Math.sin(w),_=Math.cos(w),E=0;E<=i.length-1;E++){h.x=i[E].x*x,h.y=i[E].y,h.z=i[E].x*_,r.push(h.x,h.y,h.z),d.x=C/n,d.y=E/(i.length-1),l.push(d.x,d.y);var S=c[3*E+0]*x,D=c[3*E+1],M=c[3*E+0]*_;u.push(S,D,M)}for(var P=0;P<n;P++)for(var O=0;O<i.length-1;O++){var T=O+P*i.length,N=T,B=T+i.length,L=T+i.length+1,A=T+1;a.push(N,B,A),a.push(L,A,B)}return t.setIndex(a),t.setAttribute("position",new Af(r,3)),t.setAttribute("uv",new Af(l,2)),t.setAttribute("normal",new Af(u,3)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.points,t.segments,t.phiStart,t.phiLength)}}])}(Gf),Qv=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8;k()(this,e);var a=new Kv;return a.absarc(0,-n/2,i,1.5*Math.PI,0),a.absarc(0,n/2,i,0,.5*Math.PI),(t=cd(this,e,[a.getPoints(o),s])).type="CapsuleGeometry",t.parameters={radius:i,length:n,capSegments:o,radialSegments:s},t}return Xi()(e,t),_()(e,null,[{key:"fromJSON",value:function(t){return new e(t.radius,t.length,t.capSegments,t.radialSegments)}}])}($v),tg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*Math.PI;k()(this,e),(t=cd(this,e)).type="CircleGeometry",t.parameters={radius:i,segments:n,thetaStart:o,thetaLength:s},n=Math.max(3,n);var a=[],r=[],l=[],c=[],u=new sm,p=new Ld;r.push(0,0,0),l.push(0,0,1),c.push(.5,.5);for(var h=0,d=3;h<=n;h++,d+=3){var m=o+h/n*s;u.x=i*Math.cos(m),u.y=i*Math.sin(m),r.push(u.x,u.y,u.z),l.push(0,0,1),p.x=(r[d]/i+1)/2,p.y=(r[d+1]/i+1)/2,c.push(p.x,p.y)}for(var f=1;f<=n;f++)a.push(f,f+1,0);return t.setIndex(a),t.setAttribute("position",new Af(r,3)),t.setAttribute("normal",new Af(l,3)),t.setAttribute("uv",new Af(c,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.radius,t.segments,t.thetaStart,t.thetaLength)}}])}(Gf),eg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:32,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:2*Math.PI;k()(this,e),(t=cd(this,e)).type="CylinderGeometry",t.parameters={radiusTop:i,radiusBottom:n,height:o,radialSegments:s,heightSegments:a,openEnded:r,thetaStart:l,thetaLength:c};var u=t;s=Math.floor(s),a=Math.floor(a);var p=[],h=[],d=[],m=[],f=0,v=[],g=o/2,y=0;function b(t){for(var e=f,o=new Ld,a=new sm,r=0,v=!0===t?i:n,b=!0===t?1:-1,C=1;C<=s;C++)h.push(0,g*b,0),d.push(0,b,0),m.push(.5,.5),f++;for(var w=f,k=0;k<=s;k++){var x=k/s*c+l,_=Math.cos(x),E=Math.sin(x);a.x=v*E,a.y=g*b,a.z=v*_,h.push(a.x,a.y,a.z),d.push(0,b,0),o.x=.5*_+.5,o.y=.5*E*b+.5,m.push(o.x,o.y),f++}for(var S=0;S<s;S++){var D=e+S,M=w+S;!0===t?p.push(M,M+1,D):p.push(M+1,M,D),r+=3}u.addGroup(y,r,!0===t?1:2),y+=r}return function(){for(var t=new sm,e=new sm,r=0,b=(n-i)/o,C=0;C<=a;C++){for(var w=[],k=C/a,x=k*(n-i)+i,_=0;_<=s;_++){var E=_/s,S=E*c+l,D=Math.sin(S),M=Math.cos(S);e.x=x*D,e.y=-k*o+g,e.z=x*M,h.push(e.x,e.y,e.z),t.set(D,b,M).normalize(),d.push(t.x,t.y,t.z),m.push(E,1-k),w.push(f++)}v.push(w)}for(var P=0;P<s;P++)for(var O=0;O<a;O++){var T=v[O][P],N=v[O+1][P],B=v[O+1][P+1],L=v[O][P+1];p.push(T,N,L),p.push(N,B,L),r+=6}u.addGroup(y,r,0),y+=r}(),!1===r&&(i>0&&b(!0),n>0&&b(!1)),t.setIndex(p),t.setAttribute("position",new Af(h,3)),t.setAttribute("normal",new Af(d,3)),t.setAttribute("uv",new Af(m,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}])}(Gf),ig=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:32,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:2*Math.PI;return k()(this,e),(t=cd(this,e,[0,i,n,o,s,a,r,l])).type="ConeGeometry",t.parameters={radius:i,height:n,radialSegments:o,heightSegments:s,openEnded:a,thetaStart:r,thetaLength:l},t}return Xi()(e,t),_()(e,null,[{key:"fromJSON",value:function(t){return new e(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}])}(eg),ng=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;k()(this,e),(t=cd(this,e)).type="PolyhedronGeometry",t.parameters={vertices:i,indices:n,radius:o,detail:s};var a=[],r=[];function l(t,e,i,n){for(var o=n+1,s=[],a=0;a<=o;a++){s[a]=[];for(var r=t.clone().lerp(i,a/o),l=e.clone().lerp(i,a/o),u=o-a,p=0;p<=u;p++)s[a][p]=0===p&&a===o?r:r.clone().lerp(l,p/u)}for(var h=0;h<o;h++)for(var d=0;d<2*(o-h)-1;d++){var m=Math.floor(d/2);d%2==0?(c(s[h][m+1]),c(s[h+1][m]),c(s[h][m])):(c(s[h][m+1]),c(s[h+1][m+1]),c(s[h+1][m]))}}function c(t){a.push(t.x,t.y,t.z)}function u(t,e){var n=3*t;e.x=i[n+0],e.y=i[n+1],e.z=i[n+2]}function p(t,e,i,n){n<0&&1===t.x&&(r[e]=t.x-1),0===i.x&&0===i.z&&(r[e]=n/2/Math.PI+.5)}function h(t){return Math.atan2(t.z,-t.x)}return function(t){for(var e=new sm,i=new sm,o=new sm,s=0;s<n.length;s+=3)u(n[s+0],e),u(n[s+1],i),u(n[s+2],o),l(e,i,o,t)}(s),function(t){for(var e=new sm,i=0;i<a.length;i+=3)e.x=a[i+0],e.y=a[i+1],e.z=a[i+2],e.normalize().multiplyScalar(t),a[i+0]=e.x,a[i+1]=e.y,a[i+2]=e.z}(o),function(){for(var t,e=new sm,i=0;i<a.length;i+=3){e.x=a[i+0],e.y=a[i+1],e.z=a[i+2];var n=h(e)/2/Math.PI+.5,o=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);r.push(n,1-o)}(function(){for(var t=new sm,e=new sm,i=new sm,n=new sm,o=new Ld,s=new Ld,l=new Ld,c=0,u=0;c<a.length;c+=9,u+=6){t.set(a[c+0],a[c+1],a[c+2]),e.set(a[c+3],a[c+4],a[c+5]),i.set(a[c+6],a[c+7],a[c+8]),o.set(r[u+0],r[u+1]),s.set(r[u+2],r[u+3]),l.set(r[u+4],r[u+5]),n.copy(t).add(e).add(i).divideScalar(3);var d=h(n);p(o,u+0,t,d),p(s,u+2,e,d),p(l,u+4,i,d)}})(),function(){for(var t=0;t<r.length;t+=6){var e=r[t+0],i=r[t+2],n=r[t+4],o=Math.max(e,i,n),s=Math.min(e,i,n);o>.9&&s<.1&&(e<.2&&(r[t+0]+=1),i<.2&&(r[t+2]+=1),n<.2&&(r[t+4]+=1))}}()}(),t.setAttribute("position",new Af(a,3)),t.setAttribute("normal",new Af(a.slice(),3)),t.setAttribute("uv",new Af(r,2)),0===s?t.computeVertexNormals():t.normalizeNormals(),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.vertices,t.indices,t.radius,t.details)}}])}(Gf),og=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;k()(this,e);var o=(1+Math.sqrt(5))/2,s=1/o;return(t=cd(this,e,[[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-s,-o,0,-s,o,0,s,-o,0,s,o,-s,-o,0,-s,o,0,s,-o,0,s,o,0,-o,0,-s,o,0,-s,-o,0,s,o,0,s],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],i,n])).type="DodecahedronGeometry",t.parameters={radius:i,detail:n},t}return Xi()(e,t),_()(e,null,[{key:"fromJSON",value:function(t){return new e(t.radius,t.detail)}}])}(ng),sg=new sm,ag=new sm,rg=new sm,lg=new Cf,cg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(k()(this,e),(t=cd(this,e)).type="EdgesGeometry",t.parameters={geometry:i,thresholdAngle:n},null!==i){for(var o=4,s=Math.pow(10,o),a=Math.cos(Dd*n),r=i.getIndex(),l=i.getAttribute("position"),c=r?r.count:l.count,u=[0,0,0],p=["a","b","c"],h=new Array(3),d={},m=[],f=0;f<c;f+=3){r?(u[0]=r.getX(f),u[1]=r.getX(f+1),u[2]=r.getX(f+2)):(u[0]=f,u[1]=f+1,u[2]=f+2);var v=lg.a,g=lg.b,y=lg.c;if(v.fromBufferAttribute(l,u[0]),g.fromBufferAttribute(l,u[1]),y.fromBufferAttribute(l,u[2]),lg.getNormal(rg),h[0]="".concat(Math.round(v.x*s),",").concat(Math.round(v.y*s),",").concat(Math.round(v.z*s)),h[1]="".concat(Math.round(g.x*s),",").concat(Math.round(g.y*s),",").concat(Math.round(g.z*s)),h[2]="".concat(Math.round(y.x*s),",").concat(Math.round(y.y*s),",").concat(Math.round(y.z*s)),h[0]!==h[1]&&h[1]!==h[2]&&h[2]!==h[0])for(var b=0;b<3;b++){var C=(b+1)%3,w=h[b],x=h[C],_=lg[p[b]],E=lg[p[C]],S="".concat(w,"_").concat(x),D="".concat(x,"_").concat(w);D in d&&d[D]?(rg.dot(d[D].normal)<=a&&(m.push(_.x,_.y,_.z),m.push(E.x,E.y,E.z)),d[D]=null):S in d||(d[S]={index0:u[b],index1:u[C],normal:rg.clone()})}}for(var M in d)if(d[M]){var P=d[M],O=P.index0,T=P.index1;sg.fromBufferAttribute(l,O),ag.fromBufferAttribute(l,T),m.push(sg.x,sg.y,sg.z),m.push(ag.x,ag.y,ag.z)}t.setAttribute("position",new Af(m,3))}return t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}])}(Gf),ug=function(t){function e(t){var i;return k()(this,e),(i=cd(this,e,[t])).uuid=Md(),i.type="Shape",i.holes=[],i}return Xi()(e,t),_()(e,[{key:"getPointsHoles",value:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e}},{key:"extractPoints",value:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}},{key:"copy",value:function(t){ld(e,"copy",this,3)([t]),this.holes=[];for(var i=0,n=t.holes.length;i<n;i++){var o=t.holes[i];this.holes.push(o.clone())}return this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);t.uuid=this.uuid,t.holes=[];for(var i=0,n=this.holes.length;i<n;i++){var o=this.holes[i];t.holes.push(o.toJSON())}return t}},{key:"fromJSON",value:function(t){ld(e,"fromJSON",this,3)([t]),this.uuid=t.uuid,this.holes=[];for(var i=0,n=t.holes.length;i<n;i++){var o=t.holes[i];this.holes.push((new Kv).fromJSON(o))}return this}}])}(Kv);function pg(t,e,i,n,o){var s,a;if(o===function(t,e,i,n){for(var o=0,s=e,a=i-n;s<i;s+=n)o+=(t[a]-t[s])*(t[s+1]+t[a+1]),a=s;return o}(t,e,i,n)>0)for(s=e;s<i;s+=n)a=Ng(s,t[s],t[s+1],a);else for(s=i-n;s>=e;s-=n)a=Ng(s,t[s],t[s+1],a);return a&&Sg(a,a.next)&&(Bg(a),a=a.next),a}function hg(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!Sg(n,n.next)&&0!==Eg(n.prev,n,n.next))n=n.next;else{if(Bg(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function dg(t,e,i,n,o,s,a){if(t){!a&&s&&function(t,e,i,n){var o=t;do{0===o.z&&(o.z=wg(o.x,o.y,e,i,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,i,n,o,s,a,r,l,c=1;do{for(i=t,t=null,s=null,a=0;i;){for(a++,n=i,r=0,e=0;e<c&&(r++,n=n.nextZ);e++);for(l=c;r>0||l>0&&n;)0!==r&&(0===l||!n||i.z<=n.z)?(o=i,i=i.nextZ,r--):(o=n,n=n.nextZ,l--),s?s.nextZ=o:t=o,o.prevZ=s,s=o;i=n}s.nextZ=null,c*=2}while(a>1)}(o)}(t,n,o,s);for(var r,l,c=t;t.prev!==t.next;)if(r=t.prev,l=t.next,s?fg(t,n,o,s):mg(t))e.push(r.i/i|0),e.push(t.i/i|0),e.push(l.i/i|0),Bg(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?dg(t=vg(hg(t),e,i),e,i,n,o,s,2):2===a&&gg(t,e,i,n,o,s):dg(hg(t),e,i,n,o,s,1);break}}}function mg(t){var e=t.prev,i=t,n=t.next;if(Eg(e,i,n)>=0)return!1;for(var o=e.x,s=i.x,a=n.x,r=e.y,l=i.y,c=n.y,u=o<s?o<a?o:a:s<a?s:a,p=r<l?r<c?r:c:l<c?l:c,h=o>s?o>a?o:a:s>a?s:a,d=r>l?r>c?r:c:l>c?l:c,m=n.next;m!==e;){if(m.x>=u&&m.x<=h&&m.y>=p&&m.y<=d&&xg(o,r,s,l,a,c,m.x,m.y)&&Eg(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function fg(t,e,i,n){var o=t.prev,s=t,a=t.next;if(Eg(o,s,a)>=0)return!1;for(var r=o.x,l=s.x,c=a.x,u=o.y,p=s.y,h=a.y,d=r<l?r<c?r:c:l<c?l:c,m=u<p?u<h?u:h:p<h?p:h,f=r>l?r>c?r:c:l>c?l:c,v=u>p?u>h?u:h:p>h?p:h,g=wg(d,m,e,i,n),y=wg(f,v,e,i,n),b=t.prevZ,C=t.nextZ;b&&b.z>=g&&C&&C.z<=y;){if(b.x>=d&&b.x<=f&&b.y>=m&&b.y<=v&&b!==o&&b!==a&&xg(r,u,l,p,c,h,b.x,b.y)&&Eg(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,C.x>=d&&C.x<=f&&C.y>=m&&C.y<=v&&C!==o&&C!==a&&xg(r,u,l,p,c,h,C.x,C.y)&&Eg(C.prev,C,C.next)>=0)return!1;C=C.nextZ}for(;b&&b.z>=g;){if(b.x>=d&&b.x<=f&&b.y>=m&&b.y<=v&&b!==o&&b!==a&&xg(r,u,l,p,c,h,b.x,b.y)&&Eg(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;C&&C.z<=y;){if(C.x>=d&&C.x<=f&&C.y>=m&&C.y<=v&&C!==o&&C!==a&&xg(r,u,l,p,c,h,C.x,C.y)&&Eg(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function vg(t,e,i){var n=t;do{var o=n.prev,s=n.next.next;!Sg(o,s)&&Dg(o,n,n.next,s)&&Og(o,s)&&Og(s,o)&&(e.push(o.i/i|0),e.push(n.i/i|0),e.push(s.i/i|0),Bg(n),Bg(n.next),n=t=s),n=n.next}while(n!==t);return hg(n)}function gg(t,e,i,n,o,s){var a=t;do{for(var r=a.next.next;r!==a.prev;){if(a.i!==r.i&&_g(a,r)){var l=Tg(a,r);return a=hg(a,a.next),l=hg(l,l.next),dg(a,e,i,n,o,s,0),void dg(l,e,i,n,o,s,0)}r=r.next}a=a.next}while(a!==t)}function yg(t,e){return t.x-e.x}function bg(t,e){var i=function(t,e){var i,n=e,o=-1/0,s=t.x,a=t.y;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var r=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(r<=s&&r>o&&(o=r,i=n.x<n.next.x?n:n.next,r===s))return i}n=n.next}while(n!==e);if(!i)return null;var l,c=i,u=i.x,p=i.y,h=1/0;n=i;do{s>=n.x&&n.x>=u&&s!==n.x&&xg(a<p?s:o,a,u,p,a<p?o:s,a,n.x,n.y)&&(l=Math.abs(a-n.y)/(s-n.x),Og(n,t)&&(l<h||l===h&&(n.x>i.x||n.x===i.x&&Cg(i,n)))&&(i=n,h=l)),n=n.next}while(n!==c);return i}(t,e);if(!i)return e;var n=Tg(i,t);return hg(n,n.next),hg(i,i.next)}function Cg(t,e){return Eg(t.prev,t,e.prev)<0&&Eg(e.next,t,t.next)<0}function wg(t,e,i,n,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function kg(t){var e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function xg(t,e,i,n,o,s,a,r){return(o-a)*(e-r)>=(t-a)*(s-r)&&(t-a)*(n-r)>=(i-a)*(e-r)&&(i-a)*(s-r)>=(o-a)*(n-r)}function _g(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&Dg(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(Og(t,e)&&Og(e,t)&&function(t,e){var i=t,n=!1,o=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&o<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(Eg(t.prev,t,e.prev)||Eg(t,e.prev,e))||Sg(t,e)&&Eg(t.prev,t,t.next)>0&&Eg(e.prev,e,e.next)>0)}function Eg(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Sg(t,e){return t.x===e.x&&t.y===e.y}function Dg(t,e,i,n){var o=Pg(Eg(t,e,i)),s=Pg(Eg(t,e,n)),a=Pg(Eg(i,n,t)),r=Pg(Eg(i,n,e));return o!==s&&a!==r||!(0!==o||!Mg(t,i,e))||!(0!==s||!Mg(t,n,e))||!(0!==a||!Mg(i,t,n))||!(0!==r||!Mg(i,e,n))}function Mg(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function Pg(t){return t>0?1:t<0?-1:0}function Og(t,e){return Eg(t.prev,t,t.next)<0?Eg(t,e,t.next)>=0&&Eg(t,t.prev,e)>=0:Eg(t,e,t.prev)<0||Eg(t,t.next,e)<0}function Tg(t,e){var i=new Lg(t.i,t.x,t.y),n=new Lg(e.i,e.x,e.y),o=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=o,o.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function Ng(t,e,i,n){var o=new Lg(t,e,i);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function Bg(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Lg(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Ag=function(){function t(){k()(this,t)}return _()(t,null,[{key:"area",value:function(t){for(var e=t.length,i=0,n=e-1,o=0;o<e;n=o++)i+=t[n].x*t[o].y-t[o].x*t[n].y;return.5*i}},{key:"isClockWise",value:function(e){return t.area(e)<0}},{key:"triangulateShape",value:function(t,e){var i=[],n=[],o=[];jg(t),Ig(i,t);var s=t.length;e.forEach(jg);for(var a=0;a<e.length;a++)n.push(s),s+=e[a].length,Ig(i,e[a]);for(var r=function(t,e){var i,n,o,s,a,r,l,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,u=e&&e.length,p=u?e[0]*c:t.length,h=pg(t,0,p,c,!0),d=[];if(!h||h.next===h.prev)return d;if(u&&(h=function(t,e,i,n){var o,s,a,r=[];for(o=0,s=e.length;o<s;o++)(a=pg(t,e[o]*n,o<s-1?e[o+1]*n:t.length,n,!1))===a.next&&(a.steiner=!0),r.push(kg(a));for(r.sort(yg),o=0;o<r.length;o++)i=bg(r[o],i);return i}(t,e,h,c)),t.length>80*c){i=o=t[0],n=s=t[1];for(var m=c;m<p;m+=c)(a=t[m])<i&&(i=a),(r=t[m+1])<n&&(n=r),a>o&&(o=a),r>s&&(s=r);l=0!==(l=Math.max(o-i,s-n))?32767/l:0}return dg(h,d,c,i,n,l,0),d}(i,n),l=0;l<r.length;l+=3)o.push(r.slice(l,l+3));return o}}])}();function jg(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Ig(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}var Fg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ug([new Ld(.5,.5),new Ld(-.5,.5),new Ld(-.5,-.5),new Ld(.5,-.5)]),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,e),(t=cd(this,e)).type="ExtrudeGeometry",t.parameters={shapes:i,options:n},i=Array.isArray(i)?i:[i];for(var o=t,s=[],a=[],r=0,l=i.length;r<l;r++)c(i[r]);function c(t){var e,i,r,l,c,u=[],p=void 0!==n.curveSegments?n.curveSegments:12,h=void 0!==n.steps?n.steps:1,d=void 0!==n.depth?n.depth:1,m=void 0===n.bevelEnabled||n.bevelEnabled,f=void 0!==n.bevelThickness?n.bevelThickness:.2,v=void 0!==n.bevelSize?n.bevelSize:f-.1,g=void 0!==n.bevelOffset?n.bevelOffset:0,y=void 0!==n.bevelSegments?n.bevelSegments:3,b=n.extrudePath,C=void 0!==n.UVGenerator?n.UVGenerator:Rg,w=!1;b&&(e=b.getSpacedPoints(h),w=!0,m=!1,i=b.computeFrenetFrames(h,!1),r=new sm,l=new sm,c=new sm),m||(y=0,f=0,v=0,g=0);var k=t.extractPoints(p),x=k.shape,_=k.holes;if(!Ag.isClockWise(x)){x=x.reverse();for(var E=0,S=_.length;E<S;E++){var D=_[E];Ag.isClockWise(D)&&(_[E]=D.reverse())}}for(var M=Ag.triangulateShape(x,_),P=x,O=0,T=_.length;O<T;O++){var N=_[O];x=x.concat(N)}function B(t,e,i){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().addScaledVector(e,i)}var L=x.length,A=M.length;function j(t,e,i){var n,o,s,a=t.x-e.x,r=t.y-e.y,l=i.x-t.x,c=i.y-t.y,u=a*a+r*r,p=a*c-r*l;if(Math.abs(p)>Number.EPSILON){var h=Math.sqrt(u),d=Math.sqrt(l*l+c*c),m=e.x-r/h,f=e.y+a/h,v=((i.x-c/d-m)*c-(i.y+l/d-f)*l)/(a*c-r*l),g=(n=m+a*v-t.x)*n+(o=f+r*v-t.y)*o;if(g<=2)return new Ld(n,o);s=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?l>Number.EPSILON&&(y=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(y=!0):Math.sign(r)===Math.sign(c)&&(y=!0),y?(n=-r,o=a,s=Math.sqrt(u)):(n=a,o=r,s=Math.sqrt(u/2))}return new Ld(n/s,o/s)}for(var I=[],F=0,R=P.length,z=R-1,H=F+1;F<R;F++,z++,H++)z===R&&(z=0),H===R&&(H=0),I[F]=j(P[F],P[z],P[H]);for(var V,G=[],U=I.concat(),W=0,Y=_.length;W<Y;W++){var J=_[W];V=[];for(var q=0,X=J.length,Z=X-1,K=q+1;q<X;q++,Z++,K++)Z===X&&(Z=0),K===X&&(K=0),V[q]=j(J[q],J[Z],J[K]);G.push(V),U=U.concat(V)}for(var $=0;$<y;$++){for(var Q=$/y,tt=f*Math.cos(Q*Math.PI/2),et=v*Math.sin(Q*Math.PI/2)+g,it=0,nt=P.length;it<nt;it++){var ot=B(P[it],I[it],et);Tt(ot.x,ot.y,-tt)}for(var st=0,at=_.length;st<at;st++){var rt=_[st];V=G[st];for(var lt=0,ct=rt.length;lt<ct;lt++){var ut=B(rt[lt],V[lt],et);Tt(ut.x,ut.y,-tt)}}}for(var pt=v+g,ht=0;ht<L;ht++){var dt=m?B(x[ht],U[ht],pt):x[ht];w?(l.copy(i.normals[0]).multiplyScalar(dt.x),r.copy(i.binormals[0]).multiplyScalar(dt.y),c.copy(e[0]).add(l).add(r),Tt(c.x,c.y,c.z)):Tt(dt.x,dt.y,0)}for(var mt=1;mt<=h;mt++)for(var ft=0;ft<L;ft++){var vt=m?B(x[ft],U[ft],pt):x[ft];w?(l.copy(i.normals[mt]).multiplyScalar(vt.x),r.copy(i.binormals[mt]).multiplyScalar(vt.y),c.copy(e[mt]).add(l).add(r),Tt(c.x,c.y,c.z)):Tt(vt.x,vt.y,d/h*mt)}for(var gt=y-1;gt>=0;gt--){for(var yt=gt/y,bt=f*Math.cos(yt*Math.PI/2),Ct=v*Math.sin(yt*Math.PI/2)+g,wt=0,kt=P.length;wt<kt;wt++){var xt=B(P[wt],I[wt],Ct);Tt(xt.x,xt.y,d+bt)}for(var _t=0,Et=_.length;_t<Et;_t++){var St=_[_t];V=G[_t];for(var Dt=0,Mt=St.length;Dt<Mt;Dt++){var Pt=B(St[Dt],V[Dt],Ct);w?Tt(Pt.x,Pt.y+e[h-1].y,e[h-1].x+bt):Tt(Pt.x,Pt.y,d+bt)}}}function Ot(t,e){for(var i=t.length;--i>=0;){var n=i,o=i-1;o<0&&(o=t.length-1);for(var s=0,a=h+2*y;s<a;s++){var r=L*s,l=L*(s+1);Bt(e+n+r,e+o+r,e+o+l,e+n+l)}}}function Tt(t,e,i){u.push(t),u.push(e),u.push(i)}function Nt(t,e,i){Lt(t),Lt(e),Lt(i);var n=s.length/3,a=C.generateTopUV(o,s,n-3,n-2,n-1);At(a[0]),At(a[1]),At(a[2])}function Bt(t,e,i,n){Lt(t),Lt(e),Lt(n),Lt(e),Lt(i),Lt(n);var a=s.length/3,r=C.generateSideWallUV(o,s,a-6,a-3,a-2,a-1);At(r[0]),At(r[1]),At(r[3]),At(r[1]),At(r[2]),At(r[3])}function Lt(t){s.push(u[3*t+0]),s.push(u[3*t+1]),s.push(u[3*t+2])}function At(t){a.push(t.x),a.push(t.y)}!function(){var t=s.length/3;if(m){for(var e=0,i=L*e,n=0;n<A;n++){var a=M[n];Nt(a[2]+i,a[1]+i,a[0]+i)}i=L*(e=h+2*y);for(var r=0;r<A;r++){var l=M[r];Nt(l[0]+i,l[1]+i,l[2]+i)}}else{for(var c=0;c<A;c++){var u=M[c];Nt(u[2],u[1],u[0])}for(var p=0;p<A;p++){var d=M[p];Nt(d[0]+L*h,d[1]+L*h,d[2]+L*h)}}o.addGroup(t,s.length/3-t,0)}(),function(){var t=s.length/3,e=0;Ot(P,e),e+=P.length;for(var i=0,n=_.length;i<n;i++){var a=_[i];Ot(a,e),e+=a.length}o.addGroup(t,s.length/3-t,1)}()}return t.setAttribute("position",new Af(s,3)),t.setAttribute("uv",new Af(a,2)),t.computeVertexNormals(),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return function(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,o=t.length;n<o;n++){var s=t[n];i.shapes.push(s.uuid)}else i.shapes.push(t.uuid);return i.options=Object.assign({},e),void 0!==e.extrudePath&&(i.options.extrudePath=e.extrudePath.toJSON()),i}(this.parameters.shapes,this.parameters.options,t)}}],[{key:"fromJSON",value:function(t,i){for(var n=[],o=0,s=t.shapes.length;o<s;o++){var a=i[t.shapes[o]];n.push(a)}var r=t.options.extrudePath;return void 0!==r&&(t.options.extrudePath=(new Zv[r.type]).fromJSON(r)),new e(n,t.options)}}])}(Gf),Rg={generateTopUV:function(t,e,i,n,o){var s=e[3*i],a=e[3*i+1],r=e[3*n],l=e[3*n+1],c=e[3*o],u=e[3*o+1];return[new Ld(s,a),new Ld(r,l),new Ld(c,u)]},generateSideWallUV:function(t,e,i,n,o,s){var a=e[3*i],r=e[3*i+1],l=e[3*i+2],c=e[3*n],u=e[3*n+1],p=e[3*n+2],h=e[3*o],d=e[3*o+1],m=e[3*o+2],f=e[3*s],v=e[3*s+1],g=e[3*s+2];return Math.abs(r-u)<Math.abs(a-c)?[new Ld(a,1-l),new Ld(c,1-p),new Ld(h,1-m),new Ld(f,1-g)]:[new Ld(r,1-l),new Ld(u,1-p),new Ld(d,1-m),new Ld(v,1-g)]}},zg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;k()(this,e);var o=(1+Math.sqrt(5))/2;return(t=cd(this,e,[[-1,o,0,1,o,0,-1,-o,0,1,-o,0,0,-1,o,0,1,o,0,-1,-o,0,1,-o,o,0,-1,o,0,1,-o,0,-1,-o,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],i,n])).type="IcosahedronGeometry",t.parameters={radius:i,detail:n},t}return Xi()(e,t),_()(e,null,[{key:"fromJSON",value:function(t){return new e(t.radius,t.detail)}}])}(ng),Hg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return k()(this,e),(t=cd(this,e,[[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],i,n])).type="OctahedronGeometry",t.parameters={radius:i,detail:n},t}return Xi()(e,t),_()(e,null,[{key:"fromJSON",value:function(t){return new e(t.radius,t.detail)}}])}(ng),Vg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:32,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2*Math.PI;k()(this,e),(t=cd(this,e)).type="RingGeometry",t.parameters={innerRadius:i,outerRadius:n,thetaSegments:o,phiSegments:s,thetaStart:a,thetaLength:r},o=Math.max(3,o);for(var l=[],c=[],u=[],p=[],h=i,d=(n-i)/(s=Math.max(1,s)),m=new sm,f=new Ld,v=0;v<=s;v++){for(var g=0;g<=o;g++){var y=a+g/o*r;m.x=h*Math.cos(y),m.y=h*Math.sin(y),c.push(m.x,m.y,m.z),u.push(0,0,1),f.x=(m.x/n+1)/2,f.y=(m.y/n+1)/2,p.push(f.x,f.y)}h+=d}for(var b=0;b<s;b++)for(var C=b*(o+1),w=0;w<o;w++){var x=w+C,_=x,E=x+o+1,S=x+o+2,D=x+1;l.push(_,E,D),l.push(E,S,D)}return t.setIndex(l),t.setAttribute("position",new Af(c,3)),t.setAttribute("normal",new Af(u,3)),t.setAttribute("uv",new Af(p,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}}])}(Gf),Gg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ug([new Ld(0,.5),new Ld(-.5,-.5),new Ld(.5,-.5)]),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;k()(this,e),(t=cd(this,e)).type="ShapeGeometry",t.parameters={shapes:i,curveSegments:n};var o=[],s=[],a=[],r=[],l=0,c=0;if(!1===Array.isArray(i))p(i);else for(var u=0;u<i.length;u++)p(i[u]),t.addGroup(l,c,u),l+=c,c=0;function p(t){var e=s.length/3,i=t.extractPoints(n),l=i.shape,u=i.holes;!1===Ag.isClockWise(l)&&(l=l.reverse());for(var p=0,h=u.length;p<h;p++){var d=u[p];!0===Ag.isClockWise(d)&&(u[p]=d.reverse())}for(var m=Ag.triangulateShape(l,u),f=0,v=u.length;f<v;f++){var g=u[f];l=l.concat(g)}for(var y=0,b=l.length;y<b;y++){var C=l[y];s.push(C.x,C.y,0),a.push(0,0,1),r.push(C.x,C.y)}for(var w=0,k=m.length;w<k;w++){var x=m[w],_=x[0]+e,E=x[1]+e,S=x[2]+e;o.push(_,E,S),c+=3}}return t.setIndex(o),t.setAttribute("position",new Af(s,3)),t.setAttribute("normal",new Af(a,3)),t.setAttribute("uv",new Af(r,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return function(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++){var o=t[i];e.shapes.push(o.uuid)}else e.shapes.push(t.uuid);return e}(this.parameters.shapes,t)}}],[{key:"fromJSON",value:function(t,i){for(var n=[],o=0,s=t.shapes.length;o<s;o++){var a=i[t.shapes[o]];n.push(a)}return new e(n,t.curveSegments)}}])}(Gf),Ug=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2*Math.PI,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Math.PI;k()(this,e),(t=cd(this,e)).type="SphereGeometry",t.parameters={radius:i,widthSegments:n,heightSegments:o,phiStart:s,phiLength:a,thetaStart:r,thetaLength:l},n=Math.max(3,Math.floor(n)),o=Math.max(2,Math.floor(o));for(var c=Math.min(r+l,Math.PI),u=0,p=[],h=new sm,d=new sm,m=[],f=[],v=[],g=[],y=0;y<=o;y++){var b=[],C=y/o,w=0;0===y&&0===r?w=.5/n:y===o&&c===Math.PI&&(w=-.5/n);for(var x=0;x<=n;x++){var _=x/n;h.x=-i*Math.cos(s+_*a)*Math.sin(r+C*l),h.y=i*Math.cos(r+C*l),h.z=i*Math.sin(s+_*a)*Math.sin(r+C*l),f.push(h.x,h.y,h.z),d.copy(h).normalize(),v.push(d.x,d.y,d.z),g.push(_+w,1-C),b.push(u++)}p.push(b)}for(var E=0;E<o;E++)for(var S=0;S<n;S++){var D=p[E][S+1],M=p[E][S],P=p[E+1][S],O=p[E+1][S+1];(0!==E||r>0)&&m.push(D,M,O),(E!==o-1||c<Math.PI)&&m.push(M,P,O)}return t.setIndex(m),t.setAttribute("position",new Af(f,3)),t.setAttribute("normal",new Af(v,3)),t.setAttribute("uv",new Af(g,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}}])}(Gf),Wg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return k()(this,e),(t=cd(this,e,[[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],i,n])).type="TetrahedronGeometry",t.parameters={radius:i,detail:n},t}return Xi()(e,t),_()(e,null,[{key:"fromJSON",value:function(t){return new e(t.radius,t.detail)}}])}(ng),Yg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:12,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:48,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2*Math.PI;k()(this,e),(t=cd(this,e)).type="TorusGeometry",t.parameters={radius:i,tube:n,radialSegments:o,tubularSegments:s,arc:a},o=Math.floor(o),s=Math.floor(s);for(var r=[],l=[],c=[],u=[],p=new sm,h=new sm,d=new sm,m=0;m<=o;m++)for(var f=0;f<=s;f++){var v=f/s*a,g=m/o*Math.PI*2;h.x=(i+n*Math.cos(g))*Math.cos(v),h.y=(i+n*Math.cos(g))*Math.sin(v),h.z=n*Math.sin(g),l.push(h.x,h.y,h.z),p.x=i*Math.cos(v),p.y=i*Math.sin(v),d.subVectors(h,p).normalize(),c.push(d.x,d.y,d.z),u.push(f/s),u.push(m/o)}for(var y=1;y<=o;y++)for(var b=1;b<=s;b++){var C=(s+1)*y+b-1,w=(s+1)*(y-1)+b-1,x=(s+1)*(y-1)+b,_=(s+1)*y+b;r.push(C,w,_),r.push(w,x,_)}return t.setIndex(r),t.setAttribute("position",new Af(l,3)),t.setAttribute("normal",new Af(c,3)),t.setAttribute("uv",new Af(u,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}}])}(Gf),Jg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:64,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:3;k()(this,e),(t=cd(this,e)).type="TorusKnotGeometry",t.parameters={radius:i,tube:n,tubularSegments:o,radialSegments:s,p:a,q:r},o=Math.floor(o),s=Math.floor(s);for(var l=[],c=[],u=[],p=[],h=new sm,d=new sm,m=new sm,f=new sm,v=new sm,g=new sm,y=new sm,b=0;b<=o;++b){var C=b/o*a*Math.PI*2;N(C,a,r,i,m),N(C+.01,a,r,i,f),g.subVectors(f,m),y.addVectors(f,m),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize();for(var w=0;w<=s;++w){var x=w/s*Math.PI*2,_=-n*Math.cos(x),E=n*Math.sin(x);h.x=m.x+(_*y.x+E*v.x),h.y=m.y+(_*y.y+E*v.y),h.z=m.z+(_*y.z+E*v.z),c.push(h.x,h.y,h.z),d.subVectors(h,m).normalize(),u.push(d.x,d.y,d.z),p.push(b/o),p.push(w/s)}}for(var S=1;S<=o;S++)for(var D=1;D<=s;D++){var M=(s+1)*(S-1)+(D-1),P=(s+1)*S+(D-1),O=(s+1)*S+D,T=(s+1)*(S-1)+D;l.push(M,P,T),l.push(P,O,T)}function N(t,e,i,n,o){var s=Math.cos(t),a=Math.sin(t),r=i/e*t,l=Math.cos(r);o.x=n*(2+l)*.5*s,o.y=n*(2+l)*a*.5,o.z=n*Math.sin(r)*.5}return t.setIndex(l),t.setAttribute("position",new Af(c,3)),t.setAttribute("normal",new Af(u,3)),t.setAttribute("uv",new Af(p,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}],[{key:"fromJSON",value:function(t){return new e(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}}])}(Gf),qg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new qv(new sm(-1,-1,0),new sm(-1,1,0),new sm(1,1,0)),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];k()(this,e),(t=cd(this,e)).type="TubeGeometry",t.parameters={path:i,tubularSegments:n,radius:o,radialSegments:s,closed:a};var r=i.computeFrenetFrames(n,a);t.tangents=r.tangents,t.normals=r.normals,t.binormals=r.binormals;var l=new sm,c=new sm,u=new Ld,p=new sm,h=[],d=[],m=[],f=[];function v(t){p=i.getPointAt(t/n,p);for(var e=r.normals[t],a=r.binormals[t],u=0;u<=s;u++){var m=u/s*Math.PI*2,f=Math.sin(m),v=-Math.cos(m);c.x=v*e.x+f*a.x,c.y=v*e.y+f*a.y,c.z=v*e.z+f*a.z,c.normalize(),d.push(c.x,c.y,c.z),l.x=p.x+o*c.x,l.y=p.y+o*c.y,l.z=p.z+o*c.z,h.push(l.x,l.y,l.z)}}return function(){for(var t=0;t<n;t++)v(t);v(!1===a?n:0),function(){for(var t=0;t<=n;t++)for(var e=0;e<=s;e++)u.x=t/n,u.y=e/s,m.push(u.x,u.y)}(),function(){for(var t=1;t<=n;t++)for(var e=1;e<=s;e++){var i=(s+1)*(t-1)+(e-1),o=(s+1)*t+(e-1),a=(s+1)*t+e,r=(s+1)*(t-1)+e;f.push(i,o,r),f.push(o,a,r)}}()}(),t.setIndex(f),t.setAttribute("position",new Af(h,3)),t.setAttribute("normal",new Af(d,3)),t.setAttribute("uv",new Af(m,2)),t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}},{key:"toJSON",value:function(){var t=ld(e,"toJSON",this,3)([]);return t.path=this.parameters.path.toJSON(),t}}],[{key:"fromJSON",value:function(t){return new e((new Zv[t.path.type]).fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}}])}(Gf),Xg=function(t){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(k()(this,e),(t=cd(this,e)).type="WireframeGeometry",t.parameters={geometry:i},null!==i){var n=[],o=new Set,s=new sm,a=new sm;if(null!==i.index){var r=i.attributes.position,l=i.index,c=i.groups;0===c.length&&(c=[{start:0,count:l.count,materialIndex:0}]);for(var u=0,p=c.length;u<p;++u)for(var h=c[u],d=h.start,m=d,f=d+h.count;m<f;m+=3)for(var v=0;v<3;v++){var g=l.getX(m+v),y=l.getX(m+(v+1)%3);s.fromBufferAttribute(r,g),a.fromBufferAttribute(r,y),!0===Zg(s,a,o)&&(n.push(s.x,s.y,s.z),n.push(a.x,a.y,a.z))}}else for(var b=i.attributes.position,C=0,w=b.count/3;C<w;C++)for(var x=0;x<3;x++){var _=3*C+x,E=3*C+(x+1)%3;s.fromBufferAttribute(b,_),a.fromBufferAttribute(b,E),!0===Zg(s,a,o)&&(n.push(s.x,s.y,s.z),n.push(a.x,a.y,a.z))}t.setAttribute("position",new Af(n,3))}return t}return Xi()(e,t),_()(e,[{key:"copy",value:function(t){return ld(e,"copy",this,3)([t]),this.parameters=Object.assign({},t.parameters),this}}])}(Gf);function Zg(t,e,i){var n="".concat(t.x,",").concat(t.y,",").concat(t.z,"-").concat(e.x,",").concat(e.y,",").concat(e.z),o="".concat(e.x,",").concat(e.y,",").concat(e.z,"-").concat(t.x,",").concat(t.y,",").concat(t.z);return!0!==i.has(n)&&!0!==i.has(o)&&(i.add(n),i.add(o),!0)}Object.freeze({__proto__:null,BoxGeometry:cv,CapsuleGeometry:Qv,CircleGeometry:tg,ConeGeometry:ig,CylinderGeometry:eg,DodecahedronGeometry:og,EdgesGeometry:cg,ExtrudeGeometry:Fg,IcosahedronGeometry:zg,LatheGeometry:$v,OctahedronGeometry:Hg,PlaneGeometry:wv,PolyhedronGeometry:ng,RingGeometry:Vg,ShapeGeometry:Gg,SphereGeometry:Ug,TetrahedronGeometry:Wg,TorusGeometry:Yg,TorusKnotGeometry:Jg,TubeGeometry:qg,WireframeGeometry:Xg});function Kg(t,e,i){return!t||!i&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function $g(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var Qg=function(){return _()((function t(e,i,n,o){k()(this,t),this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==o?o:new i.constructor(n),this.sampleValues=i,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}),[{key:"evaluate",value:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],o=e[i-1];t:{e:{var s;i:{n:if(!(t<n)){for(var a=i+2;;){if(void 0===n){if(t<o)break n;return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(o=n,t<(n=e[++i]))break e}s=e.length;break i}if(t>=o)break t;var r=e[1];t<r&&(i=2,o=r);for(var l=i-2;;){if(void 0===o)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(n=o,t>=(o=e[--i-1]))break e}s=i,i=0}for(;i<s;){var c=i+s>>>1;t<e[c]?s=c:i=c+1}if(n=e[i],void 0===(o=e[i-1]))return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===n)return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,o,n)}return this.interpolate_(i,o,t,n)}},{key:"getSettings_",value:function(){return this.settings||this.DefaultSettings_}},{key:"copySampleValue_",value:function(t){for(var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize,o=t*n,s=0;s!==n;++s)e[s]=i[o+s];return e}},{key:"interpolate_",value:function(){throw new Error("call to abstract method")}},{key:"intervalChanged_",value:function(){}}])}(),ty=function(t){function e(t,i,n,o){var s;return k()(this,e),(s=cd(this,e,[t,i,n,o]))._weightPrev=-0,s._offsetPrev=-0,s._weightNext=-0,s._offsetNext=-0,s.DefaultSettings_={endingStart:hd,endingEnd:hd},s}return Xi()(e,t),_()(e,[{key:"intervalChanged_",value:function(t,e,i){var n=this.parameterPositions,o=t-2,s=t+1,a=n[o],r=n[s];if(void 0===a)switch(this.getSettings_().endingStart){case dd:o=t,a=2*e-i;break;case 2402:a=e+n[o=n.length-2]-n[o+1];break;default:o=t,a=i}if(void 0===r)switch(this.getSettings_().endingEnd){case dd:s=t,r=2*i-e;break;case 2402:s=1,r=i+n[1]-n[0];break;default:s=t-1,r=e}var l=.5*(i-e),c=this.valueSize;this._weightPrev=l/(e-a),this._weightNext=l/(r-i),this._offsetPrev=o*c,this._offsetNext=s*c}},{key:"interpolate_",value:function(t,e,i,n){for(var o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,r=t*a,l=r-a,c=this._offsetPrev,u=this._offsetNext,p=this._weightPrev,h=this._weightNext,d=(i-e)/(n-e),m=d*d,f=m*d,v=-p*f+2*p*m-p*d,g=(1+p)*f+(-1.5-2*p)*m+(-.5+p)*d+1,y=(-1-h)*f+(1.5+h)*m+.5*d,b=h*f-h*m,C=0;C!==a;++C)o[C]=v*s[c+C]+g*s[l+C]+y*s[r+C]+b*s[u+C];return o}}])}(Qg),ey=function(t){function e(t,i,n,o){return k()(this,e),cd(this,e,[t,i,n,o])}return Xi()(e,t),_()(e,[{key:"interpolate_",value:function(t,e,i,n){for(var o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,r=t*a,l=r-a,c=(i-e)/(n-e),u=1-c,p=0;p!==a;++p)o[p]=s[l+p]*u+s[r+p]*c;return o}}])}(Qg),iy=function(t){function e(t,i,n,o){return k()(this,e),cd(this,e,[t,i,n,o])}return Xi()(e,t),_()(e,[{key:"interpolate_",value:function(t){return this.copySampleValue_(t-1)}}])}(Qg),ny=function(){return _()((function t(e,i,n,o){if(k()(this,t),void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===i||0===i.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Kg(i,this.TimeBufferType),this.values=Kg(n,this.ValueBufferType),this.setInterpolation(o||this.DefaultInterpolation)}),[{key:"InterpolantFactoryMethodDiscrete",value:function(t){return new iy(this.times,this.values,this.getValueSize(),t)}},{key:"InterpolantFactoryMethodLinear",value:function(t){return new ey(this.times,this.values,this.getValueSize(),t)}},{key:"InterpolantFactoryMethodSmooth",value:function(t){return new ty(this.times,this.values,this.getValueSize(),t)}},{key:"setInterpolation",value:function(t){var e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){var i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=e,this}},{key:"getInterpolation",value:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}},{key:"getValueSize",value:function(){return this.values.length/this.times.length}},{key:"shift",value:function(t){if(0!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this}},{key:"scale",value:function(t){if(1!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this}},{key:"trim",value:function(t,e){for(var i=this.times,n=i.length,o=0,s=n-1;o!==n&&i[o]<t;)++o;for(;-1!==s&&i[s]>e;)--s;if(++s,0!==o||s!==n){o>=s&&(o=(s=Math.max(s,1))-1);var a=this.getValueSize();this.times=i.slice(o,s),this.values=this.values.slice(o*a,s*a)}return this}},{key:"validate",value:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times,n=this.values,o=i.length;0===o&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var s=null,a=0;a!==o;a++){var r=i[a];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,r),t=!1;break}if(null!==s&&s>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,r,s),t=!1;break}s=r}if(void 0!==n&&$g(n))for(var l=0,c=n.length;l!==c;++l){var u=n[l];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,u),t=!1;break}}return t}},{key:"optimize",value:function(){for(var t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),n=2302===this.getInterpolation(),o=t.length-1,s=1,a=1;a<o;++a){var r=!1,l=t[a];if(l!==t[a+1]&&(1!==a||l!==t[0]))if(n)r=!0;else for(var c=a*i,u=c-i,p=c+i,h=0;h!==i;++h){var d=e[c+h];if(d!==e[u+h]||d!==e[p+h]){r=!0;break}}if(r){if(a!==s){t[s]=t[a];for(var m=a*i,f=s*i,v=0;v!==i;++v)e[f+v]=e[m+v]}++s}}if(o>0){t[s]=t[o];for(var g=o*i,y=s*i,b=0;b!==i;++b)e[y+b]=e[g+b];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=e.slice(0,s*i)):(this.times=t,this.values=e),this}},{key:"clone",value:function(){var t=this.times.slice(),e=this.values.slice(),i=new(0,this.constructor)(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}}],[{key:"toJSON",value:function(t){var e,i=t.constructor;if(i.toJSON!==this.toJSON)e=i.toJSON(t);else{e={name:t.name,times:Kg(t.times,Array),values:Kg(t.values,Array)};var n=t.getInterpolation();n!==t.DefaultInterpolation&&(e.interpolation=n)}return e.type=t.ValueTypeName,e}}])}();ny.prototype.TimeBufferType=Float32Array,ny.prototype.ValueBufferType=Float32Array,ny.prototype.DefaultInterpolation=2301;var oy=function(t){function e(){return k()(this,e),cd(this,e,arguments)}return Xi()(e,t),_()(e)}(ny);oy.prototype.ValueTypeName="bool",oy.prototype.ValueBufferType=Array,oy.prototype.DefaultInterpolation=2300,oy.prototype.InterpolantFactoryMethodLinear=void 0,oy.prototype.InterpolantFactoryMethodSmooth=void 0;var sy=function(t){function e(){return k()(this,e),cd(this,e,arguments)}return Xi()(e,t),_()(e)}(ny);sy.prototype.ValueTypeName="color";var ay=function(t){function e(){return k()(this,e),cd(this,e,arguments)}return Xi()(e,t),_()(e)}(ny);ay.prototype.ValueTypeName="number";var ry=function(t){function e(t,i,n,o){return k()(this,e),cd(this,e,[t,i,n,o])}return Xi()(e,t),_()(e,[{key:"interpolate_",value:function(t,e,i,n){for(var o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,r=(i-e)/(n-e),l=t*a,c=l+a;l!==c;l+=4)om.slerpFlat(o,0,s,l-a,s,l,r);return o}}])}(Qg),ly=function(t){function e(){return k()(this,e),cd(this,e,arguments)}return Xi()(e,t),_()(e,[{key:"InterpolantFactoryMethodLinear",value:function(t){return new ry(this.times,this.values,this.getValueSize(),t)}}])}(ny);ly.prototype.ValueTypeName="quaternion",ly.prototype.DefaultInterpolation=2301,ly.prototype.InterpolantFactoryMethodSmooth=void 0;var cy=function(t){function e(){return k()(this,e),cd(this,e,arguments)}return Xi()(e,t),_()(e)}(ny);cy.prototype.ValueTypeName="string",cy.prototype.ValueBufferType=Array,cy.prototype.DefaultInterpolation=2300,cy.prototype.InterpolantFactoryMethodLinear=void 0,cy.prototype.InterpolantFactoryMethodSmooth=void 0;var uy=function(t){function e(){return k()(this,e),cd(this,e,arguments)}return Xi()(e,t),_()(e)}(ny);uy.prototype.ValueTypeName="vector";var py=_()((function t(e,i,n){k()(this,t);var o,s=this,a=!1,r=0,l=0,c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=i,this.onError=n,this.itemStart=function(t){l++,!1===a&&void 0!==s.onStart&&s.onStart(t,r,l),a=!0},this.itemEnd=function(t){r++,void 0!==s.onProgress&&s.onProgress(t,r,l),r===l&&(a=!1,void 0!==s.onLoad&&s.onLoad())},this.itemError=function(t){void 0!==s.onError&&s.onError(t)},this.resolveURL=function(t){return o?o(t):t},this.setURLModifier=function(t){return o=t,this},this.addHandler=function(t,e){return c.push(t,e),this},this.removeHandler=function(t){var e=c.indexOf(t);return-1!==e&&c.splice(e,2),this},this.getHandler=function(t){for(var e=0,i=c.length;e<i;e+=2){var n=c[e],o=c[e+1];if(n.global&&(n.lastIndex=0),n.test(t))return o}return null}})),hy=new py,dy=function(){return _()((function t(e){k()(this,t),this.manager=void 0!==e?e:hy,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}),[{key:"load",value:function(){}},{key:"loadAsync",value:function(t,e){var i=this;return new Promise((function(n,o){i.load(t,n,e,o)}))}},{key:"parse",value:function(){}},{key:"setCrossOrigin",value:function(t){return this.crossOrigin=t,this}},{key:"setWithCredentials",value:function(t){return this.withCredentials=t,this}},{key:"setPath",value:function(t){return this.path=t,this}},{key:"setResourcePath",value:function(t){return this.resourcePath=t,this}},{key:"setRequestHeader",value:function(t){return this.requestHeader=t,this}}])}();dy.DEFAULT_MATERIAL_NAME="__DEFAULT";Error,new Am,new sm,new sm,new Am,new sm,new sm,new Am,new Am,new Am;new sm,new om,new sm,new sm,new sm,new om,new sm,new sm;var my="\\[\\]\\.:\\/",fy=new RegExp("["+my+"]","g"),vy="[^"+my+"]",gy="[^"+my.replace("\\.","")+"]",yy=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",vy)+/(WCOD+)?/.source.replace("WCOD",gy)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",vy)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",vy)+"$"),by=["material","materials","bones","map"],Cy=function(){function t(e,i,n){k()(this,t),this.path=i,this.parsedPath=n||t.parseTrackName(i),this.node=t.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}return _()(t,[{key:"_getValue_unavailable",value:function(){}},{key:"_setValue_unavailable",value:function(){}},{key:"_getValue_direct",value:function(t,e){t[e]=this.targetObject[this.propertyName]}},{key:"_getValue_array",value:function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)t[e++]=i[n]}},{key:"_getValue_arrayElement",value:function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}},{key:"_getValue_toArray",value:function(t,e){this.resolvedProperty.toArray(t,e)}},{key:"_setValue_direct",value:function(t,e){this.targetObject[this.propertyName]=t[e]}},{key:"_setValue_direct_setNeedsUpdate",value:function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}},{key:"_setValue_direct_setMatrixWorldNeedsUpdate",value:function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_array",value:function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++]}},{key:"_setValue_array_setNeedsUpdate",value:function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0}},{key:"_setValue_array_setMatrixWorldNeedsUpdate",value:function(t,e){for(var i=this.resolvedProperty,n=0,o=i.length;n!==o;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_arrayElement",value:function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}},{key:"_setValue_arrayElement_setNeedsUpdate",value:function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}},{key:"_setValue_arrayElement_setMatrixWorldNeedsUpdate",value:function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_setValue_fromArray",value:function(t,e){this.resolvedProperty.fromArray(t,e)}},{key:"_setValue_fromArray_setNeedsUpdate",value:function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}},{key:"_setValue_fromArray_setMatrixWorldNeedsUpdate",value:function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}},{key:"_getValue_unbound",value:function(t,e){this.bind(),this.getValue(t,e)}},{key:"_setValue_unbound",value:function(t,e){this.bind(),this.setValue(t,e)}},{key:"bind",value:function(){var e=this.node,i=this.parsedPath,n=i.objectName,o=i.propertyName,s=i.propertyIndex;if(e||(e=t.findNode(this.rootNode,i.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(n){var a=i.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var r=0;r<e.length;r++)if(e[r].name===a){a=r;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==a){if(void 0===e[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[a]}}var l=e[o];if(void 0!==l){var c=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?c=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate);var u=this.BindingType.Direct;if(void 0!==s){if("morphTargetInfluences"===o){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[s]&&(s=e.morphTargetDictionary[s])}u=this.BindingType.ArrayElement,this.resolvedProperty=l,this.propertyIndex=s}else void 0!==l.fromArray&&void 0!==l.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(u=this.BindingType.EntireArray,this.resolvedProperty=l):this.propertyName=o;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var p=i.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+p+"."+o+" but it wasn't found.",e)}}else console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".")}},{key:"unbind",value:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}],[{key:"create",value:function(e,i,n){return e&&e.isAnimationObjectGroup?new t.Composite(e,i,n):new t(e,i,n)}},{key:"sanitizeNodeName",value:function(t){return t.replace(/\s/g,"_").replace(fy,"")}},{key:"parseTrackName",value:function(t){var e=yy.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){var o=i.nodeName.substring(n+1);-1!==by.indexOf(o)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=o)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}},{key:"findNode",value:function(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(void 0!==i)return i}if(t.children){var n=function(t){for(var i=0;i<t.length;i++){var o=t[i];if(o.name===e||o.uuid===e)return o;var s=n(o.children);if(s)return s}return null},o=n(t.children);if(o)return o}return null}}])}();Cy.Composite=function(){return _()((function t(e,i,n){k()(this,t);var o=n||Cy.parseTrackName(i);this._targetGroup=e,this._bindings=e.subscribe_(i,o)}),[{key:"getValue",value:function(t,e){this.bind();var i=this._targetGroup.nCachedObjects_,n=this._bindings[i];void 0!==n&&n.getValue(t,e)}},{key:"setValue",value:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,o=i.length;n!==o;++n)i[n].setValue(t,e)}},{key:"bind",value:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}},{key:"unbind",value:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}])}(),Cy.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Cy.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Cy.prototype.GetterByBindingType=[Cy.prototype._getValue_direct,Cy.prototype._getValue_array,Cy.prototype._getValue_arrayElement,Cy.prototype._getValue_toArray],Cy.prototype.SetterByBindingTypeAndVersioning=[[Cy.prototype._setValue_direct,Cy.prototype._setValue_direct_setNeedsUpdate,Cy.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Cy.prototype._setValue_array,Cy.prototype._setValue_array_setNeedsUpdate,Cy.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Cy.prototype._setValue_arrayElement,Cy.prototype._setValue_arrayElement_setNeedsUpdate,Cy.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Cy.prototype._setValue_fromArray,Cy.prototype._setValue_fromArray_setNeedsUpdate,Cy.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];new Float32Array(1),new Am;new Ld,new sm,new sm,new sm,new sm,new Am,new Am;new sm,new Ef,new Ef,new sm,new sm,new sm,new sm,new hv;new lm,new sm;"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"164"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="164");i(37);function wy(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ky(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?wy(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):wy(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function xy(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return _y(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function _y(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Ey(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Sy(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function Dy(t,e){return t.get(Py(t,e))}function My(t,e,i){return t.set(Py(t,e),i),i}function Py(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Oy=new WeakMap,Ty=new WeakMap,Ny=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};k()(this,e),Sy(i=Ey(this,e,[t,n]),Oy,void 0),Sy(i,Ty,!1);var s="\n importScripts('".concat(i.getSourceRootPath(),"/3rdparty/turf.min.js');\n self.addEventListener('message', function (e) {\n let features = []\n eval(e.data.code);\n self.postMessage(features);\n }, false);\n "),a="data:text/javascript;charset=utf-8,"+encodeURIComponent(s);if(i._worker=new Worker(a),i.options.angle=i.options.angle||0,i.loaded=!1,i.ismove=!1,i.options.position.lat>83.5&&(i.options.position.lat=83.5),i.options.position.lat<-83.5&&(i.options.position.lat=-83.5),i.options.show=!n.show&&!1!==n.show||n.show,i.options.scale=n.scale||{},i.options.scale.x=i.options.scale.x||0===i.options.scale.x?i.options.scale.x:1,i.options.scale.y=i.options.scale.y||0===i.options.scale.y?i.options.scale.y:1,i.options.flipe=n.flipe||{},i.options.flipe.x=i.options.flipe.x||!1,i.options.flipe.y=i.options.flipe.y||!1,i.options.attribute=n.attribute||{},i.options.attribute.link=i.options.attribute.link||{},i.options.attribute.link.content=i.options.attribute.link.content||[],i.options.attributeType=n.attributeType||"richText",n.text=n.text||{},i.options.text={value:n.text.value||"",show:!n.text.show&&!1!==n.text.show||n.text.show,position:n.text.position,fontSize:n.text.fontSize||0===n.text.fontSize?n.text.fontSize:20,color:n.text.color||"#ffffff",scaleByDistance:n.text.scaleByDistance||!1,near:n.text.near||0===n.text.near?n.text.near:2e3,far:n.text.far||0===n.text.far?n.text.far:1e5},i.options.text.position){var r=turf.point([i.options.position.lng,i.options.position.lat]),l=turf.point([i.options.text.position.lng,i.options.text.position.lat]),c=turf.distance(r,l,{units:"kilometers"}),u=turf.rhumbBearing(r,l);i._textToCenter={distance:c,angle:u}}return i.hierarchys=[],i._elms={},i.Dialog=o,i._isdrag=!1,i._EventBinding=new hn,i.sdk.entityMap.get(i.options.id)?Wi()(i):(i.sdk.addIncetance(i.options.id,i),i.picking=!0,i.options.show&&Qt(0,i.options.id),i._entityArray=[],i.init(),i)}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"GroundSvg"}},{key:"attributeSelect",get:function(){return[{name:"富文本",value:"富文本",key:"richText"},{name:"链接",value:"链接",key:"link"}]}},{key:"name",get:function(){return this.options.name},set:function(t){this.options.name=t,this._elms.name&&this._elms.name.forEach((function(e){e.value=t}))}},{key:"show",get:function(){return this.options.show},set:function(t){var i,n,o,s,a,r;"boolean"==typeof t?(this.options.text&&this.options.text.show&&this.text&&(this.showView&&3!=this.showView?this.text.show=!1:this.text.show=t),i=e,n="show",o=t,s=this,a=1,r=1,id()(Ji()(r?i.prototype:i),n,o,s,a)):console.error("参数必须为boolean")}},{key:"position",get:function(){return this.options.position},set:function(t){var e=this;if(this.options.position=t,this.options.position.lat>83.5&&(this.options.position.lat=83.5),this.options.position.lat<-83.5&&(this.options.position.lat=-83.5),this._update(),this._textToCenter){var i=turf.point([this.options.position.lng,this.options.position.lat]),n=turf.destination(i,this._textToCenter.distance,this._textToCenter.angle,{units:"kilometers"}).geometry.coordinates;this.getClampToHeight({lng:n[0],lat:n[1]}).then((function(t){var i=[n[0],n[1],t];e.text&&(e.text.position=i)}))}}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;if(this.options.color=t,this.options.color)for(var i=0;i<this.entity.values.length;i++)this.entity.values[i].polygon.material=Cesium.Color.fromCssColorString(this.options.color);else for(var n=0;n<this.entity.values.length;n++)this.entity.values[n].polygon.material=Cesium.Color.fromCssColorString(this.entity.values[n].properties.color._value);this._elms.color&&this._elms.color.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.color||void 0,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color=""}});e._elms.color[i]=n}))}},{key:"angle",get:function(){return this.options.angle},set:function(t){var e=this,i=(Number(t)+360)%360;i=parseFloat(i.toFixed(1)),this.options.angle=i,t>0&&0===i&&(this.options.angle=360),this._elms.angle&&this._elms.angle.forEach((function(t){t.value=e.options.angle})),this._update()}},{key:"scale",get:function(){return this.options.scale},set:function(t){this.options.scale.x=t.x,this.options.scale.y=t.y,this._elms&&(this._elms.xRange&&(this._elms.xRange.value=this.options.scale.x),this._elms.yRange&&(this._elms.yRange.value=this.options.scale.y),this._elms.xInput&&(this._elms.xInput.value=this.options.scale.x),this._elms.yInput&&(this._elms.yInput.value=this.options.scale.y)),this._update()}},{key:"flipeY",get:function(){return this.options.flipe.y},set:function(t){"boolean"==typeof t?(this.options.flipe.y=t,this._update()):console.error("参数必须为boolean")}},{key:"flipeX",get:function(){return this.options.flipe.x},set:function(t){"boolean"==typeof t?(this.options.flipe.x=t,this._update()):console.error("参数必须为boolean")}},{key:"textValue",get:function(){return this.options.text.value},set:function(t){this.options.text.value=t,this.text?this.text.text=t:e.createText(this),this._elms.textValue&&this._elms.textValue.forEach((function(e){e.value=t}))}},{key:"textShow",get:function(){return this.options.text.show},set:function(t){var e=this;this.options.text.show=t,this.show?(this.showView&&3!=this.showView?this.text&&(this.text.show=!1):this.text&&(this.text.show=t),this.options.text.position&&setTimeout((function(){e.options.text.position.alt?e.text&&(e.text.position=[e.options.text.position.lng,e.options.text.position.lat,e.options.text.position.alt]):e.getClampToHeight({lng:e.options.text.position.lng,lat:e.options.text.position.lat}).then((function(t){e.text&&(e.text.position=[e.options.text.position.lng,e.options.text.position.lat,t])}))}),0)):this.text&&(this.text.show=!1),this._elms.textShow&&this._elms.textShow.forEach((function(e){e.checked=t}))}},{key:"textColor",get:function(){return this.options.text.color},set:function(t){var e=this;this.options.text.color=t,this.text&&(this.text.color=t),this._elms.textColor&&this._elms.textColor.forEach((function(t,i){var n=new YJColorPicker({el:t.el,size:"mini",alpha:!0,defaultColor:e.textColor,disabled:!1,openPickerAni:"opacity",sure:function(t){e.textColor=t},clear:function(){e.textColor="rgba(255,255,255,1)"}});e._elms.textColor[i]=n}))}},{key:"textFontSize",get:function(){return this.options.text.fontSize},set:function(t){this.options.text.fontSize=t,this.text&&(this.text.fontSize=t),this._elms.textFontSize&&this._elms.textFontSize.forEach((function(e){e.value=t}))}},{key:"textScaleByDistance",get:function(){return this.options.text.scaleByDistance},set:function(t){this.options.text.scaleByDistance=t,this.text&&(this.text.scaleByDistance=t),this._elms.textScaleByDistance&&this._elms.textScaleByDistance.forEach((function(e){e.checked=t}))}},{key:"textNear",get:function(){return this.options.text.near},set:function(t){var e=t;e>this.textFar&&(e=this.textFar),this.options.text.near=e,this.text&&(this.text.near=e),this._elms.textNear&&this._elms.textNear.forEach((function(t){t.value=e}))}},{key:"textFar",get:function(){return this.options.text.far},set:function(t){var e=t;e<this.textNear&&(e=this.textNear),this.options.text.far=e,this.text&&(this.text.far=e),this._elms.textFar&&this._elms.textFar.forEach((function(t){t.value=e}))}},{key:"attributeType",get:function(){return this.options.attributeType},set:function(t){this.options.attributeType=t,this._elms.attributeType&&this._elms.attributeType.forEach((function(e){e.value=t}));for(var e=this._DialogObject._element.content.getElementsByClassName("attribute-content"),i=0;i<e.length;i++)e[i].className.indexOf("attribute-content-"+t)>-1?e[i].style.display="block":e[i].style.display="none"}},{key:"attributeLink",get:function(){return this.options.attribute.link.content},set:function(t){var e=this;if(this.options.attribute.link.content=t,this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content&&0!=this._DialogObject._element.content.getElementsByClassName("attribute-content-link").length){var i=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],n=i.getElementsByClassName("table-body")[0];n.innerHTML="",this.options.attribute.link.content.length>0?i.getElementsByClassName("table-empty")[0].style.display="none":i.getElementsByClassName("table-empty")[0].style.display="flex";for(var s=0;s<this.options.attribute.link.content.length;s++){var r='\n <div class="tr">\n <div class="td">'+this.options.attribute.link.content[s].name+'</div>\n <div class="td">'+this.options.attribute.link.content[s].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',l=document.createRange().createContextualFragment(r);n.appendChild(l)}for(var c,u=n.getElementsByClassName("tr"),p={linkEdit:(c=o()(a.a.mark((function t(i){var n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.options.attribute.link.content;case 2:e.attributeLink=t.sent,n=e._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],o=n.getElementsByClassName("table-body")[0],s=o.getElementsByClassName("tr"),r=a.a.mark((function t(n){var o,r,l,c,u,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==n){t.next=36;break}o=s[n].offsetHeight,s[n].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <textarea class="input link-edit" type="text"></textarea>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',s[n].getElementsByClassName("link-edit")[0].style.height=o-10+"px",(r=s[n].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].name,r[1].getElementsByClassName("input")[0].value=e.options.attribute.link.content[i].url,l=s[n].getElementsByTagName("button"),c=0;case 11:if(!(c<l.length)){t.next=35;break}if(l[c]&&l[c].attributes){t.next=14;break}return t.abrupt("continue",32);case 14:u=xy(l[c].attributes),t.prev=15,d=a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(e=h.value).name){t.next=5;break}return l[c].addEventListener("click",(function(t){"function"==typeof p[e.value]&&p[e.value]({name:r[0].getElementsByClassName("input")[0].value,url:r[1].getElementsByClassName("input")[0].value},n)})),l[c].attributes.removeNamedItem(e.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),u.s();case 18:if((h=u.n()).done){t.next=24;break}return t.delegateYield(d(),"t0",20);case 20:if(!t.t0){t.next=22;break}return t.abrupt("break",24);case 22:t.next=18;break;case 24:t.next=29;break;case 26:t.prev=26,t.t1=t.catch(15),u.e(t.t1);case 29:return t.prev=29,u.f(),t.finish(29);case 32:c++,t.next=11;break;case 35:return t.abrupt("return",1);case 36:case"end":return t.stop()}}),t,null,[[15,26,29,32]])})),l=0;case 8:if(!(l<s.length)){t.next=15;break}return t.delegateYield(r(l),"t0",10);case 10:if(!t.t0){t.next=12;break}return t.abrupt("break",15);case 12:l++,t.next=8;break;case 15:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)}),linkDelete:function(t){e.options.attribute.link.content.splice(t,1),e.attributeLink=e.options.attribute.link.content},confirmEdit:function(t,i){var n=t.name&&t.name.replace(/\s/g,""),o=t.url&&t.url.replace(/\s/g,"");n&&o?e.options.attribute.link.content[i]=t:window.ELEMENT&&window.ELEMENT.Message({message:"名称或链接不能为空!",type:"warning",duration:1500}),e.attributeLink=e.options.attribute.link.content},cancelEdit:function(){e.attributeLink=e.options.attribute.link.content},fileSelect:function(t,e){var i=u[e].getElementsByClassName("file-select")[0];i.click(),i.removeEventListener("change",h),i.addEventListener("change",h)}},h=function(t){t.target.value&&(u[t.target.getAttribute("index")].getElementsByClassName("td")[1].getElementsByClassName("input")[0].value=t.target.value,t.target.value=null)},d=function(t){for(var e=u[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=xy(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof p[o.value]&&p[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<u.length;m++)d(m)}}},{key:"init",value:function(){var t=this,i=this.replaceHost(this.options.url,this.options.host);be(this.sdk,this.options.id),this.hierarchys=[],this.originalOptions=this.deepCopyObj(this.options);var n=[];(new SVGLoader).load(i,(function(i){if(t.sdk&&t.sdk.viewer&&t.sdk.viewer.entities){i.xml.style.width="0",i.xml.style.height="0",document.body.appendChild(i.xml);var o,s=xy(i.paths);try{for(s.s();!(o=s.n()).done;){var a=o.value,r=a.userData.style.fill,l=window.getComputedStyle(a.userData.node);if(l.strokeWidth&&(a.userData.style.strokeWidth=Number(l.strokeWidth.replace(/[a-zA-Z]/g,""))),void 0!==r&&"none"!==r){var c,u=xy(SVGLoader.createShapes(a));try{for(u.s();!(c=u.n()).done;){var p=c.value,h=new THREE.ShapeGeometry(p),d=new THREE.Mesh(h);n.push({geometry:d.geometry,color:r})}}catch(t){u.e(t)}finally{u.f()}}var m=a.userData.style.stroke;if(void 0!==m&&"none"!==m){var f,v=xy(a.subPaths);try{for(v.s();!(f=v.n()).done;){var g=f.value,y=SVGLoader.pointsToStroke(g.getPoints(),a.userData.style);if(y){var b=new THREE.Mesh(y);n.push({geometry:b.geometry,color:m})}}}catch(t){v.e(t)}finally{v.f()}}}}catch(t){s.e(t)}finally{s.f()}document.body.removeChild(i.xml);for(var C,w=0,k=0,x=0;x<n.length;x++){var _=n[x].geometry;if(_&&_.attributes&&_.attributes.position)for(var E=_.attributes.position.array,S=0;S<E.length;S++)w>E[S]&&(w=E[S]),k<E[S]&&(k=E[S])}(w=Math.abs(w))>(k=Math.abs(k))&&(k=w);var D=k,M=4e3/(k=k*(10/3)*100)/5;D*=M;for(var P=0;P<n.length;P++)n[P].geometry.scale(M,M,1),n[P].geometry.rotateX(THREE.MathUtils.degToRad(180));t._worker.postMessage({code:"\n let geometryArray = e.data.options.geometryArray\n let max2 = e.data.options.max2\n for (let key = 0; key < geometryArray.length; key++) {\n let feature\n let positions = []\n let position = []\n let geometry = geometryArray[key].geometry;\n let array = geometry.attributes.position.array\n \n for (let i = 0; i < array.length; i += 3) {\n let x = array[i] - (max2 / 2)\n let y = array[i + 1] + (max2 / 2)\n position.push([x, y, array[i + 1]])\n }\n if (geometry.index && geometry.index.array) {\n let index = geometry.index.array\n for (let i = 0; i < index.length; i += 3) {\n positions.push([position[index[i]], position[index[i + 1]], position[index[i + 2]]])\n }\n }\n else {\n for (let i = 0; i < position.length; i += 3) {\n positions.push([position[i], position[i + 1], position[i + 2]])\n }\n }\n \n \n let polygons = []\n // 组合多边形\n for (let i = 0; i < positions.length; i++) {\n let polygon = turf.polygon([[\n ...positions[i],\n positions[i][0]\n ]]);\n polygons.push(polygon)\n \n if (feature) {\n feature = turf.union(feature, polygon);\n }\n else {\n feature = polygon\n }\n }\n feature.properties.color = geometryArray[key].color\n features.push(feature)\n }\n ",options:{geometryArray:n,max2:D}}),t._worker.onmessage=function(i){if(t.sdk&&t.sdk.viewer&&t.sdk.viewer.entities){var n=i.data;C=turf.featureCollection(n),t.geojson=JSON.parse(JSON.stringify(C));var o=turf.bbox(C),s=Math.abs(o[2]-o[0]),a=Math.abs(o[3]-o[1]),r=turf.square(o);r[0]=r[0]+t.options.position.lng-s/5,r[1]=r[1]+t.options.position.lat-a/5,r[2]=r[2]+t.options.position.lng+s/5,r[3]=r[3]+t.options.position.lat+a/5,t.bbox=r,t.geojson.features.forEach((function(e){var i=[],n=JSON.parse(JSON.stringify(e));if(n.properties.directionDistance=[],"MultiPolygon"===n.geometry.type)for(var o=0;o<n.geometry.coordinates.length;o++){for(var s=[],a=0;a<n.geometry.coordinates[o].length;a++){for(var r=[],l=0;l<n.geometry.coordinates[o][a].length;l++){var c=turf.point([0,n.geometry.coordinates[o][a][l][1]]),u=turf.point(L()(n.geometry.coordinates[o][a][l])),p=turf.distance(c,u,{units:"kilometers"}),h=turf.rhumbBearing(c,u);r.push({origin:n.geometry.coordinates[o][a][l],distance:p,angle:h})}s.push(r)}n.properties.directionDistance.push(s)}else for(var d=0;d<n.geometry.coordinates.length;d++){for(var m=[],f=0;f<n.geometry.coordinates[d].length;f++){var v=turf.point([0,n.geometry.coordinates[d][f][1]]),g=turf.point(L()(n.geometry.coordinates[d][f])),y=turf.distance(v,g,{units:"kilometers"}),b=turf.rhumbBearing(v,g);m.push({origin:n.geometry.coordinates[d][f],distance:y,angle:b})}n.properties.directionDistance.push(m)}if("MultiPolygon"===n.geometry.type)for(var C=0;C<n.geometry.coordinates.length;C++){var w=t.getHierarchyPolygon(n,C);i.push(w)}else{var k=t.getHierarchyPolygon(n);i.push(k)}t.hierarchys.push(i)})),t.entity=new Cesium.EntityCollection,re(t.sdk,t.options.id);var l=!1;"cesium-viewer 2d"===t.sdk.viewer._element.className&&(l=!0);for(var c=function(e){for(var i=function(i){var n=t.options.id+"-".concat(e,"_").concat(i,"}"),o=t.sdk.viewer.entities.getById(n);o&&t.sdk.viewer.entities.remove(o);var s=t.sdk.viewer.entities.add({id:t.options.id+"-".concat(e,"_").concat(i,"}"),show:t.options.show,polygon:{hierarchy:new Cesium.CallbackProperty((function(){for(var n=t.hierarchys[e][i],o=[],s=0;s<n.holes.length;s++)o.push({positions:n.holes[s]});return{positions:n.positions,holes:o}}),!0),perPositionHeight:l,zIndex:t.sdk._entityZIndex,material:new Cesium.CustomColorMaterialSource({color:t.options.color||t.geojson.features[e].properties.color})},properties:{id:t.options.id}});t.sdk._entityZIndex++,t.geojson.features[e].properties.color&&(s.properties={id:t.options.id,color:t.geojson.features[e].properties.color}),t._entityArray.push(s),t.entity.add(s)},n=0;n<t.hierarchys[e].length;n++)i(n)},u=0;u<t.hierarchys.length;u++)c(u);t.loaded=!0,My(Ty,t,!0),Dy(Oy,t)&&Dy(Oy,t).call(t),t.scale=t.scale,e.createText(t)}}}}))}},{key:"edit",value:(s=o()(a.a.mark((function t(e){var i,n,s,r,l,c,u,p,h,d,m=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Dy(Ty,this)){t.next=2;break}return t.abrupt("return");case 2:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=42;break}return t.next=7,new Ki(this.sdk,this.originalOptions,{title:"军标属性",left:"180px",top:"100px",confirmCallBack:function(t){m.name=m.name.trim(),m.name||(m.name="未命名对象"),m.text&&(m.options.text.position={lng:m.text.position[0],lat:m.text.position[1],alt:m.text.position[2]}),m.originalOptions=m.deepCopyObj(m.options),m._DialogObject.close();var e=m.deepCopyObj(m.options);e.host="",m.Dialog.confirmCallBack&&m.Dialog.confirmCallBack(e),be(m.sdk,m.options.id),re(m.sdk,m.options.id)},resetCallBack:function(){m.reset(),m.Dialog.resetCallBack&&m.Dialog.resetCallBack()},removeCallBack:function(){m.Dialog.removeCallBack&&m.Dialog.removeCallBack()},closeCallBack:function(){m._DialogObject=null,m.drag(!1),m.reset(),m.Dialog.closeCallBack&&m.Dialog.closeCallBack()},showCallBack:function(t){m.show=t,m.Dialog.showCallBack&&m.Dialog.showCallBack()},addFootElm:[{tagName:"button",className:"flipe-over-y",innerHTML:"Y轴翻转",event:["click",function(){m.flipeY=!m.flipeY}]},{tagName:"button",className:"flipe-over-x",innerHTML:"X轴翻转",event:["click",function(){m.flipeX=!m.flipeX}]},{tagName:"button",className:"drag",innerHTML:"编辑",event:["click",function(){m.drag(!m._isdrag)}]}]},!0);case 7:return this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" ground-svg",(i=document.createElement("div")).innerHTML=nd(this),t.next=13,this._DialogObject.contentAppChild(i);case 13:this.attributeType=this.options.attributeType,n=new YJColorPicker({el:i.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color||void 0,disabled:!1,openPickerAni:"opacity",sure:function(t){m.color=t},clear:function(){m.color=""}}),s=new YJColorPicker({el:i.getElementsByClassName("textColor")[0],size:"mini",alpha:!0,defaultColor:this.textColor,disabled:!1,openPickerAni:"opacity",sure:function(t){m.textColor=t},clear:function(){m.textColor="rgba(255,255,255,1)"}}),r=i.getElementsByTagName("*"),this._EventBinding.on(this,r),this._elms=this._EventBinding.element,this._elms.color=[n],this._elms.textColor=[s],setTimeout(o()(a.a.mark((function t(){var e,n,o,s,r,l;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(m.sdk&&m.sdk.tabHide&&Array.isArray(m.sdk.tabHide))){t.next=9;break}e=0;case 2:if(!(e<m.sdk.tabHide.length)){t.next=9;break}if("属性信息"!==m.sdk.tabHide[e]){t.next=6;break}return i.getElementsByClassName("attribute-info")[0].style.display="none",t.abrupt("break",9);case 6:e++,t.next=2;break;case 9:if(m.attributeLink=m.options.attribute.link.content,n=m.attributeSelect,!(o=m._DialogObject._element.content.getElementsByClassName("attribute-select-box")[0])){t.next=26;break}(s=Y(o,".attribute-select")).legp_search(n),r=m._DialogObject._element.content.getElementsByClassName("attribute-select")[0].getElementsByTagName("input")[0],l=0;case 17:if(!(l<n.length)){t.next=25;break}if(n[l].key!==m.options.attributeType){t.next=22;break}return r.value=n[l].value,s.legp_searchActive(n[l].value),t.abrupt("break",25);case 22:l++,t.next=17;break;case 25:r.addEventListener("input",(function(){for(var t=0;t<n.length;t++)if(n[t].value===r.value){m.attributeType=n[t].key;break}}));case 26:case"end":return t.stop()}}),t)}))),0),l=i.getElementsByClassName("x-scale")[0],c=i.getElementsByClassName("y-scale")[0],u=l.getElementsByTagName("input")[0],p=l.getElementsByTagName("input")[1],h=c.getElementsByTagName("input")[0],d=c.getElementsByTagName("input")[1],u.value=this.scale.x,p.value=this.scale.x,h.value=this.scale.y,d.value=this.scale.y,this._elms.xRange=u,this._elms.yRange=h,this._elms.xInput=p,this._elms.yInput=d,u.addEventListener("input",(function(t){m.scale={x:u.value,y:m.scale.y}})),h.addEventListener("input",(function(t){m.scale={x:m.scale.x,y:h.value}})),p.addEventListener("input",(function(t){var e=t.target.value;e=Number(e),"."==t.data||"-"==t.data&&!t.target.value||(!t.target.max&&!t.target.min||e<=Number(t.target.max)&&e>=Number(t.target.min))&&(m.scale={x:e,y:m.scale.y})})),p.addEventListener("blur",(function(t){var e=t.target.value;e=Number(e),t.target.max&&e>Number(t.target.max)&&(e=Number(t.target.max)),t.target.min&&e<Number(t.target.min)&&(e=Number(t.target.min)),m.scale={x:e,y:m.scale.y}})),d.addEventListener("input",(function(t){var e=t.target.value;e=Number(e),"."==t.data||"-"==t.data&&!t.target.value||(!t.target.max&&!t.target.min||e<=Number(t.target.max)&&e>=Number(t.target.min))&&(m.scale={x:m.scale.x,y:e})})),d.addEventListener("blur",(function(t){var e=t.target.value;e=Number(e),t.target.max&&e>Number(t.target.max)&&(e=Number(t.target.max)),t.target.min&&e<Number(t.target.min)&&(e=Number(t.target.min)),m.scale={x:m.scale.x,y:e}}));case 42:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"reset",value:function(){Dy(Ty,this)&&(this.options=this.deepCopyObj(this.originalOptions),this.position=this.originalOptions.position,this.name=this.originalOptions.name,this.angle=this.originalOptions.angle,this.scale=this.originalOptions.scale,this.color=this.originalOptions.color,this.text&&!this.originalOptions.text.position&&(this.text.remove(),this.text=null),this.attributeLink=this.options.attribute.link.content,this.textShow=this.originalOptions.text.show,this.textValue=this.originalOptions.text.value,this.textColor=this.originalOptions.text.color,this.textFontSize=this.originalOptions.text.fontSize,this.textScaleByDistance=this.originalOptions.text.scaleByDistance,this.textNear=this.originalOptions.text.near,this.textFar=this.originalOptions.text.far)}},{key:"drag",value:function(t,e){var i=this;if(Dy(Ty,this))if(this.ismove=!1,this._isdrag=t,this.ScreenSpaceEventHandler&&(this.ScreenSpaceEventHandler.destroy(),this.ScreenSpaceEventHandler=null),t){this.ScreenSpaceEventHandler=new Cesium.ScreenSpaceEventHandler(this.sdk.viewer.canvas);var n=Math.abs(this.bbox[0]-this.bbox[2]),s=Math.abs(this.bbox[1]-this.bbox[3]);this.ScreenSpaceEventHandler.setInputAction(function(){var t=o()(a.a.mark((function t(e){var o,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D,M,P,O,T,N,B,L,A,j,I,F,R,z;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!i.pickPoint){t.next=110;break}if(o=i.pickPoint.position.getValue(),(r=i.sdk.viewer.scene.pickPosition(e.endPosition))||(l=i.sdk.viewer.camera.getPickRay(e.endPosition),r=i.sdk.viewer.scene.globe.pick(l,i.sdk.viewer.scene)),o&&r){t.next=6;break}return t.abrupt("return");case 6:c=i.cartesian3Towgs84(o,i.sdk.viewer),u=i.cartesian3Towgs84(r,i.sdk.viewer),p=0,h=0,f=3.5*i.scale.x,v=3.5*i.scale.y,g=Math.sqrt(Math.pow(f/2,2)+Math.pow(v/2,2)),y=Math.atan(f/2/(v/2))*(180/Math.PI),isNaN(y)&&(y=0),w=turf.point([i.position.lng,i.position.lat]),k={units:"kilometers"},(x=[])[0]=turf.destination(w,v/2*1.5,0+i.options.angle,k).geometry.coordinates,x[1]=turf.destination(w,g,180+y+i.options.angle,k).geometry.coordinates,x[2]=turf.destination(w,v/2,180+i.options.angle,k).geometry.coordinates,x[3]=turf.destination(w,g,180-y+i.options.angle,k).geometry.coordinates,x[4]=turf.destination(w,f/2,270+i.options.angle,k).geometry.coordinates,x[5]=[i.position.lng,i.position.lat],x[6]=turf.destination(w,f/2,90+i.options.angle,k).geometry.coordinates,x[7]=turf.destination(w,g,360-y+i.options.angle,k).geometry.coordinates,x[8]=turf.destination(w,v/2,0+i.options.angle,k).geometry.coordinates,x[9]=turf.destination(w,g,0+y+i.options.angle,k).geometry.coordinates,_=turf.point([c.lng,c.lat]),E=turf.point([u.lng,u.lat]),S=turf.point([i.position.lng,i.position.lat]),D=turf.rhumbBearing(S,_),M=turf.rhumbBearing(S,E),P=(M+360-i.angle)%360,N=turf.rhumbDistance(S,E,k),t.t0=i.pickPoint.id,t.next="svg-control-points_0"===t.t0?38:"svg-control-points_1"===t.t0||"svg-control-points_7"===t.t0?41:"svg-control-points_2"===t.t0||"svg-control-points_8"===t.t0?54:"svg-control-points_3"===t.t0||"svg-control-points_9"===t.t0?61:"svg-control-points_4"===t.t0?74:"svg-control-points_5"===t.t0?81:"svg-control-points_6"===t.t0?91:98;break;case 38:return y=M-D,i.angle+=y,t.abrupt("break",98);case 41:return T=(turf.rhumbBearing(S,turf.point(x[4]))+360-i.angle)%360,O=(turf.rhumbBearing(S,turf.point(x[2]))+360-i.angle)%360,((b=P-T)>-360&&b<-90||b<360&&b>90)&&(b+=180),((C=P-O)>-360&&C<-90||C<360&&C>90)&&(C+=180),d=Math.PI/180*b,m=Math.PI/180*C,f=Math.cos(d)*N*2,v=Math.cos(m)*N*2,i.scale.x=f/3.5,i.scale.y=v/3.5,t.abrupt("break",98);case 54:return O=(turf.rhumbBearing(S,turf.point(x[2]))+360-i.angle)%360,((C=P-O)>-360&&C<-90||C<360&&C>90)&&(C+=180),m=Math.PI/180*C,v=Math.cos(m)*N*2,i.scale.y=v/3.5,t.abrupt("break",98);case 61:return T=(turf.rhumbBearing(S,turf.point(x[6]))+360-i.angle)%360,O=(turf.rhumbBearing(S,turf.point(x[2]))+360-i.angle)%360,((b=P-T)>-360&&b<-90||b<360&&b>90)&&(b+=180),((C=P-O)>-360&&C<-90||C<360&&C>90)&&(C+=180),d=Math.PI/180*b,m=Math.PI/180*C,f=Math.cos(d)*N*2,v=Math.cos(m)*N*2,i.scale.x=f/3.5,i.scale.y=v/3.5,t.abrupt("break",98);case 74:return T=(turf.rhumbBearing(S,turf.point(x[4]))+360-i.angle)%360,((b=P-T)>-360&&b<-90||b<360&&b>90)&&(b+=180),d=Math.PI/180*b,f=Math.cos(d)*N*2,i.scale.x=f/3.5,t.abrupt("break",98);case 81:return u.lat>83.5&&(u.lat=83.5),u.lat<-83.5&&(u.lat=-83.5),i.position={lng:u.lng,lat:u.lat},B=u.lng-c.lng,L=u.lat-c.lat,i.bbox[0]=i.bbox[0]+B,i.bbox[1]=i.bbox[1]+L,i.bbox[2]=i.bbox[2]+B,i.bbox[3]=i.bbox[3]+L,t.abrupt("break",98);case 91:return T=(turf.rhumbBearing(S,turf.point(x[6]))+360-i.angle)%360,((b=P-T)>-360&&b<-90||b<360&&b>90)&&(b+=180),d=Math.PI/180*b,f=Math.cos(d)*N*2,i.scale.x=f/3.5,t.abrupt("break",98);case 98:p=p/(n/2)*100,h=h/(s/2)*100,(A=ky({},i.scale)).x=A.x+p,A.y=A.y-h,A.y>200&&(A.y=200),A.y<.001&&(A.y=.001),A.x>200&&(A.x=200),A.x<.001&&(A.x=.001),i.scale=ky({},A),t.next=137;break;case 110:j=i.sdk.viewer.scene.drillPick(e.endPosition),F=0;case 112:if(!(F<j.length)){t.next=120;break}if(!((R=j[F])&&R.primitive&&R.primitive._id&&R.primitive._id.id&&-1!==R.primitive._id.id.indexOf("svg-control-points_"))){t.next=117;break}return I=R.primitive._id,t.abrupt("break",120);case 117:F++,t.next=112;break;case 120:z=0;case 121:if(!(z<i.pointEntityCollection.values.length)){t.next=137;break}if(!I||i.pointEntityCollection.values[z].id!==I.id){t.next=126;break}I.point.color=Cesium.Color.fromCssColorString("#ffff00"),t.next=134;break;case 126:t.t1=i.pointEntityCollection.values[z].id,t.next="svg-control-points_5"===t.t1?129:"svg-control-points_0"===t.t1?131:133;break;case 129:return i.pointEntityCollection.values[z].point.color=Cesium.Color.fromCssColorString("#ffff00"),t.abrupt("break",134);case 131:return i.pointEntityCollection.values[z].point.color=Cesium.Color.fromCssColorString("#ff0000"),t.abrupt("break",134);case 133:i.pointEntityCollection.values[z].point.color=Cesium.Color.fromCssColorString("#00ff0a");case 134:z++,t.next=121;break;case 137:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.ScreenSpaceEventHandler.setInputAction((function(t){for(var e=i.sdk.viewer.scene.drillPick(t.position),n=0;n<e.length;n++){var o=e[n];if(o&&o.primitive&&o.primitive._id&&o.primitive._id.objectId===i.options.id&&o.primitive._id.id&&-1!==o.primitive._id.id.indexOf("svg-control-points_")){YJ.Global.CameraController(i.sdk,!1),i.pickPoint=o.primitive._id,i.pickPoint.point.color=Cesium.Color.fromCssColorString("#ff0000");break}}}),Cesium.ScreenSpaceEventType.LEFT_DOWN),this.ScreenSpaceEventHandler.setInputAction((function(t){if(i.pickPoint){switch(YJ.Global.CameraController(i.sdk,!0),i.pickPoint.id){case"svg-control-points_4":i.pickPoint.point.color=Cesium.Color.fromCssColorString("#ffff00");break;case"svg-control-points_9":i.pickPoint.point.color=Cesium.Color.fromCssColorString("#ff0000");break;default:i.pickPoint.point.color=Cesium.Color.fromCssColorString("#00ff0a")}i.pickPoint=null}}),Cesium.ScreenSpaceEventType.LEFT_UP),this.ScreenSpaceEventHandler.setInputAction((function(t){i.drag(!1),i._DialogObject||(e&&e(i.options),be(i.sdk,i.options.id),re(i.sdk,i.options.id))}),Cesium.ScreenSpaceEventType.RIGHT_CLICK),this.pointEntityCollection=new Cesium.EntityCollection;var r=3.5*this.scale.x,l=3.5*this.scale.y,c=Math.sqrt(Math.pow(r/2,2)+Math.pow(l/2,2)),u=Math.atan(r/2/(l/2))*(180/Math.PI);isNaN(u)&&(u=0);var p=turf.point([this.position.lng,this.position.lat]),h={units:"kilometers"},d=[];d[0]=turf.destination(p,l/2*1.5,0,h).geometry.coordinates,d[1]=turf.destination(p,c,180+u,h).geometry.coordinates,d[2]=turf.destination(p,l/2,180,h).geometry.coordinates,d[3]=turf.destination(p,c,180-u,h).geometry.coordinates,d[4]=turf.destination(p,r/2,270,h).geometry.coordinates,d[5]=[this.position.lng,this.position.lat],d[6]=turf.destination(p,r/2,90,h).geometry.coordinates,d[7]=turf.destination(p,c,360-u,h).geometry.coordinates,d[8]=turf.destination(p,l/2,0,h).geometry.coordinates,d[9]=turf.destination(p,c,0+u,h).geometry.coordinates,this.controlPoints=d;for(var m=function(t){var e="#00ff0a";5===t&&(e="#ffff00"),0===t&&(e="#ff0000");var n=i.sdk.viewer.entities.getOrCreateEntity("svg-control-points_"+t);n.show=!0,n.objectId=i.options.id,n.position=new Cesium.CallbackProperty((function(){var e;return(e=Cesium.Cartesian3).fromDegrees.apply(e,L()(i.controlPoints[t]))})),n.point=new Cesium.PointGraphics({color:Cesium.Color.fromCssColorString(e),pixelSize:10,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,scaleByDistance:new Cesium.NearFarScalar(0,1,1e10,1),disableDepthTestDistance:Number.POSITIVE_INFINITY}),i.pointEntityCollection.add(n)},f=0;f<this.controlPoints.length;f++)m(f);this._update()}else for(var v=0;v<this.controlPoints.length;v++){var g=this.sdk.viewer.entities.getById("svg-control-points_"+v);g&&g.objectId===this.options.id&&(g.show=!1)}}},{key:"getHierarchyPolygon",value:function(t,e){if(t){var i={},n=[],o=t.properties.directionDistance;void 0!==e&&(o=t.properties.directionDistance[e]);for(var s=0;s<o.length;s++){for(var a=[],r=0;r<o[s].length;r++){var l,c=this.options.position.lng,u=o[s][r].origin[1]+this.options.position.lat;u>90&&(c+=180);var p=[c,u],h=turf.point(p),d=turf.rhumbDestination(h,o[s][r].distance,o[s][r].angle,{units:"kilometers"}),m=L()(d.geometry.coordinates);m[2]=10,a.push((l=Cesium.Cartesian3).fromDegrees.apply(l,L()(m)))}0===s?i.positions=a:n.push(a)}return i.holes=n,i}}},{key:"_updateGeojson",value:function(t,e,i){if(Dy(Ty,this)){var n=Math.abs(this.bbox[0]-this.bbox[2]),o=Math.abs(this.bbox[1]-this.bbox[3]);if("object"===N()(t[0]))for(var s=0;s<t.length;s++)this._updateGeojson(t[s],e,i);else{for(var a=0;a<t.length;a+=2)t[a]=t[a]+t[a]/(n/2)*e;for(var r=1;r<t.length;r+=2)t[r]=t[r]-t[r]/(o/2)*i}}}},{key:"_update",value:function(){var t=this;if(Dy(Ty,this)){var e,i=turf.point([this.position.lng,this.position.lat]),n={units:"kilometers"},o=L()(this.bbox),s=Math.abs(o[2]-o[0]),a=Math.abs(o[3]-o[1]),r=s/2*this.options.scale.x/100-s/2,l=a/2*-this.options.scale.y/100+a/2;o[0]=o[0]-r,o[1]=o[1]+l,o[2]=o[2]+r,o[3]=o[3]-l,o[0]>o[2]&&(e=o[0],o[0]=o[2],o[2]=e),o[1]>o[3]&&(e=o[1],o[1]=o[3],o[3]=e);for(var c=[],u=JSON.parse(JSON.stringify(this.geojson)),p=function(e){for(var i=0;i<e.length;i++)"number"==typeof e[i]?(t.options.flipe.x&&1===i&&(e[i]=-e[i]),t.options.flipe.y&&0===i&&(e[i]=-e[i])):p(e[i])},h=0;h<u.features.length;h++)p(u.features[h].geometry.coordinates);if(u.features.forEach((function(e){var o=[],s=JSON.parse(JSON.stringify(e));t._updateGeojson(s.geometry.coordinates,r,l);var a=[];if("MultiPolygon"===(s=turf.transformRotate(s,t.angle,{pivot:[0,0]})).geometry.type)for(var u=0;u<s.geometry.coordinates.length;u++){for(var p=[],h=0;h<s.geometry.coordinates[u].length;h++){for(var d=[],m=0;m<s.geometry.coordinates[u][h].length;m++){var f=turf.point([0,s.geometry.coordinates[u][h][m][1]]),v=turf.point(L()(s.geometry.coordinates[u][h][m])),g=turf.distance(f,v,{units:"kilometers"}),y=turf.rhumbBearing(f,v);d.push({origin:s.geometry.coordinates[u][h][m],distance:g,angle:y})}p.push(d)}a.push(p)}else for(var b=0;b<s.geometry.coordinates.length;b++){for(var C=[],w=0;w<s.geometry.coordinates[b].length;w++){var k=turf.point([0,s.geometry.coordinates[b][w][1]]),x=turf.point(L()(s.geometry.coordinates[b][w])),_=turf.distance(k,x,{units:"kilometers"}),E=turf.rhumbBearing(k,x);C.push({origin:s.geometry.coordinates[b][w],distance:_,angle:E})}a.push(C)}s.properties.directionDistance=a;var S=3.5*t.scale.x,D=3.5*t.scale.y,M=Math.sqrt(Math.pow(S/2,2)+Math.pow(D/2,2)),P=Math.atan(S/2/(D/2))*(180/Math.PI);isNaN(P)&&(P=0);var O=[];O[0]=turf.destination(i,D/2*1.5,0+t.options.angle,n).geometry.coordinates,O[1]=turf.destination(i,M,180+P+t.options.angle,n).geometry.coordinates,O[2]=turf.destination(i,D/2,180+t.options.angle,n).geometry.coordinates,O[3]=turf.destination(i,M,180-P+t.options.angle,n).geometry.coordinates,O[4]=turf.destination(i,S/2,270+t.options.angle,n).geometry.coordinates,O[5]=[t.position.lng,t.position.lat],O[6]=turf.destination(i,S/2,90+t.options.angle,n).geometry.coordinates,O[7]=turf.destination(i,M,360-P+t.options.angle,n).geometry.coordinates,O[8]=turf.destination(i,D/2,0+t.options.angle,n).geometry.coordinates,O[9]=turf.destination(i,M,0+P+t.options.angle,n).geometry.coordinates;var T=turf.points(O);O=[];for(var N=0;N<T.features.length;N++)O.push(T.features[N].geometry.coordinates);if(t.controlPoints=O,"MultiPolygon"===s.geometry.type)for(var B=0;B<s.geometry.coordinates.length;B++){var A=t.getHierarchyPolygon(s,B);o.push(A)}else{var j=t.getHierarchyPolygon(s);o.push(j)}c.push(o)})),this.hierarchys=[].concat(c),this.entity){if(this._DialogObject||this._isdrag)for(var d=0,m=function(e){for(var i=function(i){t.entity.values[d].polygon.hierarchy.isConstant&&(t.entity.values[d].polygon.hierarchy=new Cesium.CallbackProperty((function(){for(var n=t.hierarchys[e][i],o=[],s=0;s<n.holes.length;s++)o.push({positions:n.holes[s]});return{positions:n.positions,holes:o}}),!1)),d++},n=0;n<t.hierarchys[e].length;n++)i(n)},f=0;f<this.hierarchys.length;f++)m(f);else for(var v=0,g=function(e){for(var i=function(i){t.entity.values[v].polygon.hierarchy=new Cesium.CallbackProperty((function(){for(var n=t.hierarchys[e][i],o=[],s=0;s<n.holes.length;s++)o.push({positions:n.holes[s]});return{positions:n.positions,holes:o}}),!t.ismove),v++},n=0;n<t.hierarchys[e].length;n++)i(n)},y=0;y<this.hierarchys.length;y++)g(y);if(this.textObject&&this.textObject.geojson){for(var b=[],C=JSON.parse(JSON.stringify(this.textObject.geojson)),w=0;w<C.features.length;w++)p(C.features[w].geometry.coordinates);C.features.forEach((function(e){var o=[],s=JSON.parse(JSON.stringify(e));t._updateGeojson(s.geometry.coordinates,r,l);var a=[];if("MultiPolygon"===(s=turf.transformRotate(s,t.angle,{pivot:[0,0]})).geometry.type)for(var c=0;c<s.geometry.coordinates.length;c++){for(var u=[],p=0;p<s.geometry.coordinates[c].length;p++){for(var h=[],d=0;d<s.geometry.coordinates[c][p].length;d++){var m=turf.point([0,s.geometry.coordinates[c][p][d][1]]),f=turf.point(L()(s.geometry.coordinates[c][p][d])),v=turf.distance(m,f,{units:"kilometers"}),g=turf.rhumbBearing(m,f);h.push({origin:s.geometry.coordinates[c][p][d],distance:v,angle:g})}u.push(h)}a.push(u)}else for(var y=0;y<s.geometry.coordinates.length;y++){for(var C=[],w=0;w<s.geometry.coordinates[y].length;w++){var k=turf.point([0,s.geometry.coordinates[y][w][1]]),x=turf.point(L()(s.geometry.coordinates[y][w])),_=turf.distance(k,x,{units:"kilometers"}),E=turf.rhumbBearing(k,x);C.push({origin:s.geometry.coordinates[y][w],distance:_,angle:E})}a.push(C)}s.properties.directionDistance=a;var S=3.5*t.scale.x,D=3.5*t.scale.y,M=Math.sqrt(Math.pow(S/2,2)+Math.pow(D/2,2)),P=Math.atan(S/2/(D/2))*(180/Math.PI);isNaN(P)&&(P=0);var O=[];O[0]=turf.destination(i,D/2*1.5,0+t.options.angle,n).geometry.coordinates,O[1]=turf.destination(i,M,180+P+t.options.angle,n).geometry.coordinates,O[2]=turf.destination(i,D/2,180+t.options.angle,n).geometry.coordinates,O[3]=turf.destination(i,M,180-P+t.options.angle,n).geometry.coordinates,O[4]=turf.destination(i,S/2,270+t.options.angle,n).geometry.coordinates,O[5]=[t.position.lng,t.position.lat],O[6]=turf.destination(i,S/2,90+t.options.angle,n).geometry.coordinates,O[7]=turf.destination(i,M,360-P+t.options.angle,n).geometry.coordinates,O[8]=turf.destination(i,D/2,0+t.options.angle,n).geometry.coordinates,O[9]=turf.destination(i,M,0+P+t.options.angle,n).geometry.coordinates;var T=turf.points(O);O=[];for(var N=0;N<T.features.length;N++)O.push(T.features[N].geometry.coordinates);if(t.controlPoints=O,"MultiPolygon"===s.geometry.type)for(var B=0;B<s.geometry.coordinates.length;B++){var A=t.getHierarchyPolygon(s,B);o.push(A)}else{var j=t.getHierarchyPolygon(s);o.push(j)}b.push(o)})),this.textObject.hierarchys=[].concat(b)}}}}},{key:"textPosPick",value:function(){var t=this;new Ar(this.sdk).start(function(){var i=o()(a.a.mark((function i(n,o){var s,r,l,c;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:s=turf.point([t.position.lng,t.position.lat]),r=turf.point([o.lng,o.lat]),l=turf.distance(s,r,{units:"kilometers"}),c=turf.rhumbBearing(s,r),t._textToCenter={distance:l,angle:c},t.options.text.position=o,t.text?t.text.position=[o.lng,o.lat,o.alt]:e.createText(t);case 7:case"end":return i.stop()}}),i)})));return function(t,e){return i.apply(this,arguments)}}())}},{key:"load",value:function(t){Dy(Ty,this)?t():My(Oy,this,t)}},{key:"remove",value:(n=o()(a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._worker.onmessage=function(t){},t.next=3,this.sdk.removeIncetance(this.options.id);case 3:if(this.entity){t.next=5;break}return t.abrupt("return");case 5:for(this.drag(!1),this.sdk.viewer.entities.remove(this.entity),this.text&&this.text.remove(),e=this.entity.values.length;e>=0;e--)this.sdk.viewer.entities.remove(this.entity.values[e]);return this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=12,be(this.sdk,this.options.id);case 12:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"_addLink",value:function(){this._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(this.options.attribute.link.content.push({name:"链接",url:this._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),this._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",this.attributeLink=this.options.attribute.link.content):this.Dialog.clickAddLink&&this.Dialog.clickAddLink()}},{key:"addAttributeLink",value:function(t){this.options.attribute.link.content.push({name:"链接",url:t}),this.attributeLink=this.options.attribute.link.content}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.name,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}},{key:"setPosition",value:function(t){if(t){this.ismove=!0;var e={};e.lng=t.position.lng,e.lat=t.position.lat,this.position=e}else this.ismove=!1;this._update()}}],[{key:"createText",value:(i=o()(a.a.mark((function t(e){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.options.text.position){t.next=10;break}if(!e.options.text.position.alt){t.next=5;break}i=e.options.text.position.alt,t.next=8;break;case 5:return t.next=7,e.getClampToHeight({lng:e.options.text.position.lng,lat:e.options.text.position.lat});case 7:i=t.sent;case 8:e.text=new Jn(e.sdk,C()(C()(C()(C()(C()({id:e.options.id,show:!!e.options.show&&!!e.options.text.show&&e.options.text.show,position:[e.options.text.position.lng,e.options.text.position.lat,i],text:e.options.text.value,fontSize:e.options.text.fontSize,color:e.options.text.color,pixelOffset:e.options.text.pixelOffset,backgroundColor:e.options.text.backgroundColor,lineColor:e.options.text.lineColor,lineWidth:e.options.text.lineWidth},"pixelOffset",0),"scaleByDistance",e.options.text.scaleByDistance),"backgroundColor",["#ffffff00","#ffffff00"]),"near",e.options.text.near),"far",e.options.text.far)),e.text.entity.billboard.verticalOrigin=Cesium.VerticalOrigin.CENTER;case 10:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})}]);var i,n,s}(jn);function By(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ly(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ly(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Ly(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Ay(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var jy,Iy=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),i=Ay(this,e,[t,n]),YJ.RoutePlanningArrays.push(i),i.options.width=n.width||4,i.options.color=n.color||"#ff0000",i.options.gps=n.gps||!1,i.Dialog=o,i._elms={},i.start={lng:null,lat:null},i.end={lng:null,lat:null},i.init(),i}return Xi()(e,t),_()(e,[{key:"init",value:function(){var t=this;this.startEntity=this.sdk.viewer.entities.getOrCreateEntity("YJ-route-planning-start"),!this.start||!this.start.lng&&0!==this.start.lng||!this.start.lat&&0!==this.start.lat?this.startEntity.show=!1:this.startEntity.show=!0,this.startEntity.position=new Cesium.CallbackProperty((function(){return t.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(t.startLng,t.startLat))}),!1),this.startEntity.billboard={image:this.getSourceRootPath()+"/img/start.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32},this.endEntity=this.sdk.viewer.entities.getOrCreateEntity("YJ-route-planning-end"),!this.end||!this.end.lng&&0!==this.end.lng||!this.end.lat&&0!==this.end.lat?this.endEntity.show=!1:this.endEntity.show=!0,this.endEntity.position=new Cesium.CallbackProperty((function(){return t.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(t.endLng,t.endLat))}),!1),this.endEntity.billboard={image:this.getSourceRootPath()+"/img/end.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32},this.edit(!0),this.clear()}},{key:"startLng",get:function(){return this.start.lng},set:function(t){this.start.lng=t,!this.start||!this.start.lng&&0!==this.start.lng||!this.start.lat&&0!==this.start.lat?this.startEntity&&(this.startEntity.show=!1):this.startEntity&&(this.startEntity.show=!0),this._elms.startLng&&this._elms.startLng.forEach((function(e){e.value=t}))}},{key:"startLat",get:function(){return this.start.lat},set:function(t){this.start.lat=t,!this.start||!this.start.lng&&0!==this.start.lng||!this.start.lat&&0!==this.start.lat?this.startEntity&&(this.startEntity.show=!1):this.startEntity&&(this.startEntity.show=!0),this._elms.startLat&&this._elms.startLat.forEach((function(e){e.value=t}))}},{key:"endLng",get:function(){return this.end.lng},set:function(t){this.end.lng=t,!this.end||!this.end.lng&&0!==this.end.lng||!this.end.lat&&0!==this.end.lat?this.endEntity&&(this.endEntity.show=!1):this.endEntity&&(this.endEntity.show=!0),this._elms.endLng&&this._elms.endLng.forEach((function(e){e.value=t}))}},{key:"endLat",get:function(){return this.end.lat},set:function(t){this.end.lat=t,!this.end||!this.end.lng&&0!==this.end.lng||!this.end.lat&&0!==this.end.lat?this.endEntity&&(this.endEntity.show=!1):this.endEntity&&(this.endEntity.show=!0),this._elms.endLat&&this._elms.endLat.forEach((function(e){e.value=t}))}},{key:"edit",value:(i=o()(a.a.mark((function t(i){var n,o,s,r,l,c,u=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._element_style=null,this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=42;break}return this._element_style=document.createElement("style"),this._element_style.type="text/css",this._element_style.setAttribute("data-name","YJ_style_dialog"),this._element_style.innerHTML="\n .YJ-custom-base-dialog>.content {\n width: 460px;\n }\n .YJ-custom-base-dialog>.content>div>.row .col {\n margin: 0 10px;\n }\n .YJ-custom-base-dialog>.content .row .label {\n flex: auto;\n }\n",t.next=11,new W(this.sdk.viewer._container,{title:"路径规划",closeCallBack:function(){u.tip&&u.tip.destroy(),u.event&&u.event.destroy(),u.Dialog.closeCallBack&&u.Dialog.closeCallBack()}});case 11:return this._DialogObject=t.sent,t.next=14,this._DialogObject.init();case 14:(n=document.createElement("div")).style.position="absolute",n.style.left="24px",n.style.flet="0",n.style.display="flex",this._DialogObject.footAppChild(n),(o=document.createElement("button")).className="default",o.innerHTML='<svg class="icon-query"><use xlink:href="#yj-icon-query"></use></svg>查询',o.style.width="auto",o.addEventListener("click",(function(){!u.startLng&&0!==u.startLng||!u.startLat&&0!==u.startLat||!u.endLng&&0!==u.endLng||!u.endLat&&0!==u.endLat?console.error("请先设置起点和终点坐标!"):(!u.startEntity&&(u.startEntity=u.viewer.entities.add(new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return u.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(u.startLng,u.startLat))}),!1),billboard:{image:u.getSourceRootPath()+"/img/start.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32}}))),u.startEntity.show=!0,!u.endEntity&&(u.endEntity=u.viewer.entities.add(new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return u.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(u.endLng,u.endLat))}),!1),billboard:{image:u.getSourceRootPath()+"/img/end.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32}}))),u.endEntity.show=!0,u.Dialog.queryCallBack&&u.Dialog.queryCallBack({start:[u.startLng,u.startLat],end:[u.endLng,u.endLat]}))})),n.appendChild(o),(s=document.createElement("button")).className="default",s.innerHTML='<svg class="icon-route"><use xlink:href="#yj-icon-route"></use></svg>清除路线',s.style.width="auto",s.style.marginLeft="10px",s.addEventListener("click",(function(){u.clear()})),n.appendChild(s),document.getElementsByTagName("head")[0].appendChild(this._element_style),(r=document.createElement("div")).innerHTML='\n <div class="row" style="align-items: flex-start;">\n <div class="col start-col">\n <span class="label">起点</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="startLng">\n <input class="input" type="number" title="" min="-90" max="90" @model="startLat">\n <button @click="pickStartPos" style="margin-left: 10px;">拾取</button>\n </div>\n </div>\n <div class="row" style="align-items: flex-start;">\n <div class="col">\n <span class="label">终点</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="endLng">\n <input class="input" type="number" title="" min="-90" max="90" @model="endLat">\n <button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px;">拾取</button>\n </div>\n </div>\n ',this._DialogObject.contentAppChild(r),this.options.gps&&((l=document.createElement("button")).innerHTML="当前位置",l.style.marginLeft="10px",l.setAttribute("data-is","start"),l.addEventListener("click",(function(t){u.getLocateCurrent(t)})),r.getElementsByClassName("start-col")[0].appendChild(l),this._DialogObject._element.body.getElementsByClassName("end-pick-btn")[0].style.marginRight="91px"),c=r.getElementsByTagName("*"),e.EventBinding(this,c),t.next=44;break;case 42:this._element_style&&(document.getElementsByTagName("head")[0].removeChild(this._element_style),this._element_style=null),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 44:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"clear",value:function(){this.startEntity&&(this.sdk.viewer.entities.remove(this.startEntity),this.startEntity=null),this.endEntity&&(this.sdk.viewer.entities.remove(this.endEntity),this.endEntity=null),this.entity&&(this.sdk.viewer.entities.remove(this.entity),this.entity=null),this.startExtensionEntity&&(this.sdk.viewer.entities.remove(this.startExtensionEntity),this.startExtensionEntity=null),this.endExtensionEntity&&(this.sdk.viewer.entities.remove(this.endExtensionEntity),this.endExtensionEntity=null)}},{key:"destroy",value:function(){this.clear(),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null)}},{key:"getLocateCurrent",value:function(t){var e=this;this.reconnecting&&this.reconnecting.close(),this.options.host=this.options.host||h();var i;i=this.options.host+"/yjearth4.0/api/v1/gps/state",this.reconnecting=new ReconnectingWebSocket("ws://"+i),this.reconnecting.onopen=function(i){e.reconnecting.onmessage=function(i){e.data=JSON.parse(i.data),e.data&&e.data.rmc&&(e.reconnecting.close(),"start"===t.srcElement.getAttribute("data-is")?(e.startLng=e.data.rmc.lng,e.startLat=e.data.rmc.lat,!e.startEntity&&(e.startEntity=e.viewer.entities.add(new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return e.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(e.startLng,e.startLat))}),!1),billboard:{image:e.getSourceRootPath()+"/img/start.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32}}))),e.startEntity.show=!0):(e.endLng=e.data.rmc.lng,e.endLat=e.data.rmc.lat,!e.endEntity&&(e.endEntity=e.viewer.entities.add(new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return e.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(e.endLng,e.endLat))}),!1),billboard:{image:e.getSourceRootPath()+"/img/end.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32}}))),e.endEntity.show=!0))}}}},{key:"createRoute",value:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].lng,t[i].lat);!this.startLng&&0!==this.startLng||!this.startLat&&0!==this.startLat||this.startLng===t[0].lng&&this.startLat===t[0].lat||(this.startExtension=[this.startLng,this.startLat,t[0].lng,t[0].lat],this.startExtensionEntity?this.startExtensionEntity.polyline.positions=Cesium.Cartesian3.fromDegreesArray(this.startExtension):this.startExtensionEntity=this.sdk.viewer.entities.add({show:this.options.show,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(this.startExtension),width:this.options.width,clampToGround:!0,material:this.getMaterial(this.options.color,2),zIndex:99999999}})),!this.endLng&&0!==this.endLng||!this.endLat&&0!==this.endLat||this.endLng===t[t.length-1].lng&&this.endLat===t[t.length-1].lat||(this.endExtension=[this.endLng,this.endLat,t[t.length-1].lng,t[t.length-1].lat],this.endExtensionEntity?this.endExtensionEntity.polyline.positions=Cesium.Cartesian3.fromDegreesArray(this.endExtension):this.endExtensionEntity=this.sdk.viewer.entities.add({show:this.options.show,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(this.endExtension),width:this.options.width,clampToGround:!0,material:this.getMaterial(this.options.color,2),zIndex:99999999}})),this.entity?this.entity.polyline.positions=Cesium.Cartesian3.fromDegreesArray(e):this.entity=this.sdk.viewer.entities.add({show:this.options.show,polyline:{positions:Cesium.Cartesian3.fromDegreesArray(e),width:this.options.width,clampToGround:!0,material:this.getMaterial(this.options.color,0),zIndex:99999999}})}},{key:"pickStartPos",value:function(t){var e=this;this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),this.tip=new Z("左键选择起点坐标,右键取消",this.sdk),this.event=new X(this.sdk),this.event.mouse_move((function(t,i){e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)}));var i=function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.startLng=n.lng,e.startLat=n.lat,!e.startEntity&&(e.startEntity=e.viewer.entities.add(new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return e.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(e.startLng,e.startLat))}),!1),billboard:{image:e.getSourceRootPath()+"/img/start.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32}}))),e.startEntity.show=!0,e.tip&&e.tip.destroy(),e.event&&e.event.destroy()};this.event.mouse_left(i),this.event.mouse_right((function(t,i){e.tip&&e.tip.destroy(),e.event&&e.event.destroy()})),this.event.gesture_pinck_start((function(t,n){var o=new Date;t.position1.x,t.position2.x,t.position1.y,t.position2.y;e.event.gesture_pinck_end((function(){new Date-o>=500?(e.tip&&e.tip.destroy(),e.event&&e.event.destroy()):i(0,n)}))}))}},{key:"pickEndPos",value:function(t){var e=this;this.tip&&this.tip.destroy(),this.event&&this.event.destroy(),this.tip=new Z("左键选择终点坐标,右键取消",this.sdk),this.event=new X(this.sdk),this.event.mouse_move((function(t,i){e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.endLng=n.lng,e.endLat=n.lat,!e.endEntity&&(e.endEntity=e.viewer.entities.add(new Cesium.Entity({position:new Cesium.CallbackProperty((function(){return e.sdk.viewer.scene.clampToHeight(new Cesium.Cartesian3.fromDegrees(e.endLng,e.endLat))}),!1),billboard:{image:e.getSourceRootPath()+"/img/end.png",verticalOrigin:Cesium.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32}}))),e.endEntity.show=!0,e.tip&&e.tip.destroy(),e.event&&e.event.destroy()})),this.event.mouse_right((function(t,i){e.tip&&e.tip.destroy(),e.event&&e.event.destroy()}))}},{key:"flicker",value:function(){}}],[{key:"EventBinding",value:function(t,e){for(var i=function(){var i=[],o=!1,s=[];if(!e[n]||!e[n].attributes)return 1;var a,r=By(e[n].attributes);try{var l=function(){var r=a.value;switch(r.name){case"@model":o=!0,"checkbox"==e[n].type?(i.push((function(e){t[r.value]=e.target.checked})),e[n].checked=t[r.value]):(i.push((function(e){var i=e.target.value;"number"==e.target.type?"."==e.data||"-"==e.data&&!e.target.value||(i=Number(i),e.target.max&&i>Number(e.target.max)&&(i=Number(e.target.max)),e.target.min&&i<Number(e.target.min)&&(i=Number(e.target.min)),t[r.value]=i):t[r.value]=i})),"IMG"==e[n].nodeName?e[n].src=t[r.value]:e[n].value=t[r.value]),t._elms[r.value]?t._elms[r.value].push(e[n]):t._elms[r.value]=[e[n]],s.push(r.name);break;case"@click":e[n].addEventListener("click",(function(e){"function"==typeof t[r.value]&&t[r.value](e)})),s.push(r.name);break;case"@change":o=!0,i.push((function(e){var i=e.target.value;"number"==e.target.type&&""!=i&&(i=Number(i),e.target.value=i),"function"==typeof t[r.value]&&t[r.value](e,i)}))}};for(r.s();!(a=r.n()).done;)l()}catch(t){r.e(t)}finally{r.f()}for(var c=0;c<s.length;c++)e[n].attributes.removeNamedItem(s[c]);if(o){var u="input";"INPUT"==e[n].tagName&&"checkbox"!=e[n].type||(u="change"),e[n].addEventListener(u,(function(t){for(var e=0;e<i.length;e++)i[e](t)}))}},n=0;n<e.length;n++)i()}}]);var i}(jn);function Fy(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ry(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Fy(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Fy(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var zy,Hy=function(){var t=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=0,n=1,o=20,s=[],jy&&!jy.isDestroy&&(jy.close(),jy=null),r=function(){for(var t="",e=0;e<s.length;e++){var i='<tr class="el-table__row">',n="";for(var o in"fid"in s[e].properties&&(n='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(s[e].properties.fid,"</div></td>")),s[e].properties)"id"!==o&&"ID"!==o&&"fid"!==o&&(n+='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(s[e].properties[o],"</div></td>"));t+=i=i+n+"</tr>"}return t},t.next=8,new W(e.viewer._container,{title:"",left:"17%",top:"100px"});case 8:return jy=t.sent,t.next=11,jy.init();case 11:for(y in l=L()(e.geojson.features),i=l.length,s=l.slice(o*(n-1),o*n),c=r(),(u=document.createElement("div")).style.height="100%",'<div class="search-box" style="display: flex;margin-bottom: 10px;"><input class="input" type="text" placeholder="输入关键字搜索" style="width: 180px; margin-right: 10px;"><button class="btn search">搜索</button><button type="button" style="position: absolute;right:20px;" class="el-button el-button--primary is-plain export"><span>导出</span></button></div>',p='<div class="el-table el-table--fit el-table--border el-table--scrollable-x el-table--scrollable-y el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; height: calc(100% - 100px);">',h='<div class="el-table__header-wrapper"><table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 1213px;">',d="<colgroup>",m='<thead class="has-gutter"><tr>',f='<div class="el-table__body-wrapper is-scrolling-none" style="height: 620px;"><table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 1186px;">',v="<colgroup>",g=1,"fid"in e.geojson.features[0].properties&&(d+='<col name="el-table_1_column_'.concat(g,'" width="150">'),v+='<col name="el-table_1_column_'.concat(g,'" width="150">'),m+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(g,' is-leaf el-table__cell"><div class="cell">fid</div></th>'),g++),e.geojson.features[0].properties)"id"!==y&&"ID"!==y&&"fid"!==y&&(d+='<col name="el-table_1_column_'.concat(g,'" width="150">'),v+='<col name="el-table_1_column_'.concat(g,'" width="150">'),m+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(g,' is-leaf el-table__cell"><div class="cell">').concat(y,"</div></th>"),g++);'<div class="el-table__empty-block" style="height: 100%;"><span class="el-table__empty-text">暂无数据</span></div>',p=p+(h=h+(d+='<col name="gutter" width="17"></colgroup>')+(m+="</tr></thead>")+"</table></div>")+(f=f+(v+="</colgroup>")+("<tbody>"+c+"</tbody>")+'</table><div class="el-table__empty-block" style="height: 100%;"><span class="el-table__empty-text">暂无数据</span></div></div>')+"</div>",u.innerHTML='<div class="search-box" style="display: flex;margin-bottom: 10px;"><input class="input" type="text" placeholder="输入关键字搜索" style="width: 180px; margin-right: 10px;"><button class="btn search">搜索</button><button type="button" style="position: absolute;right:20px;" class="el-button el-button--primary is-plain export"><span>导出</span></button></div>'+p+'<div class="pagination"></div>',b=u.getElementsByClassName("el-table__empty-block")[0],0==s.length?b.style.display="flex":b.style.display="none",jy.contentAppChild(u),C=u.getElementsByClassName("el-table__header-wrapper")[0],(w=u.getElementsByClassName("el-table__body-wrapper")[0]).addEventListener("scroll",(function(t){C.scrollLeft=t.target.scrollLeft})),jy._element.title.style.height="40px",jy._element.body.style.width="65%",jy._element.body.style.height="80%",jy._element.content.style.height="calc(100% - 40px)",jy._element.content.style.overflow="hidden",jy._element.foot.style.display="none",w.style.height="calc(100% - ".concat(C.offsetHeight,"px)"),kn(k=u.getElementsByClassName("pagination")[0],i,o,n,(function(t){n=t,s=l.slice(o*(n-1),o*n);var e=r();u.getElementsByTagName("tbody")[0].innerHTML=e,0==s.length?b.style.display="flex":b.style.display="none"})),x=function(){for(var t=u.getElementsByClassName("search-box")[0].getElementsByTagName("input")[0],a=[],c=0;c<e.geojson.features.length;c++)for(var p in e.geojson.features[c].properties){if(-1!=(e.geojson.features[c].properties[p]+"").indexOf(t.value)){a.push(e.geojson.features[c]);break}}i=(l=a).length,0==(s=l.slice(o*(n-1),o*n)).length?b.style.display="flex":b.style.display="none";var h=r();u.getElementsByTagName("tbody")[0].innerHTML=h,kn(k,i,o,n,(function(t){n=t,s=l.slice(o*(n-1),o*n);var e=r();u.getElementsByTagName("tbody")[0].innerHTML=e,0==s.length?b.style.display="flex":b.style.display="none"}))},u.getElementsByClassName("search")[0].addEventListener("click",(function(){o=20,n=1,x()})),u.getElementsByClassName("export")[0].addEventListener("click",(function(){for(var t=[],i=0;i<e.geojson.features.length;i++)t.push(Ry(Ry({},e.geojson.features[i].properties),{},{positions:JSON.stringify(e.geojson.features[i].geometry.positions)}));e.exportExcel(t)}));case 55:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Vy=function(){var t=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:zy&&!zy.isDestroy&&(zy.close(),zy=null),n=[],o=function(){for(var t="",e=0;e<n.length;e++){var i='<tr class="el-table__row">',o="";for(var s in"fid"in n[e].properties&&(o='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(n[e].properties.fid,"</div></td>")),n[e].properties)"id"!==s&&"ID"!==s&&"fid"!==s&&(o+='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(n[e].properties[s],"</div></td>"));t+=i=i+o+"</tr>"}return t},s=!1,r=0;case 5:if(!(r<e.geojson.features.length)){t.next=13;break}if(!e.geojson.features[r].properties.id||e.geojson.features[r].properties.id!=i){t.next=10;break}return n=[e.geojson.features[r]],s=!0,t.abrupt("break",13);case 10:r++,t.next=5;break;case 13:if(s){t.next=16;break}return window.ELEMENT&&window.ELEMENT.Message({message:"数据不存在!",type:"warning",duration:1500}),t.abrupt("return");case 16:return t.next=18,new W(e.viewer._container,{title:i,left:"17%",top:"100px"});case 18:return zy=t.sent,t.next=21,zy.init();case 21:for(g in l=o(e),(c=document.createElement("div")).style.height="100%",u='<div class="el-table el-table--fit el-table--border el-table--scrollable-x el-table--scrollable-y el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; height: 100%;">',p='<div class="el-table__header-wrapper"><table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 930px;">',h="<colgroup>",d='<thead class="has-gutter"><tr>',m='<div class="el-table__body-wrapper is-scrolling-none" style="height: 620px;"><table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 913px;">',f="<colgroup>",v=1,"fid"in e.geojson.features[0].properties&&(h+='<col name="el-table_1_column_'.concat(v,'" width="150">'),f+='<col name="el-table_1_column_'.concat(v,'" width="150">'),d+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(v,' is-leaf el-table__cell"><div class="cell">fid</div></th>'),v++),e.geojson.features[0].properties)"id"!==g&&"ID"!==g&&"fid"!==g&&(h+='<col name="el-table_1_column_'.concat(v,'" width="150">'),f+='<col name="el-table_1_column_'.concat(v,'" width="150">'),d+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(v,' is-leaf el-table__cell"><div class="cell">').concat(g,"</div></th>"),v++);if(y='\n <DIV-cy-tabs id="shp-list-id-tabs">\n <DIV-cy-tab-pane label="属性列表">\n '.concat((u=u+(p=p+(h+='<col name="gutter" width="17"></colgroup>')+(d+="</tr></thead>")+"</table></div>")+(m=m+(f+="</colgroup>")+("<tbody>"+l+"</tbody>")+"</table></div>")+"</div>")+'<div class="pagination"></div>',"\n </DIV-cy-tab-pane>\n "),n[0].content&&n[0].content.richTextContent&&(b='\n <DIV-cy-tab-pane class="editor-content-view" label="富文本信息">\n '.concat(n[0].content.richTextContent,"\n </DIV-cy-tab-pane>\n "),y+=b),n[0].content&&n[0].content.link&&n[0].content.link.content&&n[0].content.link.content.length>0)for(C=0;C<n[0].content.link.content.length;C++)w=n[0].content.link.content[C].url,k='\n <DIV-cy-tab-pane class="editor-content-view" label="'.concat(n[0].content.link.content[C].name,'">\n <iframe src="').concat(w,'"></iframe>\n </DIV-cy-tab-pane>\n '),y+=k;for(y+="</DIV-cy-tabs>",c.innerHTML=y,zy.contentAppChild(c),new dn("shp-list-id-tabs"),(x=c.getElementsByClassName("DIV-cy-tabs")[0]).style.height="100%",x.style.display="flex",x.style.flexDirection="column",x.getElementsByClassName("DIV-cy-tab-content")[0].style.flex="1",_=x.getElementsByClassName("DIV-cy-tab-content-pane"),E=0;E<_.length;E++)_[E].style.height="100%";S=c.getElementsByClassName("el-table__header-wrapper")[0],(D=c.getElementsByClassName("el-table__body-wrapper")[0]).addEventListener("scroll",(function(t){S.scrollLeft=t.target.scrollLeft})),zy._element.title.style.height="40px",zy._element.body.style.width="65%",zy._element.body.style.height="80%",zy._element.content.style.height="calc(100% - 40px)",zy._element.foot.style.display="none",D.style.height="calc(100% - ".concat(S.offsetHeight,"px)");case 64:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}();function Gy(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Uy(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Uy(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function Uy(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function Wy(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Yy(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Wy(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Wy(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Jy(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var qy,Xy=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=Jy(this,e,[t,n])).viewer=t.viewer,i.options.path?(i.options.fileName=n.fileName||"未命名对象",i.options.field=n.field||"id",i.options.color=n.color||"rgba(0,255,184,0.5)",i.options.show=!n.show&&!1!==n.show||n.show,i.total=0,i.page=1,i.pageSize=20,i.currentData=[],i.data=[],i.list=[],i.imgEntity=[],i.Dialog=o,i._elms={},i):(i.error="未提供路径!",window.ELEMENT&&(window.ELEMENT.Message.closeAll(),window.ELEMENT.Message({message:i.error,type:"warning",duration:1500})),console.warn(i.error),Wi()(i))}return Xi()(e,t),_()(e,[{key:"show",get:function(){return this.options.show},set:function(t){this.setShow(t)}},{key:"on",value:function(){if(this.options.path)return this.init()}},{key:"init",value:(r=o()(a.a.mark((function t(){var i,n,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="",this.options.host=this.options.host||h(),i=this.options.host.endsWith("yjearth4.0")?this.options.host+"/api/v1/vector/load":this.options.host+"/yjearth4.0/api/v1/vector/load",i+="?path="+this.options.path,t.next=6,fetch(i,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}});case 6:if(200!==(n=t.sent).status){t.next=19;break}return t.next=10,n.json();case 10:if(200!==(o=t.sent).code&&0!==o.code){t.next=18;break}return this.data=o.data,t.next=15,this.formatData();case 15:return t.abrupt("return",e.create(this));case 18:return t.abrupt("return",console.error(o.message));case 19:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"formatData",value:(s=o()(a.a.mark((function t(){var e,i,n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=function(t){if(t.data){var o;(o=i.list).push.apply(o,L()(t.data));for(var s=0;s<t.data.length;s++){var a=void 0,r=void 0,l=void 0,c=void 0,u=void 0;if(t.data[s].points){a=L()(t.data[s].points);for(var p=0;p<a.length;p++)e.push({id:a[p].attr.id,type:"Feature",geometry:{type:"Point",coordinates:[a[p].x,a[p].y,a[p].z],range:a[p].range,positions:{x:a[p].x,y:a[p].y,z:a[p].z}},properties:a[p].attr?Yy({},a[p].attr):{}})}if(t.data[s].polylines){r=L()(t.data[s].polylines);for(var h=0;h<r.length;h++){for(var d=[],m=0;m<r[h].positions.length;m++)d.push([r[h].positions[m].x,r[h].positions[m].y,r[h].positions[m].z]);e.push({id:r[h].attr.id,type:"Feature",geometry:{type:"LineString",coordinates:d,range:r[h].range,positions:r[h].positions},properties:r[h].attr?Yy({},r[h].attr):{}})}}if(t.data[s].polygons){l=L()(t.data[s].polygons);for(var f=0;f<l.length;f++){for(var v=[],g=0;g<l[f].positions.length;g++)v.push([l[f].positions[g].x,l[f].positions[g].y]);e.push({id:l[f].attr.id,type:"Feature",geometry:{type:"Polygon",coordinates:[v],range:l[f].range,positions:l[f].positions},properties:l[f].attr?Yy({},l[f].attr):{}})}}if(t.data[s].multi_polylines){c=L()(t.data[s].multi_polylines);for(var y=0;y<c.length;y++){for(var b=[],C=[],w=0;w<c[y].polylines.length;w++){var k=[];C.push(c[y].polylines[w].positions);for(var x=0;x<c[y].polylines[w].positions.length;x++)k.push([c[y].polylines[w].positions[x].x,c[y].polylines[w].positions[x].y,c[y].polylines[w].positions[x].z]);b.push(k)}e.push({id:c[y].attr.id,type:"Feature",geometry:{type:"MultiLineString",coordinates:b,range:c[y].range,positions:C},properties:c[y].attr?Yy({},c[y].attr):{}})}}if(t.data[s].multi_polygons){u=L()(t.data[s].multi_polygons);for(var _=0;_<u.length;_++){for(var E=[],S=[],D=0;D<u[_].polygons.length;D++){var M=[];S.push(u[_].polygons[D].positions);for(var P=0;P<u[_].polygons[D].positions.length;P++)M.push([u[_].polygons[D].positions[P].x,u[_].polygons[D].positions[P].y,u[_].polygons[D].positions[P].z]);E.push(M)}e.push({id:u[_].attr.id,type:"Feature",geometry:{type:"MultiPolygon",coordinates:[E],range:u[_].range,positions:S},properties:u[_].attr?Yy({},u[_].attr):{}})}}}}if(t.children)for(var O=0;O<t.children.length;O++)n(t.children[O])},e=[],i=this,n(this.data),e.sort((function(t,e){return Number(t.properties.fid)-Number(e.properties.fid)})),this.geojson={type:"FeatureCollection",features:e};case 6:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"fileName",get:function(){return this.options.fileName},set:function(t){this.options.fileName=t,this._elms.fileName&&(this._elms.fileName.value=t)}},{key:"field",get:function(){return this.options.field},set:function(t){this.options.field=t,this._elms.field&&(this._elms.field.value=t)}},{key:"onClick",get:function(){return this.clickCallBack},set:function(t){t&&"function"!=typeof t?console.error("val:",t,"不是一个function"):this.clickCallBack=t}},{key:"img",get:function(){return this.options.img},set:function(t){Array.isArray(t)||(t=[t]),this.options.img=t,e.createImage(this)}},{key:"color",get:function(){return this.options.color},set:function(t){this.options.color=t,this.entity.entities.values.forEach((function(e){e.billboard&&(e.billboard.color=t),e.polygon&&(e.polygon.material=Cesium.Color.fromCssColorString(t)),e.polyline&&(e.polyline.material=Cesium.Color.fromCssColorString(t))}))}},{key:"leftClickCB",value:function(t,e,i,n){n.clickCallBack&&"function"==typeof n.clickCallBack&&n.clickCallBack(t,e,i)}},{key:"edit",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p=this,h=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=h.length>0&&void 0!==h[0]&&h[0],i=h.length>1&&void 0!==h[1]?h[1]:{},this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=25;break}return t.next=7,new Ki(this.sdk,this.options,{title:"编辑属性",left:"180px",top:"100px",confirmCallBack:function(t){p.fileName=p.fileName.trim(),p.fileName||(p.fileName="未命名对象"),p.originalOptions.fileName=p.fileName,p.originalOptions.field=p.field,p._DialogObject.close(),i.confirmCallBack&&i.confirmCallBack({id:p.options.id,fileName:p.originalOptions.fileName,field:p.originalOptions.field})},closeCallBack:function(){p.reset(),i.closeCallBack&&i.closeCallBack()}});case 7:for(c in this._DialogObject=t.sent,n='\n <div class="row">\n <div class="col">\n <span class="label">文件名称:</span>\n <input class="input flie-name" type="text">\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">名称字段选择:</span>\n <select class="input input-select">\n </select>\n </div>\n </div>\n ',(o=document.createElement("div")).innerHTML=n,this._DialogObject.contentAppChild(o),(s=o.getElementsByClassName("flie-name")[0]).value=this.options.fileName,s.addEventListener("input",(function(){p.options.fileName=s.value})),r=o.getElementsByClassName("input-select")[0],l="",this.geojson.features[0].properties)u='<option value="'.concat(c,'">').concat(c,"</option>"),l+=u;r.innerHTML=l,r.value=this.options.field,r.addEventListener("input",(function(){p.options.field=r.value})),this._elms.fileName=s,this._elms.field=r,t.next=26;break;case 25:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 26:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"editById",value:(i=o()(a.a.mark((function t(){var e,i,n,s,r,l,c,u,p,h,d,m,f,v,g,y,b=this,C=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=C.length>0&&void 0!==C[0]&&C[0],i=C.length>1?C[1]:void 0,n=C.length>2&&void 0!==C[2]?C[2]:{},this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),s="",!e){t.next=48;break}l={},c=0;case 8:if(!(c<this.geojson.features.length)){t.next=16;break}if(this.geojson.features[c].properties.id!==i){t.next=13;break}return this.geojson.features[c].content&&(l=this.deepCopyObj(this.geojson.features[c].content)),r=c,t.abrupt("break",16);case 13:c++,t.next=8;break;case 16:return l.id=l.id||i,l.link||(l.link={}),l.link.content||(l.link.content=[]),l.camera||(l.camera=[]),l.richTextContent||(l.richTextContent=""),l.attributeType=l.attributeType||"richText",t.next=24,new Ki(this.sdk,l,{title:"编辑属性",left:"180px",top:"100px",confirmCallBack:function(){b._DialogObject.close(),b.geojson.features[r].content=b.deepCopyObj(b._DialogObject.attribute),n.confirmCallBack&&n.confirmCallBack(b._DialogObject.attribute)},closeCallBack:function(){n.closeCallBack&&n.closeCallBack()}});case 24:for(this._DialogObject=t.sent,this._DialogObject.event=n,this._DialogObject.attribute=this.deepCopyObj(l),u='\n <div class="row">\n <div class="col">\n <span class="label">内容类型:</span>\n <select class="input input-select attribute-select" style="width: 120px;">\n <option value="richText">富文本</option>\n \x3c!--<option value="link">链接</option>\n <option value="camera">摄像头</option>\n <option value="sensor">传感器</option>\n <option value="vr">全景图</option>--\x3e\n </select>\n </div>\n <div class="col attribute-content attribute-content-link">\n <div class="input-group">\n <input class="input link_add" type="text">\n <button class="link_add_btn">+</button>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-richText">\n <span>编辑内容:<button class="open-richText-btn">打开文本编辑器</button></span>\n </div>\n <div class="attribute-content attribute-content-link">\n <div class="table">\n <div class="table-head">\n <div class="tr">\n <div class="th">名称</div>\n <div class="th">链接</div>\n <div class="th">操作</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-camera">\n <div class="row">\n <div class="col">\n <span class="label">编辑内容:</span>\n <input class="input camera-name" type="text" style="width: 100px;">\n <button class="select btn camera-select">搜索</button>\n </div>\n </div>\n <div>\n <div class="table camera-table">\n <div class="table-head">\n <div class="tr">\n <div class="th">操作</div>\n <div class="th">设备名称</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">设备类型</div>\n <div class="th" style="width: 126px; flex: 0 126px;min-width: 126px;">设备IP</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">设备端口</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">用户名</div>\n <div class="th">密码</div>\n </div>\n </div>\n <div class="table-body" style="display:none;">\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="2">\n <span>绑定</span>\n </div>\n <div class="td">设备名称</div>\n <div class="td">设备类型</div>\n <div class="td">设备IP</div>\n <div class="td">设备端口</div>\n <div class="td">用户名</div>\n <div class="td">密码</div>\n </div>\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class=""row>\n <ul class="pagination"></ul>\n </div>\n </div>\n ',(p=document.createElement("div")).innerHTML=u,this._DialogObject.contentAppChild(p),p.getElementsByTagName("*"),this._DialogObject._element.body.style.width="600px",h=p.getElementsByClassName("attribute-select")[0],d=p.getElementsByClassName("link_add_btn")[0],m=p.getElementsByClassName("open-richText-btn")[0],f=this._DialogObject._element.content.getElementsByClassName("attribute-content"),v=0;v<f.length;v++)f[v].className.indexOf("attribute-content-"+this._DialogObject.attribute.attributeType)>-1?f[v].style.display="block":f[v].style.display="none";h.addEventListener("change",(function(){b._DialogObject.attribute.attributeType=h.value;for(var t=0;t<f.length;t++)f[t].className.indexOf("attribute-content-"+b._DialogObject.attribute.attributeType)>-1?f[t].style.display="block":f[t].style.display="none"})),d.addEventListener("click",o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(b._DialogObject.attribute.link.content.push({name:"链接",url:b._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),b._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",b.setAttributeLinkById(i,b._DialogObject.attribute.link.content)):n.clickAddLink&&n.clickAddLink(i);case 1:case"end":return t.stop()}}),t)})))),m.addEventListener("click",(function(){wn.open(i,i,b._DialogObject.attribute.richTextContent),wn.primaryCallBack=function(t){b._DialogObject.attribute.richTextContent=t}})),g=p.getElementsByClassName("camera-name")[0],y=p.getElementsByClassName("camera-select")[0],g.addEventListener("input",(function(){s=g.value})),this.cameraSelect&&this.cameraSelect(s),y.addEventListener("click",(function(){b.cameraSelect&&b.cameraSelect(s)})),t.next=49;break;case 48:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 49:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"editContentById",value:function(t,e){for(var i=0;i<this.geojson.features.length;i++)if(this.geojson.features[i].properties.id===t){this.geojson.features[i].content=e;break}}},{key:"reset",value:function(){this.fileName=this.originalOptions.fileName,this.field=this.originalOptions.field}},{key:"addAttributeLinkById",value:function(t,e,i){this._DialogObject&&this._DialogObject.attribute&&this._DialogObject.attribute.id==t&&(i||0===i?this._DialogObject._element.body.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("tr")[i+1].getElementsByClassName("file-select")[0].value=e:(this._DialogObject.attribute.link.content.push({name:"链接",url:e}),this.setAttributeLinkById(t,this._DialogObject.attribute.link.content)))}},{key:"setAttributeLinkById",value:function(t,e){var i,n=this;if(this._DialogObject&&this._DialogObject.attribute&&this._DialogObject.attribute.id==t){this._DialogObject.attribute.link.content=e;var s=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],r=s.getElementsByClassName("table-body")[0];r.innerHTML="",this._DialogObject.attribute.link.content.length>0?s.getElementsByClassName("table-empty")[0].style.display="none":s.getElementsByClassName("table-empty")[0].style.display="flex";for(var l=0;l<this._DialogObject.attribute.link.content.length;l++){var c='\n <div class="tr">\n <div class="td">'+this._DialogObject.attribute.link.content[l].name+'</div>\n <div class="td">'+this._DialogObject.attribute.link.content[l].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',u=document.createRange().createContextualFragment(c);r.appendChild(u)}for(var p=r.getElementsByClassName("tr"),h={linkEdit:(i=o()(a.a.mark((function e(i){var o,s,r,l,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.setAttributeLinkById(t,n._DialogObject.attribute.link.content);case 2:o=n._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],s=o.getElementsByClassName("table-body")[0],r=s.getElementsByClassName("tr"),l=a.a.mark((function t(e){var o,s,l,c,u,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==e){t.next=33;break}r[e].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <div class="input-group">\n <input class="input file-select" type="text" style="width: 200px;">\n <button @click="fileSelect">...</button>\n </div>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',(o=r[e].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=n._DialogObject.attribute.link.content[i].name,o[1].getElementsByClassName("input")[0].value=n._DialogObject.attribute.link.content[i].url,s=r[e].getElementsByTagName("button"),l=0;case 8:if(!(l<s.length)){t.next=32;break}if(s[l]&&s[l].attributes){t.next=11;break}return t.abrupt("continue",29);case 11:c=Gy(s[l].attributes),t.prev=12,p=a.a.mark((function t(){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(i=u.value).name){t.next=5;break}return s[l].addEventListener("click",(function(t){"function"==typeof h[i.value]&&h[i.value]({name:o[0].getElementsByClassName("input")[0].value,url:o[1].getElementsByClassName("input")[0].value},e)})),s[l].attributes.removeNamedItem(i.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),c.s();case 15:if((u=c.n()).done){t.next=21;break}return t.delegateYield(p(),"t0",17);case 17:if(!t.t0){t.next=19;break}return t.abrupt("break",21);case 19:t.next=15;break;case 21:t.next=26;break;case 23:t.prev=23,t.t1=t.catch(12),c.e(t.t1);case 26:return t.prev=26,c.f(),t.finish(26);case 29:l++,t.next=8;break;case 32:return t.abrupt("return",1);case 33:case"end":return t.stop()}}),t,null,[[12,23,26,29]])})),c=0;case 7:if(!(c<r.length)){e.next=14;break}return e.delegateYield(l(c),"t0",9);case 9:if(!e.t0){e.next=11;break}return e.abrupt("break",14);case 11:c++,e.next=7;break;case 14:case"end":return e.stop()}}),e)}))),function(t){return i.apply(this,arguments)}),linkDelete:function(e){n._DialogObject.attribute.link.content.splice(e,1),n.setAttributeLinkById(t,n._DialogObject.attribute.link.content)},confirmEdit:function(e,i){n._DialogObject.attribute.link.content[i]=e,n.setAttributeLinkById(t,n._DialogObject.attribute.link.content)},cancelEdit:function(){n.setAttributeLinkById(t,n._DialogObject.attribute.link.content)},fileSelect:function(e,i){n._DialogObject.event&&n._DialogObject.event.clickAddLink&&n._DialogObject.event.clickAddLink(t,i)}},d=function(t){for(var e=p[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=Gy(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof h[o.value]&&h[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<p.length;m++)d(m)}for(var f=0;f<this.dataArray.length;f++)if(this.dataArray[f].attr.id===t){this.dataArray[f].content&&(this.opt_DialogObject.attribute.link.content=v);break}}},{key:"getAllNode",value:function(){return this.data}},{key:"openAllNodeList",value:function(){Hy(this)}},{key:"openNodeListById",value:function(t){Vy(this,t)}},{key:"flyTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){for(var i=0;i<this.geojson.features.length;i++)if(this.geojson.features[i].properties.id===t){var n=this.geojson.features[i].geometry.range;n&&(ii(0),Je(this.sdk),qe(this.sdk),this.viewer.camera.flyTo({orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)},destination:Cesium.Rectangle.fromDegrees(n.min_x,n.min_y,n.max_x,n.max_y)}))}}else this.range&&(ii(0),Je(this.sdk),qe(this.sdk),this.viewer.camera.flyTo({orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)},destination:Cesium.Rectangle.fromDegrees(this.range.min_x,this.range.min_y,this.range.max_x,this.range.max_y)}))}},{key:"setShow",value:function(t,e){if(e)for(var i=0;i<this.entity.entities.values.length;i++)this.entity.entities.values[i].id&&this.entity.entities.values[i].id.startsWith(e)&&(this.entity.entities.values[i].show=t);else{this.options.show=t;for(var n=0;n<this.entity.entities.values.length;n++)this.entity.entities.values[n].show=t}}},{key:"setShowImg",value:function(t,e){if(e||0===e){for(var i=0;i<this.imgEntity.length;i++)if(i==e){this.imgEntity[i].show=t;break}}else for(var n=0;n<this.imgEntity.length;n++)this.imgEntity[n].show=t}},{key:"remove",value:function(){this.viewer.dataSources.remove(this.entity,!0),this.removeImage(),this.entity=null,this.geojson={},this.data={}}},{key:"removeImage",value:function(){for(var t=0;t<this.imgEntity.length;t++)this.sdk.viewer.entities.remove(this.imgEntity[t]);this.imgEntity=[]}},{key:"cameraSelect",value:function(t,e){var i=this,n={1:"海康",2:"大华"},o=this.options.host;if(this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content){var s=that._DialogObject._element.content.getElementsByClassName("pagination")[0],a=that._DialogObject._element.content.getElementsByClassName("attribute-content-camera")[0];if(s&&a){kn(s,1,10,1);var r="",l={cameraName:t,page:e&&"object"!==N()(e)?e:1,pageSize:5},c=new URLSearchParams(l).toString();r=o.endsWith("yjearth4.0")?"".concat(o,"/api/v1/cameraData/list?").concat(c):"".concat(o,"/yjearth4.0/api/v1/cameraData/list?").concat(c),fetch(r,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then((function(e){200===e.status&&e.json().then((function(e){if(200===e.code||0===e.code){if(!i._DialogObject||!i._DialogObject._element||!i._DialogObject._element.content)return;var o=i._DialogObject._element.content.getElementsByClassName("pagination")[0],s=i._DialogObject._element.content.getElementsByClassName("camera-table")[0],a=s.getElementsByClassName("table-body")[0];if(a.innerHTML="",e.data){if(e.data.list&&e.data.list.length>0){kn(o,e.data.total,10,1,(function(e){i.cameraSelect&&i.cameraSelect(t,e)})),s.getElementsByClassName("table-empty")[0].style.display="none",a.style.display="inline-flex";for(var r=function(t){var o='\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="'.concat(e.data.list[t].ID,'">\n <span>绑定</span>\n </div>\n <div class="td">').concat(e.data.list[t].cameraName,'</div>\n <div class="td" style="width: 80px; flex: 0 80px; min-width: 80px;">').concat(n[e.data.list[t].type],'</div>\n <div class="td" style="width: 126px; flex: 0 126px;min-width: 126px;">').concat(e.data.list[t].ip,'</div>\n <div class="td" style="width: 80px; flex: 0 80px;min-width: 80px;">').concat(e.data.list[t].port,'</div>\n <div class="td" style="width: 80px; flex: 0 80px;min-width: 80px;">').concat(e.data.list[t].userName,'</div>\n <div class="td">').concat(e.data.list[t].passWord,"</div>\n </div>"),s=document.createRange().createContextualFragment(o),r=s.querySelector('input[type="checkbox"]');r.addEventListener("change",(function(){if(r.checked)i._DialogObject.attribute.camera.push(e.data.list[t]);else{var n=i._DialogObject.attribute.camera.filter((function(i){return i.ID!==e.data.list[t].ID}));i._DialogObject.attribute.camera=n}})),a.appendChild(s);for(var l=0;l<i._DialogObject.attribute.camera.length;l++)if(i._DialogObject.attribute.camera[l].ID===e.data.list[t].ID){r.checked=!0;break}},l=0;l<e.data.list.length;l++)r(l)}e.data&&e.data.total&&kn(o,e.data.total,10,1,(function(e){i.cameraSelect&&i.cameraSelect(t,e)}))}else kn(o,1,10,1),s.getElementsByClassName("table-empty")[0].style.display="flex",a.style.display="none"}else console.error(e.message)}))}))}}}},{key:"flicker",value:function(){}}],[{key:"create",value:function(t){var i=turf.bbox(t.geojson);t.range={max_x:i[2],max_y:i[3],min_x:i[0],min_y:i[1]},t.options.img&&e.createImage(t);var n=function(e){var i=t.options.color;if(e){switch(e._value){case 1:i="rgba(255,0,0,1)";break;case 2:i="rgba(255,126,0,1)";break;case 3:i="rgba(255,250,0,1)";break;case 4:i="rgba(0,102,255,1)";break;case 5:i="rgba(0,255,0,1)"}return i}return i};return(new Cesium.GeoJsonDataSource).load(t.geojson,{clampToGround:!0}).then((function(e){t.entity=e,t.viewer.dataSources.add(e),e.entities.values.forEach((function(e){if(e.show=t.options.show,e.billboard&&(e.billboard.heightReference=Cesium.HeightReference.CLAMP_TO_GROUND,e.point=new Cesium.PointGraphics({show:!0,color:Cesium.Color.fromCssColorString(n(e.properties.level)),pixelSize:10,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY})),e.polygon&&(e.polygon.perPositionHeight=!1,e.polygon.material=Cesium.Color.fromCssColorString(n(e.properties.level))),e.polyline){t.options.color;e.polyline.material=Cesium.Color.fromCssColorString(n(e.properties.level))}}))}))}},{key:"createImage",value:function(t){t.removeImage();for(var e=0;e<t.options.img.length;e++){var i=t.sdk.viewer.entities.add({show:t.options.show,rectangle:{coordinates:Cesium.Rectangle.fromDegrees(t.range.min_x,t.range.min_y,t.range.max_x,t.range.max_y),material:new Cesium.ImageMaterialProperty({image:t.options.img[e],transparent:!0})}});t.imgEntity.push(i)}}},{key:"calculationScope",value:function(t,e){var i=[];if(e.points)for(var n=0;n<e.points.length;n++)i.push(turf.point([e.points[n].position.x,e.points[n].position.y]));if(e.polylines)for(var o=0;o<e.polylines.length;o++)if(e.polylines[o].positions)for(var s=0;s<e.polylines[o].positions.length;s++)i.push(turf.point([e.polylines[o].positions[s].x,e.polylines[o].positions[s].y]));if(e.polygons)for(var a=0;a<e.polygons.length;a++)if(e.polygons[a].positions)for(var r=0;r<e.polygons[a].positions.length;r++)i.push(turf.point([e.polygons[a].positions[r].x,e.polygons[a].positions[r].y]));if(i.length>0){var l=turf.featureCollection(i),c=turf.envelope(l);c&&c.bbox&&4==c.bbox.length&&(t.range={max_x:c.bbox[2],max_y:c.bbox[3],min_x:c.bbox[0],min_y:c.bbox[1]})}}},{key:"createPoints",value:function(t,e){if(e){for(var i=new Cesium.PointPrimitiveCollection({scene:t.viewer.scene}),n=0;n<e.length;n++)e[n].attr.id||(e[n].attr.id=t.randomString()),i.add({id:e[n].attr.id,position:Cesium.Cartesian3.fromDegrees(e[n].x,e[n].y,e[n].z),color:Cesium.Color.RED,pixelSize:10,disableDepthTestDistance:Number.POSITIVE_INFINITY}),dt(e[n].attr.id,t.leftClickCB,t);t.entity.add(i)}}},{key:"createPolylines",value:function(t,e){if(e){for(var i=[],n=0;n<e.length;n++){e[n].attr.id||(e[n].attr.id=t.randomString());for(var o=e[n].positions,s=[],a=0;a<o.length;a++)s.push(o[a].x,o[a].y,o[a].z);var r=new Cesium.GroundPolylineGeometry({positions:Cesium.Cartesian3.fromDegreesArrayHeights(s),width:4}),l=new Cesium.GeometryInstance({id:e[n].attr.id,geometry:r,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString(e[n].COLOR||"rgba(0,255,184,0.5)")),show:new Cesium.ShowGeometryInstanceAttribute(!0)}});i.push(l),dt(e[n].attr.id,t.leftClickCB,t)}i.length>0&&t.entity.add(new Cesium.GroundPolylinePrimitive({geometryInstances:i,appearance:new Cesium.PolylineColorAppearance}))}}},{key:"createPolygons",value:function(t,e){if(e){for(var i=[],n=0;n<e.length;n++){e[n].attr.id||(e[n].attr.id=t.randomString());for(var o=e[n].positions,s=[],a=0;a<o.length;a++)s.push(o[a].x,o[a].y,o[a].z);var r=new Cesium.PolygonGeometry({polygonHierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(s))}),l=new Cesium.GeometryInstance({id:e[n].attr.id,geometry:r,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString(e[n].COLOR||"rgba(0,255,184,0.5)")),show:new Cesium.ShowGeometryInstanceAttribute(!0)}});i.push(l),dt(e[n].attr.id,t.leftClickCB,t)}if(i.length>0){var c=new Cesium.GroundPrimitive({geometryInstances:i,appearance:new Cesium.PerInstanceColorAppearance({translucent:!0,closed:!1})});t.entity.add(c)}}}},{key:"createTableContent",value:function(t){for(var e="",i=0;i<t.currentData.length;i++){var n='<tr class="el-table__row">',o="";for(var s in t.currentData[i].attr)o+='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(i,' el-table__cell"><div class="cell">').concat(t.currentData[i].attr[s],"</div></td>");e+=n=n+o+"</tr>"}return e}}]);var i,n,s,r}(jn);function Zy(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ky(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Zy(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Zy(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var $y,Qy=function(){var t=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=0,n=1,o=20,s=[],qy&&!qy.isDestroy&&(qy.close(),qy=null),r=function(){for(var t="",e=0;e<s.length;e++){var i='<tr class="el-table__row">',n="";for(var o in"fid"in s[e].properties&&(n='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(s[e].properties.fid,"</div></td>")),s[e].properties)"id"!==o&&"ID"!==o&&"fid"!==o&&(n+='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(s[e].properties[o],"</div></td>"));t+=i=i+n+"</tr>"}return t},t.next=8,new W(e.viewer._container,{title:"",left:"17%",top:"100px"});case 8:return qy=t.sent,t.next=11,qy.init();case 11:for(y in l=L()(e.geojson.features),i=l.length,s=l.slice(o*(n-1),o*n),c=r(),(u=document.createElement("div")).style.height="100%",'<div class="search-box" style="display: flex;margin-bottom: 10px;"><input class="input" type="text" placeholder="输入关键字搜索" style="width: 180px; margin-right: 10px;"><button class="btn search">搜索</button><button type="button" style="position: absolute;right:20px;" class="el-button el-button--primary is-plain export"><span>导出</span></button></div>',p='<div class="el-table el-table--fit el-table--border el-table--scrollable-x el-table--scrollable-y el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; height: calc(100% - 100px);">',h='<div class="el-table__header-wrapper"><table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 1213px;">',d="<colgroup>",m='<thead class="has-gutter"><tr>',f='<div class="el-table__body-wrapper is-scrolling-none" style="height: 620px;"><table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 1186px;">',v="<colgroup>",g=1,"fid"in e.geojson.features[0].properties&&(d+='<col name="el-table_1_column_'.concat(g,'" width="150">'),v+='<col name="el-table_1_column_'.concat(g,'" width="150">'),m+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(g,' is-leaf el-table__cell"><div class="cell">fid</div></th>'),g++),e.geojson.features[0].properties)"id"!==y&&"ID"!==y&&"fid"!==y&&(d+='<col name="el-table_1_column_'.concat(g,'" width="150">'),v+='<col name="el-table_1_column_'.concat(g,'" width="150">'),m+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(g,' is-leaf el-table__cell"><div class="cell">').concat(y,"</div></th>"),g++);'<div class="el-table__empty-block" style="height: 100%;"><span class="el-table__empty-text">暂无数据</span></div>',p=p+(h=h+(d+='<col name="gutter" width="17"></colgroup>')+(m+="</tr></thead>")+"</table></div>")+(f=f+(v+="</colgroup>")+("<tbody>"+c+"</tbody>")+'</table><div class="el-table__empty-block" style="height: 100%;"><span class="el-table__empty-text">暂无数据</span></div></div>')+"</div>",u.innerHTML='<div class="search-box" style="display: flex;margin-bottom: 10px;"><input class="input" type="text" placeholder="输入关键字搜索" style="width: 180px; margin-right: 10px;"><button class="btn search">搜索</button><button type="button" style="position: absolute;right:20px;" class="el-button el-button--primary is-plain export"><span>导出</span></button></div>'+p+'<div class="pagination"></div>',b=u.getElementsByClassName("el-table__empty-block")[0],0==s.length?b.style.display="flex":b.style.display="none",qy.contentAppChild(u),C=u.getElementsByClassName("el-table__header-wrapper")[0],(w=u.getElementsByClassName("el-table__body-wrapper")[0]).addEventListener("scroll",(function(t){C.scrollLeft=t.target.scrollLeft})),qy._element.title.style.height="40px",qy._element.body.style.width="65%",qy._element.body.style.height="80%",qy._element.content.style.height="calc(100% - 40px)",qy._element.content.style.overflow="hidden",qy._element.foot.style.display="none",w.style.height="calc(100% - ".concat(C.offsetHeight,"px)"),kn(k=u.getElementsByClassName("pagination")[0],i,o,n,(function(t){n=t,s=l.slice(o*(n-1),o*n);var e=r();u.getElementsByTagName("tbody")[0].innerHTML=e,0==s.length?b.style.display="flex":b.style.display="none"})),x=function(){for(var t=u.getElementsByClassName("search-box")[0].getElementsByTagName("input")[0],a=[],c=0;c<e.geojson.features.length;c++)for(var p in e.geojson.features[c].properties){if(-1!=(e.geojson.features[c].properties[p]+"").indexOf(t.value)){a.push(e.geojson.features[c]);break}}i=(l=a).length,0==(s=l.slice(o*(n-1),o*n)).length?b.style.display="flex":b.style.display="none";var h=r();u.getElementsByTagName("tbody")[0].innerHTML=h,kn(k,i,o,n,(function(t){n=t,s=l.slice(o*(n-1),o*n);var e=r();u.getElementsByTagName("tbody")[0].innerHTML=e,0==s.length?b.style.display="flex":b.style.display="none"}))},u.getElementsByClassName("search")[0].addEventListener("click",(function(){o=20,n=1,x()})),u.getElementsByClassName("export")[0].addEventListener("click",(function(){for(var t=[],i=0;i<e.geojson.features.length;i++)t.push(Ky(Ky({},e.geojson.features[i].properties),{},{positions:JSON.stringify(e.geojson.features[i].geometry.coordinates)}));e.exportExcel(t)}));case 55:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),tb=function(){var t=o()(a.a.mark((function t(e,i){var n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C,w,k,x,_,E,S,D;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:$y&&!$y.isDestroy&&($y.close(),$y=null),n=[],o=function(){for(var t="",e=0;e<n.length;e++){var i='<tr class="el-table__row">',o="";for(var s in"fid"in n[e].properties&&(o='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(n[e].properties.fid,"</div></td>")),n[e].properties)"id"!==s&&"ID"!==s&&"fid"!==s&&(o+='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(e,' el-table__cell"><div class="cell">').concat(n[e].properties[s],"</div></td>"));t+=i=i+o+"</tr>"}return t},s=!1,r=0;case 5:if(!(r<e.geojson.features.length)){t.next=13;break}if(!e.geojson.features[r].properties.id||e.geojson.features[r].properties.id!=i){t.next=10;break}return n=[e.geojson.features[r]],s=!0,t.abrupt("break",13);case 10:r++,t.next=5;break;case 13:if(s){t.next=16;break}return window.ELEMENT&&window.ELEMENT.Message({message:"数据不存在!",type:"warning",duration:1500}),t.abrupt("return");case 16:return t.next=18,new W(e.viewer._container,{title:i,left:"17%",top:"100px"});case 18:return $y=t.sent,t.next=21,$y.init();case 21:for(g in l=o(e),(c=document.createElement("div")).style.height="100%",u='<div class="el-table el-table--fit el-table--border el-table--scrollable-x el-table--scrollable-y el-table--enable-row-hover el-table--enable-row-transition" style="width: 100%; height: 100%;">',p='<div class="el-table__header-wrapper"><table cellspacing="0" cellpadding="0" border="0" class="el-table__header" style="width: 930px;">',h="<colgroup>",d='<thead class="has-gutter"><tr>',m='<div class="el-table__body-wrapper is-scrolling-none" style="height: 620px;"><table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 913px;">',f="<colgroup>",v=1,"fid"in e.geojson.features[0].properties&&(h+='<col name="el-table_1_column_'.concat(v,'" width="150">'),f+='<col name="el-table_1_column_'.concat(v,'" width="150">'),d+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(v,' is-leaf el-table__cell"><div class="cell">fid</div></th>'),v++),e.geojson.features[0].properties)"id"!==g&&"ID"!==g&&"fid"!==g&&(h+='<col name="el-table_1_column_'.concat(v,'" width="150">'),f+='<col name="el-table_1_column_'.concat(v,'" width="150">'),d+='<th colspan="1" rowspan="1" class="el-table_1_column_'.concat(v,' is-leaf el-table__cell"><div class="cell">').concat(g,"</div></th>"),v++);if(y='\n <DIV-cy-tabs id="shp-list-id-tabs">\n <DIV-cy-tab-pane label="属性列表">\n '.concat((u=u+(p=p+(h+='<col name="gutter" width="17"></colgroup>')+(d+="</tr></thead>")+"</table></div>")+(m=m+(f+="</colgroup>")+("<tbody>"+l+"</tbody>")+"</table></div>")+"</div>")+'<div class="pagination"></div>',"\n </DIV-cy-tab-pane>\n "),n[0].content&&n[0].content.richTextContent&&(b='\n <DIV-cy-tab-pane class="editor-content-view" label="富文本信息">\n '.concat(n[0].content.richTextContent,"\n </DIV-cy-tab-pane>\n "),y+=b),n[0].content&&n[0].content.link&&n[0].content.link.content&&n[0].content.link.content.length>0)for(C=0;C<n[0].content.link.content.length;C++)w=n[0].content.link.content[C].url,k='\n <DIV-cy-tab-pane class="editor-content-view" label="'.concat(n[0].content.link.content[C].name,'">\n <iframe src="').concat(w,'"></iframe>\n </DIV-cy-tab-pane>\n '),y+=k;for(y+="</DIV-cy-tabs>",c.innerHTML=y,$y.contentAppChild(c),new dn("shp-list-id-tabs"),(x=c.getElementsByClassName("DIV-cy-tabs")[0]).style.height="100%",x.style.display="flex",x.style.flexDirection="column",x.getElementsByClassName("DIV-cy-tab-content")[0].style.flex="1",_=x.getElementsByClassName("DIV-cy-tab-content-pane"),E=0;E<_.length;E++)_[E].style.height="100%";S=c.getElementsByClassName("el-table__header-wrapper")[0],(D=c.getElementsByClassName("el-table__body-wrapper")[0]).addEventListener("scroll",(function(t){S.scrollLeft=t.target.scrollLeft})),$y._element.title.style.height="40px",$y._element.body.style.width="65%",$y._element.body.style.height="80%",$y._element.content.style.height="calc(100% - 40px)",$y._element.foot.style.display="none",D.style.height="calc(100% - ".concat(S.offsetHeight,"px)");case 64:case"end":return t.stop()}}),t)})));return function(e,i){return t.apply(this,arguments)}}();function eb(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return ib(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ib(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,r=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){r=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(r)throw s}}}}function ib(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function nb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ob(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?nb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):nb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function sb(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function ab(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function rb(t,e){return t.get(cb(t,e))}function lb(t,e,i){return t.set(cb(t,e),i),i}function cb(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var ub=i(38),pb=new WeakMap,hb=new WeakMap,db=new WeakMap,mb=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(k()(this,e),ab(i=sb(this,e,[t,n]),pb,void 0),ab(i,hb,!1),ab(i,db,[]),i.viewer=t.viewer,!i.options.path)return i.error="未提供路径!",window.ELEMENT&&(window.ELEMENT.Message.closeAll(),window.ELEMENT.Message({message:i.error,type:"warning",duration:1500})),console.warn(i.error),Wi()(i);for(var s in i.colors=ub,i.options.head_tables=n.head_tables||[],i.options.fileName=n.fileName||"未命名对象",i.options.path.endsWith(".kml")||(i.options.color=n.color||"rgba(0,255,184,0.5)",i.options.opacity=n.opacity||0===n.opacity?n.opacity:1),i.options.show=!n.show&&!1!==n.show||n.show,i.total=0,i.page=1,i.pageSize=20,i.currentData=[],i.data=[],i.list=[],i.imgEntity=[],i.Dialog=o,i._elms={},i.sdk.addIncetance(i.options.id,i),i.disaster_type_colors=ub[i.options.disaster_type]?ob({},ub[i.options.disaster_type]):void 0,i.disaster_type_colors)i.disaster_type_colors[s]=i.cmykToRgb(i.disaster_type_colors[s]);return i}return Xi()(e,t),_()(e,[{key:"type",get:function(){return"vector"}},{key:"show",get:function(){return this.options.show},set:function(t){this.setShow(t)}},{key:"opacity",get:function(){return this.options.opacity},set:function(t){this.options.opacity=t,this.entity&&this.entity.entities.values.forEach((function(e){e.point&&(e.point.color=e.point.color._value.withAlpha(t)),e.polygon&&(e.polygon.material=e.polygon.material.color._value.withAlpha(t)),e.polyline&&(e.polyline.material=e.polyline.material.color._value.withAlpha(t))}))}},{key:"on",value:function(){if(this.sdk&&this.viewer&&this.options.path)return this.init()}},{key:"init",value:(l=o()(a.a.mark((function t(){var i,n,o,s,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="",this.options.host=this.options.host||h(),i=this.options.host.endsWith("yjearth4.0")?this.options.host+"/api/v1/vector/load2":this.options.host+"/yjearth4.0/api/v1/vector/load2",i+="?path="+this.options.path,t.next=6,fetch(i,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}});case 6:if(200!==(n=t.sent).status){t.next=17;break}return t.next=10,n.arrayBuffer();case 10:return o=t.sent,s=new Uint8Array(o),r=this.decompressGzip(s),0===this.data.length&&(this.data=JSON.parse(r)),t.next=16,this.formatData();case 16:return t.abrupt("return",e.create(this));case 17:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"formatData",value:(r=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=[],i=function(t,e,n){if(t)if(Array.isArray(t)){for(var o=!1,s=0;s<t.length;s++){if("object"!==N()(t[s])){o=!0;break}i(t[s],e,n)}if(o){var a=Number(t[0]),r=Number(t[1]),l=proj4(e,n,[a,r]);t[0]=Number(l[0].toFixed(10)),t[1]=Number(l[1].toFixed(10))}}else t instanceof Object&&(i(t.coordinates,e,n),i(t.geometries,e,n))},n=0;n<this.data.list.length;n++){o=eb(this.name_map);try{for(o.s();!(s=o.n()).done;)(r=y()(s.value,2))[0],(l=r[1]).def===this.data.list[n].crs_src&&l.epsg,l.def===this.data.list[n].crs_dst&&l.epsg}catch(t){o.e(t)}finally{o.f()}for(c=0;c<this.data.list[n].features.length;c++)this.data.list[n].features[c].properties.id,this.data.list[n].features[c].properties||(this.data.list[n].features[c].properties={}),this.data.list[n].features[c].properties.id||(this.data.list[n].features[c].properties.id=Cesium.createGuid()),this.data.list[n].features[c].id=this.data.list[n].features[c].properties.id,i(this.data.list[n].features[c].geometry,this.data.list[n].crs_src,this.data.list[n].crs_dst||"+proj=longlat +datum=WGS84 +no_defs"),this.data.list[n].features[c].geometry.geometries||(this.data.list[n].features[c].geometry.geometries=[]),(u=turf.bbox(this.data.list[n].features[c].geometry))&&u[0]&&u[0]!=1/0&&(this.data.list[n].features[c].geometry.range=turf.bbox(this.data.list[n].features[c])),e.push(this.data.list[n].features[c])}this.geojson={type:"FeatureCollection",features:e};case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"fileName",get:function(){return this.options.fileName},set:function(t){this.options.fileName=t,this._elms.fileName&&(this._elms.fileName.value=t)}},{key:"field",get:function(){return this.options.field},set:function(t){this.options.field=t;for(var e=t,i=0;i<this.options.head_tables.length;i++)if(this.options.head_tables[i].key===t){e=this.options.head_tables[i].label;break}this._elms.field&&(this._elms.field.value=e)}},{key:"img",get:function(){return this.options.img},set:function(t){Array.isArray(t)||(t=[t]),this.options.img=t,e.createImage(this)}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t,this.entity&&this.entity.entities.values.forEach((function(i){i.point&&(i.point.color=Cesium.Color.fromCssColorString(t).withAlpha(e.opacity)),i.polygon&&(i.polygon.material=Cesium.Color.fromCssColorString(t).withAlpha(e.opacity)),i.polyline&&(i.polyline.material=Cesium.Color.fromCssColorString(t).withAlpha(e.opacity))}))}},{key:"onRightClick",set:function(t){t&&"function"!=typeof t?console.error("val:",t,"不是一个function"):(null==this.rightClickCallBack&&this.options&&this.options.id&&mt(this.options.id,this.rightClickCB,this),this.rightClickCallBack=t)}},{key:"leftClickCB",value:function(t,e,i,n){n.clickCallBack&&"function"==typeof n.clickCallBack&&n.clickCallBack(t,e,i)}},{key:"edit",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b,C=this,w=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=w.length>0&&void 0!==w[0]&&w[0],i=w.length>1&&void 0!==w[1]?w[1]:{},this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=74;break}return t.next=7,new Ki(this.sdk,this.options,{title:"编辑属性",left:"180px",top:"100px",confirmCallBack:function(t){C.fileName=C.fileName.trim(),C.fileName||(C.fileName="未命名对象"),C.originalOptions.fileName=C.fileName,C.originalOptions.field=C.field,C._DialogObject.close(),i.confirmCallBack&&i.confirmCallBack({id:C.options.id,fileName:C.originalOptions.fileName,field:C.originalOptions.field})},closeCallBack:function(){C.reset(),i.closeCallBack&&i.closeCallBack()}});case 7:this._DialogObject=t.sent,n='\n <div class="row">\n <div class="col">\n <span class="label">文件名称:</span>\n <input class="input flie-name" type="text">\n </div>\n </div>\n <div class="row">\n <div class="col key-box">\n <span class="label">名称字段选择:</span>\n <div class="key"></div>\n </div>\n </div>\n ',(o=document.createElement("div")).innerHTML=n,this._DialogObject.contentAppChild(o),(s=o.getElementsByClassName("flie-name")[0]).value=this.options.fileName,s.addEventListener("input",(function(){C.options.fileName=s.value})),r=[],t.t0=a.a.keys(this.geojson.features[0].properties);case 17:if((t.t1=t.t0()).done){t.next=31;break}l=t.t1.value,c=l,u=0;case 21:if(!(u<this.options.head_tables.length)){t.next=28;break}if(this.options.head_tables[u].key!==l){t.next=25;break}return c=this.options.head_tables[u].label,t.abrupt("break",28);case 25:u++,t.next=21;break;case 28:r.push({name:c,value:c,key:l}),t.next=17;break;case 31:if(!(p=Y(o.getElementsByClassName("key-box")[0],".key"))){t.next=47;break}p.legp_search(r),(h=o.getElementsByClassName("key")[0].getElementsByTagName("input")[0]).value=this.field,d=0;case 37:if(!(d<r.length)){t.next=45;break}if(r[d].key!=this.field){t.next=42;break}return h.value=r[d].value,p.legp_searchActive(r[d].value),t.abrupt("break",45);case 42:d++,t.next=37;break;case 45:h.addEventListener("input",(function(){for(var t=0;t<r.length;t++)if(r[t].value===h.value){C.options.field=r[t].key;break}})),this._elms.field=h;case 47:return this._elms.fileName=s,t.abrupt("return");case 52:if((t.t3=t.t2()).done){t.next=67;break}v=t.t3.value,g=v,y=0;case 56:if(!(y<this.options.head_tables.length)){t.next=63;break}if(this.options.head_tables[y].key!==v){t.next=60;break}return g=this.options.head_tables[y].label,t.abrupt("break",63);case 60:y++,t.next=56;break;case 63:b='<option value="'.concat(v,'">').concat(g,"</option>"),f+=b,t.next=52;break;case 67:m.innerHTML=f,m.value=this.options.field,m.addEventListener("input",(function(){C.options.field=m.value})),this._elms.fileName=s,this._elms.field=m,t.next=75;break;case 74:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 75:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"editById",value:(n=o()(a.a.mark((function t(){var e,i,n,s,r,l,c,u,p,h,d,m,f,v,g,y,b=this,C=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=C.length>0&&void 0!==C[0]&&C[0],i=C.length>1?C[1]:void 0,n=C.length>2&&void 0!==C[2]?C[2]:{},this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),s="",!e){t.next=48;break}l={},c=0;case 8:if(!(c<this.geojson.features.length)){t.next=16;break}if(this.geojson.features[c].id!==i){t.next=13;break}return this.geojson.features[c].content&&(l=this.deepCopyObj(this.geojson.features[c].content)),r=c,t.abrupt("break",16);case 13:c++,t.next=8;break;case 16:return l.id=l.id||i,l.link||(l.link={}),l.link.content||(l.link.content=[]),l.camera||(l.camera=[]),l.richTextContent||(l.richTextContent=""),l.attributeType=l.attributeType||"richText",t.next=24,new Ki(this.sdk,l,{title:"编辑属性",left:"180px",top:"100px",confirmCallBack:function(){b._DialogObject.close(),b.geojson.features[r].content=b.deepCopyObj(b._DialogObject.attribute),n.confirmCallBack&&n.confirmCallBack(b._DialogObject.attribute)},closeCallBack:function(){n.closeCallBack&&n.closeCallBack()}});case 24:for(this._DialogObject=t.sent,this._DialogObject.event=n,this._DialogObject.attribute=this.deepCopyObj(l),u='\n <div class="row">\n <div class="col">\n <span class="label">内容类型:</span>\n <select class="input input-select attribute-select" style="width: 120px;">\n <option value="richText">富文本</option>\n \x3c!--<option value="link">链接</option>\n <option value="camera">摄像头</option>\n <option value="sensor">传感器</option>\n <option value="vr">全景图</option>--\x3e\n </select>\n </div>\n <div class="col attribute-content attribute-content-link">\n <div class="input-group">\n <input class="input link_add" type="text">\n <button class="link_add_btn">+</button>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-richText">\n <span>编辑内容:<button class="open-richText-btn">打开文本编辑器</button></span>\n </div>\n <div class="attribute-content attribute-content-link">\n <div class="table">\n <div class="table-head">\n <div class="tr">\n <div class="th">名称</div>\n <div class="th">链接</div>\n <div class="th">操作</div>\n </div>\n </div>\n <div class="table-body">\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class="attribute-content attribute-content-camera">\n <div class="row">\n <div class="col">\n <span class="label">编辑内容:</span>\n <input class="input camera-name" type="text" style="width: 100px;">\n <button class="select btn camera-select">搜索</button>\n </div>\n </div>\n <div>\n <div class="table camera-table">\n <div class="table-head">\n <div class="tr">\n <div class="th">操作</div>\n <div class="th">设备名称</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">设备类型</div>\n <div class="th" style="width: 126px; flex: 0 126px;min-width: 126px;">设备IP</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">设备端口</div>\n <div class="th" style="width: 80px; flex: 0 80px;min-width: 80px;">用户名</div>\n <div class="th">密码</div>\n </div>\n </div>\n <div class="table-body" style="display:none;">\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="2">\n <span>绑定</span>\n </div>\n <div class="td">设备名称</div>\n <div class="td">设备类型</div>\n <div class="td">设备IP</div>\n <div class="td">设备端口</div>\n <div class="td">用户名</div>\n <div class="td">密码</div>\n </div>\n </div>\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n <div class=""row>\n <ul class="pagination"></ul>\n </div>\n </div>\n ',(p=document.createElement("div")).innerHTML=u,this._DialogObject.contentAppChild(p),p.getElementsByTagName("*"),this._DialogObject._element.body.style.width="600px",h=p.getElementsByClassName("attribute-select")[0],d=p.getElementsByClassName("link_add_btn")[0],m=p.getElementsByClassName("open-richText-btn")[0],f=this._DialogObject._element.content.getElementsByClassName("attribute-content"),v=0;v<f.length;v++)f[v].className.indexOf("attribute-content-"+this._DialogObject.attribute.attributeType)>-1?f[v].style.display="block":f[v].style.display="none";h.addEventListener("change",(function(){b._DialogObject.attribute.attributeType=h.value;for(var t=0;t<f.length;t++)f[t].className.indexOf("attribute-content-"+b._DialogObject.attribute.attributeType)>-1?f[t].style.display="block":f[t].style.display="none"})),d.addEventListener("click",o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b._DialogObject._element.content.getElementsByClassName("link_add")[0].value?(b._DialogObject.attribute.link.content.push({name:"链接",url:b._DialogObject._element.content.getElementsByClassName("link_add")[0].value}),b._DialogObject._element.content.getElementsByClassName("link_add")[0].value="",b.setAttributeLinkById(i,b._DialogObject.attribute.link.content)):n.clickAddLink&&n.clickAddLink(i);case 1:case"end":return t.stop()}}),t)})))),m.addEventListener("click",(function(){wn.open(i,i,b._DialogObject.attribute.richTextContent),wn.primaryCallBack=function(t){b._DialogObject.attribute.richTextContent=t}})),g=p.getElementsByClassName("camera-name")[0],y=p.getElementsByClassName("camera-select")[0],g.addEventListener("input",(function(){s=g.value})),this.cameraSelect&&this.cameraSelect(s),y.addEventListener("click",(function(){b.cameraSelect&&b.cameraSelect(s)})),t.next=49;break;case 48:this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null);case 49:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"editContentById",value:function(t,e){for(var i=0;i<this.geojson.features.length;i++)if(this.geojson.features[i].id===t){this.geojson.features[i].content=e;break}}},{key:"reset",value:function(){this.fileName=this.originalOptions.fileName,this.field=this.originalOptions.field}},{key:"addAttributeLinkById",value:function(t,e,i){this._DialogObject&&this._DialogObject.attribute&&this._DialogObject.attribute.id==t&&(i||0===i?this._DialogObject._element.body.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("tr")[i+1].getElementsByClassName("file-select")[0].value=e:(this._DialogObject.attribute.link.content.push({name:"链接",url:e}),this.setAttributeLinkById(t,this._DialogObject.attribute.link.content)))}},{key:"setAttributeLinkById",value:function(t,e){var i,n=this;if(this._DialogObject&&this._DialogObject.attribute&&this._DialogObject.attribute.id==t){this._DialogObject.attribute.link.content=e;var s=this._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],r=s.getElementsByClassName("table-body")[0];r.innerHTML="",this._DialogObject.attribute.link.content.length>0?s.getElementsByClassName("table-empty")[0].style.display="none":s.getElementsByClassName("table-empty")[0].style.display="flex";for(var l=0;l<this._DialogObject.attribute.link.content.length;l++){var c='\n <div class="tr">\n <div class="td">'+this._DialogObject.attribute.link.content[l].name+'</div>\n <div class="td">'+this._DialogObject.attribute.link.content[l].url+'</div>\n <div class="td">\n <button @click="linkEdit">编辑</button>\n <button @click="linkDelete">删除</button>\n </div>\n </div>',u=document.createRange().createContextualFragment(c);r.appendChild(u)}for(var p=r.getElementsByClassName("tr"),h={linkEdit:(i=o()(a.a.mark((function e(i){var o,s,r,l,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.setAttributeLinkById(t,n._DialogObject.attribute.link.content);case 2:o=n._DialogObject._element.content.getElementsByClassName("attribute-content-link")[1].getElementsByClassName("table")[0],s=o.getElementsByClassName("table-body")[0],r=s.getElementsByClassName("tr"),l=a.a.mark((function t(e){var o,s,l,c,u,p;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i!==e){t.next=33;break}r[e].innerHTML='\n <div class="td">\n <input class="input" type="text">\n </div>\n <div class="td">\n <div class="input-group">\n <input class="input file-select" type="text" style="width: 200px;">\n <button @click="fileSelect">...</button>\n </div>\n </div>\n <div class="td">\n <button @click="confirmEdit">确认</button>\n <button @click="cancelEdit">取消</button>\n </div>',(o=r[e].getElementsByClassName("td"))[0].getElementsByClassName("input")[0].value=n._DialogObject.attribute.link.content[i].name,o[1].getElementsByClassName("input")[0].value=n._DialogObject.attribute.link.content[i].url,s=r[e].getElementsByTagName("button"),l=0;case 8:if(!(l<s.length)){t.next=32;break}if(s[l]&&s[l].attributes){t.next=11;break}return t.abrupt("continue",29);case 11:c=eb(s[l].attributes),t.prev=12,p=a.a.mark((function t(){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("@click"!==(i=u.value).name){t.next=5;break}return s[l].addEventListener("click",(function(t){"function"==typeof h[i.value]&&h[i.value]({name:o[0].getElementsByClassName("input")[0].value,url:o[1].getElementsByClassName("input")[0].value},e)})),s[l].attributes.removeNamedItem(i.name),t.abrupt("return",1);case 5:case"end":return t.stop()}}),t)})),c.s();case 15:if((u=c.n()).done){t.next=21;break}return t.delegateYield(p(),"t0",17);case 17:if(!t.t0){t.next=19;break}return t.abrupt("break",21);case 19:t.next=15;break;case 21:t.next=26;break;case 23:t.prev=23,t.t1=t.catch(12),c.e(t.t1);case 26:return t.prev=26,c.f(),t.finish(26);case 29:l++,t.next=8;break;case 32:return t.abrupt("return",1);case 33:case"end":return t.stop()}}),t,null,[[12,23,26,29]])})),c=0;case 7:if(!(c<r.length)){e.next=14;break}return e.delegateYield(l(c),"t0",9);case 9:if(!e.t0){e.next=11;break}return e.abrupt("break",14);case 11:c++,e.next=7;break;case 14:case"end":return e.stop()}}),e)}))),function(t){return i.apply(this,arguments)}),linkDelete:function(e){n._DialogObject.attribute.link.content.splice(e,1),n.setAttributeLinkById(t,n._DialogObject.attribute.link.content)},confirmEdit:function(e,i){n._DialogObject.attribute.link.content[i]=e,n.setAttributeLinkById(t,n._DialogObject.attribute.link.content)},cancelEdit:function(){n.setAttributeLinkById(t,n._DialogObject.attribute.link.content)},fileSelect:function(e,i){n._DialogObject.event&&n._DialogObject.event.clickAddLink&&n._DialogObject.event.clickAddLink(t,i)}},d=function(t){for(var e=p[t].getElementsByTagName("button"),i=0;i<e.length;i++)if(e[i]&&e[i].attributes){var n,o=eb(e[i].attributes);try{var s=function(){var o=n.value;if("@click"===o.name)return e[i].addEventListener("click",(function(e){"function"==typeof h[o.value]&&h[o.value](t)})),e[i].attributes.removeNamedItem(o.name),1};for(o.s();!(n=o.n()).done&&!s(););}catch(t){o.e(t)}finally{o.f()}}},m=0;m<p.length;m++)d(m)}for(var f=0;f<this.dataArray.length;f++)if(this.dataArray[f].attr.id===t){this.dataArray[f].content&&(this.opt_DialogObject.attribute.link.content=v);break}}},{key:"getAllNode",value:function(){return this.data}},{key:"openAllNodeList",value:function(){Qy(this)}},{key:"openNodeListById",value:function(t){tb(this,t)}},{key:"flyTo",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ii(0),Je(this.sdk),qe(this.sdk),t)for(var n=function(n){if(e.geojson.features[n].id===t)if("Point"===e.geojson.features[n].geometry.type)e.getClampToHeight({lng:e.geojson.features[n].geometry.coordinates[0],lat:e.geojson.features[n].geometry.coordinates[1]}).then((function(t){e.sdk.viewer.camera.flyTo({orientation:i.orientation,destination:Cesium.Cartesian3.fromDegrees(e.geojson.features[n].geometry.coordinates[0],e.geojson.features[n].geometry.coordinates[1],t+(i.height||500))})}));else{var o=e.geojson.features[n].geometry.range;if(o){var s=[];e.getClampToHeight({lng:o[0],lat:o[1]}).then((function(t){var n=Cesium.Cartesian3.fromDegrees(o[0],o[1],t);s.push(n.x,n.y,n.z),e.getClampToHeight({lng:o[2],lat:o[3]}).then((function(t){var n=Cesium.Cartesian3.fromDegrees(o[2],o[3],t);s.push(n.x,n.y,n.z);var a=Cesium.BoundingSphere.fromVertices(s);e.sdk.viewer.camera.flyToBoundingSphere(a,{offset:i.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}})}))}))}}},o=0;o<this.geojson.features.length;o++)n(o);else if(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation){var s={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},a=this.options.customView.relativePosition.lng,r=this.options.customView.relativePosition.lat,l=this.options.customView.relativePosition.alt,c=Cesium.Cartesian3.fromDegrees(a,r,l);this.sdk.viewer.camera.flyTo({destination:c,orientation:s})}else if(this.range){var u=[];this.getClampToHeight({lng:this.range[0],lat:this.range[1]}).then((function(t){var n=Cesium.Cartesian3.fromDegrees(e.range[0],e.range[1],t);u.push(n.x,n.y,n.z),e.getClampToHeight({lng:e.range[2],lat:e.range[3]}).then((function(t){var n=Cesium.Cartesian3.fromDegrees(e.range[2],e.range[3],t);u.push(n.x,n.y,n.z);var o=Cesium.BoundingSphere.fromVertices(u);e.sdk.viewer.camera.flyToBoundingSphere(o,{offset:i.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}})}))}))}}},{key:"setShow",value:function(t,e){if(e){if(!this.entity)return;for(var i=0;i<this.entity.entities.values.length;i++)if(this.entity.entities.values[i].id&&this.entity.entities.values[i].id.startsWith(e)){this.entity.entities.values[i].show=t,this.entity.entities.values[i]._customShow=t,re(this.sdk,this.options.id,this.entity.entities.values[i].id);break}be(this.sdk,this.options.id)}else{if(this.options.show=t,!this.entity)return;for(var n=0;n<this.entity.entities.values.length;n++)this.entity.entities.values[n].show=t,this.entity.entities.values[n]._customShow=t,re(this.sdk,this.options.id,this.entity.entities.values[n].id);be(this.sdk,this.options.id)}}},{key:"setShowImg",value:function(t,e){if(e||0===e){for(var i=0;i<this.imgEntity.length;i++)if(i==e){this.imgEntity[i].show=t;break}}else for(var n=0;n<this.imgEntity.length;n++)this.imgEntity[n].show=t}},{key:"remove",value:(i=o()(a.a.mark((function t(){var e=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.entity&&this.entity.entities.values.forEach((function(t){li(e.sdk.viewer,t)})),lb(db,this,[]),this.removeImage(),this.entity=null,this.geojson={},this.data={},t.next=8,this.sdk.removeIncetance(this.options.id);case 8:return t.next=10,re(this.sdk,this.options.id);case 10:return t.next=12,be(this.sdk,this.options.id);case 12:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"removeImage",value:function(){for(var t=0;t<this.imgEntity.length;t++)this.sdk.viewer.entities.remove(this.imgEntity[t]);this.imgEntity=[]}},{key:"cameraSelect",value:function(t,e){var i=this,n={1:"海康",2:"大华"},o=this.options.host;if(this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content){var s=that._DialogObject._element.content.getElementsByClassName("pagination")[0],a=that._DialogObject._element.content.getElementsByClassName("attribute-content-camera")[0];if(s&&a){kn(s,1,10,1);var r="",l={cameraName:t,page:e&&"object"!==N()(e)?e:1,pageSize:5},c=new URLSearchParams(l).toString();r=o.endsWith("yjearth4.0")?"".concat(o,"/api/v1/cameraData/list?").concat(c):"".concat(o,"/yjearth4.0/api/v1/cameraData/list?").concat(c),fetch(r,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then((function(e){200===e.status&&e.json().then((function(e){if(200===e.code||0===e.code){if(!i._DialogObject||!i._DialogObject._element||!i._DialogObject._element.content)return;var o=i._DialogObject._element.content.getElementsByClassName("pagination")[0],s=i._DialogObject._element.content.getElementsByClassName("camera-table")[0],a=s.getElementsByClassName("table-body")[0];if(a.innerHTML="",e.data){if(e.data.list&&e.data.list.length>0){kn(o,e.data.total,10,1,(function(e){i.cameraSelect&&i.cameraSelect(t,e)})),s.getElementsByClassName("table-empty")[0].style.display="none",a.style.display="inline-flex";for(var r=function(t){var o='\n <div class="tr">\n <div class="td">\n <input type="checkbox" value="'.concat(e.data.list[t].ID,'">\n <span>绑定</span>\n </div>\n <div class="td">').concat(e.data.list[t].cameraName,'</div>\n <div class="td" style="width: 80px; flex: 0 80px; min-width: 80px;">').concat(n[e.data.list[t].type],'</div>\n <div class="td" style="width: 126px; flex: 0 126px;min-width: 126px;">').concat(e.data.list[t].ip,'</div>\n <div class="td" style="width: 80px; flex: 0 80px;min-width: 80px;">').concat(e.data.list[t].port,'</div>\n <div class="td" style="width: 80px; flex: 0 80px;min-width: 80px;">').concat(e.data.list[t].userName,'</div>\n <div class="td">').concat(e.data.list[t].passWord,"</div>\n </div>"),s=document.createRange().createContextualFragment(o),r=s.querySelector('input[type="checkbox"]');r.addEventListener("change",(function(){if(r.checked)i._DialogObject.attribute.camera.push(e.data.list[t]);else{var n=i._DialogObject.attribute.camera.filter((function(i){return i.ID!==e.data.list[t].ID}));i._DialogObject.attribute.camera=n}})),a.appendChild(s);for(var l=0;l<i._DialogObject.attribute.camera.length;l++)if(i._DialogObject.attribute.camera[l].ID===e.data.list[t].ID){r.checked=!0;break}},l=0;l<e.data.list.length;l++)r(l)}e.data&&e.data.total&&kn(o,e.data.total,10,1,(function(e){i.cameraSelect&&i.cameraSelect(t,e)}))}else kn(o,1,10,1),s.getElementsByClassName("table-empty")[0].style.display="flex",a.style.display="none"}else console.error(e.message)}))}))}}}},{key:"load",value:function(t){rb(hb,this)?t():lb(pb,this,t)}},{key:"flicker",value:function(){}}],[{key:"create",value:function(t){var i=turf.bbox(t.geojson);i&&i[0]&&i[0]!=1/0&&(t.range=i),t.options.img&&e.createImage(t);if(!t.options.path.endsWith(".kml")&&!t.options.path.endsWith(".kmz")){return(new Cesium.GeoJsonDataSource).load(t.geojson,{clampToGround:!0}).then((function(t){o(t)}))}var n="";function o(e){if(t.entity=e,e.entities.values.forEach((function(e,i){e.show=t.options.show,e.type="vector",e.parentId=t.options.id,e.properties||(e.properties={}),ri(t.sdk,e);var n=function(e){var i=t.options.color;return t.disaster_type_colors&&t.disaster_type_colors.hasOwnProperty(e)&&(i=t.disaster_type_colors[e]),i}(e.properties&&e.properties[t.options.fxdj]&&e.properties[t.options.fxdj]._value);if(e.billboard&&(e.billboard.heightReference=Cesium.HeightReference.CLAMP_TO_GROUND,e.point=new Cesium.PointGraphics({show:!0,color:Cesium.Color.fromCssColorString(n||"rgba(0,255,184,0.5)").withAlpha(t.opacity),pixelSize:10,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:Number.POSITIVE_INFINITY}),!1)})),e.polyline){var o=e.polyline.material;n&&(o=Cesium.Color.fromCssColorString(n).withAlpha(t.opacity)),e.polyline=new Cesium.PolylineGraphics({positions:e.polyline.positions._value,width:e.polyline.width&&e.polyline.width.getValue(),clampToGround:!0,material:o,zIndex:t.sdk._entityZIndex})}if(e.polygon&&e.polygon.material){e.polygon.perPositionHeight=!1,e.polygon.extrudedHeight=void 0;var s=e.polygon.material.color._value;n&&(s=Cesium.Color.fromCssColorString(n)),(t.opacity||0===t.opacity)&&(s=s.withAlpha(t.opacity));var a=e.kml||e.kmz;if(a){var r=a.extendedData&&a.extendedData.BaseTexturePath&&a.extendedData.BaseTexturePath.value?a.extendedData.BaseTexturePath.value:void 0;r&&(e.polygon.material.image=r,e.polygon.material.repeat=new Cesium.Cartesian2(1,1)),e.polygon.material=new Cesium.ImageMaterialProperty({image:r,repeat:new Cesium.Cartesian2(1,1),color:s})}if(e.polygon.zIndex=t.sdk._entityZIndex,t.options.path.endsWith(".kml")||t.options.path.endsWith(".kmz")){var l=n?Cesium.Color.fromCssColorString("#000000"):e.polygon.outlineColor.getValue();(t.opacity||0===t.opacity)&&(l=l.withAlpha(t.opacity)),e.polygon.outlineWidth&&(e.polyline=new Cesium.PolylineGraphics({positions:e.polygon.hierarchy._value.positions,width:e.polygon.outlineWidth.getValue(),clampToGround:!0,material:l,zIndex:t.sdk._entityZIndex}))}else e.polyline=new Cesium.PolylineGraphics({positions:e.polygon.hierarchy._value.positions,width:1,clampToGround:!0,material:Cesium.Color.fromCssColorString("#000000").withAlpha(t.opacity),zIndex:t.sdk._entityZIndex}),e.point&&(e.label=new Cesium.LabelGraphics({text:new Cesium.CallbackProperty((function(){return e.properties[t.options.field]&&e.properties[t.options.field]._value+""}),!1),outlineColor:Cesium.Color.BLACK,outlineWidth:10,font:"16px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#ffeb3b"),verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffset:new Cesium.Cartesian2(0,-15),style:Cesium.LabelStyle.FILL_AND_OUTLINE,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:Number.POSITIVE_INFINITY}),!1)}));t.sdk._entityZIndex++}if(t.options.path.endsWith(".kml")||t.options.path.endsWith(".kmz")){if(e.label){e.label.font="16px Microsoft YaHei";var c=t.geojson.features[i];e.billboard.heightReference=Cesium.HeightReference.CLAMP_TO_GROUND,e.properties=c?c.properties:{},e.properties.id||e.properties.Id||e.properties.ID||e.properties.addProperty("id",e.id),e.label.text=new Cesium.CallbackProperty((function(){return e.properties[t.options.field]&&e.properties[t.options.field]._value+""}),!1)}}else e.point&&(e.label=new Cesium.LabelGraphics({text:new Cesium.CallbackProperty((function(){return e.properties[t.options.field]&&e.properties[t.options.field]._value+""}),!1),outlineColor:Cesium.Color.BLACK,outlineWidth:10,font:"16px Microsoft YaHei",fillColor:Cesium.Color.fromCssColorString("#ffeb3b"),verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffset:new Cesium.Cartesian2(0,-15),style:Cesium.LabelStyle.FILL_AND_OUTLINE,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:new Cesium.CallbackProperty((function(){return Ye()?void 0:Number.POSITIVE_INFINITY}),!1)}))})),!t.options.field){var i=["id","Id","ID","name","Name","NAME","address","Address","ADDRESS","text","Text","TEXT","label","Label","LABEL"].find((function(e){return void 0!==t.geojson.features[0].properties[e]}));if(i)t.options.field=i;else for(var n in t.geojson.features[0].properties){t.options.field=n;break}}lb(hb,t,!0),rb(pb,t)&&rb(pb,t).call(t)}t.options.host=t.options.host||h(),n=t.options.host.endsWith("yjearth4.0")?t.options.host+"/api/v1/vector/getKml":t.options.host+"/yjearth4.0/api/v1/vector/getKml",n+="?path="+t.options.path,fetch(n,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then((function(e){200===e.status&&e.blob().then((function(e){e.text().then((function(e){if(t.options.path.endsWith(".kmz"))e=n;else for(var i=(e=(new DOMParser).parseFromString(e,"text/xml")).getElementsByTagName("Placemark"),s=0;s<i.length;s++)i[s].id=t.geojson.features[s].id;Cesium.KmlDataSource.load(e,{camera:t.viewer.scene.camera,canvas:t.viewer.scene.canvas,clampToGround:!0}).then((function(t){o(t)}))}))}))}))}},{key:"createImage",value:function(t){if(t.removeImage(),t.range)for(var e=0;e<t.options.img.length;e++){var i,n=t.sdk.viewer.entities.add({show:t.options.show,rectangle:{coordinates:(i=Cesium.Rectangle).fromDegrees.apply(i,L()(t.range)),material:new Cesium.ImageMaterialProperty({image:t.options.img[e],transparent:!0})}});t.imgEntity.push(n)}}},{key:"getcanvas",value:function(t){var e=document.createElement("canvas"),i=e.getContext("2d");i.font="16px YaHei";for(var n=t.split("\n"),o=0,s=0,a=0;a<n.length;a++){var r=n[a],l=i.measureText(r).width;l>o&&(o=l),s+=16}s=s+10+5*(n.length-1),o+=30,e.width=o,e.height=s;var c=i.createLinearGradient(0,0,o,s);return i.fillStyle=c,i.fillRect(0,0,o,s),i.fillStyle="#ffffff",i.font="16px YaHei",i.strokeStyle="#000000",i.strokeText(n,15,16*n.length+6.25+5*n.length),i.fillText(n,15,16*n.length+6.25+n.length-5),i.moveTo(o/2,s),i.stroke(),i.closePath(),e.toDataURL()}},{key:"createTableContent",value:function(t){for(var e="",i=0;i<t.currentData.length;i++){var n='<tr class="el-table__row">',o="";for(var s in t.currentData[i].attr)o+='<td rowspan="1" colspan="1" class="el-table_1_column_'.concat(i,' el-table__cell"><div class="cell">').concat(t.currentData[i].attr[s],"</div></td>");e+=n=n+o+"</tr>"}return e}}]);var i,n,s,r,l}(jn);function fb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function vb(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?fb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function gb(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var yb=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};k()(this,e),(i=gb(this,e,[t,n])).options.text=n.text||"未命名对象";for(var s=i.options.text.split("\n"),a=0;a<s.length;a++)s[a].length>80&&(s[a]=s[a].slice(0,80-s[a].length));if(s.length>70&&s.splice(70-s.length),i.options.text=s.join("\n"),i.options.name=i.options.text,i.options.show=!n.show&&!1!==n.show||n.show,i.options.angle=n.angle||0,i.options.scale=n.scale||0===n.scale?n.scale:1,i.options.fontSize=n.fontSize||20,i.options.duration=n.duration||0===n.duration?n.duration:5e4,i.options.speed=n.speed||0===n.speed?n.speed:1,i.options.color=n.color||"#FFC107",i.options.position=n.position,!i.options.position&&i.options.positions){var r=function(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.atan2(n,i)};i.options.position={lng:(i.options.positions[0].lng+i.options.positions[1].lng)/2,lat:(i.options.positions[0].lat+i.options.positions[1].lat)/2};var l=turf.point([i.options.positions[0].lng,i.options.positions[0].lat]),c=turf.point([i.options.positions[1].lng,i.options.positions[1].lat]),u={units:"miles"},p=turf.rhumbDistance(l,c,u),h=r([i.options.positions[0].lng,i.options.positions[0].lat],[i.options.positions[1].lng,i.options.positions[1].lat]);i.options.angle=(360+Cesium.Math.toDegrees(h))%360;var d=1e-4*Math.abs(Math.cos(Math.PI/180*i.options.position.lat)),m=i.getcanvas(),f=m.height/m.width,v=i.options.position.lng-1e-4/f,g=i.options.position.lat-d,y=i.options.position.lng+1e-4/f,b=i.options.position.lat+d,C=(g+b)/2,w=turf.point([v,C]),x=turf.point([y,C]),_=turf.rhumbDistance(w,x,u),E=Cesium.Math.toRadians(i.options.position.lat);_*=1+Math.abs(Math.sin(h)*Math.tan(E)*Math.sin(E)*Math.sin(E)),i.options.scale=p/_}return i.entity,i._positionEditing=!1,i.Dialog=o,i._EventBinding=new hn,i._elms={},i.previous={position:vb({},i.options.position)},i.event=new X(i.sdk),i.sdk.addIncetance(i.options.id,i),i.create(),i}return Xi()(e,t),_()(e,[{key:"lng",get:function(){return this.options.position.lng},set:function(t){this.options.position.lng=t,this._elms.lng&&this._elms.lng.forEach((function(e){e.value=t}))}},{key:"lat",get:function(){return this.options.position.lat},set:function(t){this.options.position.lat=t,this._elms.lat&&this._elms.lat.forEach((function(e){e.value=t}))}},{key:"text",get:function(){return this.options.text},set:function(t){var e=this;this.options.text=t;for(var i=this.options.text.split("\n"),n=0;n<i.length;n++)if(i[n].length>80){window.ELEMENT&&window.ELEMENT.Message({message:"行超过80个字符,请按回车(Enter)后,继续输入",type:"warning",duration:1e3}),i[n]=i[n].slice(0,80-i[n].length)}if(i.length>70){i.splice(70-i.length);window.ELEMENT&&window.ELEMENT.Message({message:"超过最大输入字符",type:"warning",duration:1e3})}if(this.options.text=i.join("\n"),this.entity){var o=this.getcanvas(),s=o.height/o.width;this.entity.rectangle.material=new Cesium.CustomMaterialSource({image:o.toDataURL("image/png"),color:this.options.color,repeat:new Cesium.Cartesian2(1,1),duration:this.options.duration/this.options.speed,fltr:!1,is2D:this.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE2D}),this.entity.rectangle.coordinates=new Cesium.CallbackProperty((function(){var t,i=Math.abs(Math.cos(Math.PI/180*e.options.position.lat))*(1e-4*e.options.scale),n=[e.options.position.lng-1e-4*e.options.scale/s,e.options.position.lat-i,e.options.position.lng+1e-4*e.options.scale/s,e.options.position.lat+i];return(t=Cesium.Rectangle).fromDegrees.apply(t,n)}),!1)}this._elms.text&&this._elms.text.forEach((function(t){t.value=e.options.text}))}},{key:"angle",get:function(){return this.options.angle},set:function(t){this.options.angle=t,this._elms.angle&&this._elms.angle.forEach((function(e){e.value=t}))}},{key:"scale",get:function(){return this.options.scale},set:function(t){this.options.scale=t,this._elms.scale&&this._elms.scale.forEach((function(e){e.value=t}))}},{key:"duration",get:function(){return this.options.duration},set:function(t){this.options.duration=t;var e=this.getcanvas();this.entity.rectangle.material=new Cesium.CustomMaterialSource({image:e.toDataURL("image/png"),color:this.options.color,repeat:new Cesium.Cartesian2(1,1),duration:this.options.duration/this.options.speed,fltr:!1,is2D:this.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE2D}),this._elms.duration&&this._elms.duration.forEach((function(e){e.value=t}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){this.options.speed=t;var e=this.getcanvas();this.entity.rectangle.material=new Cesium.CustomMaterialSource({image:e.toDataURL("image/png"),color:this.options.color,repeat:new Cesium.Cartesian2(1,1),duration:this.options.duration/this.options.speed,fltr:!1,is2D:this.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE2D}),this._elms.speed&&this._elms.speed.forEach((function(e){e.value=t}))}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t;var i=this.getcanvas();this.entity.rectangle.material=new Cesium.CustomMaterialSource({image:i.toDataURL("image/png"),color:this.options.color,repeat:new Cesium.Cartesian2(1,1),duration:this.options.duration/this.options.speed,fltr:!1,is2D:this.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE2D}),this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"create",value:function(){var t=this,e=this.getcanvas(),i=e.height/e.width;this.entity=this.sdk.viewer.entities.add({id:this.options.id,show:this.options.show,rectangle:{coordinates:new Cesium.CallbackProperty((function(){var e,n=Math.abs(Math.cos(Math.PI/180*t.options.position.lat))*(1e-4*t.options.scale),o=[t.options.position.lng-1e-4*t.options.scale/i,t.options.position.lat-n,t.options.position.lng+1e-4*t.options.scale/i,t.options.position.lat+n];return(e=Cesium.Rectangle).fromDegrees.apply(e,o)}),!1),material:new Cesium.CustomMaterialSource({image:e.toDataURL("image/png"),color:this.options.color,repeat:new Cesium.Cartesian2(1,1),duration:this.options.duration/this.options.speed,fltr:!1,is2D:this.sdk.viewer.scene.mode===Cesium.SceneMode.SCENE2D}),rotation:new Cesium.CallbackProperty((function(){return Cesium.Math.toRadians(t.options.angle)}),!1),stRotation:new Cesium.CallbackProperty((function(){return Cesium.Math.toRadians(t.options.angle)}),!1)}}),"cesium-viewer 2d"===this.sdk.viewer._element.className&&(this.entity.rectangle.height=10),be(this.sdk,this.options.id),this.options.show&&Qt(0,this.options.id)}},{key:"edit",value:(s=o()(a.a.mark((function t(e){var i,n,o,s=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=18;break}return t.next=6,new Ki(this.sdk,this.originalOptions,{title:"贴地文字属性",left:"180px",top:"100px",confirmCallBack:function(t){s.text=s.text.trim(),s.text||(s.text="未命名对象"),s.originalOptions=s.deepCopyObj(s.options),s._DialogObject.close(),s.Dialog.confirmCallBack&&s.Dialog.confirmCallBack(s.originalOptions),be(s.sdk,s.options.id),re(s.sdk,s.options.id)},resetCallBack:function(){s.reset(),s.Dialog.resetCallBack&&s.Dialog.resetCallBack()},removeCallBack:function(){s.Dialog.removeCallBack&&s.Dialog.removeCallBack()},closeCallBack:function(){s.reset(),s.positionEditing=!1,s.Dialog.closeCallBack&&s.Dialog.closeCallBack()},showCallBack:function(t){s.show=t,s.Dialog.showCallBack&&s.Dialog.showCallBack()},translationalCallBack:function(){s.positionEditing=!s.positionEditing}},!0);case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" ground-text",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <textarea @model="text"></textarea>\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">旋转角度</span>\n <input type="range" max="360" min="0" step="1" @model="angle">\n <div class="input-number input-number-unit" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0" max="360" step="1" @model="angle">\n <span class="unit">°</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">调整大小</span>\n <input type="range" max="100000" min="0" step="0.01" @model="scale">\n <div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0" max="100000" step="0.01" @model="scale">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">滚动速度</span>\n <input type="range" max="100" min="0" step="1" @model="speed">\n <div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">\n <input class="input" type="number" title="" min="0" max="100" step="1" @model="speed">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=i.getElementsByTagName("*"),this._EventBinding.on(this,n),this._elms=this._EventBinding.element,o=new YJColorPicker({el:i.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){s.color=t},clear:function(){s.color="rgba(255,255,255,1)"}}),this._elms.color=[o],t.next=19;break;case 18:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 19:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"positionEditing",get:function(){return this._positionEditing},set:function(t){var e=this;this.sdk&&this.sdk.viewer&&this.entity&&(this._positionEditing=t,this.previous={position:vb({},this.options.position)},!0===t?(this.tip&&this.tip.destroy(),this.tip=new Z("点击鼠标左键确认,右键取消",this.sdk),this.event.mouse_move((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.tip.setPosition(i,t.endPosition.x,t.endPosition.y)})),this.event.mouse_left((function(t,i){var n=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=n.lng,e.lat=n.lat,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1})),this.event.mouse_right((function(t,i){e.lng=e.previous.position.lng,e.lat=e.previous.position.lat,e.positionEditing=!1})),this.event.gesture_pinck_start((function(t,i){var n=new Date;e.event.gesture_pinck_end((function(){if(new Date-n>=500)e.lng=e.previous.position.lng,e.lat=e.previous.position.lat,e.positionEditing=!1;else{var t=e.cartesian3Towgs84(i,e.sdk.viewer);e.lng=t.lng,e.lat=t.lat,e.event.mouse_move((function(){})),e.event.mouse_left((function(){})),e.event.mouse_right((function(){})),e.event.gesture_pinck_start((function(){})),e.event.gesture_pinck_end((function(){})),e.positionEditing=!1}}))}))):(this.event&&(this.event.mouse_move((function(){})),this.event.mouse_left((function(){})),this.event.mouse_right((function(){})),this.event.gesture_pinck_start((function(){})),this.event.gesture_pinck_end((function(){}))),this.tip&&this.tip.destroy()))}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m,f,v,g,y,b=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=b.length>0&&void 0!==b[0]?b[0]:{},i=this.getcanvas(),n=i.height/i.width,ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(o={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},s=this.options.customView.relativePosition.lng,r=this.options.customView.relativePosition.lat,l=this.options.customView.relativePosition.alt,c=Cesium.Cartesian3.fromDegrees(s,r,l),u={lng:0,lat:0},this.options.position?u=vb({},this.options.position):this.options.positions?u=vb({},this.options.positions[0]):this.options.center?u=vb({},this.options.center):this.options.start?u=vb({},this.options.start):(this.options.hasOwnProperty("lng")&&(u.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(u.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(u.alt=this.options.alt)),u.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(u);case 17:u.alt=t.sent;case 18:s=this.options.customView.relativePosition.lng+u.lng,r=this.options.customView.relativePosition.lat+u.lat,l=this.options.customView.relativePosition.alt+u.alt,c=Cesium.Cartesian3.fromDegrees(s,r,l),this.sdk.viewer.camera.flyTo({destination:c,orientation:o}),t.next=34;break;case 25:return p=Math.abs(Math.cos(Math.PI/180*this.options.position.lat))*(1e-4*this.options.scale),h=[[this.options.position.lng-1e-4*this.options.scale/n,this.options.position.lat-p],[this.options.position.lng+1e-4*this.options.scale/n,this.options.position.lat+p]],t.next=29,this.getClampToHeight(this.options.position);case 29:for(d=t.sent,m=[],f=0;f<h.length;f++)g=(v=Cesium.Cartesian3).fromDegrees.apply(v,L()(h[f]).concat([d])),m.push(g.x,g.y,g.z);y=Cesium.BoundingSphere.fromVertices(m),this.sdk.viewer.camera.flyToBoundingSphere(y,{offset:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-90),roll:Cesium.Math.toRadians(0)}});case 34:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"reset",value:function(){this.entity&&(this.options=this.deepCopyObj(this.originalOptions),this.text=this.originalOptions.text,this.angle=this.originalOptions.angle,this.scale=this.originalOptions.scale,this.color=this.originalOptions.color)}},{key:"remove",value:(i=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=7,this.sdk.removeIncetance(this.options.id);case 7:return t.next=9,be(this.sdk,this.options.id);case 9:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getcanvas",value:function(){for(var t=document.createElement("canvas"),e=t.getContext("2d"),i=this.options.text.split("\n"),n=0;n<i.length;n++)i[n].length>80&&(i[n]=i[n].slice(0,80-i[n].length));i.length>70&&i.splice(70-i.length),this.options.text=i.join("\n");for(var o=0,s=0;s<i.length;s++){e.font="200px serif";var a=e.measureText(i[s]).width;o<a&&(o=a)}t.width=o,t.height=220*i.length;for(var r=0;r<i.length;r++)e.font="200px serif",e.fillStyle="rgba(255, 255, 255, 0)",e.fillRect(0,0,o+30,210),e.fillStyle=this.options.color,e.font="200px serif",e.fillText(i[r],0,210*(r+1));return t}}]);var i,n,s}(jn);function bb(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Cb=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};k()(this,e),(n=bb(this,e,[t,i])).options.text=i.text||"未命名对象";for(var s=n.options.text.split("\n"),a=0;a<s.length;a++)s[a].length>80&&(s[a]=s[a].slice(0,80-s[a].length));return s.length>70&&s.splice(70-s.length),n.options.text=s.join("\n"),n.options.color=i.color||"#FFC107",n.options.positions=i.positions,n.options.speed=i.speed||0===i.speed?i.speed:1,n.options.show=!i.show&&!1!==i.show||i.show,n.nodePoints=[],n.entity,n.options.instruct=i.instruct||"",n.options.operatingPoint=i.operatingPoint||"",n.options.attribute=i.attribute||{},n.options.attribute.link=n.options.attribute.link||{},n.options.attribute.link.content=n.options.attribute.link.content||[],n.options.attribute.camera=n.options.attribute.camera||[],n.options.attributeType=i.attributeType||"richText",n.extrudedHeight,n._EventBinding=new hn,n.Dialog=o,n._elms={},n.sdk.addIncetance(n.options.id,n),e.create(n),n}return Xi()(e,t),_()(e,[{key:"text",get:function(){return this.options.text},set:function(t){this.options.text=t;for(var e=this.options.text.split("\n"),i=0;i<e.length;i++)if(e[i].length>80){window.ELEMENT&&window.ELEMENT.Message({message:"行超过80个字符,请按回车(Enter)后,继续输入",type:"warning",duration:1e3}),e[i]=e[i].slice(0,80-e[i].length)}if(e.length>70){e.splice(70-e.length);window.ELEMENT&&window.ELEMENT.Message({message:"超过最大输入字符",type:"warning",duration:1e3})}if(this.options.text=e.join("\n"),this.entity){for(var n=this.options.positions,o=[],s=[],a=[],r=this.getMaterial(),l=this.computeDistance2(n),c=this.aspectRatio?l/this.aspectRatio:0,u=0;u<n.length;u++)o.push(n[u].lng,n[u].lat),s.push(n[u].alt),a.push(n[u].alt+c);this.entity.wall.material=r,this.entity.wall.maximumHeights=a,this.entity.wall.minimumHeights=s}this._elms.text&&this._elms.text.forEach((function(e){e.value=t}))}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t,this.entity.wall.material=this.getMaterial(),this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){this.options.speed=t,this.entity.wall.material=this.getMaterial(),this._elms.speed&&this._elms.speed.forEach((function(e){e.value=t}))}},{key:"attributeCamera",get:function(){return this.options.attribute.camera},set:function(t){this.options.attribute.camera=t}},{key:"edit",value:(s=o()(a.a.mark((function t(i){var n,o,s,r=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!i){t.next=20;break}return t.next=6,new Ki(this.sdk,this.options,{title:"立体文字属性",left:"180px",top:"100px",confirmCallBack:function(t){r.text=r.text.trim(),r.text||(r.text="未命名对象"),r.originalOptions=r.deepCopyObj(r.options),r._DialogObject.close(),r.Dialog.confirmCallBack&&r.Dialog.confirmCallBack(r.originalOptions),be(r.sdk,r.options.id),re(r.sdk,r.options.id)},resetCallBack:function(){r.reset(),r.Dialog.resetCallBack&&r.Dialog.resetCallBack()},removeCallBack:function(){r.Dialog.removeCallBack&&r.Dialog.removeCallBack()},closeCallBack:function(){r.reset(),r.Dialog.closeCallBack&&r.Dialog.closeCallBack();for(var t=0;t<r.nodePoints.length;t++)r.sdk.viewer.entities.remove(r.nodePoints[t]);r.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),r.event&&r.event.destroy(),r.tip&&r.tip.destroy()},showCallBack:function(t){r.options.show=t,r.originalOptions.show=t,r.show=t,r.Dialog.showCallBack&&r.Dialog.showCallBack()},secondaryEditCallBack:function(){e.nodeEdit(r)}});case 6:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" stand-text",(n=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <textarea @model="text"></textarea>\n </div>\n <div class="col" style="margin-right: 20px;">\n <span class="label">颜色</span>\n <div class="color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">滚动速度</span>\n <input type="range" max="100" min="0" step="1" @model="speed">\n <input style="font-size: 13px;width: 100px;margin-left: 10px;" type="number" title="" min="0" max="100" @model="speed">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(n),this.attributeType=this.options.attributeType,this.attributeCamera=this.options.attribute.camera,o=new YJColorPicker({el:n.getElementsByClassName("color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){r.color=t},clear:function(){r.color="rgba(255,255,255,1)"}}),s=n.getElementsByTagName("*"),this._EventBinding.on(this,s),this._elms=this._EventBinding.element,this._elms.color=[o],t.next=21;break;case 20:this._DialogObject&&this._DialogObject.remove&&(this._DialogObject.remove(),this._DialogObject=null);case 21:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"reset",value:function(){if(this.entity){this.options=this.deepCopyObj(this.originalOptions),this.text=this.originalOptions.text,this.color=this.originalOptions.color,this.speed=this.originalOptions.speed;for(var t=this.options.positions,e=[],i=[],n=[],o=this.computeDistance2(t),s=this.aspectRatio?o/this.aspectRatio:0,a=0;a<t.length;a++)e.push(t[a].lng,t[a].lat),i.push(t[a].alt),n.push(t[a].alt+s);this.entity.wall.positions=Cesium.Cartesian3.fromDegreesArray(e)}}},{key:"remove",value:(n=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.event&&this.event.destroy(),this.tip&&this.tip.destroy(),this.sdk.viewer.entities.remove(this.entity),this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=7,this.sdk.removeIncetance(this.options.id);case 7:return t.next=9,be(this.sdk,this.options.id);case 9:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getMaterial",value:function(){var t=this.getcanvas();return new Cesium.CustomMaterialSource({image:t.toDataURL("image/png"),color:this.options.color,repeat:new Cesium.Cartesian2(1,1),duration:5e4/this.options.speed,fltr:!1})}},{key:"getcanvas",value:function(){for(var t=document.createElement("canvas"),e=t.getContext("2d"),i=this.options.text.split("\n"),n=0;n<i.length;n++)i[n].length>80&&(i[n]=i[n].slice(0,80-i[n].length));i.length>70&&i.splice(70-i.length),this.options.text=i.join("\n");for(var o=0,s=0;s<i.length;s++){e.font="200px serif";var a=e.measureText(i[s]).width;o<a&&(o=a)}t.width=o,t.height=220*i.length;for(var r=0;r<i.length;r++)e.font="200px serif",e.fillStyle="rgba(255, 255, 255, 0)",e.fillRect(0,0,o+30,210),e.fillStyle=this.options.color,e.font="200px serif",e.fillText(i[r],0,210*(r+1));return this.aspectRatio=this.options.text?t.width/t.height:0,t}},{key:"openRichTextEditor",value:function(t){var e=this;wn.open(this.options.id,this.options.text,this.options.richTextContent),wn.primaryCallBack=function(t){e.options.richTextContent=t}}}],[{key:"create",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(i=e.options.positions,n=[],o=[],s=[],r=e.getMaterial(),l=e.computeDistance2(i),c=e.aspectRatio?l/e.aspectRatio:0,u=0;u<i.length;u++)n.push(i[u].lng,i[u].lat),o.push(i[u].alt),s.push(i[u].alt+c);e.entity=e.sdk.viewer.entities.add({id:e.options.id,show:e.options.show,wall:{positions:Cesium.Cartesian3.fromDegreesArray(n),cornerType:Cesium.CornerType.MITERED,maximumHeights:s,minimumHeights:o,material:r}}),be(e.sdk,e.options.id),e.options.show&&Qt(0,e.options.id);case 11:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"nodeEdit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(YJ.Measure.GetMeasureStatus())e("上一次测量未结束");else{var i,n;YJ.Measure.SetMeasureStatus(!0),t.tip=new Z("请选择一个顶点,右键取消",t.sdk),t.event=new X(t.sdk),t.nodePoints=[];for(var o=t.options.positions,s=[],a=[],r=[],l=t.computeDistance2(o),c=t.aspectRatio?l/t.aspectRatio:0,u=0;u<o.length;u++)s.push(o[u].lng,o[u].lat),a.push(o[u].alt),r.push(o[u].alt+c);var p=!1,h=function(e,o){if(i){p=!0;var u=t.sdk.viewer.scene.clampToHeight(o,[t.entity]);t.options.positions[i.index]=t.cartesian3Towgs84(u,t.sdk.viewer),n=t.options.positions[i.index];var h=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",position:Cesium.Cartesian3.fromDegrees(t.options.positions[i.index].lng,t.options.positions[i.index].lat,t.options.positions[i.index].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.splice(i.index,0,h),t.options.positions.splice(i.index,0,t.options.positions[i.index]);var d=t.options.positions;s=[],a=[],r=[],l=t.computeDistance2(d),c=t.aspectRatio?l/t.aspectRatio:0;for(var m=0;m<d.length;m++)s.push(d[m].lng,d[m].lat),a.push(d[m].alt),r.push(d[m].alt+c);t.tip.setPosition(o,e.position.x,e.position.y)}else{var f=t.sdk.viewer.scene.pick(e.position);f&&f.id&&f.id.name&&"node-secondary-edit-point"===f.id.name&&(i=f.id,t.nodePoints.splice(f.id.index,1),t.sdk.viewer.entities.remove(f.id),t.tip.set_text("左键开始,右键结束,CTRL+右键撤销"),n=t.cartesian3Towgs84(o,t.sdk.viewer),t.entity.wall.positions=new Cesium.CallbackProperty((function(){return Cesium.Cartesian3.fromDegreesArray(s)}),!1),t.entity.wall.maximumHeights=new Cesium.CallbackProperty((function(){return r}),!1),t.entity.wall.minimumHeights=new Cesium.CallbackProperty((function(){return a}),!1))}},d=function(o,u){i&&(t.options.positions[i.index]=n,p&&t.options.positions.splice(i.index,1),e(null,t.options.positions));var h=t.options.positions;s=[],a=[],r=[],l=t.computeDistance2(h),c=t.aspectRatio?l/t.aspectRatio:0;for(var d=0;d<h.length;d++)s.push(h[d].lng,h[d].lat),a.push(h[d].alt),r.push(h[d].alt+c);t.entity.wall.positions=Cesium.Cartesian3.fromDegreesArray(s);for(var m=0;m<t.nodePoints.length;m++)t.sdk.viewer.entities.remove(t.nodePoints[m]);t.nodePoints=[],YJ.Measure.SetMeasureStatus(!1),t.event.destroy(),t.tip.destroy()};t.event.mouse_left(h),t.event.mouse_right(d),t.event.mouse_move((function(e,n){if(i){var o=t.sdk.viewer.scene.clampToHeight(n,[t.entity]);t.options.positions[i.index]=t.cartesian3Towgs84(o,t.sdk.viewer);var u=t.options.positions;s=[],a=[],r=[],l=t.computeDistance2(u),c=t.aspectRatio?l/t.aspectRatio:0;for(var p=0;p<u.length;p++)s.push(u[p].lng,u[p].lat),a.push(u[p].alt),r.push(u[p].alt+c)}t.tip.setPosition(n,e.endPosition.x,e.endPosition.y)})),t.event.mouse_right_keyboard_ctrl((function(e,n){i&&(t.options.positions.pop(),t.sdk.viewer.entities.remove(t.nodePoints[t.nodePoints.length-1]),t.nodePoints.pop(),i.index===t.options.positions.length&&(t.nodePoints[i.index-1]?i=t.nodePoints[i.index-1]:i.index=0))})),t.event.gesture_pinck_start((function(e,i){var n=new Date,o={position:{x:(e.position1.x+e.position2.x)/2,y:(e.position1.y+e.position2.y)/2}};t.event.gesture_pinck_end((function(){new Date-n>=500?d(o,i):h(o,i)}))}));for(var m=0;m<t.options.positions.length;m++){var f=t.sdk.viewer.entities.add({name:"node-secondary-edit-point",index:m,position:Cesium.Cartesian3.fromDegrees(t.options.positions[m].lng,t.options.positions[m].lat,t.options.positions[m].alt),billboard:{image:t.getSourceRootPath()+"/img/point.png",width:15,height:15,disableDepthTestDistance:Number.POSITIVE_INFINITY,color:Cesium.Color.WHITE.withAlpha(.99)}});t.nodePoints.push(f)}}}}]);var i,n,s}(jn);function wb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function kb(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?wb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):wb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function xb(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var _b=function(t){function e(t,i){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(n=xb(this,e)).sdk=t,n.viwer=t.viewer,n.options=kb({},i),n.options.host=i.host||h(),n.options.name=i.name||"未命名对象",n.options.show=!i.show&&!1!==i.show||i.show,"number"==typeof i.scale?(n.options.scale={},n.options.scale.x=i.scale,n.options.scale.y=i.scale,n.options.scale.z=i.scale):(n.options.scale=i.scale||{},n.options.scale.x=n.options.scale.x||0===n.options.scale.x?n.options.scale.x:1,n.options.scale.y=n.options.scale.y||0===n.options.scale.y?n.options.scale.y:1,n.options.scale.z=n.options.scale.z||0===n.options.scale.z?n.options.scale.z:1),n.primitive=null,n._loadEvent=void 0,n._loaded=!1,n._elms={},n.Dialog=o,n._EventBinding=new hn,e.setDefaultValue(n),n.requestResource(),n.ControllerObject=new Oo(n.sdk,{position:kb({},n.options.position),rotate:{x:(360+n.options.roll%360)%360,y:(360+-n.options.pitch%360)%360,z:(360+-n.options.heading%360)%360}}),n.ControllerObject.controllerCallBack=n.controllerCallBack,n.HeadingPitchRollCallBack=n.Dialog.HeadingPitchRollCallBack,n}return Xi()(e,t),_()(e,[{key:"requestResource",value:function(){this.addResource().then((function(t){}))}},{key:"addResource",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this).options.xmlURL=e.options.objUrl.replace(".obj",".xml"),""===e.options.xmlURL){t.next=34;break}return t.next=5,fetch(e.options.xmlURL);case 5:if(!(i=t.sent).ok){t.next=32;break}return t.next=9,i.text();case 9:return n=t.sent,o=new DOMParser,s=o.parseFromString(n,"text/xml"),r=s.getElementsByTagName("Position")[0].textContent.split(","),l=s.getElementsByTagName("Crs")[0].textContent,c=e.convert([{x:r[0],y:r[1],z:r[2]}],l,"EPSG:4326"),e.options.position=e.options.position||{lng:c.points[0].x,lat:c.points[0].y,alt:c.points[0].z},e.ControllerObject.position=e.options.position,u=e.viwer.scene,p=Cesium.Cartesian3.fromDegrees(e.options.position.lng,e.options.position.lat,e.options.position.alt),h=Cesium.Transforms.headingPitchRollToFixedFrame(p,new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(.85),Cesium.Math.toRadians(0),Cesium.Math.toRadians(0))),t.next=22,window.objLoader.Load(e.options.objUrl);case 22:(d=t.sent).show=e.options.show,d.modelMatrix=h,d.setFlvVideo(e.options.videoUrl),u.primitives.add(d),e.primitive=d,e.controllerCallBack({rotate:{x:e.options.roll,y:-e.options.pitch,z:-e.options.heading},position:kb({},e.options.position)}),this.loaded=!0,this._loaded=!0,this._loadEvent&&this._loadEvent();case 32:t.next=36;break;case 34:return console.error("请填写xml路径"),t.abrupt("return");case 36:if(""!==e.options.objUrl){t.next=39;break}return console.error("请填写obj模型路径"),t.abrupt("return");case 39:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=p.length>0&&void 0!==p[0]?p[0]:{},!this._error){t.next=3;break}return t.abrupt("return");case 3:if(ii(0),Je(this.sdk),qe(this.sdk),!(this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)){t.next=25;break}if(i={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},n=this.options.customView.relativePosition.lng,o=this.options.customView.relativePosition.lat,s=this.options.customView.relativePosition.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),l={lng:0,lat:0},this.options.position?l=kb({},this.options.position):this.options.positions?l=kb({},this.options.positions[0]):this.options.center?l=kb({},this.options.center):this.options.start?l=kb({},this.options.start):(this.options.hasOwnProperty("lng")&&(l.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(l.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(l.alt=this.options.alt)),l.hasOwnProperty("alt")){t.next=18;break}return t.next=17,this.getClampToHeight(l);case 17:l.alt=t.sent;case 18:n=this.options.customView.relativePosition.lng+l.lng,o=this.options.customView.relativePosition.lat+l.lat,s=this.options.customView.relativePosition.alt+l.alt,r=Cesium.Cartesian3.fromDegrees(n,o,s),this.sdk.viewer.camera.flyTo({destination:r,orientation:i}),t.next=28;break;case 25:c=100*Math.tan(60),u=c/111319.55,this.sdk.viewer.camera.flyTo({destination:new Cesium.Cartesian3.fromDegrees(this.options.position.lng,this.options.position.lat-u,this.options.position.alt+100),orientation:e.orientation||{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-60),roll:Cesium.Math.toRadians(0)}});case 28:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"edit",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=this,p=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p.length>0&&void 0!==p[0]&&p[0],e=!1,this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),t.next=6,new Ki(this.sdk,this.options,{title:"编辑属性",left:"180px",top:"100px",confirmCallBack:function(t){u.name=u.name.trim(),u.name||(u.name="未命名对象"),u.originalOptions=u.deepCopyObj(u.options),u._DialogObject.close(),u.Dialog.confirmCallBack&&u.Dialog.confirmCallBack(u.originalOptions)},resetCallBack:function(){u.reset(),u.Dialog.resetCallBack&&u.Dialog.resetCallBack()},removeCallBack:function(){u.Dialog.removeCallBack&&u.Dialog.removeCallBack()},closeCallBack:function(){u.reset(),u.positionEditing=!1,u.Dialog.closeCallBack&&u.Dialog.closeCallBack()},rotateCallBack:function(){u.rotationEditing?u.rotationEditing=!1:u.rotationEditing=!0},translationalCallBack:function(){u.positionEditing?u.positionEditing=!1:u.positionEditing=!0}},!0);case 6:for(this._DialogObject=t.sent,(i=document.createElement("div")).style.width="448px",i.innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input name" type="text" @model="name">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">经度</span>\n <input class="input" type="number" title="" min="-180" max="180" @model="lng">\n </div>\n <div class="col">\n <span class="label">海拔高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="-9999999" max="999999999" step="0.01" @model="alt">\n <span class="unit">m</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">纬度</span>\n <input class="input" type="number" title="" min="-90" max="90" @model="lat">\n </div>\n <div class="col">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="lable-left-line">\n <span>缩放</span>\n <div class="checkbox-box" style="display: flex;align-items: center;margin-left: 20px;">\n <input type="checkbox" style="width: 14px;height: 14px;margin-top: 2px;margin-right: 5px;cursor: pointer;">\n <span>是否等比例缩放</span>\n </div>\n </div>\n </div>\n <div class="row no-equal" style="display: none;">\n <div class="row">\n <div class="col">\n <span class="label">x 轴</span>\n <input class="scale-x" style="flex: 1;margin-right: 15px;" type="range" max="99" min="0.0001" step="0.01" @model="scaleX">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input class="scale-x" style="width: 100px;" type="number" title="" min="0" max="99" step="0.01" @model="scaleX">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">y 轴</span>\n <input class="scale-y" style="flex: 1;margin-right: 15px;" type="range" max="99" min="0.0001" step="0.01" @model="scaleY">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input class="scale-y" style="width: 100px;" type="number" title="" min="0" max="99" step="0.01" @model="scaleY">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n <div class="row">\n <div class="col">\n <span class="label">z 轴</span>\n <input class="scale-z" style="flex: 1;margin-right: 15px;" type="range" max="99" min="0.0001" step="0.01" @model="scaleZ">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input class="scale-z" style="width: 100px;" type="number" title="" min="0" max="99" step="0.01" @model="scaleZ">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="row equal" style="display: none;">\n <div class="row">\n <div class="col">\n <span class="label">等比例缩放</span>\n <input class="scale-all" style="flex: 1;margin-right: 15px;" type="range" max="99" min="0.0001" step="0.01">\n <div class="input-number input-number-unit-1" style="width: auto;">\n <input class="scale-all" style="width: 100px;" type="number" title="" min="0" max="99" step="0.01">\n <span class="unit">倍</span>\n <span class="arrow"></span>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=this._DialogObject._element.content.getElementsByClassName("checkbox-box")[0].querySelector("input"),o=this._DialogObject._element.content.getElementsByClassName("equal")[0],s=this._DialogObject._element.content.getElementsByClassName("no-equal")[0],n.checked=e,n.addEventListener("change",(function(t){(e=t.target.checked)?(o.style.display="flex",s.style.display="none"):(o.style.display="none",s.style.display="flex")})),(r=o.getElementsByTagName("input"))[0].value=this.scaleX,r[1].value=this.scaleX,r[0].addEventListener("input",(function(t){u.scaleX=t.target.value,u.scaleY=t.target.value,u.scaleZ=t.target.value})),r[1].addEventListener("input",(function(t){u.scaleX=t.target.value,u.scaleY=t.target.value,u.scaleZ=t.target.value})),e?(o.style.display="flex",s.style.display="none"):(o.style.display="none",s.style.display="flex"),setTimeout((function(){if(u._DialogObject._element.foot){var t=u._DialogObject._element.foot.getElementsByClassName("rotate")[0];t&&(t.style.position="absolute",t.style.left="100px")}}),0),l=i.getElementsByTagName("*"),c=0;c<l.length;c++)l[c].addEventListener("input",(function(t){if("0"===t.target.value&&"0"===t.target.min)switch(t.target.className){case"scale-x":u.scaleX=1e-4;break;case"scale-y":u.scaleY=1e-4;break;case"scale-z":u.scaleZ=1e-4;case"scale-all":u.scaleX=1e-4,u.scaleY=1e-4,u.scaleZ=1e-4}}));this._EventBinding.on(this,l),this._elms=this._EventBinding.element,this._elms.scaleX.push(r[0],r[1]);case 28:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"reset",value:function(){if(this.ControllerObject.destroy(),this.options=this.deepCopyObj(this.originalOptions),this.name=this.options.name,this.primitive){var t=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(this.options.position.lng,this.options.position.lat,this.options.position.alt));this.primitive.modelMatrix=t,this.primitive.modelMatrix=Cesium.Matrix4.multiplyByMatrix3(this.primitive.modelMatrix,Cesium.Matrix3.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(this.options.heading,this.options.pitch,this.options.roll)),this.primitive.modelMatrix);var e=this.options.scale.x,i=this.options.scale.y,n=this.options.scale.z;0===e&&(e=1e-5),0===i&&(i=1e-5),0===n&&(n=1e-5),Cesium.Matrix4.multiplyByScale(this.primitive.modelMatrix,new Cesium.Cartesian3(e,i,n),this.primitive.modelMatrix)}}},{key:"remove",value:function(){this.sdk.viewer.scene.primitives.remove(this.primitive),this.primitive=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null)}},{key:"controllerCallBack",get:function(){var t=this;return function(e){t.options.heading=-e.rotate.z,t.options.pitch=-e.rotate.y,t.options.roll=e.rotate.x,t.HeadingPitchRollCallBack&&t.HeadingPitchRollCallBack(e);var i=Number(Number(e.position.lng).toFixed(8)),n=Number(Number(e.position.lat).toFixed(8)),o=Number(Number(e.position.alt).toFixed(2));t.options.position={lng:i,lat:n,alt:o};var s=Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3.fromDegrees(e.position.lng,e.position.lat,e.position.alt));t.primitive.modelMatrix=s,Cesium.Matrix4.multiplyByMatrix3(t.primitive.modelMatrix,Cesium.Matrix3.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(-e.rotate.z,-e.rotate.y,e.rotate.x)),t.primitive.modelMatrix);var a=t.options.scale.x,r=t.options.scale.y,l=t.options.scale.z;0===a&&(a=1e-5),0===r&&(r=1e-5),0===l&&(l=1e-5),Cesium.Matrix4.multiplyByScale(t.primitive.modelMatrix,new Cesium.Cartesian3(a,r,l),t.primitive.modelMatrix),t._elms.lng&&t._elms.lng.forEach((function(e){e.value=t.options.position.lng})),t._elms.lat&&t._elms.lat.forEach((function(e){e.value=t.options.position.lat})),t._elms.alt&&t._elms.alt.forEach((function(e){e.value=t.options.position.alt}))}},set:function(t){this._controllerCallBack=t}},{key:"name",get:function(){return this.options.name},set:function(t){this.options.name=t,this._elms.name&&this._elms.name.forEach((function(e){e.value=t}))}},{key:"rotationEditing",get:function(){return"rtation"===this.ControllerObject.getActiveState()},set:function(t){t?this.ControllerObject.editRtation():this.ControllerObject.destroy()}},{key:"scaleX",get:function(){return this.options.scale.x},set:function(t){var e=this;this.options.scale.x=Number(Number(t).toFixed(4)),this.controllerCallBack({position:kb({},this.options.position),rotate:{x:(360+this.options.roll%360)%360,y:(360+-this.options.pitch%360)%360,z:(360+-this.options.heading%360)%360}}),this._elms.scaleX&&this._elms.scaleX.forEach((function(t){t.value=e.options.scale.x}))}},{key:"scaleY",get:function(){return this.options.scale.y},set:function(t){var e=this;this.options.scale.y=Number(Number(t).toFixed(4)),this.controllerCallBack({position:kb({},this.options.position),rotate:{x:(360+this.options.roll%360)%360,y:(360+-this.options.pitch%360)%360,z:(360+-this.options.heading%360)%360}}),this._elms.scaleY&&this._elms.scaleY.forEach((function(t){t.value=e.options.scale.y}))}},{key:"scaleZ",get:function(){return this.options.scale.z},set:function(t){var e=this;this.options.scale.z=Number(Number(t).toFixed(4)),this.controllerCallBack({position:kb({},this.options.position),rotate:{x:(360+this.options.roll%360)%360,y:(360+-this.options.pitch%360)%360,z:(360+-this.options.heading%360)%360}}),this._elms.scaleZ&&this._elms.scaleZ.forEach((function(t){t.value=e.options.scale.z}))}},{key:"positionEditing",get:function(){return"translational"===this.ControllerObject.getActiveState()},set:function(t){this.sdk&&this.sdk.viewer&&this.ControllerObject&&(t?this.ControllerObject.editTranslational():this.ControllerObject.destroy())}},{key:"lng",get:function(){return this.options.position.lng},set:function(t){this.options.position.lng=t,this.ControllerObject.position={lng:this.options.position.lng,lat:this.options.position.lat,alt:this.options.position.alt},this.controllerCallBack({position:kb({},this.options.position),rotate:{x:(360+this.options.roll%360)%360,y:(360+-this.options.pitch%360)%360,z:(360+-this.options.heading%360)%360}})}},{key:"lat",get:function(){return this.options.position.lat},set:function(t){this.options.position.lat=t,this.ControllerObject.position={lng:this.options.position.lng,lat:this.options.position.lat,alt:this.options.position.alt},this.controllerCallBack({position:kb({},this.options.position),rotate:{x:(360+this.options.roll%360)%360,y:(360+-this.options.pitch%360)%360,z:(360+-this.options.heading%360)%360}})}},{key:"alt",get:function(){return this.options.position.alt},set:function(t){this.options.position.alt=t,this.ControllerObject.position={lng:this.options.position.lng,lat:this.options.position.lat,alt:this.options.position.alt},this.controllerCallBack({position:kb({},this.options.position),rotate:{x:(360+this.options.roll%360)%360,y:(360+-this.options.pitch%360)%360,z:(360+-this.options.heading%360)%360}})}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t?(this.options.show=t,this.primitive.show=t):console.error("参数必须为boolean")}},{key:"playDistance",get:function(){return this.options.playDistance},set:function(t){this.options.playDistance=t}},{key:"flicker",value:function(){}},{key:"load",value:function(t){this._loaded?t():this._loadEvent=t}},{key:"customView",get:function(){this.options.customView}},{key:"setCustomView",value:function(t){if(t)this.options.customView=t;else{var e=this.sdk.viewer.camera;this.options.customView={orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},position:{x:e.position.x,y:e.position.y,z:e.position.z}},this.originalOptions&&(this.originalOptions.customView=this.options.customView)}}},{key:"resetCustomView",value:function(){this.options.customView=void 0}}],[{key:"setDefaultValue",value:function(t){t.options.id=t.options.id||t.randomString(),t.options.position=t.options.position,t.options.objUrl=t.options.objUrl||"",t.options.videoUrl=t.options.videoUrl||"",t.options.xmlURL=t.options.xmlURL||"",t.options.heading=t.options.heading||0,t.options.pitch=t.options.pitch||0,t.options.roll=t.options.roll||0}}]);var i,n,s}(ai);function Eb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Sb(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Eb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Eb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Db(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Mb=function(t){function e(t,i,n){var o;return k()(this,e),(o=Db(this,e,[t,i,n]))._loadEvent=void 0,o._loaded=!1,o.options.objId=i.objId,o.options.videoId=i.videoId,o.options.videoType=i.videoType||"flv",o}return Xi()(e,t),_()(e,[{key:"addResource",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h,d,m;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this).options.xmlURL=e.options.objUrl.replace(".obj",".xml"),""===e.options.xmlURL){t.next=35;break}return t.next=5,fetch(e.options.xmlURL);case 5:if(!(i=t.sent).ok){t.next=33;break}return t.next=9,i.text();case 9:return n=t.sent,o=new DOMParser,s=o.parseFromString(n,"text/xml"),r=s.getElementsByTagName("Position")[0].textContent.split(","),l=s.getElementsByTagName("Crs")[0].textContent,c=e.convert([{x:r[0],y:r[1],z:r[2]}],l,"EPSG:4326"),e.options.position=e.options.position||{lng:c.points[0].x,lat:c.points[0].y,alt:c.points[0].z},e.ControllerObject.position=e.options.position,u=e.viwer.scene,p=Cesium.Cartesian3.fromDegrees(e.options.position.lng,e.options.position.lat,e.options.position.alt),h=Cesium.Transforms.headingPitchRollToFixedFrame(p,new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(.85),Cesium.Math.toRadians(0),Cesium.Math.toRadians(0))),d=new Di(e.viwer.scene.context),t.next=23,d.Load(e.options.objUrl,e.options.videoId,e.options.host);case 23:(m=t.sent).modelMatrix=h,m.show=e.options.show,m.setFlvVideo(e.options.videoUrl),u.primitives.add(m),e.primitive=m,e.controllerCallBack({rotate:{x:e.options.roll,y:-e.options.pitch,z:-e.options.heading},position:Sb({},e.options.position)}),e.loaded=!0,e._loaded=!0,e._loadEvent&&e._loadEvent();case 33:t.next=36;break;case 35:return t.abrupt("return");case 36:if(""!==e.options.objUrl){t.next=38;break}return t.abrupt("return");case 38:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"requestResource",value:(i=o()(a.a.mark((function t(){var e;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this)._loaded){t.next=12;break}if(!e.options.objId){t.next=6;break}return t.next=5,e.requestObjResource();case 5:e.options.objUrl=t.sent;case 6:if(!e.options.videoId){t.next=10;break}return t.next=9,e.requestVideoResource();case 9:e.options.videoUrl=t.sent;case 10:return t.next=12,e.addResource();case 12:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"requestObjResource",value:function(){var t="",e=(t=this.options.host.endsWith("yjearth4.0")?this.options.host:this.options.host+"/yjearth4.0")+"/obj/"+this.options.objId;return fetch(e,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then(function(){var e=o()(a.a.mark((function e(i){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.text();case 2:if(n=e.sent,n=JSON.parse(n),![0,200].includes(n.code)){e.next=13;break}if(!n.data.objPath.length){e.next=9;break}return e.abrupt("return",t+"/obj/wirte/file/"+n.data.objPath);case 9:console.warn("资源不存在");case 10:return e.abrupt("return");case 13:return console.warn(n.msg||n.message),e.abrupt("return");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"requestVideoResource",value:function(){var t="",e=(t=this.options.host.endsWith("yjearth4.0")?this.options.host:this.options.host+"/yjearth4.0")+"/videoFusion/"+this.options.videoId;return fetch(e,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then(function(){var e=o()(a.a.mark((function e(i){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.text();case 2:if(n=e.sent,n=JSON.parse(n),![0,200].includes(n.code)){e.next=13;break}if(!n.data.deviceCode.length){e.next=9;break}return e.abrupt("return",fetch(t+"/videoFusion/vide/stream",{method:"post",body:JSON.stringify({type:"flv",deviceCode:n.data.deviceCode}),headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}}).then(function(){var t=o()(a.a.mark((function t(e){var i;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.text();case 2:if(i=t.sent,i=JSON.parse(i),![0,200].includes(i.code)){t.next=13;break}if(!i.data.flv||!i.data.flv.length){t.next=9;break}return t.abrupt("return",i.data.flv);case 9:console.warn("地址不存在");case 10:return t.abrupt("return");case 13:return console.warn(i.msg||i.message),t.abrupt("return");case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 9:console.warn("设备不存在");case 10:return e.abrupt("return");case 13:return console.warn(n.msg||n.message),e.abrupt("return");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"load",value:function(t){this._loaded?t():this._loadEvent=t}}]);var i,n}(_b);function Pb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ob(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Pb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Tb=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};k()(this,t),this.sdk=e,this.options=Ob({},i),this.options.show=!i.show&&!1!==i.show||i.show,this.options.host=this.options.host||h(),this.objModelObject=[],this._loaded=!1,this._loadEvent=void 0,this.on()}),[{key:"show",get:function(){return this.options.show},set:function(t){var e=this;if("boolean"==typeof t){this.options.show=t;for(var i=function(i){e.objModelObject[i].load((function(){e.objModelObject[i].show=t}))},n=0;n<this.objModelObject.length;n++)i(n)}else console.error("参数必须为boolean")}},{key:"on",value:(t=o()(a.a.mark((function t(){var e,i,n,o,s;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="",e=this.options.host.endsWith("yjearth4.0")?this.options.host+"/api/v1/source/obj":this.options.host+"/yjearth4.0/api/v1/source/obj",this.options.code&&(e=e+"?code="+this.options.code),t.next=5,fetch(e,{method:"get",headers:{"Content-Type":"application/json",token:m(),Authorization:"Bearer "+m()}});case 5:if(!(i=t.sent).ok){t.next=15;break}return this.objModelObject=[],t.next=10,i.json();case 10:for(this.list=t.sent.data,this.options.count&&(this.list=this.list.splice(0,this.options.count)),n=0;n<this.list.length;n++)(o=JSON.parse(this.list[n].detail)).host=this.options.host,(this.options.show||!1===this.options.show)&&(o.show=this.options.show),s=new Mb(this.sdk,o),this.objModelObject.push(s);this._loaded=!0,this._loadEvent&&this._loadEvent();case 15:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"remove",value:function(){for(var t=this,e=function(e){t.objModelObject[e].load((function(){t.objModelObject[e].remove()}))},i=0;i<this.objModelObject.length;i++)e(i)}},{key:"load",value:function(t){this._loaded?t():this._loadEvent=t}}]);var t}();function Nb(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Bb=function(t){function e(t,i){var n;if(k()(this,e),(n=Nb(this,e,[t,i])).viewer=t.viewer,n.options.show=!i.show&&!1!==i.show||i.show,n.options.positions=n.options.positions||[],n.options.data=n.options.data,n.options.gradient=i.gradient||{.9:"red",.8:"orange",.7:"yellow",.5:"blue",.3:"green"},n.entity={id:n.options.id},!n.options.positions||n.options.positions.length<3)n._error="最少需要三个坐标!",console.warn(n._error),window.ELEMENT&&window.ELEMENT.Message({message:n._error,type:"warning",duration:1500});else{for(var o=[],s=0;s<n.options.positions.length;s++)o.push([n.options.positions[s].lng,n.options.positions[s].lat]);var a=turf.lineString(o),r=turf.bbox(a);n.bounds={west:r[0],south:r[1],east:r[2],north:r[3]},e.add(n)}return n}return Xi()(e,t),_()(e,[{key:"remove",value:function(){this.viewer.entities.remove(this.entity),this.entity=null}},{key:"createHeatMap",value:function(t,e){var i=CesiumHeatmap.create(this.bounds,{backgroundColor:"rgba(0,0,0,0)",radius:20,maxOpacity:.5,minOpacity:0,blur:.75,gradient:this.options.gradient});return i.setWGS84Data(0,t,e),i}}],[{key:"add",value:function(t){var i=[];t.options.positions.forEach((function(t){i.push(t.lng,t.lat)}));var n=e.getData(t),o=t.createHeatMap(n.max,n.data);t.entity=new Cesium.Entity({id:t.options.id,show:t.options.show,polygon:{hierarchy:new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArray(i)),material:o._heatmap._renderer.canvas,zIndex:t.sdk._entityZIndex}}),t.sdk._entityZIndex++,t.viewer.entities.add(t.entity)}},{key:"getData",value:function(t){var e=1e3,i=[];if(t.options.data&&Array.isArray(t.options.data)){for(var n=t.options.data[0].value,o=0;o<t.options.data.length;o++){var s=t.options.data[o].value;n=Math.max(n,s),i.push({x:t.options.data[o].lng,y:t.options.data[o].lat,value:s})}return{max:n,data:i}}for(var a=0;e--;){var r=Math.floor(1e3*Math.random());a=Math.max(a,r);var l={x:Math.random()*(t.bounds.east-t.bounds.west)+t.bounds.west,y:Math.random()*(t.bounds.north-t.bounds.south)+t.bounds.south,value:r};i.push(l)}return{max:a,data:i}}}])}(jn);function Lb(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}function Ab(t,e,i){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,i)}function jb(t,e,i){return t.set(Fb(t,e),i),i}function Ib(t,e){return t.get(Fb(t,e))}function Fb(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}var Rb=new WeakMap,zb=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),Ab(i=Lb(this,e,[t,n]),Rb,void 0),i.options.id=n.id||i.randomString(),i.options.name=n.name||"漫游路径",i.options.points=n.points||[],i.options.repeat&&(i.options.repeat=Number(i.options.repeat)),i.Dialog=o,i}return Xi()(e,t),_()(e,[{key:"repeat",get:function(){return this.options.repeat},set:function(t){if(this.options.repeat!=Number(t)&&(this.options.repeat=Number(t),this._DialogObject&&this._DialogObject._element&&this._DialogObject._element.content)){var e=this._DialogObject._element.content.querySelector("input[name='repeat']");e.checked=t===1/0,this.Dialog.changeRepeatStateCallBack&&this.Dialog.changeRepeatStateCallBack(e.checked)}}},{key:"edit",value:(i=o()(a.a.mark((function t(e){var i,n,o,s,r,l,c,u,p,h,d,m,f,v,g=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this,n=this.sdk.viewer,o=0,this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=44;break}return s=function(t){var e=l.getElementsByClassName("tr");e.length>0&&(e[e.length-1].querySelector("input[name='time']").disabled=void 0);var s=l.getElementsByClassName("tr active")[0];s&&(s.className="tr");var a=document.createElement("div");a.className="tr active",a.innerHTML='\n <div class="td" style="justify-content: center;">视点'.concat(u+1,'</div>\n <div class="td">\n <input class="input time" type="number" title="" min="0" max="999.99" step="0.01" name="time" value="').concat(t.duration,'">\n </div>\n <div class="td action">\n <button class="play">播放</span>\n <button class="delete">删除</span>\n </div>\n '),a.addEventListener("click",(function(t){if(t.target.parentNode===a){var i=l.getElementsByClassName("tr active")[0];i&&(i.className="tr"),a.className="tr active";for(var n=0;n<e.length;n++)if(e[n]===a){o=n+1;break}}})),a.addEventListener("dblclick",(function(t){if(t.target.parentNode===a)for(var i=0;i<e.length;i++)if(e[i]===a){n.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(p[i].position.lng,p[i].position.lat,p[i].position.alt),orientation:p[i].orientation,duration:1});break}}));var r=a.getElementsByClassName("play")[0],c=a.getElementsByClassName("delete")[0],h=a.querySelector("input[name='time']");r.addEventListener("click",(function(){for(var t=0;t<e.length;t++)e[t]===c.parentNode.parentNode&&i.flyTo(t)})),c.addEventListener("click",(function(t){for(var n=0;n<e.length;n++)if(e[n]===c.parentNode.parentNode){if(p.splice(n,1),p[p.length-1].duration=0,i.options.points.splice(n,1),l.removeChild(a),o>n+1?(o--,e[o-1].className="tr active"):o==n+1&&(e.length==n&&(o-=1),0!=e.length&&(e[o-1].className="tr active")),e.length>0){var s=e[e.length-1].querySelector("input[name='time']");s.disabled="disabled",s.value=0}break}})),h.addEventListener("input",(function(e){f.checked=!1,t.duration=Number(h.value),t.duration<0&&(t.duration=0)})),h.addEventListener("blur",(function(){h.value=Number(Number(h.value).toFixed(2)),h.value<0&&(h.value=0)})),l.insertBefore(a,e[o]),o++,e[e.length-1].querySelector("input[name='time']").disabled="disabled"},t.next=8,new W(n._container,{title:"飞行漫游",left:"180px",top:"100px",closeCallBack:function(){g.cease()}});case 8:return this._DialogObject=t.sent,t.next=11,this._DialogObject.init();case 11:for((r=document.createElement("div")).className="fly-roam",r.innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" type="text" name="name">\n </div>\n <div class="col"></div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <input type="checkbox" name="isTotalTime" style="width: 16px; line-height: 15px; height: 15px; cursor: pointer; width: auto; margin-right: 5px;">\n <span class="label">设置总时长</span>\n <div class="input-number input-number-unit-3">\n <input class="input total-time" type="number" title="" min="0" max="999999.99" step="0.01" name="totalTime" value="0">\n <span class="unit" style="top: 6px;">秒(s)</span>\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <input type="checkbox" name="repeat" style="width: 16px; line-height: 15px; height: 15px; cursor: pointer; width: auto; margin-right: 5px;">\n <span class="label">是否循环播放</span>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <button class="add-point"><svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点</button>\n </div>\n <div class="col">\n <button class="modify-point"><svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>调整视点</button>\n </div>\n <div class="col">\n <button class="afreshPlay"><svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>播放</button>\n </div>\n <div class="col">\n <button class="cease"><svg class="icon-pause"><use xlink:href="#yj-icon-pause"></use></svg>结束</button>\n </div>\n </div>\n <div class="table">\n <div class="table-head">\n <div class="tr">\n <div class="th">序号</div>\n <div class="th">时长(s)</div>\n <div class="th">操作</div>\n </div>\n </div>\n <div class="table-body">\n <div class="table-empty">\n <div class="empty-img"></div>\n <p>暂无数据</p>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(r),r.getElementsByTagName("*"),l=r.getElementsByClassName("table-body")[0],c=r.getElementsByClassName("table-empty")[0],u=0,p=new Proxy([],{set:function(t,e,i){return t[e]=i,t.length>0?c.style.display="none":c.style.display="flex",!0}}),u=0;u<this.options.points.length;u++)p.push(this.options.points[u]),s(this.options.points[u]);(h=r.querySelector("input[name='name']")).value=this.name,h.addEventListener("input",(function(){g.name=h.value})),(d=document.createElement("button")).innerHTML="保存",d.addEventListener("click",(function(){g.name||(g.name="漫游路径",h.value=g.name);var t=[];p.map((function(e){t.push(e)})),g._DialogObject.close(),g.Dialog.confirmCallBack&&g.Dialog.confirmCallBack({id:g.options.id,name:g.name,points:t,repeat:g.repeat+""})})),this._DialogObject.footAppChild(d),r.getElementsByClassName("cease")[0].addEventListener("click",(function(){n.camera.cancelFlight()})),r.getElementsByClassName("afreshPlay")[0].addEventListener("click",(function(){p.length>0&&g.flyTo(0)})),r.getElementsByClassName("add-point")[0].addEventListener("click",(function(){var t={duration:0,position:g.cartesian3Towgs84(n.camera.position,n),orientation:{heading:n.camera.heading,pitch:n.camera.pitch,roll:n.camera.roll}};p.splice(o,0,t),g.options.points.splice(o,0,t),s(t),u++})),r.getElementsByClassName("modify-point")[0].addEventListener("click",(function(){if(o){var t=g.cartesian3Towgs84(n.camera.position,n);g.options.points[o-1].position=p[o-1].position=t,g.options.points[o-1].orientation=p[o-1].orientation={heading:n.camera.heading,pitch:n.camera.pitch,roll:n.camera.roll}}})),m=r.querySelector("input[name='totalTime']"),f=r.querySelector("input[name='isTotalTime']"),v=r.querySelector("input[name='repeat']"),f.addEventListener("change",(function(){var t=l.getElementsByClassName("tr");if(f.checked&&t.length>0){for(var e=Number((Number(m.value)/(t.length-1)).toFixed(2)),i=0;i<t.length-1;i++)p[i].duration=e,g.options.points[i].duration=e,t[i].querySelector("input[name='time']").value=e;t[t.length-1].querySelector("input[name='time']").value=0}})),m.addEventListener("blur",(function(){var t=l.getElementsByClassName("tr");if(m.value=Number(m.value),m.value<0&&(m.value=0),f.checked&&t.length>0){for(var e=Number((Number(m.value)/(t.length-1)).toFixed(2)),i=0;i<t.length-1;i++)p[i].duration=e,g.options.points[i].duration=e,t[i].querySelector("input[name='time']").value=e;t[t.length-1].querySelector("input[name='time']").value=0}})),v.checked=this.repeat===1/0,v.addEventListener("change",(function(){v.checked?g.repeat=1/0:g.repeat=0}));case 44:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"flyTo",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;ii(0);var i=this,n=this.options.points,s=this.repeat;Je(i.sdk);var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1?arguments[1]:void 0;Ib(Rb,t)&&Ib(Rb,t).destroy();var l=t;jb(Rb,t,new Cesium.ScreenSpaceEventHandler(l.sdk.viewer.canvas)),Ib(Rb,t).setInputAction((function(e){t.cease()}),Cesium.ScreenSpaceEventType.RIGHT_CLICK);var c,u=l.sdk.viewer;ii(0),u.camera.cancelFlight(),u.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(n[e].position.lng,n[e].position.lat,n[e].position.alt),orientation:n[e].orientation,duration:i?n[e-1].duration:.5,maximumHeight:n[e].position.alt,complete:(c=o()(a.a.mark((function i(){return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:e++,t.repeat===1/0?s=1/0:s===1/0&&(s=t.repeat),e<=n.length-1?r(e,!0):s?(s--,r(0)):Ib(Rb,t)&&Ib(Rb,t).destroy();case 3:case"end":return i.stop()}}),i)}))),function(){return c.apply(this,arguments)}),easingFunction:i?Cesium.EasingFunction.LINEAR_NONE:Cesium.EasingFunction.EXPONENTIAL_OUT})};r(e)}},{key:"cease",value:function(){this.sdk&&this.sdk.viewer&&this.sdk.viewer.camera.cancelFlight(),Ib(Rb,this)&&Ib(Rb,this).destroy()}},{key:"remove",value:function(){this._DialogObject&&this._DialogObject.close?(this._DialogObject.close(),this._DialogObject=null):this.cease()}}]);var i}(jn);function Hb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var Vb=function(){return _()((function t(e,i,n){k()(this,t),this.options=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Hb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Hb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},e),this.viewer=i,this.viewer1=n,this.head=0,this.pitch=90,this.po=1e-5,this.position=null,this.hpr=null,this.currentFrustumOutline=null,this.frustum=null,this.setInterval1=null,this.webrtc=null,t.setDefaultValue(this),this.create()}),[{key:"create",value:function(){this.frustum=new Cesium.PerspectiveFrustum({fov:Cesium.Math.toRadians(this.options.fov),aspectRatio:this.options.aspectRatio,near:this.options.near,far:this.options.far});var t=this.options.position,e=t.lng,i=t.lat,n=t.alt,o=this.options,s=o.heading,a=o.pitch,r=o.roll;this.position=Cesium.Cartesian3.fromDegrees(e,i,n+this.options.normalHeight),this.hpr=new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(s),Cesium.Math.toRadians(a),Cesium.Math.toRadians(r)),this.drawFrustumOutline(),this.drawFrustumFilled(),this.monitorKeyboard(),this.updateFrustumSquareBase(40),this.syncHpr(),this.options.videoUrl&&this.addVideoToFrustumTop2()}},{key:"monitorKeyboard",value:function(){var t=this,e={KeyQ:function(){return t.setIntervalhpr(-.45)},KeyE:function(){return t.setIntervalhpr(.45)},KeyB:function(){return t.setIntervalhprr(-.45)},KeyN:function(){return t.setIntervalhprr(.45)},KeyW:function(){return t.updateFrustumPosition("move",-1e-5)},KeyS:function(){return t.updateFrustumPosition("move",1e-5)},KeyA:function(){return t.updateFrustumPosition("move",-1e-5,0)},KeyD:function(){return t.updateFrustumPosition("move",1e-5,0)},KeyC:function(){return t.updateFrustumHeight(1)},KeyZ:function(){return t.updateFrustumHeight(-1)}};this.keydownHandler=function(t){e[t.code]&&e[t.code]()},this.keyupHandler=function(){return t.stopFrustumRotation()},document.addEventListener("keydown",this.keydownHandler),document.addEventListener("keyup",this.keyupHandler)}},{key:"addVideoToFrustumTop",value:function(){var t=this,e=document.createElement("video");if(e.width=640,e.height=360,e.autoplay=!0,e.loop=!0,e.muted=!0,document.body.appendChild(e),flvjs.isSupported()){var i=flvjs.createPlayer({type:"flv",isLive:!0,hasAudio:!1,enableStashBuffer:!0,enableWorker:!0,autoCleanupSourceBuffer:!0,url:this.options.videoUrl});i.attachMediaElement(e),i.load(),i.play()}else console.error("FLV.js is not supported in this browser.");var n=this.computeFrustumCorners(this.frustum,this.position,this.hpr),o=new Cesium.PolygonHierarchy([n.bottomLeft,n.bottomRight,n.topRight,n.topLeft]);this.videoEntity=this.viewer.entities.add(new Cesium.Entity({id:"22222222",show:!0,polygon:{hierarchy:o}})),e.addEventListener("loadeddata",(function(){t.videoEntity.polygon.material=e}))}},{key:"addVideoToFrustumTop2",value:(e=o()(a.a.mark((function t(){var e,i,n,o=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("video")).width=640,e.height=360,e.autoplay=!0,e.loop=!0,e.muted=!0,document.body.appendChild(e),t.next=9,this.startPlay(e,this.options.videoUrl);case 9:i=this.computeFrustumCorners(this.frustum,this.position,this.hpr),n=new Cesium.PolygonHierarchy([i.bottomLeft,i.bottomRight,i.topRight,i.topLeft]),this.videoEntity=this.viewer.entities.add(new Cesium.Entity({id:"22222222",show:!0,polygon:{hierarchy:n}})),e.addEventListener("loadeddata",(function(){o.videoEntity.polygon.material=e}));case 13:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"startPlay",value:(t=o()(a.a.mark((function t(e,i){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.webrtc&&this.webrtc.close(),this.webrtc=new SrsRtcWhipWhepAsync,e.srcObject=this.webrtc.stream,t.prev=3,t.next=6,this.webrtc.play(i);case 6:n=t.sent,console.log(n),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),this.webrtc.close();case 13:case"end":return t.stop()}}),t,this,[[3,10]])}))),function(e,i){return t.apply(this,arguments)})},{key:"computeFrustumCorners",value:function(t,e,i){var n=Math.tan(.5*t.fov),o=t.far*n,s=o*t.aspectRatio,a=new Cesium.Cartesian3(-s,o,-t.far),r=new Cesium.Cartesian3(s,o,-t.far),l=new Cesium.Cartesian3(-s,-o,-t.far),c=new Cesium.Cartesian3(s,-o,-t.far),u=Cesium.Transforms.headingPitchRollToFixedFrame(e,i);return{topLeft:Cesium.Matrix4.multiplyByPoint(u,a,new Cesium.Cartesian3),topRight:Cesium.Matrix4.multiplyByPoint(u,r,new Cesium.Cartesian3),bottomLeft:Cesium.Matrix4.multiplyByPoint(u,l,new Cesium.Cartesian3),bottomRight:Cesium.Matrix4.multiplyByPoint(u,c,new Cesium.Cartesian3)}}},{key:"updatePolygonPosition",value:function(){var t=this.computeFrustumCorners(this.frustum,this.position,this.hpr);this.videoEntity.polygon.hierarchy=new Cesium.CallbackProperty((function(e){return new Cesium.PolygonHierarchy([t.bottomLeft,t.bottomRight,t.topRight,t.topLeft])}))}},{key:"updateFrustumSquareBase",value:function(t){var e=(56-t)/55*9900+100;this.frustum.aspectRatio=1;var i=Math.sqrt(e),n=this.frustum.far,o=2*Math.atan(i/(2*n));this.frustum.fov=o,this.drawFrustumOutline(),this.drawFrustumFilled(),this.syncHpr()}},{key:"updateFrustumHeight",value:function(t){var e=Cesium.Cartographic.fromCartesian(this.position);e.height+=t,this.position=Cesium.Cartesian3.fromDegrees(Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude),e.height),this.options.position.alt=e.height,this.syncHpr(),this.drawFrustumOutline(),this.drawFrustumFilled()}},{key:"updatePositionHeight",value:function(t){this.options.position=this.cartesian3Towgs84(t),this.syncHpr(),this.drawFrustumOutline(),this.drawFrustumFilled()}},{key:"cartesian3Towgs84",value:function(t){var e=this.viewer.scene.globe.ellipsoid,i=new Cesium.Cartesian3(t.x,t.y,t.z),n=e.cartesianToCartographic(i),o=Cesium.Math.toDegrees(n.latitude);return{lng:Cesium.Math.toDegrees(n.longitude),lat:o,alt:n.height<0?0:n.height}}},{key:"setIntervalhpr",value:function(t){var e=this;this.stopFrustumRotation(),this.setInterval1=setInterval((function(){e.head+=t,e.updateFrustumHPR(Cesium.Math.toRadians(e.head),e.pitch)}),10)}},{key:"setIntervalhprr",value:function(t){var e=this;this.stopFrustumRotation(),this.setInterval1=setInterval((function(){e.pitch=Math.max(60,Math.min(180,e.pitch+t)),e.updateFrustumHPR(e.head,Cesium.Math.toRadians(e.pitch))}),10)}},{key:"stopFrustumRotation",value:function(){this.setInterval1&&(clearInterval(this.setInterval1),this.setInterval1=null)}},{key:"drawFrustumFilled",value:function(){var t=Cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpr),e=new Cesium.FrustumGeometry({frustum:this.frustum,origin:Cesium.Matrix4.getTranslation(t,new Cesium.Cartesian3),orientation:Cesium.Quaternion.fromRotationMatrix(Cesium.Matrix4.getRotation(t,new Cesium.Matrix3))});this.currentFrustumFilled&&this.viewer.scene.primitives.remove(this.currentFrustumFilled),this.currentFrustumFilled=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:e,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromAlpha(Cesium.Color.YELLOW,.4))}}),appearance:new Cesium.MaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.fromAlpha(Cesium.Color.YELLOW,.4)}),translucent:!0}),asynchronous:!1,show:this.options.show}),this.viewer.scene.primitives.add(this.currentFrustumFilled)}},{key:"drawFrustumOutline",value:function(){var t=Cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpr),e=new Cesium.FrustumOutlineGeometry({frustum:this.frustum,origin:Cesium.Matrix4.getTranslation(t,new Cesium.Cartesian3),orientation:Cesium.Quaternion.fromRotationMatrix(Cesium.Matrix4.getRotation(t,new Cesium.Matrix3))});this.currentFrustumOutline&&this.viewer.scene.primitives.remove(this.currentFrustumOutline),this.currentFrustumOutline=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:e,attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.YELLOW)}}),appearance:new Cesium.PolylineColorAppearance({translucent:!1}),asynchronous:!1,show:this.options.show}),this.viewer.scene.primitives.add(this.currentFrustumOutline)}},{key:"updateFrustumPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"move",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:90,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("move"===t){var o=turf.point([this.options.position.lng,this.options.position.lat]),s=Cesium.Math.toDegrees(this.hpr.heading),a=s+i,r={units:"degrees"},l=turf.destination(o,e,a,r).geometry.coordinates;this.position=Cesium.Cartesian3.fromDegrees(l[0],l[1],this.options.position.alt+this.options.normalHeight),this.options.position.lng=l[0],this.options.position.lat=l[1],this.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(l[0],l[1],this.viewer.camera.positionCartographic.height)})}"update"===t&&(this.position=e,this.options.videoUrl&&this.updatePolygonPosition()),n&&(this.syncHpr(),this.updateFrustumAttributes())}},{key:"syncHpr",value:function(){if(this.viewer1){var t=this.options.position,e=t.lng,i=t.lat,n=t.alt,o=-this.hpr.pitch-Cesium.Math.toRadians(-90);this.viewer1.camera.setView({destination:Cesium.Cartesian3.fromDegrees(e,i,n+this.options.normalHeight),orientation:{heading:this.hpr.heading+Cesium.Math.toRadians(-90),pitch:o,roll:this.hpr.roll}})}}},{key:"updateFrustumHPR",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.head,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.pitch,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";function s(t){return t*Math.PI/180}"alone"==o?(this.hpr.heading=s(t),this.hpr.pitch=s(e),this.hpr.roll=s(i)):(this.hpr.heading=Cesium.Math.negativePiToPi(t),this.hpr.pitch=Cesium.Math.negativePiToPi(e),this.hpr.roll=Cesium.Math.negativePiToPi(i)),n&&(this.syncHpr(),this.updateFrustumAttributes())}},{key:"updateFrustumAttributes",value:function(){if(this.position&&this.hpr){var t=Cesium.Transforms.headingPitchRollToFixedFrame(this.position,this.hpr);if(t)try{var e=new Cesium.FrustumOutlineGeometry({frustum:this.frustum,origin:Cesium.Matrix4.getTranslation(t,new Cesium.Cartesian3),orientation:Cesium.Quaternion.fromRotationMatrix(Cesium.Matrix4.getRotation(t,new Cesium.Matrix3))}),i=new Cesium.PolylineColorAppearance({translucent:!1}),n=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.YELLOW),o=new Cesium.FrustumGeometry({frustum:this.frustum,origin:Cesium.Matrix4.getTranslation(t,new Cesium.Cartesian3),orientation:Cesium.Quaternion.fromRotationMatrix(Cesium.Matrix4.getRotation(t,new Cesium.Matrix3))}),s=new Cesium.MaterialAppearance({material:Cesium.Material.fromType("Color",{color:Cesium.Color.YELLOW.withAlpha(.5)}),translucent:!0}),a=Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED.withAlpha(.5));this.currentFrustumOutline&&this.viewer.scene.primitives.remove(this.currentFrustumOutline),this.currentFrustumFilled&&this.viewer.scene.primitives.remove(this.currentFrustumFilled),this.currentFrustumOutline=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:e,attributes:{color:n}}),appearance:i,asynchronous:!1,show:this.options.show}),this.viewer.scene.primitives.add(this.currentFrustumOutline),this.currentFrustumFilled=new Cesium.Primitive({geometryInstances:new Cesium.GeometryInstance({geometry:o,attributes:{color:a}}),appearance:s,asynchronous:!1,show:this.options.show}),this.viewer.scene.primitives.add(this.currentFrustumFilled)}catch(t){console.error("Error in drawFrustum:",t)}else console.error("Transform generation failed.")}else console.error("Position or HPR is not defined:",this.position,this.hpr)}},{key:"updateFrustumNearFar",value:function(t,e){this.frustum.near=t,this.frustum.far=e,this.drawFrustumOutline(),this.drawFrustumFilled()}},{key:"updateFrustumFov",value:function(t){this.frustum.fov=Cesium.Math.toRadians(t),this.drawFrustumOutline(),this.drawFrustumFilled()}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t&&(this.options.show=t,this.currentFrustumOutline.show=t,this.currentFrustumFilled.show=t)}},{key:"remove",value:function(){document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("keyup",this.keyupHandler),this.currentFrustumFilled&&this.viewer.scene.primitives.remove(this.currentFrustumFilled),this.currentFrustumOutline&&this.viewer.scene.primitives.remove(this.currentFrustumOutline),this.videoEntity&&this.viewer.entities.remove(this.videoEntity)}}],[{key:"setDefaultValue",value:function(t){var e;t.options.position=t.options.position||{},t.options.fov=t.options.fov||30,t.options.aspectRatio=t.options.aspectRatio||1,t.options.near=t.options.near||1,t.options.far=t.options.far||120,t.options.heading=t.options.heading||0,t.options.pitch=t.options.pitch||90,t.options.roll=t.options.roll||0,t.options.show=null===(e=t.options.show)||void 0===e||e,t.options.videoUrl=t.options.videoUrl||"",t.options.index=t.options.index||0,t.options.arr=t.options.arr||[],t.options.normalHeight=t.options.normalHeight||100}}]);var t,e}();function Gb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var Ub=function(){return _()((function t(e,i){k()(this,t),this.options=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Gb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Gb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},e),this.pointEntity=null,this.billboardEntity=null,this.lineEntity=null,this.updatedPosition=[],this.pointUpdatedPosition=[],this.viewer=i,this.handler=new Cesium.ScreenSpaceEventHandler(i.scene.canvas),this.pinBuilder=new Cesium.PinBuilder,this.index=null,t.setDefaultValue(this),t.init(this)}),[{key:"changeAltitude",value:function(){var t,e,i=!1,n=this,o=!1;document.addEventListener("keydown",(function(t){"h"===t.key&&(o=!0)})),document.addEventListener("keyup",(function(t){o=!1})),this.handler.setInputAction((function(o){var s=n.viewer.scene.pick(o.position);if(Cesium.defined(s)&&Cesium.defined(s.id)&&s.id===n.billboardEntity){i=!0,t=o.position;var a=Cesium.Cartographic.fromCartesian(n.billboardEntity.position.getValue());e=a.height}}),Cesium.ScreenSpaceEventType.LEFT_DOWN),this.handler.setInputAction((function(s){if(i&&0==o){var a=n.viewer.scene.pickPosition(s.endPosition);if(n.disableCameraDrag(n.viewer,!1),a){var r=Cesium.Cartographic.fromCartesian(a),l=r.longitude,c=r.latitude,u=Cesium.Cartesian3.fromRadians(l,c,e),p=Cesium.Cartesian3.fromRadians(l,c,0);n.billboardEntity.position=new Cesium.CallbackProperty((function(){return u}),!1),n.billboardEntity.label.text="Lat: ".concat(Cesium.Math.toDegrees(l).toFixed(6),"\nLon: ").concat(Cesium.Math.toDegrees(c).toFixed(6),"\nAlt: ").concat(e.toFixed(2),"m"),n.pointEntity.position=new Cesium.CallbackProperty((function(){return p}),!1)}}if(i&&o){console.log(o);var h=s.endPosition,d=t.y-h.y,m=e+d,f=Cesium.Cartographic.fromCartesian(n.billboardEntity.position.getValue()),v=Cesium.Cartesian3.fromDegrees(Cesium.Math.toDegrees(f.longitude),Cesium.Math.toDegrees(f.latitude),m);n.disableCameraDrag(n.viewer,!1),n.billboardEntity.position=new Cesium.CallbackProperty((function(){return v}),!1),n.billboardEntity.label.text="Lat: ".concat(Cesium.Math.toDegrees(f.longitude).toFixed(6),"\nLon: ").concat(Cesium.Math.toDegrees(f.latitude).toFixed(6),"\nAlt: ").concat(m.toFixed(2),"m")}}),Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction((function(t){var e=n.viewer.scene.pick(t.position);i=!1,o=!1,n.disableCameraDrag(n.viewer,!0),Cesium.defined(e)&&Cesium.defined(e.id)&&e.id===n.billboardEntity&&(n.options.saveFun&&n.options.saveFun(null,!1),n.options.selectFun&&n.options.selectFun(n.billboardEntity.index-1),n.options.frustum.updatePositionHeight(n.billboardEntity.position.getValue()))}),Cesium.ScreenSpaceEventType.LEFT_UP)}},{key:"disableCameraDrag",value:function(t,e){t.scene.screenSpaceCameraController.enableRotate=e,t.scene.screenSpaceCameraController.enableTranslate=e,t.scene.screenSpaceCameraController.enableZoom=e,t.scene.screenSpaceCameraController.enableTilt=e,t.scene.screenSpaceCameraController.enableLook=e}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t&&(this.pointEntity.show=t,this.billboardEntity.show=t,this.lineEntity.show=t)}},{key:"remove",value:function(){this.viewer.entities.remove(this.pointEntity),this.viewer.entities.remove(this.billboardEntity),this.viewer.entities.remove(this.lineEntity)}}],[{key:"setDefaultValue",value:function(t){var e;t.options.positions=t.options.positions||{},t.options.normalHeight=t.options.normalHeight||100,t.options.airHeight=t.options.airHeight||100,t.options.image=t.options.image||"/static/img/cluster2.png",t.options.show=t.options.show||!0,t.options.index=t.options.index||1,t.options.saveFun=t.options.saveFun||null,t.options.selectFun=t.options.selectFun||null,t.options.keyboard=null===(e=t.options.keyboard)||void 0===e||e,t.options.updateFrustumFun=t.options.updateFrustumFun||null,t.options.frustum=t.options.frustum||null}},{key:"init",value:function(t){var e=t.options.positions;t.pointEntity=t.viewer.entities.add({show:t.options.show,position:Cesium.Cartesian3.fromDegrees(e.lng,e.lat,0),point:{pixelSize:8,color:Cesium.Color.WITHE,heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:0}});var i=t.pinBuilder.fromText(t.options.index,Cesium.Color.fromCssColorString("#00d590"),36).toDataURL(),n=0;n=e.altitude?e.altitude:t.options.normalHeight,t.billboardEntity=t.viewer.entities.add({show:t.options.show,position:Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt+t.options.normalHeight),label:{text:"Lat: ".concat(e.lng.toFixed(8),"\nLon: ").concat(e.lat.toFixed(8),"\nAlt: ").concat(n.toFixed(8),"m"),font:"14px sans-serif",fillColor:Cesium.Color.YELLOW,outlineColor:Cesium.Color.BLACK,outlineWidth:2,pixelOffset:new Cesium.Cartesian2(0,-60),heightReference:Cesium.HeightReference.RELATIVE_TO_TERRAIN,show:!1},billboard:{image:i,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,width:36,height:36},index:t.options.index}),t.lineEntity=t.viewer.entities.add({show:t.options.show,polyline:{positions:new Cesium.CallbackProperty((function(){return[t.pointEntity.position.getValue(),t.billboardEntity.position.getValue()]}),!1),width:1,material:new Cesium.PolylineOutlineMaterialProperty({outlineColor:Cesium.Color.GAINSBORO,outlineWidth:1,color:Cesium.Color.WITHE}),zIndex:99999999}}),t.options.keyboard&&t.changeAltitude(),t.handler.setInputAction((function(e){var i=t.viewer.scene.pick(e.position);Cesium.defined(i)&&Cesium.defined(i.id)&&i.id===t.billboardEntity&&t.options.selectFun&&t.options.selectFun(t.billboardEntity.index-1)}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}}])}();function Wb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Yb(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Wb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Wb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Jb=function(){return _()((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;k()(this,t),this.options=Yb({},e),this.viewer=i,this.viewer1=n,this.entity=null,this.frustum=null,this.billordPointLineMaps=[],this.index=0,this.positions=[],t.setDefaultValue(this),this.create()}),[{key:"create",value:function(){var t=this;if(!(this.options.positions.length<2)){var e=this.options.frustumShow;this.entity=this.viewer.entities.add({show:this.options.show,polyline:{positions:new Cesium.CallbackProperty((function(){for(var e=[],i=0;i<t.billordPointLineMaps.length;i++){var n=t.billordPointLineMaps[i];e.push(n.billboardEntity.position.getValue())}return e}),!1),width:3,material:Cesium.Color.fromCssColorString(this.options.color)}});for(var i=0;i<this.options.positions.length;i++){var n=this.options.positions[i];e&&i==this.index&&(this.frustum=new Vb({position:n,show:!1,arr:this.options.positions,index:i,normalHeight:this.options.normalHeight},this.viewer,this.viewer1));var o=new Ub({positions:n,index:i+1,saveFun:this.options.saveFun,selectFun:this.options.selectFun,keyboard:this.options.keyboard,updateFrustumFun:this.updateFrustumPosition,normalHeight:this.options.normalHeight,frustum:this.frustum,airHeight:this.options.airHeight},this.viewer);this.billordPointLineMaps.push(o)}this.onKey()}}},{key:"show",get:function(){return this.options.show},set:function(t){"boolean"==typeof t&&(this.frustum.currentFrustumOutline.show=t,this.billordPointLineMaps.forEach((function(e){e.show=t})),this.entity.show=t)}},{key:"onKey",value:function(){var t=this;document.addEventListener("keydown",(function(e){switch(e.key){case"ArrowUp":t.index+=1,t.updateFrustum(!0);break;case"ArrowDown":t.index-=1,t.updateFrustum(!1)}}))}},{key:"updateFrustum",value:function(t){if(console.log(this.index),this.index>this.options.positions.length-1||this.index<0){var e=this.index>0?"已选中最后一个航点":"已选中第一个航点";alert(e)}else for(var i=0;i<this.billordPointLineMaps.length;i++){var n=this.billordPointLineMaps[i];if(i==this.index){var o=n.billboardEntity.position.getValue();0!==this.index&&(this.direction(this.billordPointLineMaps[i-1].billboardEntity.position.getValue(),n.billboardEntity.position.getValue()).hpr,ln()("hpr")),0==this.index&&(this.direction(this.billordPointLineMaps[0].billboardEntity.position.getValue(),this.billordPointLineMaps[1].billboardEntity.position.getValue()).hpr,ln()("hpr")),o&&this.frustum.updateFrustumPosition("update",o)}}}},{key:"cartesian3Towgs84",value:function(t){var e=this.viewer.scene.globe.ellipsoid,i=new Cesium.Cartesian3(t.x,t.y,t.z),n=e.cartesianToCartographic(i),o=Cesium.Math.toDegrees(n.latitude);return{lng:Cesium.Math.toDegrees(n.longitude),lat:o,alt:n.height<0?0:n.height}}},{key:"direction",value:function(t,e){var i=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),n=Cesium.Cartesian3.normalize(i,new Cesium.Cartesian3),o=Cesium.Transforms.rotationMatrixFromPositionVelocity(t,n,Cesium.Ellipsoid.WGS84),s=Cesium.Matrix4.fromRotationTranslation(o,t),a=Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Matrix4.getTranslation(s,new Cesium.Cartesian3),Cesium.Ellipsoid.WGS84,new Cesium.Matrix4),r=Cesium.Matrix4.multiply(Cesium.Matrix4.inverse(a,new Cesium.Matrix4),s,new Cesium.Matrix4),l=Cesium.Matrix4.getMatrix3(r,new Cesium.Matrix3),c=Cesium.Quaternion.fromRotationMatrix(l),u=Cesium.HeadingPitchRoll.fromQuaternion(c);return u.pitch=90,{hpr:u,orientation:Cesium.Transforms.headingPitchRollQuaternion(t,u)}}},{key:"delPosition",value:function(t){this.options.positions.splice(t,1),this.remove(),this.create()}},{key:"getNewPositions",value:function(){for(var t=[],e=0;e<this.billordPointLineMaps.length;e++){var i=this.billordPointLineMaps[e],n=this.cartesian3Towgs84(i.billboardEntity.position.getValue());t.push(n)}return t}},{key:"remove",value:function(){this.billordPointLineMaps.forEach((function(t,e){t.remove()})),this.frustum&&this.frustum.remove(),this.viewer.entities.remove(this.entity),this.billordPointLineMaps=[]}},{key:"addPoint",value:function(t){this.options.positions=t,this.remove(),this.create()}},{key:"updateFrustumPosition",value:function(t){if(this.billordPointLineMaps&&0!==this.billordPointLineMaps.length){this.frustum&&(this.frustum.show=!0);var e=this.billordPointLineMaps[t].billboardEntity.position.getValue();if(0!==t){var i=t===this.billordPointLineMaps.length-1?this.billordPointLineMaps[t-1].billboardEntity.position.getValue():this.billordPointLineMaps[t+1].billboardEntity.position.getValue(),n=this.direction(t===this.billordPointLineMaps.length-1?i:e,t===this.billordPointLineMaps.length-1?e:i).hpr;this.frustum.updateFrustumHPR(n.heading,Cesium.Math.toRadians(this.frustum.pitch),n.roll)}else{var o=this.billordPointLineMaps[1].billboardEntity.position.getValue(),s=this.direction(e,o).hpr;this.frustum.updateFrustumHPR(s.heading,Cesium.Math.toRadians(this.frustum.pitch),s.roll)}e&&this.frustum.updateFrustumPosition("update",e);var a=this.cartesian3Towgs84(e);this.billordPointLineMaps.forEach((function(t){t.billboardEntity.label.show=!1}));var r=this.billordPointLineMaps.find((function(e){return e.billboardEntity.index==t+1}));return r&&(r.billboardEntity.label.show=!0),a}}},{key:"flyTo",value:function(){for(var t=[],e=0;e<this.options.positions.length;e++){var i=Cesium.Cartesian3.fromDegrees(this.options.positions[e].lng,this.options.positions[e].lat,this.options.positions[e].alt+this.options.height);t.push(i.x,i.y,i.z)}var n=Cesium.BoundingSphere.fromVertices(t);this.viewer.camera.flyToBoundingSphere(n,{offset:{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-80),roll:Cesium.Math.toRadians(0)}})}},{key:"countLength",value:function(){if(this.options.positions.length<2)return 0;var t=[];this.options.positions.forEach((function(e){t.push([e.lng,e.lat])}));var e=turf.lineString(t);return(1e3*turf.length(e)).toFixed(2)}},{key:"countTime",value:function(){var t=Math.floor(Number(this.countLength()))/this.options.speed,e=Math.floor(t%60);return Math.floor(t/60)+"分"+e+"秒"}}],[{key:"setDefaultValue",value:function(t){var e,i;t.options.positions=t.options.positions||[],t.options.show=t.options.show||!0,t.options.color=t.options.color||"#00d590",t.options.height=t.options.height||500,t.options.speed=t.options.speed||1,t.options.frustumShow=null===(e=t.options.frustumShow)||void 0===e||e,t.options.saveFun=t.options.saveFun||null,t.options.selectFun=t.options.selectFun||null,t.options.keyboard=null===(i=t.options.keyboard)||void 0===i||i,t.options.normalHeight=t.options.normalHeight||100,t.options.airHeight=t.options.airHeight||100}}])}();function qb(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Xb=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k()(this,e),(i=qb(this,e,[t,n])).options.tipText=n.tipText?n.tipText:"左键确定,右键结束;",i}return Xi()(e,t),_()(e,[{key:"start",value:function(t){var e=this;if(YJ.Measure.GetMeasureStatus())t("上一次测量未结束");else{var i=void 0;YJ.Measure.SetMeasureStatus(!0),this.tip=new Z(this.options.tipText,this.sdk),this.event=new X(this.sdk),this.isEntity=!1,this.event.mouse_left((function(n,o){e.end();var s=e.cartesian3Towgs84(i||o,e.viewer),a=e.viewer.scene.pick(n.position);Cesium.defined(a)&&Cesium.defined(a.id)&&a.id.id===window.airportEntity.options.id&&(e.isEntity=!0),t(null,s,e.isEntity)})),this.event.mouse_right((function(i,n){e.end(),t(!1)})),this.event.mouse_move((function(t,n){i=n,e.tip.setPosition(n,t.endPosition.x,t.endPosition.y)})),this.event.gesture_pinck_start((function(n,o){var s=new Date;e.event.gesture_pinck_end((function(){if(new Date-s>=500)e.end(),t(!1);else{e.end();var n=e.cartesian3Towgs84(i||o,e.viewer);t(null,n)}}))}))}}},{key:"end",value:function(){YJ.Measure.SetMeasureStatus(!1),this.event.destroy(),this.tip.destroy()}}])}(Qs);function Zb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Kb(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Zb(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Zb(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function $b(t,e,i){return e=Ji()(e),Wi()(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,i||[],Ji()(t).constructor):e.apply(t,i))}var Qb=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return k()(this,e),(i=$b(this,e,[t,n])).viewer=i.sdk.viewer,i.options.name=n.name||"飞线",i.options.pointNumber=n.pointNumber||200,i.options.height=n.height||200,i.options.heightDifference=n.heightDifference||3e3,i.options.width=n.width||2,i.options.duration=n.duration||10,i.options.color=n.color||"rgba(255,255,255,1)",i.options.lineBackAlpha=n.lineBackAlpha||.05,i.options.positions=n.positions||[],i.options.show=!n.show&&!1!==n.show||n.show,i.Dialog=o,i._EventBinding=new hn,i._elms={},i.positionArea=[],i.positions=[],i.sdk.addIncetance(i.options.id,i),e.drawLine(i),i}return Xi()(e,t),_()(e,[{key:"getRandomPointsInCesiumPolygon",value:function(t,e){var i=[],n=[],o=[];t.forEach((function(t){i.push(t.lng),n.push(t.lat),o.push([t.lng,t.lat])})),o.push([o[0][0],o[0][1]]);for(var s=Math.min.apply(Math,i),a=Math.max.apply(Math,i),r=Math.min.apply(Math,n),l=Math.max.apply(Math,n),c=[];c.length<e;){var u=s+Math.random()*(a-s),p=r+Math.random()*(l-r),h=turf.point([u,p]),d=turf.polygon([o]);if(turf.booleanPointInPolygon(h,d)){var m=Cesium.Cartesian3.fromDegrees(u,p),f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(m).height;c.push([u,p,f])}}return c}},{key:"getLine",value:function(t,e){var i;t.viewer.entities.getById(t.options.id)&&(t.viewer.entities.getById(t.options.id)._children.forEach((function(e){t.viewer.entities.remove(e)})),t.viewer.entities.remove(t.viewer.entities.getById(t.options.id))),i=t.viewer.entities.add(new Cesium.Entity({id:t.options.id,show:t.options.show})),e.forEach((function(e,n){var o=e,s=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]),a=Cesium.Cartesian3.fromDegrees(o[0],o[1],o[2]+t.options.height+Math.random()*t.options.heightDifference);t.viewer.entities.add({parent:i,id:t.options.id+"-"+(new Date).getTime()+n,polyline:{positions:[s,a],width:t.options.width,material:new Cesium.FlowLineMaterialProperty({color:t.options.color,duration:t.options.duration,lineBackAlpha:t.options.lineBackAlpha,num:0})}})}))}},{key:"color",get:function(){return this.options.color},set:function(t){var e=this;this.options.color=t;var i=this.viewer.entities.getById(this.options.id);i&&i._children.forEach((function(e){e.polyline.material.color=Cesium.Color.fromCssColorString(t)})),this._elms.color&&this._elms.color.forEach((function(i,n){var o=new YJColorPicker({el:i.el,size:"mini",alpha:!0,defaultColor:t,disabled:!1,openPickerAni:"opacity",sure:function(t){e.color=t},clear:function(){e.color="rgba(255,255,255,1)"}});e._elms.color[n]=o}))}},{key:"pointNumber",get:function(){return this.options.pointNumber},set:function(t){if(this.options.pointNumber=t,this.viewer.entities.getById(this.options.id)){var e=this.getRandomPointsInCesiumPolygon(this.positionArea,this.options.pointNumber);this.positions=e,this.getLine(this,e)}}},{key:"height",get:function(){return this.options.height},set:function(t){this.options.height=t,this.viewer.entities.getById(this.options.id)&&this.getLine(this,this.positions)}},{key:"show",get:function(){return this.options.show},set:function(t){this.options.show=t;var e=this.viewer.entities.getById(this.options.id);e&&(e.show=t)}},{key:"heightDifference",get:function(){return this.options.heightDifference},set:function(t){this.options.heightDifference=t,this.viewer.entities.getById(this.options.id)&&this.getLine(this,this.positions)}},{key:"width",get:function(){return this.options.width},set:function(t){this.options.width=t;var e=this.viewer.entities.getById(this.options.id);e&&e._children.forEach((function(e){e.polyline.width=t}))}},{key:"duration",get:function(){return this.options.duration},set:function(t){this.options.duration=t;var e=this.viewer.entities.getById(this.options.id);e&&e._children.forEach((function(e){e.polyline.material.duration=t}))}},{key:"lineBackAlpha",get:function(){return this.options.lineBackAlpha},set:function(t){this.options.lineBackAlpha=t;var e=this.viewer.entities.getById(this.options.id);e&&e._children.forEach((function(e){e.polyline.material.lineBackAlpha=t}))}},{key:"edit",value:(s=o()(a.a.mark((function t(){var e,i,n,o,s=this,r=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=r.length>0&&void 0!==r[0]&&r[0],this.originalOptions=this.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=19;break}return t.next=7,new Ki(this.sdk,this.originalOptions,{title:"飞线属性",left:"180px",top:"100px",confirmCallBack:function(t){s.name=s.name.trim(),s.name||(s.name="飞线"),s.originalOptions=s.deepCopyObj(s.options),s._DialogObject.close(),s.Dialog.confirmCallBack&&s.Dialog.confirmCallBack(s.originalOptions),be(s.sdk,s.options.id),re(s.sdk,s.options.id)},resetCallBack:function(){s.reset(),s.Dialog.resetCallBack&&s.Dialog.resetCallBack()},removeCallBack:function(){s.Dialog.removeCallBack&&s.Dialog.removeCallBack()},closeCallBack:function(){s.reset(),s.Dialog.closeCallBack&&s.Dialog.closeCallBack()},showCallBack:function(t){s.show=t,s.Dialog.showCallBack&&s.Dialog.showCallBack()}},!0);case 7:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" flow-line-surface",(i=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">名称</span>\n <input class="input" maxlength="40" type="text" @model="name">\n </div>\n <div class="col">\n <span class="label">颜色</span>\n <div class="flowLine-color"></div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">飞线数量</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="1" max="99999" @model="pointNumber">\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">飞线宽度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" max="99999" min="1" step="1" @model="width">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n\n <div class="col">\n <span class="label">飞线高度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="999999" step="1" @model="height">\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">飞线高度差</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" max="99999" min="0" step="1" @model="heightDifference">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">单次运动时长(s)</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" max="999999999" min="1" step="1" @model="duration">\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">轨迹透明度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" max="1" min="0.01" step="0.01" @model="lineBackAlpha">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(i),n=new YJColorPicker({el:i.getElementsByClassName("flowLine-color")[0],size:"mini",alpha:!0,defaultColor:this.color,disabled:!1,openPickerAni:"opacity",sure:function(t){s.color=t},clear:function(){s.color="rgba(255,255,255,1)"}}),o=i.getElementsByTagName("*"),this._EventBinding.on(this,o),this._elms=this._EventBinding.element,this._elms.color=[n],t.next=19;break;case 19:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"reset",value:function(){this.viewer.entities.getById(this.options.id)&&(this.name=this.originalOptions.name,this.pointNumber=this.originalOptions.pointNumber,this.height=this.originalOptions.height,this.heightDifference=this.originalOptions.heightDifference,this.width=this.originalOptions.width,this.duration=this.originalOptions.duration,this.color=this.originalOptions.color,this.lineBackAlpha=this.originalOptions.lineBackAlpha)}},{key:"flyTo",value:(n=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u,p,h=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(h.length>0&&void 0!==h[0]&&h[0],ii(0),Je(this.sdk),qe(this.sdk),this.options.customView&&this.options.customView.relativePosition&&this.options.customView.orientation)e={heading:Cesium.Math.toRadians(this.options.customView.orientation.heading||0),pitch:Cesium.Math.toRadians(this.options.customView.orientation.pitch||-60),roll:Cesium.Math.toRadians(this.options.customView.orientation.roll||0)},i=this.options.customView.relativePosition.lng,n=this.options.customView.relativePosition.lat,o=this.options.customView.relativePosition.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),r={lng:0,lat:0},this.options.position?r=Kb({},this.options.position):this.options.positions?r=Kb({},this.options.positions[0]):this.options.center?r=Kb({},this.options.center):this.options.start?r=Kb({},this.options.start):(this.options.hasOwnProperty("lng")&&(r.lng=this.options.lng),this.options.hasOwnProperty("lat")&&(r.lat=this.options.lat),this.options.hasOwnProperty("alt")&&(r.alt=this.options.alt)),i=this.options.customView.relativePosition.lng+r.lng,n=this.options.customView.relativePosition.lat+r.lat,o=this.options.customView.relativePosition.alt+r.alt,s=Cesium.Cartesian3.fromDegrees(i,n,o),this.sdk.viewer.camera.flyTo({destination:s,orientation:e});else{for(l=[],c=0;c<this.positions.length;c++)u=Cesium.Cartesian3.fromDegrees(this.positions[c][0],this.positions[c][1],this.positions[c][2]+this.options.height+this.options.heightDifference/2),l.push(u.x,u.y,u.z);p=Cesium.BoundingSphere.fromVertices(l),this.viewer.camera.flyToBoundingSphere(p,{offset:{heading:Cesium.Math.toRadians(0),pitch:Cesium.Math.toRadians(-20),roll:Cesium.Math.toRadians(0)}})}case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getSphere",value:function(){var t=this;return new Promise((function(e){var i=setInterval((function(){var e=new Cesium.BoundingSphere;t.sdk.viewer._dataSourceDisplay.getBoundingSphere(t.viewer.entities.getById(t.options.id),!1,e)===Cesium.BoundingSphereState.DONE&&clearInterval(i)}),1e3)}))}},{key:"remove",value:(i=o()(a.a.mark((function t(){var e=this;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.viewer.entities.getById(this.options.id)&&(this.viewer.entities.getById(this.options.id)._children.forEach((function(t){e.viewer.entities.remove(t)})),this.viewer.entities.remove(this.viewer.entities.getById(this.options.id))),this.positions=[],this.entity=null,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=6,this.sdk.removeIncetance(this.options.id);case 6:return t.next=8,be(this.sdk,this.options.id);case 8:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"flicker",value:function(){}}],[{key:"create",value:function(t){new na(t.sdk).start((function(e,i){t.positionArea=i;var n=t.getRandomPointsInCesiumPolygon(i,t.options.pointNumber);t.positions=n,t.getLine(t,n),t.edit(!0)}))}},{key:"drawLine",value:function(t){t.positionArea=t.options.positions;var e=t.getRandomPointsInCesiumPolygon(t.options.positions,t.options.pointNumber);t.positions=e,t.getLine(t,e)}}]);var i,n,s}(jn);function tC(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var eC=function(){return _()((function t(e,i){k()(this,t),this.sdk=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?tC(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):tC(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},e),this.progress=document.getElementById("progress"),this.handle=document.getElementById("handle"),this.timeline=document.getElementsByClassName("timeline-container")[0],this.currentTime=document.getElementById("currentTime"),this.timelineCon=document.getElementsByClassName("timeline-container")[0],this.speed=i,this.animationId,this.startTime=Date.now(),this.manualPosition=null,this.isDragging=!1,this.pauseed=!1,this.time="",this.update=this.update.bind(this),t.init(this)}),[{key:"moveComplay",value:function(t){var e=this;document.addEventListener("mouseup",(function(){e.isDragging&&(e.isDragging=!1,null!==e.manualPosition&&(e.startTime=Date.now()-86400*e.manualPosition*1e3/e.speed,e.manualPosition=null,e.changeDate&&(e.changeDateGrag=!0),e.pauseed?(e.pausedTime=Date.now(),t(e.currentTime.textContent)):(e.update(),t(e.time))))}))}},{key:"formatTime",value:function(t){var e=Math.floor(t/3600).toString().padStart(2,"0"),i=Math.floor(t%3600/60).toString().padStart(2,"0"),n=Math.floor(t%60).toString().padStart(2,"0");return"".concat(e,":").concat(i,":").concat(n)}},{key:"update",value:function(){if(null===this.manualPosition){this.changeDate&&(this.startTime=Date.now());var t=(Date.now()-this.startTime)*this.speed/1e3%86400,e=t/86400;this.progress.style.width="".concat(100*e,"%"),this.time=this.formatTime(t),this.currentTime.textContent=this.time,this.pauseed||(this.animationId&&cancelAnimationFrame(this.animationId),this.animationId=requestAnimationFrame(this.update))}}},{key:"setSpeed",value:function(t){if(this.pauseed){var e,i=Date.now()-this.pausedTime;this.startTime+=i;var n=null!==(e=this.manualPosition)&&void 0!==e?e:(Date.now()-this.startTime)*this.speed/864e5;this.speed=t,this.startTime=Date.now()-86400*n*1e3/this.speed,this.pausedTime=Date.now(),this.speed=t}else{var o,s=null!==(o=this.manualPosition)&&void 0!==o?o:(Date.now()-this.startTime)*this.speed/864e5;this.speed=t,this.startTime=Date.now()-86400*s*1e3/this.speed}this.manualPosition=null}},{key:"updateTime",value:function(){this.manualPosition=null,this.startTime=Date.now()-86400*(this.manualPosition||0)*1e3/this.speed,this.pauseed&&(this.changeDate=!0),this.changeDateGrag=void 0,this.update()}},{key:"clear",value:function(){this.animationId&&cancelAnimationFrame(this.animationId),this.progress.style.width="0%",this.currentTime.textContent="00:00:00"}}],[{key:"init",value:function(t){for(var e=0;e<=24;e++)if(e%6==0){var i=document.createElement("div");i.className="time-mark",i.textContent="".concat(e,":00"),i.style.left="".concat(e/24*100,"%"),document.getElementsByClassName("time-marks")[0].appendChild(i)}t.startTime=Date.now()-86400*(t.manualPosition||0)*1e3/t.speed,t.timeline.addEventListener("mousedown",(function(e){"handle"===e.srcElement.className&&(t.isDragging=!0),e.preventDefault()})),t.timeline.addEventListener("mousemove",(function(e){if(t.isDragging){var i=t.timeline.getBoundingClientRect(),n=(e.clientX-i.left)/i.width;n=Math.max(0,Math.min(1,n)),t.manualPosition=n,t.progress.style.width="".concat(100*n,"%");var o=86400*n;t.currentTime.textContent=t.formatTime(o)}})),t.update(),document.getElementById("timePause").addEventListener("click",(function(){if(t.pauseed=!t.pauseed,t.pauseed)document.getElementById("timePause").textContent="播放",t.animationId&&cancelAnimationFrame(t.animationId),t.pausedTime=Date.now(),t.sdk.viewer.clock.shouldAnimate=!1;else{document.getElementById("timePause").textContent="暂停",t.manualPosition=null;var e=Date.now()-t.pausedTime;t.startTime+=e,t.changeDate&&(t.changeDateGrag?t.changeDateGrag=void 0:t.startTime=Date.now(),t.changeDate=void 0),t.sdk.viewer.clock.shouldAnimate=!0,t.update()}}))}}])}();function iC(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function nC(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?iC(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):iC(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var oC=function(){return _()((function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};k()(this,t),this.viewer=e.viewer,this.options=nC({},i),this.sdk=nC({},e),this.options.time=i.time||new Date,this.options.speed=i.speed||1e3,this.options.darkness=i.darkness||.4,this.options.softShadow=i.softShadow||!0,this.options.show=!0===i.show,this.Dialog=n,this.timeLine,this._EventBinding=new hn,this._elms={},t.start(this)}),[{key:"darkness",get:function(){return this.options.darkness},set:function(t){this.options.darkness=t,this.viewer.shadowMap.darkness=1-this.options.darkness,this._elms.darkness&&this._elms.darkness.forEach((function(e){e.value=t}))}},{key:"speed",get:function(){return this.options.speed},set:function(t){this.options.speed=t,this.viewer.clock.multiplier=this.options.speed,this.timeLine.setSpeed(t)}},{key:"softShadow",get:function(){return this.options.softShadow},set:function(t){this.options.softShadow=t,this.viewer.shadowMap.softShadows=this.options.softShadow}},{key:"edit",value:(i=o()(a.a.mark((function t(){var e,i,n,o,s,r,l,c,u=this,p=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=p.length>0&&void 0!==p[0]&&p[0],i=new ai,this.originalOptions=i.deepCopyObj(this.options),this._DialogObject&&this._DialogObject.close&&(this._DialogObject.close(),this._DialogObject=null),!e){t.next=25;break}return n=this,t.next=8,new Ki(this.sdk,this.originalOptions,{title:"光照属性",left:"180px",top:"100px",resetCallBack:function(){u.reset(),u.Dialog.resetCallBack&&u.Dialog.resetCallBack()},closeCallBack:function(){u.reset(),n.remove(),u.Dialog.closeCallBack&&u.Dialog.closeCallBack()},showCallBack:function(t){u.show=t,u.Dialog.showCallBack&&u.Dialog.showCallBack()}},!0);case 8:this._DialogObject=t.sent,this._DialogObject._element.body.className=this._DialogObject._element.body.className+" sun-shine-surface",(o=document.createElement("div")).innerHTML='\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">播放倍数</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0.01" max="999999" step="10" @model="speed">\n <span class="arrow"></span>\n </div>\n </div>\n <div class="col">\n <span class="label">阴影柔和度</span>\n <div class="input-number input-number-unit-1">\n <input class="input" type="number" title="" min="0" max="1" step="0.1" @model="darkness">\n <span class="arrow"></span>\n </div>\n </div>\n </div>\n </div>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <span class="label">阴影优化</span>\n <input class="btn-switch" type="checkbox" @model="softShadow">\n </div>\n <div class="col">\n <span class="label" style="flex: 0 0 56px;">日期选择</span>\n <input class="sunshine-date" type="text" placeholder="YYYY-MM-DD" @model="time">\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n <div class="div-item">\n <div class="row">\n <div class="col">\n <div class="timeline-container">\n <div class="timeline" id="timeline">\n <div class="progress" id="progress">\n <div class="handle" id="handle"></div>\n <div class="current-time" id="currentTime">00:00:00</div>\n </div>\n </div>\n <div class="time-marks">\n </div>\n <button id="timePause">暂停</button>\n </div>\n </div>\n </div>\n </div>\n <span class="custom-divider"></span>\n ',this._DialogObject.contentAppChild(o),s=this,this.timeLine=new eC(this.sdk,this.options.speed),this.timeLine.moveComplay((function(t){var e=s.time+" "+t;s.viewer.clock.currentTime=Cesium.JulianDate.fromDate(new Date(e)),s.viewer.scene.requestRender()})),l=o.getElementsByClassName("sunshine-date")[0],r=jeDate(l,{format:"YYYY-MM-DD",isinitVal:!0,isClear:!1,donefun:function(t){this.time=t.val;var e=(new Date).setHours(0,0,0,0);s.viewer.clock.currentTime=Cesium.JulianDate.fromDate(new Date(e)),s.timeLine.updateTime(e)}}),this.time?r.setValue(this.time):(r.nowBtn&&r.nowBtn(),this.time=r.getValue()),c=o.getElementsByTagName("*"),this._EventBinding.on(this,c),this._elms=this._EventBinding.element,this._elms.color=[r],t.next=25;break;case 25:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"reset",value:function(){this.viewer.entities.getById(this.options.id)&&(this.time=this.originalOptions.time,this.speed=this.originalOptions.speed,this.darkness=this.originalOptions.darkness)}},{key:"flyTo",value:(e=o()(a.a.mark((function t(){var e=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:!(e.length>0&&void 0!==e[0])||e[0];case 1:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})},{key:"remove",value:(t=o()(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.viewer.scene.globe.enableLighting=!1,this.viewer.shadows=!1,this.viewer.clock.multiplier=1,this.viewer.clock.currentTime=Cesium.JulianDate.fromDate(new Date),this.entity=null,this.timeLine.clear(),this.viewer.shadowMap.cascadesEnabled=!1,this.viewer.shadowMap.size=1024,this.viewer.shadowMap.numberOfCascades=3,this.viewer.shadowMap._lightCamera,this.viewer.shadowMap.normalOffset=!1,this._DialogObject&&!this._DialogObject.isDestroy&&(this._DialogObject.close(),this._DialogObject=null),t.next=14,be(this.sdk,this.options.id);case 14:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"flicker",value:function(){}}],[{key:"start",value:function(t){t.viewer.scene.globe.enableLighting=!0,t.viewer.shadows=!0,t.viewer.scene.globe.enableLighting=!0,t.viewer.terrainShadows=Cesium.ShadowMode.RECEIVE_ONLY,t.viewer.shadowMap.darkness=1-t.options.darkness;var e=new Date;e.setHours(0,0,0,0),t.viewer.clock.currentTime=Cesium.JulianDate.fromDate(e),t.viewer.clock.multiplier=t.options.speed,t.viewer.shadowMap.softShadows=t.options.softShadow,t.viewer.shadowMap.cascadesEnabled=!0,t.viewer.shadowMap.size=2048,t.viewer.shadowMap.numberOfCascades=4,t.viewer.shadowMap.maximumDistance=5e3;var i=t.viewer.shadowMap._lightCamera;i.frustum.near=.1,i.frustum.far=1e4,t.viewer.shadowMap.normalOffset=!0,t.edit(!0)}}]);var t,e,i}(),sC=Symbol("测量状态");Symbol("录屏对象");window.YJ||(window.YJ={on:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isc:!1,excel:!1,flv:!1,rtsp:!1,hls:!1,host:"",username:"",password:""};return new Promise((function(e,i){var n=f(),o=["/custom/css/index.css","/arrow/algorithm.js","/arrow/plotUtil.js","/3rdparty/turf.min.js","/3rdparty/fabric.min.js","/3rdparty/proj4.js","/3rdparty/pako.min.js","/3rdparty/heatmap.js","/3rdparty/tween.umd.js","/Cesium/Cesium.js","/Cesium/Widgets/widgets.css","/3rdparty/ewPlugins.min.js","/3rdparty/wangeditor/index.js","/3rdparty/wangeditor/style.css","/3rdparty/html2canvas.min.js","/3rdparty/kriging.js","/3rdparty/echarts.min.js","/3rdparty/clipboard.min.js","/3rdparty/libgif.js","/3rdparty/liveplayer/liveplayer-element.min.js","/3rdparty/jedate/jedate.min.js","/3rdparty/jedate/skin/jedate.css"];window.YJSDK3rdpartyResourceAddress=n+"/3rdparty",t.ws&&o.push("/3rdparty/reconnecting-websocket.js"),(t.flv||t.rtsp)&&o.push("/3rdparty/flv.min.js");var s=document.createElement("script");s.setAttribute("type","module"),s.textContent="\n import * as THREE from '".concat(n,"/3rdparty/three/three.module.min.js';\n window.THREE = THREE\n "),document.querySelector("html").appendChild(s);var a=document.createElement("script");a.setAttribute("type","module"),a.textContent="\n import { SVGLoader } from '".concat(n,"/3rdparty/three/jsm/loaders/SVGLoader.js';\n window.SVGLoader = SVGLoader\n "),document.querySelector("html").appendChild(a);var r=[];o.forEach((function(t){var e;t.endsWith(".js")?((e=document.createElement("script")).setAttribute("type","text/javascript"),e.setAttribute("src",n+t)):((e=document.createElement("link")).setAttribute("rel","stylesheet"),e.setAttribute("href",n+t)),document.querySelector("html").appendChild(e);var i=new Promise((function(t,i){e.onload=function(){t()}})).then((function(t){return t}));r.push(i)})),Promise.all(r).then((function(i){var o,s;(o=document.createElement("script")).setAttribute("type","text/javascript"),o.setAttribute("src",n+"/3rdparty/viewerCesiumNavigationMixin.min.js"),document.querySelector("html").appendChild(o),o.onload=function(){p(t.host),t.username?c(t).then((function(t){e()})):e()},(s=document.createElement("script")).setAttribute("type","text/javascript"),s.setAttribute("src",n+"/3rdparty/CesiumHeatmap.js"),document.querySelector("html").appendChild(s)})).catch((function(t){i(t)}))}))},Obj:{ArcgisWXImagery:dl,ArcgisBLUEImagery:ml,ArcgisLWImagery:fl,GDLWImagery:yl,GDWXImagery:bl,GDSLImagery:Cl,Tileset:Vl,BIM:Ql,Layer:Pc,Layer3rdparty:Tc,Terrain:Vc,Flame:Kc,Smoke:au,Fountain:fu,Spout:ku,WaterSurface:kh,CircleDiffuse:eo,CircleObject:dp,EllipseObject:Cp,RadarScan:lo,RadarScanStereoscopic:rh,SectorObject:mh,WallStereoscopic:Op,WallRealStereoscopic:Rp,KML:vh,GeoJson:yh,BillboardObject:fo,PolygonObject:ko,PolyhedronObject:Nu,AssembleObject:Ru,AttackArrowObject:Yu,PincerArrowObject:Qu,StraightArrowObject:ap,PolylineObject:zo,CurvelineObject:Zp,Explosion:th,Model:gc,Model2:Ec,TrajectoryMotion:Fh,TrajectoryMotionObject:qh,Graffiti:Zh,GroundImage:td,GroundSvg:Ny,RoutePlanning:Iy,Shp:Xy,Vector:mb,GroundText:yb,StandText:Cb,RichText:wn,LocateCurrent:Xs,LoadObjModel:_b,Heatmap:Bb,FlyRoam:zb,newAirLine:Jb,FRUSTUN:Vb,Dialog:Ki,FlowLine:Qb},YJEarth:Ri,Tools:ai,Proj:F,Global:{getCurrentView:function(t){var e=new ai,i=t.viewer;return JSON.parse(JSON.stringify({position:e.cartesian3Towgs84(i.camera.position,i),orientation:{heading:Cesium.Math.toDegrees(i.camera.heading),pitch:Cesium.Math.toDegrees(i.camera.pitch),roll:Cesium.Math.toDegrees(i.camera.roll)}}))},setDefaultView:function(t,e){var i=t.viewer;e?i.CAMERA_DEFAULT_VIEW_RECTANGLE={destination:e.destination||{},orientation:e.orientation||{}}:(i.CAMERA_DEFAULT_VIEW_RECTANGLE=void 0,Cesium.Camera.DEFAULT_VIEW_RECTANGLE=Cesium.Rectangle.fromDegrees(89.5,10.4,110.4,61.2))},switchCluster:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.viewer,n=0;n<i.dataSources._dataSources.length;n++)if("sdk-dataSource1"===i.dataSources._dataSources[n].name){i.dataSources._dataSources[n].clustering.enabled=e;break}},openLeftClick:pt,closeLeftClick:ht,closeRightClick:function(){ot&&(ot.destroy(),ot=null)},openRightClick:function(t){t&&t.viewer&&(ot=new Cesium.ScreenSpaceEventHandler(t.viewer.canvas)).setInputAction((function(e){if(!YJ.Measure.GetMeasureStatus()){var i,n=t.viewer.scene.pick(e.position);if(n&&n.id)if(n.id.type&&"vector"===n.id.type&&n.id.parentId){var o=rt.get(n.id.parentId);if(o.that.picking&&o.that.geojson)for(var s=0;s<o.that.geojson.features.length;s++)o.that.geojson.features[s].id===n.id._id&&o.callback(e,o.that.geojson.features[s].id,ct(ut(t,e),t.viewer),o.that)}else if(i="string"==typeof n.id?n.id:n.id.id,rt.has(i)){var a=rt.get(i);if(a.that.picking){var r=ut(t,e);if(!r)return;a.callback(e,i,ct(r,t.viewer),a.that)}}if(n&&n.content&&rt.has(n.content.tileset.id)){var l=rt.get(n.content.tileset.id);if(l.that.picking)if("bim"===l.that.type){if(YJ.Global.getBimPickStatus(t)){var c=ut(t,e);if(!c)return;l.callback(e,n.getProperty("id"),ct(c,t.viewer),l.that)}}else{var u=ut(t,e);if(!u)return;l.callback(e,n.content.tileset.id,ct(u,t.viewer),l.that)}}}}),Cesium.ScreenSpaceEventType.RIGHT_CLICK)},openMove:function(t){(st=new Cesium.ScreenSpaceEventHandler(t.viewer.canvas)).setInputAction((function(e){t.viewer.scene.pick(e.endPosition)}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)},closeMove:function(){st&&(st.destroy(),st=null)},ScreenRecord:{start:function(){return function(){if(YJ.Global.ScreenRecord.screenRecord)return"录屏任务进行中";YJ.Global.ScreenRecord.screenRecord=new Gi}()},stop:function(){YJ.Global.ScreenRecord&&YJ.Global.ScreenRecord.screenRecord&&YJ.Global.ScreenRecord.screenRecord&&(YJ.Global.ScreenRecord.screenRecord.mediaRecorder.stop(),YJ.Global.ScreenRecord.screenRecord=null)},screenRecord:null},MapX:{open:function(t){if(us.viewer){us.viewer.container.style.display="block";for(var e=us.viewer.entities.values,i=0;i<e.length;i++)if("mapX rectangle"===e[i].name){e[i];break}t.viewer.scene.preRender.addEventListener(fs,ms)}else!function(t){Wo=new ai;var e=document.createElement("div");e.id="mapxDiv",e.style.width="222px",e.style.height="112px",e.style.position="absolute",e.style.right="10px",e.style.bottom="82px",e.style.zIndex="1",document.getElementById(t.div_id).appendChild(e);var i={imageryProvider:new Cesium.TileMapServiceImageryProvider({url:Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII")}),sceneMode:Cesium.SceneMode.SCENE2D,baseLayerPicker:!1,geocoder:!1,animation:!1,fullscreenButton:!1,navigationHelpButton:!1,homeButton:!1,infoBox:!1,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,shouldAnimate:!0};us.viewer=new Cesium.Viewer("mapxDiv",i),us.viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(0,0,4e7)}),us.viewer.trackedEntity=void 0,us.viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),us.viewer.scene.screenSpaceCameraController.enableRotate=!1,us.viewer.scene.screenSpaceCameraController.enableTranslate=!1,us.viewer.scene.screenSpaceCameraController.enableZoom=!1,us.viewer.scene.screenSpaceCameraController.enableTilt=!1,us.viewer.scene.screenSpaceCameraController.enableLook=!1;var n,o=us.viewer.entities.add({name:"mapX rectangle",position:new Cesium.CallbackProperty((function(){return hs||Cesium.Cartesian3.fromDegrees(0,0,0)}),!1),rectangle:{coordinates:new Cesium.CallbackProperty((function(){return ps||Cesium.Rectangle.fromDegrees(0,0,.01,.01)}),!1),material:Cesium.Color.RED.withAlpha(.01),outline:!0,outlineColor:Cesium.Color.RED,outlineWidth:2,height:1},billboard:{image:Wo.getSourceRootPath()+"/img/cross.svg",scale:1,width:16,height:16}});ms={sdk:t,entity:o},us.viewer.camera.percentageChanged=.001,t.viewer.scene.preRender.addEventListener(fs,ms),(Yo=new X({viewer:us.viewer})).mouse_left_down((function(t,e){ds=!0,n=us.viewer.scene.pick(t.position)})),Yo.mouse_left_up((function(t,e){ds=!1})),Yo.mouse_move((function(e,i){if(n&&ds){var o=Wo.cartesian3Towgs84(t.viewer.camera.position,t.viewer).alt,s=Wo.cartesian3Towgs84(i,us.viewer);t.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(s.lng,s.lat,o),duration:0})}}))}(t)},close:function(t){if(us.viewer){us.viewer.container.style.display="none";for(var e=us.viewer.entities.values,i=0;i<e.length;i++)if("mapX rectangle"===e[i].name){e[i];break}t.viewer.scene.preRender.removeEventListener(fs,ms)}}},ScreenShot:function(t){return sn.apply(this,arguments)},ScreenShotHD:function(t){return an.apply(this,arguments)},ExportKml:Vo,FlyRoam:{open:Zo,close:function(){Jo&&Jo.close&&(Jo.close(),Jo=null)},flyTo:$o,setRepeat:function(t){if(qo!=Number(t)&&(qo=Number(t),Xo=qo,Jo&&Jo._element&&Jo._element.content)){var e=Jo._element.content.querySelector("input[name='repeat']");e.checked=t===1/0}},cease:Qo},flyTo:ze,efflect:{rain:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];ts&&t.viewer.scene.postProcessStages.remove(ts),e&&(ts=new Cesium.PostProcessStage({name:"rain",fragmentShader:os,uniforms:{tiltAngle:-.4,rainSize:.3,rainWidth:40,rainSpeed:100}}),t.viewer.scene.postProcessStages.add(ts))},snow:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];es&&t.viewer.scene.postProcessStages.remove(es),e&&(es=new Cesium.PostProcessStage({name:"snow",fragmentShader:ss,uniforms:{snowSize:2,snowSpeed:60}}),t.viewer.scene.postProcessStages.add(es))},fog:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];is&&t.viewer.scene.postProcessStages.remove(is),e&&(is=new Cesium.PostProcessStage({name:"fog",fragmentShader:as,uniforms:{visibility:.2,fogColor:Cesium.Color.WHITE}}),t.viewer.scene.postProcessStages.add(is))},nightVision:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];ns&&t.viewer.scene.postProcessStages.remove(ns),e&&(ns=Cesium.PostProcessStageLibrary.createNightVisionStage(),t.viewer.scene.postProcessStages.add(ns))},skyStarry:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.viewer.scene.skyAtmosphere.show=!e},illumination:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.viewer.shadows=e,t.viewer._shadows=e},Sunshine:oC},CameraController:Ve,CesiumContainer:Ge,setBillboardDefaultUrl:Ue,getBillboardDefaultUrl:We,multiViewportMode:{on:function(t){return fe.apply(this,arguments)},off:ve,get2DView:Me,getSdk:Te},MouseCoordinate:function(t,e){var i=new ai(t);if(e){var n=function(){cs=requestAnimationFrame(n),r()};rs&&rs.destroy(),rs=new X(t);var o,s,a={x:"",y:"",z:""};ls?o=ls:((o=document.createElement("div")).style.position="absolute",o.style["z-index"]=777,o.style.color="#ff0000",o.style.left="0px",o.style.top="0px",o.style.width="100%",o.style.height="100%",o.style["font-size"]="12px",o.style["pointer-events"]="none",o.style.background="url(".concat(i.getSourceRootPath(),"/img/cross.png) no-repeat 100% 100%"),o.style["background-size"]="200% 200%",ls=o),t.viewer._element.appendChild(o),rs.mouse_move((function(t,e){s=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?vs(Object(i),!0).forEach((function(e){C()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):vs(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},t)}));var r=function(){if(s){var e=t.viewer._element.getElementsByTagName("canvas")[0],n=s.endPosition.x,r=s.endPosition.y,l=rs.getcartesian(s);if(o.style["background-position-x"]="".concat(-e.width+n+4,"px"),o.style["background-position-y"]="".concat(-e.height+r-2,"px"),l){var c=i.cartesian3Towgs84(l,t.viewer),u=Qe();if("EPSG:4326"===u)a={x:c.lng,y:c.lat,z:c.alt},o.innerHTML="<div style='width: 150px;position: absolute; z-index: 777; color: #ff0000; font-size: 12px; left:".concat(n+20,"px; top:").concat(r+10,"px;'><p style='margin: 0;'>经度:").concat(c.lng.toFixed(6),"°</p><p style='margin: 0;'>维度:").concat(c.lat.toFixed(6),"°</p><p style='margin: 0;'>海拔:").concat(c.alt.toFixed(2)," m</p></div>");else{var p=i.convert([{x:c.lng,y:c.lat,z:c.alt}],"EPSG:4326",u);a=p.points[0],o.innerHTML="<div style='width: 150px;position: absolute; z-index: 777; color: #ff0000; font-size: 12px; left:".concat(n+20,"px; top:").concat(r+10,"px;'><p style='margin: 0;'>x:").concat(a.x.toFixed(6),"</p><p style='margin: 0;'>y:").concat(a.y.toFixed(6),"</p><p style='margin: 0;'>z:").concat(a.z.toFixed(6),"</p></div>")}}else{var h=Qe();o.innerHTML="EPSG:4326"===h?"<div style='width: 150px;position: absolute; z-index: 777; color: #ff0000; font-size: 12px; left:".concat(n+20,"px; top:").concat(r+10,"px;'><p style='margin: 0;'>经度:-</p><p style='margin: 0;'>维度:-</p><p style='margin: 0;'>海拔:-</p></div>"):"<div style='width: 150px;position: absolute; z-index: 777; color: #ff0000; font-size: 12px; left:".concat(n+20,"px; top:").concat(r+10,"px;'><p style='margin: 0;'>x:-</p><p style='margin: 0;'>y:-</p><p style='margin: 0;'>z:-</p></div>")}}};n()}else rs&&(rs.destroy(),rs=void 0),ls&&(t.viewer._element.removeChild(ls),ls=void 0),cs&&cancelAnimationFrame(cs)},MouseRightMenu:et,setGroundCover:function(t,e){je=!!e,function(t){if(!t)return;for(var e=0;e<t.dataSources._dataSources.length;e++)if("sdk-dataSource1"===t.dataSources._dataSources[e].name){t.dataSources._dataSources[e].clustering._cluster();break}}(t.viewer)},getGroundCover:Ye,setBimPickStatus:function(t,e){t&&t.viewer&&(Ie[t.viewer._element.className]||(Ie[t.viewer._element.className]={}),Ie[t.viewer._element.className].status=e,Ie[t.viewer._element.className].MoveHandler&&Ie[t.viewer._element.className].MoveHandler.destroy(),e&&(Ie[t.viewer._element.className].MoveHandler=new Cesium.ScreenSpaceEventHandler(t.viewer.canvas),Ie[t.viewer._element.className].MoveHandler.setInputAction((function(e){var i=t.viewer.scene.pick(e.endPosition),n=Ie[t.viewer._element.className].selectedId,o=t.entityMap.get(Ie[t.viewer._element.className].id);if(o&&o.features.has(n)){var s=o.features.get(n).features;for(var a in s)if(s[a].content._model){var r=s[a].customColor||Cesium.Color.fromCssColorString("#fff");s[a].color=Cesium.Color.fromCssColorString("rgba(".concat(Cesium.Color.floatToByte(r.red),",").concat(Cesium.Color.floatToByte(r.green),",").concat(Cesium.Color.floatToByte(r.blue),",").concat(r.alpha*(s[a].customAlpha||0===s[a].customAlpha?s[a].customAlpha:1),")"))}}if(i&&i.content)if("bim"===t.getIncetance(i.content.tileset.id).type){if(i.primitive&&i.primitive.id){var l=t.entityMap.get(i.primitive.id);if(n=i.getProperty("id"),l.features.has(n)){var c=l.features.get(n).features;for(var u in c)c[u].content._model&&(c[u].color=Cesium.Color.fromCssColorString("#ffeb3b"))}Ie[t.viewer._element.className].id=i.primitive.id,Ie[t.viewer._element.className].selectedId=n}}else i.primitive.id=null}),Cesium.ScreenSpaceEventType.MOUSE_MOVE)))},getBimPickStatus:function(t){if(t&&t.viewer)return!!Ie[t.viewer._element.className]&&Ie[t.viewer._element.className].status},FlwStatusSwitch:Xe,JwwStatusSwitch:Ke,rotateAround:function(t,e){if(t&&t.viewer)if(ii(0),t.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),t.entityMap.forEach((function(t){t.editObj&&t.editObj.destroy(),t.ControllerObject&&t.ControllerObject.destroy()})),Re[t.viewer._element.className]||(Re[t.viewer._element.className]={}),Re[t.viewer._element.className].animate&&TWEEN.remove(Re[t.viewer._element.className].animate),Re[t.viewer._element.className].event&&Re[t.viewer._element.className].event.destroy(),e){var i=Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),n=Cesium.Math.toDegrees(t.viewer.camera.heading),s=Cesium.Cartesian3.distance(t.viewer.camera.position,i);Ve(t,!1);var r=t.viewer.camera.pitch;Cesium.Math.toDegrees(r)<-89.99&&(r=Cesium.Math.toRadians(-89.99)),Re[t.viewer._element.className].animate=new TWEEN.Tween({angle:n}).to({angle:n-360},3e4).easing(TWEEN.Easing.Linear.None).repeat(1/0).onUpdate(function(){var e=o()(a.a.mark((function e(n,o){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.viewer){e.next=3;break}return TWEEN.remove(Re[t.viewer._element.className].animate),e.abrupt("return");case 3:t.viewer.camera.lookAt(i,new Cesium.HeadingPitchRange(Cesium.Math.toRadians(n.angle),r,s)),t.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);case 5:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}()).start();var l=new X(t);Re[t.viewer._element.className].event=l,l.mouse_left_down((function(){Re[t.viewer._element.className].animate&&TWEEN.remove(Re[t.viewer._element.className].animate),Re[t.viewer._element.className].event&&Re[t.viewer._element.className].event.destroy(),Ve(t,!0),t.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY)}))}else Ve(t,!0)},getCoordinateSystem:Qe,setCoordinateSystem:function(t,e){if(Ae=e||"EPSG:4326",t&&t.viewer&&t.viewer._element){var i=t.viewer._element.getElementsByClassName("cesium-info")[0];if(Le&&i){var n=new ai,o=t.proj,s=n.cartesian3Towgs84(Le,t.viewer);if("EPSG:4326"===Ae)i.innerHTML="\n <span>经度:</span><span>".concat(Number(s.lng.toFixed(6)),"° </span>\n <span>纬度:</span><span>").concat(Number(s.lat.toFixed(6)),"° </span>\n <span>海拔高度:</span><span>").concat(Number(s.alt.toFixed(2)),"米</span>\n ");else{var a=o.convert([{x:s.lng,y:s.lat,z:s.alt}],"EPSG:4326",Ae);i.innerHTML="\n <span>x:</span><span>".concat(Number(a.points[0].x.toFixed(6)),'</span>\n <span style="margin-left: 5px;">y:</span><span>').concat(Number(a.points[0].y.toFixed(6)),'</span>\n <span style="margin-left: 5px;">z:</span><span>').concat(Number(a.points[0].z.toFixed(6)),"</span>\n ")}}}},DTH:Vi,cameraChanged:function(t,e){var i=new ai;return t.viewer.camera.changed.addEventListener((function(n){e({position:i.cartesian3Towgs84(t.viewer.camera.position,t.viewer),orientation:{heading:t.viewer.camera.heading,pitch:t.viewer.camera.pitch,roll:t.viewer.camera.roll}})}))},setMaximumRequestsPerServer:function(t){"number"==typeof t&&(Cesium.RequestScheduler.maximumRequestsPerServer=t)},setKeyboardEventActive:function(t,e){t&&(t.viewer._disableKeyboardEvent=!e)},setSkin:function(t){document.documentElement.style.setProperty("--color-sdk-base","rgba(0, 55, 55, 1)")},getTheme:function(){return Q},setTheme:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=Array.from(Q[t].keys());e.forEach((function(e){document.documentElement.style.setProperty(e,Q[t].get(e))}))},getCesiumManageIndexexDBState:ti,setCesiumManageIndexexDBState:ei,getCesiumIndexedDBMaxSize:function(){var t=Number(Number(localStorage.getItem("IndexedDBMaxSize")).toFixed(0));return(isNaN(t)||t<1073741824)&&(t=1073741824),t},setCesiumIndexedDBMaxSize:function(t){var e=Number(Number(t).toFixed(0));(isNaN(e)||e<1073741824)&&(e=1073741824),Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.SetIndexedDBMaxSize(e),localStorage.setItem("IndexedDBMaxSize",e)},getCesiumIndexedDBCurrentSize:function(){return Cesium.ManageIndexedDB&&Cesium.ManageIndexedDB.GetIndexedDBCurrentSize()},enablePerspective:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;e||0==e||(e=1),t.viewer.scene.globe.translucency.frontFaceAlpha=e},closeRotateAround:Je,SheetIndexStatusSwitch:Ot,SheetIndexShangeScale:Tt,splitScreen:{on:function(t){return Xt.apply(this,arguments)},off:Zt,setActiveId:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(Vt=Array.isArray(t)?t:[t],zt&&Rt){var e=zt.viewer._element.getElementsByClassName("YJ-custom-checkbox-left")[0],i=zt.viewer._element.getElementsByClassName("YJ-custom-checkbox-right")[0];if(t&&0!==t.length){if(e&&i){for(var n=0,o=0,s=0;s<Vt.length;s++){var a=qt.get(Vt[s]);a||(a={P:!0,D:!1},qt.set(Vt[s],a)),a.P&&n++,a.D&&o++;var r=zt.entityMap.get(Vt[s]);Rt.entityMap.get(Vt[s]);r&&"terrain"!==r.type&&r.show?(e.style.display="unset",i.style.display="unset",e.checked=!1,i.checked=!1):(e.style.display="none",i.style.display="none")}n||o||n++,e.checked=!!n,i.checked=!!o}}else e&&i&&(e.style.display="none",i.style.display="none")}},getSdk:le},Contour:function(t){return Rs.apply(this,arguments)}},Measure:{GetMeasureStatus:function(){return YJ.Measure[sC]},SetMeasureStatus:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];YJ.Measure[sC]=t},Clear:function(){YJ.Measure.Measures.forEach((function(t){t.destroy()})),YJ.Measure.Measures=[]},Measures:[],MeasureDistance:Za,MeasureProjectionDistance:er,MeasureSlopeDistance:ar,MeasureTyArea:pr,MeasureTdArea:vr,MeasureTriangle:br,MeasureLocation:kr,MeasureHeight:Er,MeasureAngle:Mr,MeasureAzimuth:Tr},Draw:{DrawPolyline:Br,DrawPolygon:na,DrawPoint:Ar,DrawCircle:Ir,DrawElliptic:Rr,DrawAttackArrow:Hr,DrawPincerArrow:Gr,DrawStraightArrow:Yr,DrawRect:qr,DrawAssemble:Kr,DrawSector:Qr,DrawTakeOff:Xb},Analysis:{Clear:function(){YJ.Analysis.AnalysesResults.forEach((function(t){t.destroy()}))},CutFillAnalysis:oa,Submerge:la,ViewShed:ha,CircleViewShed:Ca,SlopeAspect:_a,Profile:Sa,Visibility:Ma,Contour:Pa,Section:Ba,TerrainExcavation:ja,Flat:Ha,AnalysesResults:[],SectionResults:[],ClearSection:function(){YJ.Analysis.SectionResults.forEach((function(t){t.destroy()}))}},CoordTransform:nl,RoutePlanningArrays:[],ClearAllRoutePlanning:function(){YJ.RoutePlanningArrays.forEach((function(t){t.destroy()})),YJ.RoutePlanningArrays=[]}},window.YJ.Obj.LoadObjModel=Mb,window.YJ.Obj.BatchLoadObjModel=Tb)}]); |