/** * © WdpApi v1.12.0 * Copyright (c) 2012-2024 keithskyey@gmail.com * https://www.51aes.com/ * http://wdpapi.51aes.com/ * All Rights Reserved. */ var CloudApi=function(){function c(e,a,s,l){return new(s=s||Promise)(function(r,t){function n(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((l=l.apply(e,a||[])).next())})}let V=["\n ________ ___ ________ ___ ___ ________ ________ ________ ___ \n|\\ ____\\|\\ \\ |\\ __ \\|\\ \\|\\ \\|\\ ___ \\|\\ __ \\|\\ __ \\|\\ \\ \n\\ \\ \\___|\\ \\ \\ \\ \\ \\|\\ \\ \\ \\\\\\ \\ \\ \\_|\\ \\ \\ \\|\\ \\ \\ \\|\\ \\ \\ \\ \n \\ \\ \\ \\ \\ \\ \\ \\ \\\\\\ \\ \\ \\\\\\ \\ \\ \\ \\\\ \\ \\ __ \\ \\ ____\\ \\ \\ \n \\ \\ \\____\\ \\ \\____\\ \\ \\\\\\ \\ \\ \\\\\\ \\ \\ \\_\\\\ \\ \\ \\ \\ \\ \\ \\___|\\ \\ \\ \n \\ \\_______\\ \\_______\\ \\_______\\ \\_______\\ \\_______\\ \\__\\ \\__\\ \\__\\ \\ \\__\\\n \\|_______|\\|_______|\\|_______|\\|_______|\\|_______|\\|__|\\|__|\\|__| \\|__|\n \n","\n ****** ** ******* ** ** ******* ** ******* **\n **////**/** **/////** /** /**/**////** **** /**////**/**\n ** // /** ** //**/** /**/** /** **//** /** /**/**\n/** /** /** /**/** /**/** /** ** //** /******* /**\n/** /** /** /**/** /**/** /** **********/**//// /**\n//** **/** //** ** /** /**/** ** /**//////**/** /**\n //****** /******** //******* //******* /******* /** /**/** /**\n ////// //////// /////// /////// /////// // // // // \n","\n ██████╗██╗ ██████╗ ██╗ ██╗██████╗ █████╗ ██████╗ ██╗\n██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗██╔══██╗██╔══██╗██║\n██║ ██║ ██║ ██║██║ ██║██║ ██║███████║██████╔╝██║\n██║ ██║ ██║ ██║██║ ██║██║ ██║██╔══██║██╔═══╝ ██║\n╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝██║ ██║██║ ██║\n ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝\n \n","\n ▄████▄ ██▓ ▒█████ █ ██ ▓█████▄ ▄▄▄ ██▓███ ██▓\n▒██▀ ▀█ ▓██▒ ▒██▒ ██▒ ██ ▓██▒▒██▀ ██▌▒████▄ ▓██░ ██▒▓██▒\n▒▓█ ▄ ▒██░ ▒██░ ██▒▓██ ▒██░░██ █▌▒██ ▀█▄ ▓██░ ██▓▒▒██▒\n▒▓▓▄ ▄██▒▒██░ ▒██ ██░▓▓█ ░██░░▓█▄ ▌░██▄▄▄▄██ ▒██▄█▓▒ ▒░██░\n▒ ▓███▀ ░░██████▒░ ████▓▒░▒▒█████▓ ░▒████▓ ▓█ ▓██▒▒██▒ ░ ░░██░\n░ ░▒ ▒ ░░ ▒░▓ ░░ ▒░▒░▒░ ░▒▓▒ ▒ ▒ ▒▒▓ ▒ ▒▒ ▓▒█░▒▓▒░ ░ ░░▓ \n ░ ▒ ░ ░ ▒ ░ ░ ▒ ▒░ ░░▒░ ░ ░ ░ ▒ ▒ ▒ ▒▒ ░░▒ ░ ▒ ░\n░ ░ ░ ░ ░ ░ ▒ ░░░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░\n░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ \n░ ░ \n","\n ______ __ ______ __ __ ______ ________ ______ ________ \n/_____/\\ /_/\\ /_____/\\ /_/\\/_/\\ /_____/\\ /_______/\\ /_____/\\ /_______/\\ \n\\:::__\\/ \\:\\ \\ \\:::_ \\ \\\\:\\ \\:\\ \\\\:::_ \\ \\\\::: _ \\ \\\\:::_ \\ \\\\__.::._\\/ \n \\:\\ \\ __\\:\\ \\ \\:\\ \\ \\ \\\\:\\ \\:\\ \\\\:\\ \\ \\ \\\\::(_) \\ \\\\:(_) \\ \\ \\::\\ \\ \n \\:\\ \\/_/\\\\:\\ \\____\\:\\ \\ \\ \\\\:\\ \\:\\ \\\\:\\ \\ \\ \\\\:: __ \\ \\\\: ___\\/ _\\::\\ \\__ \n \\:\\_\\ \\ \\\\:\\/___/\\\\:\\_\\ \\ \\\\:\\_\\:\\ \\\\:\\/.:| |\\:.\\ \\ \\ \\\\ \\ \\ /__\\::\\__/\\ \n \\_____\\/ \\_____\\/ \\_____\\/ \\_____\\/ \\____/_/ \\__\\/\\__\\/ \\_\\/ \\________\\/ \n \n","\n============================================================================\n=== === ========== ==== ==== == ====== ===== === =\n== === == ========= == === ==== == ==== ==== ==== ==== === ==\n= ======== ======== ==== == ==== == ==== === == === ==== === ==\n= ======== ======== ==== == ==== == ==== == ==== == ==== === ==\n= ======== ======== ==== == ==== == ==== == ==== == ==== ==\n= ======== ======== ==== == ==== == ==== == == ========= ==\n= ======== ======== ==== == ==== == ==== == ==== == ========= ==\n== === == ========= == === == == ==== == ==== == ========= ==\n=== === ==== ===== === === ==== == ======== =\n============================================================================\n","\n╔═╗╦ ╔═╗╦ ╦╔╦╗╔═╗╔═╗╦\n║ ║ ║ ║║ ║ ║║╠═╣╠═╝║\n╚═╝╩═╝╚═╝╚═╝═╩╝╩ ╩╩ ╩\n","\n \n _/_/_/ _/ _/_/ _/ _/ _/_/_/ _/_/ _/_/_/ _/_/_/ \n _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/_/_/ _/ \n_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ \n _/_/_/ _/_/_/_/ _/_/ _/_/ _/_/_/ _/ _/ _/ _/_/_/ \n \n","\n░█▀▀░█░░░█▀█░█░█░█▀▄░█▀█░█▀█░▀█▀\n░█░░░█░░░█░█░█░█░█░█░█▀█░█▀▀░░█░\n░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀░░▀░▀░▀░░░▀▀▀\n"];var _={},e={};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.compactObject=function i(o){return F(o)?Object.keys(o).reduce(function(e,t){var r=F(o[t]),n=r?i(o[t]):o[t],r=r&&!Object.keys(n).length;return void 0===n||r?e:Object.assign(e,(r={},e=n,t=function(e){if("object"!==a(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);t=t.call(e,"string");if("object"!==a(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(n=t),(n="symbol"===a(t)?t:String(t))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r))},{}):o},e.deprecated=function(e,t){N&&console.warn(e+" is deprecated, please use "+t+" instead.")},e.detectBrowser=function(e){var t={browser:null,version:null};if(void 0!==e&&e.navigator&&e.navigator.userAgent){var r=e.navigator;if(r.mozGetUserMedia)t.browser="firefox",t.version=U(r.userAgent,/Firefox\/(\d+)\./,1);else if(r.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=U(r.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!r.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=U(r.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}}else t.browser="Not a browser.";return t},e.disableLog=function(e){return"boolean"!=typeof e?new Error("Argument type: "+a(e)+". Please use a boolean."):(L=e)?"adapter.js logging disabled":"adapter.js logging enabled"},e.disableWarnings=function(e){return"boolean"!=typeof e?new Error("Argument type: "+a(e)+". Please use a boolean."):(N=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},e.extractVersion=U,e.filterStats=function(r,t,e){var n,i=e?"outbound-rtp":"inbound-rtp",o=new Map;return null!==t&&(n=[],r.forEach(function(e){"track"===e.type&&e.trackIdentifier===t.id&&n.push(e)}),n.forEach(function(t){r.forEach(function(e){e.type===i&&e.trackId===t.id&&B(r,e,o)})})),o},e.log=function(){"object"!==("undefined"==typeof window?"undefined":a(window))||L||"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},e.walkStats=B,e.wrapPeerConnectionEvent=function(e,n,i){var o,a;e.RTCPeerConnection&&(e=e.RTCPeerConnection.prototype,o=e.addEventListener,e.addEventListener=function(e,t){var r;return e!==n?o.apply(this,arguments):(r=function(e){e=i(e);e&&(t.handleEvent?t.handleEvent(e):t(e))},this._eventMap=this._eventMap||{},this._eventMap[n]||(this._eventMap[n]=new Map),this._eventMap[n].set(t,r),o.apply(this,[e,r]))},a=e.removeEventListener,e.removeEventListener=function(e,t){var r;return e===n&&this._eventMap&&this._eventMap[n]&&this._eventMap[n].has(t)?(r=this._eventMap[n].get(t),this._eventMap[n].delete(t),0===this._eventMap[n].size&&delete this._eventMap[n],0===Object.keys(this._eventMap).length&&delete this._eventMap,a.apply(this,[e,r])):a.apply(this,arguments)},Object.defineProperty(e,"on"+n,{get:function(){return this["_on"+n]},set:function(e){this["_on"+n]&&(this.removeEventListener(n,this["_on"+n]),delete this["_on"+n]),e&&this.addEventListener(n,this["_on"+n]=e)},enumerable:!0,configurable:!0}))};var L=!0,N=!0;function U(e,t,r){e=e.match(t);return e&&e.length>=r&&parseInt(e[r],10)}function F(e){return"[object Object]"===Object.prototype.toString.call(e)}function B(t,r,n){r&&!n.has(r.id)&&(n.set(r.id,r),Object.keys(r).forEach(function(e){e.endsWith("Id")?B(t,t.get(r[e]),n):e.endsWith("Ids")&&r[e].forEach(function(e){B(t,t.get(e),n)})}))}var W={},t={};function H(e){var t,r;return"function"!=typeof WeakMap?null:(t=new WeakMap,r=new WeakMap,(H=function(e){return e?r:t})(e))}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.shimGetUserMedia=function(e,t){var a,n,i,r,s=e&&e.navigator;s.mediaDevices&&(a=function(i){var o;return"object"!==l(i)||i.mandatory||i.optional?i:(o={},Object.keys(i).forEach(function(t){var r,n,e;"require"!==t&&"advanced"!==t&&"mediaSource"!==t&&(void 0!==(r="object"===l(i[t])?i[t]:{ideal:i[t]}).exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact),n=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t},void 0!==r.ideal&&(o.optional=o.optional||[],e={},"number"==typeof r.ideal?(e[n("min",t)]=r.ideal,o.optional.push(e),(e={})[n("max",t)]=r.ideal):e[n("",t)]=r.ideal,o.optional.push(e)),void 0!==r.exact&&"number"!=typeof r.exact?(o.mandatory=o.mandatory||{},o.mandatory[n("",t)]=r.exact):["min","max"].forEach(function(e){void 0!==r[e]&&(o.mandatory=o.mandatory||{},o.mandatory[n(e,t)]=r[e])}))}),i.advanced&&(o.optional=(o.optional||[]).concat(i.advanced)),o)},n=function(r,n){if(!(61<=t.version)){if((r=JSON.parse(JSON.stringify(r)))&&"object"===l(r.audio)&&((e=function(e,t,r){t in e&&!(r in e)&&(e[r]=e[t],delete e[t])})((r=JSON.parse(JSON.stringify(r))).audio,"autoGainControl","googAutoGainControl"),e(r.audio,"noiseSuppression","googNoiseSuppression"),r.audio=a(r.audio)),r&&"object"===l(r.video)){var i,o=(o=r.video.facingMode)&&("object"===l(o)?o:{ideal:o}),e=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!s.mediaDevices.getSupportedConstraints||!s.mediaDevices.getSupportedConstraints().facingMode||e)&&(delete r.video.facingMode,"environment"===o.exact||"environment"===o.ideal?i=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(i=["front"]),i))return s.mediaDevices.enumerateDevices().then(function(e){var t=(e=e.filter(function(e){return"videoinput"===e.kind})).find(function(t){return i.some(function(e){return t.label.toLowerCase().includes(e)})});return(t=!t&&e.length&&i.includes("back")?e[e.length-1]:t)&&(r.video.deviceId=o.exact?{exact:t.deviceId}:{ideal:t.deviceId}),r.video=a(r.video),z("chrome: "+JSON.stringify(r)),n(r)});r.video=a(r.video)}z("chrome: "+JSON.stringify(r))}return n(r)},i=function(e){return 64<=t.version?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},s.getUserMedia=function(e,t,r){n(e,function(e){s.webkitGetUserMedia(e,t,function(e){r&&r(i(e))})})}.bind(s),s.mediaDevices.getUserMedia)&&(r=s.mediaDevices.getUserMedia.bind(s.mediaDevices),s.mediaDevices.getUserMedia=function(e){return n(e,function(t){return r(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(e){e.stop()}),new DOMException("","NotFoundError");return e},function(e){return Promise.reject(i(e))})})})};var i,$,q,z=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!=typeof e)return{default:e};var t=H(void 0);if(t&&t.has(e))return t.get(e);var r,n,i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&((n=o?Object.getOwnPropertyDescriptor(e,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=e[r]);return i.default=e,t&&t.set(e,i),i}(e).log,r={};function Z(e){var t,r;return"function"!=typeof WeakMap?null:(t=new WeakMap,r=new WeakMap,(Z=function(e){return e?r:t})(e))}function Y(e,t,r){return n=function(e){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);t=t.call(e,"string");if("object"!==s(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"===s(n)?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;var n}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(e){return t._shimmedLocalStreams[e][0]})};var n=e.RTCPeerConnection.prototype.addTrack,i=(e.RTCPeerConnection.prototype.addTrack=function(e,t){if(!t)return n.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=n.apply(this,arguments);return this._shimmedLocalStreams[t.id]?-1===this._shimmedLocalStreams[t.id].indexOf(r)&&this._shimmedLocalStreams[t.id].push(r):this._shimmedLocalStreams[t.id]=[t,r],r},e.RTCPeerConnection.prototype.addStream),t=(e.RTCPeerConnection.prototype.addStream=function(e){var r=this,t=(this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(function(t){if(r.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")}),this.getSenders()),n=(i.apply(this,arguments),this.getSenders().filter(function(e){return-1===t.indexOf(e)}));this._shimmedLocalStreams[e.id]=[e].concat(n)},e.RTCPeerConnection.prototype.removeStream),o=(e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],t.apply(this,arguments)},e.RTCPeerConnection.prototype.removeTrack);e.RTCPeerConnection.prototype.removeTrack=function(r){var n=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},r&&Object.keys(this._shimmedLocalStreams).forEach(function(e){var t=n._shimmedLocalStreams[e].indexOf(r);-1!==t&&n._shimmedLocalStreams[e].splice(t,1),1===n._shimmedLocalStreams[e].length&&delete n._shimmedLocalStreams[e]}),o.apply(this,arguments)}}Object.defineProperty(r,"__esModule",{value:!0}),r.shimGetDisplayMedia=function(o,e){o.navigator.mediaDevices&&"getDisplayMedia"in o.navigator.mediaDevices||o.navigator.mediaDevices&&("function"!=typeof e?console.error("shimGetDisplayMedia: getSourceId argument is not a function"):o.navigator.mediaDevices.getDisplayMedia=function(i){return e(i).then(function(e){var t=i.video&&i.video.width,r=i.video&&i.video.height,n=i.video&&i.video.frameRate;return i.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,maxFrameRate:n||3}},t&&(i.video.mandatory.maxWidth=t),r&&(i.video.mandatory.maxHeight=r),o.navigator.mediaDevices.getUserMedia(i)})})},n=W,Object.defineProperty(n,"__esModule",{value:!0}),n.fixNegotiationNeeded=function(e,r){i.wrapPeerConnectionEvent(e,"negotiationneeded",function(e){var t=e.target;if(!(r.version<72||t.getConfiguration&&"plan-b"===t.getConfiguration().sdpSemantics)||"stable"===t.signalingState)return e})},n.shimAddTrackRemoveTrack=function(i,e){if(i.RTCPeerConnection){if(i.RTCPeerConnection.prototype.addTrack&&65<=e.version)return J(i);var r=i.RTCPeerConnection.prototype.getLocalStreams,n=(i.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this,e=r.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(function(e){return t._reverseStreams[e.id]})},i.RTCPeerConnection.prototype.addStream),t=(i.RTCPeerConnection.prototype.addStream=function(e){var t,r=this;this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},e.getTracks().forEach(function(t){if(r.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")}),this._reverseStreams[e.id]||(t=new i.MediaStream(e.getTracks()),this._streams[e.id]=t,this._reverseStreams[t.id]=e,e=t),n.apply(this,[e])},i.RTCPeerConnection.prototype.removeStream),o=(i.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[(this._streams[e.id]||e).id],delete this._streams[e.id]},i.RTCPeerConnection.prototype.addTrack=function(t,e){var r=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var n=[].slice.call(arguments,1);if(1!==n.length||!n[0].getTracks().find(function(e){return e===t}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var n=this._streams[e.id];return n?(n.addTrack(t),Promise.resolve().then(function(){r.dispatchEvent(new Event("negotiationneeded"))})):(n=new i.MediaStream([t]),this._streams[e.id]=n,this._reverseStreams[n.id]=e,this.addStream(n)),this.getSenders().find(function(e){return e.track===t})},["createOffer","createAnswer"].forEach(function(e){var n=i.RTCPeerConnection.prototype[e],t=Y({},e,function(){var t=this,r=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[function(e){e=s(t,e);r[0].apply(null,[e])},function(e){r[1]&&r[1].apply(null,e)},arguments[2]]):n.apply(this,arguments).then(function(e){return s(t,e)})});i.RTCPeerConnection.prototype[e]=t[e]}),i.RTCPeerConnection.prototype.setLocalDescription),a=(i.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type&&(arguments[0]=(r=this,n=(e=arguments[0]).sdp,Object.keys(r._reverseStreams||[]).forEach(function(e){var e=r._reverseStreams[e],t=r._streams[e.id];n=n.replace(new RegExp(e.id,"g"),t.id)}),new RTCSessionDescription({type:e.type,sdp:n}))),o.apply(this,arguments);var r,e,n},Object.getOwnPropertyDescriptor(i.RTCPeerConnection.prototype,"localDescription"));Object.defineProperty(i.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=a.get.apply(this);return""===e.type?e:s(this,e)}}),i.RTCPeerConnection.prototype.removeTrack=function(t){var r,n=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!t._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(t._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach(function(e){n._streams[e].getTracks().find(function(e){return t.track===e})&&(r=n._streams[e])}),r&&(1===r.getTracks().length?this.removeStream(this._reverseStreams[r.id]):r.removeTrack(t.track),this.dispatchEvent(new Event("negotiationneeded")))}}function s(r,e){var n=e.sdp;return Object.keys(r._reverseStreams||[]).forEach(function(e){var e=r._reverseStreams[e],t=r._streams[e.id];n=n.replace(new RegExp(t.id,"g"),e.id)}),new RTCSessionDescription({type:e.type,sdp:n})}},n.shimAddTrackRemoveTrackWithNative=J,Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return q.shimGetDisplayMedia}}),n.shimGetSendersWithDtmf=function(e){var n,i,t,r,o,a;"object"===s(e)&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype?(n=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}},e.RTCPeerConnection.prototype.getSenders||(e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()},i=e.RTCPeerConnection.prototype.addTrack,e.RTCPeerConnection.prototype.addTrack=function(e,t){var r=i.apply(this,arguments);return r||(r=n(this,e),this._senders.push(r)),r},t=e.RTCPeerConnection.prototype.removeTrack,e.RTCPeerConnection.prototype.removeTrack=function(e){t.apply(this,arguments);e=this._senders.indexOf(e);-1!==e&&this._senders.splice(e,1)}),r=e.RTCPeerConnection.prototype.addStream,e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(function(e){t._senders.push(n(t,e))})},o=e.RTCPeerConnection.prototype.removeStream,e.RTCPeerConnection.prototype.removeStream=function(e){var r=this;this._senders=this._senders||[],o.apply(this,[e]),e.getTracks().forEach(function(t){var e=r._senders.find(function(e){return e.track===t});e&&r._senders.splice(r._senders.indexOf(e),1)})}):"object"===s(e)&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)&&(a=e.RTCPeerConnection.prototype.getSenders,e.RTCPeerConnection.prototype.getSenders=function(){var t=this,e=a.apply(this,[]);return e.forEach(function(e){return e._pc=t}),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}}))},n.shimGetStats=function(e){var a;e.RTCPeerConnection&&(a=e.RTCPeerConnection.prototype.getStats,e.RTCPeerConnection.prototype.getStats=function(){var r,n,i=this,e=Array.prototype.slice.call(arguments),t=e[0],o=e[1],e=e[2];return 0e.length)&&(t=e.length);for(var r=0,n=new Array(t);r= 1.0");if("maxFramerate"in e&&!(0<=parseFloat(e.maxFramerate)))throw new RangeError("max_framerate must be >= 0.0")}),o.apply(this,arguments));return!n||"encodings"in(n=(t=i.sender).getParameters())&&(1!==n.encodings.length||0!==Object.keys(n.encodings[0]).length)||(n.encodings=r,t.sendEncodings=r,this.setParametersPromises.push(t.setParameters(n).then(function(){delete t.sendEncodings}).catch(function(){delete t.sendEncodings}))),i})},o.shimCreateAnswer=function(e){var r;"object"===u(e)&&e.RTCPeerConnection&&(r=e.RTCPeerConnection.prototype.createAnswer,e.RTCPeerConnection.prototype.createAnswer=function(){var e=arguments,t=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return r.apply(t,e)}).finally(function(){t.setParametersPromises=[]}):r.apply(this,arguments)})},o.shimCreateOffer=function(e){var r;"object"===u(e)&&e.RTCPeerConnection&&(r=e.RTCPeerConnection.prototype.createOffer,e.RTCPeerConnection.prototype.createOffer=function(){var e=arguments,t=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return r.apply(t,e)}).finally(function(){t.setParametersPromises=[]}):r.apply(this,arguments)})},Object.defineProperty(o,"shimGetDisplayMedia",{enumerable:!0,get:function(){return re.shimGetDisplayMedia}}),o.shimGetParameters=function(e){var t;"object"===u(e)&&e.RTCRtpSender&&(t=e.RTCRtpSender.prototype.getParameters)&&(e.RTCRtpSender.prototype.getParameters=function(){var e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})},Object.defineProperty(o,"shimGetUserMedia",{enumerable:!0,get:function(){return te.shimGetUserMedia}}),o.shimOnTrack=function(e){"object"===u(e)&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},o.shimPeerConnection=function(a,i){var o,r;"object"===u(a)&&(a.RTCPeerConnection||a.mozRTCPeerConnection)&&(!a.RTCPeerConnection&&a.mozRTCPeerConnection&&(a.RTCPeerConnection=a.mozRTCPeerConnection),i.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t,r,n,i=a.RTCPeerConnection.prototype[e],o=(t={},n=function(){return arguments[0]=new("addIceCandidate"===e?a.RTCIceCandidate:a.RTCSessionDescription)(arguments[0]),i.apply(this,arguments)},o=function(e){if("object"!==u(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);t=t.call(e,"string");if("object"!==u(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(r=e),(r="symbol"===u(o)?o:String(o))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t);a.RTCPeerConnection.prototype[e]=o[e]}),o={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=a.RTCPeerConnection.prototype.getStats,a.RTCPeerConnection.prototype.getStats=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1],e=e[2];return r.apply(this,[t||null]).then(function(r){if(i.version<53&&!n)try{r.forEach(function(e){e.type=o[e.type]||e.type})}catch(e){if("TypeError"!==e.name)throw e;r.forEach(function(e,t){r.set(t,Object.assign({},e,{type:o[e.type]||e.type}))})}return r}).then(n,e)})},o.shimRTCDataChannel=function(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)},o.shimReceiverGetStats=function(e){var r;"object"===u(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype||((r=e.RTCPeerConnection.prototype.getReceivers)&&(e.RTCPeerConnection.prototype.getReceivers=function(){var t=this,e=r.apply(this,[]);return e.forEach(function(e){return e._pc=t}),e}),ee.wrapPeerConnectionEvent(e,"track",function(e){return e.receiver._pc=e.srcElement,e}),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}))},o.shimRemoveStream=function(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){var r=this;ee.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(e){e.track&&t.getTracks().includes(e.track)&&r.removeTrack(e)})})},o.shimSenderGetStats=function(e){var r,t;"object"===u(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype||((r=e.RTCPeerConnection.prototype.getSenders)&&(e.RTCPeerConnection.prototype.getSenders=function(){var t=this,e=r.apply(this,[]);return e.forEach(function(e){return e._pc=t}),e}),(t=e.RTCPeerConnection.prototype.addTrack)&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=t.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}))},ee=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==u(e)&&"function"!=typeof e)return{default:e};var t=ne(void 0);if(t&&t.has(e))return t.get(e);var r,n,i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&((n=o?Object.getOwnPropertyDescriptor(e,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=e[r]);return i.default=e,t&&t.set(e,i),i}(e),te=t,re=r;var o={},oe=(Object.defineProperty(o,"__esModule",{value:!0}),o.shimAudioContext=function(e){"object"!==d(e)||e.AudioContext||(e.AudioContext=e.webkitAudioContext)},o.shimCallbacksAPI=function(e){var n,i,o,a,s;"object"===d(e)&&e.RTCPeerConnection&&(e=e.RTCPeerConnection.prototype,n=e.createOffer,i=e.createAnswer,o=e.setLocalDescription,a=e.setRemoteDescription,s=e.addIceCandidate,e.createOffer=function(e,t){var r=n.apply(this,[2<=arguments.length?arguments[2]:e]);return t?(r.then(e,t),Promise.resolve()):r},e.createAnswer=function(e,t){var r=i.apply(this,[2<=arguments.length?arguments[2]:e]);return t?(r.then(e,t),Promise.resolve()):r},e.setLocalDescription=function(e,t,r){e=o.apply(this,[e]);return r?(e.then(t,r),Promise.resolve()):e},e.setRemoteDescription=function(e,t,r){e=a.apply(this,[e]);return r?(e.then(t,r),Promise.resolve()):e},e.addIceCandidate=function(e,t,r){e=s.apply(this,[e]);return r?(e.then(t,r),Promise.resolve()):e})},o.shimConstraints=se,o.shimCreateOfferLegacy=function(e){var r=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){var t;return e&&(void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio),t=this.getTransceivers().find(function(e){return"audio"===e.receiver.track.kind}),!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo),t=this.getTransceivers().find(function(e){return"video"===e.receiver.track.kind}),!1===e.offerToReceiveVideo&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveVideo||t||this.addTransceiver("video",{direction:"recvonly"})),r.apply(this,arguments)}},o.shimGetUserMedia=function(e){var t,n=e&&e.navigator;n.mediaDevices&&n.mediaDevices.getUserMedia&&(t=(e=n.mediaDevices).getUserMedia.bind(e),n.mediaDevices.getUserMedia=function(e){return t(se(e))}),!n.getUserMedia&&n.mediaDevices&&n.mediaDevices.getUserMedia&&(n.getUserMedia=function(e,t,r){n.mediaDevices.getUserMedia(e).then(t,r)}.bind(n))},o.shimLocalStreamsAPI=function(e){var o;"object"===d(e)&&e.RTCPeerConnection&&("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),"addStream"in e.RTCPeerConnection.prototype||(o=e.RTCPeerConnection.prototype.addTrack,e.RTCPeerConnection.prototype.addStream=function(t){var r=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(t)||this._localStreams.push(t),t.getAudioTracks().forEach(function(e){return o.call(r,e,t)}),t.getVideoTracks().forEach(function(e){return o.call(r,e,t)})},e.RTCPeerConnection.prototype.addTrack=function(e){for(var t=this,r=arguments.length,n=new Array(1n&&(n=e.maxptime)}),0>24]),e})},t.shimSendThrowTypeError=function(e){var t;function r(t,r){var n=t.send;t.send=function(){var e=arguments[0],e=e.length||e.size||e.byteLength;if("open"===t.readyState&&r.sctp&&e>r.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+r.sctp.maxMessageSize+" bytes)");return n.apply(t,arguments)}}e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype&&(t=e.RTCPeerConnection.prototype.createDataChannel,e.RTCPeerConnection.prototype.createDataChannel=function(){var e=t.apply(this,arguments);return r(e,this),e},ce.wrapPeerConnectionEvent(e,"datachannel",function(e){return r(e.channel,e.target),e}))};var ue=m&&m.__esModule?m:{default:m},ce=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==he(e)&&"function"!=typeof e)return{default:e};var t=de(void 0);if(t&&t.has(e))return t.get(e);var r,n,i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&((n=o?Object.getOwnPropertyDescriptor(e,r):null)&&(n.get||n.set)?Object.defineProperty(i,r,n):i[r]=e[r]);return i.default=e,t&&t.set(e,i),i}(e);function de(e){var t,r;return"function"!=typeof WeakMap?null:(t=new WeakMap,r=new WeakMap,(de=function(e){return e?r:t})(e))}function he(e){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(_,"__esModule",{value:!0}),_.adapterFactory=function(){var e=(0{this.debugMode=e}}),Object.defineProperty(this,"setPeerConnectionOptions",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.opt=e,this.cfg=e.peerConnectionOptions||{}}}),Object.defineProperty(this,"webRtcPlayerLog",{enumerable:!0,configurable:!0,writable:!0,value:(...e)=>{(this.debugMode||window.onlyforDeveloper100)&&(console.group("%c"+e[0],"color:white;padding:5px;background:#E47F7F;border-radius:5px;"),e.forEach((e,t)=>{0{this.pcClient&&(this.webRtcPlayerLog("Closing existing PeerConnection"),this.pcClient.close(),this.pcClient=null),this.pcClient=new RTCPeerConnection(this.cfg),this.setupPeerConnection(),this.dcClient=this.setupDataChannel("cirrus",pe),this.largeDcClient=this.setupLargeDataChannel("largedata",pe),this.handleCreateOffer()}}),Object.defineProperty(this,"receiveAnswer",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.webRtcPlayerLog("Received answer",e);var t="object"==typeof e?JSON.parse(JSON.stringify(e)):JSON.parse(e);window.allPlugins=t.allPlugins,/tier-flag/g.test(e.sdp)&&/H265/g.test(e.sdp)?this.video_codec="H265":/H264/g.test(e.sdp)?this.video_codec="H264":this.video_codec="N/A",this.answerDesc=new RTCSessionDescription(e),this.pcClient.setRemoteDescription(this.answerDesc)}}),Object.defineProperty(this,"getStats",{enumerable:!0,configurable:!0,writable:!0,value:t=>{this.pcClient&&t&&this.pcClient.getStats(null).then(e=>{t(e)})}}),Object.defineProperty(this,"close",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.pcClient&&(this.webRtcPlayerLog("Closing existing peerClient"),this.largeDcClient=null,this.dcClient=null,this.answerDesc=null,this.candidate=null,this.pcClient.close(),this.pcClient=null),this.aggregateStatsIntervalId&&clearInterval(this.aggregateStatsIntervalId)}}),Object.defineProperty(this,"setupPeerConnection",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.pcClient.SetBitrate&&this.webRtcPlayerLog("there's RTCPeerConnection.SetBitrate function",this.pcClient),this.pcClient&&(this.pcClient.onsignalingstatechange=this.onsignalingstatechange,this.pcClient.oniceconnectionstatechange=this.oniceconnectionstatechange,this.pcClient.onicegatheringstatechange=this.onicegatheringstatechange,this.pcClient.ontrack=this.handleOnTrack,this.pcClient.onicecandidate=this.onicecandidate,this.pcClient.onconnectionstatechange=this.onconnectionstatechange)}}),Object.defineProperty(this,"setupDataChannel",{enumerable:!0,configurable:!0,writable:!0,value:(t,e)=>{let r=this;try{var n=this.pcClient.createDataChannel(t,e);return this.webRtcPlayerLog(`Created datachannel (${t})`),n.onopen=function(e){r.webRtcPlayerLog(`data channel (${t}) connect`,e),r.onDataChannelConnected&&r.onDataChannelConnected()},n.onclose=function(e){r.webRtcPlayerLog(`data channel (${t}) closed`,e)},n.onmessage=function(e){r.webRtcPlayerLog(`Got message (${t})`,e),r.onDataChannelMessage&&r.onDataChannelMessage(e.data)},n}catch(t){return this.webRtcPlayerLog("No data channel",t),null}}}),Object.defineProperty(this,"setupLargeDataChannel",{enumerable:!0,configurable:!0,writable:!0,value:(t,e)=>{let r=this;try{var n=this.pcClient.createDataChannel(t,e);return this.webRtcPlayerLog(`Created large datachannel (${t})`),n.onopen=function(e){r.webRtcPlayerLog(`large data channel (${t}) connect`,e),r.onDataChannelConnected&&r.onDataChannelConnected()},n.onclose=function(e){r.webRtcPlayerLog(`large data channel (${t}) closed`,e)},n.onmessage=function(e){r.webRtcPlayerLog(`Got message (${t})`,e),r.onLargeDataChannelMessage&&r.onLargeDataChannelMessage(e.data)},n}catch(t){return this.webRtcPlayerLog("No large data channel",t),null}}}),Object.defineProperty(this,"send",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.webRtcPlayerLog("=============send data:=============",e),this.dcClient&&"open"==this.dcClient.readyState&&(this.webRtcPlayerLog("==========Data Channel Statue: Opened============"),this.dcClient.send(e))}}),Object.defineProperty(this,"sendLargeData",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.webRtcPlayerLog("=============send large data:=============",e),this.largeDcClient&&"open"==this.largeDcClient.readyState&&(this.webRtcPlayerLog("==========LargeData Channel Statue: Opened============"),this.largeDcClient.send(e))}}),Object.defineProperty(this,"isDataChannelBusy",{enumerable:!0,configurable:!0,writable:!0,value:()=>!!(this.dcClient&&"open"===this.dcClient.readyState&&0!!(this.largeDcClient&&"open"==this.largeDcClient.readyState&&0{this.webRtcPlayerLog("onsignalingstatechange signaling state change:",e)}}),Object.defineProperty(this,"oniceconnectionstatechange",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.webRtcPlayerLog("oniceconnectionstatechange iceconnection state change:",e)}}),Object.defineProperty(this,"onicegatheringstatechange",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.webRtcPlayerLog("onicegatheringstatechange icegathering state change:",e)}}),Object.defineProperty(this,"onconnectionstatechange",{enumerable:!0,configurable:!0,writable:!0,value:e=>{let t=this;switch(this.webRtcPlayerLog("onconnectionstatechange connection state change:",this.pcClient.connectionState,e),this.connectingTimeoutID&&(clearTimeout(t.connectingTimeoutID),this.connectingTimeoutID=null),"connecting"===this.pcClient.connectionState&&(this.connectingTimeoutID=setTimeout(()=>{t.onRTCFailed&&t.onRTCFailed("timeout"),clearTimeout(t.connectingTimeoutID),t.connectingTimeoutID=null},6e4)),this.pcClient.connectionState){case"connected":this.onPeerConnectionConnected&&this.onPeerConnectionConnected();break;case"failed":this.onRTCFailed&&this.onRTCFailed("failed");break;case"disconnected":this.onPeerConnectionDisconnected&&this.onPeerConnectionDisconnected()}}}),Object.defineProperty(this,"handleOnTrack",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.webRtcPlayerLog("handle on Track:",e),this.video&&this.video.srcObject!==e.streams[0]&&(this.webRtcPlayerLog("setting video stream from ontrack"),this.video.srcObject=e.streams[0])}}),Object.defineProperty(this,"onicecandidate",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.webRtcPlayerLog("ICE candidate:",e),!e.candidate||0<=navigator.userAgent.toLowerCase().indexOf("firefox")&&!e.candidate.candidate||this.onWebRtcCandidate(JSON.stringify(e.candidate))}}),Object.defineProperty(this,"handleIceRestart",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let t=this;t.webRtcPlayerLog("************************************* Restart ICE ***************************************"),this.pcClient&&(ye.iceRestart=!0,this.pcClient.createOffer(ye).then(function(e){t.pcClient.setLocalDescription(e),t.onWebRtcIceRestart&&(e.type="iceRestart",t.onWebRtcIceRestart(JSON.stringify(e)))},function(){t.webRtcPlayerLog("Couldn't restart ICE")}))}}),Object.defineProperty(this,"handleCreateOffer",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let t=this;this.pcClient&&this.pcClient.createOffer(ye).then(function(e){t.pcClient.setLocalDescription(e),t.onWebRtcOffer&&(e.sdp=e.sdp.replace(/a=rtpmap:([0-9]+) (.+)/g,"a=rtpmap:$1 $2\r\na=rtcp-fb:$1 rrtr"),t.onWebRtcOffer(JSON.stringify(e)))},function(){t.webRtcPlayerLog("Couldn't create offer")})}}),Object.defineProperty(this,"handleCandidateFromServer",{enumerable:!0,configurable:!0,writable:!0,value:e=>{let t=this;this.webRtcPlayerLog("ICE candidate:",e),this.candidate=new RTCIceCandidate(e),this.pcClient.addIceCandidate(this.candidate).then(()=>{t.webRtcPlayerLog("ICE candidate successfully added")})}}),Object.defineProperty(this,"aggregateStats",{enumerable:!0,configurable:!0,writable:!0,value:e=>{let t=this.generateAggregatedStatsFunction();this.aggregateStatsIntervalId&&clearInterval(this.aggregateStatsIntervalId),this.aggregateStatsIntervalId=setInterval(()=>{this.getStats(t)},e)}}),Object.defineProperty(this,"generateAggregatedStatsFunction",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let r=this;return this.aggregatedStats||(this.aggregatedStats={}),function(e){let t={};e.forEach(e=>{"inbound-rtp"!==e.type||e.isRemote||"video"!==e.mediaType&&!e.id.toLowerCase().includes("video")||(t.timestamp=e.timestamp,t.bytesReceived=e.bytesReceived,t.framesDecoded=e.framesDecoded,t.packetsLost=e.packetsLost,t.bytesReceivedStart=r.aggregatedStats&&r.aggregatedStats.bytesReceivedStart?r.aggregatedStats.bytesReceivedStart:e.bytesReceived,t.framesDecodedStart=r.aggregatedStats&&r.aggregatedStats.framesDecodedStart?r.aggregatedStats.framesDecodedStart:e.framesDecoded,t.timestampStart=r.aggregatedStats&&r.aggregatedStats.timestampStart?r.aggregatedStats.timestampStart:e.timestamp,t.codecInfo=e.codecInfo,r.aggregatedStats&&r.aggregatedStats.timestamp&&(r.aggregatedStats.bytesReceived&&(t.bitrate=8*(t.bytesReceived-r.aggregatedStats.bytesReceived)/(t.timestamp-r.aggregatedStats.timestamp),t.bitrate=Math.floor(t.bitrate),t.lowBitrate=r.aggregatedStats.lowBitrate&&r.aggregatedStats.lowBitratet.bitrate?r.aggregatedStats.highBitrate:t.bitrate),r.aggregatedStats.bytesReceivedStart&&(t.avgBitrate=8*(t.bytesReceived-r.aggregatedStats.bytesReceivedStart)/(t.timestamp-r.aggregatedStats.timestampStart),t.avgBitrate=Math.floor(t.avgBitrate)),r.aggregatedStats.framesDecoded&&(t.framerate=(t.framesDecoded-r.aggregatedStats.framesDecoded)/((t.timestamp-r.aggregatedStats.timestamp)/1e3),t.framerate=Math.floor(t.framerate),t.lowFramerate=r.aggregatedStats.lowFramerate&&r.aggregatedStats.lowFrameratet.framerate?r.aggregatedStats.highFramerate:t.framerate),r.aggregatedStats.framesDecodedStart)&&(t.avgframerate=(t.framesDecoded-r.aggregatedStats.framesDecodedStart)/((t.timestamp-r.aggregatedStats.timestampStart)/1e3),t.avgframerate=Math.floor(t.avgframerate))),"track"===e.type&&"video_label"===e.trackIdentifier&&(t.framesDropped=e.framesDropped,t.framesReceived=e.framesReceived,t.framesDroppedPercentage=e.framesDropped/e.framesReceived*100,t.frameHeight=e.frameHeight,t.frameWidth=e.frameWidth,t.frameHeightStart=r.aggregatedStats&&r.aggregatedStats.frameHeightStart?r.aggregatedStats.frameHeightStart:e.frameHeight,t.frameWidthStart=r.aggregatedStats&&r.aggregatedStats.frameWidthStart?r.aggregatedStats.frameWidthStart:e.frameWidth),t.video_codec=r.video_codec,"candidate-pair"===e.type&&Object.prototype.hasOwnProperty.call(e,"currentRoundTripTime")&&(t.currentRoundTripTime=e.currentRoundTripTime)}),r.aggregatedStats=t,r.onAggregatedStats&&r.onAggregatedStats(t)}}}),this.opt=null,this.cfg={},this.debugMode=!1,this.video=e,this.pcClient=null,this.dcClient=null,this.largeDcClient=null,this.answerDesc=null,this.candidate=null,this.connectingTimeoutID=null,this.video_codec="N/A"}}let b=Object.create(null),Ee=(b.open="0",b.close="1",b.ping="2",b.pong="3",b.message="4",b.upgrade="5",b.noop="6",Object.create(null)),we=(Object.keys(b).forEach(e=>{Ee[b[e]]=e}),{type:"error",data:"parser error"}),Se="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Ce="function"==typeof ArrayBuffer,je=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ie=({type:e,data:t},r,n)=>Se&&t instanceof Blob?r?n(t):Ge(t,n):Ce&&(t instanceof ArrayBuffer||je(t))?r?n(t):Ge(new Blob([t]),n):n(b[e]+(t||"")),Ge=(e,t)=>{let r=new FileReader;return r.onload=function(){var e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function Oe(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Te;let Ae="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)Ae["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;let Re="function"==typeof ArrayBuffer,Pe=(e,t)=>{var r;return"string"!=typeof e?{type:"message",data:De(e,t)}:"b"===(r=e.charAt(0))?{type:"message",data:((e,t)=>{if(Re){const r=(e=>{let t,r,n,i,o,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const u=new ArrayBuffer(a),c=new Uint8Array(u);for(t=0;t>4,c[l++]=(15&n)<<4|i>>2,c[l++]=(3&i)<<6|63&o;return u})(e);return De(r,t)}return{base64:!0,data:e}})(e.substring(1),t)}:Ee[r]?1"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Me=String.fromCharCode(30),ke,E=w;function w(e){if(e){var t,r=e;for(t in w.prototype)r[t]=w.prototype[t];return r}}w.prototype.on=w.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},w.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},w.prototype.off=w.prototype.removeListener=w.prototype.removeAllListeners=w.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)this._callbacks={};else{var r,n=this._callbacks["$"+e];if(n)if(1==arguments.length)delete this._callbacks["$"+e];else{for(var i=0;i(r.hasOwnProperty(t)&&(e[t]=r[t]),e),{})}let Ve=S.setTimeout,_e=S.clearTimeout;function Le(e,t){t.useNativeTimers?(e.setTimeoutFn=Ve.bind(S),e.clearTimeoutFn=_e.bind(S)):(e.setTimeoutFn=S.setTimeout.bind(S),e.clearTimeoutFn=S.clearTimeout.bind(S))}class Ne extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class Ue extends E{constructor(e){super(),this.writable=!1,Le(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new Ne(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){e=Pe(e,this.socket.binaryType);this.onPacket(e)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){var e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){e=function(e){let t="";for(var r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}(e);return e.length?"?"+e:""}}let Fe="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Be=64,We,He=0,$e=0;function qe(e){let t="";for(;t=Fe[e%Be]+t,0<(e=Math.floor(e/Be)););return t}function ze(){var e=qe(+new Date);return e!==We?(He=0,We=e):e+"."+qe(He++)}for(;$e{var e;3===r.readyState&&null!=(e=this.opts.cookieJar)&&e.parseCookies(r),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn(()=>{this.onError("number"==typeof r.status?r.status:0)},0))},r.send(this.data)}catch(e){return void this.setTimeoutFn(()=>{this.onError(e)},0)}"undefined"!=typeof document&&(this.index=C.requestsCount++,C.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(null!=this.xhr){if(this.xhr.onreadystatechange=Ke,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete C.requests[this.index],this.xhr=null}}onLoad(){var e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function Xe(){for(var e in C.requests)C.requests.hasOwnProperty(e)&&C.requests[e].abort()}C.requestsCount=0,C.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",Xe):"function"==typeof addEventListener&&addEventListener("onpagehide"in S?"pagehide":"unload",Xe,!1));var W="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},j=[],I=[],et="undefined"!=typeof Uint8Array?Uint8Array:Array,tt=!1;function rt(){tt=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)j[t]=e[t],I[e.charCodeAt(t)]=t;I["-".charCodeAt(0)]=62,I["_".charCodeAt(0)]=63}function nt(e){var t;tt||rt();for(var r=e.length,n=r%3,i="",o=[],a=0,s=r-n;a>18&63]+j[n>>12&63]+j[n>>6&63]+j[63&n]);return i.join("")}(e,a,s>2])+j[t<<4&63]+"==":2==n&&(i=(i=(i+=j[(t=(e[r-2]<<8)+e[r-1])>>10])+j[t>>4&63])+j[t<<2&63]+"="),o.push(i),o.join("")}function it(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,c=-7,d=r?i-1:0,h=r?-1:1,i=e[t+d];for(d+=h,o=i&(1<<-c)-1,i>>=-c,c+=s;0>=-c,c+=n;0>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,m=n?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-a))<1&&(a--,n*=2),2<=(t+=1<=a+c?d/n:d*Math.pow(2,1-c))*n&&(a++,n/=2),u<=a+c?(s=0,a=u):1<=a+c?(s=(t*n-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));8<=i;e[r+h]=255&s,h+=m,s/=256,i-=8);for(a=a<=lt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+lt().toString(16)+" bytes");return 0|e}function T(e){return null!=e&&e._isBuffer}function gt(e,t){if(T(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var r=(e="string"!=typeof e?""+e:e).length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Ot(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Tt(e).length;default:if(n)return Ot(e).length;t=(""+t).toLowerCase(),n=!0}}function ft(e,t,r){var n,i=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,a=t,s=r,l=o.length;(!s||s<0||l=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if(T(t="string"==typeof t?O.from(t,n):t))return 0===t.length?-1:yt(e,t,r,n,i);if("number"==typeof t)return t&=255,O.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):yt(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function yt(e,t,r,n,i){var o=1,a=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a/=o=2,s/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i)for(var u=-1,c=r;c>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}var h=n,m=h.length;if(m<=Et)return String.fromCharCode.apply(String,h);for(var g="",f=0;f"},O.prototype.compare=function(e,t,r,n,i){if(!T(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=t)return 0;if(i<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(n,i),u=e.slice(t,r),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,a,s,l,u,c=!1;;)switch(n){case"hex":var d=this,h=e,m=t,g=r,f=(m=Number(m)||0,d.length-m);if((!g||(g=Number(g))>f)&&(g=f),(f=h.length)%2!=0)throw new TypeError("Invalid hex string");f/2>8,i.push(r%256),i.push(n);return i}(e,(o=this).length-s),o,s,a);default:if(c)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Et=4096;function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(re.length)throw new RangeError("Index out of range")}function wt(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function St(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function Ct(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function jt(e,t,r,n,i){return i||Ct(e,0,r,4),ot(e,t,r,n,23,4),r+4}function It(e,t,r,n,i){return i||Ct(e,0,r,8),ot(e,t,r,n,52,8),r+8}O.prototype.slice=function(e,t){var r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):r=(i*=128)&&(n-=Math.pow(2,8*t)),n},O.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];0=(i*=128)&&(o-=Math.pow(2,8*t)),o},O.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},O.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},O.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},O.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},O.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},O.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),it(this,e,!0,23,4)},O.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),it(this,e,!1,23,4)},O.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),it(this,e,!0,52,8)},O.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),it(this,e,!1,52,8)},O.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>8):wt(this,e,t,!0),t+2},O.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):wt(this,e,t,!1),t+2},O.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),O.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):St(this,e,t,!0),t+4},O.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):St(this,e,t,!1),t+4},O.prototype.writeIntLE=function(e,t,r,n){e=+e,t|=0,n||P(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},O.prototype.writeIntBE=function(e,t,r,n){e=+e,t|=0,n||P(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=r-1,o=1,a=0;for(this[t+i]=255&e;0<=--i&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},O.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,127,-128),O.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},O.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),O.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):wt(this,e,t,!0),t+2},O.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):wt(this,e,t,!1),t+2},O.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),O.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):St(this,e,t,!0),t+4},O.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),O.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):St(this,e,t,!1),t+4},O.prototype.writeFloatLE=function(e,t,r){return jt(this,e,t,!0,r)},O.prototype.writeFloatBE=function(e,t,r){return jt(this,e,t,!1,r)},O.prototype.writeDoubleLE=function(e,t,r){return It(this,e,t,!0,r)},O.prototype.writeDoubleBE=function(e,t,r){return It(this,e,t,!1,r)},O.prototype.copy=function(e,t,r,n){if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var i,o=(n=e.length-t>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Tt(e){var t=function(e){if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(Gt,"")).length<2)return"";for(var t;e.length%4!=0;)e+="=";return e}(e);tt||rt();var r,e=t.length;if(0>16&255,i[a++]=r>>8&255,i[a++]=255&r;return 2==n?(r=I[t.charCodeAt(s)]<<2|I[t.charCodeAt(s+1)]>>4,i[a++]=255&r):1==n&&(r=I[t.charCodeAt(s)]<<10|I[t.charCodeAt(s+1)]<<4|I[t.charCodeAt(s+2)]>>2,i[a++]=r>>8&255,i[a++]=255&r),i}function At(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Rt(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}let Pt="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Dt=S.WebSocket||S.MozWebSocket,Mt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();let kt={websocket:class extends Ue{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(this.check()){var e=this.uri(),t=this.opts.protocols,r=Mt?{}:xe(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Mt?new Dt(e,t,r):t?new Dt(e,t):new Dt(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(n){this.writable=!1;for(let r=0;r{try{this.ws.send(e)}catch(e){}t&&Pt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){var e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=ze()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!Dt}},webtransport:class extends Ue{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>this.onClose()),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{let t=e.readable.getReader(),r,n=(this.writer=e.writable.getWriter(),()=>{t.read().then(({done:e,value:t})=>{e||(r=!r&&1===t.byteLength&&54===t[0]||(this.onPacket(function(e,t){ke=ke||new TextDecoder;t=t||e[0]<48||54this.onOpen())})}))}write(t){this.writable=!1;for(let e=0;e{Te=Te||new TextEncoder,t(Te.encode(e))})}(n,e=>{var t,r;t=n,r=e,"message"===t.type&&"string"!=typeof t.data&&48<=r[0]&&r[0]<=54&&this.writer.write(Uint8Array.of(54)),this.writer.write(e).then(()=>{i&&Pt(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})})}}doClose(){var e;null!=(e=this.transport)&&e.close()}},polling:class extends Ue{constructor(r){if(super(r),this.polling=!1,"undefined"!=typeof location){let e="https:"===location.protocol,t=location.port;t=t||(e?"443":"80"),this.xd=void 0!==location&&r.hostname!==location.hostname||t!==r.port}let e=r&&r.forceBase64;this.supportsBinary=Qe&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{var r=e.split(Me),n=[];for(let e=0;e{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState)&&this.poll()}doClose(){var e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1;{var o=e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})};let r=e.length,n=new Array(r),i=0;e.forEach((e,t)=>{Ie(e,!1,e=>{n[t]=e,++i===r&&o(n.join(Me))})})}}uri(){var e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=ze()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new C(this.uri(),e)}doWrite(e,t){e=this.request({method:"POST",data:e});e.on("success",t),e.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){var e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}},xt=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Vt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _t(e){var t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=xt.exec(e||""),o={},a=14;for(;a--;)o[Vt[a]]=i[a]||"";return-1!=r&&-1!=n&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=(e=o.path,r=e.replace(/\/{2,9}/g,"/").split("/"),"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1),"/"==e.slice(-1)&&r.splice(r.length-1,1),r),o.queryKey=function(){let n={};return o.query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(),o}let Lt=class c extends E{constructor(e,t={}){super(),this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=_t(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=_t(t.host).host),Le(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){var r={},n=e.split("&");for(let e=0,t=n.length;e{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname)&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1)),this.open()}createTransport(e){var t=Object.assign({},this.opts.query),t=(t.EIO=4,t.transport=e,this.id&&(t.sid=this.id),Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port}));return new kt[e](t)}open(){let e;if(this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),(this.transport=e).on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",e=>this.onClose("transport close",e))}probe(e){let t=this.createTransport(e),r=!1,n=(c.priorWebsocketSuccess=!1,()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!r)if("pong"===e.type&&"probe"===e.data)this.upgrading=!0,this.emitReserved("upgrading",t),t&&(c.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{r||"closed"!==this.readyState&&(u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}));else{let e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))});function i(){r||(r=!0,u(),t.close(),t=null)}let o=e=>{e=new Error("probe error: "+e);e.transport=t.name,i(),this.emitReserved("upgradeError",e)};function a(){o("transport closed")}function s(){o("socket closed")}function l(e){t&&e.name!==t.name&&i()}let u=()=>{t.removeListener("open",n),t.removeListener("error",o),t.removeListener("close",a),this.off("close",s),this.off("upgrading",l)};t.once("open",n),t.once("error",o),t.once("close",a),this.once("close",s),this.once("upgrading",l),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onOpen(){if(this.readyState="open",c.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;for(var t=this.upgrades.length;e{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),(this.prevBufferLen=0)===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){var e;"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(e=this.getWritablePackets(),this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush"))}getWritablePackets(){if(this.maxPayload&&"polling"===this.transport.name&&1this.maxPayload)return this.writeBuffer.slice(0,e);t+=2}}return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,n){"function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState&&((r=r||{}).compress=!1!==r.compress,this.emitReserved("packetCreate",e={type:e,data:t,options:r}),this.writeBuffer.push(e),n&&this.once("flush",n),this.flush())}close(){let e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{(this.upgrading?r:e)()}):(this.upgrading?r:e)()),this}onError(e){c.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){var t=[];let r=0;for(var n=e.length;r"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ft=Object.prototype.toString,Bt="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Ft.call(Blob),Wt="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Ft.call(File);function Ht(e){return Nt&&(e instanceof ArrayBuffer||Ut(e))||Bt&&e instanceof Blob||Wt&&e instanceof File}function $t(e){var t=[],r=e.data;return e.data=function r(n,i){if(!n)return n;if(Ht(n)){let e={_placeholder:!0,num:i.length};return i.push(n),e}if(Array.isArray(n)){let t=new Array(n.length);for(let e=0;e{delete this.acks[r];for(let e=0;e{this.io.clearTimeoutFn(t),n.apply(this,[null,...e])}}}emitWithAck(e,...t){let i=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise((r,n)=>{t.push((e,t)=>i?e?n(e):r(t):r(e)),this.emit(e,...t)})}_addToQueue(e){let r,n=("function"==typeof e[e.length-1]&&(r=e.pop()),{id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)});e.push((e,...t)=>{if(n===this._queue[0])return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),r)&&r(e):(this._queue.shift(),r&&r(null,...t)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){var t;!this.connected||0===this._queue.length||(t=this._queue[0]).pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:D.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case D.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case D.EVENT:case D.BINARY_EVENT:this.onevent(e);break;case D.ACK:case D.BINARY_ACK:this.onack(e);break;case D.DISCONNECT:this.ondisconnect();break;case D.CONNECT_ERROR:this.destroy();var t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){var t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){var t;if(this._anyListeners&&this._anyListeners.length)for(t of this._anyListeners.slice())t.apply(this,e);super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(t){let r=this,n=!1;return function(...e){n||(n=!0,r.packet({type:D.ACK,id:t,data:e}))}}onack(e){var t=this.acks[e.id];"function"==typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:D.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(t){if(this._anyListeners)if(t){var r=this._anyListeners;for(let e=0;e{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),o?o(e):this.maybeReconnectOnOpen()},t=M(r,"error",i);if(!1!==this._timeout){let e=this._timeout,t=this.setTimeoutFn(()=>{n(),i(new Error("timeout")),r.close()},e);this.opts.autoUnref&&t.unref(),this.subs.push(()=>{this.clearTimeoutFn(t)})}this.subs.push(n),this.subs.push(t)}return this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");var e=this.engine;this.subs.push(M(e,"ping",this.onping.bind(this)),M(e,"data",this.ondata.bind(this)),M(e,"error",this.onerror.bind(this)),M(e,"close",this.onclose.bind(this)),M(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){Pt(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Xt(this,e,t),this.nsps[e]=r),r}_destroy(e){for(let e of Object.keys(this.nsps))if(this.nsps[e].active)return;this._close()}_packet(t){var r=this.encoder.encode(t);for(let e=0;ee()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var r=this.backoff.duration();this._reconnecting=!0;let e=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect)||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()})},r);this.opts.autoUnref&&e.unref(),this.subs.push(()=>{this.clearTimeoutFn(e)})}}onreconnect(){var e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}let rr={};function nr(e,t){"object"==typeof e&&(t=e,e=void 0);var e=function(e,t,r){let n=e;r="undefined"!=typeof location&&location,"string"==typeof(e=null==e?r.protocol+"//"+r.host:e)&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=r.protocol+"//"+e),n=_t(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";e=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+e+":"+n.port+t,n.href=n.protocol+"://"+e+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),r=e.source,n=e.id,i=e.path,i=rr[n]&&i in rr[n].nsps;let o;return o=t.forceNew||t["force new connection"]||!1===t.multiplex||i?new tr(r,t):(rr[n]||(rr[n]=new tr(r,t)),rr[n]),e.query&&!t.query&&(t.query=e.queryKey),o.socket(e.path,t)}Object.assign(nr,{Manager:tr,Socket:Xt,io:nr,connect:nr});let ir={company:"51WORLD",slogan:"Digital twin storm is now",version:"1.11.0_1001",updated:"2024/9/14 11:13:40",author:"Yama.Luo"},{ToClientMessageType:k,MessageType:x,ControlSchemeType:or,inputOptions:ar,MouseButton:sr,MouseButtonsMask:lr}={ToClientMessageType:{QualityControlOwnership:0,Response:1,focusKeyboard:2,LargeDataStart:90,LargeData:91,LargeDataEnd:92,WarningAndError:100},MessageType:{IFrameRequest:0,RequestQualityControl:1,MaxFpsRequest:2,AverageBitrateRequest:3,StartStreaming:4,StopStreaming:5,RendererSetting:30,UIInteraction:50,Command:51,KeyDown:60,KeyUp:61,KeyPress:62,compositionend:63,MouseEnter:70,MouseLeave:71,MouseDown:72,MouseUp:73,MouseMove:74,MouseWheel:75,TouchStart:80,TouchEnd:81,TouchMove:82,LargeDataStart:90,LargeData:91,LargeDataEnd:92},ControlSchemeType:o={LockedMouse:0,HoveringMouse:1},inputOptions:{controlScheme:o.HoveringMouse,fakeMouseWithTouches:!1},MouseButton:{MainButton:0,AuxiliaryButton:1,SecondaryButton:2},MouseButtonsMask:{PrimaryButton:1,SecondaryButton:2,AuxiliaryButton:4}};return class{constructor(e){var t;Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"taskId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:1920}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:1080}),Object.defineProperty(this,"rendererMode",{enumerable:!0,configurable:!0,writable:!0,value:"full"}),Object.defineProperty(this,"deviceType",{enumerable:!0,configurable:!0,writable:!0,value:navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)?"SP":"PC"}),Object.defineProperty(this,"playerDom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"callbacks",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"callbackEvents",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"debugMode",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"debugPer",{enumerable:!0,configurable:!0,writable:!0,value:{normal:1,high:2,all:4}}),Object.defineProperty(this,"multiple",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(this,"rendererio",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rendererPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"playerType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"webRtcPlayerObj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"playerInputDom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cpLock",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spKeyBool",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"keyboardActive",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"browserFuncKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"socket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientConfig",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientConfigFlag",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resizeTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastTimeResized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"video",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"playDomDefault",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styleWidth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styleHeight",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styleTop",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styleLeft",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styleCursor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stylePosition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"is_playing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"normalizeAndQuantizeUnsigned",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"normalizeAndQuantizeSigned",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_orientationChangeTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"recevieBigDataMessageString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"recevieBigDataArray",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reconnect_rtc",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"set_video_unmuted_once",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sendQueue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"progressCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sendPosition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sendBufferData",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sendIntervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"deviceLock",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fullscreenBool",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initShow",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"aggregatedStats",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"screenAngle",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"initLogInfo",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e=Math.floor(Math.random()*V.length);console.log(V[e]),console.group(`%c🌍 ${ir.company} -- `+ir.slogan,"color:white;padding:5px;border-radius:5px;background:black;margin-right:10px;font-weight:bold;"),console.log("%c🌟 Version","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;","V"+ir.version),console.log("%c🌟 Updated","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",ir.updated),console.log("%c🌟 Author","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",ir.author),console.log("%c🌟 Company","color:white;padding:5px;border-radius:5px;background:#4F4E4E;margin-right:10px;font-weight:bold;",ir.company),console.groupEnd()}}),Object.defineProperty(this,"initPlayerDom",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e;this.playerDom=document.getElementById(this.id),this.playDomDefault={w:null==(e=this.playerDom)?void 0:e.clientWidth,h:null==(e=this.playerDom)?void 0:e.clientHeight}}}),Object.defineProperty(this,"createVideo",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.video||(this.video=document.createElement("video"),this.video.id="streamingVideo",this.video.setAttribute("playsInline",""),this.video.setAttribute("autoplay",""),this.video.setAttribute("style","width:100%;height:100%;"),this.video.muted=!0,this.video.disablePictureInPicture=!0,this.video.play(),this.playerDom.appendChild(this.video)),this.playerDom.contains(this.video)||this.playerDom.appendChild(this.video)}}),Object.defineProperty(this,"setupInputForChinese",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.playerInputDom||(this.playerInputDom=document.createElement("input"),this.playerInputDom.id="playerInput",this.playerInputDom.setAttribute("type","text"),this.playerInputDom.setAttribute("style","z-index: -1;opacity: 0; position: absolute; left: 0; top: 0; background: none; border: none;"),this.playerInputDom.addEventListener("compositionstart",this.ChineseCompositionStartEvent,!1),this.playerInputDom.addEventListener("compositionend",this.ChineseCompositionEndEvent,!1),this.playerInputDom.addEventListener("input",this.ChineseChangeEvent,!1),this.playerDom.appendChild(this.playerInputDom)),this.playerDom.contains(this.playerInputDom)||this.playerDom.appendChild(this.playerInputDom)}}),Object.defineProperty(this,"setDebugMode",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if("none"===e)this.debugMode=0;else if("normal"===e)this.debugMode=1;else if("high"===e)this.debugMode=3;else if("all"===e)return this.debugMode=7,this.webRtcPlayerObj&&this.webRtcPlayerObj.setLogMode(!0),!0;return this.webRtcPlayerObj&&this.webRtcPlayerObj.setLogMode(!1),!0}}),Object.defineProperty(this,"comparePer",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>0!=(e&this.debugPer[t])}),Object.defineProperty(this,"getCunrrentTime",{enumerable:!0,configurable:!0,writable:!0,value:()=>`${(new Date).getHours()}:${(new Date).getMinutes()}:${(new Date).getSeconds()}:`+(new Date).getMilliseconds()}),Object.defineProperty(this,"cloudApiLog",{enumerable:!0,configurable:!0,writable:!0,value:(...e)=>{window.debugMode?"normal"!==window.debugMode&&"high"!==window.debugMode&&"all"!==window.debugMode||(console.group("%c"+e[0],"color:white;padding:5px;background:#2374D6;border-radius:5px;"),e.forEach((e,t)=>{0{0{window.debugMode?"high"!==window.debugMode&&"all"!==window.debugMode||(console.group("%c"+e[0],"color:white;padding:5px;background:#00B3E7;border-radius:5px;"),e.forEach((e,t)=>{0{0{window.debugMode?"all"===window.debugMode&&(console.group("%c"+e[0],"color:white;padding:5px;background:#00B3E8;border-radius:5px;"),e.forEach((e,t)=>{0{0c(this,void 0,void 0,function*(){return this.aggregatedStats})}),Object.defineProperty(this,"setDeviceLock",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.deviceLock=e}}),Object.defineProperty(this,"setResolutionMultiple",{enumerable:!0,configurable:!0,writable:!0,value:(e=1)=>{this.multiple=e}}),Object.defineProperty(this,"setResolution",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>{var r=e*this.multiple,n=t*this.multiple;this.highLevelLog("Set new resolution:",r+"x"+n),this.width=e,this.height=t,this.emitDescriptor(x.RendererSetting,{apiClassName:"RendererSetting",apiFuncName:"SetResolution",args:{width:r,height:n}})}}),Object.defineProperty(this,"setBitrate",{enumerable:!0,configurable:!0,writable:!0,value:e=>{15{60{try{let e=new URL(t);this.rendererio=e.origin,""!==e.pathname&&"/"!==e.pathname&&(this.rendererPath=e.pathname)}catch(e){this.rendererio=window.location.origin,this.rendererPath=t}this.taskId=e,this.initPlayerDom(),this.createVideo(),this.setupInputForChinese(),this.setupHtmlEvents(),this.registerKeyboardEvents(),this.connect()}}),Object.defineProperty(this,"stopRenderCloud",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.socket&&(this.cloudApiLog("===== Closed By Client ====="),this.socket.disconnect()),this.closeWebRtc()}}),Object.defineProperty(this,"connect",{enumerable:!0,configurable:!0,writable:!0,value:()=>{if(this.rendererio&&this.taskId){var t={auth:{taskId:this.taskId,origin:"browser"}},t=(null!==this.rendererPath&&(t.path=this.rendererPath),this.socket=nr(this.rendererio,t),this.registerSocektEvent(),document.createElement("video"));let e=null;"probably"===t.canPlayType('video/mp4;codecs="hev1.1.6.L120.90"')?(console.log("HEVC main profile is supported!"),e=3):"probably"===t.canPlayType('video/mp4;codecs="hev1.2.4.L120.90"')?(console.log("HEVC main 10 profile is supported!"),e=3):"probably"===t.canPlayType('video/mp4;codecs="hev1.3.E.L120.90"')?(console.log("HEVC main still-picture profile is supported!"),e=3):"probably"===t.canPlayType('video/mp4;codecs="hev1.4.10.L120.90"')?(console.log("HEVC range extensions profile is supported!"),e=3):"probably"===t.canPlayType('application/webrtc; codecs="hev1"')?e=3:"probably"===t.canPlayType('video/mp4; codecs="avc1.640034"')?e=2:"probably"===t.canPlayType('video/mp4; codecs="avc1.4D0034"')&&(e=1),e&&(this.highLevelLog("preferVideoCodecs is "+e),this.socket)&&this.socket.emit("codecs",e)}else this.onHandleCallbackFunc("onUnavailableRender")}}),Object.defineProperty(this,"registerSocektEvent",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let r=this;this.socket?(this.socket.on("connect",()=>{r.cloudApiLog("Socekt Connected!"),r.sendMaxResolution(),r.sendPlayerType(),r.sendUserConfig(),this.onHandleCallbackFunc("onRenderCloudConnected")}),this.socket.on("internalError",e=>{this.onHandleCallbackFunc("onInternalError",e)}),this.socket.on("connect_error",e=>{this.onHandleCallbackFunc("onConnectError",e)}),this.socket.on("clientConfig",e=>{r.highLevelLog("clientConfig:",e),this.clientConfig=e,r.onClientConfig()}),this.socket.on("iceRestart",e=>{r.webRtcPlayerObj&&(r.cloudApiLog("webrtc-iceRestart:",e),r.webRtcPlayerObj.handleIceRestart())}),this.socket.on("iceCandidate",e=>{r.webRtcPlayerObj&&(r.highLevelLog("webrtc-ice:",e),r.webRtcPlayerObj.handleCandidateFromServer(e))}),this.socket.on("answer",e=>{r.webRtcPlayerObj&&(r.highLevelLog("webrtc-answer:",e),r.webRtcPlayerObj.receiveAnswer(e),r.webRtcPlayerObj.onAggregatedStats=e=>{r.aggregatedStats=e},r.webRtcPlayerObj.aggregateStats(1e3))}),this.socket.on("resize",(e,t)=>{r.cloudApiLog(`Resizing video to ${e}x`+t)}),this.socket.on("resized",(e,t)=>{r.cloudApiLog(`Video has resized to ${e}x`+t)}),this.socket.on("resolutionTruncated",e=>{r.cloudApiLog("===========Resolution Truncated Infos: ==============",e)}),this.socket.on("disconnect",e=>{r.cloudApiLog("Socket Connection is closed:",e),r.socket.close(),r.socket=null,r.is_playing=!1,r.set_video_unmuted_once=!1,r.onHandleCallbackFunc("onStopedRenderCloud",e)}),this.socket.on("streamingOver",()=>{r.cloudApiLog("streaming is over"),r.is_playing=!1,r.set_video_unmuted_once=!1}),this.socket.on("error",e=>{r.cloudApiLog("Socket error:",e),r.onHandleCallbackFunc("onRenderCloudError",e)})):this.onHandleCallbackFunc("onSocketError")}}),Object.defineProperty(this,"registerInputs",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.video&&(this.registerMouseEnterAndLeaveEvents(),this.registerTouchEvents())}}),Object.defineProperty(this,"registerTouchEvents",{enumerable:!0,configurable:!0,writable:!0,value:()=>{function i(e,r){var n=new DataView(new ArrayBuffer(2+6*r.length));n.setUint8(0,e),n.setUint8(1,r.length);let i=2;if(l.playerDom){for(let t=0;t{let r=this;this.video.onmouseenter=e=>{r.allLevelLog("mouse Enter");var t=new DataView(new ArrayBuffer(1));t.setUint8(0,x.MouseEnter),r.sendInputData(t.buffer),r.video.pressMouseButtons(e)},this.video.onmouseleave=e=>{r.allLevelLog("mouse leave");var t=new DataView(new ArrayBuffer(1));t.setUint8(0,x.MouseLeave),r.sendInputData(t.buffer),r.video.releaseMouseButtons(e)}}}),Object.defineProperty(this,"registerKeyboardEvents",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let r=this;document.onkeydown=function(e){r.keyboardActive&&(r.allLevelLog(`key down ${e.keyCode}, repeat = `+e.repeat,e),r.sendInputData(new Uint8Array([x.KeyDown,e.keyCode,e.repeat]).buffer),!r.browserFuncKey)&&r.isKeyCodeBrowserKey(e.keyCode)&&e.preventDefault()},document.onkeyup=function(e){r.keyboardActive&&(r.allLevelLog("key up "+e.keyCode,e),r.sendInputData(new Uint8Array([x.KeyUp,e.keyCode]).buffer),!r.browserFuncKey)&&r.isKeyCodeBrowserKey(e.keyCode)&&e.preventDefault()},document.onkeypress=function(e){var t;r.keyboardActive&&(r.allLevelLog("key press "+e.charCode,e),(t=new DataView(new ArrayBuffer(3))).setUint8(0,x.KeyPress),t.setUint16(1,e.charCode,!0),r.sendInputData(t.buffer),!r.browserFuncKey)&&r.isKeyCodeBrowserKey(e.keyCode)&&e.preventDefault()}}}),Object.defineProperty(this,"removeKeyboardEvents",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.keyboardActive=!1}}),Object.defineProperty(this,"removeEvents",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e=this;window.removeEventListener("resize",e.resizePlayerStyle,!0),window.removeEventListener("orientationchange",e.orientationChanged),window.removeEventListener("fullscreenchange",e.resizePlayerStyle),window.removeEventListener("mozfullscreenchange",e.resizePlayerStyle),window.removeEventListener("MSFullscreenChange",e.resizePlayerStyle),window.removeEventListener("webkitfullscreenchange",e.resizePlayerStyle),window.removeEventListener("touchmove",e.touchemoveAction),window.removeEventListener("unload",e.handleUnloadAct,!1),this.registerLockedMouseEvents(0),document.onkeydown=null,document.onkeyup=document.onkeypress=null,this.playerInputDom&&this.playerInputDom.removeEventListener("compositionstart",e.ChineseCompositionStartEvent,!1),this.playerInputDom&&this.playerInputDom.removeEventListener("compositionend",e.ChineseCompositionEndEvent,!1),this.playerInputDom&&this.playerInputDom.removeEventListener("input",e.ChineseChangeEvent,!1),"SP"===this.deviceType&&this.video.removeEventListener("touchstart",e.focusInputForSP,!1)}}),Object.defineProperty(this,"isKeyCodeBrowserKey",{enumerable:!0,configurable:!0,writable:!0,value:e=>112<=e&&e<=123||9===e}),Object.defineProperty(this,"registerHoveringMouseEvents",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let t=this;this.video.onmousemove=function(e){t.emitMouseMove(e.offsetX,e.offsetY,e.movementX,e.movementY)},this.video.onmousedown=function(e){t.setVideoUnmutedWhenUserInteraction(),t.emitMouseDown(e.button,e.offsetX,e.offsetY)},this.video.onmouseup=function(e){t.emitMouseUp(e.button,e.offsetX,e.offsetY)},this.video.oncontextmenu=function(e){e.preventDefault()},"onmousewheel"in this.video?this.video.onmousewheel=function(e){t.emitMouseWheel(e.wheelDelta,e.offsetX,e.offsetY)}:this.video.onDOMMouseScroll=function(e){t.emitMouseWheel(-120*e.detail,e.offsetX,e.offsetY)},this.video.pressMouseButtons=function(e){t.pressMouseButtons(e.buttons,e.offsetX,e.offsetY)},this.video.releaseMouseButtons=function(e){t.releaseMouseButtons(e.buttons,e.offsetX,e.offsetY)}}}),Object.defineProperty(this,"registerLockedMouseEvents",{enumerable:!0,configurable:!0,writable:!0,value:(e=1)=>{let n=this;if(1!==e)document.removeEventListener("pointerlockchange",i,!1),document.removeEventListener("mozpointerlockchange",i,!1),document.removeEventListener("mousemove",o,!1);else{let t=this.video.width/2,r=this.video.height/2;function i(){document.pointerLockElement===n.video||document.mozPointerLockElement===n.video?(n.allLevelLog("Pointer locked"),document.addEventListener("mousemove",o,!1)):(n.allLevelLog("The pointer lock status is now unlocked"),document.removeEventListener("mousemove",o,!1))}function o(e){t+=e.movementX,r+=e.movementY,t>n.styleWidth&&(t-=n.styleWidth),r>n.styleHeight&&(r-=n.styleHeight),t<0&&(t=n.styleWidth+t),r<0&&(r=n.styleHeight-r),n.emitMouseMove(t,r,e.movementX,e.movementY)}this.video.requestPointerLock=this.video.requestPointerLock||this.video.mozRequestPointerLock,document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock,this.video.onclick=function(){this.video.requestPointerLock()},document.addEventListener("pointerlockchange",i,!1),document.addEventListener("mozpointerlockchange",i,!1),this.video.onmousedown=function(e){n.setVideoUnmutedWhenUserInteraction(),n.emitMouseDown(e.button,t,r)},this.video.onmouseup=function(e){n.emitMouseUp(e.button,t,r)},this.video.onmousewheel=function(e){n.emitMouseWheel(e.wheelDelta,t,r)},this.video.pressMouseButtons=function(e){n.pressMouseButtons(e.buttons,t,r)},this.video.releaseMouseButtons=function(e){n.releaseMouseButtons(e.buttons,t,r)}}}}),Object.defineProperty(this,"setupHtmlEvents",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e=this;window.addEventListener("resize",e.resizePlayerStyle,!1),window.addEventListener("orientationchange",e.orientationChanged,!1),window.addEventListener("fullscreenchange",e.resizePlayerStyle,!1),window.addEventListener("mozfullscreenchange",e.resizePlayerStyle,!1),window.addEventListener("MSFullscreenChange",e.resizePlayerStyle,!1),window.addEventListener("webkitfullscreenchange",e.resizePlayerStyle,!1),window.addEventListener("touchmove",e.touchemoveAction,{passive:!1}),window.addEventListener("unload",e.handleUnloadAct,!1)}}),Object.defineProperty(this,"handleUnloadAct",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.cloudApiLog("Page Unloaded",e),this.sendInputData(new Uint8Array([x.StopStreaming]).buffer)}}),Object.defineProperty(this,"ChineseCompositionStartEvent",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.cpLock=!0}}),Object.defineProperty(this,"ChineseCompositionEndEvent",{enumerable:!0,configurable:!0,writable:!0,value:e=>{navigator.userAgent.indexOf("Firefox")<=-1&&this.emitDescriptor(x.compositionend,e.data,1),this.cpLock=!1}}),Object.defineProperty(this,"ChineseChangeEvent",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.cpLock||null===e.data||this.emitDescriptor(x.compositionend,e.data,1)}}),Object.defineProperty(this,"onClientConfig",{enumerable:!0,configurable:!0,writable:!0,value:()=>{if(this.clientConfigFlag)this.cloudApiLog("ERROR: clientConfigFlag:",this.clientConfigFlag);else switch(this.setupWebRtcPlayer(),this.registerInputs(),this.createWebRtcOffer(),this.setupNormalizeAndQuantize(),ar.controlScheme){case or.HoveringMouse:this.registerHoveringMouseEvents();break;case or.LockedMouse:this.registerLockedMouseEvents();break;default:this.cloudApiLog("ERROR: Unknown control scheme "+ar.controlScheme),this.registerLockedMouseEvents()}}}),Object.defineProperty(this,"startPlay",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let t=this;var e;this.webRtcPlayerObj&&this.video&&(e=this.video.play(),this.onHandleCallbackFunc("onVideoStreamLoaded"),this.fullscreenBool&&this.startFullScreen(),e.then(()=>{navigator.userAgent.match(/(51Browser|51CloudClient)/i)&&(t.video.muted=!1),"SP"===t.deviceType&&t.video.addEventListener("touchstart",t.focusInputForSP,!1),t.is_playing=!0}).catch(e=>{t.cloudApiLog("video play error:",e)}))}}),Object.defineProperty(this,"focusInputForSP",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.spKeyBool?this.playerInputDom&&this.playerInputDom.focus():this.playerInputDom&&this.playerInputDom.blur()}}),Object.defineProperty(this,"setupWebRtcPlayer",{enumerable:!0,configurable:!0,writable:!0,value:()=>{let n=this;this.webRtcPlayerObj=new be(this.video),7===this.debugMode&&this.webRtcPlayerObj.setLogMode(!0),this.webRtcPlayerObj.setPeerConnectionOptions({peerConnectionOptions:this.clientConfig.peerConnectionOptions}),this.video.addEventListener("loadedmetadata",function(e){n.onVideoInitialised()},!0),this.video.addEventListener("pause",function(e){n.onVideoPaused()},!0),this.video.addEventListener("resize",function(e){n.highLevelLog(`video resolution resized to ${e.target.videoWidth}x`+e.target.videoHeight),n.setupNormalizeAndQuantize()}),this.webRtcPlayerObj.onWebRtcOffer=e=>{n.socket.emit("offer",e)},this.webRtcPlayerObj.onWebRtcIceRestart=e=>{n.socket.emit("iceRestart",e)},this.webRtcPlayerObj.onWebRtcCandidate=e=>{n.socket.emit("iceCandidate",e)},this.webRtcPlayerObj.onDataChannelConnected=()=>{this.onHandleCallbackFunc("onDataChannelConnectedLoading")},this.webRtcPlayerObj.onPeerConnectionDisconnected=()=>{this.is_playing=!1,this.onHandleCallbackFunc("onWebRtcDisconnected")},this.webRtcPlayerObj.onPeerConnectionConnected=()=>{n.socket&&n.reconnect_rtc&&(n.reconnect_rtc=!1)},this.webRtcPlayerObj.onRTCFailed=e=>{this.is_playing=!1,this.onHandleCallbackFunc("onRTCFailed",e)},this.webRtcPlayerObj.onDataChannelMessage=r=>c(this,void 0,void 0,function*(){let t=r;r instanceof Blob&&(t=yield r.arrayBuffer());var e=new Uint8Array(t);if(n.highLevelLog("==================== message data ==================",e),e[0]===k.Response){let e=new TextDecoder("utf-16").decode(t.slice(1));n.onHandleCallbackFunc("onResponseCallback",e)}else if(e[0]===k.focusKeyboard){let e=JSON.parse(new TextDecoder("utf-16").decode(t.slice(1)));n.playerInputDom&&(n.playerInputDom.value="",n.playerInputDom.style.left=e.x+"px",n.playerInputDom.style.top=e.y+"px",n.playerInputDom.style.width=e.w+"px",n.playerInputDom.style.height=e.h+"px",!0===e.showOnScreenKeyboard?(n.playerInputDom.focus(),n.spKeyBool=!0):(n.playerInputDom.blur(),n.spKeyBool=!1))}else if(e[0]===k.WarningAndError){let e=JSON.parse(new TextDecoder("utf-16").decode(t.slice(5)));console.error("onUEWarningOrError",e),n.onHandleCallbackFunc("onUEWarningOrError",e)}}),this.webRtcPlayerObj.onLargeDataChannelMessage=r=>c(this,void 0,void 0,function*(){let t=r;r instanceof Blob&&(t=yield r.arrayBuffer());var e=new Uint8Array(t);if(n.highLevelLog("==================== large message data ==================",e),e[0]===k.LargeDataStart&&(this.recevieBigDataMessageString=""),e[0]===k.LargeDataStart||e[0]===k.LargeData||e[0]===k.LargeDataEnd){let e=new TextDecoder("utf-16").decode(t.slice(5));this.recevieBigDataMessageString+=e}e[0]===k.LargeDataEnd&&(n.onHandleCallbackFunc("onLargeDataCallback",this.recevieBigDataMessageString),this.recevieBigDataMessageString="")})}}),Object.defineProperty(this,"createWebRtcOffer",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.webRtcPlayerObj?(this.highLevelLog("Creating offer"),this.webRtcPlayerObj.createOffer(),this.onHandleCallbackFunc("onCreateOffer")):this.cloudApiLog("WebRTC player not setup, cannot create offer")}}),Object.defineProperty(this,"reconenctWebRtc",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.reconnect_rtc=!0,this.closeWebRtc(),setTimeout(this.onClientConfig,1e3)}}),Object.defineProperty(this,"closeWebRtc",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.webRtcPlayerObj&&(this.webRtcPlayerObj.close(),this.webRtcPlayerObj=null,this.clientConfigFlag=!1,this.removeEvents())}}),Object.defineProperty(this,"onVideoInitialised",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.startPlay(),this.resizePlayerStyle(),this.onHandleCallbackFunc("onVideoReady")}}),Object.defineProperty(this,"onVideoPaused",{enumerable:!0,configurable:!0,writable:!0,value:()=>{!this.socket||this.reconnect_rtc||(this.socket.close(),this.socket=null)}}),Object.defineProperty(this,"touchemoveAction",{enumerable:!0,configurable:!0,writable:!0,value:e=>{1!==e.scale&&e.preventDefault()}}),Object.defineProperty(this,"setVideoUnmutedWhenUserInteraction",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.is_playing&&!this.set_video_unmuted_once&&this.video&&(this.video.muted=!1,this.set_video_unmuted_once=!0)}}),Object.defineProperty(this,"setRendererMode",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>{this.cloudApiLog("mode: "+e),t&&this.highLevelLog("resolution",t),"fixed"===(this.rendererMode=e)&&t&&2===t.length&&(this.width=t[0],this.height=t[1],this.cloudApiLog(`fixed resolution: ${this.width}X`+this.height)),this.resizePlayerStyle()}}),Object.defineProperty(this,"orientationChanged",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.screenAngle=window.orientation,this.resizePlayerStyle()}}),Object.defineProperty(this,"resizePlayerStyle",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e,t;this.playerDom&&this.webRtcPlayerObj&&(this.deviceLock?(this.cloudApiLog("Device Rotation:",this.screenAngle),0==this.screenAngle||180==this.screenAngle?(this.playerDom.style.transform="rotateZ(90deg) translate(0, -100vw)",this.playerDom.style.transformOrigin="0% 0%",this.playerDom.style.width="100vh",this.playerDom.style.height="100vw",this.onHandleCallbackFunc("onDeviceRotated")):90!=this.screenAngle&&-90!=this.screenAngle||(this.playerDom.style.transform="rotateZ(0deg)",this.playerDom.style.width="100vw",this.playerDom.style.height="100vh",this.onHandleCallbackFunc("onDeviceRotated"))):this.onHandleCallbackFunc("onResizedFinished"),e="fixed"===this.rendererMode?this.width:this.playerDom.clientWidth,t="fixed"===this.rendererMode?this.height:this.playerDom.clientHeight,this.setResolution(e,t),this.setupNormalizeAndQuantize())}}),Object.defineProperty(this,"setupNormalizeAndQuantize",{enumerable:!0,configurable:!0,writable:!0,value:()=>{if(this.playerDom&&this.video){var e=this.video.videoHeight/this.video.videoWidth,t=this.playerDom.clientHeight/this.playerDom.clientWidth;if(e videoAspectRatio");let r=t/e;this.normalizeAndQuantizeUnsigned=(e,t)=>{e=this.playerDom?e/this.playerDom.clientWidth:0,t=this.playerDom?r*(t/this.playerDom.clientHeight-.5)+.5:0;return e<0||1({x:32767*(this.playerDom?e/(.5*this.playerDom.clientWidth):0),y:32767*(this.playerDom?r*t/(.5*this.playerDom.clientHeight):0)})}else{this.highLevelLog("Setup Normalize and Quantize for playerAspectRatio <= videoAspectRatio");let r=e/t;this.normalizeAndQuantizeUnsigned=(e,t)=>{e=this.playerDom?r*(e/this.playerDom.clientWidth-.5)+.5:0,t=this.playerDom?t/this.playerDom.clientHeight:0;return e<0||1({x:32767*(this.playerDom?r*e/(.5*this.playerDom.clientWidth):0),y:32767*(this.playerDom?t/(.5*this.playerDom.clientHeight):0)})}}}}),Object.defineProperty(this,"emitMouseMove",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,r,n)=>{this.allLevelLog(`x: ${e}, y:${t}, dX: ${r}, dY: `+n);e=this.normalizeAndQuantizeUnsigned(e,t),t=this.normalizeAndQuantizeSigned(r,n),r=new DataView(new ArrayBuffer(9));r.setUint8(0,x.MouseMove),r.setUint16(1,e.x,!0),r.setUint16(3,e.y,!0),r.setInt16(5,t.x,!0),r.setInt16(7,t.y,!0),this.sendInputData(r.buffer)}}),Object.defineProperty(this,"emitMouseDown",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,r)=>{this.allLevelLog(`mouse button ${e} down at (${t}, ${r})`);t=this.normalizeAndQuantizeUnsigned(t,r),r=new DataView(new ArrayBuffer(6));r.setUint8(0,x.MouseDown),r.setUint8(1,e),r.setUint16(2,t.x,!0),r.setUint16(4,t.y,!0),this.sendInputData(r.buffer)}}),Object.defineProperty(this,"emitMouseUp",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,r)=>{this.allLevelLog(`mouse button ${e} up at (${t}, ${r})`);t=this.normalizeAndQuantizeUnsigned(t,r),r=new DataView(new ArrayBuffer(6));r.setUint8(0,x.MouseUp),r.setUint8(1,e),r.setUint16(2,t.x,!0),r.setUint16(4,t.y,!0),this.sendInputData(r.buffer)}}),Object.defineProperty(this,"emitMouseWheel",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,r)=>{this.allLevelLog(`mouse wheel with delta ${e} at (${t}, ${r})`);t=this.normalizeAndQuantizeUnsigned(t,r),r=new DataView(new ArrayBuffer(7));r.setUint8(0,x.MouseWheel),r.setInt16(1,e,!0),r.setUint16(3,t.x,!0),r.setUint16(5,t.y,!0),this.sendInputData(r.buffer)}}),Object.defineProperty(this,"releaseMouseButtons",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,r)=>{e&lr.PrimaryButton&&this.emitMouseUp(sr.MainButton,t,r),e&lr.SecondaryButton&&this.emitMouseUp(sr.SecondaryButton,t,r),e&lr.AuxiliaryButton&&this.emitMouseUp(sr.AuxiliaryButton,t,r)}}),Object.defineProperty(this,"pressMouseButtons",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,r)=>{e&lr.PrimaryButton&&this.emitMouseDown(sr.MainButton,t,r),e&lr.SecondaryButton&&this.emitMouseDown(sr.SecondaryButton,t,r),e&lr.AuxiliaryButton&&this.emitMouseDown(sr.AuxiliaryButton,t,r)}}),Object.defineProperty(this,"sendPlayerType",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.socket&&this.socket.emit("playerType",this.playerType)}}),Object.defineProperty(this,"sendUserConfig",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e=JSON.stringify({emitData:"ArrayBuffer"});this.highLevelLog("userConfig = "+e),this.socket.emit("userConfig",e)}}),Object.defineProperty(this,"sendWindowSize",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e,t;this.socket&&(e=window.devicePixelRatio*window.innerWidth,this.cloudApiLog(e+"|"+(t=window.devicePixelRatio*window.innerHeight)),this.socket.emit("windowSize",e,t))}}),Object.defineProperty(this,"sendResized",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>{this.socket&&this.socket.emit("resized",e,t)}}),Object.defineProperty(this,"updateVideoStreamSize",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null);var[e,t]=e?[e.width,e.height]:[this.playerDom?this.playerDom.clientWidth:0,this.playerDom?this.playerDom.clientHeight:0],r={Resolution:{Width:e,Height:t}};this.emitCommand(r),this.cloudApiLog("stream resolution:",r),this.lastTimeResized=(new Date).getTime(),this.sendResized(e,t)}}),Object.defineProperty(this,"emitUIInteraction",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.emitDescriptor(x.UIInteraction,e)}}),Object.defineProperty(this,"emitCommand",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.emitDescriptor(x.Command,e)}}),Object.defineProperty(this,"emitMaxFpsRequest",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.emitDescriptor(x.MaxFpsRequest,{})}}),Object.defineProperty(this,"emitDescriptor",{enumerable:!0,configurable:!0,writable:!0,value:(e,t,r=0)=>{var n="",n=0===r?JSON.stringify(t):t,i=new DataView(new ArrayBuffer(5+2*n.length));let o=0;i.setUint8(o,e),o++,i.setUint32(o,n.length,!0),o+=4;for(let e=0;e{var r=t,n=new DataView(new ArrayBuffer(5+2*r.length));let i=0;n.setUint8(i,e),i++,n.setUint32(i,r.length,!0),i+=4;for(let e=0;e{var r=t,n=new DataView(new ArrayBuffer(5+r.length));let i=0;n.setUint8(i,e),i++,n.setUint32(i,r.length,!0),i+=4;for(let e=0;e{this.webRtcPlayerObj&&this.webRtcPlayerObj.send(e)}}),Object.defineProperty(this,"sendMaxResolution",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e;this.socket&&(e={screenWidth:window.screen.width,screenHeight:window.screen.height,pixelRatio:window.devicePixelRatio,maxWidth:window.screen.width*window.devicePixelRatio,maxHeight:window.screen.height*window.devicePixelRatio,userAgent:navigator.userAgent},this.highLevelLog("Device Screen Info:",e),this.highLevelLog(`Window Screen Size: ${e.screenWidth} X `+e.screenHeight),this.highLevelLog("Window devicePixelRatio=======: "+e.pixelRatio),this.socket.emit("maxResolution",e))}}),Object.defineProperty(this,"sendLargeDataAction",{enumerable:!0,configurable:!0,writable:!0,value:(n,e,t)=>{let i=this;void 0===this.sendQueue&&(this.sendQueue=[]);var r={};if(r.progressCallback=t,r.data=e,this.sendQueue.push(r),0{this.callbackEvents.push(...e)}}),Object.defineProperty(this,"registerEvent",{enumerable:!0,configurable:!0,writable:!0,value:e=>{e.forEach(e=>{this.callbacks.set(e.name,e)})}}),Object.defineProperty(this,"unRegisterEvent",{enumerable:!0,configurable:!0,writable:!0,value:e=>{e.forEach(e=>{this.callbacks.delete(e)})}}),Object.defineProperty(this,"unRegisterEvents",{enumerable:!0,configurable:!0,writable:!0,value:e=>{e.forEach(t=>{var e=this.callbackEvents.findIndex(e=>e.name==t);0<=e&&this.callbackEvents.splice(e,1)})}}),Object.defineProperty(this,"onHandleCallbackFunc",{enumerable:!0,configurable:!0,writable:!0,value:(t,r=null)=>{this.highLevelLog("callback event",t,r);var e=this.callbacks.get(t),n=this.callbacks.get(t+"_system"),i=this.callbackEvents.filter(e=>e.name===t);e&&n?0{e.func(r)}),e.func(r)):!e&&n&&(0{this.keyboardActive=e}}),Object.defineProperty(this,"setDefaultBrowserFunctionKeyboard",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.browserFuncKey=e}}),Object.defineProperty(this,"setFullScreen",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.fullscreenBool=e}}),Object.defineProperty(this,"startFullScreen",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e;null!=(e=this.playerDom)&&e.requestFullscreen?this.playerDom.requestFullscreen():null!=(e=this.playerDom)&&e.mozRequestFullScreen?this.playerDom.mozRequestFullScreen():null!=(e=this.playerDom)&&e.webkitRequestFullscreen?this.playerDom.webkitRequestFullscreen():null!=(e=this.playerDom)&&e.msRequestFullscreen&&this.playerDom.msRequestFullscreen()}}),Object.defineProperty(this,"exitFullScreen",{enumerable:!0,configurable:!0,writable:!0,value:()=>{var e;null!=(e=this.playerDom)&&e.exitFullscreen?this.playerDom.exitFullscreen():null!=(e=this.playerDom)&&e.mozCancelFullScreen?this.playerDom.mozCancelFullScreen():null!=(e=this.playerDom)&&e.webkitCancelFullScreen?this.playerDom.webkitCancelFullScreen():null!=(e=this.playerDom)&&e.msExitFullscreen&&this.playerDom.msExitFullscreen()}}),this.id=e.id,this.taskId=null,this.playerDom=null,this.playDomDefault={w:void 0,h:void 0},this.rendererio=null,this.rendererPath=null,this.playerType=0,this.playerInputDom=null,this.cpLock=!1,this.socket=null,this.clientConfig=null,this.clientConfigFlag=!1,this.resizeTimeout=null,this.lastTimeResized=(new Date).getTime(),this.styleWidth=0,this.styleHeight=0,this.styleTop=0,this.styleLeft=0,this.styleCursor="default",this.stylePosition="relative",this.is_playing=!1,this.normalizeAndQuantizeUnsigned=null,this.normalizeAndQuantizeSigned=null,this._orientationChangeTimeout=null,this.recevieBigDataMessageString="",this.recevieBigDataArray=[],this.reconnect_rtc=!1,this.set_video_unmuted_once=!1,this.sendQueue=[],this.progressCallback=null,this.sendPosition=0,this.sendBufferData=null,void 0!==((this.sendIntervalId=null)==e?void 0:e.debugMode)&&this.setDebugMode(e.debugMode),this.keyboardActive=void 0!==(null==(t=null==e?void 0:e.keyboard)?void 0:t.normal)&&e.keyboard.normal,this.browserFuncKey=void 0!==(null==(t=null==e?void 0:e.keyboard)?void 0:t.func)&&e.keyboard.func,this.deviceLock=void 0!==(null==e?void 0:e.lock)&&e.lock,this.fullscreenBool=void 0!==(null==e?void 0:e.fullscreen)&&e.fullscreen,this.initShow=void 0===(null==e?void 0:e.initLog)||e.initLog,this.initShow&&this.initLogInfo()}mergeArrayBuffer(t){let r=0;for(let e of t)r+=e.byteLength;let n=new Uint8Array(r),i=0;for(let e of t)for(let t of[e]){let e=new Uint8Array(t);n.set(e,i),i+=t.byteLength}return n.buffer}}}(),WdpApi=function(V){function m(e,a,s,l){return new(s=s||Promise)(function(r,t){function n(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}o((l=l.apply(e,a||[])).next())})}var _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N={exports:{}},U=N,F=N.exports,B=(function(){var Mo,ko="Expected a function",ca="__lodash_hash_undefined__",da="__lodash_placeholder__",xo=9007199254740991,Vo=4294967295,ha=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],_o="[object Arguments]",ma="[object Array]",Lo="[object Boolean]",No="[object Date]",ga="[object Error]",fa="[object Function]",va="[object GeneratorFunction]",Uo="[object Map]",Fo="[object Number]",Bo="[object Object]",ya="[object Promise]",Wo="[object RegExp]",Ho="[object Set]",$o="[object String]",pa="[object Symbol]",qo="[object WeakMap]",zo="[object ArrayBuffer]",Zo="[object DataView]",ba="[object Float32Array]",Ea="[object Float64Array]",wa="[object Int8Array]",Sa="[object Int16Array]",Ca="[object Int32Array]",ja="[object Uint8Array]",Ia="[object Uint8ClampedArray]",Ga="[object Uint16Array]",Oa="[object Uint32Array]",Ta=/\b__p \+= '';/g,Aa=/\b(__p \+=) '' \+/g,Ra=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Pa=/&(?:amp|lt|gt|quot|#39);/g,Da=/[&<>"']/g,Ma=RegExp(Pa.source),ka=RegExp(Da.source),xa=/<%-([\s\S]+?)%>/g,Va=/<%([\s\S]+?)%>/g,_a=/<%=([\s\S]+?)%>/g,La=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Na=/^\w*$/,Ua=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fa=/[\\^$.*+?()[\]{}|]/g,Ba=RegExp(Fa.source),Wa=/^\s+/,o=/\s/,Ha=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$a=/\{\n\/\* \[wrapped with (.+)\] \*/,qa=/,? & /,za=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Za=/[()=,{}\[\]\/\s]/,Ya=/\\(\\)?/g,Ja=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ka=/\w*$/,Qa=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,es=/^\[object .+?Constructor\]$/,ts=/^0o[0-7]+$/i,rs=/^(?:0|[1-9]\d*)$/,ns=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,is=/($^)/,os=/['\n\r\u2028\u2029\\]/g,a="\\ud800-\\udfff",s="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",l="\\u2700-\\u27bf",e="a-z\\xdf-\\xf6\\xf8-\\xff",t="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",c="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+a+"]",d="["+c+"]",h="["+s+"]",m="["+l+"]",g="["+e+"]",c="[^"+a+c+"\\d+"+l+e+t+"]",l="\\ud83c[\\udffb-\\udfff]",e="[^"+a+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",n="[\\ud800-\\udbff][\\udc00-\\udfff]",t="["+t+"]",v="\\u200d",y="(?:"+g+"|"+c+")",c="(?:"+t+"|"+c+")",p="(?:['’](?:d|ll|m|re|s|t|ve))?",b="(?:['’](?:D|LL|M|RE|S|T|VE))?",E="(?:"+h+"|"+l+")?",w="["+u+"]?",w=w+E+"(?:"+v+"(?:"+[e,f,n].join("|")+")"+w+E+")*",E="(?:"+[m,f,n].join("|")+")"+w,m="(?:"+[e+h+"?",h,f,n,r].join("|")+")",as=RegExp("['’]","g"),ss=RegExp(h,"g"),S=RegExp(l+"(?="+l+")|"+m+w,"g"),ls=RegExp([t+"?"+g+"+"+p+"(?="+[d,t,"$"].join("|")+")",c+"+"+b+"(?="+[d,t+y,"$"].join("|")+")",t+"?"+y+"+"+p,t+"+"+b,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",E].join("|"),"g"),C=RegExp("["+v+a+s+u+"]"),us=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cs=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ds=-1,Yo={},Jo=(Yo[ba]=Yo[Ea]=Yo[wa]=Yo[Sa]=Yo[Ca]=Yo[ja]=Yo[Ia]=Yo[Ga]=Yo[Oa]=!0,Yo[_o]=Yo[ma]=Yo[zo]=Yo[Lo]=Yo[Zo]=Yo[No]=Yo[ga]=Yo[fa]=Yo[Uo]=Yo[Fo]=Yo[Bo]=Yo[Wo]=Yo[Ho]=Yo[$o]=Yo[qo]=!1,{}),j=(Jo[_o]=Jo[ma]=Jo[zo]=Jo[Zo]=Jo[Lo]=Jo[No]=Jo[ba]=Jo[Ea]=Jo[wa]=Jo[Sa]=Jo[Ca]=Jo[Uo]=Jo[Fo]=Jo[Bo]=Jo[Wo]=Jo[Ho]=Jo[$o]=Jo[pa]=Jo[ja]=Jo[Ia]=Jo[Ga]=Jo[Oa]=!0,Jo[ga]=Jo[fa]=Jo[qo]=!1,{"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"}),hs=parseFloat,ms=parseInt,e="object"==typeof _&&_&&_.Object===Object&&_,f="object"==typeof self&&self&&self.Object===Object&&self,Ko=e||f||Function("return this")(),n=F&&!F.nodeType&&F,i=n&&!U.nodeType&&U,gs=i&&i.exports===n,I=gs&&e.process,r=function(){try{return i&&i.require&&i.require("util").types||I&&I.binding&&I.binding("util")}catch(e){}}(),fs=r&&r.isArrayBuffer,vs=r&&r.isDate,ys=r&&r.isMap,ps=r&&r.isRegExp,bs=r&&r.isSet,Es=r&&r.isTypedArray;function Qo(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function ws(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i":">",'"':""","'":"'"});function Hs(e){return"\\"+j[e]}function oa(e){return C.test(e)}function $s(e){var r=-1,n=Array(e.size);return e.forEach(function(e,t){n[++r]=[t,e]}),n}function qs(t,r){return function(e){return t(r(e))}}function aa(e,t){for(var r=-1,n=e.length,i=0,o=[];++r",""":'"',"'":"'"}),ua=function i(e){var R=(e=null==e?Ko:ua.defaults(Ko.Object(),e,ua.pick(Ko,cs))).Array,_=e.Date,L=e.Error,N=e.Function,U=e.Math,y=e.Object,F=e.RegExp,B=e.String,P=e.TypeError,W=R.prototype,H=N.prototype,$=y.prototype,q=e["__core-js_shared__"],z=H.toString,p=$.hasOwnProperty,Z=0,Y=(H=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",J=$.toString,K=z.call(y),Q=Ko._,X=F("^"+z.call(p).replace(Fa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=gs?e.Buffer:Mo,t=e.Symbol,ee=e.Uint8Array,te=H?H.allocUnsafe:Mo,re=qs(y.getPrototypeOf,y),ne=y.create,ie=$.propertyIsEnumerable,oe=W.splice,ae=t?t.isConcatSpreadable:Mo,se=t?t.iterator:Mo,le=t?t.toStringTag:Mo,ue=function(){try{var e=Wr(y,"defineProperty");return e({},"",{}),e}catch(e){}}(),ce=e.clearTimeout!==Ko.clearTimeout&&e.clearTimeout,de=_&&_.now!==Ko.Date.now&&_.now,he=e.setTimeout!==Ko.setTimeout&&e.setTimeout,me=U.ceil,ge=U.floor,fe=y.getOwnPropertySymbols,H=H?H.isBuffer:Mo,ve=e.isFinite,ye=W.join,pe=qs(y.keys,y),D=U.max,M=U.min,be=_.now,Ee=e.parseInt,we=U.random,Se=W.reverse,_=Wr(e,"DataView"),Ce=Wr(e,"Map"),je=Wr(e,"Promise"),Ie=Wr(e,"Set"),e=Wr(e,"WeakMap"),Ge=Wr(y,"create"),Oe=e&&new e,Te={},Ae=fn(_),Re=fn(Ce),Pe=fn(je),De=fn(Ie),Me=fn(e),t=t?t.prototype:Mo,ke=t?t.valueOf:Mo,xe=t?t.toString:Mo;function g(e){if(o(e)&&!C(e)&&!(e instanceof v)){if(e instanceof f)return e;if(p.call(e,"__wrapped__"))return vn(e)}return new f(e)}var Ve=function(e){if(!I(e))return{};if(ne)return ne(e);_e.prototype=e;e=new _e;return _e.prototype=Mo,e};function _e(){}function Le(){}function f(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=Mo}function v(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Vo,this.__views__=[]}function Ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=u?c:c*("desc"==i[o]?-1:1)}return r.index-n.index});r--;)t[r]=t[r].value;return t}function Dt(e,t,r){for(var n=-1,i=t.length,o={};++n>>0,t>>>=0;for(var o=R(i);++n>>1,a=e[o];null!==a&&!G(a)&&(r?a<=t:a>>0)?(e=T(e))&&("string"==typeof t||null!=t&&!bi(t))&&!(t=u(t))&&oa(e)?tr(la(e),0,r):e.split(t,r):[]},g.spread=function(r,n){if("function"!=typeof r)throw new P(ko);return n=null==n?0:D(k(n),0),a(function(e){var t=e[n],e=tr(e,0,n);return t&&ra(e,t),Qo(r,this,e)})},g.tail=function(e){var t=null==e?0:e.length;return t?s(e,1,t):[]},g.take=function(e,t,r){return e&&e.length?s(e,0,(t=r||t===Mo?1:k(t))<0?0:t):[]},g.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?s(e,(t=n-(r||t===Mo?1:k(t)))<0?0:t,n):[]},g.takeRightWhile=function(e,t){return e&&e.length?zt(e,c(t,3),!1,!0):[]},g.takeWhile=function(e,t){return e&&e.length?zt(e,c(t,3)):[]},g.tap=function(e,t){return t(e),e},g.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new P(ko);return I(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ei(e,t,{leading:n,maxWait:t,trailing:i})},g.thru=Vn,g.toArray=Ii,g.toPairs=qi,g.toPairsIn=zi,g.toPath=function(e){return C(e)?ta(e,gn):G(e)?[e]:S(mn(T(e)))},g.toPlainObject=Ti,g.transform=function(e,n,i){var t,r=C(e),o=r||di(e)||Si(e);return n=c(n,4),null==i&&(t=e&&e.constructor,i=o?r?new t:[]:I(e)&&mi(t)?Ve(re(e)):{}),(o?Xo:ut)(e,function(e,t,r){return n(i,e,t,r)}),i},g.unary=function(e){return Jn(e,1)},g.union=jn,g.unionBy=In,g.unionWith=Gn,g.uniq=function(e){return e&&e.length?Ht(e):[]},g.uniqBy=function(e,t){return e&&e.length?Ht(e,c(t,2)):[]},g.uniqWith=function(e,t){return t="function"==typeof t?t:Mo,e&&e.length?Ht(e,Mo,t):[]},g.unset=function(e,t){return null==e||$t(e,t)},g.unzip=On,g.unzipWith=Tn,g.update=function(e,t,r){return null==e?e:qt(e,t,Qt(r))},g.updateWith=function(e,t,r,n){return n="function"==typeof n?n:Mo,null==e?e:qt(e,t,Qt(r),n)},g.values=Zi,g.valuesIn=function(e){return null==e?[]:Ls(e,x(e))},g.without=An,g.words=oo,g.wrap=function(e,t){return ii(Qt(t),e)},g.xor=Rn,g.xorBy=Pn,g.xorWith=Dn,g.zip=Mn,g.zipObject=function(e,t){return Jt(e||[],t||[],qe)},g.zipObjectDeep=function(e,t){return Jt(e||[],t||[],_t)},g.zipWith=kn,g.entries=qi,g.entriesIn=zi,g.extend=Ri,g.extendWith=Pi,fo(g,g),g.add=Go,g.attempt=ao,g.camelCase=Yi,g.capitalize=Ji,g.ceil=Oo,g.clamp=function(e,t,r){return r===Mo&&(r=t,t=Mo),r!==Mo&&(r=(r=O(r))==r?r:0),t!==Mo&&(t=(t=O(t))==t?t:0),Qe(O(e),t,r)},g.clone=function(e){return b(e,4)},g.cloneDeep=function(e){return b(e,5)},g.cloneDeepWith=function(e,t){return b(e,5,t="function"==typeof t?t:Mo)},g.cloneWith=function(e,t){return b(e,4,t="function"==typeof t?t:Mo)},g.conformsTo=function(e,t){return null==t||Xe(e,t,A(t))},g.deburr=Ki,g.defaultTo=function(e,t){return null==e||e!=e?t:e},g.divide=To,g.endsWith=function(e,t,r){e=T(e),t=u(t);var n=e.length,n=r=r===Mo?n:Qe(k(r),0,n);return 0<=(r-=t.length)&&e.slice(r,n)==t},g.eq=h,g.escape=function(e){return(e=T(e))&&ka.test(e)?e.replace(Da,Ws):e},g.escapeRegExp=function(e){return(e=T(e))&&Ba.test(e)?e.replace(Fa,"\\$&"):e},g.every=function(e,t,r){return(C(e)?Ss:it)(e,c(t=r&&d(e,t,r)?Mo:t,3))},g.find=Nn,g.findIndex=yn,g.findKey=function(e,t){return Ts(e,c(t,3),ut)},g.findLast=Un,g.findLastIndex=pn,g.findLastKey=function(e,t){return Ts(e,c(t,3),ct)},g.floor=Ao,g.forEach=Fn,g.forEachRight=Bn,g.forIn=function(e,t){return null==e?e:st(e,c(t,3),x)},g.forInRight=function(e,t){return null==e?e:lt(e,c(t,3),x)},g.forOwn=function(e,t){return e&&ut(e,c(t,3))},g.forOwnRight=function(e,t){return e&&ct(e,c(t,3))},g.get=Vi,g.gt=si,g.gte=li,g.has=function(e,t){return null!=e&&qr(e,t,ft)},g.hasIn=_i,g.head=En,g.identity=V,g.includes=function(e,t,r,n){e=m(e)?e:Zi(e),r=r&&!n?k(r):0;n=e.length;return r<0&&(r=D(n+r,0)),wi(e)?r<=n&&-1=M(t=t,r=r)&&e=this.__values__.length;return{done:e,value:e?Mo:this.__values__[this.__index__++]}},g.prototype.plant=function(e){for(var t,r=this;r instanceof Le;)var n=vn(r),i=(n.__index__=0,n.__values__=Mo,t?i.__wrapped__=n:t=n,n),r=r.__wrapped__;return i.__wrapped__=e,t},g.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof v?(e=e,(e=(e=this.__actions__.length?new v(this):e).reverse()).__actions__.push({func:Vn,args:[Cn],thisArg:Mo}),new f(e,this.__chain__)):this.thru(Cn)},g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=function(){return Zt(this.__wrapped__,this.__actions__)},g.prototype.first=g.prototype.head,se&&(g.prototype[se]=function(){return this}),g}();i?((i.exports=ua)._=ua,n._=ua):Ko._=ua}.call(_),N.exports);let W=new Map;function H(r,n){return function(){for(var e=new Array(arguments.length),t=0;te.length)&&(r=e.length),r-=t.length;e=e.indexOf(t,r);return-1!==e&&e===r},toArray:function(e){if(!e)return null;var t=e.length;if(K(t))return null;for(var r=new Array(t);0>18&63]+l[n>>12&63]+l[n>>6&63]+l[63&n]);return i.join("")}(e,a,s>2])+l[t<<4&63]+"==":2==n&&(i=(i=(i+=l[(t=(e[r-2]<<8)+e[r-1])>>10])+l[t>>4&63])+l[t<<2&63]+"="),o.push(i),o.join("")}function _e(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,c=-7,d=r?i-1:0,h=r?-1:1,i=e[t+d];for(d+=h,o=i&(1<<-c)-1,i>>=-c,c+=s;0>=-c,c+=n;0>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,m=n?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-a))<1&&(a--,n*=2),2<=(t+=1<=a+c?d/n:d*Math.pow(2,1-c))*n&&(a++,n/=2),u<=a+c?(s=0,a=u):1<=a+c?(s=(t*n-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));8<=i;e[r+h]=255&s,h+=m,s/=256,i-=8);for(a=a<=Fe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fe().toString(16)+" bytes");return 0|e}function d(e){return null!=e&&e._isBuffer}function Ze(e,t){if(d(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var r=(e="string"!=typeof e?""+e:e).length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return gt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ft(e).length;default:if(n)return gt(e).length;t=(""+t).toLowerCase(),n=!0}}function Ye(e,t,r){var n,i=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var o=this,a=t,s=r,l=o.length;(!s||s<0||l=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if(d(t="string"==typeof t?c.from(t,n):t))return 0===t.length?-1:Qe(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):Qe(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Qe(e,t,r,n,i){var o=1,a=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a/=o=2,s/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i)for(var u=-1,c=r;c>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}var h=n,m=h.length;if(m<=tt)return String.fromCharCode.apply(String,h);for(var g="",f=0;f"},c.prototype.compare=function(e,t,r,n,i){if(!d(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=t)return 0;if(i<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(n,i),u=e.slice(t,r),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,a,s,l,u,c=!1;;)switch(n){case"hex":var d=this,h=e,m=t,g=r,f=(m=Number(m)||0,d.length-m);if((!g||(g=Number(g))>f)&&(g=f),(f=h.length)%2!=0)throw new TypeError("Invalid hex string");f/2>8,i.push(r%256),i.push(n);return i}(e,(o=this).length-s),o,s,a);default:if(c)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;function s(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(re.length)throw new RangeError("Index out of range")}function rt(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function nt(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function it(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ot(e,t,r,n,i){return i||it(e,0,r,4),Le(e,t,r,n,23,4),r+4}function at(e,t,r,n,i){return i||it(e,0,r,8),Le(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):r=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||s(e,t,this.length);for(var n=t,i=1,o=this[e+--n];0=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||s(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||s(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},c.prototype.readInt16BE=function(e,t){t||s(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},c.prototype.readInt32LE=function(e,t){return t||s(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||s(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||s(e,4,this.length),_e(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||s(e,4,this.length),_e(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||s(e,8,this.length),_e(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||s(e,8,this.length),_e(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||h(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>8):rt(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):rt(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):nt(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):nt(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){e=+e,t|=0,n||h(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){e=+e,t|=0,n||h(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var i=r-1,o=1,a=0;for(this[t+i]=255&e;0<=--i&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):rt(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):rt(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):nt(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||h(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):nt(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return ot(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return ot(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return at(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return at(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var i,o=(n=e.length-t>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(s=t;s>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function ft(e){var t=function(e){if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(mt,"")).length<2)return"";for(var t;e.length%4!=0;)e+="=";return e}(e);ke||xe();var r,e=t.length;if(0>16&255,i[a++]=r>>8&255,i[a++]=255&r;return 2==n?(r=u[t.charCodeAt(s)]<<2|u[t.charCodeAt(s+1)]>>4,i[a++]=255&r):1==n&&(r=u[t.charCodeAt(s)]<<10|u[t.charCodeAt(s+1)]<<4|u[t.charCodeAt(s+2)]>>2,i[a++]=r>>8&255,i[a++]=255&r),i}function vt(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function yt(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function pt(){var s;return lt||(lt=1,s=a,st=function(e,o){o=o||new FormData;var t=[];function a(e){return null===e?"":s.isDate(e)?e.toISOString():s.isArrayBuffer(e)||s.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):c.from(e):e}return function n(e,i){if(s.isPlainObject(e)||s.isArray(e)){if(-1!==t.indexOf(e))throw Error("Circular reference detected in "+i);t.push(e),s.forEach(e,function(e,t){if(!s.isUndefined(e)){var r=i?i+"."+t:t;if(e&&!i&&"object"==typeof e)if(s.endsWith(t,"{}"))e=JSON.stringify(e);else if(s.endsWith(t,"[]")&&(t=s.toArray(e)))return void t.forEach(function(e){s.isUndefined(e)||o.append(r,a(e))});n(e,r)}}),t.pop()}else o.append(i,a(e))}(e),o}),st}function bt(e,t){return e&&!At(t)?Rt(e,t):t}var Et,wt,St,Ct,jt,It,Gt,Ot,Tt,At=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Rt=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e};function Pt(){if(It)return jt;It=1;var t=De();function e(e){t.call(this,null==e?"canceled":e,t.ERR_CANCELED),this.name="CanceledError"}return a.inherits(e,t,{__CANCEL__:!0}),jt=e}function Dt(r,n){Pe.forEach(r,function(e,t){t!==n&&t.toUpperCase()===n.toUpperCase()&&(r[n]=e,delete r[t])})}var g=a,Mt=De(),kt=pt(),xt={"Content-Type":"application/x-www-form-urlencoded"};function Vt(e,t){!g.isUndefined(e)&&g.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var _t,Lt,Nt,Ut,Ft,Bt,Wt,Ht,$t,f,qt,zt,Zt={transitional:ie,adapter:("undefined"==typeof XMLHttpRequest&&"[object process]"!==Object.prototype.toString.call(t)||(Kr||(Kr=1,Lt=a,Nt=function(){if(ct)return ut;ct=1;var i=De();return ut=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new i("Request failed with status code "+r.status,[i.ERR_BAD_REQUEST,i.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}}(),Ut=function(){if(ht)return dt;ht=1;var s=a;return dt=s.isStandardBrowserEnv()?{write:function(e,t,r,n,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),s.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),s.isString(n)&&a.push("path="+n),s.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){e=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}}(),Ft=ue,Bt=bt,Wt=function(){if(wt)return Et;wt=1;var i=a,o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Et=function(e){var t,r,n={};return e&&i.forEach(e.split("\n"),function(e){r=e.indexOf(":"),t=i.trim(e.substr(0,r)).toLowerCase(),r=i.trim(e.substr(r+1)),!t||n[t]&&0<=o.indexOf(t)||(n[t]="set-cookie"===t?(n[t]||[]).concat([r]):n[t]?n[t]+", "+r:r)}),n}}(),Ht=function(){if(Ct)return St;Ct=1;var t,r,n,i=a;return St=i.isStandardBrowserEnv()?(r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),t=o(window.location.href),function(e){e=i.isString(e)?o(e):e;return e.protocol===t.protocol&&e.host===t.host}):function(){return!0};function o(e){return r&&(n.setAttribute("href",e),e=n.href),n.setAttribute("href",e),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}}(),$t=ie,f=De(),qt=Pt(),zt=Ot?Gt:(Ot=1,Gt=function(e){e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return e&&e[1]||""}),Tt=function(d){return new Promise(function(t,r){var e,n=d.data,i=d.headers,o=d.responseType;function a(){d.cancelToken&&d.cancelToken.unsubscribe(e),d.signal&&d.signal.removeEventListener("abort",e)}Lt.isFormData(n)&&Lt.isStandardBrowserEnv()&&delete i["Content-Type"];var s=new XMLHttpRequest,l=(d.auth&&(l=d.auth.username||"",c=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"",i.Authorization="Basic "+btoa(l+":"+c)),Bt(d.baseURL,d.url));function u(){var e;s&&(e="getAllResponseHeaders"in s?Wt(s.getAllResponseHeaders()):null,e={data:o&&"text"!==o&&"json"!==o?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:e,config:d,request:s},Nt(function(e){t(e),a()},function(e){r(e),a()},e),s=null)}s.open(d.method.toUpperCase(),Ft(l,d.params,d.paramsSerializer),!0),s.timeout=d.timeout,"onloadend"in s?s.onloadend=u:s.onreadystatechange=function(){s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&setTimeout(u)},s.onabort=function(){s&&(r(new f("Request aborted",f.ECONNABORTED,d,s)),s=null)},s.onerror=function(){r(new f("Network Error",f.ERR_NETWORK,d,s,s)),s=null},s.ontimeout=function(){var e=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";r(new f(e=d.timeoutErrorMessage?d.timeoutErrorMessage:e,(d.transitional||$t).clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,d,s)),s=null},Lt.isStandardBrowserEnv()&&(c=(d.withCredentials||Ht(l))&&d.xsrfCookieName?Ut.read(d.xsrfCookieName):void 0)&&(i[d.xsrfHeaderName]=c),"setRequestHeader"in s&&Lt.forEach(i,function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete i[t]:s.setRequestHeader(t,e)}),Lt.isUndefined(d.withCredentials)||(s.withCredentials=!!d.withCredentials),o&&"json"!==o&&(s.responseType=d.responseType),"function"==typeof d.onDownloadProgress&&s.addEventListener("progress",d.onDownloadProgress),"function"==typeof d.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(e=function(e){s&&(r(!e||e.type?new qt:e),s.abort(),s=null)},d.cancelToken&&d.cancelToken.subscribe(e),d.signal)&&(d.signal.aborted?e():d.signal.addEventListener("abort",e));var n=n||null,c=zt(l);c&&-1===["http","https","file"].indexOf(c)?r(new f("Unsupported protocol "+c+":",f.ERR_BAD_REQUEST,d)):s.send(n)})}),_t=Tt),_t),transformRequest:[function(e,t){if(Dt(t,"Accept"),Dt(t,"Content-Type"),!(g.isFormData(e)||g.isArrayBuffer(e)||g.isBuffer(e)||g.isStream(e)||g.isFile(e)||g.isBlob(e))){if(g.isArrayBufferView(e))return e.buffer;if(g.isURLSearchParams(e))return Vt(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n,i=g.isObject(e),o=t&&t["Content-Type"];if((r=g.isFileList(e))||i&&"multipart/form-data"===o)return n=this.env&&this.env.FormData,kt(r?{"files[]":e}:e,n&&new n);if(i||"application/json"===o){Vt(t,"application/json");var a=e;if(g.isString(a))try{return(0,JSON.parse)(a),g.trim(a)}catch(a){if("SyntaxError"!==a.name)throw a}return(0,JSON.stringify)(a)}}return e}],transformResponse:[function(e){var t=this.transitional||Zt.transitional,r=t&&t.silentJSONParsing,t=t&&t.forcedJSONParsing,r=!r&&"json"===this.responseType;if(r||t&&g.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Mt.from(e,Mt.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(e){return 200<=e&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};g.forEach(["delete","get","head"],function(e){Zt.headers[e]={}}),g.forEach(["post","put","patch"],function(e){Zt.headers[e]=g.merge(xt)});var Yt,Jt,re=Zt,Kt=a,Qt=re;function Xt(){return Jt?Yt:(Jt=1,Yt=function(e){return!(!e||!e.__CANCEL__)})}function er(t,r,e){var n=this||Qt;return Kt.forEach(e,function(e){t=e.call(n,t,r)}),t}var tr=a,rr=Xt(),nr=re,ir=Pt();function or(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ir}function ar(t,r){r=r||{};var n={};function i(e,t){return v.isPlainObject(e)&&v.isPlainObject(t)?v.merge(e,t):v.isPlainObject(t)?v.merge({},t):v.isArray(t)?t.slice():t}function o(e){return v.isUndefined(r[e])?v.isUndefined(t[e])?void 0:i(void 0,t[e]):i(t[e],r[e])}function e(e){if(!v.isUndefined(r[e]))return i(void 0,r[e])}function a(e){return v.isUndefined(r[e])?v.isUndefined(t[e])?void 0:i(void 0,t[e]):i(void 0,r[e])}function s(e){return e in r?i(t[e],r[e]):e in t?i(void 0,t[e]):void 0}var l={url:e,method:e,data:e,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return v.forEach(Object.keys(t).concat(Object.keys(r)),function(e){var t=l[e]||o,r=t(e);v.isUndefined(r)&&t!==s||(n[e]=r)}),n}var sr,lr,v=a;function ur(){return lr?sr:(lr=1,sr={version:"0.27.2"})}var cr=ur().version,dr=De(),hr={},mr=(["object","boolean","number","function","string","symbol"].forEach(function(t,r){hr[t]=function(e){return typeof e===t||"a"+(r<1?"n ":" ")+t}}),{});hr.transitional=function(n,i,r){function o(e,t){return"[Axios v"+cr+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(e,t,r){if(!1===n)throw new dr(o(t," has been removed"+(i?" in "+i:"")),dr.ERR_DEPRECATED);return i&&!mr[t]&&(mr[t]=!0,console.warn(o(t," has been deprecated since v"+i+" and will be removed in the near future"))),!n||n(e,t,r)}};function gr(t){return or(t),t.headers=t.headers||{},t.data=er.call(t,t.data,t.headers,t.transformRequest),t.headers=tr.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),tr.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||nr.adapter)(t).then(function(e){return or(t),e.data=er.call(t,e.data,e.headers,t.transformResponse),e},function(e){return rr(e)||(or(t),e&&e.response&&(e.response.data=er.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}var fr,vr,yr,pr,Ie=a,br=ue,Er=te,wr=ar,Sr=bt,Cr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new dr("options must be an object",dr.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;0>>((3&t)<<3)&255;return r},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"))}:function(){try{var e=Lr.randomBytes;Rr=y=e&&function(){return e(16)},y()}catch(e){}})();for(var Ur=c,o=[],Fr={},Br=0;Br<256;Br++)o[Br]=(Br+256).toString(16).substr(1),Fr[o[Br]]=Br;function Wr(e,t){t=t||0;return o[e[t++]]+o[e[t++]]+o[e[t++]]+o[e[t++]]+"-"+o[e[t++]]+o[e[t++]]+"-"+o[e[t++]]+o[e[t++]]+"-"+o[e[t++]]+o[e[t++]]+"-"+o[e[t++]]+o[e[t++]]+o[e[t++]]+o[e[t++]]+o[e[t++]]+o[e[+t]]}var e=y(),Hr=[1|e[0],e[1],e[2],e[3],e[4],e[5]],$r=16383&(e[6]<<8|e[7]),qr=0,zr=0;function Zr(e,t,r){var n=t&&r||0,i=("string"==typeof e&&(t="binary"===e?new Ur(16):null,e=null),(e=e||{}).random||(e.rng||y)());if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;o++)t[n+o]=i[o];return t||Wr(i)}var p=Zr;p.v1=function(e,t,r){var n=t&&r||0,i=t||[],r=null!=(e=e||{}).clockseq?e.clockseq:$r,o=null!=e.msecs?e.msecs:(new Date).getTime(),a=null!=e.nsecs?e.nsecs:zr+1,s=o-qr+(a-zr)/1e4;if(s<0&&null==e.clockseq&&(r=r+1&16383),1e4<=(a=(s<0||qr>>24&255,i[n++]=s>>>16&255,i[n++]=s>>>8&255,i[n++]=255&s,a=o/4294967296*1e4&268435455;i[n++]=a>>>8&255,i[n++]=255&a,i[n++]=a>>>24&15|16,i[n++]=a>>>16&255,i[n++]=r>>>8|128,i[n++]=255&r;for(var l=e.node||Hr,u=0;u<6;u++)i[n+u]=l[u];return t||Wr(i)},p.v4=Zr,p.parse=function(e,t,r){var n=t&&r||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){i<16&&(t[n+i++]=Fr[e])});i<16;)t[n+i++]=0;return t},p.unparse=Wr,p.BufferClass=Ur,p._rng=y,p._mathRNG=Ar,p._nodeRNG=Rr,p._whatwgRNG=Pr,Oe.exports?Oe.exports=p:(Dr=Nr.uuid,p.noConflict=function(){return Nr.uuid=Dr,p},Nr.uuid=p);var Yr,Jr,Kr,Qr=L(Ge.exports);class Xr{constructor(e){Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}setOptions(e,t){return console.log(this.obj.url+this.obj.prefix),{method:"post",baseURL:this.obj.url+this.obj.prefix,url:e,responseType:"arraybuffer",headers:{"x-request-id":Qr.v1(),"X-Requested-With":"XMLHttpRequest","Content-Type":"application/octet-stream"},data:t}}requestFuncProtobuff(e,t){return _r(this.setOptions(e,t)).then(e=>e.data).catch(e=>(console.log(e),{success:!1,errCode:null==e?void 0:e.code,message:null==e?void 0:e.message,reason:null==e?void 0:e.response}))}requestFunc(e,t){return _r({method:"post",baseURL:this.obj.url+this.obj.prefix,url:e,responseType:"json",headers:{"x-request-id":Qr.v1()},data:t}).then(e=>e.data).catch(e=>(console.log(e),{success:!1,errCode:null==e?void 0:e.code,message:null==e?void 0:e.message,reason:null==e?void 0:e.response}))}requestAction(e,t,r,n={}){e={method:r,baseURL:this.obj.url+this.obj.prefix,url:e,responseType:"json",headers:n};return"get"===r?e.params=t:e.data=t,e.headers["x-request-id"]=Qr.v1(),_r(e).then(e=>e.data).catch(e=>(console.log(e),{success:!1,errCode:null==e?void 0:e.code,message:null==e?void 0:e.message,reason:null==e?void 0:e.response}))}requestFuncCustomize(e,t){return _r({method:"post",url:e,responseType:"json",headers:{"x-request-id":Qr.v1()},data:t}).then(e=>e.data).catch(e=>(console.log(e),{success:!1,errCode:null==e?void 0:e.code,message:null==e?void 0:e.message,reason:null==e?void 0:e.response}))}}class en{constructor(){Object.defineProperty(this,"listeners",{enumerable:!0,configurable:!0,writable:!0,value:[]})}static getInstance(){return this.instance||(this.instance=new en),this.instance}findListener(t){return this.listeners.find(e=>e.guid==t)}addListener(e){return e.guid=Qr.v1(),e.time=(new Date).getTime(),this.listeners.push(e),e.guid}removeListener(t){var e=this.listeners.findIndex(e=>e.guid==t);0<=e&&this.listeners.splice(e,1)}randomString(t){var e=(new Date).getTime();t=t||32;let r="";for(let e=0;ee.name===t)}GetIndex(t){return this.ObjectTypes.findIndex(e=>e.name===t)}Delete(e){this.ObjectTypes.splice(e,1)}GetTypes(){return this.ObjectTypes}Register(e){this.ObjectTypes.push(...e)}GetByValue(e,t){for(var[r,n]of e.entries())if(n===t)return r;return null}}class rn{constructor(){Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"dbList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"enterList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"outList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"listType",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"dbListType",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"enterListType",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"outListType",{enumerable:!0,configurable:!0,writable:!0,value:[]})}Get(t){return t?this.list.find(e=>e.obj.GetData().eid===t):this.list}Set(e,t){this.list.push({obj:e,func:t})}Remove(t){var e;t?0<=(e=this.list.findIndex(e=>e.obj.GetData().eid==t))&&this.list.splice(e,1):this.list=[]}GetDb(t){return t?this.dbList.find(e=>e.obj.GetData().eid===t):this.dbList}SetDb(e,t){this.dbList.push({obj:e,func:t})}RemoveDb(t){var e;t?0<=(e=this.dbList.findIndex(e=>e.obj.GetData().eid==t))&&this.dbList.splice(e,1):this.dbList=[]}GetEnter(t){return t?this.enterList.find(e=>e.obj.GetData().eid===t):this.enterList}SetEnter(e,t){this.enterList.push({obj:e,func:t})}RemoveEnter(t){var e;t?0<=(e=this.enterList.findIndex(e=>e.obj.GetData().eid==t))&&this.enterList.splice(e,1):this.enterList=[]}GetOut(t){return t?this.outList.find(e=>e.obj.GetData().eid===t):this.outList}SetOut(e,t){this.outList.push({obj:e,func:t})}RemoveOut(t){var e;t?0<=(e=this.outList.findIndex(e=>e.obj.GetData().eid==t))&&this.outList.splice(e,1):this.outList=[]}GetType(t){return t?this.listType.find(e=>e.type===t):this.listType}SetType(e,t){this.listType.push({type:e,func:t})}RemoveType(t){var e;t?0<=(e=this.listType.findIndex(e=>e.type==t))&&this.listType.splice(e,1):this.listType=[]}GetDbType(t){return t?this.dbListType.find(e=>e.type===t):this.dbListType}SetDbType(e,t){this.dbListType.push({type:e,func:t})}RemoveDbType(t){var e;t?0<=(e=this.dbListType.findIndex(e=>e.type==t))&&this.dbListType.splice(e,1):this.dbListType=[]}GetEnterType(t){return t?this.enterListType.find(e=>e.type===t):this.enterListType}SetEnterType(e,t){this.enterListType.push({type:e,func:t})}RemoveEnterType(t){var e;t?0<=(e=this.enterListType.findIndex(e=>e.type==t))&&this.enterListType.splice(e,1):this.enterListType=[]}GetOutType(t){return t?this.outListType.find(e=>e.type===t):this.outListType}SetOutType(e,t){this.outListType.push({type:e,func:t})}RemoveOutType(t){var e;t?0<=(e=this.outListType.findIndex(e=>e.type==t))&&this.outListType.splice(e,1):this.outListType=[]}}let nn={company:"51WORLD",slogan:"Digital twin storm is now",version:"1.12.0_8",updated:"2024/9/13 16:01:17",author:"Yama.Luo",document:"https://wdpapi.51aes.com/"},on=(l,e,u,t)=>m(void 0,void 0,void 0,function*(){var i={},o=Object.keys(l.entitiesData);for(let n=0;nm(void 0,void 0,void 0,function*(){var o,a,r=[],s=[];for(let t=0;tm(void 0,void 0,void 0,function*(){var a,s,l={},i=[],o=Object.keys(u.entityTypeToEids);for(let n=0;nm(void 0,void 0,void 0,function*(){var e=t.success&&null!=(e=t.result)&&e.sceneChangeInfo?Object.assign(Object.assign({},t.result),{sceneChangeInfo:yield S(t.result.sceneChangeInfo,r,n,i)}):t.result;return{success:t.success,message:t.message,result:e}}),S=(i,c,d,h,n=!1)=>m(void 0,void 0,void 0,function*(){var a,s,l,u,t={};if(0m(void 0,void 0,void 0,function*(){let n=Object.keys(a),e={};for(let r=0;rm(void 0,void 0,void 0,function*(){var e,i,o={};if(t){var a=Object.keys(t);for(let n=0;n{var r=[];return r[0]=void 0!==t.x?t.x:e.location[0],r[1]=void 0!==t.y?t.y:e.location[1],r[2]=void 0!==t.z?t.z:e.location[2],r},cn=(e,t)=>{var r={pitch:0,yaw:0,roll:0};return r.pitch=(void 0!==t.pitch?t:e.rotator).pitch,r.yaw=(void 0!==t.yaw?t:e.rotator).yaw,r.roll=(void 0!==t.roll?t:e.rotator).roll,r},dn=(e,t)=>{let r=[],n=[...t.values()];return e.forEach(t=>{r.push(...n.filter(e=>e.customId==t&&0==e.bRemoved))}),r},hn=(e,t)=>{let r=[],n=[...t.values()];return e.forEach(t=>{r.push(...n.filter(e=>e.entityName==t&&0==e.bRemoved))}),r};class C{constructor(){Object.defineProperty(this,"validate",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"errEvent",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}static getInstance(){return this.globalInstance||(this.globalInstance=new C),this.globalInstance}GetCommonErr(){return{number:"field value type is invalid, needs to be number type",positiveNumber:"field value type is invalid, needs to be positive number type",string:"field value type is invalid, needs to be string type",hexa:"field value type is invalid, needs to be HEXA type",array:"field value type is invalid, needs to be array type",arrayLength:"field value type is invalid, needs to be array type, array length must be",arrayNumber:"field value type is invalid, needs to be array type, array value field value type is invalid, needs to be number type",arrayPositiveNumber:"field value type is invalid, needs to be array type, array value field value type is invalid, needs to be positive number type",arrayNumberLength:"field value type is invalid, needs to be array type, array value field value type is invalid, needs to be number type, array length must be",arrayPositiveNumberLength:"field value type is invalid, needs to be array type, array value field value type is invalid, needs to be positive number type, array length must be",arrayString:"field value type is invalid, needs to be array type, array value field value type is invalid, needs to be string type",arrayStringLength:"field value type is invalid, needs to be array type, array value field value type is invalid, needs to be string type, array length must be",arrayHEXA:"field value type is invalid, needs to be array type, array value must be HEXA",arrayHEXALength:"field value type is invalid, needs to be array type, array value must be HEXA, array length must be",object:"field value type is invalid, needs to be object type",boolean:"field value type is invalid, needs to be boolean type",range:"value range is",required:"field required",entityType:"is illegal type"}}getErrorTxt(){return{notObj:"The attribute parameter field value type is invalid, needs to be object type",notObj2:"obj field value type is invalid, needs to be object type",notObj3:"camera field value type is invalid, needs to be object type",keyErr:"field value type is invalid",eidErr:"Eid field value type is invalid, needs to be string type",nameErr:"entityName field value type is invalid, needs to be string typeg",customIdErr:"customId field value type is invalid, needs to be string type",customDataErr:"customData field value type is invalid, needs to be string type",locationErr:"location field value type is invalid, needs to be array type",locationErr2:"location field value type is invalid, needs to be array type, array value field value type is invalid, needs to be number type, array length must be 3",rotatorErr:"rotator field value type is invalid, needs to be object type",rotatorErr2:"rotator field value type is invalid, needs to be object type, and include pitch, yaw, roll. pitch, yaw, roll field value type is invalid, needs to be number type. Value range is -180 ~ 180",scale3dErr:"scale3d field value type is invalid, needs to be array type",scale3dErr2:"scale3d field value type is invalid, needs to be array type, array value field value type is invalid, needs to be number type, array length must be 3. Value range is positive integer",bVisible:"bVisible field value type is invalid, needs to be boolean type",visible2DErr:"visible2D field value type is invalid, needs to be object type",cameraErr:"visible2D.camera field value type is invalid, needs to be object type",hideDistanceErr:"visible2D.camera.hideDistance field value type is invalid, needs to be number type",hideDistanceErr2:"visible2D.camera.hideDistance field value type is invalid, needs to be positive number type",hideTypeErr:"visible2D.camera.hideType field value type is invalid, needs to be string type",hideTypeErr2:"visible2D.camera.hideType must be default or none",scaleModeErr:"visible2D.camera.scaleMode field value type is invalid, needs to be string type",scaleModeErr2:"visible2D.camera.scaleMode must be 2D or 3D",interactionErr:"visible2D.interaction field value type is invalid, needs to be object type",clickTopErr:"visible2D.interaction.clickTop must be boolean",hoverTopErr:"visible2D.interaction.hoverTop must be boolean",calculateCoordZ:"operations.calculateCoordZ field value type is invalid, needs to be object type",coordZRef:"operations.calculateCoordZ.coordZRef field value type is invalid, needs to be string type",coordZRef2:"operations.calculateCoordZ.coordZRef value range is: "+C.coordZRefType.toString(),coordZOffset:"operations.calculateCoordZ.coordZOffset field value type is invalid, needs to be number type"}}GetValiDateState(){return this.validate}SetValiDateState(e){this.validate=e}Register(e){e.forEach(e=>{this.errEvent.set(e.name,e)})}GetEvent(e){return this.errEvent.get(e)}RemoveEvent(e){e.forEach(e=>{this.errEvent.delete(e)})}}Object.defineProperty(C,"globalInstance",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(C,"apiCRS",{enumerable:!0,configurable:!0,writable:!0,value:"EPSG:4326"}),Object.defineProperty(C,"sceneCRS",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(C,"coordType",{enumerable:!0,configurable:!0,writable:!0,value:"Geo"}),Object.defineProperty(C,"particleType",{enumerable:!0,configurable:!0,writable:!0,value:["flame","3dmark_build_loop","3dmark_build","3dmark_camera_loop","3dmark_camera","3dmark_sign","3dmark_warning","title_only","vehicle_car","vehicle_car_black","vehicle_car_white","vehicle_taxi","shield","fire","arrow","alarm","circle","pyramid","marker_cube","marker_pyramid","marker_site","marker_cone","tool_wrench","weather_tornado","circle_glass","circle_compass","circle_outside","circle_inside","circle_scan","circle_diffuse","circle_area","circle_area2","circle_flash"]}),Object.defineProperty(C,"columnarheatmapType",{enumerable:!0,configurable:!0,writable:!0,value:["cube","cylinder","needle","frame"]}),Object.defineProperty(C,"heatmapType",{enumerable:!0,configurable:!0,writable:!0,value:["fit","plane"]}),Object.defineProperty(C,"roadHeatMapType",{enumerable:!0,configurable:!0,writable:!0,value:["fit","plane"]}),Object.defineProperty(C,"parabolaType",{enumerable:!0,configurable:!0,writable:!0,value:["arrow","solid","scanline"]}),Object.defineProperty(C,"pathType",{enumerable:!0,configurable:!0,writable:!0,value:["fit_solid","adaptive_solid","none","solid","arrow","arrow_dot","dashed_dot","arrow_dashed","flash","scan_line","brimless_arrow","railway","round_pipe","square_pipe","dashed_line"]}),Object.defineProperty(C,"rangeType",{enumerable:!0,configurable:!0,writable:!0,value:["none","wave","loop_line","grid","stripe","bias","box_wave_line","box_wave","box_solid_line","box_solid"]}),Object.defineProperty(C,"rangeFillAreaType",{enumerable:!0,configurable:!0,writable:!0,value:["none","solid","block","block2","dot","dot2","dot3","dash_line","radar"]}),Object.defineProperty(C,"rasterType",{enumerable:!0,configurable:!0,writable:!0,value:["fit","plane"]}),Object.defineProperty(C,"text3DType",{enumerable:!0,configurable:!0,writable:!0,value:["plain","reflection","metal"]}),Object.defineProperty(C,"shapeType",{enumerable:!0,configurable:!0,writable:!0,value:["polygon","circle"]}),Object.defineProperty(C,"snapModeType",{enumerable:!0,configurable:!0,writable:!0,value:["surface","ground","altitude"]}),Object.defineProperty(C,"samplerType",{enumerable:!0,configurable:!0,writable:!0,value:["Line","Grid","Uniform","Natural"]}),Object.defineProperty(C,"gridType",{enumerable:!0,configurable:!0,writable:!0,value:["Auto","Fixed"]}),Object.defineProperty(C,"controlModeType",{enumerable:!0,configurable:!0,writable:!0,value:["RTS","FPS","TPS"]}),Object.defineProperty(C,"sceneWeather",{enumerable:!0,configurable:!0,writable:!0,value:["Sunny","Cloudy","PartlyCloudy","Overcast","LightRain","ModerateRain","HeavyRain","LightSnow","ModerateSnow","HeavySnow","Foggy","Sand","Haze","auto"]}),Object.defineProperty(C,"directionType",{enumerable:!0,configurable:!0,writable:!0,value:["forward","backward","left","right","up","down"]}),Object.defineProperty(C,"directionType2",{enumerable:!0,configurable:!0,writable:!0,value:["clockwise","anticlockwise"]}),Object.defineProperty(C,"stateType",{enumerable:!0,configurable:!0,writable:!0,value:["play","pause","stop"]}),Object.defineProperty(C,"modeType",{enumerable:!0,configurable:!0,writable:!0,value:["none","normal","high","all"]}),Object.defineProperty(C,"coordZRefType",{enumerable:!0,configurable:!0,writable:!0,value:["surface","ground","altitude"]}),Object.defineProperty(C,"editormodeType",{enumerable:!0,configurable:!0,writable:!0,value:["Runtime","Editor"]}),Object.defineProperty(C,"gizmoStateType",{enumerable:!0,configurable:!0,writable:!0,value:["Disable","Enable"]}),Object.defineProperty(C,"gizmoCoordinateSystemType",{enumerable:!0,configurable:!0,writable:!0,value:["World","Local"]}),Object.defineProperty(C,"editModeType",{enumerable:!0,configurable:!0,writable:!0,value:["Create","Move","InsertOrDelete"]}),Object.defineProperty(C,"rendererModeType",{enumerable:!0,configurable:!0,writable:!0,value:["fixed","full"]}),Object.defineProperty(C,"selectModeType",{enumerable:!0,configurable:!0,writable:!0,value:["None","New","Add","Subtract","Reverse"]}),Object.defineProperty(C,"updateType",{enumerable:!0,configurable:!0,writable:!0,value:["Insert","Append","Remove","Update"]}),Object.defineProperty(C,"baseType",{enumerable:!0,configurable:!0,writable:!0,value:["Asphalt","Brick","Concert","GrassRoad","PlasticTrack","StoneRoad","Wood"]}),Object.defineProperty(C,"sideType",{enumerable:!0,configurable:!0,writable:!0,value:["Brick","ConcreteGrassGrid","GrassSlope","Landscape","SoilSlope","StoneSlope","ConcreteVertical","Wood","GrassSlope_02","StoneSlope_02"]}),Object.defineProperty(C,"fenceType",{enumerable:!0,configurable:!0,writable:!0,value:["ConcreteFence","GrassFence","MetalRail","StoneRail","WoodRail","MetalRail_02"]}),Object.defineProperty(C,"waterType",{enumerable:!0,configurable:!0,writable:!0,value:["Water01","Water02","Water03","Water04","Water05","Water06","Water07","Water08","Water09"]}),Object.defineProperty(C,"layersType",{enumerable:!0,configurable:!0,writable:!0,value:["Terrain","Building","Road","Tree","Water","District","Buildinginstance","Roadinstance","Districtinstance"]}),Object.defineProperty(C,"settingMode",{enumerable:!0,configurable:!0,writable:!0,value:["Auto","Custom"]}),Object.defineProperty(C,"coordTypes",{enumerable:!0,configurable:!0,writable:!0,value:["Local","Geo"]}),Object.defineProperty(C,"riverType",{enumerable:!0,configurable:!0,writable:!0,value:["River01","River02","River03","River04","River05"]}),Object.defineProperty(C,"stateReset",{enumerable:!0,configurable:!0,writable:!0,value:["Default","Last"]}),Object.defineProperty(C,"stateResetLimit",{enumerable:!0,configurable:!0,writable:!0,value:["Default","Free"]}),Object.defineProperty(C,"cameraStepMove",{enumerable:!0,configurable:!0,writable:!0,value:["E_Forward","E_Backward","E_Left","E_Right","E_Up","E_Down"]}),Object.defineProperty(C,"cameraStepRotate",{enumerable:!0,configurable:!0,writable:!0,value:["E_Pitch","E_Yaw"]}),Object.defineProperty(C,"sceneStyle",{enumerable:!0,configurable:!0,writable:!0,value:["comic","sketch","dark","ashy","false"]}),Object.defineProperty(C,"modelerFenceType",{enumerable:!0,configurable:!0,writable:!0,value:["SM_P_wall_01","SM_P_wall_02","SM_P_wall_03","SM_P_wall_04","SM_P_wall_05","SM_P_wall_06","SM_P_wall_07","SM_P_wall_08","SM_P_wall_09","SM_P_wall_10","SM_P_wall_11","SM_P_wall_12","SM_P_wall_13","SM_P_wall_14"]}),Object.defineProperty(C,"innerMatNameType",{enumerable:!0,configurable:!0,writable:!0,value:["face_water_3","face_water_2","face_water_1","sidewalk_brick_17","face_brick_18","sidewalk_brick_15","sidewalk_brick_11","face_brick_17","face_grass_1","face_grass_2","face_brick_15","sidewalk_brick_5","sidewalk_brick_8","sidewalk_brick_10","sidewalk_brick_9","sidewalk_brick_16","face_brick_21","face_brick_5"]}),Object.defineProperty(C,"outerMatNameType",{enumerable:!0,configurable:!0,writable:!0,value:["side_brick_4","side_brick_9","side_brick_2","side_brick_11","side_brick_6","side_brick_10","side_brick_8"]}),Object.defineProperty(C,"ArrayDuplicateCoordType",{enumerable:!0,configurable:!0,writable:!0,value:["world","local"]}),Object.defineProperty(C,"anchorsType",{enumerable:!0,configurable:!0,writable:!0,value:["leftTop","leftMiddle","leftDown","middleTop","middleCenter","middleDown","rightTop","rightMiddle","rightDown"]});class j{constructor(e){Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpSceneAPI"}),Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}CreateEntities(r,n){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"CreateEntities"},t={createEntityParams:r};return n&&(t.operations=n),yield this.obj.startApi(e,t)})}CreateEntitiesWithParamTemplate(r,n,i){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"CreateEntitiesWithParamTemplate"},t={defaultParam:r,batchParams:n};return i&&(t.operations=i),yield this.obj.startApi(e,t)})}UpdateEntitiesByEids(n,i){return m(this,void 0,void 0,function*(){let e={apiClassName:this.apiClassName,apiFuncName:"UpdateEntities"},t={eidToNewEntityParams:{}};n.forEach(e=>{t.eidToNewEntityParams[e.eid]=e.entities}),i&&(t.operations=i);var r=yield this.obj.startApi(e,t);return yield w(r,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UpdateEntities(r,n,i){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"UpdateEntities"},t={eidToNewEntityParams:{}},e=(t.eidToNewEntityParams[r]=n,i&&(t.operations=i),yield this.obj.startApi(e,t));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RemoveEntity(t){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"RemoveEntityByEids"},e=yield this.obj.startApi(e,{eids:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RemoveEntityByTypes(t){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"RemoveEntityByTypes"},e=yield this.obj.startApi(e,{types:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetEntitiesData(t){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetEntitiesData"};return yield this.obj.startApi(e,{eids:t})})}GetAllEntities(r){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetAllEntities"},t={};return void 0!==r&&(t.entityTypes=r.map(e=>b.get(e))),yield this.obj.startApi(e,t)})}GetAllEntitiesData(r){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetAllEntitiesData"},t={};return void 0!==r&&(t.entityTypes=r.map(e=>b.get(e))),yield this.obj.startApi(e,t)})}}class I{constructor(e){Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}StartApi(e,t,r){return m(this,void 0,void 0,function*(){return yield this.obj.startApi({apiClassName:e,apiFuncName:t},r)})}}class mn{validateStartByTaskId(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("string"!=typeof e)throw n&&n.func("io "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("io "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("string"!=typeof t)throw n&&n.func("taskId "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("taskId "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSetResolutionMultiple(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&("number"!=typeof e||e<0))throw r&&r.func("multiple "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber)),new Error("multiple "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber))}validateSetResolution(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("number"!=typeof e||e<200)throw n&&n.func(`w ${null==(r=C.getInstance())?void 0:r.GetCommonErr().number}. and must be >= 200`),new Error(`w ${null==(e=C.getInstance())?void 0:e.GetCommonErr().number}. and must be >= 200`);if("number"!=typeof t||t<200)throw n&&n.func(`h ${null==(r=C.getInstance())?void 0:r.GetCommonErr().number}. and must be >= 200`),new Error(`h ${null==(e=C.getInstance())?void 0:e.GetCommonErr().number}. and must be >= 200`)}}validateSetFrameRateLimit(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"number"!=typeof e)throw r&&r.func("maxFPS "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("maxFPS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}validateSetBitrate(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"number"!=typeof e)throw r&&r.func("bitrate "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("bitrate "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}validateRegisterEvent(e){let t,r,n,i,o,a,c=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw c&&c.func("events "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("events "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw c&&c.func("events value "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().object)),new Error("events value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object));e.forEach(e=>{let t,r,n,i,o,a,s,l,u={name:"",func:()=>{},sync:!1};if(Object.keys(e).forEach(e=>{var t;if(void 0===u[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0===e.name)throw c&&c.func("the name of events value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("the name of events value "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().required));if("string"!=typeof e.name)throw c&&c.func("the name of events value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("the name of events value "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string));if(void 0===e.func)throw c&&c.func("the func of events value "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().required)),new Error("the func of events value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().required));if(void 0!==e.sync&&"boolean"!=typeof e.sync)throw c&&c.func("the sync of events value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().boolean)),new Error("the sync of events value "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().boolean))})}}validateUnRegisterEvent(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("events "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("events "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw r&&r.func("events "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayString)),new Error("events "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayString))}}validateSetRendererMode(t,e){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("string"!=typeof t)throw n&&n.func("mode "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("mode "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string));if(!C.rendererModeType.find(e=>e===t))throw n&&n.func(`mode ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.rendererModeType.toString()),new Error(`mode ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.rendererModeType.toString());if(e&&void 0!==e){if("object"!=typeof e||void 0===e.length)throw n&&n.func("resolution "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("resolution "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e&&200<=e).length)throw n&&n.func(`resolution value ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 2, and must be >= 200`),new Error(`resolution value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2, and must be >= 200`)}}}validateGetSnapshot(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw n&&n.func("resolution "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("resolution "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e&&200<=e).length)throw n&&n.func(`resolution value ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 2, and must be >= 200`),new Error(`resolution value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2, and must be >= 200`);if("number"!=typeof t||t<0||1e[0]).filter(e=>e.indexOf("_system")<0)}})}GetRegisterSceneEvents(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.obj.UeEvents.map(e=>e.name).filter(e=>e.indexOf("_private")<0)}})}SetRendererMode(e,t){return m(this,void 0,void 0,function*(){this.RendererValidate.validateSetRendererMode(e,t),this.obj.setRendererMode(e,t)})}GetSnapshot(e,t=1){return m(this,void 0,void 0,function*(){return this.RendererValidate.validateGetSnapshot(e,t),{success:!0,message:"",result:((e,t,r=1)=>{let n,i=null;var o=document.getElementById("streamingVideo"),a=document.createElement("canvas");return a.width=e,a.height=t,o&&(null!=(n=a.getContext("2d"))&&n.drawImage(o,0,0,e,t),i=a.toDataURL("image/jpeg",r)),i})(e[0],e[1],t)}})}}class fn{constructor(e){Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpLogAPI"}),Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}GetDebugLogs(){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetDebugLogs"},e=yield this.obj.startApi(e,{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class vn{validateSetLogMode(t){var e,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("string"!=typeof t)throw r&&r.func("mode "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("mode "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.modeType.find(e=>e===t))throw r&&r.func(`mode ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.modeType.toString()),new Error(`mode ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.modeType.toString())}}}class yn extends I{constructor(e){super(e),Object.defineProperty(this,"Log",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"DebugValidate",{enumerable:!0,configurable:!0,writable:!0,value:new vn}),this.Log=new fn(e)}SetLogMode(e="none"){return m(this,void 0,void 0,function*(){this.DebugValidate.validateSetLogMode(e),this.obj.setLogLevel(e)})}StartRecord(){return m(this,void 0,void 0,function*(){this.obj.recordMode=!0})}EndRecord(){return m(this,void 0,void 0,function*(){this.obj.recordMode=!1})}GetRecord(){return m(this,void 0,void 0,function*(){return this.obj.record})}GetDebugLogs(){return m(this,void 0,void 0,function*(){return yield this.Log.GetDebugLogs()})}}class G extends I{constructor(e,t){super(e),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"ObjectClass",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"RequestEntity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"objectMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.ObjectClass=t,this.objectMap=new Map,this.RequestEntity=new j(e)}setType(e){this.type=e}generateDataObject(e,t){return t.SetData(e),t}findFromMap(e){return e?this.objectMap.get(e):[...this.objectMap.values()].filter(e=>!e.object.bRemoved)}addToMap(e,t){this.findFromMap(e)||(this.objectMap.set(e,t),this.obj.ObjectEidMap.set(e,t.object))}removeFromMap(e){this.objectMap.delete(e)}clearMap(){this.objectMap.clear()}onClick(e){this.type&&this.obj.EventList.SetType(this.type,e)}onDbClick(e){this.type&&this.obj.EventList.SetDbType(this.type,e)}onMouseEnter(e){this.type&&this.obj.EventList.SetEnterType(this.type,e)}onMouseOut(e){this.type&&this.obj.EventList.SetOutType(this.type,e)}Delete(t){return m(this,void 0,void 0,function*(){var e=yield this.RequestEntity.RemoveEntity(t);return e.success&&0{var t=this.findFromMap(""+e);if(t){let e={bRemoved:!0};this.generateDataObject(e,t.object)}}),e})}SetLocation(r,n){return m(this,void 0,void 0,function*(){var t=this.findFromMap(""+r),e=yield this.RequestEntity.UpdateEntities(r,{TransformAtom:{location:n}});if(e.success&&t){let e={location:n};this.generateDataObject(e,t.object)}return e})}SetRotator(r,n){return m(this,void 0,void 0,function*(){var t=this.findFromMap(""+r),e=yield this.RequestEntity.UpdateEntities(r,{TransformAtom:{rotator:n}});if(e.success&&t){let e={rotator:n};this.generateDataObject(e,t.object)}return e})}SetScale3d(r,n){return m(this,void 0,void 0,function*(){var t=this.findFromMap(""+r),e=yield this.RequestEntity.UpdateEntities(r,{TransformAtom:{scale3d:n}});if(e.success&&t){let e={scale3d:n};this.generateDataObject(e,t.object)}return e})}SetVisible(t,r=!0){return m(this,void 0,void 0,function*(){var e=yield this.RequestEntity.UpdateEntitiesByEids(t.map(e=>({eid:e,entities:{VisibleAtom:{bVisible:r}}})));return e.success&&0{e=this.findFromMap(""+e);e&&this.generateDataObject({bVisible:r},e.object)}),e})}ClearCache(){return m(this,void 0,void 0,function*(){return this.objectMap.forEach(e=>{e.object.SetData({bRemoved:!0})}),{success:!0,message:""}})}UpdateBasic(r,n){return m(this,void 0,void 0,function*(){var e=this.findFromMap(""+r),t={entityName:n.entityName,customId:n.customId,customData:"object"==typeof n.customData?JSON.stringify(n.customData):n.customData,parentEid:n.parentEid},t=yield this.RequestEntity.UpdateEntities(r,{BasicInfoAtom:t});return t.success&&e&&this.generateDataObject({entityName:n.entityName,customId:n.customId,customData:n.customData,parentEid:n.parentEid},e.object),t})}CreateWithTemplate(a,s,l){var u;return m(this,void 0,void 0,function*(){let t=new this.ObjectClass,n=[],r={},e=Object.assign({EntityType:b.get(this.type)},t.generateAtomData(a)),i=[],o=(s.forEach(e=>{i.push(t.generateAtomData(e))}),l?yield this.RequestEntity.CreateEntitiesWithParamTemplate(e,i,l):yield this.RequestEntity.CreateEntitiesWithParamTemplate(e,i));if(o.success){s.forEach((e,t)=>{Reflect.deleteProperty(a,"type");var r=new this.ObjectClass(a);r.SetData(e),this.addToMap(""+o.result.eids[t],{object:this.generateDataObject({eid:""+o.result.eids[t]},r)}),r.setObj(this.obj),n.push(r)});let e=!!l;null!=(u=o.result)&&u.sceneChangeInfo&&(r=yield S(o.result.sceneChangeInfo,this.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap,e))}return{success:o.success,message:o.message,result:{objects:n,sceneChangeInfo:r}}})}GetObject(e){return Reflect.deleteProperty(e,"type"),new this.ObjectClass(e)}Create(t){return m(this,void 0,void 0,function*(){var e=new this.ObjectClass(t);return yield this.obj.Scene.Add(e)})}Add(i,o){var a;return m(this,void 0,void 0,function*(){let t={},e=(i.setObj(this.obj),Object.assign({},i.addNewScheme)),r=o?yield this.RequestEntity.CreateEntities([e],o):yield this.RequestEntity.CreateEntities([e]);if(r.success){let e={eid:""+r.result.eids[0]};this.addToMap(""+r.result.eids[0],{object:this.generateDataObject(e,i)});var n=!!o;null!=(a=r.result)&&a.sceneChangeInfo&&(t=yield S(r.result.sceneChangeInfo,this.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap,n))}return{success:r.success,message:r.message,result:{object:i,sceneChangeInfo:t}}})}Get(r){return m(this,void 0,void 0,function*(){var e,t;return r?(e=this.findFromMap(""+r))?{success:!0,result:e}:(e=yield this.RequestEntity.GetEntitiesData([""+r])).success?((t=new this.ObjectClass({eid:r})).generateObjectData(e.result.entitiesData[0]),this.addToMap(""+r,{object:t}),t.setObj(this.obj),{success:!0,message:"",result:{object:t}}):{success:!1,message:"Eid is non-existent"}:{success:!0,result:this.findFromMap()}})}checkCacheExist(e){e=this.findFromMap(""+e);return e?{success:!0,result:e}:{success:!1,message:""}}GenerateObject(t){return m(this,void 0,void 0,function*(){var e=new this.ObjectClass({eid:t.Eid});return e.generateObjectData(t),this.addToMap(""+t.Eid,{object:e}),e.setObj(this.obj),{success:!0,message:"",result:{object:e}}})}GetOnly(r){return m(this,void 0,void 0,function*(){var e,t=this.findFromMap(""+r);return t?(e=yield this.RequestEntity.GetEntitiesData([""+r])).success?(t.object.generateObjectData(e.result.entitiesData[0]),{success:!0}):{success:!1,message:"Eid is non-existent"}:{success:!1,message:"Eid is illegal"}})}}class pn{Log(...e){console.group("%c"+e[0],"color:white;padding:5px;background:#CC4040;border-radius:5px;"),e.forEach((e,t)=>{0{void 0!==t.entityName&&(e.entityName=t.entityName),void 0!==t.customId&&(e.customId=t.customId),void 0!==t.customData&&(e.customData="object"==typeof t.customData?JSON.stringify(t.customData):t.customData),void 0!==t.parentEid&&(e.parentEid=t.parentEid)},T=(e,t)=>{void 0!==t.location&&(e.location=t.location),void 0!==t.rotator&&(e.rotator=t.rotator),void 0!==t.scale3d&&(e.scale3d=t.scale3d),void 0!==t.pivotOffset&&(e.pivotOffset=t.pivotOffset)},A=(e,t)=>{void 0!==t.bVisible&&(e.bVisible=t.bVisible)},R=(e,t)=>{void 0!==t.bLocked&&(e.bLocked=t.bLocked)},P=(e,t)=>{void 0!==t.index&&(e.index=t.index)},D=(t,r)=>{Object.keys(r).forEach(e=>{t[e]=r[e]})},bn=e=>""+(15{var{r:e,g:t,b:r,a:n=1}=e;return""+bn(e)+bn(t)+bn(r)+(1===n?"":bn(Math.floor(255*n)))},En=e=>{var{r:e,g:t,b:r,a:n=255}=e;return""+bn(e)+bn(t)+bn(r)+(255===n?"":bn(n))},wn=e=>{let t=e,r=1;8===(t=3===t.length?""+t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t).length&&(r=parseInt(t.slice(6),16)/255,t=t.slice(0,6));e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e,a:r}},Sn=e=>{let t=e,r=255;8===(t=3===t.length?""+t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t).length&&(r=parseInt(t.slice(6),16),t=t.slice(0,6));e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e,a:r}},k=e=>{return e.startsWith("#")?wn(e.slice(1)):e.startsWith("rgb")?(t=e.match(/(\d(\.\d+)?)+/g)||[],{r:(r=t.map(e=>parseInt(e,10)))[0],g:r[1],b:r[2],a:parseFloat(t[3])}):wn("transparent"===e?"00000000":e);var t,r};class Cn{constructor(e){Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpVisualAPI"}),Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}SetOutlineThickness(t){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"SetOutlineThickness"},e=yield this.obj.startApi(e,{thickness:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetOutlineThickness(){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetOutlineThickness"},e=yield this.obj.startApi(e,{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetVisualColorStyle(r,n){return m(this,void 0,void 0,function*(){n=M("object"==typeof n?n:k(n));var e={apiClassName:this.apiClassName,apiFuncName:"SetVisualColorStyle"},t={styleName:r,color:n},e=yield this.obj.startApi(e,t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetVisualColorStyle(){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetVisualColorStyle"},e=yield this.obj.startApi(e,{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEntityOutline(t){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"SetEntityOutline"},e=yield this.obj.startApi(e,t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEntityHighlight(t){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"SetEntityHighlight"},e=yield this.obj.startApi(e,t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class x extends class{constructor(){Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"atomObj",{enumerable:!0,configurable:!0,writable:!0,value:null})}setObjChannel(e){this.obj=e}setObjAtom(e){this.atomObj=e}StartApi(e,t,r){return m(this,void 0,void 0,function*(){return this.obj?yield this.obj.startApi({apiClassName:e,apiFuncName:t},r):{success:!1,message:"Object is empty"}})}}{constructor(){super(),Object.defineProperty(this,"err",{enumerable:!0,configurable:!0,writable:!0,value:new pn}),Object.defineProperty(this,"Eid",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"EntityType",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"objectType",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"addNewScheme",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"activeBaseAttributes",{enumerable:!0,configurable:!0,writable:!0,value:["eid","oType","entityName","customId","customData","parentEid","index","location","rotator","scale3d","pivotOffset","bVisible","bLocked","bRemoved","camera","interaction","entity"]}),Object.defineProperty(this,"BasicInfoAtom",{enumerable:!0,configurable:!0,writable:!0,value:{entityName:"",customId:"",customData:"",parentEid:"-1"}}),Object.defineProperty(this,"EntityOutlinerAtom",{enumerable:!0,configurable:!0,writable:!0,value:{index:""}}),Object.defineProperty(this,"TransformAtom",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0],rotator:{pitch:0,yaw:0,roll:0},scale3d:[1,1,1],pivotOffset:[0,0,0]}}),Object.defineProperty(this,"VisibleAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bVisible:!0}}),Object.defineProperty(this,"EntityFlagAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bLocked:!1}}),Object.defineProperty(this,"CacheAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bRemoved:!1}}),Object.defineProperty(this,"Visible2DAtom",{enumerable:!0,configurable:!0,writable:!0,value:{camera:{hideDistance:1e6,hideType:"none",scaleMode:"2D"},interaction:{clickTop:!0,hoverTop:!0},entity:{overlapOrder:1}}})}get eid(){return this.Eid}set eid(e){this.Eid=e}get oType(){return this.objectType}set oType(e){this.objectType=e}get type(){return this.EntityType}set type(e){this.EntityType=e}get bVisible(){return this.VisibleAtom.bVisible}set bVisible(t){this.handleVisibleAction(t).then(e=>{e.success&&(this.VisibleAtom.bVisible=t)})}get bLocked(){return this.EntityFlagAtom.bLocked}set bLocked(t){this.handleLockAction(t).then(e=>{e.success&&(this.EntityFlagAtom.bLocked=t)})}get entityName(){return this.BasicInfoAtom.entityName}set entityName(t){this.UpdateBasic({entityName:t}).then(e=>{e.success&&(this.BasicInfoAtom.entityName=t)})}get customId(){return this.BasicInfoAtom.customId}set customId(t){this.UpdateBasic({customId:t}).then(e=>{e.success&&(this.BasicInfoAtom.customId=t)})}get customData(){return this.BasicInfoAtom.customData}set customData(t){this.UpdateBasic({customData:t}).then(e=>{e.success&&(this.BasicInfoAtom.customData=t)})}get parentEid(){return this.BasicInfoAtom.parentEid}set parentEid(t){this.UpdateBasic({parentEid:t}).then(e=>{e.success&&(this.BasicInfoAtom.parentEid=t)})}get index(){return this.EntityOutlinerAtom.index}set index(t){this.UpdateOutliner({index:t}).then(e=>{e.success&&(this.EntityOutlinerAtom.index=t)})}get location(){return this.TransformAtom.location}set location(t){this.handleLocationAction(t).then(e=>{e.success&&(this.TransformAtom.location=t)})}get rotator(){return this.TransformAtom.rotator}set rotator(t){this.handleRotatorAction(t).then(e=>{e.success&&(this.TransformAtom.rotator=t)})}get scale3d(){return this.TransformAtom.scale3d}set scale3d(t){this.handleScale3dAction(t).then(e=>{e.success&&(this.TransformAtom.scale3d=t)})}get pivotOffset(){return this.TransformAtom.pivotOffset}set pivotOffset(t){this.handlePivotOffsetAction(t).then(e=>{e.success&&(this.TransformAtom.pivotOffset=t)})}get bRemoved(){return this.CacheAtom.bRemoved}get overlapOrder(){return this.Visible2DAtom.entity.overlapOrder}set overlapOrder(t){this.handleVisible2DAction({entity:{overlapOrder:t}}).then(e=>{e.success&&(this.Visible2DAtom.entity.overlapOrder=t)})}get hideDistance(){return this.Visible2DAtom.camera.hideDistance}set hideDistance(t){this.handleVisible2DAction({camera:{hideDistance:t,hideType:this.Visible2DAtom.camera.hideType,scaleMode:this.Visible2DAtom.camera.scaleMode}}).then(e=>{e.success&&(this.Visible2DAtom.camera.hideDistance=t)})}get hideType(){return this.Visible2DAtom.camera.hideType}set hideType(t){this.handleVisible2DAction({camera:{hideType:t,hideDistance:this.Visible2DAtom.camera.hideDistance,scaleMode:this.Visible2DAtom.camera.scaleMode}}).then(e=>{e.success&&(this.Visible2DAtom.camera.hideType=t)})}get scaleMode(){return this.Visible2DAtom.camera.scaleMode}set scaleMode(t){this.handleVisible2DAction({camera:{scaleMode:t,hideDistance:this.Visible2DAtom.camera.hideDistance,hideType:this.Visible2DAtom.camera.hideType}}).then(e=>{e.success&&(this.Visible2DAtom.camera.scaleMode=t)})}get clickTop(){return this.Visible2DAtom.interaction.clickTop}set clickTop(t){this.handleVisible2DAction({interaction:{clickTop:t,hoverTop:this.Visible2DAtom.interaction.hoverTop}}).then(e=>{e.success&&(this.Visible2DAtom.interaction.clickTop=t)})}get hoverTop(){return this.Visible2DAtom.interaction.hoverTop}set hoverTop(t){this.handleVisible2DAction({interaction:{hoverTop:t,clickTop:this.Visible2DAtom.interaction.clickTop}}).then(e=>{e.success&&(this.Visible2DAtom.interaction.hoverTop=t)})}GetLocked(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.EntityFlagAtom.bLocked}})}SetLocked(t=!0){return m(this,void 0,void 0,function*(){var e=yield this.handleLockAction(t);return e.success&&(this.EntityFlagAtom.bLocked=t),e})}GetVisible(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VisibleAtom.bVisible}})}SetVisible(t=!0){var r;return m(this,void 0,void 0,function*(){null!=(r=C.getInstance())&&r.GetValiDateState()&&this.validateVisible(t);var e=yield this.handleVisibleAction(t);return e.success&&(this.VisibleAtom.bVisible=t),e})}GetEntityName(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.entityName}})}SetEntityName(t){var r;return m(this,void 0,void 0,function*(){null!=(r=C.getInstance())&&r.GetValiDateState()&&this.validateEntityName(t);var e=yield this.UpdateBasic({entityName:t});return e.success&&(this.BasicInfoAtom.entityName=t),e})}GetCustomId(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.customId}})}SetCustomId(t){var r;return m(this,void 0,void 0,function*(){null!=(r=C.getInstance())&&r.GetValiDateState()&&this.validateCustomId(t);var e=yield this.UpdateBasic({customId:t});return e.success&&(this.BasicInfoAtom.customId=t),e})}GetCustomData(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.customData}})}SetCustomData(t){return m(this,void 0,void 0,function*(){var e=yield this.UpdateBasic({customData:t});return e.success&&(this.BasicInfoAtom.customData=t),e})}GetParentEid(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.BasicInfoAtom.parentEid}})}SetParentEid(t){return m(this,void 0,void 0,function*(){var e=yield this.UpdateBasic({parentEid:t});return e.success&&(this.BasicInfoAtom.parentEid=t),e})}GetLocation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.location}})}SetLocation(t){var r;return m(this,void 0,void 0,function*(){null!=(r=C.getInstance())&&r.GetValiDateState()&&this.validateLocation(t);var e=yield this.handleLocationAction(t);return e.success&&(this.TransformAtom.location=t),e})}GetRotator(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.rotator}})}SetRotator(t){var r;return m(this,void 0,void 0,function*(){null!=(r=C.getInstance())&&r.GetValiDateState()&&this.validateRotator(t);var e=yield this.handleRotatorAction(t);return e.success&&(this.TransformAtom.rotator=t),e})}GetScale3d(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.scale3d}})}SetScale3d(t){var r;return m(this,void 0,void 0,function*(){null!=(r=C.getInstance())&&r.GetValiDateState()&&this.validateScale3d(t);var e=yield this.handleScale3dAction(t);return e.success&&(this.TransformAtom.scale3d=t),e})}GetPivotOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom.pivotOffset}})}SetPivotOffset(t){var r;return m(this,void 0,void 0,function*(){null!=(r=C.getInstance())&&r.GetValiDateState()&&this.validatePivotOffset(t);var e=yield this.handlePivotOffsetAction(t);return e.success&&(this.TransformAtom.pivotOffset=t),e})}SetGeometry(e){return m(this,void 0,void 0,function*(){return yield this.handleGeometryAction(e)})}GetOverlapOrder(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.entity.overlapOrder}})}SetOverlapOrder(t){return m(this,void 0,void 0,function*(){var e=yield this.handleVisible2DAction({entity:{overlapOrder:t}});return e.success&&(this.Visible2DAtom.entity.overlapOrder=t),e})}GetHideDistance(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.hideDistance}})}SetHideDistance(t){return m(this,void 0,void 0,function*(){var e=yield this.handleVisible2DAction({camera:{hideDistance:t}});return e.success&&(this.Visible2DAtom.camera.hideDistance=t),e})}GetHideType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.hideType}})}SetHideType(t){return m(this,void 0,void 0,function*(){var e=yield this.handleVisible2DAction({camera:{hideType:t}});return e.success&&(this.Visible2DAtom.camera.hideType=t),e})}GetScaleMode(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.camera.scaleMode}})}SetScaleMode(t){return m(this,void 0,void 0,function*(){var e=yield this.handleVisible2DAction({camera:{scaleMode:t}});return e.success&&(this.Visible2DAtom.camera.scaleMode=t),e})}GetClickTop(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.interaction.clickTop}})}SetClickTop(t){return m(this,void 0,void 0,function*(){var e=yield this.handleVisible2DAction({interaction:{clickTop:t}});return e.success&&(this.Visible2DAtom.interaction.clickTop=t),e})}GetHoverTop(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Visible2DAtom.interaction.hoverTop}})}SetHoverTop(t){return m(this,void 0,void 0,function*(){var e=yield this.handleVisible2DAction({interaction:{hoverTop:t}});return e.success&&(this.Visible2DAtom.interaction.hoverTop=t),e})}GetVisible2DScheme(){return{Visible2DAtom:this.Visible2DAtom}}GetBasicScheme(){return{BasicInfoAtom:this.BasicInfoAtom}}GetTransformScheme(){return{TransformAtom:this.TransformAtom}}GetVisibleScheme(){return{VisibleAtom:this.VisibleAtom}}GetBaseScheme(){return Object.assign(Object.assign(Object.assign({},this.GetBasicScheme()),this.GetTransformScheme()),this.GetVisibleScheme())}GetAllScheme(){var e=this.atomObj.GetScheme?this.atomObj.GetScheme():{};return Object.assign(Object.assign({},e),this.GetBaseScheme())}setObj(e,t){this.setObjChannel(e)}onClick(e){this.obj?this.obj.EventList.Set(this.atomObj,e):this.err.Log("Please Add first")}onDbClick(e){this.obj?this.obj.EventList.SetDb(this.atomObj,e):this.err.Log("Please Add first")}onMouseEnter(e){this.obj?this.obj.EventList.SetEnter(this.atomObj,e):this.err.Log("Please Add first")}onMouseOut(e){this.obj?this.obj.EventList.SetOut(this.atomObj,e):this.err.Log("Please Add first")}Get(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.atomObj.GetData()}})}UpdateBasic(t){return m(this,void 0,void 0,function*(){var e;return this.obj?(e={},void 0!==t.entityName&&(e.entityName=t.entityName),void 0!==t.customId&&(e.customId=t.customId),void 0!==t.customData&&(e.customData="object"==typeof t.customData?JSON.stringify(t.customData):t.customData),void 0!==t.parentEid&&(e.parentEid=t.parentEid),0{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"==typeof t[e]&&void 0===t[e].length?this.generateObjectData(t[e],r[e]):r[e]=t[e])})}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData())}GetDataForEdit(){var e=this.atomObj.GetData();return e.eid&&Reflect.deleteProperty(e,"eid"),e.bVisible&&Reflect.deleteProperty(e,"bVisible"),e.bRemoved&&Reflect.deleteProperty(e,"bRemoved"),e.bLocked&&Reflect.deleteProperty(e,"bLocked"),e}SetEntityOutline(t){return m(this,void 0,void 0,function*(){var e;return this.obj?(e={eids:[this.eid]},void 0!==t.styleName&&(e.styleName=t.styleName),void 0!==t.bOutline&&(e.bOutline=t.bOutline),yield new Cn(this.obj).SetEntityOutline(e)):(this.err.Log("Please Add first"),{success:!1,message:"Please Add first"})})}SetEntityHighlight(t){return m(this,void 0,void 0,function*(){var e;return this.obj?(e={eids:[this.eid]},void 0!==t.styleName&&(e.styleName=t.styleName),void 0!==t.bHighlight&&(e.bHighlight=t.bHighlight),yield new Cn(this.obj).SetEntityHighlight(e)):(this.err.Log("Please Add first"),{success:!1,message:"Please Add first"})})}generateLocationAtom(e){return{TransformAtom:{location:e}}}generateRotatorAtom(e){return{TransformAtom:{rotator:e}}}generateScale3dAtom(e){return{TransformAtom:{scale3d:e}}}generateVisibleAtom(e){return{VisibleAtom:{bVisible:e}}}generateEntityFlagAtom(e){return{EntityFlagAtom:{bLocked:e}}}getOtherData(){return{bVisible:this.bVisible,bLocked:this.bLocked,bRemoved:this.bRemoved,index:this.index}}setEid(e){void 0!==e.eid&&(this.Eid=e.eid)}getEid(){return{eid:this.eid}}setTransformData(e){T(this.TransformAtom,e)}getTransformData(){return{location:this.location,rotator:this.rotator,scale3d:this.scale3d,pivotOffset:this.pivotOffset}}setVisibleData(e){void 0!==e.bVisible&&(this.VisibleAtom.bVisible=e.bVisible)}setLockedData(e){void 0!==e.bLocked&&(this.EntityFlagAtom.bLocked=e.bLocked)}setIndexData(e){void 0!==e.index&&(this.EntityOutlinerAtom.index=e.index)}setBasicData(e){O(this.BasicInfoAtom,e)}getBasicData(){return{entityName:this.BasicInfoAtom.entityName,customId:this.BasicInfoAtom.customId,customData:this.BasicInfoAtom.customData,parentEid:this.BasicInfoAtom.parentEid}}handleBasicAtom(e,t){O(e,t)}handleTransformAtom(e,t){T(e,t)}handleVisibleAtom(e,t){A(e,t)}validateEid(e){var t=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("string"!=typeof e)throw t&&t.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().eidErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().eidErr)}validateEntityName(e){var t=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("string"!=typeof e)throw t&&t.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().nameErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().nameErr)}validateCustomId(e){var t=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("string"!=typeof e)throw t&&t.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().customIdErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().customIdErr)}validateLocation(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().locationErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().locationErr);if(3!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().locationErr2),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().locationErr2)}validateRotator(e){let t,r,n,i,o,a,s,l,u,c=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw c&&c.func(null==(r=C.getInstance())?void 0:r.getErrorTxt().rotatorErr),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().rotatorErr);let d=this.rotator;if(Object.keys(e).forEach(e=>{var t;if(void 0===d[e])throw c&&c.func(`rotator.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotator.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.pitch)&&"number"!=typeof e.pitch)throw c&&c.func("rotator.pitch "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().number)),new Error("rotator.pitch "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().number));if(void 0!==(null==e?void 0:e.yaw)&&"number"!=typeof e.yaw)throw c&&c.func("rotator.yaw "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().number)),new Error("rotator.yaw "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().number));if(void 0!==(null==e?void 0:e.roll)&&"number"!=typeof e.roll)throw c&&c.func("rotator.roll "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().number)),new Error("rotator.roll "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().number))}validateScale3d(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().scale3dErr2),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().scale3dErr2);if(3!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().scale3dErr2),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().scale3dErr2)}validatePivotOffset(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof e||void 0===e.length)throw r&&r.func("pivotOffset "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("pivotOffset "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(`pivotOffset ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`pivotOffset ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}validateVisible(e){var t=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("boolean"!=typeof e)throw t&&t.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().bVisible),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().bVisible)}validateVisible2D(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=e&&e.camera){if("object"!=typeof e.camera)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().cameraErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().cameraErr);if(null!=(t=e.camera)&&t.hideDistance){if("number"!=typeof e.camera.hideDistance)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideDistanceErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideDistanceErr);if(e.camera.hideDistance<0)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideDistanceErr2),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideDistanceErr2)}if(null!=(t=e.camera)&&t.hideType){if("string"!=typeof e.camera.hideType)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideTypeErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideTypeErr);if("none"!==e.camera.hideType&&"default"!==e.camera.hideType)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideTypeErr2),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().hideTypeErr2)}if(null!=(t=e.camera)&&t.scaleMode){if("string"!=typeof e.camera.scaleMode)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().scaleModeErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().scaleModeErr);if("2D"!==e.camera.scaleMode&&"3D"!==e.camera.scaleMode)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().scaleModeErr2),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().scaleModeErr2)}}if(null!=e&&e.interaction){if("object"!=typeof e.interaction)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().interactionErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().interactionErr);if(void 0!==(null==(t=e.interaction)?void 0:t.clickTop)&&"boolean"!=typeof e.interaction.clickTop)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().clickTopErr),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().clickTopErr);if(void 0!==(null==(t=e.interaction)?void 0:t.hoverTop)&&"boolean"!=typeof e.interaction.hoverTop)throw r&&r.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().hoverTopErr),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().hoverTopErr)}}}class jn extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Environment"}),Object.defineProperty(this,"WdpEnvironmentAtom",{enumerable:!0,configurable:!0,writable:!0,value:{skylightTime:"12:30",bSkylightRealtime:!1,sceneWeather:"Sunny",bSceneWeatherRealtime:!1}}),this.setObjAtom(this),this.oType="Environment",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get skylightTime(){return this.WdpEnvironmentAtom.skylightTime}set skylightTime(e){this.WdpEnvironmentAtom.skylightTime=e}get bSkylightRealtime(){return this.WdpEnvironmentAtom.bSkylightRealtime}set bSkylightRealtime(e){this.WdpEnvironmentAtom.bSkylightRealtime=e}get sceneWeather(){return this.WdpEnvironmentAtom.sceneWeather}set sceneWeather(e){this.WdpEnvironmentAtom.sceneWeather=e}get bSceneWeatherRealtime(){return this.WdpEnvironmentAtom.bSceneWeatherRealtime}set bSceneWeatherRealtime(e){this.WdpEnvironmentAtom.bSceneWeatherRealtime=e}GetSkylightTime(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpEnvironmentAtom.skylightTime}})}SetSkylightTimed(e){return m(this,void 0,void 0,function*(){return yield this.Update({environmentStyle:{skylightTime:e}})})}GetSkylightRealtime(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpEnvironmentAtom.bSkylightRealtime}})}SetSkylightRealtime(e){return m(this,void 0,void 0,function*(){return yield this.Update({environmentStyle:{bSkylightRealtime:e}})})}GetbSkylightRealtime(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpEnvironmentAtom.bSkylightRealtime}})}SetbSkylightRealtime(e){return m(this,void 0,void 0,function*(){return yield this.Update({environmentStyle:{bSkylightRealtime:e}})})}GetSceneWeather(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpEnvironmentAtom.sceneWeather}})}SetSceneWeather(e){return m(this,void 0,void 0,function*(){return yield this.Update({environmentStyle:{sceneWeather:e}})})}GetSceneWeatherRealtime(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpEnvironmentAtom.bSceneWeatherRealtime}})}SetSceneWeatherRealtime(e){return m(this,void 0,void 0,function*(){return yield this.Update({environmentStyle:{bSceneWeatherRealtime:e}})})}GetbSceneWeatherRealtime(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpEnvironmentAtom.bSceneWeatherRealtime}})}SetbSceneWeatherRealtime(e){return m(this,void 0,void 0,function*(){return yield this.Update({environmentStyle:{bSceneWeatherRealtime:e}})})}GetScheme(){return{WdpEnvironmentAtom:this.WdpEnvironmentAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{environmentStyle:this.WdpEnvironmentAtom})}SetData(e){this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.environmentStyle&&D(this.WdpEnvironmentAtom,e.environmentStyle)}generateAtomData(e){var t={},r={},n={},i={},o={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.environmentStyle){if("object"!=typeof t.environmentStyle)throw i&&i.func("environmentStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("environmentStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.WdpEnvironmentAtom;if(Object.keys(t.environmentStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`environmentStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.environmentStyle)?void 0:n.bSkylightRealtime)&&"boolean"!=typeof t.environmentStyle.bSkylightRealtime)throw i&&i.func("environmentStyle.bSkylightRealtime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("environmentStyle.bSkylightRealtime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.environmentStyle)?void 0:n.bSceneWeatherRealtime)&&"boolean"!=typeof t.environmentStyle.bSceneWeatherRealtime)throw i&&i.func("environmentStyle.bSceneWeatherRealtime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("environmentStyle.bSceneWeatherRealtime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.environmentStyle)?void 0:n.skylightTime)){if("string"!=typeof t.environmentStyle.skylightTime)throw i&&i.func("environmentStyle.skylightTime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("environmentStyle.skylightTime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));let e=t.environmentStyle.skylightTime.split(":");if(2!==e.length)throw i&&i.func("environmentStyle.skylightTime must be format 00:00"),new Error("environmentStyle.skylightTime must be format 00:00");if(parseInt(e[0])<0||24{return e===(null==(e=t.environmentStyle)?void 0:e.sceneWeather)}))throw i&&i.func(`environmentStyle.sceneWeather ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.sceneWeather.toString()),new Error(`environmentStyle.sceneWeather ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.sceneWeather.toString())}}}}class In{validateGetCurrentWeather(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"string"!=typeof e)throw r&&r.func("cityName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("cityName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}validateGetCityInfo(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"string"!=typeof e)throw r&&r.func("cityName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("cityName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}validateSetRealTimeWeatherTimerAllowed(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"boolean"!=typeof e)throw r&&r.func("isAllowed "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("isAllowed "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}validateSetSkylightTime(t,r,n){var e,i,o=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("string"!=typeof t)throw o&&o.func("skylightTime "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string)),new Error("skylightTime "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string));let e=t.split(":");if(2!==e.length)throw o&&o.func("skylightTime must be format 00:00"),new Error("skylightTime must be format 00:00");if(parseInt(e[0])<0||24{var t;if("object"!=typeof e)throw o&&o.func("apiEvents value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("apiEvents value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));let r={eventName:"",bOpen:!0};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw o&&o.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eventName&&"string"!=typeof e.eventName)throw o&&o.func("eventName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("eventName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string));if(void 0!==e.bOpen&&"boolean"!=typeof e.bOpen)throw o&&o.func("bOpen "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bOpen "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))})}}validateSetOption(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={url:"",order:"",resolution:[1920,1080]};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.url&&"string"!=typeof e.url)throw i&&i.func("opt.url "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("opt.url "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==e.order&&"string"!=typeof e.order)throw i&&i.func("opt.order "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("opt.order "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==e.resolution){if("object"!=typeof e.resolution||void 0===e.resolution.length)throw i&&i.func("opt.resolution "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("opt.resolution "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.resolution.filter(e=>"number"==typeof e&&200<=e).length)throw i&&i.func(`opt.resolution value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. and must be >= 200`),new Error(`opt.resolution value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. and must be >= 200`)}}}validateSetDefaultBrowserFunctionKeyboard(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"boolean"!=typeof e)throw r&&r.func("bool "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bool "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}validateSetDefaultKeyboard(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"boolean"!=typeof e)throw r&&r.func("bool "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bool "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}validateSetDeviceLock(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"boolean"!=typeof e)throw r&&r.func("bool "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bool "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}validateSetFullScreen(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"boolean"!=typeof e)throw r&&r.func("bool "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bool "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}validateSetTimeoutTime(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"number"!=typeof e)throw r&&r.func("timeout "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("timeout "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}validateSetApiRequestMode(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("string"!=typeof e)throw n&&n.func("mode "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("mode "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("string"!=typeof t)throw n&&n.func("url "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("url "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateGetTypes(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"string"!=typeof e)throw r&&r.func("category "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("category "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}class Tn extends I{constructor(e){super(e),Object.defineProperty(this,"WdpAPISystem",{enumerable:!0,configurable:!0,writable:!0,value:"WdpAPISystem"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpGlobalSettingsAPI"}),Object.defineProperty(this,"SystemValidate",{enumerable:!0,configurable:!0,writable:!0,value:new On})}ToggleAPIEventChannel(t){return m(this,void 0,void 0,function*(){this.SystemValidate.validateToggleAPIEventChannel(t);var e={apiClassName:this.WdpAPISystem,apiFuncName:"ToggleAPIEventChannel"},e=yield this.obj.startApi(e,{apiEvents:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetInfomation(){return m(this,void 0,void 0,function*(){var e,t={apiClassName:this.apiClassName,apiFuncName:"GetApiVersion"},t=yield this.obj.startApi(t,{}),r=this.obj.apiInfo,n=yield this.obj.Plugin.Get(),i=(e=navigator.userAgent.toLocaleLowerCase(),i=/macintosh|mac os x/i.test(e),/(iPhone)/i.test(navigator.userAgent)?"IOS":/(iPad)/i.test(navigator.userAgent)?"iPad":0<=e.indexOf("win32")||0<=e.indexOf("wow32")?"win32":0<=e.indexOf("win64")||0<=e.indexOf("wow64")?"win64":i?"mac":/(Android)/i.test(e)?"Android":"other");return{success:!0,message:"",result:Object.assign(Object.assign({wdpApiJsSdk:r.version,wdpApiScenePlugins:t.success?t.result.version:null,renderingResolution:[parseInt(this.obj.width),parseInt(this.obj.height)],screenResolution:[window.innerWidth,window.innerHeight]},r),{plugins:n.success?n.result:[],os:i,userAgent:navigator.userAgent})}})}SetOption(e){return m(this,void 0,void 0,function*(){return this.SystemValidate.validateSetOption(e),e.url&&(this.obj.url=e.url),e.prefix&&(this.obj.prefix=e.prefix),e.order&&(this.obj.order=e.order),e.resolution&&(this.obj.width=e.resolution[0],this.obj.height=e.resolution[1]),{success:!0,message:"Set option success"}})}SetDefaultBrowserFunctionKeyboard(e=!0){return m(this,void 0,void 0,function*(){this.SystemValidate.validateSetDefaultBrowserFunctionKeyboard(e),this.obj.setDefaultBrowserFunctionKeyboard(e)})}SetDefaultKeyboard(e=!0){return m(this,void 0,void 0,function*(){this.SystemValidate.validateSetDefaultKeyboard(e),this.obj.setDefaultKeyboard(e)})}SetDeviceLock(e=!1){return m(this,void 0,void 0,function*(){this.SystemValidate.validateSetDeviceLock(e),this.obj.setDeviceLock(e)})}SetFullScreen(e=!1){return m(this,void 0,void 0,function*(){this.SystemValidate.validateSetFullScreen(e),this.obj.setFullScreen(e)})}SetTimeoutTime(e=1e4){return m(this,void 0,void 0,function*(){this.SystemValidate.validateSetTimeoutTime(e),this.obj.timeoutTime=e})}SetApiRequestMode(e,t=""){return m(this,void 0,void 0,function*(){this.SystemValidate.validateSetApiRequestMode(e,t),this.obj.apiRequestMode=e,this.obj.apiRequestURL=t,this.obj.startSocketDebugMode()})}GetTypes(t){return m(this,void 0,void 0,function*(){t&&this.SystemValidate.validateGetTypes(t);var e=this.obj.RegisterObj.GetTypes();return t?{success:!0,message:"",result:e.filter(e=>e.category===t).map(e=>({type:e.name,category:e.category}))}:{success:!0,message:"",result:e.map(e=>({type:e.name,category:e.category}))}})}}class An extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpApiStateManager"})}Record(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"RecordApiState",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Reset(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"ResetApiState",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Rn{validateDisplay(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={entity:[],coordZRef:0,coordZ:0};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.entity||void 0===e.entity.length)throw i&&i.func("entity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("entity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.entity.filter(e=>"object"==typeof e).length!==e.entity.length)throw i&&i.func("entity value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("entity value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if("number"!=typeof e.coordZRef)throw i&&i.func("coordZRef "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("coordZRef "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if("number"!=typeof e.coordZ)throw i&&i.func("coordZ "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("coordZ "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}}}class Pn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpCoordAideAPI"}),Object.defineProperty(this,"CoordaideValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Rn})}Display(t){return m(this,void 0,void 0,function*(){this.CoordaideValidate.validateDisplay(t);var e={},e=(e.eids=void 0!==t.entity?t.entity.map(e=>e.GetData().eid):[],e.coordZRef=void 0!==t.coordZRef?t.coordZRef:0,e.coordZ=void 0!==t.coordZ?t.coordZ:0,yield this.StartApi(this.apiClassName,"DisplayCoordinate",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"ClearCoordinate",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Dn{validateCreateCADGeoRef(e){let t,r,n,i,o,a,s,l,u=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw u&&u.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().object));if(void 0!==(null==e?void 0:e.cadPoints)){if("object"!=typeof e.cadPoints||void 0===e.cadPoints.length)throw u&&u.func("cadPoints "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array)),new Error("cadPoints "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array));e.cadPoints.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw u&&u.func("cadPoints value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("cadPoints value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw u&&u.func(`the value of cadPoints value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of cadPoints value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==(null==e?void 0:e.worldPoints)){if("object"!=typeof e.worldPoints||void 0===e.worldPoints.length)throw u&&u.func("worldPoints "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().array)),new Error("worldPoints "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().array));e.worldPoints.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw u&&u.func("worldPoints value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("worldPoints value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw u&&u.func(`the value of worldPoints value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of worldPoints value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}}}validateLocalFrom(e,t){let r,n,i,o,a,s,l=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e)throw l&&l.func("local "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().object)),new Error("local "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().object));if("object"!=typeof t||void 0===t.length)throw l&&l.func("from "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array)),new Error("from "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().array));t.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw l&&l.func("from value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("from value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw l&&l.func(`the value of from value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of from value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}}validateFrom(e){let t,r,n,i,o=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw o&&o.func("from "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("from "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw o&&o.func("from value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("from value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw o&&o.func(`the value of from value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of from value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}}validateCartesianToGIS(e){let t,r,n,i,o=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw o&&o.func("from "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("from "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw o&&o.func("from value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("from value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw o&&o.func(`the value of from value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of from value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}}validateWorldPosToScreenPos(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("worldPos "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("worldPos "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(`worldPos value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`worldPos value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}}}class Mn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpCoordinateAPI"}),Object.defineProperty(this,"CoordinateValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Dn})}CreateCADGeoRef(e){return m(this,void 0,void 0,function*(){this.CoordinateValidate.validateCreateCADGeoRef(e);var t=yield this.StartApi(this.apiClassName,"CreateCADGeoRef",e);if(t.success){let e=yield this.obj.DataModel.LocalGeoReference.Get(""+t.result.eid);e.success&&(t.result.object=e.result.object)}return yield w(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GISToCartesian(t){return m(this,void 0,void 0,function*(){this.CoordinateValidate.validateFrom(t);var e=yield this.StartApi(this.apiClassName,"GISToCartesian",{from:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CartesianToGIS(t){return m(this,void 0,void 0,function*(){this.CoordinateValidate.validateCartesianToGIS(t);var e=yield this.StartApi(this.apiClassName,"CartesianToGIS",{from:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}WorldPosToScreenPos(t){return m(this,void 0,void 0,function*(){this.CoordinateValidate.validateWorldPosToScreenPos(t);var e=yield this.StartApi(this.apiClassName,"WorldPosToScreenPos",{worldPos:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GISToScreenPos(t){return m(this,void 0,void 0,function*(){this.CoordinateValidate.validateFrom(t);var e=yield this.StartApi(this.apiClassName,"GISToScreenPos",{from:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GlobalToLocalGeoRef(t,r){return m(this,void 0,void 0,function*(){this.CoordinateValidate.validateLocalFrom(t,r);var e={geoRefEid:t.eid,from:r},e=yield this.StartApi(this.apiClassName,"GlobalToLocalGeoRef",e);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}LocalToGlobalGeoRef(t,r){return m(this,void 0,void 0,function*(){this.CoordinateValidate.validateLocalFrom(t,r);var e={geoRefEid:t.eid,from:r},e=yield this.StartApi(this.apiClassName,"LocalToGlobalGeoRef",e);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class kn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpMeasureAPI"})}Start(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"StartMeasure",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}End(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"EndMeasure",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class xn{validatePickByScreenPos(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("screenPos "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("screenPos "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(`screenPos value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)}}validatePickWorldPointByScreenPos(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("screenPos value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("screenPos value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw r&&r.func(`screenPos value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)}}validatePickAesTilesNodeByScreenPos(e,t,r){var n,i=null==(i=C.getInstance())?void 0:i.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw i&&i.func("screenPos "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("screenPos value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`screenPos value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`);if("object"!=typeof t||void 0===t.length)throw i&&i.func("EntityTypeFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("EntityTypeFilter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(t.filter(e=>"string"==typeof e).length!==t.length)throw i&&i.func("EntityTypeFilter value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("EntityTypeFilter value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("boolean"!=typeof r)throw i&&i.func("bFilterForExclude "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean))}}validatePickAesTilesNodesByRectangle(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={point1:[0,0],point2:[1,1],bMustBeFullyEnclosed:!0,selectMode:"New"};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.point1){if("object"!=typeof t.point1||void 0===t.point1.length)throw i&&i.func("point1 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("point1 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.point1.filter(e=>"number"==typeof e).length)throw i&&i.func(`point1 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`point1 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==t.point2){if("object"!=typeof t.point2||void 0===t.point2.length)throw i&&i.func("point2 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("point2 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.point2.filter(e=>"number"==typeof e).length)throw i&&i.func(`point2 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`point2 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==t.bMustBeFullyEnclosed&&"boolean"!=typeof t.bMustBeFullyEnclosed)throw i&&i.func("bMustBeFullyEnclosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bMustBeFullyEnclosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==t.selectMode){if("string"!=typeof t.selectMode)throw i&&i.func("selectMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("selectMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.selectModeType.find(e=>e===t.selectMode))throw i&&i.func(`selectMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString()),new Error(`selectMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString())}}}validatePickEntityByRectangle(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={p0:[0,0],p1:[1,1],bMustBeFullyEnclosed:!0,bHighlightPicked:!0,entityTypeFilter:[],bFilterForExclude:!0,selectMode:"New"};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.p0){if("object"!=typeof t.p0||void 0===t.p0.length)throw i&&i.func("p0 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("p0 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.p0.filter(e=>"number"==typeof e).length)throw i&&i.func(`p0 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`p0 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==t.p1){if("object"!=typeof t.p1||void 0===t.p1.length)throw i&&i.func("p1 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("p1 "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.p1.filter(e=>"number"==typeof e).length)throw i&&i.func(`p1 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`p1 value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==t.bMustBeFullyEnclosed&&"boolean"!=typeof t.bMustBeFullyEnclosed)throw i&&i.func("bMustBeFullyEnclosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bMustBeFullyEnclosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==t.bHighlightPicked&&"boolean"!=typeof t.bHighlightPicked)throw i&&i.func("bHighlightPicked "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bHighlightPicked "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==t.bFilterForExclude&&"boolean"!=typeof t.bFilterForExclude)throw i&&i.func("bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==t.selectMode){if("string"!=typeof t.selectMode)throw i&&i.func("selectMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("selectMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.selectModeType.find(e=>e===t.selectMode))throw i&&i.func(`selectMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString()),new Error(`selectMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString())}if(void 0!==t.entityTypeFilter){if("object"!=typeof t.entityTypeFilter||void 0===t.entityTypeFilter.length)throw i&&i.func("entityTypeFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("entityTypeFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(t.entityTypeFilter.filter(e=>"string"==typeof e).length!==t.entityTypeFilter.length)throw i&&i.func("entityTypeFilter value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("entityTypeFilter value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString));t.entityTypeFilter.forEach(e=>{var t;if(!b.get(e))throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}}}validatePickMaterialByScreenPos(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={screenPos:[0,0],EntityTypeFilter:[],bFilterForExclude:!0};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.screenPos){if("object"!=typeof e.screenPos||void 0===e.screenPos.length)throw i&&i.func("screenPos "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("screenPos "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.screenPos.filter(e=>"number"==typeof e).length)throw i&&i.func(`screenPos value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`screenPos value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==e.EntityTypeFilter){if("object"!=typeof e.EntityTypeFilter||void 0===e.EntityTypeFilter.length)throw i&&i.func("EntityTypeFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("EntityTypeFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.EntityTypeFilter.filter(e=>"string"==typeof e).length!==e.EntityTypeFilter.length)throw i&&i.func("EntityTypeFilter value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("EntityTypeFilter value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString));e.EntityTypeFilter.forEach(e=>{var t;if(!b.get(e))throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}if(void 0!==e.bFilterForExclude&&"boolean"!=typeof e.bFilterForExclude)throw i&&i.func("bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bFilterForExclude "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}validateGetEntitiesInViewport(e,t){let r,n,i,o,a,s,l,u,c=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw c&&c.func("entityTypeFilter "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("entityTypeFilter "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw c&&c.func("entityTypeFilter value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().arrayString)),new Error("entityTypeFilter value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayString));if(e.forEach(e=>{var t;if(!b.get(e))throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))}),void 0!==t&&"boolean"!=typeof t)throw c&&c.func("bFilterForExclude "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().boolean)),new Error("bFilterForExclude "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().boolean))}}validateStartRectPick(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()&&void 0!==t){let r={bMustBeFullyEnclosed:!0,entityTypeFilter:[],bFilterForExclude:!1,selectMode:"New",highlightColor:"6c5dd34d",rectangleStyle:{borderColor:"6c5dd3",borderThickness:2}};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==t?void 0:t.bMustBeFullyEnclosed)&&"boolean"!=typeof t.bMustBeFullyEnclosed)throw i&&i.func("bMustBeFullyEnclosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bMustBeFullyEnclosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==t?void 0:t.bFilterForExclude)&&"boolean"!=typeof t.bMustBeFullyEnclosed)throw i&&i.func("bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==t?void 0:t.entityTypeFilter)){if("object"!=typeof t.entityTypeFilter||void 0===t.entityTypeFilter.length)throw i&&i.func("entityTypeFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("entityTypeFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(t.entityTypeFilter.filter(e=>"string"==typeof e).length!==t.entityTypeFilter.length)throw i&&i.func("entityTypeFilter value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("entityTypeFilter value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString));t.entityTypeFilter.forEach(e=>{var t;if(!b.get(e))throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(`entityTypeFilter.${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}if(void 0!==(null==t?void 0:t.selectMode)){if("string"!=typeof t.selectMode)throw i&&i.func("selectMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("selectMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.selectModeType.find(e=>e===t.selectMode))throw i&&i.func(`selectMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString()),new Error(`selectMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString())}if(void 0!==(null==t?void 0:t.highlightColor)&&"string"!=typeof t.highlightColor)throw i&&i.func("highlightColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("highlightColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa));if(void 0!==(null==t?void 0:t.rectangleStyle)){if(void 0!==(null==(n=t.rectangleStyle)?void 0:n.borderColor)&&"string"!=typeof t.rectangleStyle.borderColor)throw i&&i.func("rectangleStyle.borderColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("rectangleStyle.borderColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa));if(void 0!==(null==(n=t.rectangleStyle)?void 0:n.borderThickness)&&("number"!=typeof t.rectangleStyle.borderThickness||t.rectangleStyle.borderThickness<0))throw i&&i.func("rectangleStyle.borderThickness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("rectangleStyle.borderThickness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber))}}}}class Vn{constructor(e){Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpActionManagerAPI"}),Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}RunAction(t,r){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"RunAction"},e=yield this.obj.startApi(e,{actionName:t,actionParams:r});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndAction(t=!1){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"EndCurrentAction"},e=yield this.obj.startApi(e,{bIsCancel:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetAction(){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetCurrentAction"},e=yield this.obj.startApi(e,{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class _n extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpPickerAPI"}),Object.defineProperty(this,"RectPickEntityAction",{enumerable:!0,configurable:!0,writable:!0,value:"RectPickEntityAction"}),Object.defineProperty(this,"PickerValidate",{enumerable:!0,configurable:!0,writable:!0,value:new xn}),Object.defineProperty(this,"Action",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Action=new Vn(e)}PickByScreenPos(t){return m(this,void 0,void 0,function*(){this.PickerValidate.validatePickByScreenPos(t);var e=yield this.StartApi(this.apiClassName,"PickEntityByScreenPos",{screenPos:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickWorldPointByScreenPos(t){return m(this,void 0,void 0,function*(){this.PickerValidate.validatePickWorldPointByScreenPos(t);var e=yield this.StartApi(this.apiClassName,"PickWorldPointByScreenPos",{screenPos:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickAesTilesNodeByScreenPos(t,r,n=!1){return m(this,void 0,void 0,function*(){this.PickerValidate.validatePickAesTilesNodeByScreenPos(t,r,n);var e={screenPos:t,bFilterForExclude:n,EntityTypeFilter:r.map(e=>this.obj.RegisterObj.EntityType.get(e))},e=yield this.StartApi(this.apiClassName,"PickAesTilesNodeByScreenPos",e);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickAesTilesNodesByRectangle(t){return m(this,void 0,void 0,function*(){this.PickerValidate.validatePickAesTilesNodesByRectangle(t);var e=yield this.StartApi(this.apiClassName,"PickAesTilesNodesByRectangle",t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickEntityByRectangle(e){return m(this,void 0,void 0,function*(){this.PickerValidate.validatePickEntityByRectangle(e);var t={p0:e.p0,p1:e.p1,bMustBeFullyEnclosed:e.bMustBeFullyEnclosed||!1,bHighlightPicked:e.bMustBeFullyEnclosed||!1,entityTypeFilter:e.entityTypeFilter.map(e=>this.obj.RegisterObj.EntityType.get(e)),bFilterForExclude:e.bFilterForExclude||!1,selectMode:e.selectMode||"New"},t=yield this.StartApi(this.apiClassName,"PickEntityByRectangle",t);if(t.success){let e=yield E(t.result.eids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);t.result=e}return yield w(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PickMaterialByScreenPos(t){return m(this,void 0,void 0,function*(){this.PickerValidate.validatePickMaterialByScreenPos(t);var e={screenPos:t.screenPos,EntityTypeFilter:t.EntityTypeFilter.map(e=>this.obj.RegisterObj.EntityType.get(e)),bFilterForExclude:t.bFilterForExclude||!1},e=yield this.StartApi(this.apiClassName,"PickMaterialByScreenPos",e);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetEntitiesInViewport(e,r){var n;return m(this,void 0,void 0,function*(){this.PickerValidate.validateGetEntitiesInViewport(e,r);var t={entityTypeFilter:e.map(e=>this.obj.RegisterObj.EntityType.get(e)),bFilterForExclude:void 0===r||r},t=yield this.StartApi(this.apiClassName,"GetEntitiesInViewport",t),t=yield w(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);if(t.success&&null!=(n=null==t?void 0:t.result)&&n.eids){let e=yield E(t.result.eids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);t.result.objects=e}return t})}StartRectPick(t){var r;return m(this,void 0,void 0,function*(){this.PickerValidate.validateStartRectPick(t);let e={};return e=void 0!==t?(void 0!==t.entityTypeFilter&&(t.entityTypeFilter=t.entityTypeFilter.map(e=>b.get(e))),void 0!==t.highlightColor&&(t.highlightColor="object"==typeof t.highlightColor?M(t.highlightColor):M(k(t.highlightColor))),void 0!==t.rectangleStyle&&void 0!==(null==(r=t.rectangleStyle)?void 0:r.borderColor)&&(t.rectangleStyle.borderColor="object"==typeof t.rectangleStyle.borderColor?M(t.rectangleStyle.borderColor):M(k(t.rectangleStyle.borderColor))),t):{},yield this.Action.RunAction(this.RectPickEntityAction,e)})}EndRectPick(){return m(this,void 0,void 0,function*(){return yield this.Action.EndAction()})}}class Ln{validateStartPickPoint(e,t,r){var n,i=null==(i=C.getInstance())?void 0:i.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("boolean"!=typeof e)throw i&&i.func("coordinateShow "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("coordinateShow "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean));if("boolean"!=typeof t)throw i&&i.func("iconShow "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("iconShow "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean));if("string"!=typeof r)throw i&&i.func("coordZRef "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("coordZRef "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.coordZRefType.find(e=>e===r))throw i&&i.func(`coordZRef ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordZRefType.toString()),new Error(`coordZRef ${null==(t=C.getInstance())?void 0:t.GetCommonErr().range} `+C.coordZRefType.toString())}}validateGetPickedPoint(t){var e,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("string"!=typeof t)throw r&&r.func("coordZRef "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("coordZRef "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.coordZRefType.find(e=>e===t))throw r&&r.func(`coordZRef ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordZRefType.toString()),new Error(`coordZRef ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.coordZRefType.toString())}}}class Nn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpPickPointAPI"}),Object.defineProperty(this,"PickerpointValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Ln})}StartPickPoint(t,r,n){return m(this,void 0,void 0,function*(){this.PickerpointValidate.validateStartPickPoint(t,r,n);var e=yield this.StartApi(this.apiClassName,"StartPickPoint",{coordinateShow:t,iconShow:r,coordZRef:n});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndPickPoint(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"EndPickPoint",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetPickedPoints(t="altitude"){return m(this,void 0,void 0,function*(){this.PickerpointValidate.validateGetPickedPoint(t);var e=yield this.StartApi(this.apiClassName,"GetPickedPoints",{coordZRef:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Un{validateGetPickedPolylines(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"number"!=typeof e)throw r&&r.func("coordZRef "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("coordZRef "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}}class Fn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpPickPolylineAPI"}),Object.defineProperty(this,"PickerpolylineValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Un})}StartPickPolyline(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"StartPickPolyline",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndPickPolyline(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"EndPickPolyline",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetPickedPolylines(t=0){return m(this,void 0,void 0,function*(){this.PickerpolylineValidate.validateGetPickedPolylines(t);var e=yield this.StartApi(this.apiClassName,"GetPickedPolylines",{coordZRef:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Bn{constructor(){Object.defineProperty(this,"eid",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"manual"}),Object.defineProperty(this,"source",{enumerable:!0,configurable:!0,writable:!0,value:{bg:"",needle:"",mask:"",frame:""}}),Object.defineProperty(this,"mappingAnchors",{enumerable:!0,configurable:!0,writable:!0,value:[[113.862953,22.522202],[114.036156,22.503061]]}),Object.defineProperty(this,"display",{enumerable:!0,configurable:!0,writable:!0,value:{position:[300,100],size:300}})}GetData(){return{eid:this.eid,type:this.type,source:this.source,mappingAnchors:this.mappingAnchors,display:this.display}}SetData(e){var t;null!=e&&e.eid&&(this.eid=e.eid),null!=e&&e.type&&(this.type=e.type),null!=e&&e.mappingAnchors&&(this.mappingAnchors=e.mappingAnchors),null!=e&&e.source&&(null!=(t=e.source)&&t.bg&&(this.source.bg=e.source.bg),null!=(t=e.source)&&t.needle&&(this.source.needle=e.source.needle),null!=(t=e.source)&&t.mask&&(this.source.mask=e.source.mask),null!=(t=e.source))&&t.frame&&(this.source.frame=e.source.frame),null!=e&&e.display&&(null!=(t=e.display)&&t.position&&(this.display.position=e.display.position),null!=(t=e.display))&&t.size&&(this.display.size=e.display.size)}}class Wn{validateStart(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={type:"manual",source:{bg:"",needle:"",mask:"",frame:""},mappingAnchors:[[0,0],[1,1]],display:{position:[0,0],size:0,anchors:"leftTop"}};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.type&&"manual"!==t.type)throw i&&i.func(`type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().string}, must be manual`),new Error(`type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().string}, must be manual`);if(void 0!==t.source){if("object"!=typeof t.source)throw i&&i.func("source "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("source "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={bg:"",needle:"",mask:"",frame:""};if(Object.keys(t.source).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`source.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.source)?void 0:n.bg)&&"string"!=typeof t.source.bg)throw i&&i.func("source.bg "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("source.bg "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=t.source)?void 0:n.needle)&&"string"!=typeof t.source.needle)throw i&&i.func("source.needle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("source.needle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=t.source)?void 0:n.mask)&&"string"!=typeof t.source.mask)throw i&&i.func("source.mask "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("source.mask "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=t.source)?void 0:n.frame)&&"string"!=typeof t.source.frame)throw i&&i.func("source.frame "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("source.frame "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string))}if(void 0!==t.mappingAnchors){if("object"!=typeof t.mappingAnchors||void 0===t.mappingAnchors.length)throw i&&i.func("mappingAnchors "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("mappingAnchors "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.mappingAnchors.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("mappingAnchors value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("mappingAnchors value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"number"==typeof e).length!==e.length)throw i&&i.func("the value of mappingAnchors value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumber)),new Error("the value of mappingAnchors value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumber))})}if(void 0!==t.display){if("object"!=typeof t.display)throw i&&i.func("display "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("display "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={position:[0,0],size:0,anchors:"leftTop"};if(Object.keys(t.display).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`display.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.display)?void 0:n.position)){if("object"!=typeof t.display.position||void 0===t.display.position.length)throw i&&i.func("display.position "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("display.position "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.display.position.filter(e=>"number"==typeof e).length)throw i&&i.func(`display.position value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`display.position value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(n=t.display)?void 0:n.size)&&"number"!=typeof t.display.size)throw i&&i.func("display.size "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("display.size "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.display)?void 0:n.anchors)){if("string"!=typeof t.display.anchors)throw i&&i.func("display.anchors "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("display.anchors "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.anchorsType.find(e=>{return e===(null==(e=t.display)?void 0:e.anchors)}))throw i&&i.func(`display.anchors ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.anchorsType.toString()),new Error(`display.anchors ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.anchorsType.toString())}}}}}class Hn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"MiniMapAPI"}),Object.defineProperty(this,"MinimapValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Wn}),Object.defineProperty(this,"miniMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.miniMap=new Bn}Start(t){return m(this,void 0,void 0,function*(){t&&this.MinimapValidate.validateStart(t),t&&this.miniMap.SetData(t);var e=yield this.StartApi(this.apiClassName,"StartMiniMap",Object.assign({},t));return e.success&&(this.miniMap.SetData({eid:e.result.eid}),e.result={object:this.miniMap}),e})}End(){return m(this,void 0,void 0,function*(){return this.miniMap.GetData().eid?yield this.StartApi(this.apiClassName,"EndMiniMap",{eid:this.miniMap.GetData().eid}):{success:!1,message:"Please start first!"}})}Get(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.miniMap.GetData()}})}}class $n{validateUpdateShapePoints(e,t){let r,n,i,o,a,s,l,u,c,d,h=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw h&&h.func("points "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("points "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw h&&h.func("points value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object)),new Error("points value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().object));if(e.forEach(e=>{let t,r,n,i,o,a,s,l,u,c,d={pointIndex:0,point:[0,0,0]};if(Object.keys(e).forEach(e=>{var t;if(void 0===d[e])throw h&&h.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0===e.pointIndex)throw h&&h.func("pointIndex "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("pointIndex "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().required));if("number"!=typeof e.pointIndex)throw h&&h.func("pointIndex "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("pointIndex "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().number));if(void 0===e.point)throw h&&h.func("point "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().required)),new Error("point "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().required));if("object"!=typeof e.point||void 0===e.point.length)throw h&&h.func("point value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().array)),new Error("point value "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().array));if(3!==e.point.filter(e=>"number"==typeof e).length)throw h&&h.func(`point value ${null==(u=C.getInstance())?void 0:u.GetCommonErr().arrayNumberLength} 3`),new Error(`point value ${null==(c=C.getInstance())?void 0:c.GetCommonErr().arrayNumberLength} 3`)}),"string"!=typeof t)throw h&&h.func("updateType "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().string)),new Error("updateType "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().string));if(!C.updateType.find(e=>e===t))throw h&&h.func(`updateType ${null==(c=C.getInstance())?void 0:c.GetCommonErr().range} `+C.updateType.toString()),new Error(`updateType ${null==(d=C.getInstance())?void 0:d.GetCommonErr().range} `+C.updateType.toString())}}validateRangePickShapePoints(e,t,r){var n,i=null==(i=C.getInstance())?void 0:i.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw i&&i.func("start "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("start "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`start value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`start value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`);if("object"!=typeof t||void 0===t.length)throw i&&i.func("end "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("end "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(2!==t.filter(e=>"number"==typeof e).length)throw i&&i.func(`end value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`end value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`);if("string"!=typeof r)throw i&&i.func("selectMode "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("selectMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.selectModeType.find(e=>e===r))throw i&&i.func(`selectMode ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.selectModeType.toString()),new Error(`selectMode ${null==(t=C.getInstance())?void 0:t.GetCommonErr().range} `+C.selectModeType.toString())}}}class qn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpShapeEditorAPI"}),Object.defineProperty(this,"ShapeValidate",{enumerable:!0,configurable:!0,writable:!0,value:new $n})}UpdateShapePoints(t,r){return m(this,void 0,void 0,function*(){this.ShapeValidate.validateUpdateShapePoints(t,r);var e=yield this.StartApi(this.apiClassName,"UpdateShapePoints",{points:t,updateType:r});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}RangePickShapePoints(t,r,n){return m(this,void 0,void 0,function*(){this.ShapeValidate.validateRangePickShapePoints(t,r,n);var e=yield this.StartApi(this.apiClassName,"RangePickShapePoints",{start:t,end:r,selectMode:n});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class zn{constructor(){Object.defineProperty(this,"eid",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"source",{enumerable:!0,configurable:!0,writable:!0,value:{bg:"",needle:""}}),Object.defineProperty(this,"display",{enumerable:!0,configurable:!0,writable:!0,value:{position:[300,100],size:300}})}GetData(){return{eid:this.eid,source:this.source,display:this.display}}SetData(e){var t;null!=e&&e.eid&&(this.eid=e.eid),null!=e&&e.source&&(void 0!==(null==(t=e.source)?void 0:t.bg)&&(this.source.bg=e.source.bg),void 0!==(null==(t=e.source)?void 0:t.needle))&&(this.source.needle=e.source.needle),null!=e&&e.display&&(null!=(t=e.display)&&t.position&&(this.display.position=e.display.position),null!=(t=e.display))&&t.size&&(this.display.size=e.display.size)}}class Zn{validateStart(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={source:{bg:"",needle:""},display:{position:[0,0],size:0,anchors:"leftTop"}};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.source){if("object"!=typeof t.source)throw i&&i.func("source "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("source "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={bg:"",needle:""};if(Object.keys(t.source).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`source.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.source)?void 0:n.bg)&&"string"!=typeof t.source.bg)throw i&&i.func("sourc.bg "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("sourc.bg "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=t.source)?void 0:n.needle)&&"string"!=typeof t.source.needle)throw i&&i.func("sourc.needle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("sourc.needle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string))}if(void 0!==t.display){if("object"!=typeof t.display)throw i&&i.func("display "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("display "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={position:[0,0],size:0,anchors:"leftTop"};if(Object.keys(t.display).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`display.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.display)?void 0:n.position)){if("object"!=typeof t.display.position||void 0===t.display.position.length)throw i&&i.func("display.position "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("display。position "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.display.position.filter(e=>"number"==typeof e).length)throw i&&i.func(`display.position ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`display.position ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(n=t.display)?void 0:n.size)&&"number"!=typeof t.display.size)throw i&&i.func("display.size "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("display.size "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.display)?void 0:n.anchors)){if("string"!=typeof t.display.anchors)throw i&&i.func("display.anchors "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("display.anchors "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.anchorsType.find(e=>{return e===(null==(e=t.display)?void 0:e.anchors)}))throw i&&i.func(`display.anchors ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.anchorsType.toString()),new Error(`display.anchors ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.anchorsType.toString())}}}}}class Yn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"CompassAPI"}),Object.defineProperty(this,"CompassValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Zn}),Object.defineProperty(this,"compass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.compass=new zn}Start(t){return m(this,void 0,void 0,function*(){t&&this.CompassValidate.validateStart(t),t&&this.compass.SetData(t);var e=yield this.StartApi(this.apiClassName,"StartCompass",Object.assign({},t));return e.success&&(this.compass.SetData({eid:e.result.eid}),e.result={object:this.compass}),e})}End(){return m(this,void 0,void 0,function*(){return this.compass.GetData().eid?yield this.StartApi(this.apiClassName,"EndCompass",{eid:this.compass.GetData().eid}):{success:!1,message:"Please start first!"}})}Get(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.compass.GetData()}})}}class Jn{validateMoveLinear(e,t){let r,n,i,o,a,s,l,u,c,d,h,m,g=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw g&&g.func("datas "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("datas "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(e.forEach(e=>{let t,r,n,i,o,a,s,l,u,c,d,h,m={objects:[],location:[0,0,0],time:1};if(Object.keys(e).forEach(e=>{var t;if(void 0===m[e])throw g&&g.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`datas.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0===e.objects)throw g&&g.func("datas.objects "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("datas.objects "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().required));if("object"!=typeof e.objects||void 0===e.objects.length)throw g&&g.func("datas.objects "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("datas.objects "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));if(e.objects.filter(e=>"object"==typeof e).length!==e.objects.length)throw g&&g.func("datas.objects value "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().object)),new Error("datas.objects value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object));if(void 0===e.location)throw g&&g.func("datas.location "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().required)),new Error("datas.location "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().required));if(3!==e.location.filter(e=>"number"==typeof e).length)throw g&&g.func(`datas.location value ${null==(u=C.getInstance())?void 0:u.GetCommonErr().arrayNumberLength} 3`),new Error(`datas.location ${null==(c=C.getInstance())?void 0:c.GetCommonErr().arrayNumberLength} 3`);if(void 0!==e.time&&("number"!=typeof e.time||e.time<0))throw g&&g.func("datas.time "+(null==(d=C.getInstance())?void 0:d.GetCommonErr().positiveNumber)),new Error("datas.time "+(null==(h=C.getInstance())?void 0:h.GetCommonErr().positiveNumber))}),void 0!==t){if("object"!=typeof t.calculateCoordZ)throw g&&g.func(null==(a=C.getInstance())?void 0:a.getErrorTxt().calculateCoordZ),new Error(null==(s=C.getInstance())?void 0:s.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw g&&g.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw g&&g.func(null==(l=C.getInstance())?void 0:l.getErrorTxt().coordZRef),new Error(null==(u=C.getInstance())?void 0:u.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw g&&g.func(null==(c=C.getInstance())?void 0:c.getErrorTxt().coordZRef2),new Error(null==(d=C.getInstance())?void 0:d.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw g&&g.func(null==(h=C.getInstance())?void 0:h.getErrorTxt().coordZOffset),new Error(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZOffset)}}}}class Kn extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"MoveLinearAPI"}),Object.defineProperty(this,"MoveLinearValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Jn})}Move(t,r){return m(this,void 0,void 0,function*(){this.MoveLinearValidate.validateMoveLinear(t,r);var e={data:t.map(e=>{var t;return{eids:e.objects.map(e=>e.eid),time:null!=(t=e.time)?t:1,location:e.location}})},e=(r&&(e.operations=r),yield this.StartApi(this.apiClassName,"MoveLinear",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Qn extends I{constructor(e){super(e),Object.defineProperty(this,"Action",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pickerMaterialDataList",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.Action=new Vn(e)}Start(t){return m(this,void 0,void 0,function*(){var e={bContinuous:!0};return this.pickerMaterialDataList=[],void 0!==t&&(void 0!==(null==t?void 0:t.bContinuous)&&(e.bContinuous=t.bContinuous),void 0!==(null==t?void 0:t.func))&&(yield this.obj.Renderer.RegisterSceneEvent([{name:"OnWdpMaterialHit",func:t.func}])),yield this.Action.RunAction("WdpPickMaterialAction",e)})}End(){return m(this,void 0,void 0,function*(){var e=yield this.Action.EndAction();return e.success&&(yield this.obj.Renderer.UnRegisterSceneEvent(["OnWdpMaterialHit"])),e})}GetMaterials(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pickerMaterialDataList}})}}class Xn extends I{constructor(e){super(e),Object.defineProperty(this,"CoordAide",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Coordinate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Measure",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Picker",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"PickerPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"PickerPolyline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"MiniMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Shape",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Compass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"MoveLinear",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"PickerMaterial",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.CoordAide=new Pn(e),this.Coordinate=new Mn(e),this.Measure=new kn(e),this.Picker=new _n(e),this.PickerPoint=new Nn(e),this.PickerPolyline=new Fn(e),this.MiniMap=new Hn(e),this.Shape=new qn(e),this.Compass=new Yn(e),this.MoveLinear=new Kn(e),this.PickerMaterial=new Qn(e)}}class ei{validateRunCustomizeApi(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"object"!=typeof e)throw r&&r.func("params "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("params "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}validateRun(e,t,r={}){var n,i=null==(i=C.getInstance())?void 0:i.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("string"!=typeof e)throw i&&i.func("apiClassName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("apiClassName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("string"!=typeof t)throw i&&i.func("apiFuncName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("apiFuncName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("object"!=typeof r)throw i&&i.func("params "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("params "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object))}}}class ti extends I{constructor(e){super(e),Object.defineProperty(this,"CustomValidate",{enumerable:!0,configurable:!0,writable:!0,value:new ei})}RunCustomizeApi(e){return m(this,void 0,void 0,function*(){return this.CustomValidate.validateRunCustomizeApi(e),yield this.obj.startApiByObject(e)})}Run(e,t,r={}){return m(this,void 0,void 0,function*(){return this.CustomValidate.validateRun(e,t,r),yield this.obj.startApi({apiClassName:e,apiFuncName:t},r)})}}class ri{validateSetCoordZType(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"number"!=typeof e)throw r&&r.func("coordZTypeValue "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("coordZTypeValue "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}validateSetAudioVolume(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"number"!=typeof e)throw r&&r.func("volume "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("volume "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}validateSetMode(t){var e,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("string"!=typeof t)throw r&&r.func("mode "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("mode "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.editormodeType.find(e=>e===t))throw r&&r.func(`mode ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.editormodeType.toString()),new Error(`mode ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.editormodeType.toString())}}validateSetDefaultActionSetting(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={bSelectActionEnabled:!0,bClickedEventEnabled:!0,bHoverEventEnabled:!0,pickFilter:{bFilterForExclude:!0,filterEntityTypes:[],excludeEntities:[]},selectionMode:"New"};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.pickFilter){if("object"!=typeof t.pickFilter)throw i&&i.func("pickFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("pickFilter "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={bFilterForExclude:!0,filterEntityTypes:[],excludeEntities:[]};if(Object.keys(t.pickFilter).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.pickFilter)?void 0:n.bFilterForExclude)&&"boolean"!=typeof t.pickFilter.bFilterForExclude)throw i&&i.func("pickFilter.bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("pickFilter.bFilterForExclude "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.pickFilter)?void 0:n.filterEntityTypes)){if("object"!=typeof t.pickFilter.filterEntityTypes||void 0===t.pickFilter.filterEntityTypes.length)throw i&&i.func("pickFilter.filterEntityTypes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("pickFilter.filterEntityTypes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(t.pickFilter.filterEntityTypes.filter(e=>"string"==typeof e).length!==t.pickFilter.filterEntityTypes.length)throw i&&i.func("pickFilter.filterEntityTypes value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("pickFilter.filterEntityTypes value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString));t.pickFilter.filterEntityTypes.forEach(e=>{var t;if(!b.get(e))throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}if(void 0!==(null==(n=t.pickFilter)?void 0:n.excludeEntities)){if("object"!=typeof t.pickFilter.excludeEntities||void 0===t.pickFilter.excludeEntities.length)throw i&&i.func("pickFilter.excludeEntities "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("pickFilter.excludeEntities "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(t.pickFilter.excludeEntities.filter(e=>"object"==typeof e).length!==t.pickFilter.excludeEntities.length)throw i&&i.func("pickFilter.excludeEntities value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("pickFilter.excludeEntities value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object))}}if(void 0!==t.selectionMode){if("string"!=typeof t.selectionMode)throw i&&i.func("selectionMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("selectionMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.selectModeType.find(e=>e===t.selectionMode))throw i&&i.func(`selectionMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString()),new Error(`selectionMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.selectModeType.toString())}}}validateSetGizmoSetting(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={gizmoState:"Disable",gizmoCoordinateSystem:"World",bPreserveScaleRatio:!0};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.gizmoState){if("string"!=typeof t.gizmoState)throw i&&i.func("gizmoState "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("gizmoState "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.gizmoStateType.find(e=>e===t.gizmoState))throw i&&i.func(`gizmoState ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.gizmoStateType.toString()),new Error(`gizmoState ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.gizmoStateType.toString())}if(void 0!==t.gizmoCoordinateSystem){if("string"!=typeof t.gizmoCoordinateSystem)throw i&&i.func("gizmoCoordinateSystem "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("gizmoCoordinateSystem "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.gizmoCoordinateSystemType.find(e=>e===t.gizmoCoordinateSystem))throw i&&i.func(`gizmoCoordinateSystem ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.gizmoCoordinateSystemType.toString()),new Error(`gizmoCoordinateSystem ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.gizmoCoordinateSystemType.toString())}if(void 0!==t.bPreserveScaleRatio&&"boolean"!=typeof t.bPreserveScaleRatio)throw i&&i.func("bPreserveScaleRatio "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bPreserveScaleRatio "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean))}}validateSetEditShapeActionSetting(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={editMode:"Create",lineWidth:20};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.editMode){if("string"!=typeof t.editMode)throw i&&i.func("editMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("editMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.editModeType.find(e=>e===t.editMode))throw i&&i.func(`editMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.editModeType.toString()),new Error(`editMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.editModeType.toString())}if(void 0!==t.lineWidth&&("number"!=typeof t.lineWidth||t.lineWidth<0))throw i&&i.func("lineWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("lineWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber))}}validateSetOutlineThickness(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"number"!=typeof e)throw r&&r.func("thickness "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("thickness "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}validateSetVisualColorStyle(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("string"!=typeof e)throw n&&n.func("styleName "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("styleName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("string"!=typeof t)throw n&&n.func("color "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().hexa)),new Error("color "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().hexa))}}}class ni extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpGlobalSettingsAPI"}),Object.defineProperty(this,"WdpActionSettingsAPI",{enumerable:!0,configurable:!0,writable:!0,value:"WdpActionSettingsAPI"}),Object.defineProperty(this,"SettingValidate",{enumerable:!0,configurable:!0,writable:!0,value:new ri}),Object.defineProperty(this,"Visual",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Visual=new Cn(e)}GetValiDateState(){var e;return null==(e=C.getInstance())?void 0:e.GetValiDateState()}SetValiDateState(e){var t;null!=(t=C.getInstance())&&t.SetValiDateState(e)}GetApiVersion(){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"GetApiVersion"},e=yield this.obj.startApi(e,{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetCoordType(e){return m(this,void 0,void 0,function*(){return this.SettingValidate.validateSetCoordZType(e),yield this.StartApi(this.apiClassName,"SetCoordType",{coordZTypeValue:e})})}GetCoordType(){return m(this,void 0,void 0,function*(){return yield this.StartApi(this.apiClassName,"GetCoordType",{})})}SetCoordZType(e){return m(this,void 0,void 0,function*(){return this.SettingValidate.validateSetCoordZType(e),yield this.StartApi(this.apiClassName,"SetCoordZType",{coordZTypeValue:e})})}GetCoordZType(){return m(this,void 0,void 0,function*(){return yield this.StartApi(this.apiClassName,"GetCoordZType",{})})}SetAudioVolume(t){return m(this,void 0,void 0,function*(){this.SettingValidate.validateSetAudioVolume(t);var e=yield this.StartApi(this.apiClassName,"SetAudioVolume",{volume:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetMode(t="Runtime"){return m(this,void 0,void 0,function*(){this.SettingValidate.validateSetMode(t);var e=yield this.StartApi(this.apiClassName,"SetInteractiveMode",{mode:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetDefaultActionSetting(t){var r;return m(this,void 0,void 0,function*(){this.SettingValidate.validateSetDefaultActionSetting(t);var e={},e=(null!=t&&t.pickFilter&&(e.pickFilter={},e.pickFilter.bFilterForExclude=void 0===(null==(r=t.pickFilter)?void 0:r.bFilterForExclude)||t.pickFilter.bFilterForExclude,e.pickFilter.filterEntityTypes=null!=(r=t.pickFilter)&&r.filterEntityTypes?t.pickFilter.filterEntityTypes.map(e=>this.obj.RegisterObj.EntityType.get(e)):[],e.pickFilter.excludeEntities=null!=(r=t.pickFilter)&&r.excludeEntities?t.pickFilter.excludeEntities.map(e=>e.eid):[]),e.selectionMode=null!=(r=t.selectionMode)?r:"New",e.bEditPivotMode=void 0!==t.bEditPivotMode&&t.bEditPivotMode,yield this.StartApi(this.WdpActionSettingsAPI,"SetDefaultActionSetting",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetGizmoSetting(t={}){return m(this,void 0,void 0,function*(){this.SettingValidate.validateSetGizmoSetting(t);var e=yield this.StartApi(this.apiClassName,"SetGizmoSetting",t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEditShapeActionSetting(t){return m(this,void 0,void 0,function*(){this.SettingValidate.validateSetEditShapeActionSetting(t);var e=yield this.StartApi(this.WdpActionSettingsAPI,"SetEditShapeActionSetting",t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetOutlineThickness(e){return m(this,void 0,void 0,function*(){return this.SettingValidate.validateSetOutlineThickness(e),yield this.Visual.SetOutlineThickness(e)})}GetOutlineThickness(){return m(this,void 0,void 0,function*(){return yield this.Visual.GetOutlineThickness()})}SetVisualColorStyle(e,t){return m(this,void 0,void 0,function*(){return this.SettingValidate.validateSetVisualColorStyle(e,t),yield this.Visual.SetVisualColorStyle(e,t)})}GetVisualColorStyle(){return m(this,void 0,void 0,function*(){return yield this.Visual.GetVisualColorStyle()})}}class ii extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Point"}),Object.defineProperty(this,"PointEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{point:[0,0,0]}}),this.setObjAtom(this),this.oType="Point",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get point(){return this.PointEntityAtom.point}set point(e){this.Update({point:e})}GetPoint(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PointEntityAtom.point}})}SetPoint(e){return m(this,void 0,void 0,function*(){return yield this.Update({point:e})})}GetScheme(){return{PointEntityAtom:this.PointEntityAtom}}GetData(){return Object.assign(Object.assign({},this.getEid()),{point:this.PointEntityAtom.point})}SetData(e){this.setEid(e),this.setLockedData(e),void 0!==e.point&&(this.PointEntityAtom.point=e.point)}generateAtomData(e){var t={},r={},n={},i={};return O(r,e),0{var t;if(void 0===u[e])throw l&&l.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.point)){if("object"!=typeof e.point||void 0===e.point.length)throw l&&l.func("point "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("point "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(3!==e.point.filter(e=>"number"==typeof e).length)throw l&&l.func(`point ${null==(a=C.getInstance())?void 0:a.GetCommonErr().arrayNumberLength} 3`),new Error(`point ${null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayNumberLength} 3`)}}}class oi extends G{constructor(e){super(e,ii)}}class ai extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Polyline"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpGeometryAPI"}),Object.defineProperty(this,"PolylineEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{polyline:{points:[[0,0,0]]}}}),this.setObjAtom(this),this.oType="Polyline",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get polyline(){return this.PolylineEntityAtom.polyline}set polyline(e){this.Update({polyline:e})}GetPolyline(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineEntityAtom.polyline}})}SetPolyline(e){return m(this,void 0,void 0,function*(){return yield this.Update({polyline:e})})}GetScheme(){return{PolylineEntityAtom:this.PolylineEntityAtom}}GetData(){return Object.assign(Object.assign({},this.getEid()),{polyline:this.PolylineEntityAtom.polyline})}SetData(e){this.setEid(e),this.setLockedData(e),void 0!==e.polyline&&(this.PolylineEntityAtom.polyline=e.polyline)}generateAtomData(e){var t={},r={},n={},i={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.polyline)){if("object"!=typeof e.polyline)throw i&&i.func("polyline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("polygon "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.PolylineEntityAtom.polyline;if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0===(null==(n=e.polyline)?void 0:n.points))throw i&&i.func("polyline value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().requied)),new Error("polyline value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().requied));if("object"!=typeof e.polyline.points||void 0===e.polyline.points.length)throw i&&i.func("polyline value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("polyline value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));e.polyline.points.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of polyline value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polyline value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`the value of polyline value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polyline value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}}}class si extends G{constructor(e){super(e,ai)}}class li extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Polygon2D"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpGeometryAPI"}),Object.defineProperty(this,"Polygon2DEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{polygon:{outerLoop:{points:[[0,0,0]]},innerLoops:[{points:[[0,0,0]]}]}}}),this.setObjAtom(this),this.oType="Polygon2D",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get polygon(){return this.Polygon2DEntityAtom.polygon}set polygon(e){this.Update({polygon:e})}GetPolygon(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Polygon2DEntityAtom.polygon}})}SetPolygon(e){return m(this,void 0,void 0,function*(){return yield this.Update({polygon:e})})}GetScheme(){return{Polygon2DEntityAtom:this.Polygon2DEntityAtom}}GetData(){return Object.assign(Object.assign({},this.getEid()),{polygon:this.Polygon2DEntityAtom.polygon})}SetData(e){this.setEid(e),void 0!==e.polygon&&(void 0!==e.polygon.outerLoop&&(this.Polygon2DEntityAtom.polygon.outerLoop=e.polygon.outerLoop),void 0!==e.polygon.innerLoops)&&(this.Polygon2DEntityAtom.polygon.innerLoops=e.polygon.innerLoops)}generateAtomData(e){var t={},r={},n={},i={};return O(r,e),0{var t;if(void 0===r[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.polygon)){if("object"!=typeof e.polygon)throw a&&a.func("polygon "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("polygon "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.Polygon2DEntityAtom.polygon;if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.polygon)?void 0:n.innerLoops)){if("object"!=typeof e.polygon.innerLoops||void 0===e.polygon.innerLoops.length)throw a&&a.func("polygon.innerLoops "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("polygon.innerLoops "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));e.polygon.innerLoops.forEach(e=>{let t,r,n,i,o={points:[[0,0,0]]};if(Object.keys(e).forEach(e=>{var t;if(void 0===o[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0===e.points)throw a&&a.func("polygon.innerLoops value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().requied)),new Error("polygon.innerLoops value "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().requied));if("object"!=typeof e.points||void 0===e.points.length)throw a&&a.func("polygon.innerLoops value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("polygon.innerLoops value "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));e.points.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw a&&a.func("the value of polygon.innerLoops value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polygon.innerLoops value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(`the value of polygon.innerLoops value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polygon.innerLoops value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})})}if(void 0!==(null==(n=e.polygon)?void 0:n.outerLoop)){if("object"!=typeof e.polygon.outerLoop)throw a&&a.func("polygon.outerLoop "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("polygon.outerLoop "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={points:[[0,0,0]]};if(Object.keys(e.polygon.outerLoop).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0===(null==(n=e.polygon.outerLoop)?void 0:n.points))throw a&&a.func("polygon.outerLoop value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().requied)),new Error("polygon.outerLoop value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().requied));if("object"!=typeof e.polygon.outerLoop.points||void 0===e.polygon.outerLoop.points.length)throw a&&a.func("polygon.outerLoop value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("polygon.outerLoop value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));e.polygon.outerLoop.points.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw a&&a.func("the value of polygon.outerLoop value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polygon.outerLoop value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(`the value of polygon.outerLoop value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polygon.outerLoop value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}}}}class ui extends G{constructor(e){super(e,li)}}class ci{validateStartShowCoord(e,t){let r,n,i,o,a,s,l,u,c,d,h=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if(void 0===e)throw h&&h.func("coordinates "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().required)),new Error("coordinates "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().required));if("object"!=typeof e||void 0===e.length)throw h&&h.func("coordinates "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array)),new Error("coordinates "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().array));if(e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw h&&h.func("The value of coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("The value of coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw h&&h.func(`The value of coordinates ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`The value of coordinates ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}),void 0!==t){if("string"!=typeof t)throw h&&h.func(null==(l=C.getInstance())?void 0:l.getErrorTxt().coordZRef),new Error(null==(u=C.getInstance())?void 0:u.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===t))throw h&&h.func(null==(c=C.getInstance())?void 0:c.getErrorTxt().coordZRef2),new Error(null==(d=C.getInstance())?void 0:d.getErrorTxt().coordZRef2)}}}validateClearByTypes(e){let t,r,n,i,o,a,s,l,u=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if(void 0===e)throw u&&u.func("types "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().required)),new Error("types "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().required));if("object"!=typeof e||void 0===e.length)throw u&&u.func("types "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array)),new Error("types "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw u&&u.func("types "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayString)),new Error("types "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().arrayString));e.forEach(e=>{var t;if(!b.get(e))throw u&&u.func(`types.${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(`types.,${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}}validateUrl(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("string"!=typeof e)throw r&&r.func("url "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("url "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string));if("string"!=typeof e)throw r&&r.func("url "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("url "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}}class di extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpGeometryAPI"}),Object.defineProperty(this,"GeometryValidate",{enumerable:!0,configurable:!0,writable:!0,value:new ci}),Object.defineProperty(this,"RequestEntity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Point",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Polyline",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Polygon2D",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.RequestEntity=new j(e),this.Point=new oi(e),this.Polyline=new si(e),this.Polygon2D=new ui(e)}StartShowCoord(t,r){return m(this,void 0,void 0,function*(){this.GeometryValidate.validateStartShowCoord(t,r);var e=yield this.StartApi(this.apiClassName,"StartShowCoord",{coordinates:t,coordZRef:r});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EndShowCoord(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"EndShowCoord",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}EnableDraw(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"EnableGeometryDraw",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}DisableDraw(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"DisableGeometryDraw",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ClearByTypes(n){return m(this,void 0,void 0,function*(){if(this.GeometryValidate.validateClearByTypes(n),(n=n.filter(t=>{if(this.obj.RegisterObj.GetTypes().find(e=>e.name===t&&"Geometry"===e.category))return t})).length<=0)return{success:!1,message:"Type is empty"};var e=yield this.RequestEntity.RemoveEntityByTypes(n.map(e=>this.obj.RegisterObj.EntityType.get(e)));if(e.success)for(let t=0;te.name===n[t]);r&&(yield r.object.ClearCache())}return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return m(this,void 0,void 0,function*(){var e=this.obj.RegisterObj.GetTypes().filter(e=>"Geometry"===e.category),e=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e.name)));return e.success&&(yield this.ClearCache()),yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ClearCache(){return m(this,void 0,void 0,function*(){return this.obj.RegisterObj.GetTypes().filter(e=>"Geometry"===e.category).forEach(e=>{e.object.ClearCache()}),{success:!0,message:""}})}CreateGeometryFromGeoJson(e){var t;return m(this,void 0,void 0,function*(){this.GeometryValidate.validateUrl(e);var r=yield this.StartApi(this.apiClassName,"CreateGeometryEntitiesFromGeoJson",{url:e}),n={success:!0,message:"",result:{point:[],polyline:[],polygon2D:[]}};if((r=yield w(r,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)).result.sceneChangeInfo&&(n.result.sceneChangeInfo=r.result.sceneChangeInfo),r.success){if(null!=(t=r.result)&&t.pointEids)for(let t=0;t"object"==typeof e).length!==t.length)throw n&&n.func("objects value "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("objects value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}}class mi extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpAssetLoaderAPI"}),Object.defineProperty(this,"AssetLoaderValidate",{enumerable:!0,configurable:!0,writable:!0,value:new hi})}LoadAssetById(e){return m(this,void 0,void 0,function*(){this.AssetLoaderValidate.validateSeedId(e);let t,r=yield this.StartApi(this.apiClassName,"LoadAssetById",{seedId:e});if((r=yield w(r,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)).success){let e=this.obj.RegisterObj.GetByValue(this.obj.RegisterObj.EntityType,r.result.type);if(e){var n=this.obj.RegisterObj.get(e);if(n){let e=yield n.object.Get(r.result.eid);e.success&&(t=e.result.object)}}}return{success:r.success,message:r.message,result:t}})}ReplaceAssetById(t,r){return m(this,void 0,void 0,function*(){this.AssetLoaderValidate.validateReplaceAssetById(t,r);var e={seedId:t,eids:r.map(e=>e.eid)},e=yield this.StartApi(this.apiClassName,"ReplaceAssetById",e);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetMeshSizeById(t){return m(this,void 0,void 0,function*(){this.AssetLoaderValidate.validateSeedId(t);var e=yield this.StartApi(this.apiClassName,"GetMeshSizeById",{seedId:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class gi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Material"}),Object.defineProperty(this,"MIParamsAtom",{enumerable:!0,configurable:!0,writable:!0,value:{mid:null,uTiling:1,vTiling:1,uPanner:0,vPanner:0,rotationAngle:0,diffuse_Color:{r:0,g:0,b:0,a:0},roughness_Intensity:1,opacity:1}}),this.setObjAtom(this),this.oType="Material",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get materialEid(){return this.Eid}get seedId(){return this.MIParamsAtom.mid}set seedId(e){this.Update({materialStyle:{mid:e}})}get mid(){return this.MIParamsAtom.mid}set mid(e){this.Update({materialStyle:{mid:e}})}get uTiling(){return this.MIParamsAtom.uTiling}set uTiling(e){this.Update({materialStyle:{uTiling:e}})}get vTiling(){return this.MIParamsAtom.vTiling}set vTiling(e){this.Update({materialStyle:{vTiling:e}})}get uPanner(){return this.MIParamsAtom.uPanner}set uPanner(e){this.Update({materialStyle:{uPanner:e}})}get vPanner(){return this.MIParamsAtom.vPanner}set vPanner(e){this.Update({materialStyle:{vPanner:e}})}get rotationAngle(){return this.MIParamsAtom.rotationAngle}set rotationAngle(e){this.Update({materialStyle:{rotationAngle:e}})}get diffuse_Color(){return En(this.MIParamsAtom.diffuse_Color)}set diffuse_Color(e){this.Update({materialStyle:{diffuse_Color:Sn(e)}})}get roughness_Intensity(){return this.MIParamsAtom.roughness_Intensity}set roughness_Intensity(e){this.Update({materialStyle:{roughness_Intensity:e}})}get opacity(){return this.MIParamsAtom.opacity}set opacity(e){this.Update({materialStyle:{opacity:e}})}GetSeedId(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.mid}})}SeSeedId(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{mid:e}})})}GetMid(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.mid}})}SetMid(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{mid:e}})})}GetUTilingd(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.uTiling}})}SetUTilingd(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{uTiling:e}})})}GetVTiling(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.vTiling}})}SetVTiling(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{vTiling:e}})})}GetUPanner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.uPanner}})}SetUPanner(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{uPanner:e}})})}GetVPanner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.vPanner}})}SetVPanner(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{vPanner:e}})})}GetRotationAngle(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.rotationAngle}})}SetRotationAngle(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{rotationAngle:e}})})}GetDiffuseColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:En(this.MIParamsAtom.diffuse_Color)}})}SetDiffuseColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{diffuse_Color:Sn(e)}})})}GetRoughnessIntensity(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.roughness_Intensity}})}SetRoughnessIntensity(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{roughness_Intensity:e}})})}GetOpacity(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MIParamsAtom.opacity}})}SetOpacity(e){return m(this,void 0,void 0,function*(){return yield this.Update({materialStyle:{opacity:e}})})}GetScheme(){return{MIParamsAtom:this.MIParamsAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{materialStyle:this.MIParamsAtom,seedId:this.MIParamsAtom.mid})}SetData(e){this.setEid(e),this.setBasicData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.materialStyle&&D(this.MIParamsAtom,e.materialStyle),void 0!==e.seedId&&(this.MIParamsAtom.mid=e.seedId)}generateAtomData(e){var t={},r={},n={},i={},o={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.materialStyle){if("object"!=typeof e.materialStyle)throw i&&i.func("materialStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("materialStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.MIParamsAtom;if(Object.keys(e.materialStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.materialStyle)?void 0:n.mid)&&"string"!=typeof e.materialStyle.mid)throw i&&i.func("materialStyle.mid "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("materialStyle.mid "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=e.materialStyle)?void 0:n.uTiling)&&"number"!=typeof e.materialStyle.uTiling)throw i&&i.func("materialStyle.uTiling "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("materialStyle.uTiling "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=e.materialStyle)?void 0:n.vTiling)&&"number"!=typeof e.materialStyle.vTiling)throw i&&i.func("materialStyle.vTiling "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("materialStyle.vTiling "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=e.materialStyle)?void 0:n.uPanner)&&"number"!=typeof e.materialStyle.uPanner)throw i&&i.func("materialStyle.uPanner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("materialStyle.uPanner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=e.materialStyle)?void 0:n.vPanner)&&"number"!=typeof e.materialStyle.vPanner)throw i&&i.func("materialStyle.vPanner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("materialStyle.vPanner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=e.materialStyle)?void 0:n.rotationAngle)&&"number"!=typeof e.materialStyle.rotationAngle)throw i&&i.func("materialStyle.rotationAngle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("materialStyle.rotationAngle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=e.materialStyle)?void 0:n.diffuse_Color)&&"string"!=typeof e.materialStyle.diffuse_Color)throw i&&i.func("materialStyle.diffuse_Color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("materialStyle.diffuse_Color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=e.materialStyle)?void 0:n.roughness_Intensity)&&("number"!=typeof e.materialStyle.roughness_Intensity||e.materialStyle.roughness_Intensity<0||1{var t;if(void 0===e.obj)throw o&&o.func("obj "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("obj "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("object"!=typeof e.obj)throw o&&o.func("obj "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("obj "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0===e.newMaterialsInfo)throw o&&o.func("newMaterialsInfo "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("newMaterialsInfo "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("object"!=typeof e.newMaterialsInfo||void 0===e.newMaterialsInfo.length)throw o&&o.func("newMaterialsInfo "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("newMaterialsInfo "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.newMaterialsInfo.filter(e=>"object"==typeof e).length!==e.newMaterialsInfo.length)throw o&&o.func("The value of newMaterialsInfo "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("The value of newMaterialsInfo "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))})}}validateSetModelMaterial(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw r&&r.func("opt "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("opt "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0===(null==e?void 0:e.TargetMaterials))throw r&&r.func("opt.TargetMaterials "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("opt.TargetMaterials "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if(void 0===(null==e?void 0:e.MaterialEid))throw r&&r.func("opt.MaterialEid "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("opt.MaterialEid "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("object"!=typeof e.TargetMaterials||void 0===e.TargetMaterials.length)throw r&&r.func("opt.TargetMaterials "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("opt.TargetMaterials "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if("string"!=typeof e.MaterialEid)throw r&&r.func("opt.MaterialEid "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("opt.MaterialEid "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateGetList(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if(void 0===e)throw r&&r.func("obj "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("obj "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("object"!=typeof e)throw r&&r.func("obj "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("obj "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}validateSetEntitySlotsHighlight(e){let t,r,n,i,o=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw o&&o.func("entitySlotParams "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("entitySlotParams "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));e.forEach(e=>{var t;if(void 0===e.entity)throw o&&o.func("entity "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("entity "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("object"!=typeof e.entity)throw o&&o.func("entity "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("entity "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0===e.meshName)throw o&&o.func("meshName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("meshName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("string"!=typeof e.meshName)throw o&&o.func("meshName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("meshName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string));if(void 0===e.MaterialIndex)throw o&&o.func("MaterialIndex "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("MaterialIndex "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("number"!=typeof e.MaterialIndex)throw o&&o.func("MaterialIndex "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("MaterialIndex "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number));if(void 0===e.bHighlight)throw o&&o.func("bHighlight "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("bHighlight "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("number"!=typeof e.bHighlight)throw o&&o.func("bHighlight "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bHighlight "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))})}}}class vi extends G{constructor(e){super(e,gi),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"MaterialToolAPI"}),Object.defineProperty(this,"MaterialValidate",{enumerable:!0,configurable:!0,writable:!0,value:new fi}),this.setType("Material")}Apply(r){return m(this,void 0,void 0,function*(){this.MaterialValidate.validateApply(r);let t={eidToNewMaterialInfo:{}};r.forEach(e=>{t.eidToNewMaterialInfo[e.obj.eid]={NewMaterialsInfo:e.newMaterialsInfo}});var e=yield this.StartApi(this.apiClassName,"ApplyMaterialToEntity",t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetModelMaterial(i){return m(this,void 0,void 0,function*(){this.MaterialValidate.validateSetModelMaterial(i);let n={eidToNewMaterialInfo:{}};i.TargetMaterials.forEach(t=>{var r={MIEid:i.MaterialEid,MeshName:t.meshName,MaterialIndex:t.materialIndex};if(void 0!==n.eidToNewMaterialInfo[t.eid])n.eidToNewMaterialInfo[t.eid].NewMaterialsInfo.push(r);else{let e={NewMaterialsInfo:[r]};n.eidToNewMaterialInfo[t.eid]=e}});var e=yield this.StartApi(this.apiClassName,"ApplyMaterialToEntity",n);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetList(t){return m(this,void 0,void 0,function*(){this.MaterialValidate.validateGetList(t);var e=yield this.StartApi(this.apiClassName,"GetEntityMaterialSlots",{eids:t.map(e=>e.eid)});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetEntitySlotsHighlight(t){return m(this,void 0,void 0,function*(){this.MaterialValidate.validateSetEntitySlotsHighlight(t);var e=yield this.StartApi(this.apiClassName,"SetEntitySlotsHighlight",{entitySlotParams:t.map(e=>({eid:e.entity.eid,meshName:e.meshName,MaterialIndex:e.MaterialIndex,bHighlight:e.bHighlight}))});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class yi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"LocalGeoReference"}),Object.defineProperty(this,"LocalGeoReferenceAtom",{enumerable:!0,configurable:!0,writable:!0,value:{coordType:"Local",sceneCRS:"+proj=ortho +lon_0=121.480248 +lat_0=31.236276 +a=6371010 +units=m +no_defs",apiCRS:"EPSG:4326",originLocation:[0,0,0],originRotation:{pitch:0,yaw:0,roll:0},originScale:[1,1,1]}}),this.setObjAtom(this),this.oType="LocalGeoReference",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get coordType(){return this.LocalGeoReferenceAtom.coordType}set coordType(e){this.Update({coordType:e})}get sceneCRS(){return this.LocalGeoReferenceAtom.sceneCRS}set sceneCRS(e){this.Update({sceneCRS:e})}get apiCRS(){return this.LocalGeoReferenceAtom.apiCRS}set apiCRS(e){this.Update({apiCRS:e})}get originLocation(){return this.LocalGeoReferenceAtom.originLocation}set originLocation(e){this.Update({originLocation:e})}get originRotation(){return this.LocalGeoReferenceAtom.originRotation}set originRotation(e){this.Update({originRotation:e})}get originScale(){return this.LocalGeoReferenceAtom.originScale}set originScale(e){this.Update({originScale:e})}GetCoordType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LocalGeoReferenceAtom.coordType}})}SetCoordType(e){return m(this,void 0,void 0,function*(){return yield this.Update({coordType:e})})}GetSceneCRS(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LocalGeoReferenceAtom.sceneCRS}})}SetSceneCRS(e){return m(this,void 0,void 0,function*(){return yield this.Update({sceneCRS:e})})}GetApiCRS(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LocalGeoReferenceAtom.apiCRS}})}SetApiCRS(e){return m(this,void 0,void 0,function*(){return yield this.Update({apiCRS:e})})}GetOriginLocation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LocalGeoReferenceAtom.originLocation}})}SetOriginLocation(e){return m(this,void 0,void 0,function*(){return yield this.Update({originLocation:e})})}GetOriginRotation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LocalGeoReferenceAtom.originRotation}})}SetOriginRotation(e){return m(this,void 0,void 0,function*(){return yield this.Update({originRotation:e})})}GetOriginScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LocalGeoReferenceAtom.originScale}})}SetOriginScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({originScale:e})})}GetScheme(){return{LocalGeoReferenceAtom:this.LocalGeoReferenceAtom}}GetData(){return Object.assign(Object.assign({},this.getEid()),this.LocalGeoReferenceAtom)}SetData(e){this.setEid(e),void 0!==e.coordType&&(this.LocalGeoReferenceAtom.coordType=e.coordType),void 0!==e.sceneCRS&&(this.LocalGeoReferenceAtom.sceneCRS=e.sceneCRS),void 0!==e.apiCRS&&(this.LocalGeoReferenceAtom.apiCRS=e.apiCRS),void 0!==e.originLocation&&(this.LocalGeoReferenceAtom.originLocation=e.originLocation),void 0!==e.originRotation&&(this.LocalGeoReferenceAtom.originRotation=e.originRotation),void 0!==e.originScale&&(this.LocalGeoReferenceAtom.originScale=e.originScale)}generateAtomData(e){var t={},r={};return void 0!==(null==e?void 0:e.coordType)&&(r.coordType=e.coordType),void 0!==(null==e?void 0:e.sceneCRS)&&(r.sceneCRS=e.sceneCRS),void 0!==(null==e?void 0:e.apiCRS)&&(r.apiCRS=e.apiCRS),void 0!==(null==e?void 0:e.originLocation)&&(r.originLocation=e.originLocation),void 0!==(null==e?void 0:e.originRotation)&&(r.originRotation=e.originRotation),void 0!==(null==e?void 0:e.originScale)&&(r.originScale=e.originScale),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==t?void 0:t.coordType)){if("string"!=typeof t.coordType)throw i&&i.func("coordType "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("coordType "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.coordTypes.find(e=>e===t.coordType))throw i&&i.func(`coordType.${t.coordType} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordTypes.toString()),new Error(`coordType.${t.coordType} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordTypes.toString())}if(void 0!==(null==t?void 0:t.sceneCRS)&&"string"!=typeof t.sceneCRS)throw i&&i.func("sceneCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("sceneCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(void 0!==(null==t?void 0:t.apiCRS)&&"string"!=typeof t.apiCRS)throw i&&i.func("apiCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("apiCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(void 0!==(null==t?void 0:t.originLocation)){if("object"!=typeof t.originLocation||void 0===t.originLocation.length)throw i&&i.func("originLocation "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("originLocation "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(3!==t.originLocation.filter(e=>"number"==typeof e).length)throw i&&i.func(`originLocation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`),new Error(`originLocation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==t?void 0:t.originRotation)){if("object"!=typeof t.originRotation)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().rotatorErr),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().rotatorErr);let r=this.rotator;if(Object.keys(t.originRotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.originRotation)?void 0:n.pitch)&&("number"!=typeof t.originRotation.pitch||t.originRotation.pitch<-180||180"number"==typeof e).length)throw i&&i.func(`origioriginScalenLocation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`),new Error(`originScale ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}}}class pi extends G{constructor(e){super(e,yi),this.setType("LocalGeoReference")}}class bi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"GeoReference"}),Object.defineProperty(this,"GeoReferenceAtom",{enumerable:!0,configurable:!0,writable:!0,value:{settingMode:"Auto",coordType:"Geo",sceneCRS:"",apiCRS:"EPSG:4326",originLocation:[0,0,0],originRotation:{pitch:0,yaw:0,roll:0},originScale:[1,1,1]}}),this.setObjAtom(this),this.oType="LocalGeoReference",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get settingMode(){return this.GeoReferenceAtom.settingMode}set settingMode(e){this.Update({settingMode:e})}get coordType(){return this.GeoReferenceAtom.coordType}set coordType(e){this.Update({coordType:e})}get sceneCRS(){return this.GeoReferenceAtom.sceneCRS}set sceneCRS(e){this.Update({sceneCRS:e})}get apiCRS(){return this.GeoReferenceAtom.apiCRS}set apiCRS(e){this.Update({apiCRS:e})}get originLocation(){return this.GeoReferenceAtom.originLocation}set originLocation(e){this.Update({originLocation:e})}get originRotation(){return this.GeoReferenceAtom.originRotation}set originRotation(e){this.Update({originRotation:e})}get originScale(){return this.GeoReferenceAtom.originScale}set originScale(e){this.Update({originScale:e})}GetSettingMode(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.GeoReferenceAtom.settingMode}})}SetSettingMode(e){return m(this,void 0,void 0,function*(){return yield this.Update({settingMode:e})})}GetCoordType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.GeoReferenceAtom.coordType}})}SetCoordType(e){return m(this,void 0,void 0,function*(){return yield this.Update({coordType:e})})}GetSceneCRS(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.GeoReferenceAtom.sceneCRS}})}SetSceneCRS(e){return m(this,void 0,void 0,function*(){return yield this.Update({sceneCRS:e})})}GetApiCRS(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.GeoReferenceAtom.apiCRS}})}SetApiCRS(e){return m(this,void 0,void 0,function*(){return yield this.Update({apiCRS:e})})}GetOriginLocation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.GeoReferenceAtom.originLocation}})}SetOriginLocation(e){return m(this,void 0,void 0,function*(){return yield this.Update({originLocation:e})})}GetOriginRotation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.GeoReferenceAtom.originRotation}})}SetOriginRotation(e){return m(this,void 0,void 0,function*(){return yield this.Update({originRotation:e})})}GetOriginScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.GeoReferenceAtom.originScale}})}SetOriginScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({originScale:e})})}GetScheme(){return{GeoReferenceAtom:this.GeoReferenceAtom}}GetData(){return Object.assign(Object.assign({},this.getEid()),this.GeoReferenceAtom)}SetData(e){this.setEid(e),void 0!==e.settingMode&&(this.GeoReferenceAtom.settingMode=e.settingMode),void 0!==e.coordType&&(C.coordType=e.coordType,this.GeoReferenceAtom.coordType=e.coordType),void 0!==e.sceneCRS&&(C.sceneCRS=e.sceneCRS,this.GeoReferenceAtom.sceneCRS=e.sceneCRS),void 0!==e.apiCRS&&(C.apiCRS=e.apiCRS,this.GeoReferenceAtom.apiCRS=e.apiCRS),void 0!==e.originLocation&&(this.GeoReferenceAtom.originLocation=e.originLocation),void 0!==e.originRotation&&(this.GeoReferenceAtom.originRotation=e.originRotation),void 0!==e.originScale&&(this.GeoReferenceAtom.originScale=e.originScale)}generateAtomData(e){var t={},r={};return void 0!==(null==e?void 0:e.settingMode)&&(r.settingMode=e.settingMode),void 0!==(null==e?void 0:e.coordType)&&(r.coordType=e.coordType),void 0!==(null==e?void 0:e.sceneCRS)&&(r.sceneCRS=e.sceneCRS),void 0!==(null==e?void 0:e.apiCRS)&&(r.apiCRS=e.apiCRS),void 0!==(null==e?void 0:e.originLocation)&&(r.originLocation=e.originLocation),void 0!==(null==e?void 0:e.originRotation)&&(r.originRotation=e.originRotation),void 0!==(null==e?void 0:e.originScale)&&(r.originScale=e.originScale),0{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"==typeof t[e]&&void 0===t[e].length?this.generateObjectData(t[e],r[e]):(r[e]=t[e],"sceneCRS"===e?C.sceneCRS=t[e]:"apiCRS"===e?C.apiCRS=t[e]:"coordType"===e&&(C.coordType=t[e])))})}GetValidateRules(){return Object.assign(Object.assign({},this.getEid()),this.GeoReferenceAtom)}Validate(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if("object"!=typeof t)throw i&&i.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj);let r=this.GetValidateRules();if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==t?void 0:t.settingMode)){if("string"!=typeof t.coordType)throw i&&i.func("settingMode "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("settingMode "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.settingMode.find(e=>e===t.settingMode))throw i&&i.func(`settingMode.${t.settingMode} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.settingMode.toString()),new Error(`settingMode.${t.settingMode} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.settingMode.toString())}if(void 0!==(null==t?void 0:t.coordType)){if("string"!=typeof t.coordType)throw i&&i.func("coordType "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("coordType "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.coordTypes.find(e=>e===t.coordType))throw i&&i.func(`coordType.${t.coordType} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordTypes.toString()),new Error(`coordType.${t.coordType} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordTypes.toString())}if(void 0!==(null==t?void 0:t.sceneCRS)&&"string"!=typeof t.sceneCRS)throw i&&i.func("sceneCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("sceneCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(void 0!==(null==t?void 0:t.apiCRS)&&"string"!=typeof t.apiCRS)throw i&&i.func("apiCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("apiCRS "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(void 0!==(null==t?void 0:t.originLocation)){if("object"!=typeof t.originLocation||void 0===t.originLocation.length)throw i&&i.func("originLocation "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("originLocation "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(3!==t.originLocation.filter(e=>"number"==typeof e).length)throw i&&i.func(`originLocation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`),new Error(`originLocation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==t?void 0:t.originRotation)){if("object"!=typeof t.originRotation)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().rotatorErr),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().rotatorErr);let r=this.rotator;if(Object.keys(t.originRotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.originRotation)?void 0:n.pitch)&&("number"!=typeof t.originRotation.pitch||t.originRotation.pitch<-180||180"number"==typeof e).length)throw i&&i.func(`origioriginScalenLocation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`),new Error(`originScale ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}}}class Ei extends G{constructor(e){super(e,bi),this.setType("GeoReference")}}class wi{validateStart(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"object"!=typeof e)throw r&&r.func("opt "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("opt "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}validateCreate(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateUpdate(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateDelete(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateReset(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateDeleteGather(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateGetList(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateCount(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateGetGatherList(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSearchByPoint(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSearchByLine(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSearchByArea(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("data "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("data "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("string"!=typeof t)throw n&&n.func("path "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}}class Si extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"ClusterAPI"}),Object.defineProperty(this,"ClusterValidate",{enumerable:!0,configurable:!0,writable:!0,value:new wi}),Object.defineProperty(this,"defaultMode",{enumerable:!0,configurable:!0,writable:!0,value:"cloud"}),Object.defineProperty(this,"clusterStatus",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"openonclick",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clusterCacheData",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"generatedEntity",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"evnetCacheData",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"countLimit",{enumerable:!0,configurable:!0,writable:!0,value:99}),Object.defineProperty(this,"clusterEventStatus",{enumerable:!0,configurable:!0,writable:!0,value:"none"})}SetLimit(e=99){return m(this,void 0,void 0,function*(){return 99({queryId:e.queryId,gather:e.gather,condition:e.condition}))}},e=(e.mode=void 0!==t.mode?t.mode:"cloud",void 0!==t.url&&(e.url=t.url),yield this.StartApi(this.apiClassName,"StartCluster",e));return e.success&&(this.clusterCacheData=t.filters.attr,this.clusterStatus=!0,void 0!==t.openonclick)&&(this.openonclick=t.openonclick),yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}End(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"EndCluster",{}),t=(0"string"==typeof e).length!==e.length)throw u&&u.func("types "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayString)),new Error("types "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().arrayString));e.forEach(e=>{var t;if(!b.get(e))throw u&&u.func(`types.${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(`types.,${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}}}class Gi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Range"}),Object.defineProperty(this,"CirclePolygon2DAtom",{enumerable:!0,configurable:!0,writable:!0,value:{center:[0,0,0],radius:10}}),Object.defineProperty(this,"RangeEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{shape:"polygon",type:"wave",fillAreaType:"none",height:1,strokeWeight:1,color:"ff0000"}}),Object.defineProperty(this,"Polygon2DAtom",{enumerable:!0,configurable:!0,writable:!0,value:{coordinates:[[[1,2],[1,2],[1,2]],[[1,2],[1,2],[1,2]],[[1,2],[1,2],[1,2]]],coordZ:0}}),this.setObjAtom(this),this.oType="Range",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get center(){return this.CirclePolygon2DAtom.center}set center(e){this.Update({circlePolygon2D:{center:e}})}get radius(){return this.CirclePolygon2DAtom.radius}set radius(e){this.Update({circlePolygon2D:{radius:e}})}get shape(){return this.RangeEntityAtom.shape}set shape(e){this.Update({rangeStyle:{shape:e}})}get sType(){return this.RangeEntityAtom.type}set sType(e){this.Update({rangeStyle:{type:e}})}get fillAreaType(){return this.RangeEntityAtom.fillAreaType}set fillAreaType(e){this.Update({rangeStyle:{fillAreaType:e}})}get height(){return this.RangeEntityAtom.height}set height(e){this.Update({rangeStyle:{height:e}})}get strokeWeight(){return this.RangeEntityAtom.strokeWeight}set strokeWeight(e){this.Update({rangeStyle:{strokeWeight:e}})}get color(){return this.RangeEntityAtom.color}set color(e){this.Update({rangeStyle:{color:e}})}get coordinates(){return this.Polygon2DAtom.coordinates}set coordinates(e){this.Update({polygon2D:{coordinates:e}})}get coordZ(){return this.Polygon2DAtom.coordZ}set coordZ(e){this.Update({polygon2D:{coordZ:e}})}GetCenter(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CirclePolygon2DAtom.center}})}SetCenter(e){return m(this,void 0,void 0,function*(){return yield this.Update({circlePolygon2D:{center:e}})})}GetRadius(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CirclePolygon2DAtom.radius}})}SetRadius(e){return m(this,void 0,void 0,function*(){return yield this.Update({circlePolygon2D:{radius:e}})})}GetShape(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RangeEntityAtom.shape}})}SetShape(e){return m(this,void 0,void 0,function*(){return yield this.Update({rangeStyle:{shape:e}})})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RangeEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({rangeStyle:{type:e}})})}GetFillAreaType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RangeEntityAtom.fillAreaType}})}SetFillAreaType(e){return m(this,void 0,void 0,function*(){return yield this.Update({rangeStyle:{fillAreaType:e}})})}GetHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RangeEntityAtom.height}})}SetHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({rangeStyle:{height:e}})})}GetStrokeWeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RangeEntityAtom.strokeWeight}})}SetStrokeWeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({rangeStyle:{strokeWeight:e}})})}GetColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RangeEntityAtom.color}})}SetColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({rangeStyle:{color:e}})})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Polygon2DAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({polygon2D:{coordinates:e}})})}GetCoordZ(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Polygon2DAtom.coordZ}})}SetCoordZ(e){return m(this,void 0,void 0,function*(){return yield this.Update({polygon2D:{coordZ:e}})})}GetScheme(){return{RangeEntityAtom:this.RangeEntityAtom,CirclePolygon2DAtom:this.CirclePolygon2DAtom,Polygon2DAtom:this.Polygon2DAtom}}GetData(){return"polygon"===this.RangeEntityAtom.shape?Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{rangeStyle:this.RangeEntityAtom,polygon2D:this.Polygon2DAtom}):Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{rangeStyle:this.RangeEntityAtom,circlePolygon2D:this.CirclePolygon2DAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.rangeStyle&&(null!=(t=e.rangeStyle)&&t.color&&(e.rangeStyle.color="object"==typeof e.rangeStyle.color?M(e.rangeStyle.color):M(k(e.rangeStyle.color))),D(this.RangeEntityAtom,e.rangeStyle)),void 0!==e.circlePolygon2D&&D(this.CirclePolygon2DAtom,e.circlePolygon2D),void 0!==e.polygon2D&&D(this.Polygon2DAtom,e.polygon2D)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.rangeStyle){if("object"!=typeof t.rangeStyle)throw i&&i.func("rangeStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rangeStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.RangeEntityAtom;if(Object.keys(t.rangeStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rangeStyle)?void 0:n.shape)){if("string"!=typeof t.rangeStyle.shape)throw i&&i.func("rangeStyle.shape "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("rangeStyle.shape "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.shapeType.find(e=>{return e===(null==(e=t.rangeStyle)?void 0:e.shape)}))throw i&&i.func(`rangeStyle.shape ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.shapeType.toString()),new Error(`rangeStyle.shape ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.shapeType.toString())}if(void 0!==(null==(n=t.rangeStyle)?void 0:n.type)){if("string"!=typeof t.rangeStyle.type)throw i&&i.func("rangeStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("rangeStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.rangeType.find(e=>{return e===(null==(e=t.rangeStyle)?void 0:e.type)}))throw i&&i.func(`rangeStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.rangeType.toString()),new Error(`rangeStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.rangeType.toString())}if(void 0!==(null==(n=t.rangeStyle)?void 0:n.fillAreaType)){if("string"!=typeof t.rangeStyle.fillAreaType)throw i&&i.func("rangeStyle.fillAreaType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("rangeStyle.fillAreaType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.rangeFillAreaType.find(e=>{return e===(null==(e=t.rangeStyle)?void 0:e.fillAreaType)}))throw i&&i.func(`rangeStyle.fillAreaType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.rangeFillAreaType.toString()),new Error(`rangeStyle.fillAreaType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.rangeFillAreaType.toString())}if(void 0!==(null==(n=t.rangeStyle)?void 0:n.height)&&("number"!=typeof t.rangeStyle.height||t.rangeStyle.height<0))throw i&&i.func("rangeStyle.height "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("rangeStyle.height "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.rangeStyle)?void 0:n.strokeWeight)&&("number"!=typeof t.rangeStyle.strokeWeight||t.rangeStyle.strokeWeight<0))throw i&&i.func("rangeStyle.strokeWeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("rangeStyle.strokeWeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.rangeStyle)?void 0:n.color)&&"string"!=typeof t.rangeStyle.color)throw i&&i.func("rangeStyle.color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("rangeStyle.color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa))}if(t.circlePolygon2D){if("object"!=typeof t.circlePolygon2D)throw i&&i.func("circlePolygon2D "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("circlePolygon2D "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.CirclePolygon2DAtom;if(Object.keys(t.circlePolygon2D).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.circlePolygon2D)?void 0:n.center)){if("object"!=typeof t.circlePolygon2D.center||void 0===t.circlePolygon2D.center.length)throw i&&i.func("circlePolygon2D.center "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("circlePolygon2D.center "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(3!==t.circlePolygon2D.center.filter(e=>"number"==typeof e).length)throw i&&i.func(`circlePolygon2D.center ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`),new Error(`circlePolygon2D.center ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==(n=t.circlePolygon2D)?void 0:n.radius)&&("number"!=typeof t.circlePolygon2D.radius||t.circlePolygon2D.radius<0))throw i&&i.func("circlePolygon2D "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("circlePolygon2D "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber))}if(t.polygon2D){if("object"!=typeof t.polygon2D)throw i&&i.func("polygon2D "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("polygon2D "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0===(null==(e=t.polygon2D)?void 0:e.coordinates))throw i&&i.func("polygon2D.coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().required)),new Error("polygon2D.coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required));if("object"!=typeof t.polygon2D.coordinates||void 0===t.polygon2D.coordinates.length)throw i&&i.func("polygon2D.coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("polygon2D.coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(t.polygon2D.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of polygon2D.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polygon2D.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of polygon2D.coordinates's value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polygon2D.coordinates's value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`the value of polygon2D.coordinates's value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of polygon2D.coordinates's value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)})}),void 0!==(null==(n=t.polygon2D)?void 0:n.coordZ)&&"number"!=typeof t.polygon2D.coordZ)throw i&&i.func("polygon2D.coordZ "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number)),new Error("polygon2D.coordZ "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}}}class Oi extends G{constructor(e){super(e,Gi),this.setType("Range")}}class Ti extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Poi"}),Object.defineProperty(this,"PoiEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{markerVisible:!0,markerNormalUrl:"",markerActivateUrl:"",markerSize:[0,0],labelVisible:!0,labelBgImageUrl:"",labelBgSize:[0,0],labelBgOffset:[0,0],labelContent:["","",""],labelContentOffset:[0,0],labelTop:!1,scrollSpeed:0,textBoxWidth:100}}),Object.defineProperty(this,"TransformAtom2D",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0]}}),this.setObjAtom(this),this.oType="Poi",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),e&&this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get textBoxWidth(){return this.PoiEntityAtom.textBoxWidth}set textBoxWidth(e){this.Update({poiStyle:{textBoxWidth:e}})}get scrollSpeed(){return this.PoiEntityAtom.scrollSpeed}set scrollSpeed(e){this.Update({poiStyle:{scrollSpeed:e}})}get location(){return this.TransformAtom2D.location}set location(t){this.Update({location:t}).then(e=>{e.success&&(this.TransformAtom2D.location=t)})}get labelVisible(){return this.PoiEntityAtom.labelVisible}set labelVisible(e){this.Update({poiStyle:{labelVisible:e}})}get markerVisible(){return this.PoiEntityAtom.markerVisible}set markerVisible(e){this.Update({poiStyle:{markerVisible:e}})}get markerSize(){return this.PoiEntityAtom.markerSize}set markerSize(e){this.Update({poiStyle:{markerSize:e}})}get markerNormalUrl(){return this.PoiEntityAtom.markerNormalUrl}set markerNormalUrl(e){this.Update({poiStyle:{markerNormalUrl:e}})}get markerActivateUrl(){return this.PoiEntityAtom.markerActivateUrl}set markerActivateUrl(e){this.Update({poiStyle:{markerActivateUrl:e}})}get labelBgImageUrl(){return this.PoiEntityAtom.labelBgImageUrl}set labelBgImageUrl(e){this.Update({poiStyle:{labelBgImageUrl:e}})}get labelBgSize(){return this.PoiEntityAtom.labelBgSize}set labelBgSize(e){this.Update({poiStyle:{labelBgSize:e}})}get labelBgOffset(){return this.PoiEntityAtom.labelBgOffset}set labelBgOffset(e){this.Update({poiStyle:{labelBgOffset:e}})}get labelContent(){return this.PoiEntityAtom.labelContent}set labelContent(e){this.Update({poiStyle:{labelContent:e}})}get labelContentOffset(){return this.PoiEntityAtom.labelContentOffset}set labelContentOffset(e){this.Update({poiStyle:{labelContentOffset:e}})}get labelTop(){return this.PoiEntityAtom.labelTop}set labelTop(e){this.Update({poiStyle:{labelTop:e}})}GetTextBoxWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.textBoxWidth}})}SetTextBoxWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{textBoxWidth:e}})})}GetScrollSpeed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.scrollSpeed}})}SetScrollSpeed(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{scrollSpeed:e}})})}GetLocation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom2D.location}})}SetLocation(t){return m(this,void 0,void 0,function*(){var e=yield this.Update({location:t});return e.success&&(this.TransformAtom2D.location=t),e})}GetLabelVisible(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.labelVisible}})}SetLabelVisible(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{labelVisible:e}})})}GetMarkerVisible(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.markerVisible}})}SetMarkerVisible(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{markerVisible:e}})})}GetMarkerSize(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.markerSize}})}SetMarkerSize(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{markerSize:e}})})}GetMarkerNormalUrl(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.markerNormalUrl}})}SetMarkerNormalUrl(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{markerNormalUrl:e}})})}GetMarkerActivateUrl(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.markerActivateUrl}})}SetMarkerActivateUrl(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{markerActivateUrl:e}})})}GetLabelBgImageUrl(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.labelBgImageUrl}})}SetLabelBgImageUrl(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{labelBgImageUrl:e}})})}GetLabelBgSize(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.labelBgSize}})}SetLabelBgSize(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{labelBgSize:e}})})}GetLabelBgOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.labelBgOffset}})}SetLabelBgOffset(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{labelBgOffset:e}})})}GetLabelContent(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.labelContent}})}SetLabelContent(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{labelContent:e}})})}GetLabelContentOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.labelContentOffset}})}SetLabelContentOffset(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{labelContentOffset:e}})})}GetLabelTop(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PoiEntityAtom.labelTop}})}SetLabelTop(e){return m(this,void 0,void 0,function*(){return yield this.Update({poiStyle:{labelTop:e}})})}GetScheme(){return{PoiEntityAtom:this.PoiEntityAtom}}getTransform2DEntityData(){return{location:this.location}}setTransform2DEntityData(e){T(this.TransformAtom2D,e)}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransform2DEntityData()),this.getBasicData()),this.getOtherData()),{visible2D:this.GetVisible2DData(),poiStyle:this.PoiEntityAtom})}SetData(e){this.setEid(e),this.setTransform2DEntityData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.visible2D&&this.SetVisible2DData(e.visible2D),void 0!==e.poiStyle&&D(this.PoiEntityAtom,e.poiStyle)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.poiStyle){if("object"!=typeof e.poiStyle)throw i&&i.func("poiStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().objecr)),new Error("poiStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().objecr));let r=this.PoiEntityAtom;if(Object.keys(e.poiStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.poiStyle)?void 0:n.markerVisible)&&"boolean"!=typeof e.poiStyle.markerVisible)throw i&&i.func("poiStyle.markerVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("poiStyle.markerVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=e.poiStyle)?void 0:n.markerNormalUrl)&&"string"!=typeof e.poiStyle.markerNormalUrl)throw i&&i.func("poiStyle.markerNormalUrl "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("poiStyle.markerNormalUrl "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=e.poiStyle)?void 0:n.markerActivateUrl)&&"string"!=typeof e.poiStyle.markerActivateUrl)throw i&&i.func("poiStyle.markerActivateUrl "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("poiStyle.markerActivateUrl "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=e.poiStyle)?void 0:n.markerSize)){if("object"!=typeof e.poiStyle.markerSize||void 0===e.poiStyle.markerSize.length)throw i&&i.func("poiStyle.markerSize "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("poiStyle.markerSize "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.poiStyle.markerSize.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`poiStyle.markerSize ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`poiStyle.markerSize ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null==(n=e.poiStyle)?void 0:n.labelVisible)&&"boolean"!=typeof e.poiStyle.labelVisible)throw i&&i.func("poiStyle.labelVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("poiStyle.labelVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=e.poiStyle)?void 0:n.labelBgImageUrl)&&"string"!=typeof e.poiStyle.labelBgImageUrl)throw i&&i.func("poiStyle.labelBgImageUrl "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("poiStyle.labelBgImageUrl "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=e.poiStyle)?void 0:n.labelBgSize)){if("object"!=typeof e.poiStyle.labelBgSize||void 0===e.poiStyle.labelBgSize.length)throw i&&i.func("poiStyle.labelBgSize "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("poiStyle.labelBgSize "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.poiStyle.labelBgSize.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`poiStyle.labelBgSize ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`poiStyle.labelBgSize ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null==(n=e.poiStyle)?void 0:n.labelBgOffset)){if("object"!=typeof e.poiStyle.labelBgOffset||void 0===e.poiStyle.labelBgOffset.length)throw i&&i.func("poiStyle.labelBgOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("poiStyle.labelBgOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.poiStyle.labelBgOffset.filter(e=>"number"==typeof e).length)throw i&&i.func(`poiStyle.labelBgOffset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`poiStyle.labelBgOffset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(n=e.poiStyle)?void 0:n.labelContent)){if("object"!=typeof e.poiStyle.labelContent||void 0===e.poiStyle.labelContent.length)throw i&&i.func("poiStyle.labelContent "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("poiStyle.labelContent "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(3!==e.poiStyle.labelContent.filter(e=>"string"==typeof e).length)throw i&&i.func(`poiStyle.labelContent ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayStringLength} 3`),new Error(`poiStyle.labelContent ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayStringLength} 3`)}if(void 0!==(null==(n=e.poiStyle)?void 0:n.labelContentOffset)){if("object"!=typeof e.poiStyle.labelContentOffset||void 0===e.poiStyle.labelContentOffset.length)throw i&&i.func("poiStyle.labelContentOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("poiStyle.labelContentOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.poiStyle.labelContentOffset.filter(e=>"number"==typeof e).length)throw i&&i.func(`poiStyle.labelContentOffset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`poiStyle.labelContentOffset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(n=e.poiStyle)?void 0:n.labelTop)&&"boolean"!=typeof e.poiStyle.labelTop)throw i&&i.func("poiStyle.labelTop "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("poiStyle.labelTop "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=e.poiStyle)?void 0:n.scrollSpeed)&&"number"!=typeof e.poiStyle.scrollSpeed)throw i&&i.func("poiStyle.scrollSpeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("poiStyle.scrollSpeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=e.poiStyle)?void 0:n.textBoxWidth)&&"number"!=typeof e.poiStyle.textBoxWidth)throw i&&i.func("poiStyle.textBoxWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("poiStyle.textBoxWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}e.visible2D&&this.validateVisible2D(e.visible2D)}}class Ai extends G{constructor(e){super(e,Ti),this.setType("Poi")}}class Ri extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Path"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"PathAPI"}),Object.defineProperty(this,"PathEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{type:"arrow",width:10,color:"aaff00ff",passColor:"00FBFFFF"}}),Object.defineProperty(this,"PolylineAtom",{enumerable:!0,configurable:!0,writable:!0,value:{coordinates:[[1,2,3],[1,2,3]],bClosed:!1}}),this.setObjAtom(this),this.oType="Path",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get sType(){return this.PathEntityAtom.type}set sType(e){this.Update({pathStyle:{type:e}})}get width(){return this.PathEntityAtom.width}set width(e){this.Update({pathStyle:{width:e}})}get color(){return this.PathEntityAtom.color}set color(e){this.Update({pathStyle:{color:e}})}get passColor(){return this.PathEntityAtom.passColor}set passColor(e){this.Update({pathStyle:{passColor:e}})}get coordinates(){return this.PolylineAtom.coordinates}set coordinates(e){this.Update({polyline:{coordinates:e}})}get bClosed(){return this.PolylineAtom.bClosed}set bClosed(e){this.Update({polyline:{bClosed:e}})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PathEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({pathStyle:{type:e}})})}GetWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PathEntityAtom.width}})}SetWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({pathStyle:{width:e}})})}GetColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PathEntityAtom.color}})}SetColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({pathStyle:{color:e}})})}GetPassColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PathEntityAtom.passColor}})}SetPassColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({pathStyle:{passColor:e}})})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({polyline:{coordinates:e}})})}GetClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineAtom.bClosed}})}SetClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({polyline:{bClosed:e}})})}GetbClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineAtom.bClosed}})}SetbClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({polyline:{bClosed:e}})})}GetScheme(){return{PathEntityAtom:this.PathEntityAtom,PolylineAtom:this.PolylineAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{pathStyle:this.PathEntityAtom,polyline:this.PolylineAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.pathStyle&&(null!=(t=e.pathStyle)&&t.color&&(e.pathStyle.color="object"==typeof e.pathStyle.color?M(e.pathStyle.color):M(k(e.pathStyle.color))),null!=(t=e.pathStyle)&&t.passColor&&(e.pathStyle.passColor="object"==typeof e.pathStyle.passColor?M(e.pathStyle.passColor):M(k(e.pathStyle.passColor))),D(this.PathEntityAtom,e.pathStyle)),void 0!==e.polyline&&D(this.PolylineAtom,e.polyline)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.pathStyle){if("object"!=typeof t.pathStyle)throw i&&i.func("pathStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("pathStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.PathEntityAtom;if(Object.keys(t.pathStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.pathStyle)?void 0:n.type)){if("string"!=typeof t.pathStyle.type)throw i&&i.func("pathStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("pathStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.pathType.find(e=>{return e===(null==(e=t.pathStyle)?void 0:e.type)}))throw i&&i.func(`pathStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.pathType.toString()),new Error(`pathStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.pathType.toString())}if(void 0!==(null==(n=t.pathStyle)?void 0:n.width)&&("number"!=typeof t.pathStyle.width||t.pathStyle.width<0))throw i&&i.func("pathStyle.width "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("pathStyle.width "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.pathStyle)?void 0:n.color)&&"string"!=typeof t.pathStyle.color)throw i&&i.func("pathStyle.color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("pathStyle.color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa));if(void 0!==(null==(n=t.pathStyle)?void 0:n.passColor)&&"string"!=typeof t.pathStyle.passColor)throw i&&i.func("pathStyle.passColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("pathStyle.passColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa))}if(t.polyline){if("object"!=typeof t.polyline)throw i&&i.func("polyline "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("polyline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0===(null==(e=t.polyline)?void 0:e.coordinates))throw i&&i.func("polyline.coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().required)),new Error("polyline.coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required));if("object"!=typeof t.polyline.coordinates||void 0===t.polyline.coordinates.length)throw i&&i.func("polyline.coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("polyline.coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(t.polyline.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of polyline.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polyline.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`the value of polyline.coordinates ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polyline.coordinates ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}),void 0!==(null==(n=t.polyline)?void 0:n.bClosed)&&"boolean"!=typeof t.polyline.bClosed)throw i&&i.func("polyline.bClosed "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("polyline.bClosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean))}}}class Pi extends G{constructor(e){super(e,Ri),this.setType("Path")}}class Di extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Text3D"}),Object.defineProperty(this,"Text3DEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{text:"51WORLD",color:"00FF00FF",type:"plain",outline:.2,portrait:!1,space:1,bounce:0,faceToCamera:!1}}),this.setObjAtom(this),this.oType="Text3D",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get text(){return this.Text3DEntityAtom.text}set text(e){this.Update({text3DStyle:{text:e}})}get color(){return this.Text3DEntityAtom.color}set color(e){this.Update({text3DStyle:{color:e}})}get sType(){return this.Text3DEntityAtom.type}set sType(e){this.Update({text3DStyle:{type:e}})}get outline(){return this.Text3DEntityAtom.outline}set outline(e){this.Update({text3DStyle:{outline:e}})}get portrait(){return this.Text3DEntityAtom.portrait}set portrait(e){this.Update({text3DStyle:{portrait:e}})}get space(){return this.Text3DEntityAtom.space}set space(e){this.Update({text3DStyle:{space:e}})}get bounce(){return this.Text3DEntityAtom.bounce}set bounce(e){this.Update({text3DStyle:{bounce:e}})}get faceToCamera(){return this.Text3DEntityAtom.faceToCamera}set faceToCamera(e){this.Update({text3DStyle:{faceToCamera:e}})}GetText(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.text}})}SetText(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{text:e}})})}GetColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.color}})}SetColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{color:e}})})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{type:e}})})}GetOutline(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.outline}})}SetOutline(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{outline:e}})})}GetPortrait(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.portrait}})}SetPortrait(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{portrait:e}})})}GetSpace(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.space}})}SetSpace(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{space:e}})})}GetBounce(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.bounce}})}SetBounce(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{bounce:e}})})}GetFaceToCamera(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Text3DEntityAtom.faceToCamera}})}SetFaceToCamera(e){return m(this,void 0,void 0,function*(){return yield this.Update({text3DStyle:{faceToCamera:e}})})}GetScheme(){return{Text3DEntityAtom:this.Text3DEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{text3DStyle:this.Text3DEntityAtom})}SetData(e){var t;this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.text3DStyle&&(null!=(t=e.text3DStyle)&&t.color&&(e.text3DStyle.color="object"==typeof e.text3DStyle.color?M(e.text3DStyle.color):M(k(e.text3DStyle.color))),D(this.Text3DEntityAtom,e.text3DStyle))}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.text3DStyle){if("object"!=typeof t.text3DStyle)throw i&&i.func("text3DStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("text3DStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.Text3DEntityAtom;if(Object.keys(t.text3DStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.text3DStyle)?void 0:n.text)&&"string"!=typeof t.text3DStyle.text)throw i&&i.func("text3DStyle.text "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("text3DStyle.text "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=t.text3DStyle)?void 0:n.color)&&"string"!=typeof t.text3DStyle.color)throw i&&i.func("text3DStyle.color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("text3DStyle.color "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa));if(void 0!==(null==(n=t.text3DStyle)?void 0:n.type)){if("string"!=typeof t.text3DStyle.type)throw i&&i.func("text3DStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("text3DStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.text3DType.find(e=>{return e===(null==(e=t.text3DStyle)?void 0:e.type)}))throw i&&i.func(`text3DStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.text3DType.toString()),new Error(`text3DStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.text3DType.toString())}if(void 0!==(null==(n=t.text3DStyle)?void 0:n.outline)){if("number"!=typeof t.text3DStyle.outline)throw i&&i.func("text3DStyle.outline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("text3DStyle.outline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(t.text3DStyle.outline<0||1{var t;if(void 0===u[e])throw l&&l.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.particleType){if("string"!=typeof t.particleType)throw l&&l.func("particleType "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string)),new Error("particleType "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().string));if(!C.particleType.find(e=>e===t.particleType))throw l&&l.func(`particleType ${null==(a=C.getInstance())?void 0:a.GetCommonErr().range} `+C.particleType.toString()),new Error(`particleType ${null==(s=C.getInstance())?void 0:s.GetCommonErr().range} `+C.particleType.toString())}}}class xi extends G{constructor(e){super(e,ki),this.setType("Particle")}}class Vi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"HighlightArea"}),Object.defineProperty(this,"HighlightAreaEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{interiorColor:"ffffffaa",exteriorColor:"c0c0c0aa",exteriorOutlineColor:"000000aa",exteriorSaturation:0,exteriorBrightness:0,exteriorContrast:0}}),Object.defineProperty(this,"Polygon2DAtom",{enumerable:!0,configurable:!0,writable:!0,value:{coordinates:[[[1,2],[1,2],[1,2]],[[1,2],[1,2],[1,2]],[[1,2],[1,2],[1,2]]],coordZ:0}}),this.setObjAtom(this),this.oType="HighlightArea",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get interiorColor(){return this.HighlightAreaEntityAtom.interiorColor}set interiorColor(e){this.Update({highlightAreaStyle:{interiorColor:e}})}get exteriorColor(){return this.HighlightAreaEntityAtom.exteriorColor}set exteriorColor(e){this.Update({highlightAreaStyle:{exteriorColor:e}})}get exteriorOutlineColor(){return this.HighlightAreaEntityAtom.exteriorOutlineColor}set exteriorOutlineColor(e){this.Update({highlightAreaStyle:{exteriorOutlineColor:e}})}get exteriorSaturation(){return this.HighlightAreaEntityAtom.exteriorSaturation}set exteriorSaturation(e){this.Update({highlightAreaStyle:{exteriorSaturation:e}})}get exteriorBrightness(){return this.HighlightAreaEntityAtom.exteriorBrightness}set exteriorBrightness(e){this.Update({highlightAreaStyle:{exteriorBrightness:e}})}get exteriorContrast(){return this.HighlightAreaEntityAtom.exteriorContrast}set exteriorContrast(e){this.Update({highlightAreaStyle:{exteriorContrast:e}})}get coordinates(){return this.Polygon2DAtom.coordinates}set coordinates(e){this.Update({polygon2D:{coordinates:e}})}get coordZ(){return this.Polygon2DAtom.coordZ}set coordZ(e){this.Update({polygon2D:{coordZ:e}})}GetInteriorColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HighlightAreaEntityAtom.interiorColor}})}SetInteriorColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({highlightAreaStyle:{interiorColor:e}})})}GetExteriorColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HighlightAreaEntityAtom.exteriorColor}})}SetExteriorColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({highlightAreaStyle:{exteriorColor:e}})})}GetExteriorOutlineColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HighlightAreaEntityAtom.exteriorOutlineColor}})}SetExteriorOutlineColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({highlightAreaStyle:{exteriorOutlineColor:e}})})}GetExteriorSaturation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HighlightAreaEntityAtom.exteriorSaturation}})}SetExteriorSaturation(e){return m(this,void 0,void 0,function*(){return yield this.Update({highlightAreaStyle:{exteriorSaturation:e}})})}GetExteriorBrightness(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HighlightAreaEntityAtom.exteriorBrightness}})}SetExteriorBrightness(e){return m(this,void 0,void 0,function*(){return yield this.Update({highlightAreaStyle:{exteriorBrightness:e}})})}GetExteriorContrast(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HighlightAreaEntityAtom.exteriorContrast}})}SetExteriorContrast(e){return m(this,void 0,void 0,function*(){return yield this.Update({highlightAreaStyle:{exteriorContrast:e}})})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Polygon2DAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({polygon2D:{coordinates:e}})})}GetCoordZ(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.Polygon2DAtom.coordZ}})}SetCoordZ(e){return m(this,void 0,void 0,function*(){return yield this.Update({polygon2D:{coordZ:e}})})}GetScheme(){return{HighlightAreaEntityAtom:this.HighlightAreaEntityAtom,Polygon2DAtom:this.Polygon2DAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{highlightAreaStyle:this.HighlightAreaEntityAtom,polygon2D:this.Polygon2DAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.highlightAreaStyle&&(null!=(t=e.highlightAreaStyle)&&t.interiorColor&&(e.highlightAreaStyle.interiorColor="object"==typeof e.highlightAreaStyle.interiorColor?M(e.highlightAreaStyle.interiorColor):M(k(e.highlightAreaStyle.interiorColor))),null!=(t=e.highlightAreaStyle)&&t.exteriorColor&&(e.highlightAreaStyle.exteriorColor="object"==typeof e.highlightAreaStyle.exteriorColor?M(e.highlightAreaStyle.exteriorColor):M(k(e.highlightAreaStyle.exteriorColor))),null!=(t=e.highlightAreaStyle)&&t.exteriorOutlineColor&&(e.highlightAreaStyle.exteriorOutlineColor="object"==typeof e.highlightAreaStyle.exteriorOutlineColor?M(e.highlightAreaStyle.exteriorOutlineColor):M(k(e.highlightAreaStyle.exteriorOutlineColor))),D(this.HighlightAreaEntityAtom,e.highlightAreaStyle)),void 0!==e.polygon2D&&D(this.Polygon2DAtom,e.polygon2D)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.highlightAreaStyle){if("object"!=typeof e.highlightAreaStyle)throw i&&i.func("highlightAreaStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("highlightAreaStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.HighlightAreaEntityAtom;if(Object.keys(e.highlightAreaStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.highlightAreaStyle)?void 0:n.interiorColor)&&"string"!=typeof e.highlightAreaStyle.interiorColor)throw i&&i.func("highlightAreaStyle.interiorColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("highlightAreaStyle.interiorColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa));if(void 0!==(null==(n=e.highlightAreaStyle)?void 0:n.exteriorColor)&&"string"!=typeof e.highlightAreaStyle.exteriorColor)throw i&&i.func("highlightAreaStyle.exteriorColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("highlightAreaStyle.exteriorColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa));if(void 0!==(null==(n=e.highlightAreaStyle)?void 0:n.exteriorOutlineColor)&&"string"!=typeof e.highlightAreaStyle.exteriorOutlineColor)throw i&&i.func("highlightAreaStyle.exteriorOutlineColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa)),new Error("highlightAreaStyle.exteriorOutlineColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().hexa));if(void 0!==(null==(n=e.highlightAreaStyle)?void 0:n.exteriorSaturation)){if("number"!=typeof e.highlightAreaStyle.exteriorSaturation)throw i&&i.func("highlightAreaStyle.exteriorSaturation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("highlightAreaStyle.exteriorSaturation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(e.highlightAreaStyle.exteriorSaturation<-100||100{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of polygon2D.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polygon2D.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of polygon2D.coordinates's value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polygon2D.coordinates's value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`the value of polygon2D.coordinates's value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of polygon2D.coordinates's value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)})}),void 0!==(null==(n=e.polygon2D)?void 0:n.coordZ)&&"number"!=typeof e.polygon2D.coordZ)throw i&&i.func("polygon2D.coordZ "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("polygon2D.coordZ "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}}}class _i extends G{constructor(e){super(e,Vi),this.setType("HighlightArea")}}class Li extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"HeatMap"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"HeatMapAPI"}),Object.defineProperty(this,"HeatMapEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{type:"fit",brushDiameter:30,mappingValueRange:[1,100],gradientSetting:["00ffff","00ff00","ffff00","ff8900","ff0000"]}}),Object.defineProperty(this,"PointValueAtom",{enumerable:!0,configurable:!0,writable:!0,value:{features:[{point:[0,0,0],value:40},{point:[1,1,1],value:30}]}}),this.setObjAtom(this),this.oType="HeatMap",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get sType(){return this.HeatMapEntityAtom.type}set sType(e){this.Update({heatMapStyle:{type:e}})}get brushDiameter(){return this.HeatMapEntityAtom.brushDiameter}set brushDiameter(e){this.Update({heatMapStyle:{brushDiameter:e}})}get mappingValueRange(){return this.HeatMapEntityAtom.mappingValueRange}set mappingValueRange(e){this.Update({heatMapStyle:{mappingValueRange:e}})}get gradientSetting(){return this.HeatMapEntityAtom.gradientSetting}set gradientSetting(e){this.Update({heatMapStyle:{gradientSetting:e}})}get features(){return this.PointValueAtom.features}set features(e){this.Update({points:{features:e}})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HeatMapEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({heatMapStyle:{type:e}})})}GetBrushDiameter(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HeatMapEntityAtom.brushDiameter}})}SetBrushDiameter(e){return m(this,void 0,void 0,function*(){return yield this.Update({heatMapStyle:{brushDiameter:e}})})}GetMappingValueRange(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HeatMapEntityAtom.mappingValueRange}})}SetMappingValueRange(e){return m(this,void 0,void 0,function*(){return yield this.Update({heatMapStyle:{mappingValueRange:e}})})}GetGradientSetting(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.HeatMapEntityAtom.gradientSetting}})}SetGradientSetting(e){return m(this,void 0,void 0,function*(){return yield this.Update({heatMapStyle:{gradientSetting:e}})})}GetFeatures(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PointValueAtom.features}})}SetFeatures(e){return m(this,void 0,void 0,function*(){return yield this.Update({points:{features:e}})})}GetScheme(){return{HeatMapEntityAtom:this.HeatMapEntityAtom,PointValueAtom:this.PointValueAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{heatMapStyle:this.HeatMapEntityAtom,points:this.PointValueAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.heatMapStyle&&(null!=(t=e.heatMapStyle)&&t.gradientSetting&&(e.heatMapStyle.gradientSetting=e.heatMapStyle.gradientSetting.map(e=>M("object"==typeof e?e:k(e)))),D(this.HeatMapEntityAtom,e.heatMapStyle)),void 0!==e.points&&D(this.PointValueAtom,e.points)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0M("object"==typeof e?e:k(e)))),D(s,e.heatMapStyle)),0"number"==typeof e).length)throw e&&e.func(`location ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 3`),new Error(`location ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLengt} 3`)}if(!this.eid)return{success:!1,message:"Please add first"};let e=yield this.StartApi(this.apiClassName,"GetHeatMapEntity",{eid:this.eid,location:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Filter(t){var r;return m(this,void 0,void 0,function*(){if(null!=(r=C.getInstance())&&r.GetValiDateState()){let e=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t||void 0===t.length)throw e&&e.func("filterValueRange "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("filterValueRange "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));if(2!==t.filter(e=>"number"==typeof e).length)throw e&&e.func(`filterValueRange ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 2`),new Error(`filterValueRange ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLengt} 2`)}if(!this.eid)return{success:!1,message:"Please add first"};let e=yield this.StartApi(this.apiClassName,"FilterHeatMapEntity",{eid:this.eid,filterValueRange:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnFilter(){return m(this,void 0,void 0,function*(){var e;return this.eid?(e=yield this.StartApi(this.apiClassName,"UnFilterHeatMapEntity",{eid:this.eid}),yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)):{success:!1,message:"Please add first"}})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{heatMapStyle:this.HeatMapEntityAtom,points:this.PointValueAtom})}Validate(t){var e,r;let n=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t)throw n&&n.func(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj),new Error(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj);let i=this.GetValidateRules();if(Object.keys(t).forEach(e=>{var t;if(void 0===i[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.heatMapStyle){if("object"!=typeof t.heatMapStyle)throw n&&n.func("heatMapStyle "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("heatMapStyle "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));let r=this.HeatMapEntityAtom;if(Object.keys(t.heatMapStyle).forEach(e=>{var t;if(void 0===r[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(e=t.heatMapStyle)?void 0:e.type)){if("string"!=typeof t.heatMapStyle.type)throw n&&n.func("heatMapStyle.type "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("heatMapStyle.type "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.heatmapType.find(e=>{return e===(null==(e=t.heatMapStyle)?void 0:e.type)}))throw n&&n.func(`heatMapStyle.type ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.heatmapType.toString()),new Error(`heatMapStyle.type ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.heatmapType.toString())}if(void 0!==(null==(e=t.heatMapStyle)?void 0:e.brushDiameter)&&"number"!=typeof t.heatMapStyle.brushDiameter)throw n&&n.func("heatMapStyle.brushDiameter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber)),new Error("heatMapStyle.brushDiameter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber));if(void 0!==(null==(e=t.heatMapStyle)?void 0:e.mappingValueRange)){if("object"!=typeof t.heatMapStyle.mappingValueRange||void 0===t.heatMapStyle.mappingValueRange.length)throw n&&n.func("heatMapStyle.mappingValueRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("heatMapStyle.mappingValueRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(2!=t.heatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw n&&n.func(`heatMapStyle.mappingValueRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`),new Error(`heatMapStyle.mappingValueRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(e=t.heatMapStyle)?void 0:e.gradientSetting)){if("object"!=typeof t.heatMapStyle.gradientSetting||void 0===t.heatMapStyle.gradientSetting.length)throw n&&n.func("heatMapStyle.gradientSetting "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("heatMapStyle.gradientSetting "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(5!=t.heatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw n&&n.func(`the value of heatMapStyle.gradientSetting ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayHEXALength} 5`),new Error(`the value of heatMapStyle.gradientSetting ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayHEXALength} 5`)}}if(void 0!==t.points){if("object"!=typeof t.points)throw n&&n.func("points "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("points "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if(void 0!==(null==(r=t.points)?void 0:r.features)){if("object"!=typeof t.points.features||void 0===t.points.features.length)throw n&&n.func("points.features "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("points.features "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));t.points.features.forEach(e=>{var t;if("object"!=typeof e)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0===e.point||void 0===e.value)throw n&&n.func("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if(Object.keys(e).forEach(e=>{var t;if("point"!==e&&"value"!==e)throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.point||void 0===e.point.length)throw n&&n.func("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.point.filter(e=>"number"==typeof e).length)throw n&&n.func(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("the value of points.features "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))})}}}}class Ni extends G{constructor(e){super(e,Li),this.setType("HeatMap")}}class Ui extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ColumnarHeatMap"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"ColumnarHeatMapAPI"}),Object.defineProperty(this,"ColumnarHeatMapEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{type:"cube",brushDiameter:30,mappingValueRange:[1,100],columnarWidth:10,mappingHeightRange:[1,100],enableGap:!1,gradientSetting:["00ffff","00ff00","ffff00","ff8900","ff0000"]}}),Object.defineProperty(this,"PointValueAtom",{enumerable:!0,configurable:!0,writable:!0,value:{features:[{point:[0,0,0],value:40},{point:[1,1,1],value:30}]}}),this.setObjAtom(this),this.oType="ColumnarHeatMap",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get sType(){return this.ColumnarHeatMapEntityAtom.type}set sType(e){this.Update({columnarHeatMapStyle:{type:e}})}get brushDiameter(){return this.ColumnarHeatMapEntityAtom.brushDiameter}set brushDiameter(e){this.Update({columnarHeatMapStyle:{brushDiameter:e}})}get mappingValueRange(){return this.ColumnarHeatMapEntityAtom.mappingValueRange}set mappingValueRange(e){this.Update({columnarHeatMapStyle:{mappingValueRange:e}})}get columnarWidth(){return this.ColumnarHeatMapEntityAtom.columnarWidth}set columnarWidth(e){this.Update({columnarHeatMapStyle:{columnarWidth:e}})}get mappingHeightRange(){return this.ColumnarHeatMapEntityAtom.mappingHeightRange}set mappingHeightRange(e){this.Update({columnarHeatMapStyle:{mappingHeightRange:e}})}get enableGap(){return this.ColumnarHeatMapEntityAtom.enableGap}set enableGap(e){this.Update({columnarHeatMapStyle:{enableGap:e}})}get gradientSetting(){return this.ColumnarHeatMapEntityAtom.gradientSetting}set gradientSetting(e){this.Update({columnarHeatMapStyle:{gradientSetting:e}})}get features(){return this.PointValueAtom.features}set features(e){this.Update({points:{features:e}})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ColumnarHeatMapEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({columnarHeatMapStyle:{type:e}})})}GetBrushDiameter(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ColumnarHeatMapEntityAtom.brushDiameter}})}SetBrushDiameter(e){return m(this,void 0,void 0,function*(){return yield this.Update({columnarHeatMapStyle:{brushDiameter:e}})})}GetMappingValueRange(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ColumnarHeatMapEntityAtom.mappingValueRange}})}SetMappingValueRange(e){return m(this,void 0,void 0,function*(){return yield this.Update({columnarHeatMapStyle:{mappingValueRange:e}})})}GetColumnarWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ColumnarHeatMapEntityAtom.columnarWidth}})}SetColumnarWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({columnarHeatMapStyle:{columnarWidth:e}})})}GetMappingHeightRange(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ColumnarHeatMapEntityAtom.mappingHeightRange}})}SetMappingHeightRange(e){return m(this,void 0,void 0,function*(){return yield this.Update({columnarHeatMapStyle:{mappingHeightRange:e}})})}GetEnableGap(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ColumnarHeatMapEntityAtom.enableGap}})}SetEnableGap(e){return m(this,void 0,void 0,function*(){return yield this.Update({columnarHeatMapStyle:{enableGap:e}})})}GetGradientSetting(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ColumnarHeatMapEntityAtom.gradientSetting}})}SetGradientSetting(e){return m(this,void 0,void 0,function*(){return yield this.Update({columnarHeatMapStyle:{gradientSetting:e}})})}GetFeatures(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PointValueAtom.features}})}SetFeatures(e){return m(this,void 0,void 0,function*(){return yield this.Update({points:{features:e}})})}GetScheme(){return{ColumnarHeatMapEntityAtom:this.ColumnarHeatMapEntityAtom,PointValueAtom:this.PointValueAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{columnarHeatMapStyle:this.ColumnarHeatMapEntityAtom,points:this.PointValueAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.columnarHeatMapStyle&&(null!=(t=e.columnarHeatMapStyle)&&t.gradientSetting&&(e.columnarHeatMapStyle.gradientSetting=e.columnarHeatMapStyle.gradientSetting.map(e=>M("object"==typeof e?e:k(e)))),D(this.ColumnarHeatMapEntityAtom,e.columnarHeatMapStyle)),void 0!==e.points&&D(this.PointValueAtom,e.points)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0M("object"==typeof e?e:k(e)))),D(s,e.columnarHeatMapStyle)),0"number"==typeof e).length)throw e&&e.func(`location ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 3`),new Error(`location ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLengt} 3`)}if(!this.eid)return{success:!1,message:"Please add first"};let e=yield this.StartApi(this.apiClassName,"GetColumnarHeatMapEntity",{eid:this.eid,location:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Filter(t){var r;return m(this,void 0,void 0,function*(){if(null!=(r=C.getInstance())&&r.GetValiDateState()){let e=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t||void 0===t.length)throw e&&e.func("filterValueRange "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("filterValueRange "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));if(2!==t.filter(e=>"number"==typeof e).length)throw e&&e.func(`filterValueRange ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 2`),new Error(`filterValueRange ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLengt} 2`)}if(!this.eid)return{success:!1,message:"Please add first"};let e=yield this.StartApi(this.apiClassName,"FilterColumnarHeatMapEntity",{eid:this.eid,filterValueRange:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnFilter(){return m(this,void 0,void 0,function*(){var e;return this.eid?(e=yield this.StartApi(this.apiClassName,"UnFilterColumnarHeatMapEntity",{eid:this.eid}),yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)):{success:!1,message:"Please add first"}})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{columnarHeatMapStyle:this.ColumnarHeatMapEntityAtom,points:this.PointValueAtom})}Validate(t){var e,r;let n=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t)throw n&&n.func(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj),new Error(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj);let i=this.GetValidateRules();if(Object.keys(t).forEach(e=>{var t;if(void 0===i[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.columnarHeatMapStyle){if("object"!=typeof t.columnarHeatMapStyle)throw n&&n.func("columnarHeatMapStyle "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("columnarHeatMapStyle "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));let r=this.ColumnarHeatMapEntityAtom;if(Object.keys(t.columnarHeatMapStyle).forEach(e=>{var t;if(void 0===r[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(e=t.columnarHeatMapStyle)?void 0:e.type)){if("string"!=typeof t.columnarHeatMapStyle.type)throw n&&n.func("columnarHeatMapStyle.type "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("columnarHeatMapStyle.type "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.columnarheatmapType.find(e=>{return e===(null==(e=t.columnarHeatMapStyle)?void 0:e.type)}))throw n&&n.func(`columnarHeatMapStyle.type ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.columnarheatmapType.toString()),new Error(`columnarHeatMapStyle.type ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.columnarheatmapType.toString())}if(void 0!==(null==(e=t.columnarHeatMapStyle)?void 0:e.brushDiameter)&&("number"!=typeof t.columnarHeatMapStyle.brushDiameter||t.columnarHeatMapStyle.brushDiameter<0))throw n&&n.func("columnarHeatMapStyle.brushDiameter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber)),new Error("columnarHeatMapStyle.brushDiameter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber));if(void 0!==(null==(e=t.columnarHeatMapStyle)?void 0:e.columnarWidth)&&"number"!=typeof t.columnarHeatMapStyle.columnarWidth)throw n&&n.func("columnarHeatMapStyle.columnarWidth "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber)),new Error("columnarHeatMapStyle.columnarWidth "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber));if(void 0!==(null==(e=t.columnarHeatMapStyle)?void 0:e.mappingValueRange)){if("object"!=typeof t.columnarHeatMapStyle.mappingValueRange||void 0===t.columnarHeatMapStyle.mappingValueRange.length)throw n&&n.func("columnarHeatMapStyle.mappingValueRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("columnarHeatMapStyle.mappingValueRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(2!=t.columnarHeatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw n&&n.func(`columnarHeatMapStyle.mappingValueRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`),new Error(`columnarHeatMapStyle.mappingValueRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(e=t.columnarHeatMapStyle)?void 0:e.mappingHeightRange)){if("object"!=typeof t.columnarHeatMapStyle.mappingHeightRange||void 0===t.columnarHeatMapStyle.mappingHeightRange.length)throw n&&n.func("columnarHeatMapStyle.mappingHeightRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("columnarHeatMapStyle.mappingHeightRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(2!=t.columnarHeatMapStyle.mappingHeightRange.filter(e=>"number"==typeof e&&0<=e).length)throw n&&n.func(`columnarHeatMapStyle.mappingHeightRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`columnarHeatMapStyle.mappingHeightRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null==(e=t.columnarHeatMapStyle)?void 0:e.enableGap)&&"boolean"!=typeof t.columnarHeatMapStyle.enableGap)throw n&&n.func("columnarHeatMapStyle.enableGap "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("columnarHeatMapStyle.enableGap "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean));if(void 0!==(null==(e=t.columnarHeatMapStyle)?void 0:e.gradientSetting)){if("object"!=typeof t.columnarHeatMapStyle.gradientSetting||void 0===t.columnarHeatMapStyle.gradientSetting.length)throw n&&n.func("columnarHeatMapStyle.gradientSetting "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("columnarHeatMapStyle.gradientSetting "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(5!=t.columnarHeatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw n&&n.func(`columnarHeatMapStyle.gradientSetting ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayHEXALength} 5`),new Error(`columnarHeatMapStyle.gradientSetting ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayHEXALength} 5`)}}if(void 0!==t.points){if("object"!=typeof t.points)throw n&&n.func("points "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("points "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if(void 0!==(null==(r=t.points)?void 0:r.features)){if("object"!=typeof t.points.features||void 0===t.points.features.length)throw n&&n.func("points.features "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("points.features "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));t.points.features.forEach(e=>{var t;if("object"!=typeof e)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0===e.point||void 0===e.value)throw n&&n.func("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if(Object.keys(e).forEach(e=>{var t;if("point"!==e&&"value"!==e)throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.point||void 0===e.point.length)throw n&&n.func("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.point.filter(e=>"number"==typeof e).length)throw n&&n.func(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("the value of points.features "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))})}}}}class Fi extends G{constructor(e){super(e,Ui),this.setType("ColumnarHeatMap")}}class Bi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Window"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WindowAPI"}),Object.defineProperty(this,"WindowEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{url:"",size:[600,510],offset:[0,0]}}),Object.defineProperty(this,"TransformAtom2D",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0]}}),this.setObjAtom(this),this.oType="Window",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get location(){return this.TransformAtom2D.location}set location(t){this.Update({location:t}).then(e=>{e.success&&(this.TransformAtom2D.location=t)})}get url(){return this.WindowEntityAtom.url}set url(e){this.Update({windowStyle:{url:e}})}get size(){return this.WindowEntityAtom.size}set size(e){this.Update({windowStyle:{size:e}})}get offset(){return this.WindowEntityAtom.offset}set offset(e){this.Update({windowStyle:{offset:e}})}GetUrl(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WindowEntityAtom.url}})}SetUrl(e){return m(this,void 0,void 0,function*(){return yield this.Update({windowStyle:{url:e}})})}GetSize(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WindowEntityAtom.size}})}SetSize(e){return m(this,void 0,void 0,function*(){return yield this.Update({windowStyle:{size:e}})})}GetOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WindowEntityAtom.offset}})}SetOffset(e){return m(this,void 0,void 0,function*(){return yield this.Update({windowStyle:{offset:e}})})}GetLocation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.TransformAtom2D.location}})}SetLocation(t){return m(this,void 0,void 0,function*(){var e=yield this.Update({location:t});return e.success&&(this.TransformAtom2D.location=t),e})}GetScheme(){return{WindowEntityAtom:this.WindowEntityAtom}}getTransform2DEntityData(){return{location:this.location}}setTransform2DEntityData(e){T(this.TransformAtom2D,e)}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransform2DEntityData()),this.getBasicData()),this.getOtherData()),{visible2D:this.GetVisible2DData(),windowStyle:this.WindowEntityAtom})}SetData(e){this.setEid(e),this.setTransform2DEntityData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.visible2D&&this.SetVisible2DData(e.visible2D),void 0!==e.windowStyle&&D(this.WindowEntityAtom,e.windowStyle)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),e.windowStyle){if("object"!=typeof e.windowStyle)throw i&&i.func("windowStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("windowStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.WindowEntityAtom;if(Object.keys(e.windowStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.windowStyle)?void 0:n.url)&&"string"!=typeof e.windowStyle.url)throw i&&i.func("windowStyle.url "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("windowStyle.url "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=e.windowStyle)?void 0:n.size)){if("object"!=typeof e.windowStyle.size||void 0===e.windowStyle.size.length)throw i&&i.func("windowStyle.size "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("windowStyle.size "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.windowStyle.size.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`windowStyle.size ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`windowStyle.size ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null==(n=e.windowStyle)?void 0:n.offset)){if("object"!=typeof e.windowStyle.offset||void 0===e.windowStyle.offset.length)throw i&&i.func("windowStyle.offset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("windowStyle.offset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.windowStyle.offset.filter(e=>"number"==typeof e).length)throw i&&i.func(`windowStyle.offset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`windowStyle.offset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}}e.visible2D&&this.validateVisible2D(e.visible2D)}}class Wi extends G{constructor(e){super(e,Bi),this.setType("Window")}}class Hi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Viewshed"}),Object.defineProperty(this,"ViewShedEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{visibleColor:"00FF00FF",hiddenColor:"FF0000FF",outline:!0,fieldOfView:60,radius:200}}),this.setObjAtom(this),this.oType="Viewshed",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get visibleColor(){return this.ViewShedEntityAtom.visibleColor}set visibleColor(e){this.Update({viewshedStyle:{visibleColor:e}})}get hiddenColor(){return this.ViewShedEntityAtom.hiddenColor}set hiddenColor(e){this.Update({viewshedStyle:{hiddenColor:e}})}get outline(){return this.ViewShedEntityAtom.outline}set outline(e){this.Update({viewshedStyle:{outline:e}})}get fieldOfView(){return this.ViewShedEntityAtom.fieldOfView}set fieldOfView(e){this.Update({viewshedStyle:{fieldOfView:e}})}get radius(){return this.ViewShedEntityAtom.radius}set radius(e){this.Update({viewshedStyle:{radius:e}})}GetVisibleColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ViewShedEntityAtom.visibleColor}})}SetVisibleColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({viewshedStyle:{visibleColor:e}})})}GetHiddenColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ViewShedEntityAtom.hiddenColor}})}SetHiddenColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({viewshedStyle:{hiddenColor:e}})})}GetOutline(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ViewShedEntityAtom.outline}})}SetOutline(e){return m(this,void 0,void 0,function*(){return yield this.Update({viewshedStyle:{outline:e}})})}GetFieldOfView(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ViewShedEntityAtom.fieldOfView}})}SetFieldOfView(e){return m(this,void 0,void 0,function*(){return yield this.Update({viewshedStyle:{fieldOfView:e}})})}GetRadius(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ViewShedEntityAtom.radius}})}SetRadius(e){return m(this,void 0,void 0,function*(){return yield this.Update({viewshedStyle:{radius:e}})})}GetScheme(){return{ViewShedEntityAtom:this.ViewShedEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{viewshedStyle:this.ViewShedEntityAtom})}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.viewshedStyle&&D(this.ViewShedEntityAtom,e.viewshedStyle)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),e.viewshedStyle){if("object"!=typeof e.viewshedStyle)throw i&&i.func("viewshedStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("viewshedStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ViewShedEntityAtom;if(Object.keys(e.viewshedStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.viewshedStyle)?void 0:n.fieldOfView)){if("number"!=typeof e.viewshedStyle.fieldOfView)throw i&&i.func("viewshedStyle.fieldOfView "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("viewshedStyle.fieldOfView "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(e.viewshedStyle.fieldOfView<0||120"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get sType(){return this.ParabolaEntityAtom.type}set sType(e){this.Update({parabolaStyle:{type:e}})}get topHeight(){return this.ParabolaEntityAtom.topHeight}set topHeight(e){this.Update({parabolaStyle:{topHeight:e}})}get topScale(){return this.ParabolaEntityAtom.topScale}set topScale(e){this.Update({parabolaStyle:{topScale:e}})}get width(){return this.ParabolaEntityAtom.width}set width(e){this.Update({parabolaStyle:{width:e}})}get color(){return this.ParabolaEntityAtom.color}set color(e){this.Update({parabolaStyle:{color:e}})}get gather(){return this.ParabolaEntityAtom.gather}set gather(e){this.Update({parabolaStyle:{gather:e}})}get coordinates(){return this.PolylineAtom.coordinates}set coordinates(e){this.Update({polyline:{coordinates:e}})}get bClosed(){return this.PolylineAtom.bClosed}set bClosed(e){this.Update({polyline:{bClosed:e}})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ParabolaEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({parabolaStyle:{type:e}})})}GetTopHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ParabolaEntityAtom.topHeight}})}SetTopHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({parabolaStyle:{topHeight:e}})})}GetTopScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ParabolaEntityAtom.topScale}})}SetTopScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({parabolaStyle:{topScale:e}})})}GetWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ParabolaEntityAtom.width}})}SetWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({parabolaStyle:{width:e}})})}GetColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ParabolaEntityAtom.color}})}SetColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({parabolaStyle:{color:e}})})}GetGather(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ParabolaEntityAtom.gather}})}SetGather(e){return m(this,void 0,void 0,function*(){return yield this.Update({parabolaStyle:{gather:e}})})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({polyline:{coordinates:e}})})}GetClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineAtom.bClosed}})}SetClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({polyline:{bClosed:e}})})}GetbClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PolylineAtom.bClosed}})}SetbClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({polyline:{bClosed:e}})})}GetScheme(){return{ParabolaEntityAtom:this.ParabolaEntityAtom,PolylineAtom:this.PolylineAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{parabolaStyle:this.ParabolaEntityAtom,polyline:this.PolylineAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.parabolaStyle&&(null!=(t=e.parabolaStyle)&&t.color&&(e.parabolaStyle.color="object"==typeof e.parabolaStyle.color?M(e.parabolaStyle.color):M(k(e.parabolaStyle.color))),D(this.ParabolaEntityAtom,e.parabolaStyle)),void 0!==e.polyline&&D(this.PolylineAtom,e.polyline)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.parabolaStyle){if("object"!=typeof t.parabolaStyle)throw i&&i.func("parabolaStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("parabolaStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ParabolaEntityAtom;if(Object.keys(t.parabolaStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.parabolaStyle)?void 0:n.type)){if("string"!=typeof t.parabolaStyle.type)throw i&&i.func("parabolaStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("parabolaStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.parabolaType.find(e=>{return e===(null==(e=t.parabolaStyle)?void 0:e.type)}))throw i&&i.func(`parabolaStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.parabolaType.toString()),new Error(`parabolaStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.parabolaType.toString())}if(void 0!==(null==(n=t.parabolaStyle)?void 0:n.topHeight)){if("number"!=typeof t.parabolaStyle.topHeight)throw i&&i.func("parabolaStyle.topHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("parabolaStyle.topHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(t.parabolaStyle.topHeight<0)throw i&&i.func("parabolaStyle.topHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("parabolaStyle.topHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber))}if(void 0!==(null==(n=t.parabolaStyle)?void 0:n.topScale)){if("number"!=typeof t.parabolaStyle.topScale)throw i&&i.func("parabolaStyle.topScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("parabolaStyle.topScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(t.parabolaStyle.topScale<0||1{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of polyline.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of polyline.coordinates "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`the value of polyline.coordinates ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the value of polyline.coordinates ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}),void 0!==(null==(n=t.polyline)?void 0:n.bClosed)&&"boolean"!=typeof t.polyline.bClosed)throw i&&i.func("polyline.bClosed "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("polyline.bClosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean))}}}class zi extends G{constructor(e){super(e,qi),this.setType("Parabola")}}class Zi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Raster"}),Object.defineProperty(this,"RasterEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{path:"http://superapi.51hitech.com/doc-static/images/static/raster/raster.tif",type:"fit",gradientSetting:["00ffff","fdff00","009fff","f300ff","ff0000"]}}),this.setObjAtom(this),this.oType="Raster",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get path(){return this.RasterEntityAtom.path}set path(e){this.Update({rasterStyle:{path:e}})}get sType(){return this.RasterEntityAtom.type}set sType(e){this.Update({rasterStyle:{type:e}})}get gradientSetting(){return this.RasterEntityAtom.gradientSetting}set gradientSetting(e){this.Update({rasterStyle:{gradientSetting:e}})}GetPath(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RasterEntityAtom.path}})}SetPath(e){return m(this,void 0,void 0,function*(){return yield this.Update({rasterStyle:{path:e}})})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RasterEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({rasterStyle:{type:e}})})}GetGradientSetting(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RasterEntityAtom.gradientSetting}})}SetGradientSetting(e){return m(this,void 0,void 0,function*(){return yield this.Update({rasterStyle:{gradientSetting:e}})})}GetScheme(){return{RasterEntityAtom:this.RasterEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{rasterStyle:this.RasterEntityAtom})}SetData(e){var t;this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.rasterStyle&&(null!=(t=e.rasterStyle)&&t.gradientSetting&&(e.rasterStyle.gradientSetting=e.rasterStyle.gradientSetting.map(e=>M("object"==typeof e?e:k(e)))),D(this.RasterEntityAtom,e.rasterStyle))}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0M("object"==typeof e?e:k(e)))),D(s,e.rasterStyle)),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.rasterStyle){if("object"!=typeof t.rasterStyle)throw i&&i.func("rasterStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rasterStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.RasterEntityAtom;if(Object.keys(t.rasterStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rasterStyle)?void 0:n.path)&&("string"!=typeof t.rasterStyle.path||!/^(http|https|file)?:\/\/(.+\/)+.+(\.(tif))$/i.test(t.rasterStyle.path)))throw i&&i.func(`rasterStyle.path ${null==(n=C.getInstance())?void 0:n.GetCommonErr().string}. (TIF file address supports two forms: http(s):// or file://)`),new Error(`rasterStyle.path ${null==(n=C.getInstance())?void 0:n.GetCommonErr().string}. (TIF file address supports two forms: http(s):// or file://)`);if(void 0!==(null==(n=t.rasterStyle)?void 0:n.type)){if("string"!=typeof t.rasterStyle.type)throw i&&i.func("rasterStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("rasterStyle.type "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.rasterType.find(e=>{return e===(null==(e=t.rasterStyle)?void 0:e.type)}))throw i&&i.func(`rasterStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.rasterType.toString()),new Error(`rasterStyle.type ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.rasterType.toString())}if(void 0!==(null==(n=t.rasterStyle)?void 0:n.gradientSetting)){if("object"!=typeof t.rasterStyle.gradientSetting||void 0===t.rasterStyle.gradientSetting.length)throw i&&i.func("rasterStyle.gradientSetting "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("rasterStyle.gradientSetting "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(5!=t.rasterStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw i&&i.func(`rasterStyle.gradientSetting ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayStringLength} 5`),new Error(`rasterStyle.gradientSetting ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayStringLength} 5`)}}}}class Yi extends G{constructor(e){super(e,Zi),this.setType("Raster")}}class Ji extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"RoadHeatMap"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"RoadHeatMapAPI"}),Object.defineProperty(this,"RoadHeatMapEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{type:"fit",width:30,mappingValueRange:[1,100],gradientSetting:["00ffff","fdff00","009fff","f300ff","ff0000"],filter:["water"]}}),Object.defineProperty(this,"PointValueAtom",{enumerable:!0,configurable:!0,writable:!0,value:{features:[{point:[0,0,0],value:40},{point:[1,1,1],value:30}]}}),this.setObjAtom(this),this.oType="RoadHeatMap",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get sType(){return this.RoadHeatMapEntityAtom.type}set sType(e){this.Update({roadHeatMapStyle:{type:e}})}get width(){return this.RoadHeatMapEntityAtom.width}set width(e){this.Update({roadHeatMapStyle:{width:e}})}get mappingValueRange(){return this.RoadHeatMapEntityAtom.mappingValueRange}set mappingValueRange(e){this.Update({roadHeatMapStyle:{mappingValueRange:e}})}get gradientSetting(){return this.RoadHeatMapEntityAtom.gradientSetting}set gradientSetting(e){this.Update({roadHeatMapStyle:{gradientSetting:e}})}get filter(){return this.RoadHeatMapEntityAtom.filter}set filter(e){this.Update({roadHeatMapStyle:{filter:e}})}get features(){return this.PointValueAtom.features}set features(e){this.Update({points:{features:e}})}GetsType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RoadHeatMapEntityAtom.type}})}SetsType(e){return m(this,void 0,void 0,function*(){return yield this.Update({roadHeatMapStyle:{type:e}})})}GetWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RoadHeatMapEntityAtom.width}})}SetWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({roadHeatMapStyle:{width:e}})})}GetMappingValueRange(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RoadHeatMapEntityAtom.mappingValueRange}})}SetMappingValueRange(e){return m(this,void 0,void 0,function*(){return yield this.Update({roadHeatMapStyle:{mappingValueRange:e}})})}GetGradientSetting(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RoadHeatMapEntityAtom.gradientSetting}})}SetGradientSetting(e){return m(this,void 0,void 0,function*(){return yield this.Update({roadHeatMapStyle:{gradientSetting:e}})})}GetFilter(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RoadHeatMapEntityAtom.filter}})}SetFilter(e){return m(this,void 0,void 0,function*(){return yield this.Update({roadHeatMapStyle:{filter:e}})})}GetFeatures(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PointValueAtom.features}})}SetFeatures(e){return m(this,void 0,void 0,function*(){return yield this.Update({points:{features:e}})})}GetScheme(){return{RoadHeatMapEntityAtom:this.RoadHeatMapEntityAtom,PointValueAtom:this.PointValueAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{roadHeatMapStyle:this.RoadHeatMapEntityAtom,points:this.PointValueAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.roadHeatMapStyle&&(null!=(t=e.roadHeatMapStyle)&&t.gradientSetting&&(e.roadHeatMapStyle.gradientSetting=e.roadHeatMapStyle.gradientSetting.map(e=>M("object"==typeof e?e:k(e)))),D(this.RoadHeatMapEntityAtom,e.roadHeatMapStyle)),void 0!==e.points&&D(this.PointValueAtom,e.points)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0M("object"==typeof e?e:k(e)))),D(s,e.roadHeatMapStyle)),0"number"==typeof e).length)throw e&&e.func(`location ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 3`),new Error(`location ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLengt} 3`)}if(!this.eid)return{success:!1,message:"Please add first"};let e=yield this.StartApi(this.apiClassName,"GetRoadHeatMapEntity",{eid:this.eid,location:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Filter(t){var r;return m(this,void 0,void 0,function*(){if(null!=(r=C.getInstance())&&r.GetValiDateState()){let e=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t||void 0===t.length)throw e&&e.func("filterValueRange "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("filterValueRange "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));if(2!==t.filter(e=>"number"==typeof e).length)throw e&&e.func(`filterValueRange ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLength} 2`),new Error(`filterValueRange ${null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumberLengt} 2`)}if(!this.eid)return{success:!1,message:"Please add first"};let e=yield this.StartApi(this.apiClassName,"FilterRoadHeatMapEntity",{eid:this.eid,filterValueRange:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}UnFilter(){return m(this,void 0,void 0,function*(){var e;return this.eid?(e=yield this.StartApi(this.apiClassName,"UnFilterRoadHeatMapEntity",{eid:this.eid}),yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)):{success:!1,message:"Please add first"}})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{roadHeatMapStyle:this.RoadHeatMapEntityAtom,points:this.PointValueAtom})}Validate(t){var e,r;let n=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t)throw n&&n.func(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj),new Error(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj);let i=this.GetValidateRules();if(Object.keys(t).forEach(e=>{var t;if(void 0===i[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.roadHeatMapStyle){if("object"!=typeof t.roadHeatMapStyle)throw n&&n.func("roadHeatMapStyle "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("roadHeatMapStyle "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));let r=this.RoadHeatMapEntityAtom;if(Object.keys(t.roadHeatMapStyle).forEach(e=>{var t;if(void 0===r[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(e=t.roadHeatMapStyle)?void 0:e.type)){if("string"!=typeof t.roadHeatMapStyle.type)throw n&&n.func("roadHeatMapStyle.type "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("roadHeatMapStyle.type "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.roadHeatMapType.find(e=>{return e===(null==(e=t.roadHeatMapStyle)?void 0:e.type)}))throw n&&n.func(`roadHeatMapStyle.type ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.roadHeatMapType.toString()),new Error(`roadHeatMapStyle.type ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.roadHeatMapType.toString())}if(void 0!==(null==(e=t.roadHeatMapStyle)?void 0:e.width)&&("number"!=typeof t.roadHeatMapStyle.width||t.roadHeatMapStyle.width<0))throw n&&n.func("roadHeatMapStyle.width "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber)),new Error("roadHeatMapStyle.width "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber));if(void 0!==(null==(e=t.roadHeatMapStyle)?void 0:e.mappingValueRange)){if("object"!=typeof t.roadHeatMapStyle.mappingValueRange||void 0===t.roadHeatMapStyle.mappingValueRange.length)throw n&&n.func("roadHeatMapStyle.mappingValueRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("roadHeatMapStyle.mappingValueRange "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(2!=t.roadHeatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw n&&n.func(`roadHeatMapStyle.mappingValueRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`),new Error(`roadHeatMapStyle.mappingValueRange ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(e=t.roadHeatMapStyle)?void 0:e.gradientSetting)){if("object"!=typeof t.roadHeatMapStyle.gradientSetting||void 0===t.roadHeatMapStyle.gradientSetting.length)throw n&&n.func("roadHeatMapStyle.gradientSetting "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("roadHeatMapStyle.gradientSetting "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(5!=t.roadHeatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw n&&n.func(`roadHeatMapStyle.gradientSetting ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayHEXALength} 5`),new Error(`roadHeatMapStyle.gradientSetting ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayHEXALength} 5`)}if(void 0!==(null==(e=t.roadHeatMapStyle)?void 0:e.filter)&&void 0!==(null==(e=null==t?void 0:t.roadHeatMapStyle)?void 0:e.type)&&"fit"===t.roadHeatMapStyle.type){if("object"!=typeof t.roadHeatMapStyle.filter||void 0===t.roadHeatMapStyle.filter.length)throw n&&n.func("roadHeatMapStyle.filter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("roadHeatMapStyle.filter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));t.roadHeatMapStyle.filter.forEach(e=>{if("string"!=typeof e)throw n&&n.func("the value of roadHeatMapStyle.filter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().hexa)),new Error("the value of roadHeatMapStyle.filter "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().hexa))})}}if(void 0!==t.points){if("object"!=typeof t.points)throw n&&n.func("points "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("points "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if(void 0!==(null==(r=t.points)?void 0:r.features)){if("object"!=typeof t.points.features||void 0===t.points.features.length)throw n&&n.func("points.features "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("points.features "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));t.points.features.forEach(e=>{var t;if("object"!=typeof e)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0===e.point||void 0===e.value)throw n&&n.func("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if(Object.keys(e).forEach(e=>{var t;if("point"!==e&&"value"!==e)throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.point||void 0===e.point.length)throw n&&n.func("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.point.filter(e=>"number"==typeof e).length)throw n&&n.func(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("the value of points.features "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))})}}}}class Ki extends G{constructor(e){super(e,Ji),this.setType("RoadHeatMap")}}class Qi extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"RealTimeVideo"}),Object.defineProperty(this,"RealTimeVideoEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{url:"http://superapi.51aes.com/doc-static/images/static/argsJson.html",resolution:[600,510],offset:[0,0],state:"play",overlapOrder:1}}),this.setObjAtom(this),this.oType="RealTimeVideo",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get url(){return this.RealTimeVideoEntityAtom.url}set url(e){this.Update({realTimeVideoStyle:{url:e}})}get resolution(){return this.RealTimeVideoEntityAtom.resolution}set resolution(e){this.Update({realTimeVideoStyle:{resolution:e}})}get offset(){return this.RealTimeVideoEntityAtom.offset}set offset(e){this.Update({realTimeVideoStyle:{offset:e}})}get state(){return this.RealTimeVideoEntityAtom.state}set state(e){this.Update({realTimeVideoStyle:{state:e}})}get overlapOrder(){return this.RealTimeVideoEntityAtom.overlapOrder}set overlapOrder(e){this.Update({realTimeVideoStyle:{overlapOrder:e}})}GetUrl(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RealTimeVideoEntityAtom.url}})}SetUrl(e){return m(this,void 0,void 0,function*(){return yield this.Update({realTimeVideoStyle:{url:e}})})}GetResolution(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RealTimeVideoEntityAtom.resolution}})}SetResolution(e){return m(this,void 0,void 0,function*(){return yield this.Update({realTimeVideoStyle:{resolution:e}})})}GetOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RealTimeVideoEntityAtom.offset}})}SetOffset(e){return m(this,void 0,void 0,function*(){return yield this.Update({realTimeVideoStyle:{offset:e}})})}GetState(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RealTimeVideoEntityAtom.state}})}SetState(e){return m(this,void 0,void 0,function*(){return yield this.Update({realTimeVideoStyle:{state:e}})})}GetOverlapOrder(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RealTimeVideoEntityAtom.overlapOrder}})}SetOverlapOrder(e){return m(this,void 0,void 0,function*(){return yield this.Update({realTimeVideoStyle:{overlapOrder:e}})})}GetScheme(){return{RealTimeVideoEntityAtom:this.RealTimeVideoEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{realTimeVideoStyle:this.RealTimeVideoEntityAtom})}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.realTimeVideoStyle&&D(this.RealTimeVideoEntityAtom,e.realTimeVideoStyle)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.realTimeVideoStyle){if("object"!=typeof e.realTimeVideoStyle)throw i&&i.func("realTimeVideoStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("realTimeVideoStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.RealTimeVideoEntityAtom;if(Object.keys(e.realTimeVideoStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.realTimeVideoStyle)?void 0:n.url)&&"string"!=typeof e.realTimeVideoStyle.url)throw i&&i.func("realTimeVideoStyle.url "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("realTimeVideoStyle.url "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=e.realTimeVideoStyle)?void 0:n.resolution)){if("object"!=typeof e.realTimeVideoStyle.resolution||void 0===e.realTimeVideoStyle.resolution.length)throw i&&i.func("realTimeVideoStyle.resolution "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("realTimeVideoStyle.resolution "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!=e.realTimeVideoStyle.resolution.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`realTimeVideoStyle.resolution ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`realTimeVideoStyle.resolution ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`)}if(void 0!==(null==(n=e.realTimeVideoStyle)?void 0:n.offset)){if("object"!=typeof e.realTimeVideoStyle.offset||void 0===e.realTimeVideoStyle.offset.length)throw i&&i.func("realTimeVideoStyle.offset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("realTimeVideoStyle.offset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!=e.realTimeVideoStyle.offset.filter(e=>"number"==typeof e).length)throw i&&i.func(`realTimeVideoStyle.offset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`),new Error(`realTimeVideoStyle.offset ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(n=e.realTimeVideoStyle)?void 0:n.overlapOrder)){if("number"!=typeof e.realTimeVideoStyle.overlapOrder)throw i&&i.func("realTimeVideoStyle.overlapOrder "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("realTimeVideoStyle.overlapOrder "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(e.realTimeVideoStyle.overlapOrder<1||10"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get brushDiameter(){return this.SpaceHeatMapEntityAtom.brushDiameter}set brushDiameter(e){this.Update({spaceHeatMapStyle:{brushDiameter:e}})}get mappingValueRange(){return this.SpaceHeatMapEntityAtom.mappingValueRange}set mappingValueRange(e){this.Update({spaceHeatMapStyle:{mappingValueRange:e}})}get gradientSetting(){return this.SpaceHeatMapEntityAtom.gradientSetting}set gradientSetting(e){this.Update({spaceHeatMapStyle:{gradientSetting:e}})}get features(){return this.PointValueAtom.features}set features(e){this.Update({points:{features:e}})}GetBrushDiameter(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SpaceHeatMapEntityAtom.brushDiameter}})}SetBrushDiameter(e){return m(this,void 0,void 0,function*(){return yield this.Update({spaceHeatMapStyle:{brushDiameter:e}})})}GetMappingValueRange(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SpaceHeatMapEntityAtom.mappingValueRange}})}SetMappingValueRange(e){return m(this,void 0,void 0,function*(){return yield this.Update({spaceHeatMapStyle:{mappingValueRange:e}})})}GetGradientSetting(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SpaceHeatMapEntityAtom.gradientSetting}})}SetGradientSetting(e){return m(this,void 0,void 0,function*(){return yield this.Update({spaceHeatMapStyle:{gradientSetting:e}})})}GetFeatures(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.PointValueAtom.features}})}SetFeatures(e){return m(this,void 0,void 0,function*(){return yield this.Update({points:{features:e}})})}GetScheme(){return{SpaceHeatMapEntityAtom:this.SpaceHeatMapEntityAtom,PointValueAtom:this.PointValueAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{spaceHeatMapStyle:this.SpaceHeatMapEntityAtom,points:this.PointValueAtom})}SetData(e){var t;this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.spaceHeatMapStyle&&(null!=(t=e.spaceHeatMapStyle)&&t.gradientSetting&&(e.spaceHeatMapStyle.gradientSetting=e.spaceHeatMapStyle.gradientSetting.map(e=>M("object"==typeof e?e:k(e)))),D(this.SpaceHeatMapEntityAtom,e.spaceHeatMapStyle)),void 0!==e.points&&D(this.PointValueAtom,e.points)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0M("object"==typeof e?e:k(e)))),D(s,e.spaceHeatMapStyle)),0{var t;if(void 0===i[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.spaceHeatMapStyle){if("object"!=typeof e.spaceHeatMapStyle)throw n&&n.func("spaceHeatMapStyle "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("spaceHeatMapStyle "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));let r=this.SpaceHeatMapEntityAtom;if(Object.keys(e.spaceHeatMapStyle).forEach(e=>{var t;if(void 0===r[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(t=e.spaceHeatMapStyle)?void 0:t.brushDiameter)&&("number"!=typeof e.spaceHeatMapStyle.brushDiameter||e.spaceHeatMapStyle.brushDiameter<0))throw n&&n.func("spaceHeatMapStyle.brushDiameter "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber)),new Error("spaceHeatMapStyle.brushDiameter "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber));if(void 0!==(null==(t=e.spaceHeatMapStyle)?void 0:t.mappingValueRange)){if("object"!=typeof e.spaceHeatMapStyle.mappingValueRange||void 0===e.spaceHeatMapStyle.mappingValueRange.length)throw n&&n.func("spaceHeatMapStyle.mappingValueRange "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("spaceHeatMapStyle.mappingValueRange "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!=e.spaceHeatMapStyle.mappingValueRange.filter(e=>"number"==typeof e).length)throw n&&n.func(`spaceHeatMapStyle.mappingValueRange ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`spaceHeatMapStyle.mappingValueRange ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`)}if(void 0!==(null==(t=e.spaceHeatMapStyle)?void 0:t.gradientSetting)){if("object"!=typeof e.spaceHeatMapStyle.gradientSetting||void 0===e.spaceHeatMapStyle.gradientSetting.length)throw n&&n.func("spaceHeatMapStyle.gradientSetting "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("spaceHeatMapStyle.gradientSetting "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(5!=e.spaceHeatMapStyle.gradientSetting.filter(e=>"string"==typeof e).length)throw n&&n.func(`spaceHeatMapStyle.gradientSetting ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayHEXALength} 5`),new Error(`spaceHeatMapStyle.gradientSetting ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayHEXALength} 5`)}}if(void 0!==e.points){if("object"!=typeof e.points)throw n&&n.func("points "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("points "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0!==(null==(r=e.points)?void 0:r.features)){if("object"!=typeof e.points.features||void 0===e.points.features.length)throw n&&n.func("points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("points.features "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));e.points.features.forEach(e=>{var t;if("object"!=typeof e)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0===e.point||void 0===e.value)throw n&&n.func("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("the value(point and value) of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if(Object.keys(e).forEach(e=>{var t;if("point"!==e&&"value"!==e)throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.point||void 0===e.point.length)throw n&&n.func("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the point of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.point.filter(e=>"number"==typeof e).length)throw n&&n.func(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`the point of points.features ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`);if("number"!=typeof e.value)throw n&&n.func("the value of points.features "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("the value of points.features "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))})}}}}class to extends G{constructor(e){super(e,eo),this.setType("SpaceHeatMap")}}class ro extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Bound"}),Object.defineProperty(this,"MoveAlongPathEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{movingEid:null,pathEid:null,time:5,bLoop:!0,bReverse:!1,bVisible:!0,offset:{left:0,forward:0,up:0},rotator:{pitch:0,yaw:0,roll:0},state:"play"}}),Object.defineProperty(this,"movingObj",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pathObj",{enumerable:!0,configurable:!0,writable:!0,value:null}),this.setObjAtom(this),this.oType="Bound",this.type=b.get(this.oType),this.activeBaseAttributes=this.activeBaseAttributes.filter(e=>"location"!==e&&"rotator"!==e&&"scale3d"!==e),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get moving(){return this.movingObj}set moving(e){this.Update({moving:e})}get path(){return this.pathObj}set path(e){this.Update({path:e})}get time(){return this.MoveAlongPathEntityAtom.time}set time(e){this.Update({boundStyle:{time:e}})}get bLoop(){return this.MoveAlongPathEntityAtom.bLoop}set bLoop(e){this.Update({boundStyle:{bLoop:e}})}get bReverse(){return this.MoveAlongPathEntityAtom.bReverse}set bReverse(e){this.Update({boundStyle:{bReverse:e}})}get bVisible(){return this.MoveAlongPathEntityAtom.bVisible}set bVisible(e){this.Update({boundStyle:{bVisible:e}})}get state(){return this.MoveAlongPathEntityAtom.state}set state(e){this.Update({boundStyle:{state:e}})}get offset(){return this.MoveAlongPathEntityAtom.offset}set offset(e){this.Update({offset:e})}get rotator(){return this.MoveAlongPathEntityAtom.rotator}set rotator(e){this.Update({rotator:e})}GetMoving(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pathObj}})}SetMoving(e){return m(this,void 0,void 0,function*(){return yield this.Update({moving:e})})}GetPath(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pathObj}})}SetPath(e){return m(this,void 0,void 0,function*(){return yield this.Update({path:e})})}GetTime(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.time}})}SetTime(e){return m(this,void 0,void 0,function*(){return yield this.Update({boundStyle:{time:e}})})}GetLoop(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.bLoop}})}SetLoop(e){return m(this,void 0,void 0,function*(){return yield this.Update({boundStyle:{bLoop:e}})})}GetbLoop(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.bLoop}})}SetbLoop(e){return m(this,void 0,void 0,function*(){return yield this.Update({boundStyle:{bLoop:e}})})}GetReverse(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.bReverse}})}SetReverse(e){return m(this,void 0,void 0,function*(){return yield this.Update({boundStyle:{bReverse:e}})})}GetbReverse(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.bReverse}})}SetbReverse(e){return m(this,void 0,void 0,function*(){return yield this.Update({boundStyle:{bReverse:e}})})}GetVisible(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.bVisible}})}SetVisible(e){return m(this,void 0,void 0,function*(){return yield this.Update({boundStyle:{bVisible:e}})})}GetState(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.state}})}SetState(e){return m(this,void 0,void 0,function*(){return yield this.Update({boundStyle:{state:e}})})}GetOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.offset}})}SetOffset(e){return m(this,void 0,void 0,function*(){return yield this.Update({offset:e})})}GetRotator(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MoveAlongPathEntityAtom.rotator}})}SetRotator(e){return m(this,void 0,void 0,function*(){return yield this.Update({rotator:e})})}GetScheme(){return{MoveAlongPathEntityAtom:this.MoveAlongPathEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getOtherData()),{moving:this.moving,path:this.path,offset:this.MoveAlongPathEntityAtom.offset,rotator:this.MoveAlongPathEntityAtom.rotator,boundStyle:{time:this.MoveAlongPathEntityAtom.time,bLoop:this.MoveAlongPathEntityAtom.bLoop,bReverse:this.MoveAlongPathEntityAtom.bReverse,bVisible:this.MoveAlongPathEntityAtom.bVisible,state:this.MoveAlongPathEntityAtom.state}})}SetData(e){var t;this.setEid(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.moving&&(this.MoveAlongPathEntityAtom.movingEid=e.moving.eid,this.movingObj=e.moving),void 0!==e.path&&(this.MoveAlongPathEntityAtom.pathEid=e.path.eid,this.pathObj=e.path),void 0!==e.offset&&(void 0!==(null==(t=e.offset)?void 0:t.left)&&(this.MoveAlongPathEntityAtom.offset.left=e.offset.left),void 0!==(null==(t=e.offset)?void 0:t.forward)&&(this.MoveAlongPathEntityAtom.offset.forward=e.offset.forward),void 0!==(null==(t=e.offset)?void 0:t.up))&&(this.MoveAlongPathEntityAtom.offset.up=e.offset.up),void 0!==e.rotator&&(void 0!==(null==(t=e.rotator)?void 0:t.pitch)&&(this.MoveAlongPathEntityAtom.rotator.pitch=e.rotator.pitch),void 0!==(null==(t=e.rotator)?void 0:t.yaw)&&(this.MoveAlongPathEntityAtom.rotator.yaw=e.rotator.yaw),void 0!==(null==(t=e.rotator)?void 0:t.roll))&&(this.MoveAlongPathEntityAtom.rotator.roll=e.rotator.roll),void 0!==e.boundStyle&&D(this.MoveAlongPathEntityAtom,e.boundStyle)}generateAtomData(e){var t={},r={},n={},i={},o={},a={};return O(r,e),0{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"==typeof t[e]&&void 0===t[e].length?this.generateObjectData(t[e],r[e]):(r[e]=t[e],"movingEid"===e&&(this.movingObj=this.obj.ObjectEidMap.get(""+t[e])),"pathEid"===e&&(this.pathObj=this.obj.ObjectEidMap.get(""+t[e]))))})}GetValidateRules(){return Object.assign(Object.assign(Object.assign({},this.getEid()),this.getOtherData()),{moving:this.moving,path:this.path,offset:this.MoveAlongPathEntityAtom.offset,rotator:this.MoveAlongPathEntityAtom.rotator,boundStyle:{time:this.MoveAlongPathEntityAtom.time,bLoop:this.MoveAlongPathEntityAtom.bLoop,bReverse:this.MoveAlongPathEntityAtom.bReverse,bVisible:this.MoveAlongPathEntityAtom.bVisible,state:this.MoveAlongPathEntityAtom.state}})}Validate(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if("object"!=typeof t)throw i&&i.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj);let r=this.GetValidateRules();if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),t.eid&&this.validateEid(t.eid),t.entityName&&this.validateEntityName(t.entityName),t.customId&&this.validateCustomId(t.customId),void 0!==t.moving&&"object"!=typeof t.moving)throw i&&i.func("moving "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("moving "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if(void 0!==t.path&&"object"!=typeof t.path)throw i&&i.func("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("path "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if(void 0!==t.offset){if("object"!=typeof t.offset)throw i&&i.func("offset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("offset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.MoveAlongPathEntityAtom.offset;if(Object.keys(t.offset).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(`offset.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`offset.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.offset)?void 0:n.left)&&"number"!=typeof t.offset.left)throw i&&i.func("offset.left "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("offset.left "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.offset)?void 0:n.forward)&&"number"!=typeof t.offset.forward)throw i&&i.func("offset.forward "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("offset.forward "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.offset)?void 0:n.up)&&"number"!=typeof t.offset.up)throw i&&i.func("offset.up "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("offset.up "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}if(void 0!==t.rotator){if("object"!=typeof t.rotator)throw i&&i.func("rotator "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotator "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.MoveAlongPathEntityAtom.rotator;if(Object.keys(t.rotator).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(`rotator.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotator.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rotator)?void 0:n.pitch)&&("number"!=typeof t.rotator.pitch||t.rotator.pitch<-180||180{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.boundStyle)?void 0:n.bLoop)&&"boolean"!=typeof t.boundStyle.bLoop)throw i&&i.func("boundStyle.bLoop "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("boundStyle.bLoop "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.boundStyle)?void 0:n.bReverse)&&"boolean"!=typeof t.boundStyle.bReverse)throw i&&i.func("boundStyle.bReverse "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("boundStyle.bReverse "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.boundStyle)?void 0:n.time)&&("number"!=typeof t.boundStyle.time||t.boundStyle.time<0))throw i&&i.func("boundStyle.time "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("boundStyle.time "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.boundStyle)?void 0:n.bVisible)&&"boolean"!=typeof t.boundStyle.bVisible)throw i&&i.func("boundStyle.bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("boundStyle.bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.boundStyle)?void 0:n.state)){if("string"!=typeof t.boundStyle.state)throw i&&i.func("boundStyle.state "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("boundStyle.state "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.stateType.find(e=>{return e===(null==(e=t.boundStyle)?void 0:e.state)}))throw i&&i.func(`${t.boundStyle.state} is illegal. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.stateType.toString()),new Error(`${t.boundStyle.state} is illegal. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.stateType.toString())}}}}class no extends G{constructor(e){super(e,ro),this.setType("Bound")}Get(i){var o;return m(this,void 0,void 0,function*(){if(!i)return{success:!0,result:this.findFromMap()};var e=this.findFromMap(""+i);if(e)return{success:!0,result:e};e=yield this.RequestEntity.GetEntitiesData([""+i]);if(!e.success)return{success:!1,message:"Eid is non-existent"};let t=[],r=[];null!=(o=null==(o=e.result.entitiesData[0])?void 0:o.MoveAlongPathEntityAtom)&&o.movingEid&&(t=yield E([e.result.entitiesData[0].MoveAlongPathEntityAtom.movingEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),null!=(o=null==(o=e.result.entitiesData[0])?void 0:o.MoveAlongPathEntityAtom)&&o.pathEid&&(r=yield E([e.result.entitiesData[0].MoveAlongPathEntityAtom.pathEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap));var n=new ro({eid:i,moving:t[0],path:r[0]});return n.setObj(this.obj),n.generateObjectData(e.result.entitiesData[0]),this.addToMap(""+i,{object:n}),{success:e.success,message:e.message,result:{object:n}}})}GenerateObject(n){var i;return m(this,void 0,void 0,function*(){let e=[],t=[];null!=(i=null==(i=n.result.entitiesData[0])?void 0:i.MoveAlongPathEntityAtom)&&i.movingEid&&(e=yield E([n.result.entitiesData[0].MoveAlongPathEntityAtom.movingEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),null!=(i=null==(i=n.result.entitiesData[0])?void 0:i.MoveAlongPathEntityAtom)&&i.pathEid&&(t=yield E([n.result.entitiesData[0].MoveAlongPathEntityAtom.pathEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap));var r=new ro({eid:n.Eid,moving:e[0],path:t[0]});return r.setObj(this.obj),r.generateObjectData(n),this.addToMap(""+n.Eid,{object:r}),{success:!0,message:"",result:{object:r}}})}GetOnly(i){var o;return m(this,void 0,void 0,function*(){var e=this.findFromMap(""+i);if(!e)return{success:!1,message:"Eid is illegal"};var t=yield this.RequestEntity.GetEntitiesData([""+i]);if(!t.success)return{success:!1,message:"Eid is non-existent"};let r=[],n=[];return null!=(o=null==(o=t.result.entitiesData[0])?void 0:o.MoveAlongPathEntityAtom)&&o.movingEid&&(r=yield E([t.result.entitiesData[0].MoveAlongPathEntityAtom.movingEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),null!=(o=null==(o=t.result.entitiesData[0])?void 0:o.MoveAlongPathEntityAtom)&&o.pathEid&&(n=yield E([t.result.entitiesData[0].MoveAlongPathEntityAtom.pathEid],this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),e.object.SetData({moving:r[0],path:n[0]}),e.object.generateObjectData(t.result.entitiesData[0]),{success:!0}})}}class io extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Light"}),Object.defineProperty(this,"LightEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{intensity:10,color:"00FF00FF",angle:10,attenuation:5,shadows:!1,haze:!1,haze_Intensity:10}}),this.setObjAtom(this),this.oType="Light",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get intensity(){return this.LightEntityAtom.intensity}set intensity(e){this.Update({lightStyle:{intensity:e}})}get color(){return this.LightEntityAtom.color}set color(e){this.Update({lightStyle:{color:e}})}get angle(){return this.LightEntityAtom.angle}set angle(e){this.Update({lightStyle:{angle:e}})}get attenuation(){return this.LightEntityAtom.attenuation}set attenuation(e){this.Update({lightStyle:{attenuation:e}})}get shadows(){return this.LightEntityAtom.shadows}set shadows(e){this.Update({lightStyle:{shadows:e}})}get haze(){return this.LightEntityAtom.haze}set haze(e){this.Update({lightStyle:{haze:e}})}get haze_Intensity(){return this.LightEntityAtom.haze_Intensity}set haze_Intensity(e){this.Update({lightStyle:{haze_Intensity:e}})}GetIntensity(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LightEntityAtom.intensity}})}SetIntensity(e){return m(this,void 0,void 0,function*(){return yield this.Update({lightStyle:{intensity:e}})})}GetColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LightEntityAtom.color}})}SetColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({lightStyle:{color:e}})})}GetAngle(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LightEntityAtom.angle}})}SetAngle(e){return m(this,void 0,void 0,function*(){return yield this.Update({lightStyle:{angle:e}})})}GetAttenuation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LightEntityAtom.attenuation}})}SetAttenuation(e){return m(this,void 0,void 0,function*(){return yield this.Update({lightStyle:{attenuation:e}})})}GetShadows(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LightEntityAtom.shadows}})}SetShadows(e){return m(this,void 0,void 0,function*(){return yield this.Update({lightStyle:{shadows:e}})})}GetHaze(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LightEntityAtom.haze}})}SetHaze(e){return m(this,void 0,void 0,function*(){return yield this.Update({lightStyle:{haze:e}})})}GetHaze_Intensity(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.LightEntityAtom.haze_Intensity}})}SetHaze_Intensity(e){return m(this,void 0,void 0,function*(){return yield this.Update({lightStyle:{haze_Intensity:e}})})}GetScheme(){return{LightEntityAtom:this.LightEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{lightStyle:this.LightEntityAtom})}SetData(e){var t;this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.lightStyle&&(null!=(t=e.lightStyle)&&t.color&&(e.lightStyle.color="object"==typeof e.lightStyle.color?M(e.lightStyle.color):M(k(e.lightStyle.color))),D(this.LightEntityAtom,e.lightStyle))}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.lightStyle){if("object"!=typeof e.lightStyle)throw i&&i.func("lightStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("lightStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.LightEntityAtom;if(Object.keys(e.lightStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.lightStyle)?void 0:n.intensity)){if("number"!=typeof e.lightStyle.intensity)throw i&&i.func("lightStyle.intensity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("lightStyle.intensity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(e.lightStyle.intensity<0||100{if(this.obj.RegisterObj.GetTypes().find(e=>e.name===t&&"Covering"===e.category))return t})).length<=0)return{success:!1,message:"Type is empty"};var e=yield this.RequestEntity.RemoveEntityByTypes(n.map(e=>this.obj.RegisterObj.EntityType.get(e)));if(e.success)for(let t=0;te.name===n[t]);r&&(yield r.object.ClearCache())}return e})}Clear(){return m(this,void 0,void 0,function*(){var e=this.obj.RegisterObj.GetTypes().filter(e=>"Covering"===e.category),e=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e.name)));return e.success&&(yield this.ClearCache()),e})}ClearCache(){return m(this,void 0,void 0,function*(){return this.obj.RegisterObj.GetTypes().filter(e=>"Covering"===e.category).forEach(e=>{e.object.ClearCache()}),{success:!0,message:""}})}}class so{validateClearByTypes(e){let t,r,n,i,o,a,s,l,u=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if(void 0===e)throw u&&u.func("types "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().required)),new Error("types "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().required));if("object"!=typeof e||void 0===e.length)throw u&&u.func("types "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array)),new Error("types "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw u&&u.func("types "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayString)),new Error("types "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().arrayString));e.forEach(e=>{var t;if(!b.get(e))throw u&&u.func(`types.${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(`types.,${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}}}class lo extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Static"}),Object.defineProperty(this,"AssetAtom",{enumerable:!0,configurable:!0,writable:!0,value:{seedId:null}}),Object.defineProperty(this,"MaterialAtom",{enumerable:!0,configurable:!0,writable:!0,value:{changedMaterialInfo:[]}}),Object.defineProperty(this,"materialEntities",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.setObjAtom(this),this.oType="Static",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get seedId(){return this.AssetAtom.seedId}set seedId(e){this.Update({seedId:e})}get material(){return this.materialEntities}set material(e){this.materialEntities=e}get changedMaterialInfo(){return this.MaterialAtom.changedMaterialInfo}set changedMaterialInfo(e){this.Update({changedMaterialInfo:e})}GetSeedId(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AssetAtom.seedId}})}SetSeedId(e){return m(this,void 0,void 0,function*(){return yield this.Update({seedId:e})})}GetChangedMaterialInfo(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MaterialAtom.changedMaterialInfo}})}SetChangedMaterialInfo(e){return m(this,void 0,void 0,function*(){return yield this.Update({changedMaterialInfo:e})})}GetScheme(){return{AssetAtom:this.AssetAtom,MaterialAtom:this.MaterialAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedId:this.AssetAtom.seedId,changedMaterialInfo:this.MaterialAtom.changedMaterialInfo})}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==(null==e?void 0:e.seedId)&&(this.AssetAtom.seedId=e.seedId),void 0!==(null==e?void 0:e.changedMaterialInfo)&&(this.MaterialAtom.changedMaterialInfo=e.changedMaterialInfo)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===s[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.seedId&&"string"!=typeof e.seedId)throw a&&a.func("seedId "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string)),new Error("seedId "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().string))}}class uo extends G{constructor(e){super(e,lo),this.setType("Static")}}class co extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Hierarchy"}),Object.defineProperty(this,"AssetAtom",{enumerable:!0,configurable:!0,writable:!0,value:{seedId:null}}),Object.defineProperty(this,"MaterialAtom",{enumerable:!0,configurable:!0,writable:!0,value:{changedMaterialInfo:[]}}),this.setObjAtom(this),this.oType="Hierarchy",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get seedId(){return this.AssetAtom.seedId}set seedId(e){this.Update({seedId:e})}get changedMaterialInfo(){return this.MaterialAtom.changedMaterialInfo}set changedMaterialInfo(e){this.MaterialAtom.changedMaterialInfo=e}GetSeedId(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AssetAtom.seedId}})}SetSeedId(e){return m(this,void 0,void 0,function*(){return yield this.Update({seedId:e})})}GetChangedMaterialInfo(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MaterialAtom.changedMaterialInfo}})}SetChangedMaterialInfo(e){return m(this,void 0,void 0,function*(){return yield this.Update({changedMaterialInfo:e})})}GetScheme(){return{AssetAtom:this.AssetAtom,MaterialAtom:this.MaterialAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedId:this.AssetAtom.seedId})}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),e.seedId&&(this.AssetAtom.seedId=e.seedId)}generateAtomData(e){var t={},r={},n={},i={},o={},a={};return O(r,e),0{var t;if(void 0===s[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),e.eid&&this.validateEid(e.eid),e.entityName&&this.validateEntityName(e.entityName),e.customId&&this.validateCustomId(e.customId),e.location&&this.validateLocation(e.location),e.rotator&&this.validateRotator(e.rotator),e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.seedId&&"string"!=typeof e.seedId)throw a&&a.func("seedId "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string)),new Error("seedId "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().string))}}class ho extends G{constructor(e){super(e,co),this.setType("Hierarchy")}}class mo extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Skeletal"}),Object.defineProperty(this,"AssetAtom",{enumerable:!0,configurable:!0,writable:!0,value:{seedId:null}}),Object.defineProperty(this,"SkeletalMeshAtom",{enumerable:!0,configurable:!0,writable:!0,value:{animSequenceIndex:0,bPause:!0,bLoop:!0,playRate:1,playInterval:{min:0,max:0},animSequences:[]}}),Object.defineProperty(this,"MaterialAtom",{enumerable:!0,configurable:!0,writable:!0,value:{changedMaterialInfo:[]}}),Object.defineProperty(this,"materialEntities",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"operations",{enumerable:!0,configurable:!0,writable:!0,value:{setPlayPosition:0}}),Object.defineProperty(this,"extraQueryInfo",{enumerable:!0,configurable:!0,writable:!0,value:{animSequenceLength:{}}}),this.setObjAtom(this),this.oType="Skeletal",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get material(){return this.materialEntities}set material(e){this.materialEntities=e}get changedMaterialInfo(){return this.MaterialAtom.changedMaterialInfo}set changedMaterialInfo(e){this.Update({changedMaterialInfo:e})}get animSequences(){return this.SkeletalMeshAtom.animSequences}set animSequences(e){this.Update({animSequences:e})}get seedId(){return this.AssetAtom.seedId}set seedId(e){this.Update({seedId:e})}get animSequenceIndex(){return this.SkeletalMeshAtom.animSequenceIndex}set animSequenceIndex(e){this.Update({animSequenceIndex:e})}get bPause(){return this.SkeletalMeshAtom.bPause}set bPause(e){this.Update({bPause:e})}get bLoop(){return this.SkeletalMeshAtom.bLoop}set bLoop(e){this.Update({bLoop:e})}get playRate(){return this.SkeletalMeshAtom.playRate}set playRate(e){this.Update({playRate:e})}get playInterval(){return this.SkeletalMeshAtom.playInterval}set playInterval(e){this.Update({playInterval:e})}GetChangedMaterialInfo(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.MaterialAtom.changedMaterialInfo}})}SetChangedMaterialInfo(e){return m(this,void 0,void 0,function*(){return yield this.Update({changedMaterialInfo:e})})}GetAnimSequencesx(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.animSequences}})}SetAnimSequences(e){return m(this,void 0,void 0,function*(){return yield this.Update({animSequences:e})})}GetSeedId(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AssetAtom.seedId}})}SetSeedId(e){return m(this,void 0,void 0,function*(){return yield this.Update({seedId:e})})}GetAnimSequenceIndex(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.animSequenceIndex}})}SetAnimSequenceIndex(e){return m(this,void 0,void 0,function*(){return yield this.Update({animSequenceIndex:e})})}GetPause(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.bPause}})}SetPause(e){return m(this,void 0,void 0,function*(){return yield this.Update({bPause:e})})}GetbPause(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.bPause}})}SetbPause(e){return m(this,void 0,void 0,function*(){return yield this.Update({bPause:e})})}GetLoop(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.bLoop}})}SetLoop(e){return m(this,void 0,void 0,function*(){return yield this.Update({bLoop:e})})}GetbLoop(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.bLoop}})}SetbLoop(e){return m(this,void 0,void 0,function*(){return yield this.Update({bLoop:e})})}GetPlayRate(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.playRate}})}SetPlayRate(e){return m(this,void 0,void 0,function*(){return yield this.Update({playRate:e})})}GetPlayInterval(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.SkeletalMeshAtom.playInterval}})}SetPlayInterval(e){return m(this,void 0,void 0,function*(){return yield this.Update({playInterval:e})})}GetScheme(){return{AssetAtom:this.AssetAtom,SkeletalMeshAtom:this.SkeletalMeshAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedId:this.AssetAtom.seedId,changedMaterialInfo:this.MaterialAtom.changedMaterialInfo,animSequenceIndex:this.SkeletalMeshAtom.animSequenceIndex,bPause:this.SkeletalMeshAtom.bPause,bLoop:this.SkeletalMeshAtom.bLoop,playRate:this.SkeletalMeshAtom.playRate,playInterval:this.SkeletalMeshAtom.playInterval,animSequences:this.SkeletalMeshAtom.animSequences})}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==(null==e?void 0:e.seedId)&&(this.AssetAtom.seedId=e.seedId),void 0!==(null==e?void 0:e.changedMaterialInfo)&&(this.MaterialAtom.changedMaterialInfo=e.changedMaterialInfo),void 0!==(null==e?void 0:e.animSequenceIndex)&&(this.SkeletalMeshAtom.animSequenceIndex=e.animSequenceIndex),void 0!==(null==e?void 0:e.bPause)&&(this.SkeletalMeshAtom.bPause=e.bPause),void 0!==(null==e?void 0:e.bLoop)&&(this.SkeletalMeshAtom.bLoop=e.bLoop),void 0!==(null==e?void 0:e.playRate)&&(this.SkeletalMeshAtom.playRate=e.playRate),void 0!==(null==e?void 0:e.playInterval)&&(this.SkeletalMeshAtom.playInterval=e.playInterval),void 0!==(null==e?void 0:e.animSequences)&&(this.SkeletalMeshAtom.animSequences=e.animSequences)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={},u={};return O(r,e),0{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"!=typeof t[e]||void 0!==t[e].length||"animSequenceLength"===e?r[e]=t[e]:this.generateObjectData(t[e],r[e]))})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedId:this.AssetAtom.seedId,animSequenceIndex:this.SkeletalMeshAtom.animSequenceIndex,bPause:this.SkeletalMeshAtom.bPause,bLoop:this.SkeletalMeshAtom.bLoop,playRate:this.SkeletalMeshAtom.playRate,playInterval:this.SkeletalMeshAtom.playInterval,animSequences:this.SkeletalMeshAtom.animSequences})}Validate(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw i&&i.func(null==(t=C.getInstance())?void 0:t.getErrorTxt().notObj),new Error(null==(t=C.getInstance())?void 0:t.getErrorTxt().notObj);let r=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.seedId&&"string"!=typeof e.seedId)throw i&&i.func("seedId "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("seedId "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string));if(void 0!==e.animSequenceIndex&&("number"!=typeof e.animSequenceIndex||e.animSequenceIndex<0))throw i&&i.func("animSequenceIndex "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber)),new Error("animSequenceIndex "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber));if(void 0!==e.playRate&&("number"!=typeof e.playRate||e.playRate<0))throw i&&i.func("playRate "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber)),new Error("playRate "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber));if(void 0!==e.bPause&&"boolean"!=typeof e.bPause)throw i&&i.func("bPause "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bPause "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean));if(void 0!==e.bLoop&&"boolean"!=typeof e.bLoop)throw i&&i.func("bLoop "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bLoop "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean));if(void 0!==e.animSequences){if("object"!=typeof e.animSequences||void 0===e.animSequences.length)throw i&&i.func("animSequences "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("animSequences "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.animSequences.filter(e=>"string"==typeof e).length!==e.animSequences.length)throw i&&i.func("animSequences value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("animSequences value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string))}if(void 0!==e.playInterval){if("object"!=typeof e.playInterval)throw i&&i.func("playInterval "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("playInterval "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.SkeletalMeshAtom.playInterval;Object.keys(e.playInterval).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`playInterval.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))})}}}class go extends G{constructor(e){super(e,mo),this.setType("Skeletal")}}class fo{constructor(e){Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpModelerAPI"}),Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}RemoveRegion(t,r){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"RemoveRegion"};return yield this.obj.startApi(e,{eid:t,indexArray:r})})}UpdateRegionName(t,r){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"UpdateRegionName"};return yield this.obj.startApi(e,{eid:t,indexAndNameArray:r})})}ToggleRegion(t,r){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"ToggleRegion"};return yield this.obj.startApi(e,{eid:t,indexAndSwitchArray:r})})}QueryRegion(t){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"QueryRegion"};return yield this.obj.startApi(e,{eid:t})})}}class vo extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Vegetation"}),Object.defineProperty(this,"Modeler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"RelativePolygon2DAtom",{enumerable:!0,configurable:!0,writable:!0,value:{coordinates:[[[1,2],[1,2],[1,2]],[[1,2],[1,2],[1,2]],[[1,2],[1,2],[1,2]]]}}),Object.defineProperty(this,"VegetationAssetsAtom",{enumerable:!0,configurable:!0,writable:!0,value:{assets:[]}}),Object.defineProperty(this,"VegetationAssetsTemp",{enumerable:!0,configurable:!0,writable:!0,value:{SeedId:"",Ratio:1,OverlapRatio:1,RandomScaleRange:[.8,1],RandomRotateRange:[-360,360],bUseIndividualZOffset:!1,IndividualZOffset:1}}),Object.defineProperty(this,"VegetationAtom",{enumerable:!0,configurable:!0,writable:!0,value:{randomSeed:0,snapMode:"Ground",zOffset:0,samplerType:"Line",lineSpace:1,randomness:.5,gridType:"Auto",rowNum:1,columnNum:1,rowSpace:1,columnSpace:1,density:1,clusterRatio:1,pointZs:[],cullRegions:[]}}),this.setObjAtom(this),this.oType="Vegetation",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get coordinates(){return this.RelativePolygon2DAtom.coordinates}set coordinates(e){this.Update({coordinates:e})}get assets(){return this.VegetationAssetsAtom.assets}set assets(e){this.Update({assets:e})}get randomSeed(){return this.VegetationAtom.randomSeed}set randomSeed(e){this.Update({vegetationStyle:{randomSeed:e}})}get snapMode(){return this.VegetationAtom.snapMode}set snapMode(e){this.Update({vegetationStyle:{snapMode:e}})}get zOffset(){return this.VegetationAtom.zOffset}set zOffset(e){this.Update({vegetationStyle:{zOffset:e}})}get samplerType(){return this.VegetationAtom.samplerType}set samplerType(e){this.Update({vegetationStyle:{samplerType:e}})}get lineSpace(){return this.VegetationAtom.lineSpace}set lineSpace(e){this.Update({vegetationStyle:{lineSpace:e}})}get randomness(){return this.VegetationAtom.randomness}set randomness(e){this.Update({vegetationStyle:{randomness:e}})}get gridType(){return this.VegetationAtom.gridType}set gridType(e){this.Update({vegetationStyle:{gridType:e}})}get rowNum(){return this.VegetationAtom.rowNum}set rowNum(e){this.Update({vegetationStyle:{rowNum:e}})}get columnNum(){return this.VegetationAtom.columnNum}set columnNum(e){this.Update({vegetationStyle:{columnNum:e}})}get rowSpace(){return this.VegetationAtom.rowSpace}set rowSpace(e){this.Update({vegetationStyle:{rowSpace:e}})}get columnSpace(){return this.VegetationAtom.columnSpace}set columnSpace(e){this.Update({vegetationStyle:{columnSpace:e}})}get density(){return this.VegetationAtom.density}set density(e){this.Update({vegetationStyle:{density:e}})}get clusterRatio(){return this.VegetationAtom.clusterRatio}set clusterRatio(e){this.Update({vegetationStyle:{clusterRatio:e}})}get pointZs(){return this.VegetationAtom.pointZs}set pointZs(e){this.Update({vegetationStyle:{pointZs:e}})}get cullRegions(){return this.VegetationAtom.cullRegions}set cullRegions(e){this.Update({vegetationStyle:{cullRegions:e}})}GetCullRegions(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.cullRegions}})}SetCullRegions(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{cullRegions:e}})})}GetPointZs(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.pointZs}})}SetPointZs(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{pointZs:e}})})}GetClusterRatio(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.clusterRatio}})}SetClusterRatio(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{clusterRatio:e}})})}GetDensity(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.density}})}SetDensity(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{density:e}})})}GetColumnSpace(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.columnSpace}})}SetColumnSpace(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{columnSpace:e}})})}GetRowSpace(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.rowSpace}})}SetRowSpace(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{rowSpace:e}})})}GetColumnNum(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.columnNum}})}SetColumnNum(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{columnNum:e}})})}GetRowNum(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.rowNum}})}SetRowNum(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{rowNum:e}})})}GetGridType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.gridType}})}SetGridType(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{gridType:e}})})}GetRandomness(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.randomness}})}SetRandomness(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{randomness:e}})})}GetLineSpace(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.lineSpace}})}SetLineSpace(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{lineSpace:e}})})}GetSamplerType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.samplerType}})}SetSamplerType(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{samplerType:e}})})}GetZOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.zOffset}})}SetZOffset(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{zOffset:e}})})}GetSnapMode(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.snapMode}})}SetSnapMode(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{snapMode:e}})})}GetRandomSeed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAtom.randomSeed}})}SetRandomSeed(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{randomSeed:e}})})}GetAssets(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.VegetationAssetsAtom.assets}})}SetAssets(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{assets:e}})})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.RelativePolygon2DAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({vegetationStyle:{coordinates:e}})})}GetScheme(){return{VegetationAtom:this.VegetationAtom,RelativePolygon2DAtom:this.RelativePolygon2DAtom,VegetationAssetsAtom:this.VegetationAssetsAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{vegetationStyle:this.VegetationAtom}),this.RelativePolygon2DAtom),this.VegetationAssetsAtom)}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.vegetationStyle&&D(this.VegetationAtom,e.vegetationStyle),e.coordinates&&(this.RelativePolygon2DAtom.coordinates=e.coordinates),e.assets&&(this.VegetationAssetsAtom.assets=e.assets)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={},u={};return O(r,e),0"number"==typeof e).length!==t.length)throw e&&e.func("The value of indexArray "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumber)),new Error("The value of indexArray "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayNumber))}return yield new fo(this.obj).RemoveRegion(this.eid,t)})}UpdateRegionName(t){var r;return m(this,void 0,void 0,function*(){if(null!=(r=C.getInstance())&&r.GetValiDateState()){var e=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t||void 0===t.length)throw e&&e.func("indexAndNameArray "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("indexAndNameArray "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array))}return yield new fo(this.obj).UpdateRegionName(this.eid,t)})}ToggleRegion(t){var r;return m(this,void 0,void 0,function*(){if(null!=(r=C.getInstance())&&r.GetValiDateState()){var e=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if("object"!=typeof t||void 0===t.length)throw e&&e.func("indexAndSwitchArray "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("indexAndSwitchArray "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array))}return yield new fo(this.obj).ToggleRegion(this.eid,t)})}QueryRegion(){return m(this,void 0,void 0,function*(){return yield new fo(this.obj).QueryRegion(this.eid)})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{vegetationStyle:this.VegetationAtom}),this.RelativePolygon2DAtom),this.VegetationAssetsAtom)}Validate(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if("object"!=typeof t)throw i&&i.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj);let r=this.GetValidateRules();if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),t.eid&&this.validateEid(t.eid),t.entityName&&this.validateEntityName(t.entityName),t.customId&&this.validateCustomId(t.customId),t.location&&this.validateLocation(t.location),t.rotator&&this.validateRotator(t.rotator),t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.vegetationStyle){if("object"!=typeof t.vegetationStyle)throw i&&i.func("vegetationStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("vegetationStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.VegetationAtom;if(Object.keys(t.vegetationStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`vegetationStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.vegetationStyle)?void 0:n.randomSeed)&&("number"!=typeof t.vegetationStyle.randomSeed||t.vegetationStyle.randomSeed<0))throw i&&i.func("vegetationStyle.randomSeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("vegetationStyle.randomSeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.snapMode)){if("string"!=typeof t.vegetationStyle.snapMode)throw i&&i.func("vegetationStyle.snapMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("vegetationStyle.snapMode "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.snapModeType.find(e=>{return e===(null==(e=t.vegetationStyle)?void 0:e.snapMode)}))throw i&&i.func(`vegetationStyle.snapMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.snapModeType.toString()),new Error(`vegetationStyle.snapMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.snapModeType.toString())}if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.zOffset)&&"number"!=typeof t.vegetationStyle.zOffset)throw i&&i.func("vegetationStyle.zOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("vegetationStyle.zOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.samplerType)){if("string"!=typeof t.vegetationStyle.samplerType)throw i&&i.func("vegetationStyle.samplerType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("vegetationStyle.samplerType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.samplerType.find(e=>{return e===(null==(e=t.vegetationStyle)?void 0:e.samplerType)}))throw i&&i.func(`vegetationStyle.samplerType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.samplerType.toString()),new Error(`vegetationStyle.samplerType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.samplerType.toString())}if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.gridType)){if("string"!=typeof t.vegetationStyle.gridType)throw i&&i.func("vegetationStyle.gridType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("vegetationStyle.gridType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.gridType.find(e=>{return e===(null==(e=t.vegetationStyle)?void 0:e.gridType)}))throw i&&i.func(`vegetationStyle.gridType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.gridType.toString()),new Error(`vegetationStyle.gridType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.gridType.toString())}if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.lineSpace)&&"number"!=typeof t.vegetationStyle.lineSpace)throw i&&i.func("vegetationStyle.lineSpace "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("vegetationStyle.lineSpace "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.randomness)&&"number"!=typeof t.vegetationStyle.randomness)throw i&&i.func("vegetationStyle.randomness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("vegetationStyle.randomness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.rowNum)&&("number"!=typeof t.vegetationStyle.rowNum||t.vegetationStyle.rowNum<0))throw i&&i.func("vegetationStyle.rowNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("vegetationStyle.rowNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.columnNum)&&("number"!=typeof t.vegetationStyle.columnNum||t.vegetationStyle.columnNum<0))throw i&&i.func("vegetationStyle.columnNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("vegetationStyle.columnNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.rowSpace)&&"number"!=typeof t.vegetationStyle.rowSpace)throw i&&i.func("vegetationStyle.rowSpace "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("vegetationStyle.rowSpace "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.columnSpace)&&"number"!=typeof t.vegetationStyle.columnSpace)throw i&&i.func("vegetationStyle.columnSpace "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("vegetationStyle.columnSpace "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.density)&&("number"!=typeof t.vegetationStyle.density||t.vegetationStyle.density<0))throw i&&i.func("vegetationStyle.density "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("vegetationStyle.density "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.clusterRatio)&&("number"!=typeof t.vegetationStyle.clusterRatio||t.vegetationStyle.clusterRatio<0))throw i&&i.func("vegetationStyle.clusterRatio "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("vegetationStyle.clusterRatio "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.pointZs)&&("object"!=typeof t.vegetationStyle.pointZs||void 0===t.vegetationStyle.pointZs.length))throw i&&i.func("vegetationStyle.pointZs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("vegetationStyle.pointZs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(void 0!==(null==(n=t.vegetationStyle)?void 0:n.cullRegions)&&("object"!=typeof t.vegetationStyle.cullRegions||void 0===t.vegetationStyle.cullRegions.length))throw i&&i.func("vegetationStyle.cullRegions "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("vegetationStyle.cullRegions "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array))}if(void 0!==t.coordinates){if("object"!=typeof t.coordinates||void 0===t.coordinates.length)throw i&&i.func("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("the value of coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("the value of coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`the value of coordinates value's ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`the value of coordinates value's ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)})})}if(void 0!==t.assets){if("object"!=typeof t.assets||void 0===t.assets.length)throw i&&i.func("assets "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("assets "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.assets.forEach(e=>{var t;if("object"!=typeof e)throw i&&i.func("assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));let r=this.VegetationAssetsTemp;if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`assets.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.SeedId)&&"string"!=typeof e.SeedId)throw i&&i.func("SeedId of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("SeedId of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string));if(void 0!==(null==e?void 0:e.Ratio)&&("number"!=typeof e.Ratio||e.Ratio<0))throw i&&i.func("Ratio of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber)),new Error("Ratio of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber));if(void 0!==(null==e?void 0:e.OverlapRatio)&&("number"!=typeof e.OverlapRatio||e.OverlapRatio<0))throw i&&i.func("OverlapRatio of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber)),new Error("OverlapRatio of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber));if(void 0!==(null==e?void 0:e.RandomScaleRange)){if("object"!=typeof e.RandomScaleRange||void 0===e.RandomScaleRange.length)throw i&&i.func("RandomScaleRange of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("RandomScaleRange of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.RandomScaleRange.filter(e=>"number"==typeof e&&0<=e&&e<=1).length)throw i&&i.func(`RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().range} 0 ~ 1`),new Error(`RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().range} 0 ~ 1`)}if(void 0!==(null==e?void 0:e.RandomRotateRange)){if("object"!=typeof e.RandomRotateRange||void 0===e.RandomRotateRange.length)throw i&&i.func("RandomRotateRange of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("RandomRotateRange of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.RandomRotateRange.filter(e=>"number"==typeof e&&-360<=e&&e<=360).length)throw i&&i.func(`RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().range} -360 ~ 360`),new Error(`RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2. RandomScaleRange of assets value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().range} -360 ~ 360`)}if(void 0!==(null==e?void 0:e.bUseIndividualZOffset)&&"boolean"!=typeof e.bUseIndividualZOffset)throw i&&i.func("bUseIndividualZOffset of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bUseIndividualZOffset of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean));if(void 0!==(null==e?void 0:e.IndividualZOffset)&&("number"!=typeof e.IndividualZOffset||e.IndividualZOffset<0))throw i&&i.func("IndividualZOffset of assets value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().positiveNumber)),new Error("IndividualZOffset of assets value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().positiveNumber))})}}}class yo extends G{constructor(e){super(e,vo),this.setType("Vegetation")}}class po extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ModelerEmbank"}),Object.defineProperty(this,"ModelerEmbankPolylineAtom",{enumerable:!0,configurable:!0,writable:!0,value:{attributes:[{cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1}],coordinates:[[0,0,0],[0,0,0]],bClosed:!1}}),Object.defineProperty(this,"ModelerEmbankAtom",{enumerable:!0,configurable:!0,writable:!0,value:{baseType:"Concert",baseWidth:300,baseHeight:300,sideType:"StoneSlope",sideWidth:30,sideWidthScale:2,bReverseSide:!1,bTwoSide:!1,fenceType:"StoneRail",fenceWidth:20,fenceHeight:150,fenceOffset:20,cornerRadius:800,cornerSplitNum:5,bUseVertexCorner:!1,bUseVertexSideScale:!1,bUseVertexWidth:!1}}),this.setObjAtom(this),this.oType="ModelerEmbank",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get bUseVertexWidth(){return this.ModelerEmbankAtom.bUseVertexWidth}set bUseVertexWidth(e){this.Update({modelerEmbankStyle:{bUseVertexWidth:e}})}get bUseVertexSideScale(){return this.ModelerEmbankAtom.bUseVertexSideScale}set bUseVertexSideScale(e){this.Update({modelerEmbankStyle:{bUseVertexSideScale:e}})}get bUseVertexCorner(){return this.ModelerEmbankAtom.bUseVertexCorner}set bUseVertexCorner(e){this.Update({modelerEmbankStyle:{bUseVertexCorner:e}})}get coordinates(){return this.ModelerEmbankPolylineAtom.coordinates}set coordinates(e){this.Update({coordinates:e})}get attributes(){return this.ModelerEmbankPolylineAtom.attributes}set attributes(e){this.Update({attributes:e})}get bClosed(){return this.ModelerEmbankPolylineAtom.bClosed}set bClosed(e){this.Update({bClosed:e})}get baseType(){return this.ModelerEmbankAtom.baseType}set baseType(e){this.Update({modelerEmbankStyle:{baseType:e}})}get baseWidth(){return this.ModelerEmbankAtom.baseWidth}set baseWidth(e){this.Update({modelerEmbankStyle:{baseWidth:e}})}get baseHeight(){return this.ModelerEmbankAtom.baseHeight}set baseHeight(e){this.Update({modelerEmbankStyle:{baseHeight:e}})}get sideType(){return this.ModelerEmbankAtom.sideType}set sideType(e){this.Update({modelerEmbankStyle:{sideType:e}})}get sideWidth(){return this.ModelerEmbankAtom.sideWidth}set sideWidth(e){this.Update({modelerEmbankStyle:{sideWidth:e}})}get sideWidthScale(){return this.ModelerEmbankAtom.sideWidthScale}set sideWidthScale(e){this.Update({modelerEmbankStyle:{sideWidthScale:e}})}get bReverseSide(){return this.ModelerEmbankAtom.bReverseSide}set bReverseSide(e){this.Update({modelerEmbankStyle:{bReverseSide:e}})}get bTwoSide(){return this.ModelerEmbankAtom.bTwoSide}set bTwoSide(e){this.Update({modelerEmbankStyle:{bTwoSide:e}})}get fenceType(){return this.ModelerEmbankAtom.fenceType}set fenceType(e){this.Update({modelerEmbankStyle:{fenceType:e}})}get fenceWidth(){return this.ModelerEmbankAtom.fenceWidth}set fenceWidth(e){this.Update({modelerEmbankStyle:{fenceWidth:e}})}get fenceHeight(){return this.ModelerEmbankAtom.fenceHeight}set fenceHeight(e){this.Update({modelerEmbankStyle:{fenceHeight:e}})}get fenceOffset(){return this.ModelerEmbankAtom.fenceOffset}set fenceOffset(e){this.Update({modelerEmbankStyle:{fenceOffset:e}})}get cornerRadius(){return this.ModelerEmbankAtom.cornerRadius}set cornerRadius(e){this.Update({modelerEmbankStyle:{cornerRadius:e}})}get cornerSplitNum(){return this.ModelerEmbankAtom.cornerSplitNum}set cornerSplitNum(e){this.Update({modelerEmbankStyle:{cornerSplitNum:e}})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankPolylineAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({coordinates:e})})}GetAttributes(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankPolylineAtom.attributes}})}SetAttributes(e){return m(this,void 0,void 0,function*(){return yield this.Update({attributes:e})})}GetClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankPolylineAtom.bClosed}})}SetClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({bClosed:e})})}GetbClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankPolylineAtom.bClosed}})}SetbClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({bClosed:e})})}GetBaseType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.baseType}})}SetBaseType(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{baseType:e}})})}GetBaseWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.baseWidth}})}SetBaseWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{baseWidth:e}})})}GetBaseHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.baseHeight}})}SetBaseHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{baseHeight:e}})})}GetSideType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.sideType}})}SetSideType(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{sideType:e}})})}GetSideWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.sideWidth}})}SetSideWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{sideWidth:e}})})}GetSideWidthScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.sideWidthScale}})}SetSideWidthScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{sideWidthScale:e}})})}GetReverseSide(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bReverseSide}})}SetReverseSide(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bReverseSide:e}})})}GetbReverseSide(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bReverseSide}})}SetbReverseSide(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bReverseSide:e}})})}GetTwoSide(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bTwoSide}})}SetTwoSide(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bTwoSide:e}})})}GetbTwoSide(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bTwoSide}})}SetbTwoSide(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bTwoSide:e}})})}GetFenceType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.fenceType}})}SetFenceType(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{fenceType:e}})})}GetFenceWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.fenceWidth}})}SetFenceWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{fenceWidth:e}})})}GetFenceHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.fenceHeight}})}SetFenceHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{fenceHeight:e}})})}GetFenceOffset(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.fenceOffset}})}SetFenceOffset(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{fenceOffset:e}})})}GetUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bUseVertexCorner}})}SetUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bUseVertexCorner:e}})})}GetbUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bUseVertexCorner}})}SetbUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bUseVertexCorner:e}})})}GetUseVertexSideScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bUseVertexSideScale}})}SetUseVertexSideScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bUseVertexSideScale:e}})})}GetbUseVertexSideScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bUseVertexSideScale}})}SetbUseVertexSideScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bUseVertexSideScale:e}})})}GetUseVertexWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bUseVertexWidth}})}SetUseVertexWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bUseVertexWidth:e}})})}GetbUseVertexWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.bUseVertexWidth}})}SetbUseVertexWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{bUseVertexWidth:e}})})}GetCornerRadius(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.cornerRadius}})}SetCornerRadius(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{cornerRadius:e}})})}GetCornerSplitNum(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerEmbankAtom.cornerSplitNum}})}SetCornerSplitNum(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerEmbankStyle:{cornerSplitNum:e}})})}GetScheme(){return{ModelerEmbankAtom:this.ModelerEmbankAtom,ModelerEmbankPolylineAtom:this.ModelerEmbankPolylineAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{modelerEmbankStyle:this.ModelerEmbankAtom}),this.ModelerEmbankPolylineAtom)}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.modelerEmbankStyle&&D(this.ModelerEmbankAtom,e.modelerEmbankStyle),e.coordinates&&(this.ModelerEmbankPolylineAtom.coordinates=e.coordinates),e.attributes&&(this.ModelerEmbankPolylineAtom.attributes=e.attributes),e.bClosed&&(this.ModelerEmbankPolylineAtom.bClosed=e.bClosed)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.modelerEmbankStyle){if("object"!=typeof t.modelerEmbankStyle)throw c&&c.func("modelerEmbankStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerEmbankStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerEmbankAtom;if(Object.keys(t.modelerEmbankStyle).forEach(e=>{var t;if(void 0===r[e])throw c&&c.func(`modelerEmbankStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerEmbankStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.baseType)){if("string"!=typeof t.modelerEmbankStyle.baseType)throw c&&c.func("modelerEmbankStyle.baseType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerEmbankStyle.baseType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.baseType.find(e=>{return e===(null==(e=t.modelerEmbankStyle)?void 0:e.baseType)}))throw c&&c.func(`modelerEmbankStyle.baseType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.baseType.toString()),new Error(`modelerEmbankStyle.baseType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.baseType.toString())}if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.baseWidth)&&("number"!=typeof t.modelerEmbankStyle.baseWidth||t.modelerEmbankStyle.baseWidth<0))throw c&&c.func("modelerEmbankStyle.baseWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("modelerEmbankStyle.baseWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.baseHeight)&&("number"!=typeof t.modelerEmbankStyle.baseHeight||t.modelerEmbankStyle.baseHeight<0))throw c&&c.func("modelerEmbankStyle.baseHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("modelerEmbankStyle.baseHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.sideType)){if("string"!=typeof t.modelerEmbankStyle.sideType)throw c&&c.func("modelerEmbankStyle.sideType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerEmbankStyle.sideType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.sideType.find(e=>{return e===(null==(e=t.modelerEmbankStyle)?void 0:e.sideType)}))throw c&&c.func(`modelerEmbankStyle.sideType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.sideType.toString()),new Error(`modelerEmbankStyle.sideType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.sideType.toString())}if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.sideWidth)&&("number"!=typeof t.modelerEmbankStyle.sideWidth||t.modelerEmbankStyle.sideWidth<0))throw c&&c.func("modelerEmbankStyle.sideWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("modelerEmbankStyle.sideWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.sideWidthScale)&&("number"!=typeof t.modelerEmbankStyle.sideWidthScale||t.modelerEmbankStyle.sideWidthScale<0))throw c&&c.func("modelerEmbankStyle.sideWidthScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("modelerEmbankStyle.sideWidthScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.bReverseSide)&&"boolean"!=typeof t.modelerEmbankStyle.bReverseSide)throw c&&c.func("modelerEmbankStyle.bReverseSide "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerEmbankStyle.bReverseSide "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.bTwoSide)&&"boolean"!=typeof t.modelerEmbankStyle.bTwoSide)throw c&&c.func("modelerEmbankStyle.bTwoSide "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerEmbankStyle.bTwoSide "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.fenceType)){if("string"!=typeof t.modelerEmbankStyle.fenceType)throw c&&c.func("modelerEmbankStyle.fenceType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerEmbankStyle.fenceType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.fenceType.find(e=>{return e===(null==(e=t.modelerEmbankStyle)?void 0:e.fenceType)}))throw c&&c.func(`modelerEmbankStyle.fenceType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.fenceType.toString()),new Error(`modelerEmbankStyle.fenceType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.fenceType.toString())}if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.fenceWidth)&&("number"!=typeof t.modelerEmbankStyle.fenceWidth||t.modelerEmbankStyle.fenceWidth<0))throw c&&c.func("modelerEmbankStyle.fenceWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("modelerEmbankStyle.fenceWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.fenceHeight)&&("number"!=typeof t.modelerEmbankStyle.fenceHeight||t.modelerEmbankStyle.fenceHeight<0))throw c&&c.func("modelerEmbankStyle.fenceHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("modelerEmbankStyle.fenceHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.fenceOffset)&&"number"!=typeof t.modelerEmbankStyle.fenceOffset)throw c&&c.func("modelerEmbankStyle.fenceOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerEmbankStyle.fenceOffset "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.cornerRadius)&&("number"!=typeof t.modelerEmbankStyle.cornerRadius||t.modelerEmbankStyle.cornerRadius<0))throw c&&c.func("modelerEmbankStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("modelerEmbankStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.cornerSplitNum)&&"number"!=typeof t.modelerEmbankStyle.cornerSplitNum)throw c&&c.func("modelerEmbankStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerEmbankStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.bUseVertexCorner)&&"boolean"!=typeof t.modelerEmbankStyle.bUseVertexCorner)throw c&&c.func("modelerEmbankStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerEmbankStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.bUseVertexSideScale)&&"boolean"!=typeof t.modelerEmbankStyle.bUseVertexSideScale)throw c&&c.func("modelerEmbankStyle.bUseVertexSideScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerEmbankStyle.bUseVertexSideScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerEmbankStyle)?void 0:n.bUseVertexWidth)&&"boolean"!=typeof t.modelerEmbankStyle.bUseVertexWidth)throw c&&c.func("modelerEmbankStyle.bUseVertexWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerEmbankStyle.bUseVertexWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean))}if(void 0!==t.coordinates){if("object"!=typeof t.coordinates||void 0===t.coordinates.length)throw c&&c.func("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw c&&c.func("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw c&&c.func(`coordinates value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`coordinates value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==t.bClosed&&"boolean"!=typeof t.bClosed)throw c&&c.func("bClosed "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("bClosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==t.attributes){if("object"!=typeof t.attributes||void 0===t.attributes.length)throw c&&c.func("attributes "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("attributes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.attributes.forEach(e=>{let t,r,n,i,o,a,s,l,u={cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1};if(Object.keys(e).forEach(e=>{var t;if(void 0===u[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`attributes.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw c&&c.func(null==(t=C.getInstance())?void 0:t.GetCommonErr().number),new Error("attributes.cornerRadius "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().number));if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw c&&c.func(null==(n=C.getInstance())?void 0:n.GetCommonErr().number),new Error("attributes.cornerSplitNum "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().number));if(void 0!==e.baseWidth&&"number"!=typeof e.baseWidth)throw c&&c.func(null==(o=C.getInstance())?void 0:o.GetCommonErr().number),new Error("attributes.baseWidth "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().number));if(void 0!==e.sideWidthScale&&"number"!=typeof e.sideWidthScale)throw c&&c.func(null==(s=C.getInstance())?void 0:s.GetCommonErr().number),new Error("attributes.sideWidthScale "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().number))})}}}class bo extends G{constructor(e){super(e,po),this.setType("ModelerEmbank")}}class Eo extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ModelerWater"}),Object.defineProperty(this,"ModelerWaterPolygonAtom",{enumerable:!0,configurable:!0,writable:!0,value:{attributes:[{cornerRadius:1,cornerSplitNum:10}],coordinates:[[[0,0,0],[0,0,0]]]}}),Object.defineProperty(this,"ModelerWaterAtom",{enumerable:!0,configurable:!0,writable:!0,value:{waterHeight:300,bInverseNormal:!1,bAlignZ:!0,bUseVertexCorner:!1,cornerRadius:100,cornerSplitNum:10,waterType:"Water01",waterColor:"0c120c",waveHeight:1,waterTransparency:0,waterTransparentDepth:.5,rippleScale:.05,waveRotate:0,waveSpeed:.05,waveIntensity:1,waveScale:1}}),this.setObjAtom(this),this.oType="ModelerWater",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get waterHeight(){return this.ModelerWaterAtom.waterHeight}set waterHeight(e){this.Update({modelerWaterStyle:{waterHeight:e}})}get bInverseNormal(){return this.ModelerWaterAtom.bInverseNormal}set bInverseNormal(e){this.Update({modelerWaterStyle:{bInverseNormal:e}})}get bAlignZ(){return this.ModelerWaterAtom.bAlignZ}set bAlignZ(e){this.Update({modelerWaterStyle:{bAlignZ:e}})}get bUseVertexCorner(){return this.ModelerWaterAtom.bUseVertexCorner}set bUseVertexCorner(e){this.Update({modelerWaterStyle:{bUseVertexCorner:e}})}get cornerRadius(){return this.ModelerWaterAtom.cornerRadius}set cornerRadius(e){this.Update({modelerWaterStyle:{cornerRadius:e}})}get cornerSplitNum(){return this.ModelerWaterAtom.cornerSplitNum}set cornerSplitNum(e){this.Update({modelerWaterStyle:{cornerSplitNum:e}})}get waterType(){return this.ModelerWaterAtom.waterType}set waterType(e){this.Update({modelerWaterStyle:{waterType:e}})}get waterColor(){return this.ModelerWaterAtom.waterColor}set waterColor(e){this.Update({modelerWaterStyle:{waterColor:e}})}get waveHeight(){return this.ModelerWaterAtom.waveHeight}set waveHeight(e){this.Update({modelerWaterStyle:{waveHeight:e}})}get waterTransparency(){return this.ModelerWaterAtom.waterTransparency}set waterTransparency(e){this.Update({modelerWaterStyle:{waterTransparency:e}})}get waterTransparentDepth(){return this.ModelerWaterAtom.waterTransparentDepth}set waterTransparentDepth(e){this.Update({modelerWaterStyle:{waterTransparentDepth:e}})}get rippleScale(){return this.ModelerWaterAtom.rippleScale}set rippleScale(e){this.Update({modelerWaterStyle:{rippleScale:e}})}get waveRotate(){return this.ModelerWaterAtom.waveRotate}set waveRotate(e){this.Update({modelerWaterStyle:{waveRotate:e}})}get waveSpeed(){return this.ModelerWaterAtom.waveSpeed}set waveSpeed(e){this.Update({modelerWaterStyle:{waveSpeed:e}})}get waveIntensity(){return this.ModelerWaterAtom.waveIntensity}set waveIntensity(e){this.Update({modelerWaterStyle:{waveIntensity:e}})}get waveScale(){return this.ModelerWaterAtom.waveScale}set waveScale(e){this.Update({modelerWaterStyle:{waveScale:e}})}get coordinates(){return this.ModelerWaterPolygonAtom.coordinates}set coordinates(e){this.Update({coordinates:e})}get attributes(){return this.ModelerWaterPolygonAtom.attributes}set attributes(e){this.Update({attributes:e})}GetWaterHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waterHeight}})}SetWaterHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waterHeight:e}})})}GetInverseNormal(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.bInverseNormal}})}SetInverseNormal(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{bInverseNormal:e}})})}GetbInverseNormal(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.bInverseNormal}})}SetbInverseNormal(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{bInverseNormal:e}})})}GetbAlignZ(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.bAlignZ}})}SetbAlignZ(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{bAlignZ:e}})})}GetAlignZ(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.bAlignZ}})}SetAlignZ(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{bAlignZ:e}})})}GetUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.bUseVertexCorner}})}SetUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{bUseVertexCorner:e}})})}GetbUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.bUseVertexCorner}})}SetbUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{bUseVertexCorner:e}})})}GetCornerRadius(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.cornerRadius}})}SetCornerRadius(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{cornerRadius:e}})})}GetCornerSplitNum(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.cornerSplitNum}})}SetCornerSplitNum(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{cornerSplitNum:e}})})}GetWaterType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waterType}})}SetWaterType(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waterType:e}})})}GetWaterColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waterColor}})}SetWaterColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waterColor:e}})})}GetWaveHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waveHeight}})}SetWaveHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waveHeight:e}})})}GetWaterTransparency(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waterTransparency}})}SetWaterTransparency(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waterTransparency:e}})})}GetWaterTransparentDepth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waterTransparentDepth}})}SetWaterTransparentDepth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waterTransparentDepth:e}})})}GetRippleScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.rippleScale}})}SetRippleScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{rippleScale:e}})})}GetWaveRotate(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waveRotate}})}SetWaveRotate(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waveRotate:e}})})}GetWaveSpeed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waveRotate}})}SetWaveSpeed(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waveSpeed:e}})})}GetWaveIntensity(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waveIntensity}})}SetWaveIntensity(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waveIntensity:e}})})}GetWaveScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterAtom.waveScale}})}SetWaveScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerWaterStyle:{waveScale:e}})})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterPolygonAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({coordinates:e})})}GetAttributes(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerWaterPolygonAtom.attributes}})}SetAttributes(e){return m(this,void 0,void 0,function*(){return yield this.Update({attributes:e})})}GetScheme(){return{ModelerWaterAtom:this.ModelerWaterAtom,ModelerWaterPolygonAtom:this.ModelerWaterPolygonAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{modelerWaterStyle:this.ModelerWaterAtom}),this.ModelerWaterPolygonAtom)}SetData(e){var t;this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.modelerWaterStyle&&(null!=(t=e.modelerWaterStyle)&&t.waterColor&&(e.modelerWaterStyle.waterColor="object"==typeof e.modelerWaterStyle.waterColor?M(e.modelerWaterStyle.waterColor):M(k(e.modelerWaterStyle.waterColor))),D(this.ModelerWaterAtom,e.modelerWaterStyle)),e.coordinates&&(this.ModelerWaterPolygonAtom.coordinates=e.coordinates),e.attributes&&(this.ModelerWaterPolygonAtom.attributes=e.attributes)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.modelerWaterStyle){if("object"!=typeof t.modelerWaterStyle)throw i&&i.func("modelerWaterStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerWaterStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerWaterAtom;if(Object.keys(t.modelerWaterStyle).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(`modelerWaterStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerWaterStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waterHeight)&&"number"!=typeof t.modelerWaterStyle.waterHeight)throw i&&i.func("modelerWaterStyle.waterHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waterHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.bInverseNormal)&&"boolean"!=typeof t.modelerWaterStyle.bInverseNormal)throw i&&i.func("modelerWaterStyle.bInverseNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerWaterStyle.bInverseNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.bAlignZ)&&"boolean"!=typeof t.modelerWaterStyle.bAlignZ)throw i&&i.func("modelerWaterStyle.bAlignZ "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerWaterStyle.bAlignZ "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.bUseVertexCorner)&&"boolean"!=typeof t.modelerWaterStyle.bUseVertexCorner)throw i&&i.func("modelerWaterStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerWaterStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.cornerRadius)&&"number"!=typeof t.modelerWaterStyle.cornerRadius)throw i&&i.func("modelerWaterStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.cornerSplitNum)&&"number"!=typeof t.modelerWaterStyle.cornerSplitNum)throw i&&i.func("modelerWaterStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waterType)){if("string"!=typeof t.modelerWaterStyle.waterType)throw i&&i.func("modelerWaterStyle.waterType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerWaterStyle.waterType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.waterType.find(e=>{return e===(null==(e=t.modelerWaterStyle)?void 0:e.waterType)}))throw i&&i.func(`modelerWaterStyle.waterType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.waterType.toString()),new Error(`modelerWaterStyle.waterType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.waterType.toString())}if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waterColor)&&"string"!=typeof t.modelerWaterStyle.waterColor)throw i&&i.func("modelerWaterStyle.waterColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerWaterStyle.waterColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waveHeight)&&"number"!=typeof t.modelerWaterStyle.waveHeight)throw i&&i.func("modelerWaterStyle.waveHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waveHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waterTransparency)&&"number"!=typeof t.modelerWaterStyle.waterTransparency)throw i&&i.func("modelerWaterStyle.waterTransparency "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waterTransparency "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waterTransparentDepth)&&"number"!=typeof t.modelerWaterStyle.waterTransparentDepth)throw i&&i.func("modelerWaterStyle.waterTransparentDepth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waterTransparentDepth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.rippleScale)&&"number"!=typeof t.modelerWaterStyle.rippleScale)throw i&&i.func("modelerWaterStyle.rippleScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.rippleScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waveRotate)&&"number"!=typeof t.modelerWaterStyle.waveRotate)throw i&&i.func("modelerWaterStyle.waveRotate "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waveRotate "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waveSpeed)&&"number"!=typeof t.modelerWaterStyle.waveSpeed)throw i&&i.func("modelerWaterStyle.waveSpeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waveSpeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waveIntensity)&&"number"!=typeof t.modelerWaterStyle.waveIntensity)throw i&&i.func("modelerWaterStyle.waveIntensity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waveIntensity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerWaterStyle)?void 0:n.waveScale)&&"number"!=typeof t.modelerWaterStyle.waveScale)throw i&&i.func("modelerWaterStyle.waveScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerWaterStyle.waveScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}if(void 0!==t.coordinates){if("object"!=typeof t.coordinates||void 0===t.coordinates.length)throw i&&i.func("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("value of coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("value of coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`value of coordinates value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`value of coordinates value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})})}}}class wo{validateGenerate(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if(void 0===e)throw n&&n.func("name "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().required)),new Error("name "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().required));if(void 0===t)throw n&&n.func("coordinate "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().required)),new Error("coordinate "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().required));if("string"!=typeof e)throw n&&n.func("name "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("name "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("object"!=typeof t||void 0===t.length)throw n&&n.func("coordinate "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("coordinate "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array))}}}class So extends G{constructor(e){super(e,Eo),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpModelerAPI"}),Object.defineProperty(this,"ModelerWaterValidate",{enumerable:!0,configurable:!0,writable:!0,value:new wo}),this.setType("ModelerWater")}Generate(t,r){return m(this,void 0,void 0,function*(){this.ModelerWaterValidate.validateGenerate(t,r);var e=yield this.StartApi(this.apiClassName,"GenerateModelerWater",{name:t,coordinate:JSON.stringify(r)});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class Co extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ModelerRiver"}),Object.defineProperty(this,"ModelerRiverPolylineAtom",{enumerable:!0,configurable:!0,writable:!0,value:{attributes:[{cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1}],coordinates:[[0,0,0],[0,0,0]],bClosed:!1}}),Object.defineProperty(this,"ModelerRiverAtom",{enumerable:!0,configurable:!0,writable:!0,value:{mergeLength:300,riverWidth:300,riverHeight:300,bInverseNormal:!1,cornerRadius:800,cornerSplitNum:5,bUseVertexCorner:!1,bUseVertexWidth:!1,waterType:"River01",waterColor:"0c120c",waveHeight:1,waterTransparency:0,waterTransparentDepth:.5,rippleScale:.05,waveRotate:0,waveSpeed:.05}}),this.setObjAtom(this),this.oType="ModelerRiver",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get coordinates(){return this.ModelerRiverPolylineAtom.coordinates}set coordinates(e){this.Update({coordinates:e})}get attributes(){return this.ModelerRiverPolylineAtom.attributes}set attributes(e){this.Update({attributes:e})}get bClosed(){return this.ModelerRiverPolylineAtom.bClosed}set bClosed(e){this.Update({bClosed:e})}get mergeLength(){return this.ModelerRiverAtom.mergeLength}set mergeLength(e){this.Update({modelerRiverStyle:{mergeLength:e}})}get riverWidth(){return this.ModelerRiverAtom.riverWidth}set riverWidth(e){this.Update({modelerRiverStyle:{riverWidth:e}})}get riverHeight(){return this.ModelerRiverAtom.riverHeight}set riverHeight(e){this.Update({modelerRiverStyle:{riverHeight:e}})}get bInverseNormal(){return this.ModelerRiverAtom.bInverseNormal}set bInverseNormal(e){this.Update({modelerRiverStyle:{bInverseNormal:e}})}get cornerRadius(){return this.ModelerRiverAtom.cornerRadius}set cornerRadius(e){this.Update({modelerRiverStyle:{cornerRadius:e}})}get cornerSplitNum(){return this.ModelerRiverAtom.cornerSplitNum}set cornerSplitNum(e){this.Update({modelerRiverStyle:{cornerSplitNum:e}})}get bUseVertexCorner(){return this.ModelerRiverAtom.bUseVertexCorner}set bUseVertexCorner(e){this.Update({modelerRiverStyle:{bUseVertexCorner:e}})}get bUseVertexWidth(){return this.ModelerRiverAtom.bUseVertexWidth}set bUseVertexWidth(e){this.Update({modelerRiverStyle:{bUseVertexWidth:e}})}get waterType(){return this.ModelerRiverAtom.waterType}set waterType(e){this.Update({modelerRiverStyle:{waterType:e}})}get waterColor(){return this.ModelerRiverAtom.waterColor}set waterColor(e){this.Update({modelerRiverStyle:{waterColor:e}})}get waveHeight(){return this.ModelerRiverAtom.waveHeight}set waveHeight(e){this.Update({modelerRiverStyle:{waveHeight:e}})}get waterTransparency(){return this.ModelerRiverAtom.waterTransparency}set waterTransparency(e){this.Update({modelerRiverStyle:{waterTransparency:e}})}get waterTransparentDepth(){return this.ModelerRiverAtom.waterTransparentDepth}set waterTransparentDepth(e){this.Update({modelerRiverStyle:{waterTransparentDepth:e}})}get rippleScale(){return this.ModelerRiverAtom.rippleScale}set rippleScale(e){this.Update({modelerRiverStyle:{rippleScale:e}})}get waveRotate(){return this.ModelerRiverAtom.waveRotate}set waveRotate(e){this.Update({modelerRiverStyle:{waveRotate:e}})}get waveSpeed(){return this.ModelerRiverAtom.waveSpeed}set waveSpeed(e){this.Update({modelerRiverStyle:{waveSpeed:e}})}GetWaveSpeed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.waveSpeed}})}SetWaveSpeed(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{waveSpeed:e}})})}GetWaveRotate(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.waveRotate}})}SetWaveRotate(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{waveRotate:e}})})}GetRippleScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.rippleScale}})}SetRippleScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{rippleScale:e}})})}GetWaterTransparentDepth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.waterTransparentDepth}})}SetWaterTransparentDepth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{waterTransparentDepth:e}})})}GetWaterTransparency(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.waterTransparency}})}SetWaterTransparency(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{waterTransparency:e}})})}GetWaveHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.waveHeight}})}SetWaveHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{waveHeight:e}})})}GetWaterColor(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.waterColor}})}SetWaterColor(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{waterColor:e}})})}GetWaterType(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.waterType}})}SetWaterType(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{waterType:e}})})}GetUseVertexWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.bUseVertexWidth}})}SetUseVertexWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{bUseVertexWidth:e}})})}GetbUseVertexWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.bUseVertexWidth}})}SetbUseVertexWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{bUseVertexWidth:e}})})}GetUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.bUseVertexCorner}})}SetUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{bUseVertexCorner:e}})})}GetbUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.bUseVertexCorner}})}SetbUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{bUseVertexCorner:e}})})}GetCornerSplitNum(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.cornerSplitNum}})}SetCornerSplitNum(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{cornerSplitNum:e}})})}GetCornerRadius(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.cornerRadius}})}SetCornerRadius(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{cornerRadius:e}})})}GetInverseNormal(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.bInverseNormal}})}SetInverseNormal(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{bInverseNormal:e}})})}GetbInverseNormal(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.bInverseNormal}})}SetbInverseNormal(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{bInverseNormal:e}})})}GetRiverHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.riverHeight}})}SetRiverHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{riverHeight:e}})})}GetRiverWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.riverWidth}})}SetRiverWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{riverWidth:e}})})}GetMergeLength(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverAtom.mergeLength}})}SetMergeLength(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerRiverStyle:{mergeLength:e}})})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverPolylineAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({coordinates:e})})}GetAttributes(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverPolylineAtom.attributes}})}SetAttributes(e){return m(this,void 0,void 0,function*(){return yield this.Update({attributes:e})})}GetClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverPolylineAtom.bClosed}})}SetClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({bClosed:e})})}GetbClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerRiverPolylineAtom.bClosed}})}SetbClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({bClosed:e})})}GetScheme(){return{ModelerRiverAtom:this.ModelerRiverAtom,ModelerRiverPolylineAtom:this.ModelerRiverPolylineAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{modelerRiverStyle:this.ModelerRiverAtom}),this.ModelerRiverPolylineAtom)}SetData(e){var t;this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.modelerRiverStyle&&(null!=(t=e.modelerRiverStyle)&&t.waterColor&&(e.modelerRiverStyle.waterColor="object"==typeof e.modelerRiverStyle.waterColor?M(e.modelerRiverStyle.waterColor):M(k(e.modelerRiverStyle.waterColor))),D(this.ModelerRiverAtom,e.modelerRiverStyle)),e.coordinates&&(this.ModelerRiverPolylineAtom.coordinates=e.coordinates),e.attributes&&(this.ModelerRiverPolylineAtom.attributes=e.attributes),e.bClosed&&(this.ModelerRiverPolylineAtom.bClosed=e.bClosed)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.modelerRiverStyle){if("object"!=typeof t.modelerRiverStyle)throw c&&c.func("modelerEmbankStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerEmbankStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerRiverAtom;if(Object.keys(t.modelerRiverStyle).forEach(e=>{var t;if(void 0===r[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerRiverStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.mergeLength)&&"number"!=typeof t.modelerRiverStyle.mergeLength)throw c&&c.func("modelerRiverStyle.mergeLength "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.mergeLength "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.riverWidth)&&"number"!=typeof t.modelerRiverStyle.riverWidth)throw c&&c.func("modelerRiverStyle.riverWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.riverWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.riverHeight)&&"number"!=typeof t.modelerRiverStyle.riverHeight)throw c&&c.func("modelerRiverStyle.riverHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.riverHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.bInverseNormal)&&"boolean"!=typeof t.modelerRiverStyle.bInverseNormal)throw c&&c.func("modelerRiverStyle.bInverseNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerRiverStyle.bInverseNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.cornerRadius)&&"number"!=typeof t.modelerRiverStyle.cornerRadius)throw c&&c.func("modelerRiverStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.cornerSplitNum)&&"number"!=typeof t.modelerRiverStyle.cornerSplitNum)throw c&&c.func("modelerRiverStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.bUseVertexCorner)&&"boolean"!=typeof t.modelerRiverStyle.bUseVertexCorner)throw c&&c.func("modelerRiverStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerRiverStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.bUseVertexWidth)&&"boolean"!=typeof t.modelerRiverStyle.bUseVertexWidth)throw c&&c.func("modelerRiverStyle.bUseVertexWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerRiverStyle.bUseVertexWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.waterType)){if("string"!=typeof t.modelerRiverStyle.waterType)throw c&&c.func("modelerRiverStyle.waterType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerRiverStyle.waterType "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.riverType.find(e=>{return e===(null==(e=t.modelerRiverStyle)?void 0:e.waterType)}))throw c&&c.func(`modelerRiverStyle.waterType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.riverType.toString()),new Error(`modelerRiverStyle.waterType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.riverType.toString())}if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.waterColor)&&"string"!=typeof t.modelerRiverStyle.waterColor)throw c&&c.func("modelerRiverStyle.waterColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerRiverStyle.waterColor "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.waveHeight)&&"number"!=typeof t.modelerRiverStyle.waveHeight)throw c&&c.func("modelerRiverStyle.waveHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.waveHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.waterTransparency)&&"number"!=typeof t.modelerRiverStyle.waterTransparency)throw c&&c.func("modelerRiverStyle.waterTransparency "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.waterTransparency "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.waterTransparentDepth)&&"number"!=typeof t.modelerRiverStyle.waterTransparentDepth)throw c&&c.func("modelerRiverStyle.waterTransparentDepth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.waterTransparentDepth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.rippleScale)&&"number"!=typeof t.modelerRiverStyle.rippleScale)throw c&&c.func("modelerRiverStyle.rippleScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.rippleScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.waveRotate)&&"number"!=typeof t.modelerRiverStyle.waveRotate)throw c&&c.func("modelerRiverStyle.waveRotate "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.waveRotate "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerRiverStyle)?void 0:n.waveSpeed)&&"number"!=typeof t.modelerRiverStyle.waveSpeed)throw c&&c.func("modelerRiverStyle.waveSpeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerRiverStyle.waveSpeed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}if(void 0!==t.coordinates){if("object"!=typeof t.coordinates||void 0===t.coordinates.length)throw c&&c.func("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("coordinates "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw c&&c.func("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw c&&c.func(`coordinates value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`coordinates value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==t.bClosed&&"boolean"!=typeof t.bClosed)throw c&&c.func("bClosed "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("bClosed "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==t.attributes){if("object"!=typeof t.attributes||void 0===t.attributes.length)throw c&&c.func("attributes "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("attributes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));t.attributes.forEach(e=>{let t,r,n,i,o,a,s,l,u={cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1};if(Object.keys(e).forEach(e=>{var t;if(void 0===u[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`attributes.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw c&&c.func(null==(t=C.getInstance())?void 0:t.GetCommonErr().number),new Error("attributes.cornerRadius "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().number));if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw c&&c.func(null==(n=C.getInstance())?void 0:n.GetCommonErr().number),new Error("attributes.cornerSplitNum "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().number));if(void 0!==e.baseWidth&&"number"!=typeof e.baseWidth)throw c&&c.func(null==(o=C.getInstance())?void 0:o.GetCommonErr().number),new Error("attributes.baseWidth "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().number));if(void 0!==e.sideWidthScale&&"number"!=typeof e.sideWidthScale)throw c&&c.func(null==(s=C.getInstance())?void 0:s.GetCommonErr().number),new Error("attributes.sideWidthScale "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().number))})}}}class jo extends G{constructor(e){super(e,Co),this.setType("ModelerRiver")}}class Io extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ModelerFence"}),Object.defineProperty(this,"ModelerFencePolylineAtom",{enumerable:!0,configurable:!0,writable:!0,value:{attributes:[{cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1}],coordinates:[[0,0,0],[0,0,0]],bClosed:!1}}),Object.defineProperty(this,"ModelerFenceAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bUseVertexCorner:!1,bRotCol:!1,fenceMeshTypeName:"SM_P_wall_04",cornerRadius:0,fenceScale:1}}),this.setObjAtom(this),this.oType="ModelerFence",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get coordinates(){return this.ModelerFencePolylineAtom.coordinates}set coordinates(e){this.Update({coordinates:e})}get attributes(){return this.ModelerFencePolylineAtom.attributes}set attributes(e){this.Update({attributes:e})}get bClosed(){return this.ModelerFencePolylineAtom.bClosed}set bClosed(e){this.Update({bClosed:e})}get bUseVertexCorner(){return this.ModelerFenceAtom.bUseVertexCorner}set bUseVertexCorner(e){this.Update({ModelerFenceStyle:{bUseVertexCorner:e}})}get bRotCol(){return this.ModelerFenceAtom.bRotCol}set bRotCol(e){this.Update({ModelerFenceStyle:{bRotCol:e}})}get fenceMeshTypeName(){return this.ModelerFenceAtom.fenceMeshTypeName}set fenceMeshTypeName(e){this.Update({ModelerFenceStyle:{fenceMeshTypeName:e}})}get cornerRadius(){return this.ModelerFenceAtom.cornerRadius}set cornerRadius(e){this.Update({ModelerFenceStyle:{cornerRadius:e}})}get fenceScale(){return this.ModelerFenceAtom.fenceScale}set fenceScale(e){this.Update({ModelerFenceStyle:{fenceScale:e}})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFencePolylineAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({coordinates:e})})}GetAttributes(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFencePolylineAtom.attributes}})}SetAttributes(e){return m(this,void 0,void 0,function*(){return yield this.Update({attributes:e})})}GetClosed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFencePolylineAtom.bClosed}})}SetClosed(e){return m(this,void 0,void 0,function*(){return yield this.Update({bClosed:e})})}GetUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFenceAtom.bUseVertexCorner}})}SetUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({ModelerFenceStyle:{bUseVertexCorner:e}})})}GetRotCol(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFenceAtom.bRotCol}})}SetRotCol(e){return m(this,void 0,void 0,function*(){return yield this.Update({ModelerFenceStyle:{bRotCol:e}})})}GetFenceMeshTypeName(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFenceAtom.fenceMeshTypeName}})}SetFenceMeshTypeName(e){return m(this,void 0,void 0,function*(){return yield this.Update({ModelerFenceStyle:{fenceMeshTypeName:e}})})}GetCornerRadius(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFenceAtom.cornerRadius}})}SetCornerRadius(e){return m(this,void 0,void 0,function*(){return yield this.Update({ModelerFenceStyle:{cornerRadius:e}})})}GetFenceScale(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFenceAtom.fenceScale}})}SetFenceScale(e){return m(this,void 0,void 0,function*(){return yield this.Update({ModelerFenceStyle:{fenceScale:e}})})}GetScheme(){return{ModelerFenceAtom:this.ModelerFenceAtom,ModelerFencePolylineAtom:this.ModelerFencePolylineAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{ModelerFenceStyle:this.ModelerFenceAtom}),this.ModelerFencePolylineAtom)}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.ModelerFenceStyle&&D(this.ModelerFenceAtom,e.ModelerFenceStyle),e.coordinates&&(this.ModelerFencePolylineAtom.coordinates=e.coordinates),e.attributes&&(this.ModelerFencePolylineAtom.attributes=e.attributes),e.bClosed&&(this.ModelerFencePolylineAtom.bClosed=e.bClosed)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.coordinates){if("object"!=typeof t.coordinates||void 0===t.coordinates.length)throw c&&c.func("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));t.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw c&&c.func("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw c&&c.func(`coordinates value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`coordinates value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})}if(void 0!==t.bClosed&&"boolean"!=typeof t.bClosed)throw c&&c.func("bClosed "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("bClosed "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean));if(void 0!==t.attributes){if("object"!=typeof t.attributes||void 0===t.attributes.length)throw c&&c.func("attributes "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("attributes "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));t.attributes.forEach(e=>{let t,r,n,i,o,a,s,l,u={cornerRadius:1,cornerSplitNum:10,baseWidth:1,sideWidthScale:1};if(Object.keys(e).forEach(e=>{var t;if(void 0===u[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`attributes.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw c&&c.func(null==(t=C.getInstance())?void 0:t.GetCommonErr().number),new Error("attributes.cornerRadius "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().number));if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw c&&c.func(null==(n=C.getInstance())?void 0:n.GetCommonErr().number),new Error("attributes.cornerSplitNum "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().number));if(void 0!==e.baseWidth&&"number"!=typeof e.baseWidth)throw c&&c.func(null==(o=C.getInstance())?void 0:o.GetCommonErr().number),new Error("attributes.baseWidth "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().number));if(void 0!==e.sideWidthScale&&"number"!=typeof e.sideWidthScale)throw c&&c.func(null==(s=C.getInstance())?void 0:s.GetCommonErr().number),new Error("attributes.sideWidthScale "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().number))})}if(void 0!==t.ModelerFenceStyle){if("object"!=typeof t.ModelerFenceStyle)throw c&&c.func("ModelerFenceStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("ModelerFenceStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerFenceAtom;if(Object.keys(t.ModelerFenceStyle).forEach(e=>{var t;if(void 0===r[e])throw c&&c.func(`ModelerFenceStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`ModelerFenceStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.ModelerFenceStyle)?void 0:n.bUseVertexCorner)&&"boolean"!=typeof t.ModelerFenceStyle.bUseVertexCorner)throw c&&c.func("ModelerFenceStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("ModelerFenceStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.ModelerFenceStyle)?void 0:n.bRotCol)&&"boolean"!=typeof t.ModelerFenceStyle.bRotCol)throw c&&c.func("ModelerFenceStyle.bRotCol "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("ModelerFenceStyle.bRotCol "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.ModelerFenceStyle)?void 0:n.fenceMeshTypeName)){if("string"!=typeof t.ModelerFenceStyle.fenceMeshTypeName)throw c&&c.func("ModelerFenceStyle.fenceMeshTypeName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("ModelerFenceStyle.fenceMeshTypeName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.modelerFenceType.find(e=>{return e===(null==(e=t.ModelerFenceStyle)?void 0:e.fenceMeshTypeName)}))throw c&&c.func(`ModelerFenceStyle.fenceMeshTypeName ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.modelerFenceType.toString()),new Error(`ModelerFenceStyle.fenceMeshTypeName ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.modelerFenceType.toString())}if(void 0!==(null==(n=t.ModelerFenceStyle)?void 0:n.cornerRadius)&&("number"!=typeof t.ModelerFenceStyle.cornerRadius||t.ModelerFenceStyle.cornerRadius<0))throw c&&c.func("ModelerFenceStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("ModelerFenceStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber));if(void 0!==(null==(n=t.ModelerFenceStyle)?void 0:n.fenceScale)&&("number"!=typeof t.ModelerFenceStyle.fenceScale||t.ModelerFenceStyle.fenceScale<0))throw c&&c.func("ModelerFenceStyle.fenceScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber)),new Error("ModelerFenceStyle.fenceScale "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().positiveNumber))}}}class Go extends G{constructor(e){super(e,Io),this.setType("ModelerFence")}}class Oo extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ModelerFloor"}),Object.defineProperty(this,"ModelerFloorPolygonAtom",{enumerable:!0,configurable:!0,writable:!0,value:{attributes:[{cornerRadius:1,cornerSplitNum:10}],coordinates:[[[0,0,0],[0,0,0]]]}}),Object.defineProperty(this,"ModelerFloorAtom",{enumerable:!0,configurable:!0,writable:!0,value:{innerMatName:"face_grass_1",outerMatName:"side_brick_9",innerHeight:20,outerHeight:20,outerWidth:20,cornerRadius:100,cornerSplitNum:10,outerUVTransform:{rotation:{x:0,y:0,z:0,w:1},translation:[0,0,0],scale3d:[1,1,1]},innerUVTransform:{rotation:{x:0,y:0,z:0,w:1},translation:[0,0,0],scale3d:[1,1,1]},bUseVertexCorner:!1,bAlignZ:!0,bInverseNormal:!0,innerRoughness:1,outerRoughness:1,innerNormal:1,outerNormal:1,innerBrightness:1,outerBrightness:1}}),this.setObjAtom(this),this.oType="ModelerFloor",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get coordinates(){return this.ModelerFloorPolygonAtom.coordinates}set coordinates(e){this.Update({coordinates:e})}get attributes(){return this.ModelerFloorPolygonAtom.attributes}set attributes(e){this.Update({attributes:e})}get innerMatName(){return this.ModelerFloorAtom.innerMatName}set innerMatName(e){this.Update({modelerFloorStyle:{innerMatName:e}})}get outerMatName(){return this.ModelerFloorAtom.outerMatName}set outerMatName(e){this.Update({modelerFloorStyle:{outerMatName:e}})}get innerHeight(){return this.ModelerFloorAtom.innerHeight}set innerHeight(e){this.Update({modelerFloorStyle:{innerHeight:e}})}get outerHeight(){return this.ModelerFloorAtom.outerHeight}set outerHeight(e){this.Update({modelerFloorStyle:{outerHeight:e}})}get outerWidth(){return this.ModelerFloorAtom.outerWidth}set outerWidth(e){this.Update({modelerFloorStyle:{outerWidth:e}})}get cornerRadius(){return this.ModelerFloorAtom.cornerRadius}set cornerRadius(e){this.Update({modelerFloorStyle:{cornerRadius:e}})}get cornerSplitNum(){return this.ModelerFloorAtom.cornerSplitNum}set cornerSplitNum(e){this.Update({modelerFloorStyle:{cornerSplitNum:e}})}get outerUVTransform(){return this.ModelerFloorAtom.outerUVTransform}set outerUVTransform(e){this.Update({modelerFloorStyle:{outerUVTransform:e}})}get innerUVTransform(){return this.ModelerFloorAtom.innerUVTransform}set innerUVTransform(e){this.Update({modelerFloorStyle:{innerUVTransform:e}})}get bUseVertexCorner(){return this.ModelerFloorAtom.bUseVertexCorner}set bUseVertexCorner(e){this.Update({modelerFloorStyle:{bUseVertexCorner:e}})}get bAlignZ(){return this.ModelerFloorAtom.bAlignZ}set bAlignZ(e){this.Update({modelerFloorStyle:{bAlignZ:e}})}get bInverseNormal(){return this.ModelerFloorAtom.bInverseNormal}set bInverseNormal(e){this.Update({modelerFloorStyle:{bInverseNormal:e}})}get innerRoughness(){return this.ModelerFloorAtom.innerRoughness}set innerRoughness(e){this.Update({modelerFloorStyle:{innerRoughness:e}})}get outerRoughness(){return this.ModelerFloorAtom.outerRoughness}set outerRoughness(e){this.Update({modelerFloorStyle:{outerRoughness:e}})}get innerNormal(){return this.ModelerFloorAtom.innerNormal}set innerNormal(e){this.Update({modelerFloorStyle:{innerNormal:e}})}get outerNormal(){return this.ModelerFloorAtom.outerNormal}set outerNormal(e){this.Update({modelerFloorStyle:{outerNormal:e}})}get innerBrightness(){return this.ModelerFloorAtom.innerBrightness}set innerBrightness(e){this.Update({modelerFloorStyle:{innerBrightness:e}})}get outerBrightness(){return this.ModelerFloorAtom.outerBrightness}set outerBrightness(e){this.Update({modelerFloorStyle:{outerBrightness:e}})}GetCoordinates(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorPolygonAtom.coordinates}})}SetCoordinates(e){return m(this,void 0,void 0,function*(){return yield this.Update({coordinates:e})})}GetAttributes(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorPolygonAtom.attributes}})}SetAttributes(e){return m(this,void 0,void 0,function*(){return yield this.Update({attributes:e})})}GetInnerMatName(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.innerMatName}})}SetInnerMatName(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{innerMatName:e}})})}GetOuterMatName(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.outerMatName}})}SetOuterMatName(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{outerMatName:e}})})}GetInnerHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.innerHeight}})}SetInnerHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{innerHeight:e}})})}GetOuterHeight(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.outerHeight}})}SetOuterHeight(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{outerHeight:e}})})}GetOuterWidth(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.outerWidth}})}SetOuterWidth(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{outerWidth:e}})})}GetCornerRadius(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.cornerRadius}})}SetCornerRadius(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{cornerRadius:e}})})}GetCornerSplitNum(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.cornerSplitNum}})}SetCornerSplitNum(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{cornerSplitNum:e}})})}GetOuterUVTransform(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.outerUVTransform}})}SetOuterUVTransform(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{outerUVTransform:e}})})}GetInnerUVTransform(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.innerUVTransform}})}SetInnerUVTransform(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{innerUVTransform:e}})})}GetUseVertexCorner(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.bUseVertexCorner}})}SetUseVertexCorner(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{bUseVertexCorner:e}})})}GetAlignZ(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.bAlignZ}})}SetAlignZ(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{bAlignZ:e}})})}GetInverseNormal(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.bInverseNormal}})}SetInverseNormal(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{bInverseNormal:e}})})}GetInnerRoughness(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.innerRoughness}})}SetInnerRoughness(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{innerRoughness:e}})})}GetOuterRoughness(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.outerRoughness}})}SetOuterRoughness(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{outerRoughness:e}})})}GetInnerNormal(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.innerNormal}})}SetInnerNormal(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{innerNormal:e}})})}GetOuterNormal(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.outerNormal}})}SetOuterNormal(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{outerNormal:e}})})}GetInnerBrightness(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.innerBrightness}})}SetInnerBrightness(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{innerBrightness:e}})})}GetOuterBrightness(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.ModelerFloorAtom.outerBrightness}})}SetOuterBrightness(e){return m(this,void 0,void 0,function*(){return yield this.Update({modelerFloorStyle:{outerBrightness:e}})})}GetScheme(){return{ModelerFloorAtom:this.ModelerFloorAtom,ModelerFloorPolygonAtom:this.ModelerFloorPolygonAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{modelerFloorStyle:this.ModelerFloorAtom}),this.ModelerFloorPolygonAtom)}SetData(e){var t;this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.modelerFloorStyle&&(void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.innerMatName)&&(this.ModelerFloorAtom.innerMatName=e.modelerFloorStyle.innerMatName),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.outerMatName)&&(this.ModelerFloorAtom.outerMatName=e.modelerFloorStyle.outerMatName),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.innerHeight)&&(this.ModelerFloorAtom.innerHeight=e.modelerFloorStyle.innerHeight),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.outerHeight)&&(this.ModelerFloorAtom.outerHeight=e.modelerFloorStyle.outerHeight),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.outerWidth)&&(this.ModelerFloorAtom.outerWidth=e.modelerFloorStyle.outerWidth),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.cornerRadius)&&(this.ModelerFloorAtom.cornerRadius=e.modelerFloorStyle.cornerRadius),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.cornerSplitNum)&&(this.ModelerFloorAtom.cornerSplitNum=e.modelerFloorStyle.cornerSplitNum),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.bUseVertexCorner)&&(this.ModelerFloorAtom.bUseVertexCorner=e.modelerFloorStyle.bUseVertexCorner),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.bAlignZ)&&(this.ModelerFloorAtom.bAlignZ=e.modelerFloorStyle.bAlignZ),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.bInverseNormal)&&(this.ModelerFloorAtom.bInverseNormal=e.modelerFloorStyle.bInverseNormal),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.innerRoughness)&&(this.ModelerFloorAtom.innerRoughness=e.modelerFloorStyle.innerRoughness),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.outerRoughness)&&(this.ModelerFloorAtom.outerRoughness=e.modelerFloorStyle.outerRoughness),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.innerNormal)&&(this.ModelerFloorAtom.innerNormal=e.modelerFloorStyle.innerNormal),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.outerNormal)&&(this.ModelerFloorAtom.outerNormal=e.modelerFloorStyle.outerNormal),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.innerBrightness)&&(this.ModelerFloorAtom.innerBrightness=e.modelerFloorStyle.innerBrightness),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.outerBrightness)&&(this.ModelerFloorAtom.outerBrightness=e.modelerFloorStyle.outerBrightness),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.outerUVTransform)&&(void 0!==(null==(t=e.modelerFloorStyle.outerUVTransform)?void 0:t.rotation)&&(void 0!==(null==(t=e.modelerFloorStyle.outerUVTransform.rotation)?void 0:t.x)&&(this.ModelerFloorAtom.outerUVTransform.rotation.x=e.modelerFloorStyle.outerUVTransform.rotation.x),void 0!==(null==(t=e.modelerFloorStyle.outerUVTransform.rotation)?void 0:t.y)&&(this.ModelerFloorAtom.outerUVTransform.rotation.y=e.modelerFloorStyle.outerUVTransform.rotation.y),void 0!==(null==(t=e.modelerFloorStyle.outerUVTransform.rotation)?void 0:t.z)&&(this.ModelerFloorAtom.outerUVTransform.rotation.z=e.modelerFloorStyle.outerUVTransform.rotation.z),void 0!==(null==(t=e.modelerFloorStyle.outerUVTransform.rotation)?void 0:t.w))&&(this.ModelerFloorAtom.outerUVTransform.rotation.w=e.modelerFloorStyle.outerUVTransform.rotation.w),void 0!==(null==(t=e.modelerFloorStyle.outerUVTransform)?void 0:t.translation)&&(this.ModelerFloorAtom.outerUVTransform.translation=e.modelerFloorStyle.outerUVTransform.translation),void 0!==(null==(t=e.modelerFloorStyle.outerUVTransform)?void 0:t.scale3d))&&(this.ModelerFloorAtom.outerUVTransform.scale3d=e.modelerFloorStyle.outerUVTransform.scale3d),void 0!==(null==(t=e.modelerFloorStyle)?void 0:t.innerUVTransform))&&(void 0!==(null==(t=e.modelerFloorStyle.innerUVTransform)?void 0:t.rotation)&&(void 0!==(null==(t=e.modelerFloorStyle.innerUVTransform.rotation)?void 0:t.x)&&(this.ModelerFloorAtom.innerUVTransform.rotation.x=e.modelerFloorStyle.innerUVTransform.rotation.x),void 0!==(null==(t=e.modelerFloorStyle.innerUVTransform.rotation)?void 0:t.y)&&(this.ModelerFloorAtom.innerUVTransform.rotation.y=e.modelerFloorStyle.innerUVTransform.rotation.y),void 0!==(null==(t=e.modelerFloorStyle.innerUVTransform.rotation)?void 0:t.z)&&(this.ModelerFloorAtom.innerUVTransform.rotation.z=e.modelerFloorStyle.innerUVTransform.rotation.z),void 0!==(null==(t=e.modelerFloorStyle.innerUVTransform.rotation)?void 0:t.w))&&(this.ModelerFloorAtom.innerUVTransform.rotation.w=e.modelerFloorStyle.innerUVTransform.rotation.w),void 0!==(null==(t=e.modelerFloorStyle.innerUVTransform)?void 0:t.translation)&&(this.ModelerFloorAtom.innerUVTransform.translation=e.modelerFloorStyle.innerUVTransform.translation),void 0!==(null==(t=e.modelerFloorStyle.innerUVTransform)?void 0:t.scale3d))&&(this.ModelerFloorAtom.innerUVTransform.scale3d=e.modelerFloorStyle.innerUVTransform.scale3d),e.coordinates&&(this.ModelerFloorPolygonAtom.coordinates=e.coordinates),e.attributes&&(this.ModelerFloorPolygonAtom.attributes=e.attributes)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(r,e),0{var t;if(void 0===r[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.rotator&&this.validateRotator(t.rotator),void 0!==t.scale3d&&this.validateScale3d(t.scale3d),void 0!==t.attributes){if("object"!=typeof t.attributes||void 0===t.attributes.length)throw a&&a.func("attributes "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("attributes "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));t.attributes.forEach(e=>{let t,r,n,i,o={cornerRadius:1,cornerSplitNum:10};if(Object.keys(e).forEach(e=>{var t;if(void 0===o[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`attributes.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.cornerRadius&&"number"!=typeof e.cornerRadius)throw a&&a.func(null==(t=C.getInstance())?void 0:t.GetCommonErr().number),new Error("attributes.cornerRadius "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().number));if(void 0!==e.cornerSplitNum&&"number"!=typeof e.cornerSplitNum)throw a&&a.func(null==(n=C.getInstance())?void 0:n.GetCommonErr().number),new Error("attributes.cornerSplitNum "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().number))})}if(void 0!==t.coordinates){if("object"!=typeof t.coordinates||void 0===t.coordinates.length)throw a&&a.func("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("coordinates "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));t.coordinates.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw a&&a.func("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));e.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw a&&a.func("value of coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("value of coordinates value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(3!==e.filter(e=>"number"==typeof e).length)throw a&&a.func(`value of coordinates value ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 3`),new Error(`value of coordinates value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)})})}if(void 0!==t.modelerFloorStyle){if("object"!=typeof t.modelerFloorStyle)throw a&&a.func("modelerFloorStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerFloorStyle "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerFloorAtom;if(Object.keys(t.modelerFloorStyle).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(`modelerFloorStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerFloorStyle.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.innerMatName)){if("string"!=typeof t.modelerFloorStyle.innerMatName)throw a&&a.func("modelerFloorStyle.innerMatName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerFloorStyle.innerMatName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.innerMatNameType.find(e=>{return e===(null==(e=t.modelerFloorStyle)?void 0:e.innerMatName)}))throw a&&a.func(`modelerFloorStyle.innerMatName ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.innerMatNameType.toString()),new Error(`modelerFloorStyle.innerMatName ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.innerMatNameType.toString())}if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.outerMatName)){if("string"!=typeof t.modelerFloorStyle.outerMatName)throw a&&a.func("modelerFloorStyle.outerMatName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("modelerFloorStyle.outerMatName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.outerMatNameType.find(e=>{return e===(null==(e=t.modelerFloorStyle)?void 0:e.outerMatName)}))throw a&&a.func(`modelerFloorStyle.outerMatName ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.outerMatNameType.toString()),new Error(`modelerFloorStyle.outerMatName ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.outerMatNameType.toString())}if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.innerHeight)&&"number"!=typeof t.modelerFloorStyle.innerHeight)throw a&&a.func("modelerFloorStyle.innerHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.innerHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.outerHeight)&&"number"!=typeof t.modelerFloorStyle.outerHeight)throw a&&a.func("modelerFloorStyle.outerHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.outerHeight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.outerWidth)&&"number"!=typeof t.modelerFloorStyle.outerWidth)throw a&&a.func("modelerFloorStyle.outerWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.outerWidth "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.cornerRadius)&&"number"!=typeof t.modelerFloorStyle.cornerRadius)throw a&&a.func("modelerFloorStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.cornerRadius "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.cornerSplitNum)&&"number"!=typeof t.modelerFloorStyle.cornerSplitNum)throw a&&a.func("modelerFloorStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.cornerSplitNum "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.bUseVertexCorner)&&"boolean"!=typeof t.modelerFloorStyle.bUseVertexCorner)throw a&&a.func("modelerFloorStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerFloorStyle.bUseVertexCorner "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.bAlignZ)&&"boolean"!=typeof t.modelerFloorStyle.bAlignZ)throw a&&a.func("modelerFloorStyle.bAlignZ "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerFloorStyle.bAlignZ "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.bInverseNormal)&&"boolean"!=typeof t.modelerFloorStyle.bInverseNormal)throw a&&a.func("modelerFloorStyle.bInverseNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("modelerFloorStyle.bInverseNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.innerRoughness)&&"number"!=typeof t.modelerFloorStyle.innerRoughness)throw a&&a.func("modelerFloorStyle.innerRoughness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.innerRoughness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.outerRoughness)&&"number"!=typeof t.modelerFloorStyle.outerRoughness)throw a&&a.func("modelerFloorStyle.outerRoughness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.outerRoughness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.innerNormal)&&"number"!=typeof t.modelerFloorStyle.innerNormal)throw a&&a.func("modelerFloorStyle.innerNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.innerNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.outerNormal)&&"number"!=typeof t.modelerFloorStyle.outerNormal)throw a&&a.func("modelerFloorStyle.outerNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.outerNormal "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.innerBrightness)&&"number"!=typeof t.modelerFloorStyle.innerBrightness)throw a&&a.func("modelerFloorStyle.innerBrightness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.innerBrightness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.outerBrightness)&&"number"!=typeof t.modelerFloorStyle.outerBrightness)throw a&&a.func("modelerFloorStyle.outerBrightness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("modelerFloorStyle.outerBrightness "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.outerUVTransform)){if("object"!=typeof t.modelerFloorStyle.outerUVTransform)throw a&&a.func("modelerFloorStyle.outerUVTransform "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerFloorStyle.outerUVTransform "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerFloorAtom.outerUVTransform;if(Object.keys(t.modelerFloorStyle.outerUVTransform).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(`modelerFloorStyle.outerUVTransform.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerFloorStyle.outerUVTransform.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerFloorStyle.outerUVTransform)?void 0:n.rotation)){if("object"!=typeof t.modelerFloorStyle.outerUVTransform.rotation)throw a&&a.func("modelerFloorStyle.outerUVTransform.rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerFloorStyle.outerUVTransform.rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerFloorAtom.outerUVTransform.rotation;if(Object.keys(t.modelerFloorStyle.outerUVTransform.rotation).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(`modelerFloorStyle.outerUVTransform.rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerFloorStyle.outerUVTransform.rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerFloorStyle.outerUVTransform.rotation)?void 0:n.x)&&"number"!=typeof t.modelerFloorStyle.outerUVTransform.rotation.x)throw a&&a.func("opt.modelerFloorStyle.outerUVTransform.rotation.x "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.outerUVTransform.rotation.x "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle.outerUVTransform.rotation)?void 0:n.y)&&"number"!=typeof t.modelerFloorStyle.outerUVTransform.rotation.y)throw a&&a.func("opt.modelerFloorStyle.outerUVTransform.rotation.y "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.outerUVTransform.rotation.y "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle.outerUVTransform.rotation)?void 0:n.z)&&"number"!=typeof t.modelerFloorStyle.outerUVTransform.rotation.z)throw a&&a.func("opt.modelerFloorStyle.outerUVTransform.rotation.z "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.outerUVTransform.rotation.z "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle.outerUVTransform.rotation)?void 0:n.w)&&"number"!=typeof t.modelerFloorStyle.outerUVTransform.rotation.w)throw a&&a.func("opt.modelerFloorStyle.outerUVTransform.rotation.w "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.outerUVTransform.rotation.w "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}if(void 0!==(null==(n=t.modelerFloorStyle.outerUVTransform)?void 0:n.translation)){if("object"!=typeof t.modelerFloorStyle.outerUVTransform.translation||void 0===t.modelerFloorStyle.outerUVTransform.translation.length)throw a&&a.func("opt.modelerFloorStyle.outerUVTransform.translation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("opt.modelerFloorStyle.outerUVTransform.translation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(3!==t.modelerFloorStyle.outerUVTransform.translation.filter(e=>"number"==typeof e).length)throw a&&a.func(`opt.modelerFloorStyle.outerUVTransform.translation ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.outerUVTransform.translation ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==(n=t.modelerFloorStyle.outerUVTransform)?void 0:n.scale3d)){if("object"!=typeof t.modelerFloorStyle.outerUVTransform.scale3d||void 0===t.modelerFloorStyle.outerUVTransform.scale3d.length)throw a&&a.func("opt.modelerFloorStyle.outerUVTransform.scale3d "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("opt.modelerFloorStyle.outerUVTransform.scale3d "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(3!==t.modelerFloorStyle.outerUVTransform.scale3d.filter(e=>"number"==typeof e).length)throw a&&a.func(`opt.modelerFloorStyle.outerUVTransform.scale3d ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.outerUVTransform.scale3d ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}}if(void 0!==(null==(n=t.modelerFloorStyle)?void 0:n.innerUVTransform)){if("object"!=typeof t.modelerFloorStyle.innerUVTransform)throw a&&a.func("modelerFloorStyle.innerUVTransform "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerFloorStyle.innerUVTransform "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerFloorAtom.innerUVTransform;if(Object.keys(t.modelerFloorStyle.innerUVTransform).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(`modelerFloorStyle.innerUVTransform.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerFloorStyle.innerUVTransform.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerFloorStyle.innerUVTransform)?void 0:n.rotation)){if("object"!=typeof t.modelerFloorStyle.innerUVTransform.rotation)throw a&&a.func("modelerFloorStyle.innerUVTransform.rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("modelerFloorStyle.innerUVTransform.rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r=this.ModelerFloorAtom.innerUVTransform.rotation;if(Object.keys(t.modelerFloorStyle.innerUVTransform.rotation).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(`modelerFloorStyle.innerUVTransform.rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`modelerFloorStyle.innerUVTransform.rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.modelerFloorStyle.innerUVTransform.rotation)?void 0:n.x)&&"number"!=typeof t.modelerFloorStyle.innerUVTransform.rotation.x)throw a&&a.func("opt.modelerFloorStyle.innerUVTransform.rotation.x "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.innerUVTransform.rotation.x "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle.innerUVTransform.rotation)?void 0:n.y)&&"number"!=typeof t.modelerFloorStyle.innerUVTransform.rotation.y)throw a&&a.func("opt.modelerFloorStyle.innerUVTransform.rotation.y "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.innerUVTransform.rotation.y "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle.innerUVTransform.rotation)?void 0:n.z)&&"number"!=typeof t.modelerFloorStyle.innerUVTransform.rotation.z)throw a&&a.func("opt.modelerFloorStyle.innerUVTransform.rotation.z "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.innerUVTransform.rotation.z "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==(null==(n=t.modelerFloorStyle.innerUVTransform.rotation)?void 0:n.w)&&"number"!=typeof t.modelerFloorStyle.innerUVTransform.rotation.w)throw a&&a.func("opt.modelerFloorStyle.innerUVTransform.rotation.w "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("opt.modelerFloorStyle.innerUVTransform.rotation.w "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}if(void 0!==(null==(n=t.modelerFloorStyle.innerUVTransform)?void 0:n.translation)){if("object"!=typeof t.modelerFloorStyle.innerUVTransform.translation||void 0===t.modelerFloorStyle.innerUVTransform.translation.length)throw a&&a.func("opt.modelerFloorStyle.innerUVTransform.translation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("opt.modelerFloorStyle.innerUVTransform.translation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(3!==t.modelerFloorStyle.innerUVTransform.translation.filter(e=>"number"==typeof e).length)throw a&&a.func(`opt.modelerFloorStyle.innerUVTransform.translation ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.innerUVTransform.translation ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==(n=t.modelerFloorStyle.innerUVTransform)?void 0:n.scale3d)){if("object"!=typeof t.modelerFloorStyle.innerUVTransform.scale3d||void 0===t.modelerFloorStyle.innerUVTransform.scale3d.length)throw a&&a.func("opt.modelerFloorStyle.innerUVTransform.scale3d "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("opt.modelerFloorStyle.innerUVTransform.scale3d "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(3!==t.modelerFloorStyle.innerUVTransform.scale3d.filter(e=>"number"==typeof e).length)throw a&&a.func(`opt.modelerFloorStyle.innerUVTransform.scale3d ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.modelerFloorStyle.innerUVTransform.scale3d ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}}}}}class To extends G{constructor(e){super(e,Oo),this.setType("ModelerFloor")}}class Ao extends I{constructor(e){super(e),Object.defineProperty(this,"RequestEntity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Static",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Hierarchy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Skeletal",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Vegetation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ModelerEmbank",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ModelerWater",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ModelerRiver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ModelerFence",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ModelerFloor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ModelValidate",{enumerable:!0,configurable:!0,writable:!0,value:new so}),this.RequestEntity=new j(e),this.Static=new uo(e),this.Hierarchy=new ho(e),this.Skeletal=new go(e),this.Vegetation=new yo(e),this.ModelerEmbank=new bo(e),this.ModelerWater=new So(e),this.ModelerRiver=new jo(e),this.ModelerFence=new Go(e),this.ModelerFloor=new To(e)}ClearByTypes(n){return m(this,void 0,void 0,function*(){if(this.ModelValidate.validateClearByTypes(n),(n=n.filter(t=>{if(this.obj.RegisterObj.GetTypes().find(e=>e.name===t&&"Model"===e.category))return t})).length<=0)return{success:!1,message:"Type is empty"};var e=yield this.RequestEntity.RemoveEntityByTypes(n.map(e=>this.obj.RegisterObj.EntityType.get(e)));if(e.success)for(let t=0;te.name===n[t]);r&&(yield r.object.ClearCache())}return e})}Clear(){return m(this,void 0,void 0,function*(){var e=this.obj.RegisterObj.GetTypes().filter(e=>"Model"===e.category),e=yield this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e.name)));return e.success&&(yield this.ClearCache()),e})}ClearCache(){return m(this,void 0,void 0,function*(){return this.obj.RegisterObj.GetTypes().filter(e=>"Model"===e.category).forEach(e=>{e.object.ClearCache()}),{success:!0,message:""}})}}class Ro{validateTiles(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&void 0!==e&&"object"!=typeof e)throw r&&r.func("tiles "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("tiles "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}validateSetLayersOutline(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},layers:[],bOutline:!1,styleName:""};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.layers)){if("object"!=typeof e.layers||void 0===e.layers.length)throw i&&i.func("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));e.layers.forEach(t=>{var e;if(!C.layersType.find(e=>e===t))throw i&&i.func(`layers.${t} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.layersType.toString()),new Error(`layers.${t} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.layersType.toString())})}if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw i&&i.func("bOutline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bOutline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw i&&i.func("styleName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("styleName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSetLayersHighlight(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},layers:[],bHighlight:!1,styleName:""};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.layers)){if("object"!=typeof e.layers||void 0===e.layers.length)throw i&&i.func("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));e.layers.forEach(t=>{var e;if(!C.layersType.find(e=>e===t))throw i&&i.func(`layers.${t} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.layersType.toString()),new Error(`layers.${t} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.layersType.toString())})}if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw i&&i.func("bHighlight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bHighlight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw i&&i.func("styleName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("styleName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSetLayersVisibility(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},layers:[],bVisible:!1};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.layers)){if("object"!=typeof e.layers||void 0===e.layers.length)throw i&&i.func("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));e.layers.forEach(t=>{var e;if(!C.layersType.find(e=>e===t))throw i&&i.func(`layers.${t} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.layersType.toString()),new Error(`layers.${t} is illegal. ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.layersType.toString())})}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw i&&i.func("bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bVisible "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}validateCreateAesTilesEntityWithOutGRPC(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if(void 0===e)throw r&&r.func("uri "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("uri "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("string"!=typeof e)throw r&&r.func("uri "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("uri "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSetNodesOutline(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},nodeIds:[],bOutline:!1,styleName:""};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw i&&i.func("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw i&&i.func("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString))}if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw i&&i.func("bOutline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bOutline "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw i&&i.func("styleName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("styleName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSetNodesHighlight(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},nodeIds:[],bHighlight:!1,styleName:""};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw i&&i.func("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw i&&i.func("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString))}if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw i&&i.func("bHighlight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bHighlight "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw i&&i.func("styleName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("styleName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateRemoveVisibilityGroup(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},groupNames:""};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.groupNames)&&"string"!=typeof e.groupNames)throw i&&i.func("groupNames "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("groupNames "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateUpdateVisibilityGroup(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},addNodes:[],removeNodes:[],bVisible:!1,newGroupName:"",groupName:""};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.addNodes)){if("object"!=typeof e.addNodes||void 0===e.addNodes.length)throw i&&i.func("addNodes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("addNodes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.addNodes.filter(e=>"string"==typeof e).length!==e.addNodes.length)throw i&&i.func("addNodes value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("addNodes value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString))}if(void 0!==(null==e?void 0:e.removeNodes)){if("object"!=typeof e.removeNodes||void 0===e.removeNodes.length)throw i&&i.func("removeNodes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("removeNodes "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.removeNodes.filter(e=>"string"==typeof e).length!==e.removeNodes.length)throw i&&i.func("removeNodes value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("removeNodes value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString))}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw i&&i.func("bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==e?void 0:e.newGroupName)&&"string"!=typeof e.newGroupName)throw i&&i.func("newGroupName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("newGroupName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==(null==e?void 0:e.groupName)&&"string"!=typeof e.groupName)throw i&&i.func("groupName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("groupName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateAddVisibilityGroup(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},nodeIds:[],bVisible:!1,groupName:""};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw i&&i.func("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw i&&i.func("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString))}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw i&&i.func("bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==(null==e?void 0:e.groupName)&&"string"!=typeof e.groupName)throw i&&i.func("groupName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("groupName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateSetNodesVisibility(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={tiles:{},nodeIds:[],bVisible:!1};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0!==(null==e?void 0:e.nodeIds)){if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw i&&i.func("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("layers "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw i&&i.func("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("layers value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString))}if(void 0!==(null==e?void 0:e.bVisible)&&"boolean"!=typeof e.bVisible)throw i&&i.func("bVisible "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bVisible "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}}class Po extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tiles"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Ro}),Object.defineProperty(this,"AesTilesEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{spaceId:"",rangeBox:[[0,0],[0,0],[0,0],[0,0]],version:""}}),Object.defineProperty(this,"AssetsAtom",{enumerable:!0,configurable:!0,writable:!0,value:{seedIds:[]}}),Object.defineProperty(this,"AesTilesVisualAtom",{enumerable:!0,configurable:!0,writable:!0,value:{visualGroupToNodes:{},hiddenLayers:[]}}),this.setObjAtom(this),this.oType="Tiles",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get spaceId(){return this.AesTilesEntityAtom.spaceId}set spaceId(e){this.Update({spaceId:e})}get rangeBox(){return this.AesTilesEntityAtom.rangeBox}set rangeBox(e){this.Update({rangeBox:e})}get version(){return this.AesTilesEntityAtom.version}set version(e){this.Update({version:e})}get seedIds(){return this.AssetsAtom.seedIds}set seedIds(e){this.Update({seedIds:e})}GetSpaceId(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AesTilesEntityAtom.spaceId}})}SetSpaceId(e){return m(this,void 0,void 0,function*(){return yield this.Update({spaceId:e})})}GetRangeBox(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AesTilesEntityAtom.rangeBox}})}SetRangeBox(e){return m(this,void 0,void 0,function*(){return yield this.Update({rangeBox:e})})}GetVersion(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AesTilesEntityAtom.version}})}SetVersion(e){return m(this,void 0,void 0,function*(){return yield this.Update({version:e})})}GetSeedIds(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AssetsAtom.seedIds}})}SetSeedIds(e){return m(this,void 0,void 0,function*(){return yield this.Update({seedIds:e})})}GetScheme(){return{AesTilesEntityAtom:this.AesTilesEntityAtom,AssetsAtom:this.AssetsAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getTransformData()),this.getOtherData()),{spaceId:this.AesTilesEntityAtom.spaceId,rangeBox:this.AesTilesEntityAtom.rangeBox,version:this.AesTilesEntityAtom.version})}SetData(e){this.setEid(e),this.setBasicData(e),this.setTransformData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.spaceId&&(this.AesTilesEntityAtom.spaceId=e.spaceId),void 0!==e.rangeBox&&(this.AesTilesEntityAtom.rangeBox=e.rangeBox),void 0!==e.version&&(this.AesTilesEntityAtom.version=e.version)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"!=typeof t[e]||void 0!==t[e].length||"visualGroupToNodes"===e?r[e]=t[e]:this.generateObjectData(t[e],r[e]))})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getTransformData()),this.getOtherData()),{spaceId:this.AesTilesEntityAtom.spaceId,rangeBox:this.AesTilesEntityAtom.rangeBox,version:this.AesTilesEntityAtom.version})}Validate(e){let t,r,n,i,o,a,s,l,u,c=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw c&&c.func(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let d=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t;if(void 0===d[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.version&&"string"!=typeof e.version)throw c&&c.func("version "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string)),new Error("version "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().string));if(void 0!==e.rangeBox){if("object"!=typeof e.rangeBox||void 0===e.rangeBox.length)throw c&&c.func("rangeBox "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array)),new Error("rangeBox "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().array));if(4!==e.rangeBox.length)throw c&&c.func(`rangeBox ${null==(l=C.getInstance())?void 0:l.GetCommonErr().arrayLength} 4`),new Error(`rangeBox ${null==(u=C.getInstance())?void 0:u.GetCommonErr().arrayLength} 4`);e.rangeBox.forEach(e=>{if(2!==e.filter(e=>"number"==typeof e).length)throw c&&c.func(`rangeBox value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`),new Error(`rangeBox value ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)})}}}class Do extends G{constructor(e){super(e,Po),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Ro}),this.setType("Tiles")}ActivateAesTiles(e){return m(this,void 0,void 0,function*(){this.TilesValidate.validateTiles(e);var t={eid:""};if(void 0!==e)t.eid=e.eid;else{let e=yield this.GetTiles();t.eid=0e.object);{let e=yield this.obj.Scene.GetTiles();return e.success&&null!=(t=e.result)&&t.Tiles?e.result.Tiles:[]}})}}class Mo extends G{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Ro}),this.setType("TilesNode")}SetNodesOutline(e){var r;return m(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesOutline(e);var t={nodeIds:e.nodeIds};if(void 0!==(null==e?void 0:e.tiles))t.aesTilesEid=e.tiles.eid;else{let e=yield this.obj.Scene.Tiles.GetTiles();t.aesTilesEid=0{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"!=typeof t[e]||void 0!==t[e].length||"visualGroupToNodes"===e?r[e]=t[e]:this.generateObjectData(t[e],r[e]))})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getTransformData()),this.getOtherData()),this.EarthTilesEntityAtom)}Validate(e){let t,r,n,i,o,a=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw a&&a.func(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let s=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t;if(void 0===s[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.projectWorldIndex&&"number"!=typeof e.projectWorldIndex)throw a&&a.func("projectWorldIndex "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().number)),new Error("projectWorldIndex "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().number))}}class xo extends G{constructor(e){super(e,ko),this.setType("EarthTiles")}}class Vo extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Effects"}),Object.defineProperty(this,"AssetAtom",{enumerable:!0,configurable:!0,writable:!0,value:{seedId:null}}),Object.defineProperty(this,"EffectsAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bActive:!0,speed:1,colorParameters:{paramName:{r:1,g:1,b:1,a:1}},vectorParameters:{paramName:[0,0,0]},intParameters:{paramName:0},floatParameters:{paramName:0},boolParameters:{paramName:!0}}}),this.setObjAtom(this),this.oType="Effects",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get seedId(){return this.AssetAtom.seedId}set seedId(e){this.Update({seedId:e})}get bActive(){return this.EffectsAtom.bActive}set bActive(e){this.Update({bActive:e})}get speed(){return this.EffectsAtom.speed}set speed(e){this.Update({speed:e})}GetSeedId(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.AssetAtom.seedId}})}SetSeedId(e){return m(this,void 0,void 0,function*(){return yield this.Update({seedId:e})})}GetbActive(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.EffectsAtom.bActive}})}SetbActive(e){return m(this,void 0,void 0,function*(){return yield this.Update({bActive:e})})}GetActive(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.EffectsAtom.bActive}})}SetActive(e){return m(this,void 0,void 0,function*(){return yield this.Update({bActive:e})})}GetSpeed(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.EffectsAtom.speed}})}SetSpeed(e){return m(this,void 0,void 0,function*(){return yield this.Update({speed:e})})}GetScheme(){return{EffectsAtom:this.EffectsAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getTransformData()),this.getBasicData()),this.getOtherData()),{seedId:this.AssetAtom.seedId,bActive:this.EffectsAtom.bActive,speed:this.EffectsAtom.speed})}SetData(e){this.setEid(e),this.setTransformData(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),e.seedId&&(this.AssetAtom.seedId=e.seedId),void 0!==e.bActive&&(this.EffectsAtom.bActive=e.bActive),void 0!==e.speed&&(this.EffectsAtom.speed=e.speed)}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={},l={};return O(n,e),0{var t;if(void 0===d[e])throw c&&c.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.seedId&&"string"!=typeof e.seedId)throw c&&c.func("seedId "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().string)),new Error("seedId "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().string));if(void 0!==e.bActive&&"boolean"!=typeof e.bActive)throw c&&c.func("bActive "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().boolean)),new Error("bActive "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().boolean));if(void 0!==e.speed&&("number"!=typeof e.speed||e.speed<0))throw c&&c.func("speed "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().positiveNumber)),new Error("speed "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().positiveNumber))}}class _o extends G{constructor(e){super(e,Vo),this.setType("Effects")}}class Lo{validateObjNodeIds(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func("obj "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("obj "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("object"!=typeof t||void 0===t.length)throw n&&n.func("nodeIds "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("nodeIds "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(t.filter(e=>"string"==typeof e).length!==t.length)throw n&&n.func("nodeIds "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().arrayString)),new Error("nodeIds "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayString))}}}class No extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpNodeSelectionApi"}),Object.defineProperty(this,"NodeSelectionValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Lo})}Add(t,r){return m(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(t,r);var e=yield this.StartApi(this.apiClassName,"Add",{eid:t.eid,nodeIds:r});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Remove(t,r){return m(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(t,r);var e=yield this.StartApi(this.apiClassName,"Remove",{eid:t.eid,nodeIds:r});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Draw(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"DrawSelection",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"ClearSelection",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}AddDraw(t,r){return m(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(t,r);let e=!0;return{success:e=(yield this.Add(t,r)).success&&(yield this.Draw()).success?e:!1,message:""}})}RemoveDraw(t,r){return m(this,void 0,void 0,function*(){this.NodeSelectionValidate.validateObjNodeIds(t,r);let e=!0;return{success:e=(yield this.Remove(t,r)).success&&(yield this.Draw()).success?e:!1,message:""}})}ClearDraw(){return m(this,void 0,void 0,function*(){let e=!0;return{success:e=(yield this.Clear()).success&&(yield this.Draw()).success?e:!1,message:""}})}}class Uo extends x{constructor(e){super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Outliner"}),Object.defineProperty(this,"WdpSceneOutlinerAtom",{enumerable:!0,configurable:!0,writable:!0,value:{eids:{}}}),Object.defineProperty(this,"entities",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this.setObjAtom(this),this.oType="Outliner",this.type=b.get(this.oType),e&&(this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get eids(){return this.WdpSceneOutlinerAtom.eids}set eids(e){this.WdpSceneOutlinerAtom.eids=e}GetEids(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpSceneOutlinerAtom.eids}})}SetEids(e){return m(this,void 0,void 0,function*(){return this.WdpSceneOutlinerAtom.eids=e,{success:!0,message:""}})}GetScheme(){return{WdpSceneOutlinerAtom:this.WdpSceneOutlinerAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{entities:this.entities})}SetData(t){this.setEid(t),this.setBasicData(t),this.setVisibleData(t),void 0!==t.entities&&(this.entities=t.entities,Object.keys(t.entities).forEach(e=>{this.WdpSceneOutlinerAtom.eids[e]={eids:t.entities[e].map(e=>e.eid)}}))}generateAtomData(t){let e={},r={},n={};return void 0!==t.entityName&&(r.entityName=t.entityName),void 0!==t.customId&&(r.customId=t.customId),void 0!==t.customData&&(r.customData="object"==typeof t.customData?JSON.stringify(t.customData):t.customData),0{n.eids={},n.eids[e]={eids:t.entities[e].map(e=>e.eid)}}),0e.GetData().eid),position:n,category:i};return yield this.obj.startApi(e,t)})}}class Bo extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Group"}),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpGroupAPI"}),Object.defineProperty(this,"EntityChildrenAtom",{enumerable:!0,configurable:!0,writable:!0,value:{childrenEids:[]}}),Object.defineProperty(this,"childrenEntities",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"WdpGroupTransformAtom",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0],rotator:{pitch:0,yaw:0,roll:0},scale3d:[1,1,1]}}),Object.defineProperty(this,"WdpGroupVisibleAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bVisible:!0}}),this.setObjAtom(this),this.oType="Group",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get bVisible(){return this.WdpGroupVisibleAtom.bVisible}set bVisible(e){this.Update({bVisible:e})}get location(){return this.WdpGroupTransformAtom.location}set location(e){this.Update({location:e})}get rotator(){return this.WdpGroupTransformAtom.rotator}set rotator(e){this.Update({rotator:e})}get scale3d(){return this.WdpGroupTransformAtom.scale3d}set scale3d(e){this.Update({scale3d:e})}get childrenEids(){return this.EntityChildrenAtom.childrenEids}set childrenEids(e){this.EntityChildrenAtom.childrenEids=e}get children(){return this.childrenEntities}set children(e){this.Update({children:e})}GetChildren(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.childrenEntities}})}SetChildren(e){return m(this,void 0,void 0,function*(){return yield this.Update({children:e})})}GetVisible(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpGroupVisibleAtom.bVisible}})}SetVisible(t=!0){return m(this,void 0,void 0,function*(){var e=yield this.Update({bVisible:t});return e.success&&(this.WdpGroupVisibleAtom.bVisible=t),e})}GetLocation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpGroupTransformAtom.location}})}SetLocation(t){return m(this,void 0,void 0,function*(){var e=yield this.Update({location:t});return e.success&&(this.WdpGroupTransformAtom.location=t),e})}GetRotator(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpGroupTransformAtom.rotator}})}SetRotator(t){return m(this,void 0,void 0,function*(){var e=yield this.Update({rotator:t});return e.success&&(this.WdpGroupTransformAtom.rotator=t),e})}GetScale3d(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.WdpGroupTransformAtom.scale3d}})}SetScale3d(t){return m(this,void 0,void 0,function*(){var e=yield this.Update({scale3d:t});return e.success&&(this.WdpGroupTransformAtom.scale3d=t),e})}GetScheme(){return{EntityChildrenAtom:this.EntityChildrenAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.WdpGroupTransformAtom),this.getBasicData()),this.getOtherData()),{children:this.children})}SetData(e){this.setEid(e),T(this.WdpGroupTransformAtom,e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),void 0!==e.children&&(this.childrenEntities=e.children,this.EntityChildrenAtom.childrenEids=e.children.map(e=>e.eid))}generateAtomData(e){var t={},r={},n={},i={},o={},a={},s={};return O(r,e),0e.eid)),0{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"==typeof t[e]&&void 0===t[e].length?this.generateObjectData(t[e],r[e]):(r[e]=t[e],"childrenEids"===e&&(this.childrenEntities=t[e].map(e=>this.obj.ObjectEidMap.get(""+e)))))})}generateLocationAtom(e){return{WdpGroupTransformAtom:{location:e}}}generateRotatorAtom(e){return{WdpGroupTransformAtom:{rotator:e}}}generateScale3dAtom(e){return{WdpGroupTransformAtom:{scale3d:e}}}generateVisibleAtom(e){return{WdpGroupVisibleAtom:{bVisible:e}}}UnGroup(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"UnGroup",{eid:this.eid});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Add(t,r=-1){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"Add",{groupEid:this.eid,addToGroupPosition:r,addEids:t.map(e=>e.eid)});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Remove(r){return m(this,void 0,void 0,function*(){let t=!0;var e=this.children.filter(t=>!r.find(e=>e.eid===t.eid));(yield this.SetChildren(e)).success||(t=!1);for(let e=0;e{var t;if(void 0===u[e])throw l&&l.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotator&&this.validateRotator(e.rotator),void 0!==e.scale3d&&this.validateScale3d(e.scale3d),void 0!==e.children){if("object"!=typeof e.children||void 0===e.children.length)throw l&&l.func("children "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("children "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(e.children.filter(e=>"object"==typeof e).length!==e.children.length)throw l&&l.func("children value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object)),new Error("children value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().object))}}}class Wo extends G{constructor(e){super(e,Bo),this.setType("Group")}Get(n){return m(this,void 0,void 0,function*(){if(!n)return{success:!0,result:this.findFromMap()};var e=this.findFromMap(""+n);if(e)return{success:!0,result:e};e=yield this.RequestEntity.GetEntitiesData([""+n]);if(!e.success)return{success:!1,message:"Eid is non-existent"};let t=[];0e===t.coordZRef))throw i&&i.func(`coordZRef ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordZRefType.toString()),new Error(`coordZRef ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.coordZRefType.toString())}if(void 0!==(null==t?void 0:t.invert)&&"boolean"!=typeof t.invert)throw i&&i.func("invert "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("invert "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean));if(void 0!==(null==t?void 0:t.strokeColor)&&"string"!=typeof t.strokeColor)throw i&&i.func("strokeColor "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().hexa)),new Error("strokeColor "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().hexa));if(void 0!==(null==t?void 0:t.strokeWeight)&&"number"!=typeof t.strokeWeight)throw i&&i.func("strokeWeight "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number)),new Error("strokeWeight "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==(null==t?void 0:t.transform)){if(void 0!==(null==(e=t.transform)?void 0:e.location)){if("object"!=typeof t.transform.location||void 0===t.transform.location.length)throw i&&i.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().locationErr),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().locationErr);if(3!==t.transform.location.filter(e=>"number"==typeof e).length)throw i&&i.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().locationErr2),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().locationErr2)}if(void 0!==(null==(e=t.transform)?void 0:e.scale3d)){if("object"!=typeof t.transform.scale3d||void 0===t.transform.scale3d.length)throw i&&i.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().scale3dErr2),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().locationErr);if(3!==t.transform.scale3d.filter(e=>"number"==typeof e).length)throw i&&i.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().scale3dErr2),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().locationErr2)}if(void 0!==(null==(e=t.transform)?void 0:e.rotator)){if("object"!=typeof t.transform.rotator)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().rotatorErr),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().rotatorErr);let r={pitch:0,yaw:0,roll:0};if(Object.keys(t.transform.rotator).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotator.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.transform.rotator)?void 0:n.pitch)&&("number"!=typeof t.transform.rotator.pitch||t.transform.rotator.pitch<-180||180{void 0!==r[e]&&"Eid"!==e&&"Type"!==e&&("object"!=typeof t[e]||void 0!==t[e].length||"visualGroupToNodes"===e?r[e]=t[e]:this.generateObjectData(t[e],r[e]))})}GetValidateRules(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{visualGroupToNodes:this.ProjectEntityAtom.visualGroupToNodes})}Validate(e){let t,r,n,i,o,a=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if("object"!=typeof e)throw a&&a.func(null==(r=C.getInstance())?void 0:r.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let s=this.GetValidateRules();if(Object.keys(e).forEach(e=>{var t;if(void 0===s[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.visualGroupToNodes&&"object"!=typeof e.visualGroupToNodes)throw a&&a.func("visualGroupToNodes "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().object)),new Error("visualGroupToNodes "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().object))}}class zo extends G{constructor(e){super(e,qo),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"AesTilesNodeAPI"}),Object.defineProperty(this,"TilesValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Ro}),this.setType("Project")}SetNodesOutline(e){var r;return m(this,void 0,void 0,function*(){this.TilesValidate.validateSetNodesOutline(e);var t={nodeIds:e.nodeIds};if(void 0!==(null==e?void 0:e.project))t.aesTilesEid=e.project.eid;else{let e=yield this.GetProject();t.aesTilesEid=0e.object);{let e=yield this.obj.Scene.GetProject();return e.success&&null!=(t=e.result)&&t.Project?e.result.Project:[]}})}}class Zo{constructor(e){Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpSelectionApi"}),Object.defineProperty(this,"selections",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}Add(r){var n;return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"Add"},t={eids:r.map(e=>e.GetData().eid)},e=yield this.obj.startApi(e,t);return e.success&&(this.handleCache(r,"Add"),null!=(n=e.result))&&n.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:this.selections}})}Get(){return m(this,void 0,void 0,function*(){return this.selections})}Remove(r){var n;return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"Remove"},t={eids:r.map(e=>e.GetData().eid)},e=yield this.obj.startApi(e,t);return e.success&&(this.handleCache(r,"Remove"),null!=(n=e.result))&&n.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:this.selections}})}Clear(){var t;return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"ClearSelection"},e=yield this.obj.startApi(e,{});return e.success&&(this.handleCache([],"Clear"),null!=(t=e.result))&&t.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:this.selections}})}Draw(){var t;return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"DrawSelection"},e=yield this.obj.startApi(e,{});return null!=(t=e.result)&&t.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:this.selections}})}handleCache(t,e="add"){if("Add"===e){this.selections.push(...t);let e=new Set(this.selections);this.selections=[...e]}else"Remove"===e?t.forEach(t=>{var e=this.selections.findIndex(e=>e.eid===t.eid);0<=e&&this.selections.splice(e,1)}):"Clear"===e&&(this.selections=[])}}class Yo{constructor(e){Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpGizmoAPI"}),Object.defineProperty(this,"obj",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.obj=e}SetGizmoState(t="Disable"){return m(this,void 0,void 0,function*(){var e={apiClassName:this.apiClassName,apiFuncName:"SetGizmoState"};return yield this.obj.startApi(e,{gizmoState:t})})}}class Jo{validateDelete(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw r&&r.func("objs value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}validateGetTypesByEids(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("eids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("eids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw r&&r.func("eids value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayString)),new Error("eids value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayString))}}validateClear(e){let t,r,n,i,o,a,s=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw s&&s.func("EntityTypesToIgnore "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("EntityTypesToIgnore "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw s&&s.func("EntityTypesToIgnore value "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().arrayString)),new Error("EntityTypesToIgnore value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().arrayString));e.forEach(e=>{var t;if(!b.get(e))throw s&&s.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}}validateClearByObjects(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw r&&r.func("objs value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}validateClearByEids(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("eids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("eids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw r&&r.func("eids value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("eids value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateClearByTypes(e){let t,r,n,i,o,a,s,l,u=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if(void 0===e)throw u&&u.func("types "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().required)),new Error("types "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().required));if("object"!=typeof e||void 0===e.length)throw u&&u.func("types "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array)),new Error("types "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw u&&u.func("types "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayString)),new Error("types "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().arrayString));e.forEach(e=>{var t;if(!b.get(e))throw u&&u.func(`types.${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(`types.,${e} `+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}}validateSetVisibleByObjects(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw n&&n.func("objs "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("objs "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object));if(e.filter(e=>"object"==typeof e).length!==e.length)throw n&&n.func("objs value "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("boolean"!=typeof t)throw n&&n.func("bVisible "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().boolean)),new Error("bVisible "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}validateSetLocked(e,t=!0){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw n&&n.func("objs "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("objs "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object));if(e.filter(e=>"object"==typeof e).length!==e.length)throw n&&n.func("objs value "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("boolean"!=typeof t)throw n&&n.func("bLocked "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().boolean)),new Error("bLocked "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}validateRunAction(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("string"!=typeof e)throw n&&n.func("actionName "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().string)),new Error("actionName "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("object"!=typeof t)throw n&&n.func("actionParams "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("actionParams "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}validateAddSelection(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw r&&r.func("objs value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}validateRemoveSelection(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw r&&r.func("objs value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}validateSave(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"string"!=typeof e)throw r&&r.func("containerId "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("containerId "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}validateLoad(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"string"!=typeof e)throw r&&r.func("containerId "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("containerId "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}validateGetObjectEid(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"string"!=typeof e)throw r&&r.func("eid "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("eid "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}validateMerge(e,t,r){let n,i,o,a,s,l,u,c,d,h,m=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(i=C.getInstance())&&i.GetValiDateState()){if("string"!=typeof e)throw m&&m.func("containerId "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().string)),new Error("containerId "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().string));if("string"!=typeof t)throw m&&m.func("anotherContainerId "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().string)),new Error("anotherContainerId "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().string));if("object"!=typeof r||void 0===r.length)throw m&&m.func("EntityTypesToIgnore "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().array)),new Error("EntityTypesToIgnore "+(null==(c=C.getInstance())?void 0:c.GetCommonErr().array));if(r.filter(e=>"string"==typeof e).length!==r.length)throw m&&m.func("EntityTypesToIgnore value "+(null==(d=C.getInstance())?void 0:d.GetCommonErr().arrayString)),new Error("EntityTypesToIgnore value "+(null==(h=C.getInstance())?void 0:h.GetCommonErr().arrayString));r.forEach(e=>{var t;if(!b.get(e))throw m&&m.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}}validateSetLocation(e,t){var r,n;let i=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw i&&i.func("objs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("objs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw i&&i.func("objs value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("object"!=typeof t)throw i&&i.func("location "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("location "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));let r={x:0,y:0,z:0};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`location.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.x&&"number"!=typeof t.x)throw i&&i.func("location.x "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("location.x "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==t.y&&"number"!=typeof t.y)throw i&&i.func("location.y "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("location.y "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==t.z&&"number"!=typeof t.z)throw i&&i.func("location.z "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("location.z "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}}validateSetLocations(e){let t,r,n,i,v=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw v&&v.func("datas "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("datas "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));e.forEach(e=>{let t,r,n,i,o,a,s,l,u,c,d,h,m,g={object:{},location:{x:0,y:0,z:0}};if(Object.keys(e).forEach(e=>{var t;if(void 0===g[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.object)throw v&&v.func("datas.object "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("datas.object "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object));if("object"!=typeof e.location)throw v&&v.func("datas.location "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("datas.location "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().object));let f={x:0,y:0,z:0};if(Object.keys(e.location).forEach(e=>{var t;if(void 0===f[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(o=e.location)?void 0:o.x)&&"number"!=typeof e.location.x)throw v&&v.func("datas.location.x "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().number)),new Error("datas.location.x "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().number));if(void 0!==(null==(l=e.location)?void 0:l.y)&&"number"!=typeof e.location.y)throw v&&v.func("datas.location.y "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().number)),new Error("datas.location.y "+(null==(c=C.getInstance())?void 0:c.GetCommonErr().number));if(void 0!==(null==(d=e.location)?void 0:d.z)&&"number"!=typeof e.location.z)throw v&&v.func("datas.location.z "+(null==(h=C.getInstance())?void 0:h.GetCommonErr().number)),new Error("datas.location.z "+(null==(m=C.getInstance())?void 0:m.GetCommonErr().number))})}}validateSetRotator(e,t){var r,n;let i=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw i&&i.func("objs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("objs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw i&&i.func("objs value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("object"!=typeof t)throw i&&i.func("rotator "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotator "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));let r={pitch:0,yaw:0,roll:0};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`location.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.pitch&&("number"!=typeof t.pitch||t.pitch<-180||180{let t,r,n,i,o,a,s,l,u,c,d,h,m,g={object:{},rotator:{pitch:0,yaw:0,roll:0}};if(Object.keys(e).forEach(e=>{var t;if(void 0===g[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.object)throw v&&v.func("datas.object "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("datas.object "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object));if("object"!=typeof e.rotator)throw v&&v.func("datas.rotator "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("datas.rotator "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().object));let f={pitch:0,yaw:0,roll:0};if(Object.keys(e.rotator).forEach(e=>{var t;if(void 0===f[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(o=e.rotator)?void 0:o.pitch)&&"number"!=typeof e.rotator.pitch)throw v&&v.func("datas.rotator.pitch "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().number)),new Error("datas.rotator.pitch "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().number));if(void 0!==(null==(l=e.rotator)?void 0:l.yaw)&&"number"!=typeof e.rotator.yaw)throw v&&v.func("datas.rotator.yaw "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().number)),new Error("datas.rotator.yaw "+(null==(c=C.getInstance())?void 0:c.GetCommonErr().number));if(void 0!==(null==(d=e.rotator)?void 0:d.roll)&&"number"!=typeof e.rotator.roll)throw v&&v.func("datas.rotator.roll "+(null==(h=C.getInstance())?void 0:h.GetCommonErr().number)),new Error("datas.rotator.roll "+(null==(m=C.getInstance())?void 0:m.GetCommonErr().number))})}}validateSetScale3D(e,t){var r,n;let i=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw i&&i.func("objs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("objs "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw i&&i.func("objs value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("object"!=typeof t)throw i&&i.func("scale3d "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("scale3d "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));let r={x:0,y:0,z:0};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`location.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.x&&"number"!=typeof t.x)throw i&&i.func("scale3d.x "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("scale3d.x "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==t.y&&"number"!=typeof t.y)throw i&&i.func("scale3d.y "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("scale3d.y "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==t.z&&"number"!=typeof t.z)throw i&&i.func("scale3d.z "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("scale3d.z "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number))}}validateSetScale3Ds(e){let t,r,n,i,v=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw v&&v.func("datas "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("datas "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));e.forEach(e=>{let t,r,n,i,o,a,s,l,u,c,d,h,m,g={object:{},scale3d:{x:0,y:0,z:0}};if(Object.keys(e).forEach(e=>{var t;if(void 0===g[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),"object"!=typeof e.object)throw v&&v.func("datas.object "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("datas.object "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object));if("object"!=typeof e.scale3d)throw v&&v.func("datas.scale3d "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("datas.scale3d "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().object));let f={x:0,y:0,z:0};if(Object.keys(e.scale3d).forEach(e=>{var t;if(void 0===f[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(o=e.scale3d)?void 0:o.x)&&"number"!=typeof e.scale3d.x)throw v&&v.func("datas.scale3d.x "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().number)),new Error("datas.scale3d.x "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().number));if(void 0!==(null==(l=e.scale3d)?void 0:l.y)&&"number"!=typeof e.scale3d.y)throw v&&v.func("datas.scale3d.y "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().number)),new Error("datas.scale3d.y "+(null==(c=C.getInstance())?void 0:c.GetCommonErr().number));if(void 0!==(null==(d=e.scale3d)?void 0:d.z)&&"number"!=typeof e.scale3d.z)throw v&&v.func("datas.scale3d.z "+(null==(h=C.getInstance())?void 0:h.GetCommonErr().number)),new Error("datas.scale3d.z "+(null==(m=C.getInstance())?void 0:m.GetCommonErr().number))})}}validateSetVisible(e,t){var r,n=null==(n=C.getInstance())?void 0:n.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw n&&n.func("objs "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array)),new Error("objs "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw n&&n.func("objs value "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().object)),new Error("objs value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("boolean"!=typeof t)throw n&&n.func("bVisible "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().boolean)),new Error("bVisible "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}validateClearByCustomId(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("cids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("cids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw r&&r.func("cids value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayString)),new Error("cids value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayString))}}validateGetByCustomId(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("cids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("cids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw r&&r.func("cids value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayString)),new Error("cids value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayString))}}validateUpdateByCustomId(e,t,n){let r,i,o,a,s,l,u,c,d,h,m,g,f,v,y,p,b=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(i=C.getInstance())&&i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw b&&b.func("cids "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array)),new Error("cids "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw b&&b.func("cids value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayString)),new Error("cids value "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().arrayString));if("object"!=typeof t)throw b&&b.func("opt "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().object)),new Error("opt "+(null==(c=C.getInstance())?void 0:c.GetCommonErr().object));if(void 0!==n){if("object"!=typeof n.calculateCoordZ)throw b&&b.func(null==(d=C.getInstance())?void 0:d.getErrorTxt().calculateCoordZ),new Error(null==(h=C.getInstance())?void 0:h.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(n.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw b&&b.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==n.calculateCoordZ.coordZRef){if("string"!=typeof n.calculateCoordZ.coordZRef)throw b&&b.func(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZRef),new Error(null==(g=C.getInstance())?void 0:g.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===n.calculateCoordZ.coordZRef))throw b&&b.func(null==(f=C.getInstance())?void 0:f.getErrorTxt().coordZRef2),new Error(null==(v=C.getInstance())?void 0:v.getErrorTxt().coordZRef2)}if(void 0!==n.calculateCoordZ.coordZOffset&&"number"!=typeof n.calculateCoordZ.coordZOffset)throw b&&b.func(null==(y=C.getInstance())?void 0:y.getErrorTxt().coordZOffset),new Error(null==(p=C.getInstance())?void 0:p.getErrorTxt().coordZOffset)}}}validateUpdateByCustomIds(e,t){let r,n,i,o,a,s,l,u,c,d,h,m,g,f,v=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw v&&v.func("opts "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("opts "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw v&&v.func("opts value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object)),new Error("opts value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().object));if(void 0!==t){if("object"!=typeof t.calculateCoordZ)throw v&&v.func(null==(l=C.getInstance())?void 0:l.getErrorTxt().calculateCoordZ),new Error(null==(u=C.getInstance())?void 0:u.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw v&&v.func(null==(c=C.getInstance())?void 0:c.getErrorTxt().coordZRef),new Error(null==(d=C.getInstance())?void 0:d.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw v&&v.func(null==(h=C.getInstance())?void 0:h.getErrorTxt().coordZRef2),new Error(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw v&&v.func(null==(g=C.getInstance())?void 0:g.getErrorTxt().coordZOffset),new Error(null==(f=C.getInstance())?void 0:f.getErrorTxt().coordZOffset)}}}validateClearByEntityName(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("entityNames "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("entityNames "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw r&&r.func("entityNames value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayString)),new Error("entityNames value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayString))}}validateUpdateByEntityName(e,t,n){let r,i,o,a,s,l,u,c,d,h,m,g,f,v,y,p,b=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(i=C.getInstance())&&i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw b&&b.func("entityNames "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array)),new Error("entityNames "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw b&&b.func("entityNames value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().arrayString)),new Error("entityNames value "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().arrayString));if("object"!=typeof t)throw b&&b.func("opt "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().object)),new Error("opt "+(null==(c=C.getInstance())?void 0:c.GetCommonErr().object));if(void 0!==n){if("object"!=typeof n.calculateCoordZ)throw b&&b.func(null==(d=C.getInstance())?void 0:d.getErrorTxt().calculateCoordZ),new Error(null==(h=C.getInstance())?void 0:h.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(n.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw b&&b.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==n.calculateCoordZ.coordZRef){if("string"!=typeof n.calculateCoordZ.coordZRef)throw b&&b.func(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZRef),new Error(null==(g=C.getInstance())?void 0:g.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===n.calculateCoordZ.coordZRef))throw b&&b.func(null==(f=C.getInstance())?void 0:f.getErrorTxt().coordZRef2),new Error(null==(v=C.getInstance())?void 0:v.getErrorTxt().coordZRef2)}if(void 0!==n.calculateCoordZ.coordZOffset&&"number"!=typeof n.calculateCoordZ.coordZOffset)throw b&&b.func(null==(y=C.getInstance())?void 0:y.getErrorTxt().coordZOffset),new Error(null==(p=C.getInstance())?void 0:p.getErrorTxt().coordZOffset)}}}validateUpdateByEntityNames(e,t){let r,n,i,o,a,s,l,u,c,d,h,m,g,f,v=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw v&&v.func("opts "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("opts "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw v&&v.func("opts value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object)),new Error("opts value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().object));if(void 0!==t){if("object"!=typeof t.calculateCoordZ)throw v&&v.func(null==(l=C.getInstance())?void 0:l.getErrorTxt().calculateCoordZ),new Error(null==(u=C.getInstance())?void 0:u.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw v&&v.func(null==(c=C.getInstance())?void 0:c.getErrorTxt().coordZRef),new Error(null==(d=C.getInstance())?void 0:d.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw v&&v.func(null==(h=C.getInstance())?void 0:h.getErrorTxt().coordZRef2),new Error(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw v&&v.func(null==(g=C.getInstance())?void 0:g.getErrorTxt().coordZOffset),new Error(null==(f=C.getInstance())?void 0:f.getErrorTxt().coordZOffset)}}}validateSetEntityOutline(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw r&&r.func("opt "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("opt "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if("object"!=typeof e.entities||void 0===e.entities.length)throw r&&r.func("opt.entities "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("opt.entities "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.entities.filter(e=>"object"==typeof e).length!==e.entities.length)throw r&&r.func("opt.entities value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("opt.entities value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw r&&r.func("opt.styleName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("opt.styleName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string));if(void 0!==(null==e?void 0:e.bOutline)&&"boolean"!=typeof e.bOutline)throw r&&r.func("opt.bOutline "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("opt.bOutline "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}validateSetEntityHighlight(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw r&&r.func("opt "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("opt "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if("object"!=typeof e.entities||void 0===e.entities.length)throw r&&r.func("opt.entities "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("opt.entities "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.entities.filter(e=>"object"==typeof e).length!==e.entities.length)throw r&&r.func("opt.entities value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("opt.entities value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));if(void 0!==(null==e?void 0:e.styleName)&&"string"!=typeof e.styleName)throw r&&r.func("opt.styleName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("opt.styleName "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string));if(void 0!==(null==e?void 0:e.bHighlight)&&"boolean"!=typeof e.bHighlight)throw r&&r.func("opt.bHighlight "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("opt.bHighlight "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}validateGetByEids(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw r&&r.func("eids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("eids "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw r&&r.func("eids value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().string)),new Error("eids value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string))}}validateCreate(e,t,n){let r,i,o,a,s,l,u,c,d,h,m,g,f,v,y=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(i=C.getInstance())&&i.GetValiDateState()){if("object"!=typeof e)throw y&&y.func("defaultParam "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().object)),new Error("defaultParam "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object));if("object"!=typeof t||void 0===t.length)throw y&&y.func("batchParams "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().array)),new Error("batchParams "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().array));if(void 0!==n){if("object"!=typeof n.calculateCoordZ)throw y&&y.func(null==(u=C.getInstance())?void 0:u.getErrorTxt().calculateCoordZ),new Error(null==(c=C.getInstance())?void 0:c.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(n.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw y&&y.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==n.calculateCoordZ.coordZRef){if("string"!=typeof n.calculateCoordZ.coordZRef)throw y&&y.func(null==(d=C.getInstance())?void 0:d.getErrorTxt().coordZRef),new Error(null==(h=C.getInstance())?void 0:h.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===n.calculateCoordZ.coordZRef))throw y&&y.func(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZRef2),new Error(null==(g=C.getInstance())?void 0:g.getErrorTxt().coordZRef2)}if(void 0!==n.calculateCoordZ.coordZOffset&&"number"!=typeof n.calculateCoordZ.coordZOffset)throw y&&y.func(null==(f=C.getInstance())?void 0:f.getErrorTxt().coordZOffset),new Error(null==(v=C.getInstance())?void 0:v.getErrorTxt().coordZOffset)}}}validateCreates(e,t){let r,n,i,o,a,s,l,u,c,d,h,m,g,f,v=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(n=C.getInstance())&&n.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw v&&v.func("jsonData "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("jsonData "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw v&&v.func("jsonData value "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().object)),new Error("jsonData value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().object));if(void 0!==t){if("object"!=typeof t.calculateCoordZ)throw v&&v.func(null==(l=C.getInstance())?void 0:l.getErrorTxt().calculateCoordZ),new Error(null==(u=C.getInstance())?void 0:u.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(t.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw v&&v.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.calculateCoordZ.coordZRef){if("string"!=typeof t.calculateCoordZ.coordZRef)throw v&&v.func(null==(c=C.getInstance())?void 0:c.getErrorTxt().coordZRef),new Error(null==(d=C.getInstance())?void 0:d.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===t.calculateCoordZ.coordZRef))throw v&&v.func(null==(h=C.getInstance())?void 0:h.getErrorTxt().coordZRef2),new Error(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZRef2)}if(void 0!==t.calculateCoordZ.coordZOffset&&"number"!=typeof t.calculateCoordZ.coordZOffset)throw v&&v.func(null==(g=C.getInstance())?void 0:g.getErrorTxt().coordZOffset),new Error(null==(f=C.getInstance())?void 0:f.getErrorTxt().coordZOffset)}}}validateUpdate(e,t,n){let r,i,o,a,s,l,u,c,d,h,m,g,f,v,y,p,b=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(i=C.getInstance())&&i.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw b&&b.func("objs "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array)),new Error("objs "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().array));if(e.filter(e=>"object"==typeof e).length!==e.length)throw b&&b.func("objs value "+(null==(s=C.getInstance())?void 0:s.GetCommonErr().object)),new Error("objs value "+(null==(l=C.getInstance())?void 0:l.GetCommonErr().object));if("object"!=typeof t)throw b&&b.func("obj "+(null==(u=C.getInstance())?void 0:u.GetCommonErr().object)),new Error("obj "+(null==(c=C.getInstance())?void 0:c.GetCommonErr().object));if(void 0!==n){if("object"!=typeof n.calculateCoordZ)throw b&&b.func(null==(d=C.getInstance())?void 0:d.getErrorTxt().calculateCoordZ),new Error(null==(h=C.getInstance())?void 0:h.getErrorTxt().calculateCoordZ);let r={coordZRef:"surface",coordZOffset:0};if(Object.keys(n.calculateCoordZ).forEach(e=>{var t;if(void 0===r[e])throw b&&b.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`operations.calculateCoordZ.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==n.calculateCoordZ.coordZRef){if("string"!=typeof n.calculateCoordZ.coordZRef)throw b&&b.func(null==(m=C.getInstance())?void 0:m.getErrorTxt().coordZRef),new Error(null==(g=C.getInstance())?void 0:g.getErrorTxt().coordZRef);if(!C.coordZRefType.find(e=>e===n.calculateCoordZ.coordZRef))throw b&&b.func(null==(f=C.getInstance())?void 0:f.getErrorTxt().coordZRef2),new Error(null==(v=C.getInstance())?void 0:v.getErrorTxt().coordZRef2)}if(void 0!==n.calculateCoordZ.coordZOffset&&"number"!=typeof n.calculateCoordZ.coordZOffset)throw b&&b.func(null==(y=C.getInstance())?void 0:y.getErrorTxt().coordZOffset),new Error(null==(p=C.getInstance())?void 0:p.getErrorTxt().coordZOffset)}}}validateSetSceneStyle(t="comic"){var e,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("string"!=typeof t)throw r&&r.func("style "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("style "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.sceneStyle.find(e=>e===t))throw r&&r.func(`style ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.sceneStyle.toString()),new Error(`style ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.sceneStyle.toString())}}validateGetBound(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if(void 0===e)throw r&&r.func("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("object"!=typeof e)throw r&&r.func("objs "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("objs "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}validateArrayDuplicate(t){var e,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw r&&r.func("opt "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("opt "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if("object"!=typeof t.entities||void 0===t.entities.length)throw r&&r.func("opt.entities "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("opt.entities "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(t.entities.filter(e=>"object"==typeof e).length!==t.entities.length)throw r&&r.func("opt.entities value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("opt.entities value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object));if(void 0!==(null==t?void 0:t.num)&&"number"!=typeof t.num)throw r&&r.func("opt.num "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number)),new Error("opt.num "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==(null==t?void 0:t.translation)){if("object"!=typeof t.translation||void 0===t.translation.length)throw r&&r.func("opt.translation "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("opt.translation "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(3!==t.translation.filter(e=>"number"==typeof e).length)throw r&&r.func(`opt.translation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.translation ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==t?void 0:t.rotator)){if("object"!=typeof t.rotator||void 0===t.rotator.length)throw r&&r.func("opt.rotator "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("opt.rotator "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(3!==t.rotator.filter(e=>"number"==typeof e).length)throw r&&r.func(`opt.rotator ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.rotator ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==(null==t?void 0:t.scale)){if("object"!=typeof t.scale||void 0===t.scale.length)throw r&&r.func("opt.scale "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("opt.scale "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array));if(3!==t.scale.filter(e=>"number"==typeof e).length)throw r&&r.func(`opt.scale ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`),new Error(`opt.scale ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==t.coordType){if("string"!=typeof t.coordType)throw r&&r.func("opt.coordType "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("opt.coordType "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.ArrayDuplicateCoordType.find(e=>e===t.coordType))throw r&&r.func(`opt.coordType ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.ArrayDuplicateCoordType.toString()),new Error(`opt.coordType ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.ArrayDuplicateCoordType.toString())}}}}class Ko extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpSceneAPI"}),Object.defineProperty(this,"SetSceneStyleAPI",{enumerable:!0,configurable:!0,writable:!0,value:"SetSceneStyleAPI"}),Object.defineProperty(this,"WdpArrayDuplicateAPI",{enumerable:!0,configurable:!0,writable:!0,value:"WdpArrayDuplicateAPI"}),Object.defineProperty(this,"SceneValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Jo}),Object.defineProperty(this,"per",{enumerable:!0,configurable:!0,writable:!0,value:new ji}),Object.defineProperty(this,"Covering",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Model",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Tiles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"TilesNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"EarthTiles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Effects",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"NodeSelection",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Outliner",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Group",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Section",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Project",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Action",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Selection",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"RequestEntity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Gizmo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Visual",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Covering=new ao(e),this.Model=new Ao(e),this.Tiles=new Do(e),this.TilesNode=new Mo(e),this.EarthTiles=new xo(e),this.Effects=new _o(e),this.NodeSelection=new No(e),this.Outliner=new Fo(e),this.Group=new Wo(e),this.Section=new $o(e),this.Project=new zo(e),this.Action=new Vn(e),this.Selection=new Zo(e),this.RequestEntity=new j(e),this.Gizmo=new Yo(e),this.Visual=new Cn(e)}Create(t,r,n){return m(this,void 0,void 0,function*(){var e;return this.SceneValidate.validateCreate(t,r,n),t.type?(e=this.obj.RegisterObj.Get(t.type))?yield e.object.CreateWithTemplate(t,r,n):{success:!1,message:"Type is illegal"}:{success:!1,message:"Type is needed"}})}Creates(e,t){return m(this,void 0,void 0,function*(){this.SceneValidate.validateCreates(e,t);let r=[];return e.forEach(e=>{var t=this.obj.RegisterObj.Get(e.type);t&&r.push(t.object.GetObject(e))}),yield this.Add(r,t)})}Delete(t){return m(this,void 0,void 0,function*(){this.SceneValidate.validateDelete(t);var e=yield this.RequestEntity.RemoveEntity(t.filter(e=>!1===e.bRemoved).map(e=>e.eid));return e.success&&t.forEach(e=>{e.DeleteFromCache()}),e})}Add(e,t){return m(this,void 0,void 0,function*(){return e instanceof Array?t?yield this.AddActMulit(e,t):yield this.AddActMulit(e):t?yield this.AddAct(e,t):yield this.AddAct(e)})}GetTypesByEids(t){var r;return m(this,void 0,void 0,function*(){this.SceneValidate.validateGetTypesByEids(t);var e=yield this.StartApi(this.apiClassName,"GetEntityTypeByEids",{eids:t}),e=yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);return e.success&&void 0!==(null==(r=null==e?void 0:e.result)?void 0:r.entityTypes)&&(e.result.entityTypes=e.result.entityTypes.map(e=>this.obj.RegisterObj.GetByValue(this.obj.RegisterObj.EntityType,e))),e})}Clear(t=[]){return m(this,void 0,void 0,function*(){this.SceneValidate.validateClear(t);var e=yield this.StartApi(this.apiClassName,"ClearScene",{entityTypesToIgnore:t.map(e=>this.obj.RegisterObj.EntityType.get(e))});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}ClearByObjects(t){return m(this,void 0,void 0,function*(){this.SceneValidate.validateClearByObjects(t);var e=yield this.RequestEntity.RemoveEntity(t.filter(e=>!1===e.bRemoved).map(e=>e.eid));return e.success&&t.forEach(e=>{e.DeleteFromCache()}),e})}ClearByEids(e){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateClearByEids(e),yield this.RequestEntity.RemoveEntity(e)})}ClearByTypes(e){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateClearByTypes(e),this.RequestEntity.RemoveEntityByTypes(e.map(e=>this.obj.RegisterObj.EntityType.get(e)))})}SetVisibleByObjects(e,t=!0){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetVisibleByObjects(e,t),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.bRemoved).map(e=>({eid:e.eid,entities:e.generateVisibleAtom(t)})))})}AddAct(r,n){return m(this,void 0,void 0,function*(){if(!r.className)return{success:!1,message:"No ClassName"};let t=r.className,e=this.obj.RegisterObj.GetTypes().find(e=>e.name===t);return e?n?yield e.object.Add(r,n):yield e.object.Add(r):{success:!1,message:"Entity type is illegal"}})}AddActMulit(i,o){var r,a;return m(this,void 0,void 0,function*(){let e=!0,t={};var n=[];for(let e=0;ee.oType===r[t])}return{success:e.success,message:e.message,result:n}})}GetGlobal(){var i;return m(this,void 0,void 0,function*(){let e=yield this.obj.DataModel.GeoReference.Get(),t=yield this.obj.CameraStart.Get(),r=[],n={};if(e.success&&0<(null==(i=null==e?void 0:e.result)?void 0:i.length)?n.GeoReference=e.result.map(e=>e.object):r.push("GeoReference"),t.success&&0<(null==(i=null==t?void 0:t.result)?void 0:i.length)?n.CameraStart=t.result.map(e=>e.object):r.push("CameraStart"),0{n[e]=t[e]}))}return{success:!0,message:"",result:n}})}GetCameraStart(){var t,r;return m(this,void 0,void 0,function*(){var e=yield this.obj.CameraStart.Get();if(e.success&&0<(null==(t=null==e?void 0:e.result)?void 0:t.length))return{success:!0,message:"",result:{CameraStart:e.result.map(e=>e.object)}};{let e=yield this.obj.RequestEntity.GetAllEntities(["CameraStart"]),t={};return e.success&&(t=yield an(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),null!=(r=e.result))&&r.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:t}}})}GetGeoReference(){var t,r;return m(this,void 0,void 0,function*(){var e=yield this.obj.DataModel.GeoReference.Get();if(e.success&&0<(null==(t=null==e?void 0:e.result)?void 0:t.length))return{success:!0,message:"",result:{GeoReference:e.result.map(e=>e.object)}};{let e=yield this.obj.RequestEntity.GetAllEntities(["GeoReference"]),t={};return e.success&&(t=yield an(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),null!=(r=e.result))&&r.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:t}}})}GetTiles(){var t,r;return m(this,void 0,void 0,function*(){var e=yield this.Tiles.Get();if(e.success&&0<(null==(t=null==e?void 0:e.result)?void 0:t.length))return{success:!0,message:"",result:{Tiles:e.result.map(e=>e.object)}};{let e=yield this.obj.RequestEntity.GetAllEntities(["Tiles"]),t={};return e.success&&(t=yield an(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),null!=(r=e.result))&&r.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:t}}})}GetProject(){var t,r;return m(this,void 0,void 0,function*(){var e=yield this.Project.Get();if(e.success&&0<(null==(t=null==e?void 0:e.result)?void 0:t.length))return{success:!0,message:"",result:{Project:e.result.map(e=>e.object)}};{let e=yield this.obj.RequestEntity.GetAllEntities(["Project"]),t={};return e.success&&(t=yield an(e.result,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap),null!=(r=e.result))&&r.sceneChangeInfo&&(yield S(e.result.sceneChangeInfo,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)),{success:e.success,message:e.message,result:t}}})}Merge(t,r,n=[]){return m(this,void 0,void 0,function*(){this.SceneValidate.validateMerge(t,r,n);var e=yield this.StartApi(this.apiClassName,"MergeScene",{containerId:t,anotherContainerId:r,EntityTypesToIgnore:n.map(e=>this.obj.RegisterObj.EntityType.get(e))});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}SetLocation(e,t){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetLocation(e,t),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.bRemoved).map(e=>({eid:e.eid,entities:e.generateLocationAtom(un(e,t))})))})}SetLocations(e){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetLocations(e),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.object.bRemoved).map(e=>({eid:e.object.eid,entities:e.object.generateLocationAtom(un(e.object,e.location))})))})}SetRotator(e,t){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetRotator(e,t),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.bRemoved).map(e=>({eid:e.eid,entities:e.generateRotatorAtom(cn(e,t))})))})}SetRotators(e){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetRotators(e),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.object.bRemoved).map(e=>({eid:e.object.eid,entities:e.object.generateRotatorAtom(cn(e.object,e.rotator))})))})}SetScale3D(e,t){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetScale3D(e,t),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.bRemoved).map(e=>({eid:e.eid,entities:e.generateScale3dAtom(un(e,t))})))})}SetScale3Ds(e){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetScale3Ds(e),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.object.bRemoved).map(e=>({eid:e.object.eid,entities:e.object.generateScale3dAtom(un(e.object,e.scale3d))})))})}SetVisible(e,t=!0){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetVisible(e,t),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.bRemoved).map(e=>({eid:e.eid,entities:e.generateVisibleAtom(t)})))})}SetLocked(e,t=!0){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateSetLocked(e,t),yield this.RequestEntity.UpdateEntitiesByEids(e.filter(e=>!1===e.bRemoved).map(e=>({eid:e.eid,entities:e.generateEntityFlagAtom(t)})))})}Update(r,n,e){return m(this,void 0,void 0,function*(){this.SceneValidate.validateUpdate(r,n,e);var t=[];for(let e=0;ee.eid);return 0==e.length?{success:!1,message:"No Objects"}:yield this.RequestEntity.RemoveEntity(e)})}GetByCustomId(e){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateGetByCustomId(e),{success:!0,message:"",result:dn(e,this.obj.ObjectEidMap)}})}UpdateByCustomId(e,i,o){return m(this,void 0,void 0,function*(){this.SceneValidate.validateUpdateByCustomId(e,i,o);let t=!0;var r=dn(e,this.obj.ObjectEidMap),n=[];for(let e=0;evoid 0!==e.customId).map(e=>e.customId),this.obj.ObjectEidMap),n=[];for(let t=0;te.customId===r[t].customId);i&&(r[t].generateAtomData?n.push({eid:r[t].eid,entities:r[t].generateAtomData(i)}):(yield r[t].Update(i)).success||(e=!1))}if(0e.customId===r[t].customId);e&&r[t].SetData(e)}return{success:e,message:""}})}ClearByEntityName(t){return m(this,void 0,void 0,function*(){this.SceneValidate.validateClearByEntityName(t);var e=hn(t,this.obj.ObjectEidMap).map(e=>e.eid);return 0==e.length?{success:!1,message:"No Objects"}:yield this.RequestEntity.RemoveEntity(e)})}GetByEntityName(e){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:hn(e,this.obj.ObjectEidMap)}})}UpdateByEntityName(e,i,o){return m(this,void 0,void 0,function*(){this.SceneValidate.validateUpdateByEntityName(e,i,o);let t=!0;var r=hn(e,this.obj.ObjectEidMap),n=[];for(let e=0;evoid 0!==e.entityName).map(e=>e.entityName),this.obj.ObjectEidMap),n=[];for(let t=0;te.entityName===r[t].entityName);i&&(r[t].generateAtomData?n.push({eid:r[t].eid,entities:r[t].generateAtomData(i)}):(yield r[t].Update(i)).success||(e=!1))}if(0e.entityName===r[t].entityName);e&&r[t].SetData(e)}return{success:e,message:""}})}SetEntityOutline(t){return m(this,void 0,void 0,function*(){this.SceneValidate.validateSetEntityOutline(t);var e={eids:t.entities.map(e=>e.eid)};return void 0!==t.styleName&&(e.styleName=t.styleName),void 0!==t.bOutline&&(e.bOutline=t.bOutline),yield this.Visual.SetEntityOutline(e)})}SetEntityHighlight(t){return m(this,void 0,void 0,function*(){this.SceneValidate.validateSetEntityHighlight(t);var e={eids:t.entities.map(e=>e.eid)};return void 0!==t.styleName&&(e.styleName=t.styleName),void 0!==t.bHighlight&&(e.bHighlight=t.bHighlight),yield new Cn(this.obj).SetEntityHighlight(e)})}GetByEids(e){return m(this,void 0,void 0,function*(){return this.SceneValidate.validateGetByEids(e),{success:!0,message:"",result:yield E(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)}})}SetSceneStyle(t="comic"){return m(this,void 0,void 0,function*(){this.SceneValidate.validateSetSceneStyle(t);var e=yield this.StartApi(this.SetSceneStyleAPI,"SetSceneStyle",{style:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}GetBoundingBox(t){var r;return m(this,void 0,void 0,function*(){this.SceneValidate.validateGetBound(t);var e=yield this.StartApi(this.apiClassName,"GetEntitiesBound",{eids:t.map(e=>e.eid)}),e=yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);return e.success&&null!=(r=null==e?void 0:e.result)&&r.entitiesBound&&(e.result.entitiesBound.center=[(e.result.entitiesBound.max[0]+e.result.entitiesBound.min[0])/2,(e.result.entitiesBound.max[1]+e.result.entitiesBound.min[1])/2,(e.result.entitiesBound.max[2]+e.result.entitiesBound.min[2])/2]),e})}ArrayDuplicate(e){var r;return m(this,void 0,void 0,function*(){this.SceneValidate.validateArrayDuplicate(e);var t=yield this.StartApi(this.WdpArrayDuplicateAPI,"ExecuteArrayDuplicate",{eids:e.entities.map(e=>e.eid),num:void 0!==e.num?e.num:1,translation:void 0!==e.translation?e.translation:[0,0,0],rotator:void 0!==e.rotator?e.rotator:[0,0,0],scale:void 0!==e.scale?e.scale:[1,1,1],coordType:void 0!==e.coordType?e.coordType:"world"}),t=yield w(t,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);if(t.success&&null!=(r=null==t?void 0:t.result)&&r.eids){let e=yield E(t.result.eids,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap);t.result.entities=e}return t})}}class Qo{validateFocusToNodes(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={tiles:{},nodeIds:[],rotation:{pitch:-30,yaw:0},distanceFactor:1,flyTime:1};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.tiles)&&"object"!=typeof e.tiles)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(void 0===(null==e?void 0:e.nodeIds))throw i&&i.func("nodeIds "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().required)),new Error("nodeIds "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().required));if("object"!=typeof e.nodeIds||void 0===e.nodeIds.length)throw i&&i.func("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.nodeIds.filter(e=>"string"==typeof e).length!==e.nodeIds.length)throw i&&i.func("The value of tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("The value of tiles "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.rotation)?void 0:n.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||0e===t))throw r&&r.func(`state ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.stateResetLimit.toString()),new Error(`state ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.stateResetLimit.toString())}}validateSetCameraLockLimit(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={locationLimit:10,pitchLimit:10,yawLimit:10,viewDistanceLimit:1e3};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.locationLimit&&"number"!=typeof e.locationLimit)throw i&&i.func("locationLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("locationLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(void 0!==e.pitchLimit){if("number"!=typeof e.pitchLimit)throw i&&i.func("pitchLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("pitchLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number));if(e.pitchLimit<-10||10{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==e?void 0:e.locationLimit)){if("object"!=typeof e.locationLimit||void 0===e.locationLimit.length)throw i&&i.func("locationLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("locationLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));e.locationLimit.forEach(e=>{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("The value of locationLimit "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("The value of locationLimit "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`The value of locationLimit ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of locationLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)})}if(void 0!==e.pitchLimit){if("object"!=typeof e.pitchLimit||void 0===e.pitchLimit.length)throw i&&i.func("pitchLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("pitchLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.pitchLimit.filter(e=>"number"==typeof e&&-90<=e&&e<=0).length)throw i&&i.func(`pitchLimit ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`);if(e.pitchLimit[0]>e.pitchLimit[1])throw i&&i.func("pitchLimit[0] must be < pitchLimit[1]"),new Error("pitchLimit[0] must be < pitchLimit[1]")}if(void 0!==e.yawLimit){if("object"!=typeof e.yawLimit||void 0===e.yawLimit.length)throw i&&i.func("yawLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("yawLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==e.yawLimit.filter(e=>"number"==typeof e&&-180<=e&&e<=180).length)throw i&&i.func(`yawLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`);if(e.yawLimit[0]>e.yawLimit[1])throw i&&i.func("yawLimit[0] must be < yawLimit[1]"),new Error("yawLimit[0] must be < yawLimit[1]")}if(void 0!==e.viewDistanceLimit){if("object"!=typeof e.viewDistanceLimit||void 0===e.viewDistanceLimit.length)throw i&&i.func("viewDistanceLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("viewDistanceLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(2!==e.viewDistanceLimit.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`viewDistanceLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`);if(e.viewDistanceLimit[0]>e.viewDistanceLimit[1])throw i&&i.func("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]")}}}validateResetCameraPose(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={state:"Default",flyTime:1};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.state){if("string"!=typeof t.state)throw i&&i.func("state "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("state "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.stateReset.find(e=>e===t.state))throw i&&i.func(`state ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.stateReset.toString()),new Error(`state ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.stateReset.toString())}if(void 0!==t.flyTime&&"number"!=typeof t.flyTime)throw i&&i.func("flyTime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("flyTime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}}validateSetCameraPose(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={location:[121.48940131,31.25135281,500],rotation:{pitch:-30,yaw:0},flyTime:1};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.location){if("object"!=typeof e.location||void 0===e.location.length)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr);if(3!==e.location.filter(e=>"number"==typeof e).length)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr2),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr2)}if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.rotation)?void 0:n.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||0e===t))throw r&&r.func(`controlModeType ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.controlModeType.toString()),new Error(`controlModeType ${null==(r=C.getInstance())?void 0:r.GetCommonErr().range} `+C.controlModeType.toString())}}validateUpdateCamera(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={location:[121.48940131,31.25135281,500],rotation:{pitch:-30,yaw:0},locationLimit:[[0,0],[0,0]],pitchLimit:[-90,0],yawLimit:[-180,180],viewDistanceLimit:[500,600],fieldOfView:90,controlMode:"RTS",flyTime:1};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.location){if("object"!=typeof t.location||void 0===t.location.length)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr);if(3!==t.location.filter(e=>"number"==typeof e).length)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr2),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().locationErr2)}if(void 0!==t.rotation){if("object"!=typeof t.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(t.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rotation)?void 0:n.pitch)&&("number"!=typeof t.rotation.pitch||t.rotation.pitch<-90||0{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("The value of locationLimit "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("The value of locationLimit "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`The value of locationLimit ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of locationLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)})}if(void 0!==t.pitchLimit){if("object"!=typeof t.pitchLimit||void 0===t.pitchLimit.length)throw i&&i.func("pitchLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("pitchLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.pitchLimit.filter(e=>"number"==typeof e&&-90<=e&&e<=0).length)throw i&&i.func(`pitchLimit ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`);if(t.pitchLimit[0]>t.pitchLimit[1])throw i&&i.func("pitchLimit[0] must be < pitchLimit[1]"),new Error("pitchLimit[0] must be < pitchLimit[1]")}if(void 0!==t.yawLimit){if("object"!=typeof t.yawLimit||void 0===t.yawLimit.length)throw i&&i.func("yawLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("yawLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.yawLimit.filter(e=>"number"==typeof e&&-180<=e&&e<=180).length)throw i&&i.func(`yawLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`);if(t.yawLimit[0]>t.yawLimit[1])throw i&&i.func("yawLimit[0] must be < yawLimit[1]"),new Error("yawLimit[0] must be < yawLimit[1]")}if(void 0!==t.viewDistanceLimit){if("object"!=typeof t.viewDistanceLimit||void 0===t.viewDistanceLimit.length)throw i&&i.func("viewDistanceLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("viewDistanceLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(2!==t.viewDistanceLimit.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`viewDistanceLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit value ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`);if(t.viewDistanceLimit[0]>t.viewDistanceLimit[1])throw i&&i.func("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be < opt.viewDistanceLimit[1]")}if(void 0!==t.fieldOfView&&("number"!=typeof t.fieldOfView||t.fieldOfView<0||120e===t.controlMode))throw i&&i.func(`controlModeType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.controlModeType.toString()),new Error(`controlModeType ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.controlModeType.toString())}if(void 0!==t.flyTime&&"number"!=typeof t.flyTime)throw i&&i.func("flyTime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("flyTime "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}}validateFlyTo(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={targetPosition:[121.48533665,31.24164246,30],rotation:{pitch:-30,yaw:0},distance:500,flyTime:1};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.targetPosition){if("object"!=typeof e.targetPosition||void 0===e.targetPosition.length)throw i&&i.func("targetPosition "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("targetPosition "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(3!==e.targetPosition.filter(e=>"number"==typeof e).length)throw i&&i.func(`targetPosition ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`),new Error(`targetPosition ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayNumberLength} 3`)}if(void 0!==e.rotation){if("object"!=typeof e.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.rotation)?void 0:n.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.direction){if("string"!=typeof t.direction)throw i&&i.func("direction "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("direction "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.directionType.find(e=>e===t.direction))throw i&&i.func(`direction ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.directionType.toString()),new Error(`direction ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.directionType.toString())}if(void 0!==t.velocity&&"number"!=typeof t.velocity)throw i&&i.func("velocity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("velocity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}}validateFocus(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={rotation:{pitch:-30,yaw:0},distanceFactor:.8,flyTime:1,entity:[]};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.rotation){if("object"!=typeof e.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.rotation)?void 0:n.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||0"object"==typeof e).length!==e.entity.length)throw i&&i.func("entity value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("entity value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object))}}}validateFollow(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={followRotation:{pitch:-30,yaw:0},useRelativeRotation:!0,distance:200,entity:{}};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.followRotation){if("object"!=typeof e.followRotation)throw i&&i.func("followRotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("followRotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(e.followRotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.followRotation)?void 0:n.pitch)&&("number"!=typeof e.followRotation.pitch||e.followRotation.pitch<-90||0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.direction){if("string"!=typeof t.direction)throw i&&i.func("direction "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("direction "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));if(!C.directionType.find(e=>e===t.direction))throw i&&i.func(`direction ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.directionType.toString()),new Error(`direction ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.directionType.toString())}if(void 0!==t.velocity&&"number"!=typeof t.velocity)throw i&&i.func("velocity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("velocity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}}validateAround(t){var e,n;let i=null==(e=C.getInstance())?void 0:e.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()){if("object"!=typeof t)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj);let r={direction:"forwar",velocity:10};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.direction){if("string"!=typeof t.direction)throw i&&i.func("direction "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("direction "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(!C.directionType2.find(e=>e===t.direction))throw i&&i.func(`direction ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.directionType2.toString()),new Error(`direction ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.directionType2.toString())}if(void 0!==t.velocity&&"number"!=typeof t.velocity)throw i&&i.func("velocity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number)),new Error("velocity "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().number))}}validatePlayCameraRoam(e,t){var r;let n=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e)throw n&&n.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj2),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj2);if("object"!=typeof t)throw n&&n.func(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj);let r={state:"Play",progressRatio:.5,speedRatio:1,bReverse:!1};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw n&&n.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.state){if("string"!=typeof t.state)throw n&&n.func("state "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("state "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.stateType.find(e=>e===t.state))throw n&&n.func(`state ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.stateType.toString()),new Error(`state ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.stateType.toString())}if(void 0!==t.progressRatio){if("number"!=typeof t.progressRatio)throw n&&n.func("progressRatio "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number)),new Error("progressRatio "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(t.progressRatio<0||1"string"==typeof e).length!==e.length)throw i&&i.func("cids value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayString)),new Error("cids value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayString));if("object"!=typeof t)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj);let r={rotation:{pitch:-30,yaw:0},distanceFactor:.8,flyTime:1,entity:[]};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.rotation){if("object"!=typeof t.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(t.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rotation)?void 0:n.pitch)&&("number"!=typeof t.rotation.pitch||t.rotation.pitch<-90||0"object"==typeof e).length!==t.entity.length)throw i&&i.func("entity value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("entity value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object))}}}validateFocusByEntityName(e,t){var r,n;let i=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()){if("object"!=typeof e||void 0===e.length)throw i&&i.func("entityNames "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("entityNames "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(e.filter(e=>"string"==typeof e).length!==e.length)throw i&&i.func("entityNames value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("entityNames value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if("object"!=typeof t)throw i&&i.func(null==(n=C.getInstance())?void 0:n.getErrorTxt().notObj),new Error(null==(e=C.getInstance())?void 0:e.getErrorTxt().notObj);let r={rotation:{pitch:-30,yaw:0},distanceFactor:.8,flyTime:1,entity:[]};if(Object.keys(t).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.rotation){if("object"!=typeof t.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:-30,yaw:0};if(Object.keys(t.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rotation)?void 0:n.pitch)&&("number"!=typeof t.rotation.pitch||t.rotation.pitch<-90||0"object"==typeof e).length!==t.entity.length)throw i&&i.func("entity value "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().object)),new Error("entity value "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object))}}}validateFocusToAll(e){let t,r,n,i,o,a,s=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(r=C.getInstance())&&r.GetValiDateState()&&void 0!==e){if(void 0!==(null==e?void 0:e.types)){if("object"!=typeof e.types||void 0===e.types.length)throw s&&s.func("types "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array)),new Error("types "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array));e.types.forEach(e=>{var t;if(!b.get(e))throw s&&s.func(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().entityType))})}if(void 0!==(null==e?void 0:e.bFilterForExclude)&&"boolean"!=typeof e.bFilterForExclude)throw s&&s.func("bFilterForExclude "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().boolean)),new Error("bFilterForExclude "+(null==(a=C.getInstance())?void 0:a.GetCommonErr().boolean))}}validateCameraStepMove(t){var e,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()&&void 0!==t){if(void 0===(null==t?void 0:t.moveDirection))throw r&&r.func("moveDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required)),new Error("moveDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required));if("string"!=typeof t.moveDirection)throw r&&r.func("moveDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("moveDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.cameraStepMove.find(e=>e===t.moveDirection))throw r&&r.func(`moveDirection ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.cameraStepMove.toString()),new Error(`moveDirection ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.cameraStepMove.toString());if(void 0===(null==t?void 0:t.step))throw r&&r.func("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required)),new Error("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required));if("number"!=typeof t.step)throw r&&r.func("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number)),new Error("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==(null==t?void 0:t.bContinuous)&&"boolean"!=typeof t.bContinuous)throw r&&r.func("bContinuous "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("bContinuous "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().boolean))}}validateCameraStepRotate(t){var e,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(e=C.getInstance())&&e.GetValiDateState()&&void 0!==t){if(void 0===(null==t?void 0:t.rotateDirection))throw r&&r.func("rotateDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required)),new Error("rotateDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required));if("string"!=typeof t.rotateDirection)throw r&&r.func("rotateDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string)),new Error("rotateDirection "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().string));if(!C.cameraStepRotate.find(e=>e===t.rotateDirection))throw r&&r.func(`rotateDirection ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.cameraStepRotate.toString()),new Error(`rotateDirection ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.cameraStepRotate.toString());if(void 0===(null==t?void 0:t.step))throw r&&r.func("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required)),new Error("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().required));if("number"!=typeof t.step)throw r&&r.func("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number)),new Error("step "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().number));if(void 0!==(null==t?void 0:t.bContinuous)&&"boolean"!=typeof t.bContinuous)throw r&&r.func("bContinuous "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("bContinuous "+(null==(r=C.getInstance())?void 0:r.GetCommonErr().boolean))}}validateCameraStepZoom(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&void 0!==e){if(void 0===(null==e?void 0:e.step))throw r&&r.func("step "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required)),new Error("step "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().required));if("number"!=typeof e.step)throw r&&r.func("step "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number)),new Error("step "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().number));if(void 0!==(null==e?void 0:e.bContinuous)&&"boolean"!=typeof e.bContinuous)throw r&&r.func("bContinuous "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bContinuous "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}}class Xo extends G{constructor(e){super(e),Object.defineProperty(this,"controllerName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpCameraControlAPI"}),Object.defineProperty(this,"CameraValidate",{enumerable:!0,configurable:!0,writable:!0,value:new Qo})}FocusToNodes(e,r=!1){return m(this,void 0,void 0,function*(){this.CameraValidate.validateFocusToNodes(e);var t={nodeIds:e.nodeIds};if(r)if(void 0!==(null==e?void 0:e.project))t.aesTilesEid=e.project.eid;else{let e=yield this.obj.Scene.Project.GetProject();t.aesTilesEid=0e.eid):[],yield this.StartApi(this.controllerName,"FocusToEntities",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FocusToAll(t){return m(this,void 0,void 0,function*(){this.CameraValidate.validateFocusToAll(t);var e={},e=(void 0!==t&&(void 0!==(null==t?void 0:t.types)&&(e.entityTypes=t.types.map(e=>b.get(e))),void 0!==(null==t?void 0:t.bFilterForExclude))&&(e.bFilterForExclude=t.bFilterForExclude),yield this.StartApi(this.controllerName,"FocusToAllEntities",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Follow(t){return m(this,void 0,void 0,function*(){this.CameraValidate.validateFollow(t);var e={},e=(e.followRotation=void 0!==t.followRotation?t.followRotation:{pitch:-30,yaw:0},e.useRelativeRotation=void 0!==t.useRelativeRotation&&t.useRelativeRotation,e.distance=void 0!==t.distance?t.distance:1e3,e.eid=t.entity?t.entity.GetData().eid:"",yield this.StartApi(this.controllerName,"FollowEntity",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Stop(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.controllerName,"CameraStop",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Rotate(e){return m(this,void 0,void 0,function*(){return this.CameraValidate.validateRotate(e),yield this.StartApi(this.controllerName,"CameraRotate",e)})}Around(t){return m(this,void 0,void 0,function*(){this.CameraValidate.validateAround(t);var e={},e=(e.direction=void 0!==t.direction?t.direction:"clockwise",e.velocity=void 0!==t.velocity?t.velocity:10,yield this.StartApi(this.controllerName,"CameraAround",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}PlayCameraRoam(t,r){return m(this,void 0,void 0,function*(){this.CameraValidate.validatePlayCameraRoam(t,r);var e=r?Object.assign({cameraRoamEid:t.eid},r):{cameraRoamEid:t.eid},e=yield this.StartApi(this.controllerName,"PlayCameraRoam",e);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Apply(t,r=1){return m(this,void 0,void 0,function*(){this.CameraValidate.validateApply(t,r);var e=t.GetData().eid,e=yield this.StartApi(this.controllerName,"ApplyCameraPreset",{eid:e,flyTime:r});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FocusByCustomId(t,r){return m(this,void 0,void 0,function*(){this.CameraValidate.validateFocusByCustomId(t,r);var e={},e=(void 0!==r.rotation&&(e.rotation=r.rotation),e.distanceFactor=void 0!==r.distanceFactor?r.distanceFactor:1,e.flyTime=void 0!==r.flyTime?r.flyTime:1,e.eids=dn(t,this.obj.ObjectEidMap).map(e=>e.eid),yield this.StartApi(this.controllerName,"FocusToEntities",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}FocusByEntityName(t,r){return m(this,void 0,void 0,function*(){this.CameraValidate.validateFocusByEntityName(t,r);var e={},e=(void 0!==r.rotation&&(e.rotation=r.rotation),e.distanceFactor=void 0!==r.distanceFactor?r.distanceFactor:1,e.flyTime=void 0!==r.flyTime?r.flyTime:1,e.eids=hn(t,this.obj.ObjectEidMap).map(e=>e.eid),yield this.StartApi(this.controllerName,"FocusToEntities",e));return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CameraStepMove(t){return m(this,void 0,void 0,function*(){this.CameraValidate.validateCameraStepMove(t);var e=yield this.StartApi(this.controllerName,"CameraStepMove",t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CameraStepRotate(t){return m(this,void 0,void 0,function*(){this.CameraValidate.validateCameraStepRotate(t);var e=yield this.StartApi(this.controllerName,"CameraStepRotate",t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CameraStepZoom(t){return m(this,void 0,void 0,function*(){this.CameraValidate.validateCameraStepZoom(t);var e=yield this.StartApi(this.controllerName,"CameraStepZoom",t);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}StopCameraStepUpdate(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.controllerName,"StopCameraStepUpdate",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class ea extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Camera"}),Object.defineProperty(this,"CameraPresetEntityAtom",{enumerable:!0,configurable:!0,writable:!0,value:{bDefaultCamera:!1,location:[0,0,0],rotation:{pitch:-30,yaw:0},pitchLimit:[-90,0],yawLimit:[0,360],viewDistanceLimit:[100,1e6],fieldOfView:0,controlMode:"RTS"}}),this.setObjAtom(this),this.oType="Camera",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get bDefaultCamera(){return this.CameraPresetEntityAtom.bDefaultCamera}set bDefaultCamera(e){this.Update({bDefaultCamera:e})}get location(){return this.CameraPresetEntityAtom.location}set location(e){this.Update({location:e})}get rotation(){return this.CameraPresetEntityAtom.rotation}set rotation(e){this.Update({rotation:e})}get pitchLimit(){return this.CameraPresetEntityAtom.pitchLimit}set pitchLimit(e){this.Update({pitchLimit:e})}get yawLimit(){return this.CameraPresetEntityAtom.yawLimit}set yawLimit(e){this.Update({yawLimit:e})}get viewDistanceLimit(){return this.CameraPresetEntityAtom.viewDistanceLimit}set viewDistanceLimit(e){this.Update({viewDistanceLimit:e})}get fieldOfView(){return this.CameraPresetEntityAtom.fieldOfView}set fieldOfView(e){this.Update({FieldOfView:e})}get controlMode(){return this.CameraPresetEntityAtom.controlMode}set controlMode(e){this.Update({controlMode:e})}GetDefaultCamera(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.bDefaultCamera}})}SetDefaultCamera(e){return m(this,void 0,void 0,function*(){return yield this.Update({bDefaultCamera:e})})}GetbDefaultCamera(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.bDefaultCamera}})}SetbDefaultCamera(e){return m(this,void 0,void 0,function*(){return yield this.Update({bDefaultCamera:e})})}GetLocation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.location}})}SetLocation(e){return m(this,void 0,void 0,function*(){return yield this.Update({location:e})})}GetRotation(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.rotation}})}SetRotation(e){return m(this,void 0,void 0,function*(){return yield this.Update({rotation:e})})}GetPitchLimit(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.pitchLimit}})}SetPitchLimit(e){return m(this,void 0,void 0,function*(){return yield this.Update({pitchLimit:e})})}GetYawLimit(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.yawLimit}})}SetYawLimit(e){return m(this,void 0,void 0,function*(){return yield this.Update({yawLimit:e})})}GetViewDistanceLimit(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.viewDistanceLimit}})}SetViewDistanceLimit(e){return m(this,void 0,void 0,function*(){return yield this.Update({viewDistanceLimit:e})})}GetFieldOfView(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.fieldOfView}})}SetFieldOfView(e){return m(this,void 0,void 0,function*(){return yield this.Update({fieldOfView:e})})}GetControlMode(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraPresetEntityAtom.controlMode}})}SetControlMode(e){return m(this,void 0,void 0,function*(){return yield this.Update({controlMode:e})})}GetScheme(){return{CameraPresetEntityAtom:this.CameraPresetEntityAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{bDefaultCamera:this.CameraPresetEntityAtom.bDefaultCamera,location:this.CameraPresetEntityAtom.location,rotation:this.CameraPresetEntityAtom.rotation,pitchLimit:this.CameraPresetEntityAtom.pitchLimit,yawLimit:this.CameraPresetEntityAtom.yawLimit,viewDistanceLimit:this.CameraPresetEntityAtom.viewDistanceLimit,fieldOfView:this.CameraPresetEntityAtom.fieldOfView,controlMode:this.CameraPresetEntityAtom.controlMode})}SetData(e){this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setLockedData(e),this.setIndexData(e),e.bDefaultCamera&&(this.CameraPresetEntityAtom.bDefaultCamera=e.bDefaultCamera),e.location&&(this.CameraPresetEntityAtom.location=e.location),e.rotation&&(this.CameraPresetEntityAtom.rotation=e.rotation),e.pitchLimit&&(this.CameraPresetEntityAtom.pitchLimit=e.pitchLimit),e.yawLimit&&(this.CameraPresetEntityAtom.yawLimit=e.yawLimit),e.viewDistanceLimit&&(this.CameraPresetEntityAtom.viewDistanceLimit=e.viewDistanceLimit),e.fieldOfView&&(this.CameraPresetEntityAtom.fieldOfView=e.fieldOfView),e.controlMode&&(this.CameraPresetEntityAtom.controlMode=e.controlMode)}generateAtomData(e){var t={},r={},n={},i={},o={},a={};return O(r,e),0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.entityName&&this.validateEntityName(t.entityName),void 0!==t.customId&&this.validateCustomId(t.customId),void 0!==t.location&&this.validateLocation(t.location),void 0!==t.bDefaultCamera&&"boolean"!=typeof t.bDefaultCamera)throw i&&i.func("bDefaultCamera "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean)),new Error("bDefaultCamera "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean));if(void 0!==t.rotation){if("object"!=typeof t.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:0,yaw:0};if(Object.keys(t.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rotation)?void 0:n.pitch)&&("number"!=typeof t.rotation.pitch||t.rotation.pitch<-90||0"number"==typeof e&&-90<=e&&e<=0).length)throw i&&i.func(`pitchLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`);if(t.pitchLimit[0]>t.pitchLimit[1])throw i&&i.func("pitchLimit[0] must be <= pitchLimit[1]"),new Error("pitchLimit[0] must be <= pitchLimit[1]")}if(void 0!==t.yawLimit){if("object"!=typeof t.yawLimit||void 0===t.yawLimit.length)throw i&&i.func("yawLimit "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("yawLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.yawLimit.filter(e=>"number"==typeof e&&-180<=e&&e<=180).length)throw i&&i.func(`yawLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`);if(t.yawLimit[0]>t.yawLimit[1])throw i&&i.func("yawLimit[0] must be <= yawLimit[1]"),new Error("yawLimit[0] must be <= yawLimit[1]")}if(void 0!==t.viewDistanceLimit){if("object"!=typeof t.viewDistanceLimit||void 0===t.viewDistanceLimit.length)throw i&&i.func("viewDistanceLimit "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("viewDistanceLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.viewDistanceLimit.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`viewDistanceLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`);if(t.viewDistanceLimit[0]>t.viewDistanceLimit[1])throw i&&i.func("viewDistanceLimit[0] must be <= viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be <= viewDistanceLimit[1]")}if(void 0!==t.fieldOfView&&("number"!=typeof t.fieldOfView||t.fieldOfView<0||120e===t.controlMode))throw i&&i.func(`controlMode ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.controlModeType.toString()),new Error(`controlMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.controlModeType.toString())}}}class ta extends G{constructor(e){super(e,ea),this.setType("Camera")}}class ra extends x{constructor(e){var t;super(),Object.defineProperty(this,"className",{enumerable:!0,configurable:!0,writable:!0,value:"CameraRoam"}),Object.defineProperty(this,"CameraRoamAtom",{enumerable:!0,configurable:!0,writable:!0,value:{frames:[]}}),Object.defineProperty(this,"CameraRoamFrames",{enumerable:!0,configurable:!0,writable:!0,value:{location:[0,0,0],rotation:{pitch:0,yaw:0},time:0}}),this.setObjAtom(this),this.oType="CameraRoam",this.type=b.get(this.oType),e&&(null!=(t=C.getInstance())&&t.GetValiDateState()&&this.Validate&&this.Validate(e),this.SetData(e),this.addNewScheme=Object.assign({EntityType:this.type},this.generateAtomData(e)))}get frames(){return this.CameraRoamAtom.frames}set frames(e){this.Update({frames:e})}GetFrames(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.CameraRoamAtom.frames}})}SetFrames(e){return m(this,void 0,void 0,function*(){return yield this.Update({frames:e})})}GetScheme(){return{CameraRoamAtom:this.CameraRoamAtom}}GetData(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.getEid()),this.getBasicData()),this.getOtherData()),{frames:this.CameraRoamAtom.frames})}SetData(e){this.setEid(e),this.setBasicData(e),this.setVisibleData(e),this.setIndexData(e),e.frames&&(this.CameraRoamAtom.frames=e.frames)}generateAtomData(e){var t={},r={},n={},i={},o={},a={};return O(r,e),0{var t;if(void 0===s[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.eid&&this.validateEid(e.eid),void 0!==e.entityName&&this.validateEntityName(e.entityName),void 0!==e.customId&&this.validateCustomId(e.customId),void 0!==e.frames){if("object"!=typeof e.frames||void 0===e.frames.length)throw a&&a.func("frames "+(null==(i=C.getInstance())?void 0:i.GetCommonErr().array)),new Error("frames "+(null==(o=C.getInstance())?void 0:o.GetCommonErr().array));e.frames.forEach(e=>{var t,n;if("object"!=typeof e)throw a&&a.func("frames value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object)),new Error("frames value "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().object));let r=this.CameraRoamFrames;if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`frames.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.location&&this.validateLocation(e.location),void 0!==e.rotation){if("object"!=typeof e.rotation)throw a&&a.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:0,yaw:0};if(Object.keys(e.rotation).forEach(e=>{var t;if(void 0===r[e])throw a&&a.func(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=e.rotation)?void 0:n.pitch)&&("number"!=typeof e.rotation.pitch||e.rotation.pitch<-90||0{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==t.eid&&this.validateEid(t.eid),void 0!==t.rotation){if("object"!=typeof t.rotation)throw i&&i.func("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("rotation "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={pitch:0,yaw:0};if(Object.keys(t.rotation).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(`rotation.${e} `+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==(null==(n=t.rotation)?void 0:n.pitch)&&("number"!=typeof t.rotation.pitch||t.rotation.pitch<-90||0{var t;if("object"!=typeof e||void 0===e.length)throw i&&i.func("The value of locationLimit "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array)),new Error("The value of locationLimit "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().array));if(2!==e.filter(e=>"number"==typeof e).length)throw i&&i.func(`The value of locationLimit ${null==(t=C.getInstance())?void 0:t.GetCommonErr().arrayNumberLength} 2`),new Error(`The value of locationLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2`)})}if(void 0!==t.pitchLimit){if("object"!=typeof t.pitchLimit||void 0===t.pitchLimit.length)throw i&&i.func("pitchLimit "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("pitchLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.pitchLimit.filter(e=>"number"==typeof e&&-90<=e&&e<=0).length)throw i&&i.func(`pitchLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`),new Error(`pitchLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -90 ~ 0`);if(t.pitchLimit[0]>t.pitchLimit[1])throw i&&i.func("pitchLimit[0] must be <= pitchLimit[1]"),new Error("pitchLimit[0] must be <= pitchLimit[1]")}if(void 0!==t.yawLimit){if("object"!=typeof t.yawLimit||void 0===t.yawLimit.length)throw i&&i.func("yawLimit "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("yawLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.yawLimit.filter(e=>"number"==typeof e&&-180<=e&&e<=180).length)throw i&&i.func(`yawLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`),new Error(`yawLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayNumberLength} 2. ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} -180 ~ 180`);if(t.yawLimit[0]>t.yawLimit[1])throw i&&i.func("yawLimit[0] must be <= yawLimit[1]"),new Error("yawLimit[0] must be <= yawLimit[1]")}if(void 0!==t.viewDistanceLimit){if("object"!=typeof t.viewDistanceLimit||void 0===t.viewDistanceLimit.length)throw i&&i.func("viewDistanceLimit "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().array)),new Error("viewDistanceLimit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().array));if(2!==t.viewDistanceLimit.filter(e=>"number"==typeof e&&0<=e).length)throw i&&i.func(`viewDistanceLimit ${null==(e=C.getInstance())?void 0:e.GetCommonErr().arrayPositiveNumberLength} 2`),new Error(`viewDistanceLimit ${null==(n=C.getInstance())?void 0:n.GetCommonErr().arrayPositiveNumberLength} 2`);if(t.viewDistanceLimit[0]>t.viewDistanceLimit[1])throw i&&i.func("viewDistanceLimit[0] must be <= viewDistanceLimit[1]"),new Error("viewDistanceLimit[0] must be <= viewDistanceLimit[1]")}if(void 0!==t.fieldOfView&&("number"!=typeof t.fieldOfView||t.fieldOfView<0||120e===t.controlMode))throw i&&i.func(`controlMode ${null==(e=C.getInstance())?void 0:e.GetCommonErr().range} `+C.controlModeType.toString()),new Error(`controlMode ${null==(n=C.getInstance())?void 0:n.GetCommonErr().range} `+C.controlModeType.toString())}}}class oa extends G{constructor(e){super(e,ia),this.setType("CameraStart")}}class aa{validateSetEnable(e){var t,r=null==(r=C.getInstance())?void 0:r.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()&&"boolean"!=typeof e)throw r&&r.func("bEnableTransaction "+(null==(t=C.getInstance())?void 0:t.GetCommonErr().boolean)),new Error("bEnableTransaction "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}validateStart(e){var t,n;let i=null==(t=C.getInstance())?void 0:t.GetEvent("OnValidateError");if(null!=(t=C.getInstance())&&t.GetValiDateState()){if("object"!=typeof e)throw i&&i.func("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object)),new Error("opt "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().object));let r={transactionName:"",bTransactionGroup:!0,bCanUndo:!0,bCanCommit:!0};if(Object.keys(e).forEach(e=>{var t;if(void 0===r[e])throw i&&i.func(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr)),new Error(e+" "+(null==(t=C.getInstance())?void 0:t.getErrorTxt().keyErr))}),void 0!==e.transactionName&&"string"!=typeof e.transactionName)throw i&&i.func("transactionName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string)),new Error("transactionName "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().string));if(void 0!==e.bTransactionGroup&&"boolean"!=typeof e.bTransactionGroup)throw i&&i.func("bTransactionGroup "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bTransactionGroup "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==e.bCanUndo&&"boolean"!=typeof e.bCanUndo)throw i&&i.func("bCanUndo "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bCanUndo "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean));if(void 0!==e.bCanCommit&&"boolean"!=typeof e.bCanCommit)throw i&&i.func("bCanCommit "+(null==(n=C.getInstance())?void 0:n.GetCommonErr().boolean)),new Error("bCanCommit "+(null==(e=C.getInstance())?void 0:e.GetCommonErr().boolean))}}}class sa extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"WdpTransactionAPI"}),Object.defineProperty(this,"TransactionValidate",{enumerable:!0,configurable:!0,writable:!0,value:new aa})}SetEnable(t=!1){return m(this,void 0,void 0,function*(){this.TransactionValidate.validateSetEnable(t);var e=yield this.StartApi(this.apiClassName,"SetTransactionEnable",{bEnableTransaction:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Start(t){return m(this,void 0,void 0,function*(){this.TransactionValidate.validateStart(t);var e=Object.assign({},t),e=yield this.StartApi(this.apiClassName,"CreateTransaction",e);return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Commit(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"CommitTransaction",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Rollback(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"RollbackTransaction",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Undo(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"Undo",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Redo(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"Redo",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CanUndo(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"CanUndo",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}CanRedo(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"CanRedo",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Clear(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"ClearTransactions",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}Get(){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"GetTransactionList",{});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}class la extends I{constructor(e){super(e),Object.defineProperty(this,"pluginInstance",{enumerable:!0,configurable:!0,writable:!0,value:[]})}Install(t){return m(this,void 0,void 0,function*(){var e=new t(this.obj);if(!e.install)return{success:!1,message:"Install error. Plugin must include install function!"};let n=yield e.install();if(!n.list||0===n.list.length)return{success:!1,message:"Install error. Install list is empty!"};n.list.forEach((t,e)=>{if(this.obj.highLevelLog(`Plugin install start: ${e+1} / `+n.list.length),t.factory&&t.name){var r=new(null!=(r=t.factory)&&r.extendsCore?t.factory.extendsCore(G,x):t.factory)(this.obj);if(t.category?"DataModel"===t.category?this.obj.DataModel[t.name]=r:"Geometry"===t.category?this.obj.DataModel.Geometry[t.name]=r:"Scene"===t.category?this.obj.Scene[t.name]=r:"Covering"===t.category?this.obj.Scene.Covering[t.name]=r:"Model"===t.category?this.obj.Scene.Model[t.name]=r:this.obj[t.category]?this.obj[t.category][t.name]=r:this.obj[t.category]=r:this.obj[t.name]=r,t.type&&t.category){this.obj.RegisterObj.EntityType.set(t.name,t.type);let e=this.obj.RegisterObj.Get(t.name);e?(e.object=r,e.category=t.category):this.obj.RegisterObj.Register([{name:t.name,object:r,category:t.category}])}if(t.object){let e=null!=(r=t.object)&&r.extendsCore?t.object.extendsCore(x):t.object;this.obj[t.name]=e}this.obj.cloudApiLog(`Plugin install process: ${e+1} / `+n.list.length)}});e=Qr.v1();return this.pluginInstance.push(n.info?{id:e,list:n.list,info:n.info}:{id:e,list:n.list}),{success:!0,message:"Install success!",result:{id:e}}})}Uninstall(t){return m(this,void 0,void 0,function*(){if(0===this.pluginInstance.length)return{success:!1,message:"No Plugin is installed!"};let r=this.pluginInstance.findIndex(e=>e.id===t);return r<0?{success:!1,message:"Id is illegal"}:0===this.pluginInstance[r].list.length?{success:!1,message:"List is empty!"}:(this.pluginInstance[r].list.forEach((t,e)=>{if(this.obj.highLevelLog(`Plugin uninstall start: ${e+1} / `+this.pluginInstance[r].list.length),t.name){if(t.category?"DataModel"===t.category?this.obj.DataModel[t.name]=null:"Geometry"===t.category?this.obj.DataModel.Geometry[t.name]=null:"Scene"===t.category?this.obj.Scene[t.name]=null:"Covering"===t.category?this.obj.Scene.Covering[t.name]=null:"Model"===t.category?this.obj.Scene.Model[t.name]=null:this.obj[t.category]&&(this.obj[t.category]=null):this.obj[t.name]=null,t.type&&t.category){this.obj.RegisterObj.EntityType.delete(t.name);let e=this.obj.RegisterObj.GetIndex(t.name);0<=e&&this.obj.RegisterObj.Delete(e)}t.object&&(this.obj[t.name]=null),this.obj.cloudApiLog(`Plugin uninstall process: ${e+1} / `+this.pluginInstance[r].list.length)}}),this.pluginInstance.splice(r,1),{success:!0,message:"Uninstall success!"})})}Get(){return m(this,void 0,void 0,function*(){return{success:!0,message:"",result:this.pluginInstance.map(e=>e.info)}})}}class ua extends I{constructor(e){super(e),Object.defineProperty(this,"apiClassName",{enumerable:!0,configurable:!0,writable:!0,value:"EarthEditorAPI"})}Enter(t="cn"){return m(this,void 0,void 0,function*(){var e=yield this.StartApi(this.apiClassName,"EnterEarthEditor",{language:t});return yield w(e,this.obj.RequestEntity,this.obj.RegisterObj,this.obj.ObjectEidMap)})}}return class extends V{constructor(e){var t,r={id:e.id};void 0!==(null==e?void 0:e.debugMode)&&(r.debugMode=e.debugMode),void 0!==(null==e?void 0:e.keyboard)&&(r.keyboard=e.keyboard),void 0!==(null==e?void 0:e.lock)&&(r.lock=e.lock),void 0!==(null==e?void 0:e.fullscreen)&&(r.fullscreen=e.fullscreen),r.initLog=null!=(t=e.initLog)&&t,super(r),Object.defineProperty(this,"recordMode",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"apiInfo",{enumerable:!0,configurable:!0,writable:!0,value:nn}),Object.defineProperty(this,"record",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"ws",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"apiRequestMode",{enumerable:!0,configurable:!0,writable:!0,value:"RTC"}),Object.defineProperty(this,"apiRequestURL",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"timeoutTime",{enumerable:!0,configurable:!0,writable:!0,value:6e4}),Object.defineProperty(this,"ObjectEidMap",{enumerable:!0,configurable:!0,writable:!0,value:W}),Object.defineProperty(this,"RegisterObj",{enumerable:!0,configurable:!0,writable:!0,value:new tn}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"order",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"UeEvent",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"UeEvents",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"reqMan",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"EventList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sceneIsReady",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"RequestEntity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Renderer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Debug",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Environment",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"System",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ApiStateManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Customize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Setting",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"DataModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Scene",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"CameraControl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"CameraPreset",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"CameraRoams",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"CameraStart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Transaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Plugin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"Camera",{enumerable:!0,configurable:!0,writable:!0,value:ea}),Object.defineProperty(this,"CameraRoam",{enumerable:!0,configurable:!0,writable:!0,value:ra}),Object.defineProperty(this,"Point",{enumerable:!0,configurable:!0,writable:!0,value:ii}),Object.defineProperty(this,"Polyline",{enumerable:!0,configurable:!0,writable:!0,value:ai}),Object.defineProperty(this,"Polygon2D",{enumerable:!0,configurable:!0,writable:!0,value:li}),Object.defineProperty(this,"Range",{enumerable:!0,configurable:!0,writable:!0,value:Gi}),Object.defineProperty(this,"Poi",{enumerable:!0,configurable:!0,writable:!0,value:Ti}),Object.defineProperty(this,"Path",{enumerable:!0,configurable:!0,writable:!0,value:Ri}),Object.defineProperty(this,"HeatMap",{enumerable:!0,configurable:!0,writable:!0,value:Li}),Object.defineProperty(this,"HighlightArea",{enumerable:!0,configurable:!0,writable:!0,value:Vi}),Object.defineProperty(this,"Particle",{enumerable:!0,configurable:!0,writable:!0,value:ki}),Object.defineProperty(this,"Text3D",{enumerable:!0,configurable:!0,writable:!0,value:Di}),Object.defineProperty(this,"ColumnarHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:Ui}),Object.defineProperty(this,"Window",{enumerable:!0,configurable:!0,writable:!0,value:Bi}),Object.defineProperty(this,"Viewshed",{enumerable:!0,configurable:!0,writable:!0,value:Hi}),Object.defineProperty(this,"Parabola",{enumerable:!0,configurable:!0,writable:!0,value:qi}),Object.defineProperty(this,"Bound",{enumerable:!0,configurable:!0,writable:!0,value:ro}),Object.defineProperty(this,"Light",{enumerable:!0,configurable:!0,writable:!0,value:io}),Object.defineProperty(this,"Tiles",{enumerable:!0,configurable:!0,writable:!0,value:Po}),Object.defineProperty(this,"EarthTiles",{enumerable:!0,configurable:!0,writable:!0,value:ko}),Object.defineProperty(this,"Static",{enumerable:!0,configurable:!0,writable:!0,value:lo}),Object.defineProperty(this,"Hierarchy",{enumerable:!0,configurable:!0,writable:!0,value:co}),Object.defineProperty(this,"Skeletal",{enumerable:!0,configurable:!0,writable:!0,value:mo}),Object.defineProperty(this,"SpaceHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:eo}),Object.defineProperty(this,"RoadHeatMap",{enumerable:!0,configurable:!0,writable:!0,value:Ji}),Object.defineProperty(this,"Raster",{enumerable:!0,configurable:!0,writable:!0,value:Zi}),Object.defineProperty(this,"RealTimeVideo",{enumerable:!0,configurable:!0,writable:!0,value:Qi}),Object.defineProperty(this,"Group",{enumerable:!0,configurable:!0,writable:!0,value:Bo}),Object.defineProperty(this,"Material",{enumerable:!0,configurable:!0,writable:!0,value:gi}),Object.defineProperty(this,"Effects",{enumerable:!0,configurable:!0,writable:!0,value:Vo}),Object.defineProperty(this,"LocalGeoReference",{enumerable:!0,configurable:!0,writable:!0,value:yi}),Object.defineProperty(this,"Vegetation",{enumerable:!0,configurable:!0,writable:!0,value:vo}),Object.defineProperty(this,"ModelerEmbank",{enumerable:!0,configurable:!0,writable:!0,value:po}),Object.defineProperty(this,"ModelerWater",{enumerable:!0,configurable:!0,writable:!0,value:Eo}),Object.defineProperty(this,"ModelerRiver",{enumerable:!0,configurable:!0,writable:!0,value:Co}),Object.defineProperty(this,"ModelerFence",{enumerable:!0,configurable:!0,writable:!0,value:Io}),Object.defineProperty(this,"ModelerFloor",{enumerable:!0,configurable:!0,writable:!0,value:Oo}),Object.defineProperty(this,"startCloud",{enumerable:!0,configurable:!0,writable:!0,value:r=>m(this,void 0,void 0,function*(){var t="fixed"===this.rendererMode?this.width:null==(t=document.getElementById(this.id))?void 0:t.clientWidth,e="fixed"===this.rendererMode?this.height:null==(e=document.getElementById(this.id))?void 0:e.clientHeight,t=yield this.reqMan.requestFunc(r,{order:this.order,width:t,height:e});if(null!=t&&t.success){let e=t.results.io;if(!e.startsWith("http"))if(""!==this.prefix)e=this.url+e;else try{e=new URL(this.url).origin+e}catch(e){}return this.startRenderCloud(e,t.results.taskId),{success:!0,message:"start Render Cloud",result:t.results}}return this.cloudApiLog("get IO Error!"),{success:!1,message:t.msg,errCode:t.code}})}),Object.defineProperty(this,"startCloudByTaskId",{enumerable:!0,configurable:!0,writable:!0,value:(e,t)=>m(this,void 0,void 0,function*(){return this.startRenderCloud(e,t),{success:!0,message:"start Render Cloud"}})}),Object.defineProperty(this,"startApi",{enumerable:!0,configurable:!0,writable:!0,value:(o,a=null)=>new Promise((t,r)=>{let n=null,i=(this.highLevelLog("Params data",o,a),en.getInstance().addListener({callback:e=>{this.highLevelLog("return callback data",e),t(e),n&&(clearTimeout(n),n=null)}})),e=Object.assign(Object.assign({},o),{args:Object.assign({guid:i},a)});this.cloudApiLog("Send Data",JSON.stringify(e),e),this.recordMode&&(this.record+=JSON.stringify(e)+",\n"),"WS"===this.apiRequestMode?this.ws&&this.ws.send(JSON.stringify(e)):this.sendLargeDataAction("string",JSON.stringify(e),(...e)=>{this.highLevelLog("large string send process",e)}),n=setTimeout(()=>{var e={success:!1,message:"Request timeout!",result:i};this.cloudApiLog("return callback data",e),r(e),clearTimeout(n),n=null},this.timeoutTime)})}),Object.defineProperty(this,"startApiByObject",{enumerable:!0,configurable:!0,writable:!0,value:(e=null)=>new Promise((t,r)=>{let n=null,i=(this.highLevelLog("Params data",e),en.getInstance().addListener({callback:e=>{this.highLevelLog("return callback data",e),t(e),n&&(clearTimeout(n),n=null)}}));e.args.guid=i,this.cloudApiLog("Send Json",e),"WS"===this.apiRequestMode?this.ws&&this.ws.send(JSON.stringify(e)):this.sendLargeDataAction("string",JSON.stringify(e),(...e)=>{this.highLevelLog("large string send process",e)}),n=setTimeout(()=>{var e={success:!1,message:"Request timeout!",result:i};this.cloudApiLog("return callback data",e),r(e),clearTimeout(n),n=null},this.timeoutTime)})}),Object.defineProperty(this,"handleDataChannelMessage",{enumerable:!0,configurable:!0,writable:!0,value:(e,t=null)=>{this.highLevelLog("handle datachannel data(string): ",e);var r=JSON.parse(e);switch(r.type){case Yr.API:this.cloudApiLog("Reponse(type: API): ",e,r),this.handleApiData(r);break;case Yr.EVENT:this.cloudApiLog("Reponse(type: EVENT): ",e,r),this.handleUEEventData(r);break;case Yr.ERROR:this.cloudApiLog("Reponse(type: ERROR): ",e,r),this.handleErrorData(r);break;default:this.cloudApiLog("Reponse(type: Unknowen): ",e,r),this.handleDefaultData(r)}t&&t.func(r)}}),Object.defineProperty(this,"handleApiData",{enumerable:!0,configurable:!0,writable:!0,value:e=>{var t,r;e.guid&&((t=en.getInstance().findListener(e.guid))?(r={success:e.success,message:e.message,result:e.result},t.callback(r),en.getInstance().removeListener(e.guid)):this.cloudApiLog("can not find callback"))}}),Object.defineProperty(this,"handleUEEventData",{enumerable:!0,configurable:!0,writable:!0,value:t=>{var e;let r=this.UeEvent.get(t.event_name+"_system"),n=this.UeEvents.filter(e=>0<=e.name.indexOf(t.event_name+"_private")&&e.sync),i=this.UeEvents.filter(e=>0<=e.name.indexOf(t.event_name+"_private")&&!e.sync),o=this.UeEvent.get(t.event_name),a=this.UeEvents.filter(e=>e.name===t.event_name);if(this.highLevelLog("all Register Func list (system, privateSync, private, user, users)",r,n,i,o,a),null!=(e=t.args)&&e.type){let e=this.RegisterObj.GetByValue(this.RegisterObj.EntityType,t.args.type);e&&(t.args.type=e)}let s={event_name:t.event_name,result:t.args};r?r.func(s,{objSync:n,objPri:i,obj:o,objs:a}):(n&&0<(null==n?void 0:n.length)?n.forEach(e=>{e.func(s,{obj:o,objs:a})}):(a&&0{e.func(s)}),o&&o.func(s)),i&&0<(null==i?void 0:i.length)&&i.forEach(e=>{e.func(s)}))}}),Object.defineProperty(this,"handleErrorData",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.highLevelLog("Renderer Error Message: ",e);var t=null==(t=C.getInstance())?void 0:t.GetEvent("onDataError");t&&t.func(e)}}),Object.defineProperty(this,"handleDefaultData",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.highLevelLog("Unknowen Message: ",e)}}),Object.defineProperty(this,"handleUserAndPluginEventLogic",{enumerable:!0,configurable:!0,writable:!0,value:(t,r)=>{var e;r&&(r.objSync&&0<(null==(e=r.objSync)?void 0:e.length)?r.objSync.forEach(e=>{e.func(t,{obj:r.obj,objs:r.objs})}):(r.objs&&0{e.func(t)}),r.obj&&r.obj.func(t)),r.objPri)&&0<(null==(e=r.objPri)?void 0:e.length)&&r.objPri.forEach(e=>{e.func(t)})}}),Object.defineProperty(this,"OnWdpSceneIsReady",{enumerable:!0,configurable:!0,writable:!0,value:(t,r)=>m(this,void 0,void 0,function*(){var e;if(this.highLevelLog("(system) OnWdpSceneIsReady: ",t),100===(null==(e=null==t?void 0:t.result)?void 0:e.progress)){this.sceneIsReady=!0,yield this.ToggleAPIEventChannel();let e=yield this.Scene.GetGlobal();this.cloudApiLog("init Objects",e),this.generateDebugRTC()}this.highLevelLog("OnWdpSceneIsReady all Register Func",r),this.handleUserAndPluginEventLogic({success:!0,message:"OnWdpSceneIsReady",result:null==t?void 0:t.result},r)})}),Object.defineProperty(this,"OnEntityClicked",{enumerable:!0,configurable:!0,writable:!0,value:(i,o)=>m(this,void 0,void 0,function*(){var e,t,r;if(this.highLevelLog("(system) Entity clicked: ",i),null!=(e=i.result)&&e.type&&null!=(t=i.result)&&t.eid){let e=this.RegisterObj.Get(i.result.type);if(e){let t=yield e.object.Get(""+i.result.eid);if(t.success){void 0!==(null==(n=i.result)?void 0:n.position)&&(t.result.position=i.result.position),void 0!==(null==(r=i.result)?void 0:r.nodeId)&&(t.result.nodeId=i.result.nodeId),this.handleUserAndPluginEventLogic(t,o);let e=this.EventList.GetType(i.result.type);e&&e.func(t);var n=this.EventList.Get(""+i.result.eid);n&&n.func(t)}if(this.DataModel.Cluster.openonclick&&0e.eid===""+i.result.eid);if(n){let r=this.DataModel.Cluster.evnetCacheData.find(e=>e.aggregation_id===n.customId);if(1<(null==r?void 0:r.aggregate_count)&&(null==r?void 0:r.aggregate_count)<=this.DataModel.Cluster.countLimit){let o=this.DataModel.Cluster.clusterCacheData.find(e=>e.queryId===(null==r?void 0:r.queryId));if(o){let t=o.calculateCoordZ;if(null!=r&&r.aggregation.forEach(e=>{var t=e.coord.split(",").map(e=>parseFloat(e));t.push(0);let r=e,n=JSON.stringify(o.covering);Object.keys(r).forEach(e=>{n=n.replace(`{${e}}`,r[e])});var i=JSON.parse(n),t=(i.location=t,i.customId=e.id,Object.assign({},i));a.push(t)}),0e.eid===""+i.result.eid);0<=e&&this.DataModel.Cluster.generatedEntity.splice(e,1),this.Scene.Creates(a,{calculateCoordZ:t}).then(e=>{e.success&&this.DataModel.Cluster.generatedEntity.push(...e.result.objects)})}}}}}this.cloudApiLog("OnEntityClicked result:",t)}else this.cloudApiLog(`OnEntityClicked result: ${i.result.type} isn't exist`)}else this.cloudApiLog("OnEntityClicked result: type or eid isn't exist")})}),Object.defineProperty(this,"OnEntityDbClicked",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>m(this,void 0,void 0,function*(){var e,t;if(this.highLevelLog("(system) Entity double clicked: ",n),null!=(e=n.result)&&e.type&&null!=(t=n.result)&&t.eid){let e=this.RegisterObj.Get(n.result.type);if(e){let t=yield e.object.Get(""+n.result.eid);if(t.success){void 0!==(null==(r=n.result)?void 0:r.position)&&(t.result.position=n.result.position),void 0!==(null==(r=n.result)?void 0:r.nodeId)&&(t.result.nodeId=n.result.nodeId),this.handleUserAndPluginEventLogic(t,i);let e=this.EventList.GetDbType(n.result.type);e&&e.func(t);var r=this.EventList.GetDb(""+n.result.eid);r&&r.func(t)}this.cloudApiLog("OnEntityDbClicked result:",t)}else this.cloudApiLog(`OnEntityDbClicked result: ${n.result.type} isn't exist`)}else this.cloudApiLog("OnEntityDbClicked result: type or eid isn't exist")})}),Object.defineProperty(this,"OnMouseEnterEntity",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>m(this,void 0,void 0,function*(){var e,t;if(this.highLevelLog("(system) Entity mouse enter: ",n),null!=(e=n.result)&&e.type&&null!=(t=n.result)&&t.eid){let e=this.RegisterObj.Get(n.result.type);if(e){let t=yield e.object.Get(""+n.result.eid);if(t.success){void 0!==(null==(r=n.result)?void 0:r.mousePos)&&(t.result.mousePos=n.result.mousePos),this.handleUserAndPluginEventLogic(t,i);let e=this.EventList.GetEnterType(n.result.type);e&&e.func(t);var r=this.EventList.GetEnter(""+n.result.eid);r&&r.func(t)}this.cloudApiLog("OnMouseEnterEntity result:",t)}else this.cloudApiLog(`OnMouseEnterEntity result: ${n.result.type} isn't exist`)}else this.cloudApiLog("OnMouseEnterEntity result: type or eid isn't exist")})}),Object.defineProperty(this,"OnMouseOutEntity",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>m(this,void 0,void 0,function*(){var e,t;if(this.highLevelLog("(system) Entity mouse out: ",n),null!=(e=n.result)&&e.type&&null!=(t=n.result)&&t.eid){let e=this.RegisterObj.Get(n.result.type);if(e){let t=yield e.object.Get(""+n.result.eid);if(t.success){void 0!==(null==(r=n.result)?void 0:r.mousePos)&&(t.result.mousePos=n.result.mousePos),this.handleUserAndPluginEventLogic(t,i);let e=this.EventList.GetOutType(n.result.type);e&&e.func(t);var r=this.EventList.GetOut(""+n.result.eid);r&&r.func(t)}this.cloudApiLog("OnMouseOutEntity result:",t)}else this.cloudApiLog(`OnMouseOutEntity result: ${n.result.type} isn't exist`)}else this.cloudApiLog("OnMouseOutEntity result: type or eid isn't exist")})}),Object.defineProperty(this,"OnEntityNodeSelectionChanged",{enumerable:!0,configurable:!0,writable:!0,value:(r,n)=>m(this,void 0,void 0,function*(){this.highLevelLog("(system) Entity Nodes Selection changed: ",r);var e,t={object:null,nodeIds:[],selectionType:null};if(t.nodeIds=r.result.nodeIds,null!=(e=r.result)&&e.selectionType)switch(t.selectionType=r.result.selectionType,parseInt(r.result.selectionType,10)){case Jr.Add:t.selectionType="Add";break;case Jr.Remove:t.selectionType="Remove";break;case Jr.Clear:t.selectionType="Clear"}if(null!=(e=r.result)&&e.eid){let e=yield E([r.result.eid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t.object=0m(this,void 0,void 0,function*(){this.highLevelLog("(system) Selection changed: ",r);var e,t={objects:[],selectionType:null};if(null!=(e=r.result)&&e.selectionType)switch(t.selectionType=r.result.selectionType,parseInt(r.result.selectionType,10)){case Jr.Add:t.selectionType="Add";break;case Jr.Remove:t.selectionType="Remove";break;case Jr.Clear:t.selectionType="Clear"}if(null!=(e=r.result)&&e.eids){let e=yield E(r.result.eids,this.RequestEntity,this.RegisterObj,this.ObjectEidMap);0m(this,void 0,void 0,function*(){var e;if(this.highLevelLog("(system) Entity added: ",t),null!=(e=t.result)&&e.typeToEids){let e=yield sn(t.result.typeToEids,this.RegisterObj);this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityAdded",result:e},r)}})}),Object.defineProperty(this,"OnEntityRemoved",{enumerable:!0,configurable:!0,writable:!0,value:(t,r)=>m(this,void 0,void 0,function*(){var e;if(this.highLevelLog("(system) Entity removed: ",t),null!=(e=t.result)&&e.typeToEids){let e=yield sn(t.result.typeToEids,this.RegisterObj);this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityRemoved",result:e},r)}})}),Object.defineProperty(this,"OnEntityUpdated",{enumerable:!0,configurable:!0,writable:!0,value:(t,r)=>m(this,void 0,void 0,function*(){var e;if(this.highLevelLog("(system) Entity updated: ",t),null!=(e=t.result)&&e.typeToEids){let e=yield sn(t.result.typeToEids,this.RegisterObj);this.handleUserAndPluginEventLogic({success:!0,message:"OnEntityUpdated",result:e},r)}})}),Object.defineProperty(this,"OnWdpSceneChanged",{enumerable:!0,configurable:!0,writable:!0,value:(t,r)=>m(this,void 0,void 0,function*(){this.highLevelLog("(system) Scene changed: ",t);var e=yield S(t.result,this.RequestEntity,this.RegisterObj,this.ObjectEidMap,!0);this.handleUserAndPluginEventLogic({success:!0,message:"OnWdpSceneChanged",result:e},r),this.cloudApiLog("OnWdpSceneChanged result:",{success:!0,message:"OnWdpSceneChanged",result:e})})}),Object.defineProperty(this,"OnMoveAlongPathEnd",{enumerable:!0,configurable:!0,writable:!0,value:(r,n)=>m(this,void 0,void 0,function*(){this.highLevelLog("(system) Move along path end: ",r);var e,t={path:null,move:null,bound:null,bReverse:!1};if(null!=(e=r.result)&&e.pathEid){let e=yield E([r.result.pathEid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);e&&0m(this,void 0,void 0,function*(){var e,t={cameraMotionReason:""};null!=(e=r.result)&&e.cameraMotionReason&&(t.cameraMotionReason=r.result.cameraMotionReason),this.handleUserAndPluginEventLogic({success:!0,message:"OnCameraMotionStartEvent",result:t},n),this.cloudApiLog("OnCameraMotionStartEvent result:",{success:!0,message:"OnCameraMotionStartEvent",result:t})})}),Object.defineProperty(this,"OnCameraMotionEndEvent",{enumerable:!0,configurable:!0,writable:!0,value:(r,n)=>m(this,void 0,void 0,function*(){var e,t={cameraMotionReason:"",objects:[]};if(null!=(e=r.result)&&e.cameraMotionReason&&(t.cameraMotionReason=r.result.cameraMotionReason),null!=(e=r.result)&&e.eids&&0m(this,void 0,void 0,function*(){var e,t={object:{},progress:0};if(void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.eid)&&void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.progress)){let e=yield E([r.result.eid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t.object=0m(this,void 0,void 0,function*(){var e,t={object:{},tip:""};if(void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.entityId)&&void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.tip)){let e=yield E([r.result.entityId],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t.object=0m(this,void 0,void 0,function*(){var e,t={object:{},vegetationNum:0};if(void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.entityId)&&void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.vegetationNum)){let e=yield E([r.result.entityId],this.RequestEntity,this.RegisterObj,this.ObjectEidMap);t.object=0m(this,void 0,void 0,function*(){var e,t={eid:"",meshName:"",materialIndex:-1};void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.eid)&&(yield E([r.result.eid],this.RequestEntity,this.RegisterObj,this.ObjectEidMap),t.eid=r.result.eid),void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.meshName)&&(t.meshName=r.result.meshName),void 0!==(null==(e=null==r?void 0:r.result)?void 0:e.materialIndex)&&(t.materialIndex=r.result.materialIndex),this.Tools.PickerMaterial.pickerMaterialDataList.push(t),this.handleUserAndPluginEventLogic({success:!0,message:"OnWdpMaterialHit",result:t},n),this.cloudApiLog("OnWdpMaterialHit result:",{success:!0,message:"OnWdpMaterialHit",result:t})})}),Object.defineProperty(this,"OnClusterResultEvent",{enumerable:!0,configurable:!0,writable:!0,value:B.debounce((l,e)=>m(this,void 0,void 0,function*(){var e,t,n;if(this.cloudApiLog("OnClusterResultEvent:",l,this.DataModel.Cluster.clusterCacheData),0!==this.DataModel.Cluster.clusterCacheData.length){if(this.highLevelLog("clusterEventStatus",""+this.DataModel.Cluster.clusterEventStatus),0<(null==(t=null==(e=null==l?void 0:l.result)?void 0:e.result)?void 0:t.length)&&"pending"!==this.DataModel.Cluster.clusterEventStatus){this.DataModel.Cluster.clusterEventStatus="pending",this.DataModel.Cluster.evnetCacheData=[],0e.queryId===l.result.result[r].queryId);if(this.highLevelLog("Cluster styleObj",s,l.result.result[r].data),s&&0<(null==(n=null==(n=l.result.result[r])?void 0:n.data)?void 0:n.length)){let t=s.calculateCoordZ;if(l.result.result[r].data.forEach(n=>{n.queryId=l.result.result[r].queryId,this.DataModel.Cluster.evnetCacheData.push(n);var i=n.aggregate_coord.split(",").map(e=>parseFloat(e));if(i.push(0),this.highLevelLog("Cluster styleObj loc",i),1this.DataModel.Cluster.countLimit?this.DataModel.Cluster.countLimit+"+":n.aggregate_count,t=JSON.parse(JSON.stringify(s.aggicon).replace("{count}",e));t.location=i,t.customId=n.aggregation_id;var o=Object.assign({},t);a.push(o)}else if(1===parseInt(n.aggregate_count)){let t=n.aggregation[0],r=JSON.stringify(s.covering);Object.keys(t).forEach(e=>{r=r.replace(`{${e}}`,t[e])});o=JSON.parse(r),i=(o.location=i,o.customId=n.aggregation_id,Object.assign({},o));a.push(i)}}),this.highLevelLog("createJsonData",a),0!e.sync).map(e=>e.name.split("_private")[0]),e=Array.from(new Set(e)),this.System.ToggleAPIEventChannel(e.map(e=>({eventName:e,bOpen:!0}))))}registerSceneEvent(e){e.forEach(e=>{this.UeEvent.set(e.name,e)}),this.sceneIsReady&&(e=e.map(e=>e.name),e=Array.from(new Set(e)),this.System.ToggleAPIEventChannel(e.map(e=>({eventName:e,bOpen:!0}))))}unRegisterSceneEvent(t){if(t.forEach(e=>{this.UeEvent.delete(e)}),this.sceneIsReady){let n=[],e=t;Array.from(new Set(e)).forEach(t=>{var e=this.UeEvents.filter(e=>0<=e.name.indexOf(t+"_private")&&!e.sync),r=this.UeEvents.filter(e=>e.name===t);this.highLevelLog("Register Func list (private, users)",e,r),0===e.length&&0===r.length&&n.push(t)}),0({eventName:e,bOpen:!1})))}}unRegisterSceneEvents(r){if(this.UeEvents=this.UeEvents.filter(t=>r.findIndex(e=>t.name===e)<0),this.sceneIsReady){let o=[],e=r;Array.from(new Set(e)).forEach(e=>{let t=e.split("_private")[0],r=this.UeEvents.filter(e=>0<=e.name.indexOf(t+"_private")&&!e.sync),n=this.UeEvent.get(t),i=this.UeEvents.filter(e=>e.name===t);this.highLevelLog("Register Func list (private, user, users)",r,n,i),0!==r.length||0!==i.length||n||o.push(t)}),0({eventName:e,bOpen:!1})))}}setLogLevel(e="none"){this.setDebugMode(e)}startSocketDebugMode(){this.ws=new WebSocket(this.apiRequestURL),this.ws.onmessage=e=>{this.cloudApiLog("Debug WS Message:",e),e.data.text().then(e=>{this.handleDataChannelMessage(e)})},this.ws.onerror=e=>{this.cloudApiLog("Debug WS Error:",e)},this.ws.onopen=e=>{this.cloudApiLog("Debug WS Open:",e)},this.ws.onclose=e=>{this.cloudApiLog("Debug WS Close:",e)}}ToggleAPIEventChannel(){return m(this,void 0,void 0,function*(){var e=[...this.UeEvent].map(e=>e[0]).filter(e=>e.indexOf("_system")<0),t=this.UeEvents.filter(e=>!e.sync).map(e=>e.name.split("_private")[0]),e=Array.from(new Set(e.concat(t)));yield this.System.ToggleAPIEventChannel(e.map(e=>({eventName:e,bOpen:!0})))})}generateDebugRTC(){let m=document.getElementById(this.id),g=document.createElement("div");g.id="playerDebugRTC",g.style.padding="10px",g.style.position="fixed",g.style.left="0",g.style.bottom="0",g.style.zIndex="100000",g.style.color="white",g.style.background="rgba(0, 0, 0, 0.7)",g.style.border="#ccc solid 1px",g.style.width="240px",g.style.overflowX="auto",setInterval(()=>{!0===(null==window?void 0:window.debugRTC)?this.Renderer.GetStats().then(e=>{m.querySelector("#playerDebugRTC")||m.appendChild(g),console.log("RTC Stats:",e);var t,r=new Intl.NumberFormat(window.navigator.language,{maximumFractionDigits:0}),n=new Intl.NumberFormat(window.navigator.language,{maximumFractionDigits:0,minimumIntegerDigits:2});let i=(e.result.timestamp-e.result.timestampStart)/1e3;var o=[],a=[60,60];for(let e=0;e
Codec:
${void 0!==(null==(t=e.result)?void 0:t.video_codec)?e.result.video_codec:"N/A"}
Latency (ms):
${void 0!==(null==(t=e.result)?void 0:t.currentRoundTripTime)?r.format(1e3*e.result.currentRoundTripTime):"N/A"}
Duration:
${n.format(u)}:${n.format(l)}:${n.format(s)}
Received (${c}):
${r.format(d)}
Frames Decoded:
${void 0!==(null==(t=e.result)?void 0:t.framesDecoded)?r.format(e.result.framesDecoded):"N/A"}
Packets Lost:
${void 0!==(null==(u=e.result)?void 0:u.packetsLost)?r.format(e.result.packetsLost):"N/A"}
Bitrate (Mbps):
${void 0!==(null==(l=e.result)?void 0:l.bitrate)?(e.result.bitrate/1e3).toFixed(2):"N/A"}
Low Bitrate (Mbps):
${void 0!==(null==(n=e.result)?void 0:n.lowBitrate)?(e.result.lowBitrate/1e3).toFixed(2):"N/A"}
High Bitrate (Mbps):
${void 0!==(null==(s=e.result)?void 0:s.highBitrate)?(e.result.highBitrate/1e3).toFixed(2):"N/A"}
AVG Bitrate (Mbps):
${void 0!==(null==(t=e.result)?void 0:t.avgBitrate)?(e.result.avgBitrate/1e3).toFixed(2):"N/A"}
Framerate:
${void 0!==(null==(u=e.result)?void 0:u.framerate)?r.format(e.result.framerate):"N/A"}
Low Framerate:
${void 0!==(null==(l=e.result)?void 0:l.lowFramerate)?r.format(e.result.lowFramerate):"N/A"}
High Framerate:
${void 0!==(null==(n=e.result)?void 0:n.highFramerate)?r.format(e.result.highFramerate):"N/A"}
AVG Framerate:
${void 0!==(null==(s=e.result)?void 0:s.avgframerate)?r.format(e.result.avgframerate):"N/A"}
`}):m.querySelector("#playerDebugRTC")&&g.remove()},1e3)}}}(CloudApi);/*for gui*/window.GUIwdpapi=WdpApi;